text
stringlengths
2.85k
2.55M
label
class label
11 classes
Published in Theory and Practice of Logic Programming 11(4–5), 611–627 (2011) (27th Int’l. Conference on Logic Programming (ICLP’11) Special Issue) 1 SUNNY-CP and the MiniZinc Challenge arXiv:1706.08627v3 [cs.AI] 5 Jul 2017 Roberto Amadini Department of Computing and Information Systems, The University of Melbourne, Australia. Maurizio Gabbrielli DISI, University of Bologna, Italy / FOCUS Research Team, INRIA, France. Jacopo Mauro Department of Informatics, University of Oslo, Norway. Abstract In Constraint Programming (CP) a portfolio solver combines a variety of different constraint solvers for solving a given problem. This fairly recent approach enables to significantly boost the performance of single solvers, especially when multicore architectures are exploited. In this work we give a brief overview of the portfolio solver sunny-cp, and we discuss its performance in the MiniZinc Challenge—the annual international competition for CP solvers—where it won two gold medals in 2015 and 2016. Under consideration in Theory and Practice of Logic Programming (TPLP) 1 Introduction In Constraint Programming (CP) the goal is to model and solve Constraint Satisfaction Problems (CSPs) and Constraint Optimisation Problems (COPs) (Rossi et al. 2006). Solving a CSP means finding a solution that satisfies all the constraints of the problem, while for COPs the goal is to find an optimal solution, which minimises (or maximises) an objective function. A fairly recent trend to solve combinatorial problems, based on the well-known Algorithm Selection problem (Rice 1976), consists of building portfolio solvers (Gomes and Selman 2001). A portfolio solver is a meta-solver that exploits a collection of n > 1 constituent solvers s1 , . . . , sn . When a new, unseen problem comes, the portfolio solver seeks to predict and run its best solver(s) si1 , . . . , sik (with 1 ≤ k ≤ n) for solving the problem. Despite that plenty of Algorithm Selection approaches have been proposed (Kotthoff 2014; Smith-Miles 2008; Hutter et al. 2014), a relatively small number of portfolio solvers have been practically adopted (Amadini et al. 2015c). In particular, only few portfolio solvers participated in CP solvers competitions. The first one (for solving CSPs only) was CPHydra (O’Mahony et al. 2008) that in 2008 won the International CSP Solver Competition.1 In 2013 a portfolio solver based on Numberjack (Hebrard et al. 2010) attended the MiniZinc Challenge (MZNC) (Stuckey et al. 2014), nowadays the only surviving international competition for CP solvers. 1 The International CSP Solver Competition ended in 2009. 2 Between 2014 and 2016, sunny-cp was the only portfolio solver that joined the MZNC. Its first, sequential version had appreciable results in the MZNC 2014 but remained off the podium. In MZNC 2015 and 2016 its enhanced, parallel version (Amadini et al. 2015a) demonstrated its effectiveness by winning the gold medal in the Open category of the challenge. In this paper, after a brief overview of sunny-cp, we discuss the performance it achieved in the MiniZinc Challenges 2014—2016 and we propose directions for future works. The lessons we learned are: • a portfolio solver is robust even in prohibitive scenarios, like the MiniZinc Challenge, characterised by small-size test sets and unreliable solvers; • in a multicore setting, a parallel portfolio of sequential solvers appears to be more fruitful than a single, parallel solver; • sunny-cp can be a useful baseline to improve the state-of-the-art for (not only) the CP field, where dealing with non-reliable solvers must be properly addressed. 2 SUNNY and SUNNY-CP In this section we provide a high-level description of sunny-cp, referring the interested reader to Amadini et al. (2015b; 2015a) for a more detailed presentation. sunny-cp is an open-source CP portfolio solver. Its first implementation was sequential (Amadini et al. 2015b), while the current version exploits multicore architectures to run more solvers in parallel and to enable their cooperation via bounds sharing and restarting policies. To the best of our knowledge, it is currently the only parallel portfolio solver able to solve generic CP problems encoded in MiniZinc language (Nethercote et al. 2007). sunny-cp is built on top of SUNNY algorithm (Amadini et al. 2014b). Given a set of known problems, a solving timeout T and a portfolio Π, SUNNY uses the k-Nearest Neighbours (k-NN) algorithm to produce a sequential schedule σ = Pn [(s1 , t1 ), . . . , (sk , tn )] where solver si ∈ Π has to be run for ti seconds and i=1 ti = T . The time slots ti and the ordering of solvers si are defined according to the average performance of the solvers of Π on the k training instances closer to the problem to be solved. For each problem p, a feature vector is computed and the Euclidean distance is used to retrieve the k instances in the training set closer to p. In a nutshell, a feature vector is a collection of numerical attributes that characterise a given problem instance. sunny-cp uses several features, e.g., statistics over the variables, the (global) constraints, the objective function (when applicable), the search heuristics. In total, sunny-cp uses 95 features.2 The sequential schedule σ is then parallelised on the c ≥ 1 available cores by running the first and most promising c − 1 solvers in the k-neighbourhood on the 2 The first version of sunny-cp also used graph features and dynamic features, afterwards removed for the sake of efficiency and portability. For more details about sunny-cp features, please see Amadini et al. (2014a) and https://github.com/CP-Unibo/mzn2feat. SUNNY-CP and the MiniZinc Challenge 3 Solver(s) Description Choco∗ , G12/FD, Gecode, JaCoP∗∗ , Mistral∗∗ , OR-Tools∗ Finite Domain (FD) solvers Chuffed, CPX, G12/LazyFD, Opturion CPX∗ Lazy Clause Generation solvers G12/CBC, MZN/Gurobi MIP solvers HaifaCSP∗ Proof-producing CSP Solver iZplus∗ CP solver using local search and no-good techniques MinisatID∗ Combines techniques from SAT, SMT, CP, and ASP Picat-SAT∗∗ Encodes CP problems into SAT Table 1: Constituent solvers of sunny-cp. The * symbol indicates the solvers introduced in MZNC 2015, while ** indicates those introduced in MZNC 2016. first c−1 cores, while the remaining solvers (if any) are assigned to the last available core by linearly widening their allocated times to cover the time window [0, T ]. The notion of “promising solver” depends on the context. For CSPs, the performance is measured only in terms of number of solved instances and average solving time. For COPs, also the quality of the solutions is taken into account (Amadini and Stuckey 2014). We might say that sunny-cp uses a conservative policy: first, it skims the original portfolio by selecting a promising subset of its solvers; second, it allocates to each of these solvers an amount of time proportional to their supposed effectiveness. Solvers are run in parallel and a “bound-and-restart” mechanism is used for enabling the bounds sharing between the running COP solvers (Amadini et al. 2015a). This allows one to use the (sub-optimal) solutions found by a solver to narrow the search space of the other scheduled solvers. If there are fewer solvers than cores, sunny-cp simply allocates a solver per core. Since sunny-cp treats solvers as black boxes, it can not support the sharing of the bounds knowledge without the solvers interruption. For this reason, a restarting threshold Tr is used to decide when to stop a solver and restart it with a new bound. A running solver is stopped and restarted when: (i) it has not found a solution in the last Tr seconds; (ii) its current best bound is obsolete w.r.t. the overall best bound found by another scheduled solver. Table 1 summarises the solvers used by sunny-cp in the MZNCs 2014–2016. For more details about these solvers, see Prud’homme et al. (2016), de Cat et al. (2013), Zhou and Kjellerstrand (2016), Veksler and Strichman (2016), MiniZinc (2016), JaCoP (2016), Mistral (2016), OR-Tools (2016), Chuffed (2016), Opturion CPX (2016), iZplus (2016). 4 Solver Score OR-Tools * Chuffed Choco * Opturion CPX Gecode * iZplus G12/LazyFD Mistral MZN/Gurobi JaCoP Fzn2smt Gecoxicals MZN/CPLEX G12/FD Numberjack * Picat G12/CBC 1098.85 1034.81 973.27 929.76 858.24 758.47 664.44 614.62 589.38 577.08 556.94 512.73 447 426.53 383.18 363.02 118.69 Solver Score Chuffed 1326.02 OR-Tools * 1086.97 Opturion CPX 1081.02 sunny-cp-seq-pre 1066.46 Choco * 1007.61 iZplus * 996.32 sunny-cp-seq 968.64 G12/LazyFD 784.28 HaifaCSP 781.72 Gecode * 721.48 SICStus Prolog 710.51 Mistral 705.56 MinisatID 588.74 Picat SAT 588.06 JaCoP 550.74 G12/FD 528.26 Picat CP 404.88 Concrete 353.74 Solver Score sunny-cp-seq-pre Chuffed sunny-cp-seq Opturion CPX OR-Tools SICStus Prolog Choco MinisatID Gecode G12/LazyFD JaCoP G12/FD Picat CP 835.44 831.32 763.55 621.73 620.34 555.61 503.29 472.90 482.61 434.81 405.66 293.21 291.53 (c) MZNC 2014, Fixed category with sunny-cp and MinisatID. (a) MZNC 2013, Open cate- (b) MZNC 2014, Open category. gory. Table 2: Results of MZNCs 2013–2014. Portfolio solvers are in bold font, parallel solvers are marked with *, not eligible solvers are in italics. 3 SUNNY-CP and the MiniZinc Challenge The MiniZinc Challenge (MZNC) (Stuckey et al. 2014) is the annual international competition for CP solvers. Portfolio solvers compete in the “Open” class of MZNC, where all solvers are free to use multiple threads or cores, and no search strategy is imposed. The scoring system of the MZNC is based on a Borda count (Chevaleyre et al. 2007) where a solver s is compared against each other solver s′ over 100 problem instances— belonging to different classes—defined in the MiniZinc language. If s gives a better answer than s′ then it scores 1 point, if it gives a worse solution it scores 0 points. If s and s′ give indistinguishable answers the scoring is based on the solving time.3 Until MZNC 2014, the solving timeout was 15 minutes and did not include the MiniZinc-to-FlatZinc conversion time. Starting from the MZNC 2015 this time has been included, and the timeout has been extended to 20 minutes. 3.1 MiniZinc Challenges 2013–2014 Table 2 summarizes the Open class results in the MZNCs 2013–2014. The first 3 Please refer to http://www.minizinc.org/challenge.html for further details. SUNNY-CP and the MiniZinc Challenge 5 portfolio solver that attended a MiniZinc Challenge in 2013 (see Table 2a) was based on Numberjack platform (Hebrard et al. 2010). In the following years, sunny-cp was unfortunately the only portfolio solver that entered the competition. In 2014, sunny-cp was a sequential solver running just one solver at time. We will denote it with sunny-cp-seq to distinguish such version from the current parallel one. sunny-cp-seq came with two versions: the default one and a version with pre-solving denoted in Table 2b as sunny-cp-seq-pre. In the latter a static selection of solvers was run for a short time, before executing the default version in the remaining time. Both of the two versions used the same portfolio of 7 solvers, viz. Chuffed, CPX, G12/FD, G12/LazyFD, Gecode, MinisatID, MZN/Gurobi. For more details, we refer the reader to Amadini et al. (2015b). sunny-cp-seq improved on Numberjack and obtained respectable results: the two variants ranked 4th and 7th out of 18. sunny-cp-seq had to compete also with parallel solvers and all its solvers except MinisatID and MZN/Gurobi adopted the “fixed” strategy, i.e., they used the search heuristic defined in the problems instead of their preferred strategy. As described by Amadini et al. (2016a), we realised afterward that this choice is often not rewarding. To give a measure of comparison, as shown in Table 2c, sunny-cp-seq in the “Fixed”4 category—where sequential solvers must follow the search heuristic defined in the model—would have been ranked 1st and 3rd . Moreover, unlike other competitors, the results of sunny-cp-seq were computed by including also the MiniZinc-to-FlatZinc5 conversion time since, by its nature, sunny-cp can not be a FlatZinc solver (see Amadini et al. (2015b) for more details). This penalised sunny-cp-seq especially for the easier instances. 3.2 MiniZinc Challenge 2015 Several enhancements of sunny-cp-seq were implemented after the MZNC 2014: (i) sunny-cp became parallel, enabling the simultaneous execution of its solvers while retaining the bounds communication for COPs; (ii) new state-of-the-art solvers were incorporated in its portfolio; (iii) sunny-cp became more stable, usable, configurable and flexible. These improvements, detailed by Amadini et al. (2015a) where sunny-cp has been tested on large benchmarks, have been reflected in its performance in the MZNC 2015. sunny-cp participated in the competition with two versions: a default one and an “eligible” one, denoted sunny-cp− in Table 3. The difference is that sunny-cp− did not include solvers developed by the organisers of the challenge, and therefore was eligible for prizes. sunny-cp− used Choco, Gecode, HaifaCSP, iZplus, MinisatID, Opturion CPX and OR-Tools solvers, while sunny-cp used also Chuffed, MZN/Gurobi, G12/FD and G12/LazyFD. Since the availability of eight logical 4 5 According to MZNC rules, each solver in the Fixed category that has not a Free version is automatically promoted in the Free category (analogously, solvers in the Free category can be entered in the Parallel category, and then in turn in the Open category). MZNC uses the MiniZinc language to specify the problems, while the solvers use the lower level specification language FlatZinc, which is obtained by compilation from MiniZinc models. 6 Solver Score Incomplete sunny-cp * Chuffed sunny-cp− * OR-Tools * Opturion CPX Gecode * Choco * iZplus * JaCoP Mistral * MinisatID MZN/CPLEX * MZN/Gurobi * Picat SAT MinisatID-MP G12/FD Picat CP Concrete YACS * OscaR/CBLS 1351.13 1342.37 1221.88 1111.83 1094.09 1049.49 1027.65 1021.13 914.97 872.35 835.01 799.92 774.3 744.53 637.14 629.94 617.22 533.42 404.01 403.61 1175.2 1118.16 1156.25 1071.67 1036.65 979.05 989 1082.92 865.64 878.53 793.74 686.64 697.12 626.61 700.35 664.79 654.81 657.2 553.51 536.17 (a) Open category. Solver Score sunny-cp * 1423.58 Chuffed 1387.95 sunny-cp− * 1304.39 Opturion CPX 1146.18 iZplus 1070.15 OR-Tools 994.41 Mistral 960.16 JaCoP-fd 912.1 Gecode 908.32 Choco 864.39 MinisatID 828.2 MZN/CPLEX 786.11 Picat SAT 780.13 MZN/Gurobi 724.27 MinisatID-MP 623.58 Picat CP 618.78 G12/FD 589.65 Concrete 560.16 YACS 458.81 OscaR/CBLS 418.67 Incomplete 1256.65 1166.56 1240.88 1091.76 1093.26 917.17 937.01 838.77 867.82 887.08 791.23 698.77 709.62 654.7 688.47 633.61 607.02 676.08 601.81 539.73 (b) Free Category with sunny-cp. Table 3: Results of MZNC 2015. Portfolio solvers are in bold font, parallel solvers are marked with *, not eligible solvers are in italics. cores, sunny-cp performed algorithm selection for computing and distributing the SUNNY sequential schedule, while sunny-cp− launched all its solvers in parallel. Table 3 shows that sunny-cp is the overall best solver while sunny-cp− won the gold medal since Chuffed—the best sequential solver—was not eligible for prizes. The column “Incomplete” refers to the MZNC score computed without giving any point for proving optimality or infeasibility. This score, meant to evaluate local search solvers, only takes into account the quality of a solution. Note that with this metric also sunny-cp− overcomes Chuffed, without having it in the portfolio. Several reasons justify the success of sunny-cp in MZNC 2015. Surely the parallelisation on multiple cores of state-of-the-art solvers was decisive, especially because it was cooperative thanks to bounds sharing mechanism. Moreover, differently from MZNC 2014, all the solvers were run with their free version instead of the fixed one. Furthermore, the MZNC rules were less penalising for portfolio solvers since for the first time in the history of the MZNCs the total solving time included also the MiniZinc-to-FlatZinc conversion time. We underline that the constituent solvers of sunny-cp do not exploit multithreading. Hence, the parallel solvers marked with * in Table 3a are not the constituent solvers of sunny-cp but their (new) parallel variants. SUNNY-CP and the MiniZinc Challenge 7 The overall best single solver is Chuffed, which is sequential. Having it in the portfolio is clearly a benefit for sunny-cp. However, even without Chuffed, sunny-cp− is able to provide solutions of high quality (see “Incomplete” column of Table 3) proving that also the other solvers are important for the success of sunny-cp. We remark that—as pointed out also by Amadini et al. (2015b)—when compared to the best solver for a given problem, a portfolio solver always has additional overheads (e.g., due to feature extraction or memory contention issues) that penalise its score. The 100 problems of MZNC 2015 are divided into 20 different problem classes, each of which consisting of 5 instances: in total, 10 CSPs and 90 COPs. sunny-cp was the best solver for only two classes: cvrp and freepizza. Interestingly, for the whole radiation problem class, sunny-cp− scored 0 points because it always provided an unsound answer due to a buggy solver. This is a sensitive issue that should not be overlooked. On the one hand, a buggy solver inevitably affects the whole portfolio making it buggy as well. On the other hand, not using an unstable solver may penalize the global performance since experimental solvers like Chuffed and iZplus can be very efficient even if not yet in a stable stage. As we shall see also in Section 3.3, unlike SAT but similarly to SMT field, most CP solvers are not fully reliable (e.g., in MZNC 2014 one third of the solvers provided at least an unsound answer). When unreliable solvers are used, a possible way to mitigate the problem is to verify a posteriori the solution. For instance, another constituent solver can be used for double-checking a solution. Obviously, checking all the solutions of all the solvers implies a slowdown in the solving time. Note that the biggest problems arise when the solver does not produce a solution or when it declares a sub-optimal solution as optimal. In the first case, since solvers usually do not present a proof of the unsatisfiability, checking the correctness of the answer requires solving the same problem from scratch. In the second case, the presence of a solution may simplify the check of the answer, but checking if a solution is optimal is still an NP-hard problem. In MZNC 2015 sunny-cp checked HaifaCSP, since its author warned us about its unreliability. This allowed sunny-cp to detect 21 incorrect answers. Without this check its performance would have been dramatically worse: sunny-cp would have scored 87.5 points less—thus resulting worse than Chuffed—while sunny-cp− would have scored 206.84 points less, passing from the gold medal to no medal. However, this check was not enough: due to bugs in other constituent solvers sunny-cp provided 5 wrong answers, while sunny-cp− provided 7 wrong answers. 3.3 MiniZinc Challenge 2016 In the MiniZinc Challenge 2016 we enrolled three versions, namely: sunny-cp, sunny-cp−, and sunny-cp−−. sunny-cp was not eligible for prizes and added to the portfolio of MZNC 2015 three new solvers: JaCoP, Mistral, and Picat-SAT. 8 Solver Score LCG-Glucose 1899.23 sunny-cp * 1877.79 Chuffed 1795.57 LCG-Glucose-UC 1671.52 sunny-cp−− * 1620.82 MZN/Gurobi * 1499.04 HaifaCSP 1448.35 MZN/CPLEX * 1436.05 Picat SAT 1423.81 iZplus * 1374.12 sunny-cp− * 1365.31 Choco * 1342.41 OR-Tools * 1115.8 Gecode * 1110.19 MinisatID * 992.12 MZN/SCIP 985.37 JaCoP 923.78 Mistral * 826.61 MZN/CBC 754.77 SICStus Prolog 754.33 G12/FD 703.14 Concrete 583.9 Picat CP 475.47 OscaR/CBLS 468.5 Yuck * 316 (a) Open category. Incomplete 1548.2 1616.19 1486.8 1306.26 1486.11 1308.18 1343.54 1287.09 1336.36 1446.36 1205.73 1390.21 1258.51 1137.21 1002.17 1011.25 1041.03 935.8 827.06 837.57 829.39 627.36 651.63 708 412 Solver Score sunny-cp * 1054.83 LCG-Glucose 1029.43 Chuffed 993.79 sunny-cp− * 982.7 LCG-Glucose-UC 929.28 sunny-cp−− * 899.47 MZN/Gurobi * 862.26 MZN/CPLEX * 829.12 iZplus * 779.88 HaifaCSP 777.91 Picat SAT 735.82 Choco * 700.46 Gecode * 633 OR-Tools * 560.5 MZN/SCIP 545.85 MinisatID * 498.33 SICStus Prolog 437.33 JaCoP 433.76 MZN/CBC 421.32 Mistral * 382.68 G12/FD 374.56 Concrete 291.42 Picat CP 260.79 OscaR/CBLS 216.5 Yuck * 171 Incomplete 928.95 876.56 844.42 893.39 748.17 875.6 705.18 704.59 778.98 775.48 713.71 765.13 639.35 659.38 535.75 539.69 510.66 555.49 453.06 470.87 430.27 327.7 334.13 286.5 181 (b) Open Category without the instances on which sunny-cp− failed. Table 4: Open class results of MZNC 2016. Portfolio solvers are in bold font, parallel solvers are marked with *, not eligible solvers are in italics. sunny-cp− contained only the eligible solvers of sunny-cp, i.e., Choco, Gecode, HaifaCSP, JaCoP, iZplus, MinisatID, Mistral, Opturion CPX, OR-Tools, Picat.6 sunny-cp−− contained only the solvers of sunny-cp− that never won a medal in the Free category of the last three challenges, i.e., Gecode, HaifaCSP, JaCoP, MinisatID, Mistral, Picat. Ideally, we aimed to measure the contribution of the supposedly best solvers of sunny-cp−. Conversely, to sunny-cp and sunny-cp−, sunny-cp−− does not need to schedule its solvers, having fewer solvers than available cores. It just launches all its solvers in parallel. Table 4a shows the Open category ranking of the MZNC 2016. These results 6 We did not have an updated version of Choco and Opturion solvers, so we used their 2015 version. SUNNY-CP and the MiniZinc Challenge 9 are somehow unexpected if compared with those of the previous editions. For the first time, Chuffed has been outperformed by a sequential solver, i.e., the new, experimental LCG-Glucose—a lazy clause generation solver based on Glucose SAT solver. Surprisingly, solvers like OR-Tools, iZplus, Choco had subdued performance. Conversely, HaifaCSP and Picat-SAT performed very well. The sharp improvement of the solvers based on Gurobi and CPLEX is also clear, arguably due to a better linearisation of the MiniZinc models (Belov et al. 2016). Local search solvers still appear immature. The results of sunny-cp are definitely unexpected. In particular, it appears quite strange that sunny-cp− performed far worse than sunny-cp−− although having more, and ideally better, solvers. We then thoroughly investigated this anomaly since, as also shown in Amadini et al. (2015a; 2016a), the dynamic scheduling of the available solvers is normally more fruitful than statically running an arbitrarily good subset of them over the available cores. Firstly, we note that for the easier instances sunny-cp−− is inherently faster than sunny-cp and sunny-cp− because it does not need to schedule its solvers, and therefore it skips the feature extraction and the algorithm selection phases of the SUNNY algorithm (Amadini et al. 2014b). Nevertheless, most of the MZNC 2016 instances are not easy to solve. Another reason is that sunny-cp−− always runs HaifaCSP and Picat-SAT, two solvers that performed better than expected, while sunny-cp− executes Picat-SAT only for 37 problems. Nonetheless, sunny-cp− always executes HaifaCSP so also this explanation can not fully explain the performance difference. The actual reason behind the performance gap relies on some buggy solvers which belongs to sunny-cp− but not to sunny-cp−−.7 In our pre-challenge tests we did not notice inconsistencies in any of the solvers, except for Choco. So we decided to check the solutions only for Choco and HaifaCSP (the latter because of the unreliability shown in the MZNC 2015, see Section 3.2). However, none of these solvers gave an unsound outcome in the MZNC 2016. Conversely, Opturion and OR-Tools solvers provided a lot of incorrect, and unfortunately unchecked, answers. We also noticed that for some instances our version of Mistral failed when restarted with a new bound, while on the same instances the Free version of Mistral provided a sound outcome. In total, sunny-cp− gave 24 wrong answers,8 meaning that it competed only on the 76% of the problems of MZNC 2016. sunny-cp−− failed instead on 5 instances. Table 4b shows the results without the 24 instances for which sunny-cp− gave an incorrect answer. We underline that this table has a purely indicative value: for a more comprehensive comparison, also the instances where other solvers provided an incorrect answer should be removed. On these 76 problems sunny-cp overcomes LCG-Glucose, while sunny-cp− impressively gains 7 positions and becomes gold 7 8 With the term “buggy solver” we not necessarily mean that the solver itself is actually buggy. The problems may arise due to a misinterpretation of the FlatZinc instances or to the wrong decomposition of global constraints (Rossi et al. 2006). Namely, all the 5 instances of depot-placement, gfd-schedule, and nfc classes; 4 instances of tpp class; 1 instance of cryptanalysis, filter, gbac, java-auto-gen, mapping classes. 10 medallist being the first of the eligible solvers. sunny-cp−− however behaves well (silver medallist), being overtaken by sunny-cp− only. Note that the results of sunny-cp are good also in the original ranking of Table 4a since, being this version not eligible for prizes, the organisers enabled the solutions checking of G12/LazyFD, HaifaCSP, Mistral, Opturion, OR-Tools. This allowed sunny-cp to detect 19 incorrect answers. An interesting insight is given by the Incomplete score, which does not give any benefit when a solver concludes the search (i.e., when optimality or unsatisfiability is proven). As observed also in Section 3.2, with this metric sunny-cp can significantly overcome a solver that has a greater score (e.g., see the Incomplete sunny-cp in Table 4a). This confirms the attitude of sunny-cp in finding good solutions even when it does not conclude the search. 4 Conclusions We presented an overview of sunny-cp, a fairly recent CP portfolio solver relying on the SUNNY algorithm, and we discussed its performance in the MiniZinc Challenge—the annual international competition for CP solvers. In the MiniZinc Challenge 2014 sunny-cp received an honourable mention, in 2015 it has been the first portfolio solver to win a (gold) medal, and in 2016— despite several issues with buggy solvers—it confirmed the first position. For the future of CP portfolio solvers, it would be interesting having more portfolio competitors to improve the state of the art in this field. Different portfolio approaches have been already compared w.r.t. sunny-cp and its versions (Amadini et al. 2014b; Amadini et al. 2016b; Amadini et al. 2015; Lindauer et al. 2016). The Algorithm Selection approaches of the ICON Challenge 2015 (Kotthoff 2015) might be adapted to deal with generic CP problems. The SUNNY algorithm itself, which is competitive in the CP scenarios of [Amadini et al.; Amadini et al. 2014b; 2016b],9 provided very poor performance in the SAT scenarios of the ICON Challenge and Lindauer et al. (2016) show that it can be strongly improved with a proper training phase. sunny-cp runs in parallel different single-threaded solvers. This choice so far has proved to be more fruitful than parallelising the search of a single solver. However, the possibility of using multi-threaded solvers may have some benefits when solving hard problems as shown by Malitsky et al. (2012) for SAT problems. The multi-threaded execution also enables search splitting strategies. It is not clear to us if the use of all the available cores, as done by sunny-cp, is the best possible strategy. As shown by Sabharwal and Samulowitz (2014) it is possible that running in parallel all the solvers on the same multicore machine slows down the execution of the individual solvers. Therefore, it may be more convenient to leave free one or more cores and run just the most promising solvers. Unfortunately, it 9 We submitted such scenarios, namely CSP-MZN-2013 and COP-MZN-2013, to the Algorithm Selection Library (coseal 2014). SUNNY-CP and the MiniZinc Challenge 11 is hard to extrapolate a general pattern to understand the interplay between the solvers and their resource consumption. One direction for further investigations, clearly emerged from the challenge outcomes, concerns how to deal with unstable solvers. Under these circumstances it is important to find a trade-off between reliability and performance. Developing an automated way of checking a CP solver outcome when the answer is “unsatisfiable problem” or “optimal solution” is not a trivial challenge: we can not merely do a solution check, but we have to know and check the actual explanation for which the solver provided such an outcome. A major advancement for CP portfolio solvers would be having API for injecting constraints at runtime, without stopping a running solver. Indeed, interrupting a solver means losing all the knowledge it has collected so far. This is particularly bad for Lazy Clause Generation solvers, and in general for every solver relying on no-good learning. Another interesting direction for further studies is to consider the impact of the global constraints (Rossi et al. 2006) on the performances of the portfolio solver. It is well-known that the propagation algorithms and the decompositions used for global constraints are the keys of solvers effectiveness. We believe that the use of solvers supporting different global constraint decompositions may be beneficial. We underline that—even if focused on Constraint Programming—this work can be extended to other fields, e.g., Constraint Logic Programming, Answer-Set Programming or Planning, where portfolio solving has been used only marginally. To conclude, in order to follow the good practice of making the tools publicly available and easy to install and use, we stress that sunny-cp is publicly available at https://github.com/CP-Unibo/sunny-cp and can be easily installed, possibly relying on the Docker container technology for avoiding the installation of its constituent solvers. All the results of this paper can be reproduced and verified by using the web interface of http://www.minizinc.org/challenge.html. Acknowledgements We are grateful to all the authors and developers of the constituent solvers of sunny-cp, for providing us the tools and the instructions to use the solvers. We thank all the MiniZinc Challenge staff, and in particular Andreas Schutt, for the availability and technical support. This work was supported by the EU project FP7-644298 HyVar: Scalable Hybrid Variability for Distributed, Evolving Software Systems. References Amadini, R., Biselli, F., Gabbrielli, M., Liu, T., and Mauro, J. 2015. SUNNY for algorithm selection: a preliminary study. In Proceedings of the 30th Italian Conference on Computational Logic, Genova, Italy, July 1-3, 2015., D. Ancona, M. Maratea, and V. Mascardi, Eds. CEUR Workshop Proceedings, vol. 1459. CEUR-WS.org, 202–206. Amadini, R., Gabbrielli, M., and Mauro, J. 2014a. An enhanced features extractor for a portfolio of constraint solvers. In Symposium on Applied Computing, SAC 2014, 12 Gyeongju, Republic of Korea - March 24 - 28, 2014, Y. Cho, S. Y. Shin, S. Kim, C. Hung, and J. Hong, Eds. ACM, 1357–1359. Amadini, R., Gabbrielli, M., and Mauro, J. 2014b. SUNNY: a Lazy Portfolio Approach for Constraint Solving. TPLP 14, 4-5, 509–524. Amadini, R., Gabbrielli, M., and Mauro, J. 2015a. A Multicore Tool for Constraint Solving. In Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence, IJCAI 2015, Buenos Aires, Argentina, July 25-31, 2015, Q. Yang and M. Wooldridge, Eds. AAAI Press, 232–238. Amadini, R., Gabbrielli, M., and Mauro, J. 2015b. SUNNY-CP: a sequential CP portfolio solver. In Proceedings of the 30th Annual ACM Symposium on Applied Computing, Salamanca, Spain, April 13-17, 2015, R. L. Wainwright, J. M. Corchado, A. Bechini, and J. Hong, Eds. ACM, 1861–1867. Amadini, R., Gabbrielli, M., and Mauro, J. 2015c. Why CP portfolio solvers are (under)utilized? Issues and challenges. In Logic-Based Program Synthesis and Transformation - 25th International Symposium, LOPSTR 2015, Siena, Italy, July 13-15, 2015. Revised Selected Papers, M. Falaschi, Ed. Lecture Notes in Computer Science, vol. 9527. Springer, 349–364. Amadini, R., Gabbrielli, M., and Mauro, J. 2016a. Parallelizing Constraint Solvers for Hard RCPSP Instances. In Learning and Intelligent Optimization - 10th International Conference, LION 10, Ischia, Italy, May 29 - June 1, 2016, Revised Selected Papers, P. Festa, M. Sellmann, and J. Vanschoren, Eds. Lecture Notes in Computer Science, vol. 10079. Springer, 227–233. Amadini, R., Gabbrielli, M., and Mauro, J. 2016b. Portfolio approaches for constraint optimization problems. Annals of Mathematics and Artificial Intelligence 76, 1-2, 229– 246. Amadini, R. and Stuckey, P. J. 2014. Sequential Time Splitting and Bounds Communication for a Portfolio of Optimization Solvers. In Principles and Practice of Constraint Programming - 20th International Conference, CP 2014, Lyon, France, September 812, 2014. Proceedings, B. O’Sullivan, Ed. Lecture Notes in Computer Science, vol. 8656. Springer, 108–124. Belov, G., Stuckey, P. J., Tack, G., and Wallace, M. 2016. Improved Linearization of Constraint Programming Models. In Principles and Practice of Constraint Programming - 22nd International Conference, CP 2016, Toulouse, France, September 5-9, 2016, Proc., M. Rueher, Ed. Lecture Notes in Computer Science, vol. 9892. Springer, 49–65. Chevaleyre, Y., Endriss, U., Lang, J., and Maudet, N. 2007. A Short Introduction to Computational Social Choice. In SOFSEM 2007: Theory and Practice of Computer Science, 33rd Conference on Current Trends in Theory and Practice of Computer Science, Harrachov, Czech Republic, January 20-26, 2007, Proceedings, J. van Leeuwen, G. F. Italiano, W. van der Hoek, C. Meinel, H. Sack, and F. Plasil, Eds. Lecture Notes in Computer Science, vol. 4362. Springer, 51–69. Chuffed. 2016. Chuffed Solver. https://github.com/geoffchu/chuffed. coseal. 2014. Algorithm Selection Library. https://code.google.com/p/coseal/wiki/AlgorithmSelectionLibrary. de Cat, B., Bogaerts, B., Devriendt, J., and Denecker, M. 2013. Model Expansion in the Presence of Function Symbols Using Constraint Programming. In 2013 IEEE 25th International Conference on Tools with Artificial Intelligence, Herndon, VA, USA, November 4-6, 2013. IEEE Computer Society, 1068–1075. Gomes, C. P. and Selman, B. 2001. Algorithm portfolios. Artificial Intelligence 126, 1-2, 43–62. Hebrard, E., O’Mahony, E., and O’Sullivan, B. 2010. Constraint Programming and Combinatorial Optimisation in Numberjack. In Integration of AI and OR Techniques SUNNY-CP and the MiniZinc Challenge 13 in Constraint Programming for Combinatorial Optimization Problems, 7th International Conference, CPAIOR 2010, Bologna, Italy, June 14-18, 2010. Proc., A. Lodi, M. Milano, and P. Toth, Eds. Lecture Notes in Computer Science, vol. 6140. Springer, 181–185. Hutter, F., Xu, L., Hoos, H. H., and Leyton-Brown, K. 2014. Algorithm runtime prediction: Methods & evaluation. Artificial Intelligence 206, 79–111. iZplus. 2016. iZplus Solver Description. https://www.minizinc.org/challenge2016/description_izplus.txt. JaCoP. 2016. JaCoP Solver. http://jacop.osolpro.com/. Kotthoff, L. 2014. Algorithm Selection for Combinatorial Search Problems: A Survey. AI Magazine 35, 3, 48–60. Kotthoff, L. 2015. ICON challenge on algorithm selection. CoRR abs/1511.04326. Lindauer, M., Bergdoll, R., and Hutter, F. 2016. An Empirical Study of Per-instance Algorithm Scheduling. In Learning and Intelligent Optimization - 10th International Conference, LION 10, Ischia, Italy, May 29 - June 1, 2016, Revised Selected Papers, P. Festa, M. Sellmann, and J. Vanschoren, Eds. Lecture Notes in Computer Science, vol. 10079. Springer, 253–259. Malitsky, Y., Sabharwal, A., Samulowitz, H., and Sellmann, M. 2012. Parallel SAT Solver Selection and Scheduling. In Principles and Practice of Constraint Programming - 18th International Conference, CP 2012, Québec City, Canada, October 8-12, 2012. Proc., M. Milano, Ed. Lecture Notes in Computer Science, vol. 7514. Springer, 512–526. MiniZinc. 2016. MiniZinc Software. https://www.minizinc.org/software.html. Mistral. 2016. Mistral Solver. https://github.com/ehebrard/Mistral-2.0. Nethercote, N., Stuckey, P. J., Becket, R., Brand, S., Duck, G. J., and Tack, G. 2007. MiniZinc: Towards a Standard CP Modelling Language. In Principles and Practice of Constraint Programming - CP 2007, 13th International Conference, CP 2007, Providence, RI, USA, September 23-27, 2007, Proceedings, C. Bessiere, Ed. Lecture Notes in Computer Science, vol. 4741. Springer, 529–543. O’Mahony, E., Hebrard, E., Holland, A., Nugent, C., and O’Sullivan, B. 2008. Using case-based reasoning in an algorithm portfolio for constraint solving. Irish conference on artificial intelligence and cognitive science. Opturion CPX. 2016. Opturion CPX Solver. www.opturion.com/cpx. OR-Tools. 2016. OR-Tools Solver. https://github.com/google/or-tools. Prud’homme, C., Fages, J.-G., and Lorca, X. 2016. Choco Documentation. TASC, INRIA Rennes, LINA CNRS UMR 6241, COSLING S.A.S. Rice, J. R. 1976. The Algorithm Selection Problem. Advances in Computers 15, 65–118. Rossi, F., Beek, P. v., and Walsh, T. 2006. Handbook of Constraint Programming (Foundations of Artificial Intelligence). Elsevier Science Inc., New York, NY, USA. Sabharwal, A. and Samulowitz, H. 2014. Insights into Parallelism with Intensive Knowledge Sharing. In Principles and Practice of Constraint Programming - 20th International Conference, CP 2014, Lyon, France, September 8-12, 2014. Proceedings, B. O’Sullivan, Ed. Lecture Notes in Computer Science, vol. 8656. Springer, 655–671. Smith-Miles, K. 2008. Cross-disciplinary perspectives on meta-learning for algorithm selection. ACM Computing Surveys 41, 1, 6:1–6:25. Stuckey, P. J., Feydy, T., Schutt, A., Tack, G., and Fischer, J. 2014. The MiniZinc Challenge 2008-2013. AI Magazine 35, 2, 55–60. Veksler, M. and Strichman, O. 2016. Learning general constraints in CSP. Artificial Intelligence 238, 135–153. Zhou, N. and Kjellerstrand, H. 2016. The Picat-SAT Compiler. In Practical Aspects of Declarative Languages - 18th International Symposium, PADL 2016, St. Petersburg, 14 FL, USA, January 18-19, 2016. Proceedings, M. Gavanelli and J. H. Reppy, Eds. Lecture Notes in Computer Science, vol. 9585. Springer, 48–62.
2cs.AI
arXiv:1705.10342v1 [cs.AI] 29 May 2017 Deep Learning for Ontology Reasoning Patrick Hohenecker, Thomas Lukasiewicz Department of Computer Science University of Oxford Oxford, United Kingdom {patrick.hohenecker, thomas.lukasiewicz}@cs.ox.ac.uk Abstract In this work, we present a novel approach to ontology reasoning that is based on deep learning rather than logic-based formal reasoning. To this end, we introduce a new model for statistical relational learning that is built upon deep recursive neural networks, and give experimental evidence that it can easily compete with, or even outperform, existing logic-based reasoners on the task of ontology reasoning. More precisely, we compared our implemented system with one of the best logic-based ontology reasoners at present, RDFox, on a number of large standard benchmark datasets, and found that our system attained high reasoning quality, while being up to two orders of magnitude faster. 1 Introduction In the last few years, there has been an increasing interest in the application of machine learning (ML) to the field of knowledge representation and reasoning (KRR), or, more generally, in learning to reason over symbolic data—cf., e.g., Gabrilovoch et al. (2015). The main motivation behind this is that most KRR formalisms used today are rooted in symbolic logic, which allows for answering queries accurately by employing formal reasoning, but also comes with a number of issues, like difficulties with handling incomplete, conflicting, or uncertain information and scalability problems. However, many of these issues can be dealt with effectively by using methods of ML, which are in this context often subsumed under the notion of statistical relational learning (SRL; Getoor and Taskar, 2007)—cf. Nickel et al. (2016) for a recent survey. Notice, though, that the use of ML for reasoning is a tradeoff. On the one hand, ML models are often highly scalable, more resistant to disturbances in the data, and can provide predictions even if formal reasoning fails. On the other hand, however, their predictions are correct with a certain probability only. In contrast to this, formal reasoners are often obstructed by the above problems, but if they can provide inferences, then these are correct with certainty. We believe that the combination of both fields, i.e., ML and KRR, is an important step towards human-level artificial intelligence. However, while there exist elaborate reasoning systems already, SRL is a rather young field that has, we believe, not hit its boundaries yet. Therefore, in this work, we introduce a new approach to SRL based on deep learning, and apply it to the task of reasoning over ontological knowledge bases (OKBs). These are knowledge bases (KBs) that consist of a set of facts together with a formal description of the domain of interest—the so-called ontology. The reason why we chose this very task is its practical significance as well as the fact that it commonly comprises extensive formal reasoning. The motivation for employing deep learning, however, which refers to the use of neural networks (NNs) that perform many sequential steps of computation, should be fairly obvious. In the last ten years, deep learning has been applied to a wide variety of problems with tremendous success, and constitutes the state-of-the-art in fields like computer vision and natural language processing (NLP) today. Interestingly, there are also a few published attempts to realize formal reasoning by means of deep NNs. However, these focus on rather restricted logics, like natural logic (Bowman, 2013) or real logic (Serafini and d’Avila Garcez, 2016), and do not consider reasoning in its full generality. Besides this, »reasoning« appears in connection with deep learning mostly in the context of NLP— e.g., Socher et al. (2013). The main contributions of this paper are briefly as follows: • We present a novel method for SRL that is based on deep learning with recursive NNs, and apply it to ontology reasoning. • Furthermore, we provide an experimental comparison of the suggested approach with one of the best logic-based ontology reasoners at present, RDFox (Nenov et al., 2015), on several large standard benchmarks. Thereby, our model achieves a high reasoning quality while being up to two orders of magnitude faster. • To the best of our knowledge, we are the first to investigate ontology reasoning based on deep learning on such large and expressive OKBs. The rest of this paper is organized as follows. In the next section, we review a few concepts that our approach is built upon. Section 3 introduces the suggested model in full detail, and Section 4 discusses how to apply it to ontology reasoning. In Section 5, we evaluate our model on four datasets, and compare its performance with RDFox. We conclude with a summary of the main results, and give an outlook on future research. 2 Background As mentioned in the introduction already, our work lies at the intersection of two, traditionally quite separated, fields, namely ML and KRR. Therefore, in this section, we review the most important concepts, from both areas, that are required to follow the subsequent elaborations. 2.1 Ontological Knowledge Bases (OKBs) A central idea in the field of KRR is the use of so-called ontologies. In this context, an ontology is a formal description of a concept or a domain, e.g., a part of the real world, and the word »formal« emphasizes that such a description needs to be specified by means of some knowledge representation language with clearly defined semantics. This, in turn, allows us to employ formal reasoning in order to draw conclusions based on such an ontology. An important aspect to note is that an ontology is situated on the meta-level, which means that it might specify general concepts or relations, but does not contain any facts. However, in the sequel we only talk about a number of facts together with an ontology that describes the domain of interest, and we refer to such a setting as an ontological knowledge base (OKB). In practice, and in the context of description logics (Baader et al., 2007), ontologies are usually defined in terms of unary and binary predicates. Thereby, unary predicates are usually referred to as concepts or classes, and define certain categories, e.g., of individuals that possess a particular characteristic. In contrast to this, binary predicates define relationships that might exist between a pair of individuals, and are usually referred to as relations or roles. What is really appealing about ontologies is that they usually not just define those predicates, but also rules that allow us to draw conclusions based on them. This could encompass simple inferences like every individual of class women belongs to class human as well, but also much more elaborate reasoning that takes several classes and relations into account. Notice further that we can view almost any relational dataset as an OKB with an ontology that does not specify anything except the classes and relations that exist in the data. Based on the fact that we hardly ever encounter ontologies with predicates of arity greater than two in practice, we confine ourselves to this particular case in the subsequent treatment—the approach introduced in this work can be easily extended to the general case, though. Any OKB that is defined in terms of unary and binary predicates only has a natural representation as labeled directed multigraph1 if individuals are interpreted as vertices and every occurrence of a binary predicate as a 1 If we really need to account for predicates of arity greater than two, then we can view any such dataset as a hypergraph, and extend the RTN model introduced in the next section with convolutional layers as appropriate. 2 directed edge. Thereby, edges are labeled with the name of the according relation, and vertices with an incidence vector that indicates which classes they belong to. Notice, however, that, depending on the used formalism, OKBs may adhere to the so-called open-world assumption (OWA). In this case, a fact can be true, false, or unknown, which is, e.g., different from classical first-order logic. The presence of the OWA is reflected by according three-valued incidence vectors, whose elements may be any of 1, −1, or 0, respectively, and indicate that an individual belongs to a class, is not a member of the same, or that this is unknown. 2.2 Recursive Neural Tensor Networks (RNTNs) Recursive NNs (Pollack, 1990) are a special kind of network architecture that was introduced in order to deal with training instances that are given as trees rather than, as more commonly, feature vectors. In general, they can deal with any directed acyclic graph (DAG), since any such graph can be unrolled as a tree, and the only requirement is that the leaf nodes have vector representations attached to them. An example from the field of NLP is the parse tree of a sentence, where each node represents one word and is given as either a one-hot-vector or a previously learned word embedding. Unlike feed-forward networks, recursive NNs do not have a fixed network structure, but only define a single recursive layer, which accepts two vectors as input and maps them to a common embedding. This layer is used to reduce a provided tree step by step in a bottom-up fashion until only one single vector is left. The resulting vector can be regarded as an embedding of the entire graph, and may be used, e.g., as input for a subsequent prediction task. In this work, we make use of the following recursive layer, which defines what is referred to as recursive neural tensor network (RNTN; Socher et al., 2013):     x [1:k] T (1) + bR , g(x, R, y) = UR f x WR y + VR y where x, y ∈ Rd, UR ∈ Rd×k, VR ∈ Rk×2d, WR ∈ Rd×d×k, bR ∈ Rk, and f is a nonlinearity that [1:k] is applied element-wise, commonly tanh. Thereby, the term xT WR y denotes a bilinear tensor product, and is computed by multiplying x and y with every slice of WR separately. So, if z is the [i] computed tensor product, then zi = xT WR y. In addition to the actual input vectors, x and y, the tensor layer accepts another parameter R, which may be used to specify a certain relation between the provided vectors. This makes the model more powerful, since we use a separate set of weights for each kind of relation. In general, recursive NNs are trained by means of stochastic gradient descent (SGD) together with a straightforward extension of standard backpropagation, called backpropagation through structure (BPTS; Goller and Küchler, 1996). 3 Relational Tensor Networks (RTNs) In this section, we present a new model for SRL, which we—due to lack of a better name—refer to as relational tensor network (RTN). An RTN is basically an RNTN that makes use of a modified bilinear tensor layer. The underlying intuition, however, is quite different, and the term »relational« emphasizes the focus on relational datasets. 3.1 The Basic Model As described in the previous section, recursive NNs allow for computing embeddings of training instances that are given as DAGs. If we face a relational dataset, though, then the training samples are actually vertices of a graph, namely the one that is induced by the entire relational dataset, rather than a graph itself. However, while this does not fit the original framework of recursive networks, we can still make use of a recursive layer in order to update the representations of individuals based on the structure of dataset. In an RTN, this deliberation is reflected by the following modified tensor layer:   [1:m] g̃(x, R, y) = x + UR f xT WR y + VR y , (2) where the notation is the same as in Equation 1 except that VR ∈ Rk×d . 3 The intuition here is quite straightforward. While individuals in a relational dataset are initially represented by their respective feature vectors, big parts of the total information that we have are actually hidden in the relations among them. However, we can use a recursive network, composed of tensor layers like the one denoted in Equation 2, to incorporate these data into an individual’s embedding. Intuitively, this means that we basically apply a recursive NN to an update tree of an individual, and thus compute an according vector representation based on the relations that it is involved in. For the RTN, we adopted the convention that a tensor layer g̃ updates the individual represented by x based on an instance (x, R, y) of relation R that is present in the data. Furthermore, if the relations in the considered dataset are not symmetric, then we have to distinguish whether an individual is the source or the target of an instance of a relation. Accordingly, the model has to contain two sets of parameters for such a relation, one for updating the source and one for the target, and we denote these as R⊲ and R⊳ , respectively. This means, e.g., that g̃(x, R⊳ , y) denotes that the embedding of x is updated based on (y, R, x). The foregoing considerations also explain the differences between Equation 2 and the original tensor layer given in Equation 1 (Socher et al., 2013). First and foremost, we see that in our model x is added to what basically used to be the tensor layer before, which is predicated on the fact that we want to update this very vector. Furthermore, x does not affect the argument of the nonlinearity f independently of y, since x by itself should not determine the way that it is updated. Lastly, there is no bias term on the right-hand side of Equation 2 to prevent that there is some kind of default update irrespective of the individuals involved. We also considered to add another application of the hyperbolic tangent on top of the calculations given in Equation 2 in order to keep the elements of the created embeddings in [−1, 1]. This would ensure that there cannot be any embeddings with an oddly large norm due to individuals being involved in a large number of relations. However, since we did not encounter any problems like this in our experiments, we decided against the use of this option, as it could introduce additional problems like vanishing gradients. 3.2 Training As already suggested before, we usually employ RTNs in order to compute embeddings for individuals that are used as input for some specific prediction task. Therefore, it makes sense to train an RTN together with the model that is used for computing these predictions, and whenever we talk about an RTN in the sequel, we shall assume that it is used together with some predictor on top of it. If we only care about individual embeddings irrespective of any particular subsequent task, then we can simply add a feed-forward layer—or some other differentiable learning model—on top of the RTN, and train the model to reconstruct the provided feature vectors. This way, an RTN can be used as a kind of relational autoencoder. Training such a model is straightforward, and switches back and forth between computing embeddings and making predictions based on them. In each training iteration, we start from the feature vectors of the individuals as they are provided in the dataset. Then, as a first step, we sample mini-batches of triples from the dataset, and randomly update the current embedding of one of the individuals in each triple by means of our RTN. The total number of mini-batches that are considered in this step is a hyperparameter, and we found during our experiments that it is in general not necessary to consider the entire dataset. Next, we sample mini-batches of individuals from the dataset, and compute predictions for them based on the embeddings that we created in the previous step. In doing so, it makes sense to consider both individuals that have been updated as well as some that still have their initial feature vectors as embeddings. This is important for the model to learn how to deal with individuals that are involved in very few relations or maybe no one at all, which is not a rare case in practice. Therefore, in our experiments, we used mini-batches that were balanced with respect to this, and switched back to step number one as soon as each of the previously updated individuals has been sampled once. The loss function as well as the optimization strategy employed depends, as usual, on the concrete task, and is chosen case by case. 4 3.3 Related Models In the field of SRL, there exist a few other approaches that model the effects of relations on individual embeddings in terms of (higher-order) tensor products—cf., e.g., Nickel et al. (2011, 2012). However, these methods, which belong to the category of latent variable models, are based on the idea of factorizing a tensor that describes the structure of a relational dataset into a product of an embedding matrix as well as another tensor that represents the relations present in the data. The actual learning procedure is then cast as a regularized minimization problem based on this formulation. In contrast to this, an RTN computes embeddings, both during training and application, by means of a random process, and is thus fundamentally different from this idea. 4 Reasoning with RTNs 4.1 Applying RTNs to OKBs As discussed in Section 2.1, OKBs can be viewed as DAGs, and thus the application of an RTN to this kind of data is straightforward. Therefore, we are only left with specifying the prediction model that we want to use on top of the RTN. In the context of an OKB, there are two kinds of predictions that we are interested in, namely the membership of individuals to classes, on the one hand, and the existence of relations, on the other hand. From a ML perspective, these are really two different targets, and we can describe them more formally as follows: let K be an OKB that contains (exactly) the unary predicates P1 , . . . , Pk and (exactly) the binary predicates Q1 , . . . , Qℓ , and T ⊆ K the part of the OKB that we have as training set. Then t(1) and t(2) are two target functions defined as  individuals(K) → {−1, 0, 1}k (1) t : i 7→ x(i) and t(2) :  individuals(K)2 → {−1, 0, 1}ℓ (i, j) 7→ y(i,j) (i) (i,j) such that xm equals 1, if K |= Pm (i), −1, if K |= ¬Pm (i), and 0, otherwise, and ym accordingly with respect to Qm (i, j). is defined Notice that all of the arguments of the functions t(1) and t(2) are individuals, and can thus be represented as embeddings produced by an RTN. For computing actual predictions from these embeddings, we can basically employ an ML model of our choice. In this work, however, we confine ourselves to multinomial logistic regression for t(1) , i.e., we simply add a single feed-forward layer as well as a softmax on top it to the RTN. For t(2) , we first add an additional original tensor layer as given in Equation 1, like it was used by Socher et al. (2013), and use multinomial logistic regression on top of it as well. 4.2 Predicting Classes and Relations Simultaneously While the targets t(1) and t(2) may be regarded as independent with respect to prediction, this is clearly not the case for computing individual embeddings. We require an embedding to reflect all of the information that we have about a single individual as specified by the semantics of the considered OKB. Therefore, the tensor layers of an RTN need to learn how to adjust individual vectors in view of both unary and binary predicates, i.e., classes and relations. To account for this, we train RTNs—facing the particular use case of ontology reasoning—on mini-batches that consist of training samples for both of the prediction targets. 5 Evaluation To evaluate the suggested approach in a realistic scenario, we implemented a novel triple store, called NeTS (Neural Triple Store), that achieves ontology reasoning solely by means of an RTN. NeTS provides a simple, SPARQL-like, query interface that allows for submitting atomic queries as well as conjunctions of such (see Figure 1). 5 NeTS> dbpedia:Person(?X),dbpedia:placeOfBirth(?X,?Y) ?X ======================= dbpedia:Aristotle dbpedia:Albert_Einstein . . . ?Y ============================== dbpedia:Stagira_(ancient_city) dbpedia:Ulm . . . Figure 1: Example of a simple query in NeTS. When the system is started, then the first step it performs is to load a set of learned weights from the disk—the actual learning process is not part of NeTS right now, and may be incorporated in future versions. Next, it observes whether there are previously generated embeddings of the individuals stored on disk already, and loads them as well, if any. If this is not the case, however, then NeTS creates such embeddings as described above. This step is comparable with what is usually referred to as materialization in the context of database systems. Traditionally, a database would compute all valid inferences that one may draw based on the provided data, and store them somehow in memory or on disk. In contrast to this, NeTS accounts for these inferences simply by adjusting the individuals’ embeddings by means of a trained RTN, which obviously has great advantages regarding its memory requirements. Note further that we do not store any actual inferences at this time, but rather compute them on demand later on if this happens to become necessary. Subsequent processing of queries is entirely based on these embeddings, and does not employ any kind of formal reasoning at all. This, in turn, allows for speeding up the necessary computations significantly, since we can dispatch most of the the »heavy-lifting« to a GPU. Our system is implemented in Python 3.4, and performs, as mentioned above, almost all numeric computations on a GPU using PyCUDA 2016.1.2 (Klöckner et al., 2012). For learning the weights of our RTNs, we again used Python 3.4, along with TensorFlow 0.11.0 (Abadi et al., 2015). 5.1 Test Data To maintain comparability, we evaluated our approach on the same datasets that Motik et al. (2014) used for their experiments with RDFox (Nenov et al., 2015).2 As mentioned earlier, RDFox is indeed a great benchmark, since it has been shown to be the most efficient triple store at present. For a comparison with other systems, however, we refer the interested reader to Motik et al. (2014). The test data consists of four Semantic Web KBs of different sizes and characteristics. Among these are two real-world datasets, a fraction of DBpedia (Bizer et al., 2009) and the Claros KB3 , as well as two synthetic ones, LUBM (Guo et al., 2005) and UOBM (Ma et al., 2006). Their characteristics are summarized in Table 1. While all these data are available in multiple formats, we made use of the ontologies specified in OWL and the facts provided as n-triples for our experiments. Furthermore, we considered only those predicates that appear for at least 5% of the individuals in a database. This is a necessary restriction to ensure that there is enough data for an RTN to learn properly. 5.2 Experimental Setup All our experiments were conducted on a server with 24 CPUs of type Intel Xeon E5-2620 (6×2.40GHz), 64GB of RAM, and an Nvidia GeForce GTX Titan X. The test system hosted Ubuntu Server 14.04 LTS (64 Bit) with CUDA 8.0 and cuDNN 5.1 for GPGPU. Notice, however, that NeTS does not make any use of multiprocessing or -threading besides GPGPU, which means that the only kind of parallelization takes place on the GPU. Therefore, in terms of CPU and RAM, NeTS had about half of the resources at its disposal that RDFox utilized in the experiments conducted by Motik et al. (2014). 2 3 All of these datasets are available at http://www.cs.ox.ac.uk/isg/tools/RDFox/2014/AAAI/. http://www.clarosnet.org 6 KRR formalism # of Individuals # of Facts # of Classes # of Relations Claros DBpedia LUBM UOBM OWL 6.5 M 18.8 M 40 (13) 64 (20) OWL 2 18.7 M 112.7 M 349 (12) 13616 (16) OWL 32.9 M 133.6M 14 (4) 13 (6) OWL 0.4 M 2.2 M 39 (5) 22 (11) Table 1: Characteristics of the test datasets. All quantities refer to explicitly specified rather than inferred data, and the values in parentheses describe the classes and relations, respectively, that appear with at least 5% of the individuals. Claros DBpedia LUBM OUBM Classes Avg. Accuracy 0.969 0.978 0.961 0.972 Avg. F1 0.954 0.959 0.948 0.953 Relations Avg. Accuracy Avg. F1 0.955 0.942 0.961 0.940 0.959 0.947 0.973 0.951 Table 2: The accuracies and F1 scores, averaged over all unary and binary predicates, respectively, for each dataset. Predicated on the use of the RTN model, the datasets, including all of their inferences, were converted into directed graphs using Apache Jena 2.13.04 and the OWL reasoner Pellet 2.4.05—all of the import times reported in Table 3 refer to these graphs. This reduced the size of the data, as stored on disk, to approximately on third of the original dataset. Furthermore, we removed a total of 50,000 individuals during training, together with all of the predicates that these were involved in, as test set from each of the datasets, and similarly another 50,000 for validation—the results described in Table 2 were retrieved for these test sets. 5.3 Results In order to assess the quality of NeTS, we have to evaluate it on two accounts. First, we need to consider its predictive performance based on the embeddings computed by the underlying RTN model, and second, we must ascertain the efficiency of the system with respect to time consumption. We start with the former. To that end, consider Table 2, which reports the accuracies as well as F1 scores that NeTS achieved on the held-out test sets, averaged over all classes and relations, respectively. We see that the model consistently achieves great scores with respect to both measures. Notice, however, that the F1 score is the more critical criterion, since all the predicates are strongly imbalanced. Nevertheless, the RTN effectively learns embeddings that allow for discriminating positive from negative instances. Table 3, in contrast, lists the times for NeTS to import and materialize each of the datasets along with the respective measurements for RDFox (Motik et al., 2014). As mentioned before, materialization refers to the actual computation of inferences, and usually depends on the expressivity of the ontology as well as the number of facts available. We see that NeTS is significantly faster at the materialization step, while RDFox is faster at importing the data. This is explained as follows. First, NeTS realizes reasoning by means of vector manipulations on a GPU, which is of course much faster than the symbolic computations performed by RDFox. As for the second point, RDFox makes use of extensive parallelization, also for importing data, while NeTS runs as a single process with a single thread on a CPU. 4 5 https://jena.apache.org https://github.com/Complexible/pellet 7 Claros DBpedia LUBM OUBM Import 242 436 521 9 NeTS Materialization 28 69 52 11 Import 48 274 332 5 RDFox Materialization 2062 / — 143 / — 71 / 113 467 / 2501 Table 3: The times for import and materialization (in seconds). For RDFox, these are the numbers reported by Motik et al. (2014) for computing a lower (left) and upper bound (right), respectively, on the possible inferences. However, from a practical point of view, materialization is usually more critical than import. This is because an average database is updated with new facts quite frequently, while it is imported only once in a while. Notice, however, that neither of the measures reported for NeTS contains the time for training the model. The reason for this is that we train an RTN, as mentioned earlier, with respect to an ontology rather than an entire OKB. Therefore, one can actually consider the training step as part of the setup of the database system. For the datasets used in our experiments, training took between three and four days each. 6 Summary and Outlook We have presented a novel method for SRL based on deep learning, and used it to develop a highly efficient, learning-based system for ontology reasoning. Furthermore, we have provided an experimental comparison with one of the best logic-based ontology reasoners at present, RDFox, on several large standard benchmarks, and showed that our approach attains a high reasoning quality while being up to two orders of magnitude faster. An interesting topic for future research is to explore ways to further improve our accuracy on ontology reasoning. This could be achieved, e.g., by incorporating additional synthetic data and/or slight refinements of the RTN architecture. Acknowledgments This work was supported by the Engineering and Physical Sciences Research Council (EPSRC), under the grants EP/J008346/1, EP/L012138/1, and EP/M025268/1, as well as the Alan Turing Institute, under the EPSRC grant EP/N510129/1. Furthermore, Patrick is supported by the EPSRC, under grant OUCL/2016/PH, and the Oxford-DeepMind Graduate Scholarship, under grant GAF1617_OGSMF-DMCS_1036172. References Martín Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mané, Rajat Monga, Sherry Moore, Derek Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda Viégas, Oriol Vinyals, Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. Software available from tensorflow.org. Franz Baader, Diego Calvanese, Deborah L. McGuinness, Daniele Nardi, and Peter F. PatelSchneider. The Description Logic Handbook: Theory, Implementation, and Applications. Cambridge University Press, 2nd edition, 2007. 8 Christian Bizer, Jens Lehmann, Georgi Kobilarov, Sören Auer, Christian Becker, Richard Cyganiak, and Sebastian Hellmann. DBpedia—A crystallization point for the Web of Data. Web Semantics: Science, Services and Agents on the World Wide Web, 7(3):154–165, 2009. Samuel R. Bowman. Can recursive neural tensor networks learn logical reasoning? http://arxiv.org/abs/1312.6192v4, 2013. Evgeniy Gabrilovoch, Ramanathan Guha, Andrew McCallum, and Kevin Murphy, editors. Knowledge Representation and Reasoning: Integrating Symbolic and Neural Approaches, Palo Alto, California, 2015. AAAI Press. Lise Getoor and Ben Taskar. Introduction to Statistical Relational Learning. Adaptive Computation and Machine Learning. MIT Press, 2007. Christoph Goller and Andreas Küchler. Learning Task-Dependent Distributed Representations by Backpropagation Through Structure. In IEEE International Conference on Neural Networks, volume 1, pages 347–352, 1996. Yuanbo Guo, Zhengxiang Pan, and Jeff Heflin. LUBM: A benchmark for OWL knowledge base systems. Web Semantics: Science, Services and Agents on the World Wide Web, 3(2–3):158–182, 2005. Andreas Klöckner, Nicolas Pinto, Yunsup Lee, B. Catanzaro, Paul Ivanov, and Ahmed Fasih. PyCUDA and PyOpenCL: A Scripting-Based Approach to GPU Run-Time Code Generation. Parallel Computing, 38(3):157–174, 2012. Li Ma, Yang Yang, Zhaoming Qiu, Guotong Xie, Yue Pan, and Shengping Liu. Towards a Complete OWL Ontology Benchmark. In Proceedings of the 3rd European Semantic Web Conference (ESWC 2006), pages 125–139, 2006. Boris Motik, Yavor Nenov, Robert Piro, Ian Horrocks, and Dan Olteanu. Parallel Materialisation of Datalog Programs in Centralised, Main-Memory RDF Systems. In Proceedings of the 28th AAAI Conference on Artificial Intelligence (AAAI 2014), pages 129–137, 2014. Yavor Nenov, Robert Piro, Boris Motik, Ian Horrocks, Zhe Wu, and Jay Banerjee. RDFox: A Highly-Scalable RDF Store. In Proceedings of the 14th International Semantic Web Conference (ISWC 2015), Part II, pages 3–20, 2015. Maximilian Nickel, Volker Tresp, and Hans-Peter Kriegel. A Three-Way Model for Collective Learning on Multi-Relational Data. In Proceedings of the 28th International Conference on Machine Learning, pages 809–816, 2011. Maximilian Nickel, Volker Tresp, and Hans-Peter Kriegel. Factorizing YAGO. In Proceedings of the 21st International Conference on World Wide Web, pages 271–280, 2012. Maximilian Nickel, Kevin Murphy, Volker Tresp, and Evgeniy Gabrilovich. A Review of Relational Machine Learning for Knowledge Graphs. Proceedings of the IEEE, 104(1):11–33, 2016. Jordan B. Pollack. Recursive distributed representations. Artificial Intelligence, 46(1):77–105, 1990. Luciano Serafini and Artur d’Avila Garcez. Logic tensor networks: Deep learning and logical reasoning from data and knowledge. arXiv:1606.04422v2, 2016. Richard Socher, Danqi Chen, Christopher D. Manning, and Andrew Y. Ng. Reasoning with neural tensor networks for knowledge base completion. In Advances in Neural Information Processing Systems 26, pages 926–934. 2013. 9
2cs.AI
Minimax Optimal Procedures for Locally Private Estimation John C. Duchi† [email protected] Michael I. Jordan∗ [email protected] arXiv:1604.02390v2 [math.ST] 14 Nov 2017 Stanford University† Stanford, CA 94305 Martin J. Wainwright∗ [email protected] University of California, Berkeley∗ Berkeley, CA 94720 Abstract Working under a model of privacy in which data remains private even from the statistician, we study the tradeoff between privacy guarantees and the risk of the resulting statistical estimators. We develop private versions of classical information-theoretic bounds, in particular those due to Le Cam, Fano, and Assouad. These inequalities allow for a precise characterization of statistical rates under local privacy constraints and the development of provably (minimax) optimal estimation procedures. We provide a treatment of several canonical families of problems: mean estimation and median estimation, generalized linear models, and nonparametric density estimation. For all of these families, we provide lower and upper bounds that match up to constant factors, and exhibit new (optimal) privacy-preserving mechanisms and computationally efficient estimators that achieve the bounds. Additionally, we present a variety of experimental results for estimation problems involving sensitive data, including salaries, censored blog posts and articles, and drug abuse; these experiments demonstrate the importance of deriving optimal procedures. 1 Introduction A major challenge in statistical inference is that of characterizing and balancing statistical utility with the privacy of individuals from whom data is obtained [18, 19, 25]. Such a characterization requires a formal definition of privacy, and differential privacy has been put forth as one such candidate (see, e.g., the papers [21, 8, 22, 31, 32] and references therein). In the database and cryptography literatures from which differential privacy arose, early research was mainly algorithmic in focus, with researchers using differential privacy to evaluate privacy-retaining mechanisms for transporting, indexing, and querying data. More recent work aims to link differential privacy to statistical concerns [20, 56, 30, 52, 12, 50]; in particular, researchers have developed algorithms for private robust statistical estimators, point and histogram estimation, and principal components analysis. Much of this line of work is non-inferential in nature: as opposed to studying performance relative to an underlying population, the aim instead has been to approximate a class of statistics under privacy-respecting transformations for a fixed underlying data set. There has also been recent work within the context of classification problems and the “probably approximately correct” framework of statistical learning theory [e.g., 35, 7] that treats the data as random and aims to recover aspects of the underlying population. In this paper, we take a fully inferential point of view on privacy, bringing differential privacy into contact with statistical decision theory. Our focus is on the fundamental limits of differentially-private estimation, and the identification of optimal mechanisms for enforcing a given level of privacy. By treating differential privacy as an abstract constraint on estimators, we obtain independence from specific estimation procedures and privacy-preserving mechanisms. Within this 1 framework, we derive both lower bounds and matching upper bounds on minimax risk. We obtain our lower bounds by integrating differential privacy into the classical paradigms for bounding minimax risk via the inequalities of Le Cam, Fano, and Assouad, while we obtain matching upper bounds by proposing and analyzing specific private procedures. Differential privacy provides one formalization of the notion of “plausible deniability”: no matter what public data is released, it is nearly equally as likely to have arisen from one underlying private sample as another. It is also possible to interpret differential privacy within a hypothesis testing framework [56], where the differential privacy parameter α controls the error rate in tests for the presence or absence of individual data points in a dataset (see Figure 3 for more details). Such guarantees against discovery, together with the treatment of issues of side information or adversarial strength that are problematic for other formalisms, have been used to make the case for differential privacy within the computer science literature; see, for example, the papers [24, 21, 5, 28]. In this paper we bring this approach into contact with minimax decision theory; we view the minimax framework as natural for this problem because of the tension between adversarial discovery and privacy protection. Moreover, we study the setting of local privacy, in which providers do not even trust the statistician collecting the data. Although local privacy is a relatively stringent requirement, we view this setting as an important first step in formulating minimax risk bounds under privacy constraints. Indeed, local privacy is one of the oldest forms of privacy: its essential form dates back to Warner [55], who proposed it as a remedy for what he termed “evasive answer bias” in survey sampling. Although differential privacy provides an elegant formalism for limiting disclosure and protecting against many forms of privacy breach, it is a stringent measure of privacy, and it is conceivably overly stringent for statistical practice. Indeed, Fienberg et al. [26] criticize the use of differential privacy in releasing contingency tables, arguing that known mechanisms for differentially private data release can give unacceptably poor performance. As a consequence, they advocate—in some cases—recourse to weaker privacy guarantees to maintain the utility and usability of released data. There are results that are more favorable for differential privacy; for example, Smith [52] shows that the non-local form of differential privacy [21] can be satisfied while yielding asymptotically optimal parametric rates of convergence for some point estimators. Resolving such differing perspectives requires investigation into whether particular methods have optimality properties that would allow a general criticism of the framework, and characterizing the trade-offs between privacy and statistical efficiency. Such are the goals of the current paper. 1.1 Our contributions In this paper, we provide a formal framework for characterizing the tradeoff between statistical utility and local differential privacy. Basing our work on the classical minimax framework, our primary goals are to characterize how, for various types of estimation problems, the optimal rate of estimation varies as a function of the privacy level and other problem parameters. Within this framework, we develop a number of general techniques for deriving minimax bounds under local differential privacy constraints. These bounds are useful in that they not only characterize the “statistical price of privacy,” but they also allow us to compare different concrete procedures (or privacy mechanisms) for producing private data. Most importantly, our minimax theory can be used to identify which mechanisms are optimal, meaning that they preserve the maximum amount of statistical utility for a given privacy level. In practice, we find that these optimal mechanisms often differ from widely-accepted 2 10 -1 kθb − θk∞ 10 0 10 10 10 -2 -3 -4 0 100000 200000 300000 400000 500000 600000 n Figure 1. Estimating proportions of drug use, plotting the maximum error kθb − θk∞ versus sample size. Top (blue) line: mean error of Laplace noise addition with 90% coverage intervals. Middle top (green) line: mean error of minimax-optimal ℓ∞ sampling p strategy (26) with 90% coverage intervals. Middle bottom (red block) line: minimax lower bound d log(2d)/(n(eα − 1)2 ). Bottom (black) line: mean error of non-private estimate. procedures from the privacy literature, and lead to better statistical performance while providing the same privacy guarantee. As one concrete example, Figure 1 provides an illustration of such gains in the context of estimating proportions of drug users based on privatized data. (See Section 6.2 for a full description of the data set, and how these plots were produced.) The black curve shows the average ℓ∞ -error of a non-private estimator, based on access to the raw data; any estimator that operates on private data must necessarily have larger error than this gold standard. The upper two curves show the performance of two types of estimators that operate on privatized data: the blue curve is based on the standard mechanism of adding Laplace-distributed noise to the data, whereas the green curve is based on the optimal privacy mechanism identified by our theory. This optimal mechanism yields a roughly five-fold reduction in the mean-squared error, with the same computational requirements as the Laplacian-based procedure. In this paper, we analyze the private minimax rates of estimation for several canonical problems: (a) mean estimation; (b) median estimation; (c) high-dimensional and sparse sequence estimation; (d) generalized linear model estimation; (e) density estimation. To do so, we expand upon several canonical techniques for lower bounding minimax risk [58], establishing differentially private analogues of Le Cam’s method in Section 3 and concomitant optimality guarantees for mean and median estimators; Fano’s method in Section 4, where we provide optimal procedures for highdimensional estimation; and Assouad’s method in Section 5, in which we investigate generalized linear models and density estimation. In accordance with our connections to statistical decision theory, we provide minimax rates for estimation of population quantities; by way of comparison, most prior work in the privacy literature focuses on accurate approximation of statistics in a conditional analysis in which the data are treated as fixed (with some exceptions; e.g., the papers [52, 34, 6], as well as preliminary extended abstracts of our own work [15, 16]). 3 Notation: For distributions P and Q defined on a space X , each absolutely continuous with respect to a measure µ (with corresponding densities p and q), the KL divergence between P and Q is Z Z p dP p log dµ. = dP log Dkl (P kQ) := dQ q X X Letting σ(X ) denote an appropriate σ-field on X , the total variation distance between P and Q is Z 1 kP − QkTV := sup |P (S) − Q(S)| = |p(x) − q(x)| dµ(x). 2 X S∈σ(X ) Given a pair of random variables (X, Y ) with joint distribution PX,Y , their mutual information is given by I(X; Y ) = Dkl (PX,Y kPX PY ), where PX and PY denote the marginal distributions. A random variable Y has the Laplace(α) distribution if its density is pY (y) = α2 exp (−α|y|). For matrices A, B ∈ Rd×d , the notation A  B means that B −A is positive semidefinite. For sequences of real numbers {an } and {bn }, we use an . bn to mean there is a universal constant C < ∞ such that an ≤ Cbn for all n, and an ≍ bn to denote that an . bn and bn . an . For a sequence of random variables Xn , we write Xn 2 d Y if Xn converges in distribution to Y . Background and problem formulation We begin by setting up the classical minimax framework, and then introducing the notion of an α-private minimax rate that we study in this paper. 2.1 Classical minimax framework Let P denote a class of distributions on the sample space X , and let θ(P ) ∈ Θ denote a functional defined on P. The space Θ in which the parameter θ(P ) takes values depends on the underlying statistical model. For example, in the case of univariate mean estimation, Θ is a subset of the real line, whereas for a density estimation problem, Θ is some subset of the space of all possible densities over X . Let ρ denote a semi-metric on the space Θ, which we use to measure the error of an estimator for the parameter θ, and let Φ : R+ → R+ be a non-decreasing function with Φ(0) = 0 (for example, Φ(t) = t2 ). In the non-private setting, the statistician is given direct access to i.i.d. observations {Xi }ni=1 drawn according to some distribution P ∈ P. Based on the observations, the goal is to estimate the unknown parameter θ(P ) ∈ Θ. We define an estimator θb as a measurable function θb : X n → Θ, b 1 , . . . , Xn ) in terms of the risk and we assess the quality of the estimate θ(X h i b 1 , . . . , Xn ), θ(P )) . EP Φ ρ(θ(X b θ) = |θb − θ| and Φ(t) = t2 , this risk is the For instance, for a univariate mean problem with ρ(θ, b θ) of estimator and mean-squared error. The risk assigns a nonnegative number to each pair (θ, parameter. The minimax risk is defined by the saddlepoint problem h i b 1 , . . . , Xn ), θ(P )) , (1) Mn (θ(P), Φ ◦ ρ) := inf sup EP Φ ρ(θ(X θb P ∈P 4 X1 X2 Xn X1 X2 Xn Z1 Z2 Zn Z1 Z2 Zn (a) (b) Figure 2. (a) Graphical model illustrating the conditional independence relationships between the private data {Zi }ni=1 and raw variables {Xi }ni=1 in the interactive case. (b) Simpler graphical model illustrating the conditional independence structure in the non-interactive case. b where we take the supremum over distributions P ∈ P and the infimum over all estimators θ. There is a substantial body of literature focused on techniques for upper- and lower-bounding the minimax risk for various classes of estimation problems. Our goal in this paper is to define and study a modified version of the minimax risk that accounts for privacy constraints. 2.2 Local differential privacy Let us now define the notion of local differential privacy in a precise manner. The act of transforming data from the raw samples {Xi }ni=1 into a private set of samples {Zi }ni=1 is modeled by a conditional distribution. We refer to this conditional distribution as either a privacy mechanism or a channel distribution, as it acts as a conduit from the original to the privatized data. In general, we allow the privacy mechanism to be sequentially interactive, meaning the channel has the conditional independence structure {Xi , Z1 , . . . , Zi−1 } → Zi and Zi ⊥ Xj | {Xi , Z1 , . . . , Zi−1 } for j 6= i. (2) See panel (a) of Figure 2 for a graphical model that illustrates these conditional independence relationships. Given these independence relations (2), the full conditional distribution (and privacy mechanism) can be specified in terms of the conditionals Qi (Zi | Xi = xi , Z1:i−1 = z1:i−1 ). A special case is the non-interactive case, illustrated in panel (b) of Figure 2, in which each Zi depends only on Xi . In this case, the conditional distributions take the simpler form Qi (Zi | Xi = xi ). While it is often simpler to think of the channel as being independent and the (privatized) sample being i.i.d., in a number of scenarios it is convenient for the output of the channel Q to depend on previous computation. For example, stochastic approximation schemes [49] require this type of dependence, and—as we demonstrate in Sections 3.2.2 (median estimation) and 5.2.1 (generalized linear models)—this type of conditional structure makes developing optimal estimators substantially easier. Local differential privacy involves placing some restrictions on the conditional distribution Qi . Definition 1. For a given privacy parameter α ≥ 0, the random variable Zi is an α-differentially locally private view of Xi if for all z1 , . . . , zi−1 and x, x′ ∈ X we have Qi (Zi ∈ S | Xi = x, Z1 = z1 , . . . , Zi−1 = zi−1 ) ≤ exp(α), ′ S∈σ(Z) Qi (Zi ∈ S | Xi = x , Z1 = z1 , . . . , Zi−1 = zi−1 ) sup 5 (3) where σ(Z) denotes an appropriate σ-field on Z. We say that the privacy mechanism Q is αdifferentially locally private (DLP) if each variable Zi is an α-DLP view. In the non-interactive case, the bound (3) reduces to sup sup S∈σ(Z) x,x′ ∈X Q(Zi ∈ S | Xi = x) ≤ exp(α). Q(Zi ∈ S | Xi = x′ ) (4) The non-interactive version of local differential privacy dates back to the work of Warner [55]; see also Evfimievski et al. [24]. The more general interactive model was put forth by Dwork, McSherry, Nissim, and Smith [21], and has been investigated in a number of works since then. In the context of our work on local privacy, relevant references include Beimel et al.’s [6] investigation of onedimensional Bernoulli probability estimation under the model (3), and Kairouz et al.’s [33] study of channel constructions that maximize information-theoretic measures of information content for various domains X . Testing error versus privacy level 0.5 0.45 Testing error 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0 0.5 1 Privacy level α 1.5 2 Figure 3. For any α-DLP view Z of X, the probability of error Perr in distinguishing between the 1 1 two hypotheses {X = x} and {X = x′ } is lower bounded as Perr ≥ 1+e α . Thus, for α ∈ [0, 4 ], we are guaranteed that Perr ≥ 0.43. As Wasserman and Zhou [56] discuss, one intuitive interpretation of differential privacy is in terms of disclosure risk. More concretely, suppose that given an α-private view Z of the random variable X, our goal is to distinguish between the two hypotheses {X = x} versus {X = x′ }, where x, x′ ∈ X are two distinct possible values in the sample space. A calculation shows that the best possible probability of error of any hypothesis test, with equal weights for each hypothesis, satisfies Perr :=  1 1 · inf P(ψ(Z) 6= x | X = x) + P(ψ(Z) 6= x′ | X = x′ ) ≥ . 2 ψ 1 + eα Consequently, small values of α ensure that the performance of any test is close to random guessing (see Figure 3). We relate this in passing to Warner’s classical randomized response mechanism [55] eα in a simple scenario with X ∈ {0, 1}, where we set Z = X with probability qα = 1+e α , and Z = 1 − X otherwise. Then Q(Z = z | X = x)/Q(Z = z | X = x′ ) ∈ [e−α , eα ], and the disclosure risk Perr is precisely 1/(1 + eα ). 6 2.3 α-private minimax risks Given our definition of local differential privacy (LDP), we are now equipped to describe the notion of an α-LDP minimax risk. For a given privacy level α > 0, let Qα denote the set of all conditional distributions have the α-LDP property (3). For a given raw sample {Xi }ni=1 , any distribution Q ∈ Qα produces a set of private observations {Zi }ni=1 , and we now restrict our attention to b 1 , . . . , Zn ) that depend purely on this private sample. Doing so yields the estimators θb = θ(Z modified minimax risk h i b 1 , . . . , Zn ), θ(P )) , (5) Mn (θ(P), Φ ◦ ρ; Q) := inf sup EP,Q Φ ρ(θ(Z θb P ∈P where our notation reflects the dependence on the choice of privacy mechanism Q. By definition, any choice of Q ∈ Qα guarantees that the data {Zi }ni=1 are α-locally differentially private, so that it is natural to seek the mechanism(s) in Qα that lead to the smallest values of the minimax risk (5). This minimization problem leads to the central object of study for this paper, a functional which characterizes the optimal rate of estimation in terms of the privacy parameter α. Definition 2. Given a family of distributions θ(P) and a privacy parameter α > 0, the α-private minimax risk in the metric ρ is h i b 1 , . . . , Zn ), θ(P ))) . (6) Mn (θ(P), Φ ◦ ρ, α) := inf inf sup EP,Q Φ(ρ(θ(Z Q∈Qα θb P ∈P Note that as α → +∞, the constraint of membership in Qα becomes vacuous, so that the αprivate minimax risk reduces to the classical minimax risk (1). Of primary interest in this paper are settings in which α ∈ (0, 1], corresponding to reasonable levels of the disclosure risk, as illustrated in Figure 3. 3 Bounds on pairwise divergences: Le Cam’s bound and variants Perhaps the oldest approach to bounding the classical minimax risk (1) is via Le Cam’s method [38]. Beginning with this technique, we develop a private analogue of the Le Cam bound, and we show how it can be used to derive sharp lower bounds on the α-private minimax risk for one-dimensional mean and median estimation problems. We also provide new optimal procedures for each of these settings. 3.1 A private version of Le Cam’s bound The classical version of Le Cam’s method bounds the (non-private) minimax risk (1) in terms of a two-point hypothesis testing problem [38, 58, 54]. For any distribution P , we use P n to denote the product distribution corresponding to a collection of n i.i.d. samples. Let us say that a pair of distributions {P1 , P2 } is 2δ-separated with respect to θ if ρ(θ(P1 ), θ(P2 )) ≥ 2δ. With this terminology, a simple version of Le Cam’s lemma asserts that, for any 2δ-separated pair of distributions, the classical minimax risk has lower bound Mn (θ(P), Φ ◦ ρ) ≥ o (i) Φ(δ) n o 1 p Φ(δ) n nDkl (P1 kP2 ) . 1 − kP1n − P2n kTV ≥ 1− √ 2 2 2 7 (7) Here the bound (i ) follows as a consequence of the Pinsker bound on the total variation norm in terms of the KL divergence, kP1n − P2n k2TV ≤ 1 Dkl (P1n kP2n ) , 2 along with the fact Dkl (P1n kP2n ) = nDkl (P1 kP2 ) because P1n and P2n are product distributions (i.e., iid we have Xi ∼ P ). Let us now state a version of Le Cam’s lemma that applies to the α-locally private setting in which the estimator θb depends only on the private variables (Z1 , . . . , Zn ), and our goal is to lower bound the α-private minimax risk (6). Proposition 1 (Private form of Le Cam bound). Suppose that we are given n i.i.d. observations from an α-locally differential private channel for some α ∈ [0, 23 35 ]. Then for any pair of distributions (P1 , P2 ) that is 2δ-separated w.r.t. θ, the α-private minimax risk has lower bound q o o p Φ(δ) n Φ(δ) n 1 − 4α2 n kP1 − P2 k2TV ≥ 1 − 2α2 nDkl (P1 kP2 ) . (8) Mn (θ(P), Φ ◦ ρ, α) ≥ 2 2 23 Remarks: A comparison with the original Le Cam bound (7) shows that for α ∈ [0, 35 ], the effect of α-local differential privacy is to reduce the effective sample size from n to at most 4α2 n. Proposition 1 is a corollary of more general results, which we describe in Section 3.3, that quantify the contraction in KL divergence that arises from passing the data through an α-private channel. We also note that here—and in all subsequent bounds in the paper—we may replace the term α2 with (eα − 1)2 , which are of the same order for α = O(1), while the latter substitution always applies. 3.2 Some applications of the private Le Cam bound We now turn to some applications of the α-private version of Le Cam’s inequality from Proposition 1. First, we study the problem of one-dimensional mean estimation. In addition to demonstrating how the minimax rate changes as a function of α, we also reveal some interesting (and perhaps disturbing) effects of enforcing α-local differential privacy: the effective sample size may be even polynomially smaller than α2 n. Our second example studies median estimation, which—as a more robust quantity than the mean—allows us to always achieve parametric convergence rates with an effective sample size reduction of n to α2 n. Our third example investigates conditional probability estimation, which exhibits a more nuanced dependence on privacy than the preceding estimates. We state each of our bounds assuming α ∈ [0, 1]; the bounds hold (with different numerical constants) whenever α ∈ [0, C] for some universal constant C. 3.2.1 One-dimensional mean estimation Given a real number k > 1, consider the family  Pk := distributions P such that EP [X] ∈ [−1, 1] and EP [|X|k ] ≤ 1 . Note that the parameter k controls the tail behavior of the random variable X, with larger values of k imposing more severe constraints. As k ↑ +∞, the random variable converges to one that 8 is supported almost surely on the interval [−1, 1]. Suppose that our goal is to estimate the mean θ(P ) = EP [X], and that we adopt the squared error to measure the quality of an estimator. The 2 classical minimax risk for this problem scales as n− min{1,2− k } for all values of k ≥ 1. Our goal here is to understand how the α-private minimax risk (6), h  i b 1 , . . . , Zn ) − θ(P ) 2 , Mn (θ(Pk ), (·)2 , α) := inf inf sup E θ(Z Q∈Qα θb P ∈Pk differs from the classical minimax risk. Corollary 1. There exist universal constants 0 < cℓ ≤ cu ≤ 9 such that for all k > 1 and α ∈ [0, 1], the α-minimax risk Mn (θ(Pk , (·)2 , α) is sandwiched as      k−1  k−1 2 − k 2 2 − k cℓ min 1, nα ≤ Mn (θ(Pk ), (·) , α) ≤ cu min 1, nα . (9) We prove the lower bound using the α-private version (8) of Le Cam’s inequality from Proposition 1; see Appendix B.1 for the details. In order to understand the bound (9), it is worthwhile considering some special cases, beginning with the usual setting of random variables with finite variance (k = 2). In the P non-private setting in which the original sample (X1 , . . . , Xn ) is observed, the sample mean θb = n1 ni=1 Xi has meansquared error at most 1/n. When √ we require α-local differential privacy, Corollary 1 shows that the minimax rate worsens to 1/ nα2 . More generally, for any k > 1, the minimax rate scales as k−1 Mn (θ(Pk ), (·)2 , α) ≍ (nα2 )− k . As k ↑ ∞, the moment condition E[|X|k ] ≤ 1 becomes equivalent to the boundedness constraint |X| ≤ 1 a.s., and we obtain the more standard parametric rate (nα2 )−1 , where there is no reduction in the exponent. The upper bound is achieved by a variety of privacy mechanisms and estimators. One of them is the following variant of the Laplace mechanism: • Letting [x]T = max{−T, min{x, T }} denote the projection of x to the interval [−T, T ], output the private samples iid 1 Zi = [Xi ]T + Wi , where Wi ∼ Laplace(α/(2T )) and T = (nα2 ) 2k . • Compute the sample mean θbn := 1 n Pn i=1 Zi (10) of the privatized data. We present the analysis of this estimator in Appendix B.1. It is one case in which the widely-used Laplacian mechanism is an optimal mechanism; later examples show that this is not always the case. Summarizing our results thus far, Corollary 1 helps to demarcate situations in which local differential privacy may or may not be acceptable for location estimation problems. In particular, for bounded domains—where we may take k ↑ ∞—local differential privacy may be quite reasonable. However, in situations in which the sample takes values in an unbounded space, local differential privacy imposes more severe constraints. 9 3.2.2 One-dimensional median estimation Instead of attempting to privately estimate the mean—an inherently non-robust quantity—we may also consider median estimation problems. Median estimation for general distributions is impossible even in non-private settings,1 so we focus on the median as an M -estimator. Recalling that the minimizer(s) of E[|X − θ|] are the median(s) of X, we consider the gap between mean absolute error of our estimator and that of the true median, b − inf R(θ), where R(θ) := E[|X − θ|]. E[R(θ)] θ∈R We first give a proposition characterizing the minimax rate for this problem by applying Proposition 1. Let θ(P ) = med(P ) denote the median of the distribution P , and for radii r > 0, we consider the family of distributions supported on R defined by Pr := {distributions P such that | med(P )| ≤ r, EP [|X|] < ∞} . In this case, we consider the slight variant of the minimax rate (6) defined by the risk gap h i b 1 , . . . , Zn )) − R(θ(P )) . Mn (θ(Pr ), R, α) := inf inf sup EP,Q R(θ(Z Q∈Qα θb P ∈Pr We then have the following. 1 ≤ cℓ ≤ cu < 6 Corollary 2. For the median estimation problem, there are universal constants 20 such that for all r ≥ 0 and α ∈ [0, 1], the minimax error satisfies o n o n 1 1 cℓ · r min 1, (nα2 )− 2 ≤ Mn (θ(Pr ), R, α) ≤ cu · r min 1, (nα2 )− 2 . We present the proof of the lower bound in Corollary 2 to Section B.2, focusing our attention here on a minimax optimal sequential procedure based on stochastic gradient descent (SGD). To describe our SGD procedure, let θ0 ∈ [−r, r] be arbitrary, and Wi be an i.i.d. {−1, +1} iid α Bernoulli sequence with P(Wi = 1) = eαe+1 , and let Xi ∼ P be the observations of the distribution P whose median we wish to estimate (and which must be made private). We iterate according to the projected stochastic gradient descent procedure θi+1 = [θi − ηi Zi ]r , where Zi = eα + 1 · Wi · sign(θi − Xi ), eα − 1 (11) where as in expression (10), [x]r = max{−r, min{x, r}} is the projection onto the set [−r, r], and the sequence ηi > 0 are non-increasing stepsizes. By inspection we see that Zi is differentially private for Xi , and we have the conditional unbiasedness E[Zi | Xi , θi ] = sign(θi −Xi ) ∈ ∂θ |θi −Xi |, where ∂ denotes the subdifferential operator. Standard results on stochastic gradient descent methods [45] 1 Pn b imply that for θn = n i=1 θi , we have "  α 2 # n 2 X 1 e + 1 r 1 E[R(θbn )] − inf R(θ) ≤ ηi + . n ηn 2 eα − 1 θ∈[−r,r] i=1 1 That is, the minimax error never converges to zero: consider estimating the median of the two distributions P0 and P1 (r) = 1−δ , then take δ ↓ 0 as the sample size increases. and P1 , each supported on {−r, r}, where P0 (r) = 1+δ 2 2 10 √ Under the assumption that α ≤ 1, we take ηi = α · r/ i, which immediately implies the upper bound E[R(θbn )] − R(med(P )) ≤ √6r 2 . nα We make two remarks on the procedure (11). First, it is essentially a sequential variant of Warner’s 1965 randomized response [55], a procedure whose variants turn out to often be optimal, as we show in the sequel. Secondly, while at first blush it is not clear that the additional complexity of stochastic gradient descent is warranted, we provide experiments comparing the SGD procedure with more naive estimators in Section 6.1.2 on a salary estimation task. These experiments corroborate the improved performance of our minimax optimal strategy. 3.3 Pairwise upper bounds on Kullback-Leibler divergences As mentioned previously, the private form of Le Cam’s bound (Proposition 1) is a corollary of more general results on the contractive effects of privacy on pairs of distributions, which we now state. Given a pair of distributions (P1 , P2 ) defined on a common space X , any conditional distribution Q transformsR such a pair of distributions into a new pair (M1 , M2 ) via the marginalization operation Mj (S) = X Q(S | x)dPj (x) for j = 1, 2. Intuitively, when the conditional distribution Q is αlocally differentially private, the two output distributions (M1 , M2 ) should be closer together. The following theorem makes this intuition precise: Theorem 1. For any α ≥ 0, let Q be a conditional distribution that guarantees α-differential privacy. Then, for any pair of distributions P1 and P2 , the induced marginals M1 and M2 satisfy the bound Dkl (M1 kM2 ) + Dkl (M2 kM1 ) ≤ min{4, e2α }(eα − 1)2 kP1 − P2 k2TV . (12) Remarks: Theorem 1 is a type of strong data processing inequality [2], providing a quantitative relationship between the divergence kP1 − P2 kTV and the KL-divergence Dkl (M1 kM2 ) that arises after applying the channel Q. The result of Theorem 1 is similar to a result due to Dwork, Rothblum, and Vadhan [22, Lemma III.2], who show that Dkl (Q(· | x)kQ(· | x′ )) ≤ α(eα − 1) for any x, x′ ∈ X , which implies Dkl (M1 kM2 ) ≤ α(eα − 1) by convexity. This upper bound is weaker than Theorem 1 since it lacks the term kP1 − P2 k2TV . This total variation term is essential to our minimax lower bounds: more than providing a bound on KL divergence, Theorem 1 shows that differential privacy acts as a contraction on the space of probability measures. This contractivity holds in a strong sense: indeed, the bound (12) shows that even if we start with a pair of distributions P1 and P2 whose KL divergence is infinite, the induced marginals M1 and M2 always have finite KL divergence. We provide the proof of Theorem 1 in Appendix A. Let us now develop a corollary of Theorem 1 that has a number of useful consequences, among them the private form of Le Cam’s method from Proposition 1. Suppose that we are given an indexed family of distributions {Pν , ν ∈ V}. Let V denote a random variable that is uniformly distributed over the finite index set V. Conditionally on V = ν, suppose we sample Q a random vector (X1 , . . . , Xn ) according to a product measure of the form Pν (x1 , . . . , xn ) := ni=1 Pν(i) (xi ), where (ν(1), . . . , ν(n)) denotes some sequence of indices. Now suppose that we draw an α-locally private sample (Z1 , . . . , Zn ) according to the channel Q(· | X1:n ). Conditioned on V = ν, the 11 private sample is distributed according to the measure Mνn given by Z n Mν (S) := Qn (S | x1 , . . . , xn )dPν (x1 , . . . , xn ) for S ∈ σ(Z n ). (13) Since we allow interactive protocols, the distribution Mνn need not be a product distribution in general. Nonetheless, in this setup we have the following tensorization inequality: Corollary 3. For any α-locally differentially private conditional distribution (3) Q and any paired sequences of distributions {Pν(i) } and {Pν ′ (i) }, we have Dkl (Mνn kMνn′ ) ≤ 4(eα − 1)2 n X i=1 Pν(i) − Pν ′ (i) 2 TV . (14) See Appendix A.2 for the proof, which requires a few intermediate steps to obtain the additive inequality. One consequence of Corollary 3 is the private form of Le Cam’s bound in Proposition 1. Given the index set V = {1, 2}, consider two paired sequences of distributions of the form {P1 , . . . , P1 } and {P2 , . . . , P2 }. With this choice, we have (i) kM1n − M2n k2TV ≤ (ii) 1 Dkl (M1n kM2n ) ≤ 2(eα − 1)2 n kP1 − P2 kTV , 2 where step (i ) is Pinsker’s inequality, and step (ii ) follows from the tensorization inequality (14) and the i.i.d. nature of the product distributions P1n and P2n . Noting that (eα − 1)2 ≤ 2α2 for 23 α ≤ 35 and applying the classical Le Cam bound (7) gives Proposition 1. In addition, inequality (14) can be used to derive a bound on the mutual information. Bounds of this type are useful in applications of Fano’s method, to be discussed at more length in the n 1 P n following section. In particular, if we define the mixture distribution M = |V| ν∈V Mν , then by the definition of mutual information, we have 1 X 1 X n I(Z1 , . . . , Zn ; V ) = Dkl Mνn kM ≤ Dkl (Mνn kMνn′ ) |V| |V|2 ′ ν∈V ν,ν n X 1 X ≤ 4(e − 1) |V|2 ′ α 2 i=1 ν,ν ∈V Pν(i) − Pν ′ (i) 2 TV , (15) the first inequality following from the joint convexity of the KL divergence and the final inequality from Corollary 3. Remarks: Mutual information bounds under local privacy have appeared previously. McGregor et al. [43] study relationships between communication complexity and differential privacy, showing that differentially private schemes allow low communication. They provide a result [43, Prop. 7] guaranteeing I(X1:n ; Z1:n ) ≤ 3αn; they strengthen this bound to I(X1:n ; Z1:n ) ≤ (3/2)α2 n when the Xi are i.i.d. uniform Bernoulli variables. Since the total variation distance is at most 1, our result also implies this scaling (for arbitrary Xi ); however, our result is stronger since it involves the total variation terms kPν(i) − Pν ′ (i) kTV . These TV terms are an essential part of obtaining the sharp minimax results that are our focus. In addition, Corollary 3 allows for any sequentially interactive channel Q; each random variable Zi may depend on the private answers Z1:i−1 of other data providers. 12 4 Bounds on private mutual information: Fano’s method We now turn to a set of techniques for bounding the private minimax risk (6) based on Fano’s inequality from information theory. We begin by describing how Fano’s inequality is used in classical minimax theory, then presenting some of its extensions to the private setting. Recall that our goal is to lower bound the minimax risk associated with estimating some parameter θ(P ) in a given metric ρ. Given a finite set V, a family of distributions {Pν , ν ∈ V} is said to be 2δ-separated in the metric ρ if ρ(θ(Pν ), θ(Pν ′ )) ≥ 2δ for all distinct pairs ν, ν ′ ∈ V. Given any such 2δ-separated set, the classical form of Fano’s inequality [cf. 58] asserts that the minimax risk (1) has lower bound   Φ(δ) I(V ; X1n ) + log 2 Mn (θ(P), Φ ◦ ρ) ≥ 1− . 2 log |V| Here I(V ; X1n ) denotes the mutual information between a random variable V uniformly distributed over the set V and a random vector X1n = (X1 , . . . , Xn ) drawn from the mixture distribution P := 1 X n Pν , |V| (16) ν∈V  iid 1 P n so that I(V ; X1n ) = |V| ν Dkl Pν kP ; equivalently, the random variables are drawn Xi ∼ Pν conditional on V = ν. In the cases we consider, it is sometimes convenient to use a slight generalization of the classical Fano method by extending the 2δ-separation above. Let ρV be a metric on the set V, and for t ≥ 0 define the neighborhood size for the set V by  Nt := max card ν ′ ∈ V | ρV (ν, ν ′ ) ≤ t (17) ν∈V and the separation function δ(t) :=  1 min ρ(θ(Pν ), θ(Pν ′ )) | ν, ν ′ ∈ V and ρV (ν, ν ′ ) > t . 2 (18) Then we have the following generalization [14, Corollary 1] of the Fano bound: for any t ≥ 0,   I(V ; X1n ) + log 2 Φ(δ(t)) . (19) 1− Mn (θ(P), Φ ◦ ρ) ≥ 2 log |V| − log Nt 4.1 A private version of Fano’s method We now turn to developing a version of Fano’s lower bound that applies to estimators θb that act on privatized samples Z1n = (Z1 , . . . , Zn ), where the obfuscation channel Q is non-interactive (Figure 2(b)), meaning that Zi is conditionally independent of Z\i given  Xi . Our upper bound is variational: it involves optimization over a subset of the space L∞ (X ) := f : X → R | kf k∞ < ∞ of uniformly bounded functions equipped with the supremum norm kf k∞ = supx |f (x)| and the associated 1-ball of the supremum norm B∞ (X ) := {γ ∈ L∞ (X ) | kγk∞ ≤ 1} . 13 (20) As the set X is generally clear from context, we typically omit this dependence (and adopt the shorthand B∞ ). As with the classical Fano method, we consider a 2δ-separated family of distributions {Pν , ν ∈ V}, and for each ν ∈ V, we define the linear functional ϕν : L∞ (X ) → R by Z (21) γ(x)(dPν (x) − dP (x)). ϕν (γ) = X With this notation, we have the following private version of Fano’s method: Proposition 2 (Private Fano method). Given any set {Pν , ν ∈ V}, for any t ≥ 0 the noninteractive α-private minimax risk has lower bound ( )   X Φ(δ(t)) log 2 n(eα − 1)2 1 2 Mn (θ(P), Φ ◦ ρ, α) ≥ (ϕν (γ)) − sup 1− . 2 log(|V|/Nt ) |V| γ∈B∞ log(|V|/Nt ) ν∈V Z1n Z1n Underlying Proposition 2 is a variational bound on the mutual information between a sequence = (Z1 , . . . , Zn ) of private random variables and a random index V drawn uniformly on V, where ∼ Mνn , conditional on V = ν; that is, Z1n is marginally drawn according to the mixture Z 1 X n n Mν where Mν (S) = Q(S | xn1 )dPνn (xn1 ). M := |V| ν∈V (Recall equation (13)). When the conditional distribution Q is non-interactive, as considered in this section, then Mνn is also a product distribution. By comparison with equation (16), we see that M is the private analogue of the mixture distribution P that arises in the classical Fano analysis. Proposition 2 is an immediate consequence of the Fano bound (19) coupled with the following upper bound on the mutual information between Z1n and an index V uniformly distributed over V: X 1 (ϕν (γ))2 . (22) I(V ; Z1n ) ≤ n(eα − 1)2 sup |V| γ∈B∞ ν∈V The inequality (22) is in turn an immediate consequence of Theorem 2 to come; we provide the proof of this inequality in Appendix C.2. We conjecture that it also holds in the fully interactive setting, but given well-known difficulties of characterizing multiple channel capacities with feedback [13, Chapter 15], it may be challenging to verify this conjecture. 4.2 Some applications of the private Fano bound In this section, we show how Proposition 2 leads to sharp characterizations of the α-private minimax rates for some classical and high-dimensional mean estimation problems. We consider estimation of the d-dimensional mean θ(P ) := EP [X] of a random vector X ∈ Rd . Due to the difficulties associated with differential privacy on non-compact spaces (recall Section 3.2.1), we focus on distributions with compact support. We provide proofs of our mean estimation results in Appendix D. 4.2.1 Classical mean estimation in d dimensions We begin by considering estimation of means for sampling distributions supported on ℓp balls, where p ∈ [1, 2]. Indeed, for a radius r < ∞, consider the family  Pp,r := distributions P supported on Bp (r) ⊂ Rd , 14 where Bp (r) = {x ∈ Rd | kxkp ≤ r} is the ℓp -ball of radius r. In the non-private setting, the P standard estimator θb = 1 n Xi has mean-squared error at most r 2 /n, since kXk ≤ kXk ≤ r n i=1 2 p by assumption. The following result shows that the private minimax MSE is substantially different: Corollary 4. For the mean estimation problem, for all p ∈ [1, 2] and privacy levels α ∈ [0, 1], the non-interactive private minimax risk satisfies ( ( p−1 ))   d2 p 1 d d 1 2 2 2 ∧ r min 1, max √ ∧ , , 1 . . M (θ(P ), k·k , α) . r min n p,r 2−p 2 nα2 nα2 nα2 nα2 (nα2 ) p See Appendix D.1 for the proof of this claim; the lower bound makes use of the private form of Fano’s method (Proposition 2), while the upper bound is a consequence of the optimal mechanisms we develop in Section 4.2.3. Corollary 4 demonstrates the substantial difference between d-dimensional mean estimation in private and non-private settings: the privacy constraint leads to a multiplicative penalty of d/α2 in terms of mean-squared error. Thus, the effect of privacy is to reduce the effective sample size from n to α2 n/d. We remark in passing that if α ≥ 1, our result still holds, though we replace the quantity α in the lower bound with the quantity eα − 1 and in the upper bound with 1 − e−α . The lower bound as written is somewhat complex in its dependence on p ∈ [1, 2], so an investigation of the extreme cases is somewhat helpful. Taking p = 2, the scaling in the lower bound simplifies to min{1, nαd 2 }, identical to the upper bound; in the case p = 1, it becomes min{1, √ 1 2 , nαd 2 }. There nα √ is a gap in the regime d ≥ nα2 in this case, though the asymptotic regime for large n shows that both the lower and upper bounds become d/(nα2 ), independent of p ∈ [1, 2]. 4.2.2 Estimation of high-dimensional sparse vectors Recently, there has been substantial interest in high-dimensional problems in which the dimension d is larger than the sample size n, but a low-dimensional latent structure makes inference possible [10, 44]. Here we consider a simple but canonical instance of a high-dimensional problem, that of estimating a sparse mean vector. For an integer parameter s ≥ 1, consider the class of distributions n o s P∞,r := distributions P supported on B∞ (r) ⊂ Rd with kEP [X]k0 ≤ s . (23) In the non-private case, estimation of such an s-sparse predictor in the squared ℓ2 -norm is possible at rate E[kθb − θk22 ] . r 2 s log(d/s) , so that the dimension d can be exponentially larger than the n sample size n. With this context, the next result shows that local privacy can have a dramatic impact in the high-dimensional setting. For simplicity, we restrict ourselves to the easiest case of a 1-sparse vector (s = 1). Corollary 5. For the 1-sparse means problem, for all α ≥ 0, the non-interactive private minimax risk satisfies       2 2 2 1 2 r d log(2d) 2 r d log(2d) . Mn θ(P∞,r ), k·k2 , α . min r , . min r , n(eα − 1)2 n(1 − e−α )2 See Appendix D.2 for a proof. 15 From the lower bound in Corollary 5, we see that local differential privacy has an especially dramatic effect for the sparse means problem: due to the presence of the d-term in the numerator, estimation in high-dimensional settings (d ≥ n) becomes impossible, even for 1-sparse vectors. Contrasting this fact with the scaling d ≍ en that 1-sparsity allows in the non-private setting shows that local differential privacy is a very severe constraint in this setting. We note in passing thatqan essentially identical argument to that we provide in Appendix D.2 gives a lower bound d log(2d) of r n(e α −1)2 on estimation with k·k∞ error. Corollary 5 raises the question of whether highdimensional estimation is possible with local differential privacy. In non-interactive settings, our result shows that there is a dimension-dependent penalty that must be paid for estimation; in scenarios in which it is possible to modify the privatizing mechanism Q, it may be possible to “localize” in an appropriate sense once important variables have been identified, providing some recourse against the negative results of Corollary 5. We leave such considerations to future work. 4.2.3 Optimal mechanisms: attainability for mean estimation Our lower bounds for both d-dimensional mean estimation (Corollary 4) and 1-sparse mean estimation (Corollary 5) are based on the private form of Fano’s method (Proposition 2). On the other hand, the upper bounds are based on direct analysis of specific privacy mechanisms and estimators. Here we discuss the optimal privacy mechanisms for these two problems in more detail. Sub-optimality of Laplacian mechanism: For the 1-dimensional mean estimation problem (Corollary 1), we showed that adding Laplacian noise to (truncated versions of) the observations led to an optimal privacy mechanism. The extension of this result to the d-dimensional problems considered in Corollary 4, however, fails. More concretely, as a special case of the families in Corollary 4, consider the class P2,1 of distributions supported on the Euclidean ball B2 (1) ⊂ Rd of unit norm. In order to guarantee α-differential privacy, suppose that we output the additively corrupted random vector Z := x+W , where the noise vector W ∈ Rd has i.i.d components following √ a Laplace(α/ d) distribution. With this choice, it can be verified that for X taking values in B2 (1), the random vector Z is an α-DLP view of X. However, this privacy mechanism does not achieve the minimax risk over α-private mechanisms. In particular, one must suffer the rate  2  i h d 2 b inf sup EP kθ(Z1 , . . . , Zn ) − EP [X]k2 & min ,1 , (24) 2 nα b θ P ∈P a quadratic (d2 ) dimension dependence, as opposed to the linear scaling (d) of the optimal result in Corollary 4. See Appendix D.3 for the proof of claim (24). The poorer dimension dependence of the Laplacian mechanism demonstrates that sampling mechanisms must be chosen carefully. Optimal mechanisms: Let us now describe some mechanisms that are optimal for the ddimensional and 1-sparse mean estimation problems. Both of them are procedures that output a random variable Z that is an α-differentially-private view of X, and they are unbiased in the sense that E[Z | X = x] = x. They require the Bernoulli random variable T ∼ Bernoulli(πα ), where πα := eα /(eα + 1). 16 Privacy mechanism for ℓ2 -ball: Given a vector x ∈ Rd with kxk2 ≤ r, define a random vector  kxk +r x with probability 21 + 2r 2 kxk2 e X := kxk2 −r x . with probability 1 − 2 kxk2 Then sample T ∼ Bernoulli(πα ) and set ( Uniform(z ∈ Rd | hz, Z∼ Uniform(z ∈ Rd | hz, where B is chosen to equal 2r e > 0, kzk = B) if T = 1 Xi 2 e ≤ 0, kzk = B) if T = 0, Xi 2 (25) √ eα + 1 π d Γ( d−1 2 + 1) B=r α . d e −1 2 Γ( 2 + 1) Privacy mechanism for ℓ∞ -ball: Given a vector x ∈ Rd with kxk∞ ≤ r, construct a random vector e ∈ Rd with independent coordinates of the form X ( x +r with probability 12 + 2rj e Xj = x −r with probability 12 − 2rj . Then sample T ∼ Bernoulli(πα ) and set ( Uniform(z ∈ {−B, B}d | hz, Z∼ Uniform(z ∈ {−B, B}d | hz, where the value B is chosen to equal   e ≥ 0) if T = 1 Xi e ≤ 0) if T = 0, Xi d−1  1 if d is odd d−1 (d−1)/2 +1 2  Cd , where Cd−1 = B=r α d−1 if d is even.  2d−1 +11 d d/2 e −1 ( ) eα (26) 2 d/2 See Figure 4 for visualizations of the geometry that underlies these strategies. By construction, each scheme guarantees that Z is an α-private view of X. Each strategy is efficiently implementable when combined with rejection sampling: the ℓ2 -mechanism (25) by normalizing a sample from the N(0, Id×d ) distribution, and the ℓ∞ -strategy (26) by sampling the√hypercube {−1, 1}d . Additionally, by Stirling’s approximation, we have that in each case B . r α d for α ≤ 1. Moreover, they are unbiased (see Appendix I.2 for the unbiasedness of strategy (25) and Appendix I.3 for strategy (26)). We now complete the picture of minimax optimal estimation schemes for Corollaries 4 and 5. P In the case of Corollary 4, the estimator θb := n1 ni=1 Zi , where Zi is constructed by procedure (25) from the non-private vector Xi , attains the minimax optimal convergence rate. In the case of Corollary 5, a slightly more complex estimator gives that rate: in particular, we set θbn := argmin θ∈Rd   n 1 X 2 kZi − θk2 + λn kθk1 , 2n i=1 √ d log d , where λn = 2 √ nα2 and the Zi are drawn according to strategy (26). See Appendix D.2 for a rigorous argument. 17 eα 1+eα eα 1+eα x x PSfrag replacements PSfrag replacements 1 α 1+e 1 1+eα (a) (b) Figure 4. Private sampling strategies for different types of ℓp -balls. (a) A private sampling strategy (25) for data lying within an ℓ2 -ball. Outer boundary of highlighted region sampled uniformly with probability eα /(eα + 1). (b) A private sampling strategy (26) for data lying within an ℓ∞ -ball. Circled point set sampled uniformly with probability eα /(eα + 1). 4.3 Variational bounds on private mutual information The private Fano bound in Proposition 2 reposes on a variational  bound on the private mutual ∞ information that we describe here. Recall the space L (X ) := f : X → R | kf k∞ < ∞ of uniformly bounded functions, equipped with the usual sup-norm and unit norm ball (20), B∞ , as well as the linear functionals ϕν from Eq. (21). We then have the following result. Theorem 2. Let {Pν }ν∈V be an arbitrary collection of probability measures on X , and let {Mν }ν∈V be the set of marginal distributions induced by an α-differentially private distribution Q. Then  (eα − 1)2  1 X Dkl Mν kM + Dkl M kMν ≤ |V| |V| ν∈V sup X (ϕν (γ))2 . γ∈B∞ (X ) ν∈V It is important to note that, at least up to constant factors, Theorem 2 is never weaker than the results provided by Theorem 1. By definition of the linear functional ϕν , we have sup X γ∈B∞ (X ) ν∈V (i) (ϕν (γ))2 ≤ X sup ν∈V γ∈B∞ (X ) (ϕν (γ))2 = 4 X ν∈V Pν − P 2 TV , where inequality (i) follows by interchanging the summation and supremum. Overall, we have I(Z; V ) =  1 X 1 X Dkl Mν kM ≤ 4(eα − 1)2 2 kPν − Pν ′ k2TV . |V| |V| ′ ν∈V ν,ν ∈V The strength of Theorem 2 arises from the fact that inequality (i)—the interchange of the order of supremum and summation—may be quite loose. 18 We may extend Theorem 2 to sequences of random variables, that is, to collections {Pνn }ν∈V of product probability measures in the non-interactive case. Indeed, we have by the standard chain rule for mutual information [29, Chapter 5] that I(Z1 , . . . , Zn ; V ) = n X i=1 I(Zi ; V | Z1:i−1 ) ≤ n X I(Zi ; V ), i=1 where the inequality is a consequence of the conditional independence of the variables Zi given V , which holds when the channel Q is non-interactive. Applying Theorem 2 to the individual terms I(Zi ; V ) then yields inequality (22); see Appendix C.2 for a fully rigorous derivation. 5 Bounds on multiple pairwise divergences: Assouad’s method Thus far, we have seen how Le Cam’s method and Fano’s method, in the form of Propositions 1 and 2, can be used to derive sharp minimax rates. However, their application appears to be limited to problems whose minimax rates can be controlled via reductions to binary hypothesis tests (Le Cam’s method) or for non-interactive privacy mechanisms (Fano’s method). Another classical approach to deriving minimax lower bounds is Assouad’s method [4, 58]. In this section, we show that a privatized form of Assouad’s method can be be used to obtain sharp minimax rates in interactive settings. We illustrate by deriving bounds for several problems, including multinomial probability estimation and nonparametric density estimation. Assouad’s method transforms an estimation problem into multiple binary hypothesis testing problems, using the structure of the problem in an essential way. For some d ∈ N, let V = {−1, 1}d , and let us consider a family of distributions {Pν }ν∈V indexed by the hypercube. We say that the family {Pν }ν∈V induces a 2δ-Hamming separation for the loss Φ ◦ ρ if there exists a vertex mapping (a function v : θ(P) → {−1, 1}d ) satisfying Φ(ρ(θ, θ(Pν ))) ≥ 2δ d X j=1 1{[v(θ)]j 6= νj } . (27) As in the standard reduction from estimation to testing, we consider the following random process: Nature chooses a vector V ∈ {−1, 1}d uniformly at random, after which the sample X1 , . . . , Xn is drawn from the distribution Pν conditional on V = ν. Letting P±j denote the joint distribution over the random index V and X conditional on the jth coordinate Vj = ±1, we obtain the following sharper variant of Assouad’s lemma [4]. Lemma 1 (Sharper Assouad method). Under the conditions of the previous paragraph, we have Mn (θ(P), Φ ◦ ρ) ≥ δ d X j=1 inf [P+j (ψ(X1:n ) 6= +1) + P−j (ψ(X1:n ) 6= −1)] . ψ We provide a proof of Lemma 1 in Section I.1 (see also the paper [3]). We can also give a variant of Lemma 1 after some minor rewriting. For each j ∈ [d] define the mixture distributions n P+j = 1 2d−1 X ν:νj =1 Pνn , n P−j = 1 2d−1 X ν:νj =−1 19 Pνn , P±j = 1 2d−1 X ν:νj =±1 Pν (28) where Pνn is the (product) distribution of X1 , . . . , Xn . Then, by Le Cam’s lemma, the following minimax lower bound is equivalent to the Assouad bound of Lemma 1: Mn (θ(P), Φ ◦ ρ) ≥ δ 5.1 d h X j=1 n n 1 − P+j − P−j TV i . (29) A private version of Assoud’s method As in the preceding sections, we extend Lemma 1 to the locally differentially private setting. In this case, we are able to provide a minimax lower bound that applies to any locally differentially private channel Q, including in interactive settings (Figure 2(a)). In this case, we again let B∞ (X ) denote the collection of functions f : X → R with supremum norm bounded by 1 (definition (20)). Then we have the following private version of Assouad’s method. Proposition 3 (Private Assouad bound). Let the conditions of Lemma 1 hold, that is, let the family {Pν }ν∈V induce a 2δ-Hamming separation for the loss Φ ◦ ρ. Then   2 ! 21 d Z α 2 X n(e − 1) . sup γ(x)(dP+j (x) − dP−j (x)) Mn (θ(P), Φ ◦ ρ, α) ≥ dδ 1 − 2d γ∈B∞ (X ) X j=1 As is the case for our private analogue of Fano’s method (Proposition 2), underlying Proposition 3 is a variational bound that generalizes the usual total variation distance to a variational quantity applied jointly to multiple mixtures of distributions. Proposition 3 is an immediate consequence of Theorem 3 to come. 5.2 Some applications of the private Assouad bound Proposition 3 allows sharp characterizations of α-private minimax rates for a number of classical statistical problems. While it requires that there be a natural coordinate-wise structure to the problem at hand because of the Hamming separation condition (27), such conditions are common in a number of estimation problems. Additionally, Proposition 3 applies to interactive channels Q. As examples, we consider generalized linear model and nonparametric density estimation. 5.2.1 Generalized linear model estimation under local privacy For our first applications of Proposition 3, we consider a (somewhat simplified) family of generalized linear models (GLMs), showing how to perform inference for the parameter of the GLM under local differential privacy, and arguing by an example using logistic regression that—in a minimax 2 sense—local differential privacy again leads to an effective degradation in sample size of n 7→ nαd for α = O(1). In our GLM setting, we model a target variable y ∈ Y conditional on independent variables X = x as follows. Let µ be a base measure on the space Y, assume we represent the variables X as a matrix x ∈ Rd×k (we make implicit any transformations performed on the data), and let T : Y → Rk be the sufficient statistic for Y . Then we model Y | X = x according to Z D E D E  exp T (y), x⊤ θ dµ(y), (30) p(y | x; θ) = exp T (y), x⊤ θ − A(θ, x) , A(θ, x) := Y 20 so that A(·, x) is the cumulant function. Developing a strategy for fitting GLMs (30) that allows independent perturbation of data pairs (X, Y ) appears challenging, because most methods for fitting the model require differentiating the cumulant function A(θ, x), which in turn generally requires knowing x. (In some special cases, such as linear regression [41], it is possible to perturb the independent variables X, but in general there is no efficient standard methodology.) That being said, there are natural sequential strategies based on stochastic gradient descent—allowable in our interactive model of privacy (recall Figure 2)— that provide local differential privacy and efficient fitting of conditional models (30). Given the well-known difficulties of estimation in perturbed (independent) variable models, we advocate these types of sequential strategies for conditional models, which we now describe in somewhat more care. Stochastic gradient for private estimation of GLMs The log loss ℓ(θ; x, y) = − log p(y | x; θ) for the model family (30) is convex, and for each x, the function A(·, x) is infinitely differentiable on its domain [9]. Thus, stochastic gradient descent methods [45, 49] are natural candidates for minimizing the risk (population log-loss) R(θ) := EP [ℓ(θ; X, Y )]. The first ingredient in such a scheme, of which we give explicit examples presently, is an unbiased gradient estimator. Let g(θ; X, Y ) be a random stochastic gradient vector, unbiased for the gradient of the negative loglikelihood, constructed conditional on θ, X, Y so that E[g(θ; x, y)] = ∇ℓ(θ; x, y) = xT (y) − ∇A(θ, x) ∈ Rd , for fixed x, y. (Recall that x ∈ Rd×k and T (y) ∈ Rk .) Stochastic gradient descent proceeds iteratively using stepsizes ηi > 0 as follows. Beginning from a point θ0 ∈ Rd , at iteration i, we iid receive a pair (Xi , Yi ) ∼ P , then perform the stochastic gradient update θi+1 = θi − ηi g(θi ; Xi , Yi ), (31) where g(θ; Xi , Yi ) is unbiased for ∇ℓ(θ; Xi , yi ). We briefly review the (well-known) convergence properties of such stochastic gradient procedures. Let us assume that θ ⋆ := argminθ R(θ) is such that ∇2 E[A(θ ⋆ ; X)] ≻ 0, that is, the Hessian of E[A(θ; X)] at θ = θ ⋆ is positive definite, and that the random unbiased estimates g of ∇ℓ are chosen in such a way that the boundedness condition supθ,x,y kg(θ, x, y)k < ∞ holds with probability 1. For example, if X is compactly supported, has a full-rank covariance matrix, and the sufficient statistic T (·) is bounded, this holds. Then the following result is standard. the conditions in the Lemma 2 (Polyak and Juditsky [49], Thm. 3). Let R previous paragraph hold, 1 Pn 1 −β b let ηi = η0 i for some β ∈ ( 2 , 1), and let θn = n i=1 θi . Let A(θ) = A(θ, x)dP (x). Then √ where n(θbn − θ ⋆ ) d N(0, Σ), Σ = (∇2 A(θ ⋆ ))−1 E[g(θ ⋆ ; X, Y )g(θ ⋆ ; X, Y )⊤ ](∇2 A(θ ⋆ ))−1 . While Lemma 2 is asymptotic, it provides an exact characterization of the asymptotic distribution of the parameter and allows inference for parameter values. That the iteration (31) and convergence guarantee of Lemma 2 allow unbiased (noisy) versions of the gradient ∇ℓ is suggestive of a private estimation procedure: add sufficient noise to the 21 gradient ∇ℓ so as to render it private while ensuring that the noise has sufficiently light tails that the convergence conditions of Lemma 2 apply, and then perform stochastic gradient descent to estimate the model (30). To make this intuition concrete, we now give an explicit recipe that yields locally differentially private estimators with (asymptotically) minimax optimal convergence rates, leveraging the optimal mechanisms for mean estimation in Sec. 4.2.3 to construct the unbiased gradients g. We assume the compactness condition kxT (y)k ≤ r for all (x, y) ∈ supp P, where k·k is either the ℓ∞ -norm or ℓ2 -norm on Rd . Using ∇A(θ, x) = xEglm [T (Y ) | x, θ], where Eglm denotes expectation in the model (30), we have kxT (y) − ∇A(θ, x)k ≤ 2r. Now let Q be the private channel with mean ∇ℓ(θ; x, y) using either of our half-space sampling schemes (25) or (26), and draw the conditionally unbiased stochastic gradient g(θ; x, y) ∼ Q(· | θ, x, y). Then we have ⋆ ⋆ (eα · r2 α (e ⊤ tr(EP,Q [g(θ ; X, Y )g(θ ; X, Y ) ]) ≤ c + 1)2 d· − 1)2 ( d if k·k = k·k∞ 1 if k·k = k·k2 , where c is a numerical constant. In particular, for any finite number B < ∞, we obtain (   2 2 d if k·k = k·k∞ r 2 E B ∧ θbn − θ ⋆ . B ∧ ∇2 A(θ ⋆ )−1 op d· α 2 n(e − 1) 2 1 if k·k = k·k2 . (32) 2 dr That is, we have asymptotic mean-squared error (MSE) of order k∇2 A(θ ⋆ )−1 k2op nα 2 if we use the ℓ2 -sampling scheme (25) and the data lie in an ℓ2 -ball of radius r, and asymptotic MSE of order 2 2 k∇2 A(θ ⋆ )−1 k2op dnαr2 using the ℓ∞ -sampling scheme (26), assuming the data lie in an ℓ∞ -ball of radius r. Minimax lower bounds for logistic regression To show the sharpness of our achievability guarantees for stochastic gradient methods, we consider lower bounds for a binary logistic regression problem; these lower bounds will show that in general, it is impossible to outperform the convergence guarantee (32) of stochastic gradient descent for conditionally-specified models. Let P be the family of logistic distributions on covariate-response pairs (X, Y ) ∈ {−1, 1}d × {−1, 1}; as we prove a lower bound, larger families can only increase the bound. We assume that P (Y = y | X = x) = 1 1 + e−yθ⊤ x for some θ ∈ Rd with kθk22 ≤ d, meaning that Y has a standard logistic distribution. We then have the following corollary of Proposition 3, where θ(P ) ∈ Rd is the standard logistic parameter vector. In stating the corollary, we use the loss d ∧ kθb − θ(P )k22 , as our construction guarantees that kθk22 ≤ d. Corollary 6. For the logistic family P of distributions parameterized by θ ∈ Rd , kθk22 ≤ d, we have for all α ≥ 0 that   d d2 2 Mn (θ(P), k·k2 ∧ d, α) ≥ min , . (33) 4 4n(eα − 1)2 22 We provide the proof of the proposition in Appendix F. To understand the sharpness of this prediction, we may consider a special case of the logistic regression model. When the logistic model is true, then standard results on exponential families [39] show that the non-private maximum likelihood estimator θbML,n based on a sample of size n satisfies  h i−1  √ ⋆ d ⊤ ⋆ ⋆ b n(θML,n − θ ) N 0, E XX p(Y | X, θ )(1 − p(Y | X, θ )) , where the covariance is the inverse of the expected conditional Fisher Information. In the “best case” (i.e., largest Fisher information) for estimation when θ ⋆ = 0, this quantity is simply 41 Cov(X). As our proof makes precise, our minimax lower bound (33) is a local bound that applies for parameters θ shrinking to θ ⋆ = 0, and when θ ⋆ = 0 we have Cov(X) = Id×d . In particular, in the non-private case we have i d h as n → ∞ E d ∧ kθbML,n − θ ⋆ k22 . n for θ ⋆ near zero (by continuity of the distribution that θ ⋆ parameterizes). Conversely, our minimax d d bound shows that no private estimator can have risk better than (eα −1) 2 · 4n under this model, which our estimators achieve: recall inequality (32), where we may take k∇A(θ ⋆ )−1 kop = O(1). As α 2 is typical for the locally private setting, we see a sample size degradation of n 7→ n(e d−1) . 5.2.2 Density estimation under local privacy In this section, we show that the effects of local differential privacy are more severe for nonparametric density estimation: instead of just a multiplicative loss in the effective sample size as in previous sections, imposing local differential privacy leads to a different convergence rate. This result holds even though we solve a problem in which both the function being estimated and the observations themselves belong to compact spaces. Definition 3 (Elliptical Sobolev space). For a given orthonormal basis {ϕj } of L2 ([0, 1]), smoothness parameter β > 1/2 and radius r, the Sobolev class of order β is given by   ∞ ∞ X X 2 2β 2 2 j θj ≤ r . θj ϕj such that Fβ [r] := f ∈ L ([0, 1]) | f = j=1 j=1 If we choose the trignometric basis as our orthonormal basis, membership in the class Fβ [r] corresponds to smoothness constraints on the derivatives of f . More precisely, for j ∈ N, consider the orthonormal basis for L2 ([0, 1]) of trigonometric functions: √ √ (34) ϕ0 (t) = 1, ϕ2j (t) = 2 cos(2πjt), ϕ2j+1 (t) = 2 sin(2πjt). Let f be a β-times almost everywhere differentiable function for which |f (β) (x)| ≤ r for almost every x ∈ [0, 1] satisfying f (k) (0) = f (k) (1) for k ≤ β − 1. Then, uniformly over all such f , there is a universal constant c ≤ 2 such that that f ∈ Fβ [cr] (see, for instance, [54, Lemma A.3]). Suppose our goal is to estimate a density function f ∈ Fβ [C] and that quality is measured in terms of the squared error (squared L2 [0, 1]-norm): Z 1 2 b (fb(x) − f (x))2 dx. kf − f k2 := 0 23 The well-known [58, 57, 54] (non-private) minimax mean squared error scales as   2β Mn Fβ , k·k22 , ∞ ≍ n− 2β+1 . (35) The goal of this section is to understand how this minimax rate changes when we add an α-privacy constraint to the problem. Our main result is to demonstrate that the classical rate (35) is no longer attainable when we require α-local differential privacy. Lower bounds on density estimation We begin by giving our main lower bound on the minimax rate of estimation of densities when observations from the density are differentially private. We provide the proof of the following result in Appendix G. Corollary 7. For the class of densities Fβ defined using the trigonometric basis (34), there exist constants 0 < cβ ≤ c′β < ∞, dependent only on β, such that the α-private minimax risk (for α ∈ [0, 1]) is sandwiched as   − 2β − 2β cβ nα2 2β+2 ≤ Mn Fβ [1], k·k22 , α ≤ c′β nα2 2β+2 . (36) The most important feature of the lower bound (36) is that it involves a different polynomial exponent than the classical minimax rate (35). Whereas the exponent in classical case (35) is 2β/(2β + 1), it reduces to 2β/(2β + 2) in the locally private setting. For example, when we estimate Lipschitz densities (β = 1), the rate degrades from n−2/3 to n−1/2 . Interestingly, no estimator based on Laplace (or exponential) perturbation of the observations Xi themselves can attain the rate of convergence (36). This fact follows from results of Carroll and Hall [11] on nonparametric deconvolution. They show that if observations Xi are perturbed by additive noise W , where the characteristic function φW of the additive noise has tails behaving as |φW (t)| = O(|t|−a ) for some a > 0, then no estimator can deconvolve X + W and attain a rate of convergence better than n−2β/(2β+2a+1) . Since the characteristic function of the Laplace distribution has tails decaying as t−2 , no estimator based on the Laplace mechanism (applied directly to the observations) can attain rate of convergence better than n−2β/(2β+5) . In order to attain the lower bound (36), we must thus study alternative privacy mechanisms. Achievability by orthogonal projection estimators For β = 1, histogram estimators with counts perturbed by Laplacian noise achieve the optimal rate of convergence (36); this is a consequence of the results of Wasserman and Zhou [56, Section 4.2] applied to locally private mechanisms. For higher degrees of smoothness (β > 1), standard histogram estimators no longer achieve optimal rates in the classical setting [51]. Accordingly, we now turn to developing estimators based on orthogonal series expansion, and show that even in the setting of local privacy, they can achieve the lower bound (36) for all orders of smoothness β ≥ 1. Recall the elliptical P Sobolev space (Definition 3), in which a function f is represented in terms of its basis expansion f = ∞ j=1 θj ϕj . This representation underlies the following classical orthonormal series estimator. Given a sample X1:n drawn i.i.d. according to a density f ∈ L2 ([0, 1]), compute the empirical basis coefficients n 1X ϕj (Xi ) for j ∈ {1, . . . , k}, θbj = n i=1 24 (37) where the value k ∈ N is chosen either a priori based on known properties of the estimation problem or adaptively, for example, P using cross-validation [23, 54]. Using these empirical coefficients, the density estimate is fb = kj=1 θbj ϕj . In our local privacy setting, we consider a mechanism that employs a random vector Zi = (Zi,1 , . . . , Zi,k ) satisfying the unbiasedness condition E[Zi,j | Xi ] = ϕj (Xi ) for each j ∈ [k]. We assume the basis functions are B0 -uniformly bounded; that is, supj supx |ϕj (x)| ≤ B0 < ∞. This boundedness condition holds for many standard bases, including the trigonometric basis (34) that underlies the classical Sobolev classes and the Walsh basis. We generate the random variables from the vector v ∈ Rk defined by vj = ϕj (X) in the hypercube-based sampling scheme (26), where we assume B > B0 . With this sampling strategy, iteration of expectation yields   α 1 e B − ϕj (x), (38) E[[Z]j | X = x] = ck √ B0 k eα + 1 eα + 1 where ck >√0 is a constant (which is bounded independently of k). Consequently, it suffices to take B = O(B0 k/α) to guarantee the unbiasedness condition E[[Zi ]j | Xi ] = ϕj (Xi ). Overall, the privacy mechanism and estimator perform the following steps: (i) given a data point Xi , set the vector v = [ϕj (Xi )]kj=1 ; (ii) sample √ Zi according to the strategy (26), starting from the vector v and using the bound B = B0 k(eα + 1)/ck (eα − 1); (iii) compute the density estimate n k 1 XX fb := Zi,j ϕj . n (39) i=1 j=1 Whenever the underlying function f belongs to the Sobolev space Fβ [r] and the orthonormal basis functions ϕj are uniformly bounded by B0 , then the estimator (39) with the choice k = (nα2 )1/(2β+2) has mean squared error upper bounded as i h − 2β Ef kf − fbk22 ≤ cB0 ,β nα2 2β+2 . This shows that the minimax bound (36) is indeed sharp, and there exist easy-to-compute estimators achieving the guarantee. See Section G.2 for a proof of this inequality. Before concluding our exposition, we make a few remarks on other potential density estimators. Our orthogonal series estimator (39) and sampling scheme (38), while similar in spirit to that proposed by Wasserman and Zhou [56, Sec. 6], is different in that it is locally private and requires a different noise strategy to obtain both α-local privacy and the optimal convergence rate. Lastly, similarly to our remarks on the insufficiency of standard Laplace noise addition for mean estimation, it is worth noting that density estimators that are based on orthogonal series and Laplace − 2β perturbation are sub-optimal: they can achieve (at best) rates of (nα2 ) 2β+3 . This rate is polynomially worse than the sharp result provided by Corollary 7. Again, we see that appropriately chosen noise mechanisms are crucial for obtaining optimal results. 25 5.3 Variational bounds on paired divergences In this section, we provide a theorem that underpins the variational inequality in the minimax lower bound of Proposition 3. We provide a slightly more general bound than that required for the proposition, showing how it implies the earlier result. Recall that for some d ∈ N, we consider collections of distributions indexed using the Boolean hypercube V = {−1, 1}d . For each i ∈ [n] and ν ∈ V,Q let the distribution Pν,i be supported on the fixed set X , and define the product distribution n , for each i we Pνn = ni=1 Pν,i . Then in addition to the definition (28) of the paired mixtures P±j let X 1 1 X Pν,i and P−j,i = d−1 Pν,i , P+j,i = d−1 2 2 ν:νj =1 ν:νj =−1 and, in analogy to the marginal channel (13), we define the marginal mixtures Z 1 X n n n M+j (S) := d−1 Mν (S) = Qn (S | x1:n )dP+j (x1 , . . . , xn ) for j = 1, . . . , d, 2 ν:ν =1 j n defined similarly. For a given pair of distributions (M, M ′ ), we let with the distributions M−j sy ′ Dkl (M ||M ) = Dkl (M kM ′ ) + Dkl (M ′ kM ) denote the symmetrized KL-divergence. Recalling the supremum norm ball B∞ (X ) = {f : X → R | kf k∞ ≤ 1} of Eq. (20), we have the following theorem. Theorem 3. Under the conditions of the previous paragraph, for any α-locally differentially private channel Q (3), we have d X j=1 sy Dkl n n M+j ||M−j  α 2 ≤ 2(e − 1) n X sup d Z X i=1 γ∈B∞ (X ) j=1 X γ(x) (dP+j,i (x) − dP−j,i (x)) 2 . Theorem 3 generalizes Theorem 1, which corresponds to the special case d = 1, though it also has parallels with Theorem 2, as taking the supremum outside the summation is essential to obtaining sharp results. We provide the proof of Theorem 3 in Appendix E. Theorem 3 allows us to prove Proposition 3 from the non-private variant (29) of Assouad’s method. Indeed, inequality (29) immediately implies for any channel Q that Mn (θ(P), Φ ◦ ρ, Q) ≥ δ d h X j=1 n n 1 − M+j − M−j TV i . Using a combination of Pinsker’s inequality and Cauchy-Schwarz, we obtain d X j=1 n M+j − n M−j TV 1  d   2 1√ X n n n n Dkl M+j kM−j + Dkl M−j kM+j d . ≤ 2 j=1 Thus, whenever Pν induces a 2δ-Hamming separation for Φ ◦ ρ we have " 1 #  X d  2 1 sy n n Dkl M+j ||M−j Mn (θ(P), Φ ◦ ρ, Q) ≥ dδ 1 − . 4d j=1 The combination of inequality (40) with Theorem 3 yields Proposition 3. 26 (40) 20000 18000 18000 16000 16000 14000 14000 E[|θb − θ|] E[|θb − θ|] 12000 12000 10000 10000 8000 8000 6000 6000 4000 4000 2000 1.25 1.5 2.0 3.0 5.0 9.0 17.0 33.0 2000 1.25 65.0 Assumed moment k 1.5 2.0 3.0 5.0 9.0 17.0 33.0 65.0 Assumed moment k (a) (b) Figure 5. Mean salary estimation errors. Left (a): privacy α = 1/2. Right (b): privacy α = 1. The horizontal axis corresponds to known assumed moment power k, that is, E[|X|k ]1/k = rk , and vertical axis is mean absolute error. Confidence bands are simulated 90% confidence intervals. 6 Experiments In this section, we study three different datasets—each consisting of data that are sensitive but are nonetheless available publicly—in an effort to demonstrate the importance of minimax theory for practical private estimation. While the public availability of these datasets in some sense obviates the need for private analysis, they provide natural proxies by which to evaluate the performance of privacy-preserving mechanisms and estimation schemes. (The public availability also allows us to make all of our experimental data freely available.) 6.1 Salary estimation: experiments with one-dimensional data Our first set of experiments investigates the performance of minimax optimal estimators of onedimensional mean and median statistics, as described in Sections 3.2.1 and 3.2.2. We use data on salaries in the University of California system [46]. We perform our experiments with the 2010 salaries, which consists of a population of N = 252,540 employees with mean salary $39,531 and median salary $24,968. The data has reasonably long tails; 14 members of the dataset have salaries above $1,000,000 and two individuals have salaries between two- and three-million dollars. 6.1.1 Mean salary estimation We first explore the effect of bounds on moments in the mean estimation problem as discussed in Section 3.2.1. Recall that for the family of distributions P satisfying EP [|X|k ]1/k ≤ rk , a minimax optimal estimator is the truncated mean estimator (10) (cf. Sec. B.1) with truncation − k−1 P 1 k level Tk = rk (nα2 ) 2k ; then θb = 1 n Zi has convergence rate E[(θb − E[X])2 ] . rk nα2 . n i=1 For heavy-tailed data, it may be the case that E[|X|k1 ]1/k1 ≪ E[|X|k2 ]1/k2 for some k1 < k2 ; thus, k−1 while the rate n− k may be slower for k = k1 than k = k2 , the leading moment-based term rk1 may yield better finite sample performance. We investigate this possibility in several experiments. 27 Table 1. Optimal mean absolute errors for each privacy level α, as determined by mean absolute error over assumed known moment k. Privacy α Mean absolute error Moment k Standard error 1/10 1/2 11849 2.9 428 3923 3.6 150 1 2373 3.6 91 2 1439 3.6 55 ∞ 82 N/A 6.0 We perform each experiment by randomly subsampling one-half of the dataset to generate samples {X1 , . . . , XN/2 }, whose means we estimate privately using the estimator (10). Within an experiment, we assume we have knowledge of the population moment rk = E[|X|k ]1/k for large enough k—an unrealistic assumption facilitating comparison. Fixing m = 20, we use the m − 1 logarithmically-spaced powers o n j k ∈ 10 m−1 log10 (3m) : j = 1, 2, . . . , m − 1 ≈ {1.24, 1.54, 1.91, . . . , 60} and k = ∞. We repeat the experiment 400 times for each moment value k and privacy parameters α ∈ {.1, .5, 1, 2}. In Figure 5, we present the behavior of the truncated mean estimator for estimating the mean salary paid in fiscal year 2010 in the UC system. We plot the mean absolute error of the private estimator for the population mean against the moment k for the experiments with α = 21 and α = 1. We see that for this (somewhat) heavy-tailed data, an appropriate choice of moment—in this case, about k ≈ 3—can yield substantial improvements. In particular, assumptions of data boundedness (k = ∞) give unnecessarily high variance and large radii rk , while assuming too few moments k−1 (k < 2) yields a slow convergence rate n− k that causes absolute errors in estimation that are 1 1 , 2 , 1, 2, ∞} (with α = ∞ corresponding to no too large. In Table 1, for each privacy level α ∈ { 10 privacy) we tabulate the best mean absolute error achieved by any moment k (and the moment achieving this error). The table shows that, even performing a post-hoc optimal choice of moment estimator k, local differential privacy may be quite a strong constraint on the quality of estimation, as even with α = 1 we incur an error of approximately 6% on average, while a non-private estimator observing half the population has error of .2%. 6.1.2 Median salary estimation We now turn to an evaluation of the performance of the minimax optimal stochastic gradient procedure (11) for median estimation, comparing it with more naive but natural estimators based on noisy truncated versions of individuals’ data. We first motivate the alternative strategy using the problem setting of Section 3.2.2. Recall that Π[−r,r] (x) denotes the projection of x ∈ R onto the interval [−r, r]. If by some prior knowledge we know that the distribution P satisfies | med(P )| ≤ r, then for X ∼ P the random variables Π[−r,r](X) have identical median to P , and for any symmetric random variable W , the variable Z = W + Π[−r,r] (X) satisfies med(Z) = med(X). Now, let iid Wi ∼ Laplace(α/(2r)), and consider the natural α-locally differentially private estimator Zi = Π[−r,r](Xi ) + Wi , with θbn = med(Z1 , . . . , Zn ). (41) The variables Zi are locally private versions of the Xi , as we simply add noise to (truncated) versions of the true data Xi . Rather than giving a careful theoretical investigation of the performance of the estimator (41), we turn to empirical results. We again consider the salary data available from the UC system for fiscal year 2010, where we know that the median salary is at least zero (so we replace projections onto [−r, r] with [0, r] in the 28 10 10 3 10 10 10 2 10 10 10 10 0 -1 10 10 -2 10 -3 0 50000 100000 150000 n 200000 250000 10 0 10 -3 0 50000 100000 10 10 200000 250000 10 -2 -3 0 50000 100000 n 150000 200000 250000 r = 4 med(P ) 5 4 3 3 2 b − θ| |θ b − θ| |θ 10 0 -1 4 10 10 1 r = 2 med(P ) 10 10 150000 n 10 10 10 10 -2 10 10 10 -1 r = 1.5 med(P ) 10 2 1 b − θ| |θ 10 b − θ| |θ b − θ| |θ 10 1 3 2 10 10 4 3 1 0 10 10 -1 10 -2 10 -3 0 50000 100000 n 150000 200000 10 250000 2 1 0 -1 -2 -3 0 50000 r = 8 med(P ) 100000 n 150000 200000 250000 r = 16 med(P ) Figure 6. Performance of two median estimators—the SGD estimator (11) and the naive estimator (41)—plotted against sample size for α = 1 for privately estimating median salary in the UC system. The blue line (lower) gives the estimation error of SGD against iteration (number of observations) with 90% confidence interval, the black (upper) line that of the naive median estimator (41) with 90% confidence interval in with green shading (using the full sample). Each plot corresponds to a different estimated maximum radius r for the true median. methods (11) and (41)). We compare the stochastic gradient estimator (11) using the specified stepsizes ηi and averaged predictor θbn as well as the naive estimator (41). Treating the full population (all the salaries) as the sampling distribution P , we perform five experiments, each for a different estimate value of the radius of the median r. Specifically, we use r ∈ {1.5, 2, 4, 8, 16} med(P ), where we assume that we know that the median must lie in some region near the true median. (The true median salary is approximately $25,000.) For each experiment, we perform the following steps 400 times (with independent randomness) on the population of size n = 252,540: 1. We perform n steps of private stochastic gradient descent (11), beginning from a uniformly random intialization θ0 ∈ [0, r]. Each step consists of a random draw Xi without replacement from the population {X1 , . . . , Xn }, then performing the private gradient step. iid 2. We compute the naive private median (41) with Wi ∼ Laplace(α/(2r)). In Figure 6, we plot the results of these experiments. Each plot contains two lines. The first is a descending blue line (the lower of the two), which is the running gap R(θbt ) − R(med(P )) of the P t 1 mean SGD estimator θbt = t i=1 θi for each t = 1, . . . , n; the gap is averaged over the 400 runs of SGD. We shade the region between the 5th and 95th percentile of the gaps R(θbt ) − R(med(P )) for the estimator over all 400 runs of SGD; note that the upward deviations are fairly tight. The flat b − R(med(P )) of the naive estimator (41) over all 400 tests with line is the mean performance R(θ) 29 90% confidence bands above and below (this estimator uses the full sample of size n). Two aspects of these results are notable. First, the minimax optimal SGD estimator always has substantially better performance—even in the best case for the naive estimator (when r = 2 med(P )), the gap between the two is approximately a factor of 6—and usually gives a several order of magnitude improvement. Secondly, the optimal SGD estimator is quite robust, yielding mean performance E[R(θbn )] − R(med(P )) < 1 for all experiments. By way of comparison, the non-private stochastic gradient estimator—that with α = +∞—attains error approximately 0.25. More precisely, as our problem has median salary approximately $25,000, the relative error in the gap, no matter which radius r is chosen, is at most 4 · 10−5 for private SGD. 6.2 Drug use and hospital admissions In this section, we study the problem of estimating the proportions of a population admitted to hospital emergency rooms for different types of drug use; it is natural that admitted persons might want to keep their drug use private, but accurate accounting of drug use is helpful for assessment of public health. We apply our methods to drug use data from the National Estimates of Drug-Related Emergency Department Visits (NEDREDV) [53] and treat this problem as a meanestimation problem. First, we describe our data-generation procedure, after which we describe our experiments in detail. The NEDREDV data consists of tabulated triples of the form (drug, year, m), where m is a count of the number of hospital admissions for patients using the given drug in the given year. We take admissions data from the year 2004, which consists of 959,715 emergency department visits, and we include admissions for d = 27 common drugs.2 Given these tuples, we generate a random dataset {X1 , . . . , XN } ⊂ P {0, 1}d , N = 959,715, with the property that for each drug j ∈ {1, . . . , d} the marginal counts N i=1 Xij yield the correct drug use frequencies. Under this marginal constraint, we set each coordinate Xij = 0 or 1 independently and uniformly at random. Thus, each non-private observation consists of a vector X ∈ {0, 1}d representing a hospital admission, where coordinate j of X is 1 if the admittee abuses drug j and 0 otherwise. Many admittees are users of multiple drugs (this is true in the non-simulated data as there are substantially P more drug counts than total admissions), so we consider the problem of estimating the mean N1 N i=1 Xi of the population, d θ = E[X], where all we know is that X ∈ [0, 1] . In each separate experiment, we draw a random sample of size n = ⌈ 2N 3 ⌉ from the population, replacing each element Xi of the sample with an α-locally differentially private view Zi , and then construct an estimate θb of the true mean θ. In this case, the minimax optimal α-differentially private strategy is based on ℓ∞ -sampling strategy (26). We also compare to a naive estimator that uses Z = X + W , where W ∈ Rd has independent coordinates each with Laplace(α/d) distribution, as well as a non-private estimator using the average of the subsampled vectors X. We displayed our results earlier in Figure 1 in the introduction, where we plot the results of 100 independent experiments with privacy parameter α = 21 . We show the mean ℓ∞ error for estimating P the population proportions θ = N1 N i=1 Xi —based on a population of size N = 959,715—using a sample of size n as n ranges from 1 to n = 600000. We consider estimation of d = 27 drugs. The top-most (blue) line corresponds to the Laplace estimator, the bottom (black) line a non-private 2 The drugs are Alcohol, Cocaine, Heroin, Marijuana, Stimulants, Amphetamines, Methamphetamine, MDMA (Ecstasy), LSD, PCP, Antidepressants, Antipsychotics, Miscellaneous hallucinogens, Inhalants, lithium, Opiates, Opiates unspecified, Narcotic analgesics, Buprenorphine, Codeine, Fentanyl, Hydrocodone, Methadone, Morphine, Oxycodone, Ibuprofen, Muscle relaxants. 30 estimator based on empirical counts, and the middle (green) line the optimal private estimator. The plot also shows 5th and 95th percentile quantiles for each of the private experiments. From the figure, it is clear that the minimax optimal sampling strategy outperforms the equally private Laplace noise addition mechanism; even the worst performing random samples of the optimal sampling scheme outperform the best of the √Laplace noise addition scheme. The mean error of the optimal scheme is also roughly a factor of d ≈ 5 better than the non-optimal Laplace scheme. 6.3 Censorship, privacy, and logistic regression In our final set of experiments, we investigate private estimation strategies for conditional probability estimation—logistic regression—for prediction of whether a document will be censored. We applied our methods to a collection of N = 190,000 Chinese blog posts, of which Ncens = 90,000 have been censored and Nun = 100,000 have been allowed to remain on Weibao (a Chinese blogging platform) by Chinese authorities.3 The goal is to find those words strongly correlated with censorship decisions by estimation of a logistic model and to predict whether a particular document will be censored. We let x ∈ {0, 1}d be a vector of variables representing a single document, where xj = 1 indicates that word j appears in the document and xj = 0 otherwise. Then the task is to estimate the logistic model P (Y = y | X = x; θ) = 1/(1 + exp(−y hx, θi)) for y ∈ {−1, 1} and x ∈ {0, 1}d . As the initial dimension is too large for private strategies to be effective, we perform and compare results over two experiments. In the first, we use the d = 458 words appearing in at least 0.5% of the documents, and in the second we use the d = 24 words appearing in at least 10% of the documents. We repeat the following experiment 25 times with privacy parameter α ∈ {1, 2, 4}. First, we draw a subsample of n = ⌈0.75N ⌉ random documents, on which we fit a logistic regression model using either (i) no privacy, (ii) the minimax optimal stochastic gradient scheme (31) with optimal ℓ2 -sampling (25), or (iii) the stochastic gradient scheme (31), where the stochastic gradients are perturbed by mean-zero independent Laplace noise sufficient to guarantee α-local-differential privacy (in the two stochastic gradient cases, we present the examples in the same order). We then evaluate the performance of the fit vector θb on the remaining held-out 25% of the data. For numerical stability reasons, we project our stochastic gradient iterates θi onto the ℓ2 -ball of radius 5; this has no effect on the convergence guarantees given in Lemma 2 for stochastic gradient descent, because the non-private solution for the logistic regression problem on each of the samples satisfies the norm bound kθk < 5. Figure 7 provides a summary of our results: it displays the mean test (held-out) error rate over the 25 experiments, along with the standard error over the experiments. The tables show, perhaps most importantly, that there is a non-trivial degradation in classification quality as a consequence of privacy. The degradation in Figure 7(a), when the dimension d ≈ 450, is more substantial than in the lower d = 24-dimensional case (Figure 7(b)). The classification error rate of the Laplace mechanism is essentially random guessing in the higher-dimensional case, while for the minimax optimal ℓ2 -mechanism, the classification error rate is more or less identical for both the high and low-dimensional problems, in spite of the substantially better performance of the nonprivate estimator in the higher-dimensional problem. In our experiments, in the high-dimensional 3 We use data identical to that used in the articles [36, 37]. The datasets were constructed as follows: all blog posts from http://weiboscope.jmsc.hku.hk/datazip/ were downloaded (see Fu et al. [27]), and the Chinese text of each post is segmented using the Stanford Chinese language parser [40]. Of these, a random subsample of Ncens censored blog posts and Nun uncensored posts is taken. 31 α 1 2 4 Non-private Optimal Laplace 0.256 ± 0.0 0.443 ± 0.004 0.5 ± 0.005 0.255 ± 0.0 0.43 ± 0.003 0.5 ± 0.006 0.256 ± 0.0 0.409 ± 0.003 0.486 ± 0.007 (a) Test error using top .5% of words α 1 2 4 Non-private Optimal Laplace 0.35 ± 0.001 0.431 ± 0.005 0.5 ± 0.009 0.35 ± 0.001 0.406 ± 0.005 0.483 ± 0.008 0.35 ± 0.001 0.4 ± 0.004 0.449 ± 0.005 (b) Test error using top 10% of words Figure 7. Logistic regression experiment. Tables include mean test (held-out) error of different privatization schemes for privacy levels α ∈ {1, 2, 4}, averaged over 25 experimental runs using random held-out sets of size N/4 of the data. We indicate standard errors by the ± terms. case, the Laplace mechanism had better test error rate than the optimal randomized-response-style scheme in three of the tests with α = 1, one test with α = 2, and two with α = 4; for the d = 24dimensional case, the Laplace scheme outperformed the randomized response scheme in two, one, and zero experiments for α ∈ {1, 2, 4}, respectively. Part of this difference is explainable by the size of the tails of the privatizing distributions: our optimal sampling schemes (25) and (26) in Sec. 4.2.3 have compact support, and are thus sub-Gaussian, while the Laplace distribution has heavier tails. In sum, it is clear that the ℓ2 -optimal randomized response strategy dominates the more naive Laplace noise addition strategy, while non-private estimation enjoys improvements over both. 7 Conclusions The main contribution of this paper is to link minimax analysis from statistical decision theory with differential privacy, bringing some of their respective foundational principles into close contact. Our main technique, in the form of the divergence inequalities in Theorems 1, 2, and 3, and their associated corollaries, shows that applying differentially private sampling schemes essentially acts as a contraction on distributions. These contractive inequalities allow us to obtain results, presented in Propositions 1, 2, and 3, that generalize the classical minimax lower bounding techniques of Le Cam, Fano, and Assouad. These results allow us to give sharp minimax rates for estimation in locally private settings. With our examples in Sections 4.2, 5.2.1, and 5.2.2, we have developed a framework that shows that, roughly, if one can construct a family of distributions {Pν } on the sample space X that is not well “correlated” with any member of f ∈ L∞ (X ) for which f (x) ∈ {−1, 1}, then providing privacy is costly: the contraction provided in Theorems 2 and 3 is strong. By providing sharp convergence rates for many standard statistical estimation procedures under local differential privacy, we have developed and explored some tools that may be used to better understand privacy-preserving statistical inference. We have identified a fundamental continuum along which privacy may be traded for utility in the form of accurate statistical estimates, providing a way to adjust statistical procedures to meet the privacy or utility needs of the statistician and the population being sampled. There are a number of open questions raised by our work. It is natural to wonder whether it is possible to obtain tensorized inequalities of the form of Corollary 3 even for interactive mechanisms. One avenue of attack for such an approach could be the work on directed information, which is useful for understanding communication over channels with feedback [42, 47]. Another important question is whether the results we have provided can be extended to settings in which standard (non-local) differential privacy, or another form of disclosure limitation, holds. Such extensions could yield insights into optimal mechanisms for a number of private procedures. 32 Finally, we wish to emphasize the pessimistic nature of several of our results. The strengths of differential privacy as a formalization of privacy need to weighed against a possibly significant loss in inferential accuracy, particularly in high-dimensional settings, and this motivates further work on privacy-preserving mechanisms that retain the strengths of differential privacy while mitigating some of its undesirable effects on inference. Acknowledgments We are very thankful to Shuheng Zhou for pointing out errors in Corollary 3 and Proposition 2 in an earlier version of this manuscript. We also thank Guy Rothblum for helpful discussions and Margaret Roberts for providing us tokenized data on the censorship task. Our work was supported in part by the U.S. Army Research Office under grant number W911NF-11-1-0391, Office of Naval Research MURI grant N00014-11-1-0688, and National Science Foundation (NSF) grants CCF1553086 and CAREER-1553086. References [1] A. Agarwal, P. L. Bartlett, P. Ravikumar, and M. J. Wainwright. Information-theoretic lower bounds on the oracle complexity of convex optimization. IEEE Transactions on Information Theory, 58(5):3235–3249, 2012. [2] V. Anantharam, A. Gohari, S. Kamath, and C. Nair. On maximal correlation, hypercontractivity, and the data processing inequality studied by Erkip and Cover. arXiv:1304.6133 [cs.IT], 2013. URL http://arxiv.org/abs/1304.6133. [3] E. Arias-Castro, E. Candés, and M. Davenport. On the fundamental limits of adaptive sensing. IEEE Transactions on Information Theory, 59(1):472–481, 2013. [4] P. Assouad. Deux remarques sur l’estimation. Comptes Rendus des Séances de l’Académie des Sciences, Série I, 296(23):1021–1024, 1983. [5] B. Barak, K. Chaudhuri, C. Dwork, S. Kale, F. McSherry, and K. Talwar. Privacy, accuracy, and consistency too: A holistic solution to contingency table release. In Proceedings of the 26th ACM Symposium on Principles of Database Systems, 2007. [6] A. Beimel, K. Nissim, and E. Omri. Distributed private data analysis: Simultaneously solving how and what. In Advances in Cryptology, volume 5157 of Lecture Notes in Computer Science, pages 451–468. Springer, 2008. [7] A. Beimel, S. P. Kasiviswanathan, and K. Nissim. Bounds on the sample complexity for private learning and private data release. In Proceedings of the 7th Theory of Cryptography Conference, pages 437–454, 2010. [8] A. Blum, K. Ligett, and A. Roth. A learning theory approach to non-interactive database privacy. In Proceedings of the Fortieth Annual ACM Symposium on the Theory of Computing, 2008. [9] L. D. Brown. Fundamentals of Statistical Exponential Families. Institute of Mathematical Statistics, 1986. 33 [10] P. Bühlmann and S. van de Geer. Statistics for High-Dimensional Data: Methods, Theory and Applications. Springer, 2011. [11] R. Carroll and P. Hall. Optimal rates of convergence for deconvolving a density. Journal of the American Statistical Association, 83(404):1184–1186, 1988. [12] K. Chaudhuri, C. Monteleoni, and A. D. Sarwate. Differentially private empirical risk minimization. Journal of Machine Learning Research, 12:1069–1109, 2011. [13] T. M. Cover and J. A. Thomas. Elements of Information Theory, Second Edition. Wiley, 2006. [14] J. C. Duchi and M. J. Wainwright. Distance-based and continuum Fano inequalities with applications to statistical estimation. arXiv:1311.2669 [cs.IT], 2013. [15] J. C. Duchi, M. I. Jordan, and M. J. Wainwright. Local privacy and statistical minimax rates. In 54th Annual Symposium on Foundations of Computer Science, 2013. [16] J. C. Duchi, M. I. Jordan, and M. J. Wainwright. Local privacy and minimax bounds: Sharp rates for probability estimation. In Advances in Neural Information Processing Systems 26, 2013. [17] J. C. Duchi, M. I. Jordan, and M. J. Wainwright. Privacy aware learning. Journal of the Association for Computing Machinery, 61(6):38:1–38:57, 2014. [18] G. T. Duncan and D. Lambert. Disclosure-limited data dissemination. Journal of the American Statistical Association, 81(393):10–18, 1986. [19] G. T. Duncan and D. Lambert. The risk of disclosure for microdata. Journal of Business and Economic Statistics, 7(2):207–217, 1989. [20] C. Dwork and J. Lei. Differential privacy and robust statistics. In Proceedings of the Forty-First Annual ACM Symposium on the Theory of Computing, 2009. [21] C. Dwork, F. McSherry, K. Nissim, and A. Smith. Calibrating noise to sensitivity in private data analysis. In Proceedings of the Third Theory of Cryptography Conference, pages 265–284, 2006. [22] C. Dwork, G. N. Rothblum, and S. P. Vadhan. Boosting and differential privacy. In 51st Annual Symposium on Foundations of Computer Science, pages 51–60, 2010. [23] S. Efromovich. Nonparametric Curve Estimation: Springer-Verlag, 1999. Methods, Theory, and Applications. [24] A. V. Evfimievski, J. Gehrke, and R. Srikant. Limiting privacy breaches in privacy preserving data mining. In Proceedings of the Twenty-Second Symposium on Principles of Database Systems, pages 211–222, 2003. [25] S. E. Fienberg, U. E. Makov, and R. J. Steele. Disclosure limitation using perturbation and related methods for categorical data. Journal of Official Statistics, 14(4):485–502, 1998. 34 [26] S. E. Fienberg, A. Rinaldo, and X. Yang. Differential privacy and the risk-utility tradeoff for multi-dimensional contingency tables. In The International Conference on Privacy in Statistical Databases, 2010. [27] K.-W. Fu, C. Chan, and M. Chau. Assessing censorship on microblogs in China: Discriminatory keyword analysis and impact evaluation of the “real name registration” policy. IEEE Internet Computing, 17(3):42–50, 2013. [28] S. R. Ganta, S. Kasiviswanathan, and A. Smith. Composition attacks and auxiliary information in data privacy. In Proceedings of the 14th ACM SIGKDD Conference on Knowledge and Data Discovery (KDD), 2008. [29] R. M. Gray. Entropy and Information Theory. Springer, 1990. [30] R. Hall, A. Rinaldo, and L. Wasserman. Random differential privacy. [stat.ME], 2011. URL http://arxiv.org/abs/1112.2680. arXiv:1112.2680 [31] M. Hardt and G. N. Rothblum. A multiplicative weights mechanism for privacy-preserving data analysis. In 51st Annual Symposium on Foundations of Computer Science, 2010. [32] M. Hardt and K. Talwar. On the geometry of differential privacy. In Proceedings of the FortySecond Annual ACM Symposium on the Theory of Computing, pages 705–714, 2010. URL http://arxiv.org/abs/0907.3754. [33] P. Kairouz, S. Oh, and P. Vishwanath. Extremal mechanisms for local differential privacy. In Advances in Neural Information Processing Systems 27, 2014. [34] V. Karwa and A. Slavković. Inference using noisy degrees: differentially private β-model and synthetic graphs. Annals of Statistics, 44(1):87–112, 2016. [35] S. P. Kasiviswanathan, H. K. Lee, K. Nissim, S. Raskhodnikova, and A. Smith. What can we learn privately? SIAM Journal on Computing, 40(3):793–826, 2011. [36] G. King, J. Pan, and M. Roberts. How censorship in China allows government criticism but silences collective expression. American Political Science Review, 107(2):1–18, 2013. [37] G. King, J. Pan, and M. Roberts. Reverse-engineering censorship in China: Randomized experimentation and participant observation. Science, 345(6199), 2014. doi: 10.1126/science. 1251722. [38] L. Le Cam. Convergence of estimates under dimensionality restrictions. Annals of Statistics, 1(1):38–53, 1973. [39] E. L. Lehmann. Elements of Large Sample Theory. Springer, 1999. [40] R. Levy and C. D. Manning. Is it harder to parse Chinese, or the Chinese Treebank? In Association for Computational Linguistics, 2003. [41] P.-L. Loh and M. J. Wainwright. High-dimensional regression with noisy and missing data: provable guarantees with nonconvexity. Annals of Statistics, 40(3):1637–1664, 2012. 35 [42] J. Massey. Causality, feedback and directed information. In Proceedings of the International Symposium on Information Theory and its Applications (ISITA), pages 303–305, 1990. [43] A. McGregor, I. Mironov, T. Pitassi, O. Reingold, K. Talwar, and S. Vadhan. The limits of two-party differential privacy. In 51st Annual Symposium on Foundations of Computer Science, 2010. [44] S. Negahban, P. Ravikumar, M. Wainwright, and B. Yu. A unified framework for highdimensional analysis of M -estimators with decomposable regularizers. Statistical Science, 27 (4):538–557, 2012. [45] A. Nemirovski, A. Juditsky, G. Lan, and A. Shapiro. Robust stochastic approximation approach to stochastic programming. SIAM Journal on Optimization, 19(4):1574–1609, 2009. [46] U. of California. 2010 annual report on employee compensation, 2014. http://compensation.universityofcalifornia.edu/payroll2014/. URL [47] H. H. Permuter, Y.-H. Kim, and T. Weissman. Interpretations of directed information in portfolio theory, data compression, and hypothesis testing. IEEE Transactions on Information Theory, 57(6):3248–3259, 2011. [48] R. R. Phelps. Lectures on Choquet’s Theorem, Second Edition. Springer, 2001. [49] B. T. Polyak and A. B. Juditsky. Acceleration of stochastic approximation by averaging. SIAM Journal on Control and Optimization, 30(4):838–855, 1992. [50] B. I. P. Rubinstein, P. L. Bartlett, L. Huang, and N. Taft. Learning in a large function space: privacy-preserving mechanisms for SVM learning. Journal of Privacy and Confidentiality, 4 (1):65–100, 2012. [51] D. Scott. On optimal and data-based histograms. Biometrika, 66(3):605–610, 1979. [52] A. Smith. Privacy-preserving statistical estimation with optimal convergence rates. In Proceedings of the Forty-Third Annual ACM Symposium on the Theory of Computing, 2011. [53] Substance Abuse and Mental Health Services Administration. Drug abuse warning network 2011: National estimates of drug-related emergency department visits. Technical Report SMA 13-4760, U.S. Department of Health and Human Services, 2013. URL http://www.samhsa.gov/data/emergency-department-data-dawn/reports?tab=47. [54] A. B. Tsybakov. Introduction to Nonparametric Estimation. Springer, 2009. [55] S. Warner. Randomized response: a survey technique for eliminating evasive answer bias. Journal of the American Statistical Association, 60(309):63–69, 1965. [56] L. Wasserman and S. Zhou. A statistical framework for differential privacy. Journal of the American Statistical Association, 105(489):375–389, 2010. [57] Y. Yang and A. Barron. Information-theoretic determination of minimax rates of convergence. Annals of Statistics, 27(5):1564–1599, 1999. [58] B. Yu. Assouad, Fano, and Le Cam. In Festschrift for Lucien Le Cam, pages 423–435. Springer-Verlag, 1997. 36 A Proof of Theorem 1 and related results We now collect proofs of our main results, beginning with Theorem 1. A.1 Proof of Theorem 1 Observe that M1 and M2 are absolutely continuous with respect to one another, and there is a measure µ with respect to which they have densities m1 and m2 , respectively. The channel probabilities Q(· | x) and Q(· | x′ ) are likewise absolutely continuous, so that we may assume they R have densities q(· | x) and write mi (z) = q(z | x)dPi (x). In terms of these densities, we have Z Z m1 (z) m2 (z) Dkl (M1 kM2 ) + Dkl (M2 kM1 ) = m1 (z) log dµ(z) + m2 (z) log dµ(z) m2 (z) m1 (z) Z  m1 (z) dµ(z). m1 (z) − m2 (z) log = m2 (z) Consequently, we must bound both the difference m1 − m2 and the log ratio of the marginal densities. The following two auxiliary lemmas are useful: Lemma 3. For any α-locally differentially private channel Q, we have |m1 (z) − m2 (z)| ≤ cα inf q(z | x) (eα − 1) kP1 − P2 kTV , x (42) where cα = min{2, eα }. Lemma 4. Let a, b ∈ R+ . Then log ab ≤ |a−b| min{a,b} . We prove these two results at the end of this section. With the lemmas in hand, let us now complete the proof of the theorem. From Lemma 4, the log ratio is bounded as m1 (z) |m1 (z) − m2 (z)| log ≤ . m2 (z) min {m1 (z), m2 (z)} Applying Lemma 3 to the numerator yields log cα (eα − 1) kP1 − P2 kTV inf x q(z | x) m1 (z) ≤ m2 (z) min{m1 (z), m2 (z)} α cα (e − 1) kP1 − P2 kTV inf x q(z | x) , ≤ inf x q(z | x) where the final step uses the inequality min{m1 (z), m2 (z)} ≥ inf x q(z | x). Putting together the pieces leads to the bound log m1 (z) ≤ cα (eα − 1) kP1 − P2 kTV . m2 (z) Combining with inequality (42) yields Dkl (M1 kM2 ) + Dkl (M2 kM1 ) ≤ c2α (eα 2 − 1) kP1 − 37 P2 k2TV Z inf q(z | x)dµ(z). x The final integral is at most one, which completes the proof of the theorem. It remains to prove Lemmas 3 and 4. We begin with the former. For any z ∈ Z, we have Z q(z | x) [dP1 (x) − dP2 (x)] m1 (z) − m2 (z) = X Z Z q(z | x) [dP1 (x) − dP2 (x)]− q(z | x) [dP1 (x) − dP2 (x)]+ + = X X Z Z [dP1 (x) − dP2 (x)]− [dP1 (x) − dP2 (x)]+ + inf q(z | x) ≤ sup q(z | x) x∈X x∈X X X  Z [dP1 (x) − dP2 (x)]+ . = sup q(z | x) − inf q(z | x) x∈X x∈X By definition of the total variation norm, we have R X [dP1 − dP2 ]+ = kP1 − P2 kTV , and hence |m1 (z) − m2 (z)| ≤ sup q(z | x) − q(z | x′ ) kP1 − P2 kTV . (43) x,x′ For any x̂ ∈ X , we may add and subtract q(z | x̂) from the quantity inside the supremum, which implies that sup q(z | x) − q(z | x′ ) = inf sup q(z | x) − q(z | x̂) + q(z | x̂) − q(z | x′ ) x̂ x,x′ x,x′ ≤ 2 inf sup |q(z | x) − q(z | x̂)| x̂ x = 2 inf q(z | x̂) sup x̂ x q(z | x) −1 . q(z | x̂) Similarly, we have for any x, x′ |q(z | x) − q(z | x′ )| = q(z | x′ ) q(z | x) q(z | x) − 1 ≤ eα inf q(z | x −1 . b) ′ q(z | x ) q(z | x′ ) x b Since for any choice of x, x̂, we have q(z | x)/q(z | x̂) ∈ [e−α , eα ], we find that (since eα −1 ≥ 1−e−α ) sup q(z | x) − q(z | x′ ) ≤ min{2, eα } inf q(z | x) (eα − 1) . x x,x′ Combining with the earlier inequality (43) yields the claim (42). To see Lemma 4, note that for any x > 0, the concavity of the logarithm implies that log(x) ≤ x − 1. Setting alternatively x = a/b and x = b/a, we obtain the inequalities log a a a−b ≤ −1= b b b and log b b b−a ≤ −1= . a a a Using the first inequality for a ≥ b and the second for a < b completes the proof. 38 A.2 Proof of Corollary 3 Let us recall the definition of the induced marginal distribution (13), given by Z Q(S | x1:n )dPνn (x1:n ) for S ∈ σ(Z n ). Mν (S) = X For each i = 2, . . . , n, we let Mν(i) (· | Z1 = z1 , . . . , Zi−1 = zi−1 ) = Mν(i) (· | z1:i−1 ) denote the (marginal over Xi ) distribution of the variable Zi conditioned on Z1 = z1 , . . . , Zi−1 = zi−1 . In addition, use the shorthand notation Z   Dkl Mν(i) (· | z1:i−1 )kMν ′ (i) (· | z1:i−1 ) dMνi−1 (z1 , . . . , zi−1 ) Dkl Mν(i) kMν ′ (i) := Z i−1 to denote the integrated KL divergence of the conditional distributions on the Zi . By the chain rule for KL divergences [29, Chapter 5.3], we obtain Dkl (Mνn kMνn′ ) = n X i=1  Dkl Mν(i) kMν ′ (i) . By assumption (3), the distribution Qi (· | Xi , Z1:i−1 ) for Zi is α-differentially private for the sample Xi . As a consequence, if we let Pν(i) (· | Z1 = z1 , . . . , Zi−1 = zi−1 ) denote the conditional distribution of Xi given the first i − 1 values Z1 , . . . , Zi−1 and the packing index V = ν, then from the chain rule and Theorem 1 we obtain n Z X  n n Dkl Mν(i) (· | z1:i−1 )kMν ′ (i) (· | z1:i−1 ) dMνi−1 (z1:i−1 ) Dkl (Mν kMν ′ ) = ≤ i−1 i=1 Z n X α i=1 2 4(e − 1) Z Z i−1 Pν(i) (· | z1:i−1 ) − Pν ′ (i) (· | z1:i−1 ) 2 TV dMνi−1 (z1 , . . . , zi−1 ). By the construction of our sampling scheme, the random variables Xi are conditionally independent given V = ν; thus the distribution Pν(i) (· | z1:i−1 ) = Pν(i) , where Pν(i) denotes the distribution of Xi conditioned on V = ν. Consequently, we have Pν(i) (· | z1:i−1 ) − Pν ′ (i) (· | z1:i−1 ) TV = Pν(i) − Pν ′ (i) TV , which gives the claimed result. B Proof of minimax bounds associated with Le Cam’s method In this appendix, we collect proofs of the various minimax lower bounds for specific problems in Section 3. B.1 Proof of Corollary 1 The minimax rate characterized by equation (9) involves both a lower and an upper bound, and we divide our proof accordingly. We provide the proof for α ∈ (0, 1], but note that a similar result (modulo different constants) holds for any finite value of α. 39 Lower bound: We use Le Cam’s method to prove the lower bound in equation (9). Fix a given constant δ ∈ (0, 1], with a precise value to be specified later. For ν ∈ V ∈ {−1, 1}, define the distribution Pν with support {−δ−1/k , 0, δ1/k } by Pν (X = δ−1/k ) = δ(1 + ν) , 2 Pν (X = 0) = 1 − δ, and Pν (X = −δ−1/k ) = δ(1 − ν) . 2 k−1 By construction, we have E[|X|k ] = δ(δ−1/k )k = 1 and θν = Eν [X] = δ k ν, whence the mean k−1 difference is given by θ1 − θ−1 = 2δ k . Applying Le Cam’s method (7) yields   k−1 2  1 1 2 n n k Mn (Θ, (·) , Q) ≥ δ − M1 − M−1 TV , 2 2 where Mνn denotes the marginal distribution of the samples Z1 , . . . , Zn conditioned on θ = θν . Now  1 n kM n , and Corollary 3 yields n 2 M D ≤ Pinsker’s inequality implies that M1n − M−1 kl −1 1 2 TV  n Dkl M1n kM−1 ≤ 4(eα − 1)2 n kP1 − P−1 k2TV = 4(eα − 1)2 nδ2 . √ n α − 1)δ 2n. For α ∈ (0, 1], we have Putting together the pieces yields M1n − M−1 ≤ (e TV eα − 1 ≤ 2α, and thus our earlier application of Le Cam’s method implies   k−1 2  1 √ 2 Mn (Θ, (·) , α) ≥ δ k − αδ 2n . 2 √ Substituting δ = min{1, 1/ 32nα2 } yields the claim (9). Upper bound: We must demonstrate an α-locally private conditional distribution Q and an estimator that achieves the upper bound in equation (9). We do so via a combination of truncation and addition of Laplacian noise. Define the truncation function [·]T : R → [−T, T ] by [x]T := max{−T, min{x, T }}, where the truncation level T is to be chosen. Let Wi be independent Laplace(α/(2T )) random variables, and for each index i = 1, . . . , n, define Zi := [Xi ]T + Wi . By construction, the random P variable Zi is α-differentially private for Xi . For the mean estimator θb := n1 ni=1 Zi , we have i  2 h 2 b + E[θ] b − θ = 4T + 1 Var([X1 ] ) + (E[Z1 ] − θ)2 . E (θb − θ)2 = Var(θ) T nα2 n We claim that " # 21/k 21/k E[Z] = E [[X]T ] ∈ E[X] − k−1 , E[X] + k−1 . T T Indeed, by the assumption that E[|X|k ] ≤ 1, if we take k′ = that k k−1 (45) so that 1/k′ + 1/k = 1, we have E[|X − [X]T |] = E[|X − T |1{X > T }] + E[|X + T |1{X < −T }] ≤ E[|X|1{X > T }] + E[|X|1{X < −T }] ′ ′ ≤ E[|X|k ]1/k P(X > T )1/k + E[|X|k ]1/k P(X < −T )1/k ≤ 21/k T 1−k . 40 (44) The final inequality follows from Markov’s inequality, as P(X > T ) + P(X < −T ) = P(|X| > T ) ≤ ′ ′ ′ ′ ′ T −k , and for any k′ ∈ [1, ∞], we have supa+b≤c {a1/k + b1/k : a, b ≥ 0} = 21−1/k c1/k = 21/k c1/k . From the bound (44) and the inequalities that since [X]T ∈ [−T, T ] and α2 ≤ 1, we have i 5T 2 h 4 + 2k−2 E (θb − θ)2 ≤ 2 nα T valid for any T > 0. Choosing T = (nα2 )1/(2k) yields the upper bound (9) immediately. B.2 Proof of Corollary 2 We have already given the proof of the upper bound in the proposition in the course of our discussion of the stochastic gradient descent estimator (11). We thus focus on the lower bound. Fix r > 0 and let δ ∈ [0, 1] be a constant to be chosen subsequently. For ν ∈ {−1, 1} consider the distributions Pν supported on {−r, r} defined by Pν (X = r) = 1 − δν 1 + δν and Pν (X = −r) = . 2 2 We have med(P1 ) = r and med(P−1 ) = −r, and using an extension of the classical reduction from minimax estimation to testing to gaps in function values (recall inequality (7); see also [1]), we claim that rδ Mn ([−r, r], R, Q) ≥ inf P (ψ(Z1 , . . . , Zn ) 6= V ) , (46) 2 ψ iid where V ∈ {−1, 1} is chosen at random and conditional on V = ν, we draw Zi ∼ Mν for Mν (·) = R Q(· | x)dPν (x). Indeed, under this model, by using the shorthand Rν (θ) = EPν [|θ − X|], we have b inf θ Rν (θ) = 1−δ 2 r; and for any estimator θ we have    n o rδ  rδ 1 X 1−δ 1 X b b EPν [Rν (θ)] − EPν 1 sign(θ) 6= ν r ≥ inf P(ψ(Z1:n ) 6= V ) ≥ 2 2 2 2 2 ψ ν∈{±1} ν∈{±1} as claimed. Continuing, we use Pinsker’s inequality and Corollary 3, which gives n M1n − M−1 2 TV ≤   1 n n kM1n ≤ (eα − 1)2 n kP1 − P−1 k2TV ≤ 3nα2 δ2 Dkl M1n kM−1 + Dkl M−1 4 for α ≤ 1. Thus, the bound (46) implies that for any δ ∈ [0, 1] and any α-private channel Q, we have  rδ Mn ([−r, r], R, Q) ≥ 1 − 3nα2 δ2 . 4 Take δ2 = C 1 6nα2 to give the result of the corollary with cℓ = 1 20 . Proof of Theorem 2 and related results In this section, we collect together the proof of Theorem 2 and related corollaries. 41 C.1 Proof of Theorem 2 Let Z denote the domain of the random variable Z. We begin by reducing the problem to the case when Z = {1, 2, . . . , k} for an arbitrary positive integer k. Indeed, in the general setting, we let K = {Ki }ki=1 be any (measurable) finite partition of Z,  where for z ∈ Z we let [z]K = Ki for the Ki such that z ∈ Ki . The KL divergence Dkl Mν kM can be defined as the supremum of the (discrete) KL divergences between the random variables [Z]K sampled according to Mν and M over all partitions K of Z; for instance, see Gray [29, Chapter 5]. Consequently, we can prove the claim for Z = {1, 2, . . . , k}, and then take the supremum over k to recover the general case. Accordingly, we can work with the probability mass functions m(z | ν) = Mν (Z = z) and m(z) = M (Z = z), and we may write k  X  m(z | ν) (m(z | ν) − m(z)) log Dkl Mν kM + Dkl M kMν = . m(z) z=1 (47) Throughout, we will also use (without loss of generality) the probability mass functions q(z | x) = R Q(Z = z | X = x), where we note that m(z | ν) = q(z | x)dPν (x). Now we use Lemma 4 from the proof of Theorem 1 to complete the proof of Theorem 2. Starting with equality (47), we have k  X 1 X  1 X m(z | ν) Dkl Mν kM + Dkl M kMν ≤ |m(z | ν) − m(z)| log |V| |V| z=1 m(z) ν∈V ν∈V ≤ k X 1 X |m(z | ν) − m(z)| . |m(z | ν) − m(z)| |V| min {m(z), m(z | ν)} z=1 ν∈V Now, we define the measure m0 on Z = {1, . . . , k} by m0 (z) := inf x∈X q(z | x). It is clear that min {m(z), m(z | ν)} ≥ m0 (z), whence we find k  X 1 X  (m(z | ν) − m(z))2 1 X Dkl Mν kM + Dkl M kMν ≤ . |V| |V| z=1 m0 (z) ν∈V ν∈V It remains to bound the final sum. For any constant c ∈ R, we have Z  m(z | ν) − m(z) = (q(z | x) − c) dPν (x) − dP (x) . X We define a set of functions f : Z × X → R (depending implicitly on q) by  Fα := f | f (z, x) ∈ [1, eα ]m0 (z) for all z ∈ Z and x ∈ X . By the definition of differential privacy, when viewed as a joint mapping from Z × X → R, the conditional p.m.f. q satisfies {(z, x) 7→ q(z | x)} ∈ Fα . Since constant (with respect to x) shifts do not change the above integral, we can modify the range of functions in Fα by subtracting m0 (z) from each, yielding the set  Fα′ := f | f (z, x) ∈ [0, eα − 1] m0 (z) for all z ∈ Z and x ∈ X . 42 As a consequence, we find that X ν∈V 2 (m(z | ν) − m(z)) ≤ sup f ∈Fα = sup f ∈Fα′ ( X Z ν∈V ( X X Z ν∈V  f (z, x) dPν (x) − dP (x) X 2 )   f (z, x) − m0 (z) dPν (x) − dP (x) 2 ) . By inspection, when we divide by m0 (z) and recall the definition of the set B∞ ⊂ L∞ (X ) in the statement of Theorem 2, we obtain X ν∈V  X Z 2 α  2 2 γ(x) dPν (x) − dP (x) (m(z | ν) − m(z)) ≤ m (z) (e − 1) sup . 2 0 γ∈B∞ ν∈V X Putting together our bounds, we have   1 X Dkl Mν kM + Dkl M kMν |V| ν∈V 2  k X Z X  2 1 m0 (z) α 2 γ(x) dPν (x) − dP (x) sup ≤ (e − 1) |V| m0 (z) γ∈B∞ X z=1 ν∈V  X Z  2 α 2 1 γ(x) dPν (x) − dP (x) sup ≤ (e − 1) , |V| γ∈B∞ X ν∈V since C.2 P z m0 (z) ≤ 1, which is the statement of the theorem. Proof of Inequality (22) In the non-interactive setting (4), the marginal distribution Mνn is a product measure and Zi is conditionally independent of Z1:i−1 given V . Thus by the chain rule for mutual information [29, Chapter 5] and the fact (as in the proof of Theorem 2) that we may assume w.l.o.g. that Z has finite range I(Z1 , . . . , Zn ; V ) = n X i=1 I(Zi ; V | Z1:i−1 ) = n X i=1 [H(Zi | Z1:i−1 ) − H(Zi | V, Z1:i−1 )] . Since conditioning reduces entropy and Z1:i−1 is conditionally independent of Zi given V , we have H(Zi | Z1:i−1 ) ≤ H(Zi ) and H(Zi | V, Z1:i−1 ) = H(Zi | V ). In particular, we have I(Z1 , . . . , Zn ; V ) ≤ n X I(Zi ; V ) = n X  1 X Dkl Mν,i kM i . |V| i=1 i=1 Applying Theorem 2 completes the proof. 43 ν∈V D Proofs of multi-dimensional mean-estimation results At a high level, our proofs of these results consist of three steps, the first of which is relatively standard, while the second two exploit specific aspects of the local privacy setting. We outline them here: (1) The first step is an essentially standard reduction, based on inequality (19) in Section 4, from an estimation problem to a multi-way testing problem that involves discriminating between indices ν contained within some subset V of Rd . (2) The second step is an appropriate construction of a packing set V ⊂ Rd . We require the existence of a well-separated set: one for which ratio of the packing set size |V| to neighborhood size Nδ is large enough relative to the separation δ of definition (17). (3) The final step is to apply Theorem 2 in order to control the mutual information associated with the testing problem. Doing so requires bounding the supremum in Theorem 2 (and inequality (22)) via the operator norm of Cov(V ) for a vector V drawn uniformly at random from V. This is made easier by the uniformity of the sampling scheme allowed by the generalization (19) of Fano’s inequality we use, as it is possible to enforce that Cov(V ) has relatively small operator norm. The estimation to testing reduction of Step 1 is accomplished by the reduction (19) of Section 4. Accordingly, the proofs to follow are devoted to the second and third steps in each case. D.1 Proof of Corollary 4 We provide a proof of the lower bound, as we provided the argument for the upper bound in Section 4.2.3. Constructing a well-separated set: Let k be an arbitrary integer in {1, 2, . . . , d}, and let Vk = {−1, 1}k denote the k-dimensional hypercube. We extend the set Vk ⊆ Rk to a subset of Rd by setting V = Vk × {0}d−k . For a parameter δ ∈ (0, 1/2] to be chosen, we define a family of probability distributions {Pν }ν∈V constructively. In particular, the random vector X ∼ Pν (a single observation) is formed by the following procedure: ( 1+δν rej w.p. 2 j (48) Choose index j ∈ {1, . . . , k} uniformly at random and set X = 1−δν −rej w.p. 2 j . By construction, these distributions have mean vectors θν := EPν [X] = δr ν. k Consequently, given the properties of the packing V, we have X ∈ B1 (r) with probability 1, and fixing t ∈ R+ , we have that the associated separation function (18) satisfies n δ2 (t) ≥ min kθν − θν ′ k22 | ν − ν ′ 1 n o r2 δ2 ≥ t ≥ 2 min ν − ν ′ k 44 2 2 | ν − ν′ 1 o 2r 2 δ2 ≥t ≥ t. k2 We claim that so long as t ≤ k/6 and k ≥ 3, we have   k |V| > max ,2 . log Nt 6 (49) Indeed, for t ∈ N with t ≤ k/2, we see by the binomial theorem that Nt = t   X k τ =0 τ    t k ke ≤2 . ≤2 t t Consequently, for t ≤ k/6, the ratio |V|/Nt satisfies     k k 2 |V| k √ > max ,2 ≥ k log 2 − log 2 log ≥ k log 2 − log(6e) − log 2 = k log t Nt 6 6 21/k 6 6e for k ≥ 12. The case 2 ≤ k < 12 can be checked directly, yielding claim (49). √ Thus we see that the mean vectors {θν }ν∈V provide us with an rδ 2t/k-separated set (in ℓ2 -norm) with log ratio of its size at least max{k/6, 2}. Upper bounding the mutual information: Our next step is to bound the mutual information I(Z1 , . . . , Zn ; V ) when the observations X come from the distribution (48) and V is uniform in the set V. We have the following lemma, which applies so long as the channel Q is non-interactive and α-locally private (4). See Appendix H.1 for the proof. Lemma 5. Fix k ∈ {1, . . . , d}. Let Zi be α-locally differentially private for Xi , and let X be sampled according to the distribution (48) conditional on V = ν. Then I(Z1 , . . . , Zn ; V ) ≤ n δ2 α (e − 1)2 . 4k Applying testing inequalities: We now show how a combination the sampling scheme (48) and k d−k Lemma 5 give us our desired lower bound. Fix k ≤ d and √ let V = {−1, 1} × {0} . Combining Lemma 5 and the fact that the vectors θν provide a rδ 2t/k-separated set of log-cardinality at least max{k/6, 2}, the minimax Fano bound (19) implies that for any k ∈ {1, . . . , d} and t ≤ k/6, we have   r2 δ2 t nδ2 (eα − 1)2 /(4k) + log 2 2 Mn (θ(P), k·k2 , α) ≥ 1− . 2k2 max{k/6, 2} Because of the one-dimensional mean-estimation lower bounds provided in Section 3.2.1, we may 2 assume w.l.o.g. that k ≥ 12. Setting t = k/6 and δn,α,k = min{1, k2 /(3n(eα − 1)2 )}, we obtain   1 k , . ≥ 12k k 3n(eα − 1)2 p Setting k in the preceding display to be the integer in {1, . . . , d} nearest n(eα − 1)2 gives the lower bound ( ) 1 d Mn (θ(P), k·k22 , α) ≥ cr 2 min 1, p , , (50) n(eα − 1)2 n(eα − 1)2 Mn (θ(P), k·k22 , α) 2 r 2 δn,α,k  1 log 2 1− − 2 2  1 2 r min ≥ 80 where c > 0 is a numerical constant. We return to this bound presently. 45 D.1.1 An alternative lower bound for Corollary 4 We now provide an alternative lower bound, which relies on a denser sampling strategy than the single-coordinate construction in (48). Our proof parallels the structure leading to the bound (50), so we are somewhat more terse. In this proof, we fix the power p ∈ [1, 2] for such supp(X ) ⊂ {x ∈ Rd : kxkp ≤ r}. We also let r = 1 without loss of generality; we may scale our results arbitrarily by this factor. Constructing a well-separated set: As in the preceding derivation, fix k ∈ {1, . . . , d}, and let V = {−1, 1}k × {0}d−k be the k-dimensional hypercube appended with a zero vector. As previously, we assume without loss of generality that k ≥ 12, as otherwise Corollary 1 gives the lower bound. For a parameter δ ∈ (0, 1/2] to be chosen, we define a family of probability distributions {Pν }ν∈V constructively. The random vector X ∼ Pν (a single observation) is supported on the set X := {−1/k1/p , 1/k1/p }k × {0}d−k , so that x ∈ X satisfies kxkp = k1/p /k1/p = 1. For simplicity in notation, let us now suppose that V = {−1, 1}k and X = {−1/k1/p , 1/k1/p }, suppressing dependence on the zero vectors that we append. We draw X according to for x ∈ {−1, 1}k , Pν (X = x/k1/p ) = 1 + δν ⊤ x . 2k (51) That is, their coordinates are independent on {−1/k1/p , 1/k1/p }, with Pν (Xj = k−1/p ) = construction, these distributions have our desired support and means θν := EPν [X] = 1+δνj 2 . By δν . k1/p Fixing t ∈ R+ , the associated separation function (18) satisfies n δ2 (t) ≥ min kθν − θν ′ k22 | ν − ν ′ 1 o r2 δ2 n ≥ t ≥ 2/p min ν − ν ′ k 2 2 | ν − ν′ 1 o 2r 2 δ2 ≥ t ≥ 2/p t. k k We again have the claim (49), that is, that log |V| Nt > max{ 6 , 2}. The mean vectors {θν }ν∈V √ provide us with an δ 2t/k 1/p -separated set (in ℓ2 -norm) with log ratio of its cardinality at least max{k/6, 2}. Upper bounding the mutual information: Our next step is to bound the mutual information I(Z1 , . . . , Zn ; V ) when the observations X come from the distribution (51) and V is uniform in the set V. We have the following lemma, which applies so long as the channel Q is non-interactive and α-locally private (4). Lemma 6. Let Zi be α-locally differentially private for Xi , and let X be sampled according to the distribution (48) conditional on V = ν. Then I(Z1 , . . . , Zn ; V ) ≤ nδ2 (eα − 1)2 . See Appendix H.2 for a proof of the lemma. 46 Applying testing inequalities: We now show how a combination of the sampling scheme (51) and Lemma 6 give √ us our desired lower bound. Combining Lemma 6 and the fact that the vectors θν provide a rδ 2t/k 1/p -separated set of log-cardinality at least max{k/6, 2}, the minimax Fano bound (19) implies that for any k ∈ {1, . . . , d} and t ≤ k/6, we have   r2 δ2 t nδ2 (eα − 1)2 + log 2 2 . Mn (θ(P), k·k2 , α) ≥ 2/p 1 − max{k/6, 2} k As in the preceding argument leading to the bound (50), we assume k ≥ 12, set t = k/6 and 2 = min{1, k/(12n(eα − 1)2 )} to obtain δn,α,k Mn (θ(P), k·k22 , α) ≥ 2 r 2 δn,α,k 6k 2−p p  1 6 log 2 1− − 2 k  1 2 r min ≥ 40 ( 2 p−1 k p 2−p , α 2 k p 12n(e − 1) 1 ) . As k is arbitrary, we may take k = max{1, min{d, n(eα − 1)2 }} to obtain ) ( 2 p−1 p−2 d p 2 2 α 2 p , Mn (θ(P), k·k2 , α) ≥ cr min 1, (n(e − 1) ) , n(eα − 1)2 where c > 0 is a numerical constant. Combining this minimax lower bound with our earlier inequality (50), and using that (eα −1)2 < 2 3α for α ∈ [0, 1], we obtain the corollary. D.2 Proof of Corollary 5 Constructing a well-separated set: In this case, the packing set is very simple: set V = {±ej }dj=1 so that |V| = 2d. Fix some δ ∈ [0, 1], and for ν ∈ V, define a distribution Pν supported on X = {−r, r}d via Pν (X = x) = (1 + δν ⊤ x/r)/2d . In words, for ν = ej , the coordinates of X are independent uniform on {−r, r} except for the coordinate j, for which Xj = r with probability 1/2 + δνj and Xj = −r with probability 1/2 √ − δνj . ′ With this scheme, we √ have θ(Pν ) = rδν, which is 1-sparse, and since kδrν − δrν k2 ≥ 2δr, we have constructed a 2δr packing in ℓ2 -norm. (This construction also yields a δr-packing in ℓ∞ norm.) Upper bounding the mutual information: Let V be drawn uniformly from the packing set V = {±ej }dj=1 . With the sampling scheme in the previous paragraph, we may provide the following upper bound on the mutual information I(Z1 , . . . , Zn ; V ) for any non-interactive private distribution (4): Lemma 7. For any non-interactive α-differentially private distribution Q, we have 1 I(Z1 , . . . , Zn ; V ) ≤ n (eα − 1)2 δ2 . d See Appendix H.3 for a proof. 47 Applying testing inequalities: Finally, we turn to application of the testing inequalities. Lemma 7, in conjunction with the standard testing reduction and Fano’s inequality (19) with the choice t = 0, implies that   δ2 n(eα − 1)2 /d + log 2 r2 δ2 2 Mn (θ(P), k·k2 , α) ≥ 1− . 2 log(2d) There is no loss of generality in assuming that d ≥ 2, in which case the choice   2d log(2d) 2 δ = min 1, α (e − 1)2 n yields the lower bound. It thus remains to provide the upper bound. In this case, we use the sampling strategy (26) of √ Section 4.2.3, noting that we may take the bound B on kZk∞ to be B = c dr/α for a constant c. Let θ ∗ denote the true mean, assumed to be s-sparse. Now consider estimating θ ∗ by the ℓ1 -regularized optimization problem ( ) n 2 X 1 (Zi − θ) + λ kθk1 . θb := argmin 2n θ∈Rd 2 i=1 Defining the error vector W = θ ∗ − 1 n Pn λ ≥ 2 kW k∞ i=1 Zi , we claim that implies that √ kθb − θk2 ≤ 3λ s. (52) This result is a consequence of standard results on sparse estimation (e.g., Negahban et al. [44, Theorem 1 and Corollary 1]). P α +1 Now we note if Wi = θ ∗ − Zi , then W = n1 ni=1 Wi . Letting φα = eeα −1 , by construction of the √ sampling mechanism (26) we have kWi k∞ ≤ c drφα for a constant c. By Hoeffding’s inequality and a union bound, we thus have for some (different) universal constant c that   nt2 P(kW k∞ ≥ t) ≤ 2d exp −c 2 2 for t ≥ 0. r φα d By taking t2 = r 2 φ2α d(log(2d) + ǫ2 )/(cn), we find that kW k2∞ ≤ r 2 φ2α d(log(2d) + ǫ2 )/(cnα2 ) with 2 probability at least p 1 − exp(−ǫ ), which gives the claimed minimax upper bound by appropriate choice of λ = cφα d log d/n in inequality (52). D.3 Proof of inequality (24) We prove the bound by an argument using the private form of Fano’s inequality (19) with t = 0 and replacing X with Z. The proof makes use of the classical Varshamov-Gilbert bound ([58, Lemma 4]): Lemma 8 (Varshamov-Gilbert). There is a packing V of the d-dimensional hypercube {−1, 1}d of size |V| ≥ exp(d/8) such that ν − ν′ 1 ≥ d/2 for all distinct pairs ν, ν ′ ∈ V. 48 √ √ Now, let δ ∈ [0, 1] and the distribution Pν be a point mass at δν/ d. Then θ(Pν ) = δν/ d and kθ(Pν ) − θ(Pν ′ )k22 ≥ δ2 . In addition, a calculation implies that if M1 and M2 are d-dimensional Laplace(κ) distributions with means θ1 and θ2 , respectively, then Dkl (M1 kM2 ) = d X j=1 (exp(−κ|θ1,j − θ2,j |) + κ|θ1,j − θ2,j | − 1) ≤ κ2 kθ1 − θ2 k22 . 2 As a consequence, we have that under our Laplacian sampling scheme for Z and with V chosen uniformly from V, I(Z1 , . . . , Zn ; V ) ≤ X 1 nα2 X ′) ≤ n D (M kM ν kl ν |V|2 2d|V|2 ′ ′ ν,ν ∈V ν,ν ∈V √ (δ/ d)(ν − ν ′ ) 2 2 ≤ 2nα2 δ2 . d Now, applying Fano’s inequality (19), we find that  i h 2  2 2 b 1 , . . . , Zn ) − θ(Pν )k2 ≥ δ 1 − 2nα δ /d + log 2 . inf sup EPν kθ(Z 2 4 d/8 θb ν∈V We may assume (based on our one-dimensional results in Corollary 1) w.l.o.g. that d ≥ 10. Taking δ2 = d2 /(48nα2 ) then implies the result (24). E Proof of Theorem 3 The proof of this theorem combines the techniques we used in the proofs of Theorems 1 and 2; the first handles interactivity, while the techniques to derive the variational bounds are reminiscent of those used in Theorem 2. Our first step is to note a consequence of the independence structure in Figure 2 essential to our tensorization steps. More precisely, we claim that for any set S ∈ σ(Z), Z M±j (Zi ∈ S | z1:i−1 ) = Q(Zi ∈ S | Z1:i−1 = z1:i−1 , Xi = x)dP±j,i (x). (53) We postpone the proof of this intermediate claim to the end of this section. Now consider the summed KL-divergences. Let M±j,i (· | z1:i−1 ) denote the conditional distribution of Zi under P±j , conditional on Z1:i−1 = z1:i−1 . As in the proof of Corollary 3, the chain rule for KL-divergences [e.g., 29, Chapter 5] implies n  X n n kM−j Dkl M+j = i=1 Z Z i−1 i−1 Dkl (M+j (· | z1:i−1 )kM−j (· | z1:i−1 )) dM+j (z1:i−1 ). For notational convenience in the remainder of the proof, let us recall that the symmetrized KL sy divergence between measures M and M ′ is Dkl (M ||M ′ ) = Dkl (M kM ′ ) + Dkl (M ′ kM ). P Defining P := 2R−d ν∈V Pνn , we have 2P = P+j + P−j for each j simultaneously, We also introduce M (S) = Q(S | x1:n )dM (x1:n ), and let E±j denote the expectation taken under the 49 marginals M±j . We then have   n n n n kM+j kM−j + Dkl M−j Dkl M+j n   X E+j [Dkl (M+j,i (· | Z1:i−1 )kM−j,i (· | Z1:i−1 ))] + E−j [Dkl (M−j,i (· | Z1:i−1 )kM+j,i (· | Z1:i−1 ))] = i=1 n   X sy sy E+j [Dkl (M+j,i (· | Z1:i−1 )||M−j,i (· | Z1:i−1 ))] + E−j [Dkl (M+j,i (· | Z1:i−1 )||M−j,i (· | Z1:i−1 ))] ≤ i=1 n Z X =2 i=1 Z i−1 sy Dkl (M+j,i (· | z1:i−1 )||M−j,i (· | z1:i−1 )) dM i−1 (z1:i−1 ), where we have used the definition of M and that 2P = P+j + P−j for all j. Summing over j ∈ [d] yields d X j=1 sy Dkl n n M+j ||M−j  ≤2 n Z X i=1 Z i−1 d X sy Dkl (M+j,i (· | z1:i−1 )||M−j,i (· | z1:i−1 )) dM | {z } j=1 i−1 (z1:i−1 ). (54) =:Tj,i We bound the underlined expression in inequality (54), whose elements we denote by Tj,i . Without loss of generality (as in the proof of Theorem 2), we may assume Z is finite, and that Z = {1, 2, . . . , k} for some positive integer k. Using the probability mass functions m±j,i and omitting the index i when it is clear from context, Lemma 4 implies Tj,i = ≤ k X z=1 k X z=1 (m+j (z | z1:i−1 ) − m+j (z | z1:i−1 )) log (m+j (z | z1:i−1 ) − m+j (z | z1:i−1 ))2 m+j (z | z1:i−1 ) m−j (z | z1:i−1 ) 1 . min{m+j (z | z1:i−1 ), m−j (z | z1:i−1 )} For each fixed z1:i−1 , define the infimal measure m0 (z | z1:i−1 ) := inf q(z | Xi = x, z1:i−1 ). By x∈X construction, we have min{m+j (z | z1:i−1 ), m−j (z | z1:i−1 )} ≥ m0 (z | z1:i−1 ), and hence Tj,i ≤ k X z=1 (m+j (z | z1:i−1 ) − m+j (z | z1:i−1 ))2 m0 (z 1 . | z1:i−1 ) Recalling equality (53), we have Z q(z | x, z1:i−1 )(dP+j,i (x) − dP−j,i (x))  Z  q(z | x, z1:i−1 ) = m0 (z | z1:i−1 ) − 1 (dP+j,i (x) − dP−j,i (x)). m0 (z | z1:i−1 ) X m+j (z | z1:i−1 ) − m+j (z | z1:i−1 ) = X From this point, the proof is similar to that of Theorem 2. Define the collection of functions Fα := {f : X × Z i → [0, eα − 1]}. 50 q(z|x,z1:i−1 ) ∈ [1, eα ], so there exists f ∈ Fα such Using the definition of differential privacy, we have m 0 (z|z 1:i−1 ) that 2  Z 2 k d X d X X m0 (z | z1:i−1 ) Tj,i ≤ f (x, z, z1:i−1 )(dP+j,i (x) − dP−j,i (x)) m0 (z | z1:i−1 ) X j=1 z=1 j=1 = k X z=1 0 m (z | z1:i−1 ) d Z X X j=1 2 f (x, z, z1:i−1 )(dP+j,i (x) − dP−j,i (x)) . Taking a supremum over Fα , we find the further upper bound d X j=1 Tj,i ≤ k X z=1 m0 (z | z1:i−1 ) sup d Z X f ∈Fα j=1 X 2 f (x, z, z1:i−1 )(dP+j,i (x) − dP−j,i (x)) . The inner supremum may be taken independently of z and z1:i−1 , so we rescale by (eα − 1) to obtain our penultimate inequality d X j=1 sy Dkl (M+j,i (· | z1:i−1 )||M−j,i (· | z1:i−1 )) ≤ (eα − 1)2 k X z=1 m0 (z | z1:i−1 ) sup d Z X γ∈B∞ (X ) j=1 X 2 γ(x)(dP+j,i (x) − dP−j,i (x)) . Noting that m0 sums to a quantity less than or equal to one and substituting the preceding expression in inequality (54) completes the proof. Finally, we return to prove our intermediate marginalization claim (53). We have that Z M±j (Zi ∈ S | z1:i−1 ) = Q(Zi ∈ S | z1:i−1 , x1:n )dP±j (x1:n | z1:i−1 ) Z (i) = Q(Zi ∈ S | z1:i−1 , xi )dP±j (x1:n | z1:i−1 ) Z (ii) = Q(Zi ∈ S | Z1:i−1 = z1:i−1 , Xi = x)dP±j,i (x), where equality (i ) follows by the assumed conditional independence structure of Q (recall Figure 2) and equality (ii ) is a consequence of the independence of Xi and Z1:i−1 under P±j . That is, we have P+j (Xi ∈ S | Z1:i−1 = z1:i−1 ) = P+j,i (S) by the definition of Pνn as a product and that P±j are a mixture of the products Pνn . F Proof of logistic regression lower bound In this section, we prove the lower bounds in Corollary 6. Before proving the bounds, however, we outline our technique, which borrows from that in Section D, and which we also use to prove the lower bounds on density estimation. The outline is as follows: 51 (1) As in step (1) of Section D, our first step is a standard reduction using the sharper version of Assouad’s method (Lemma 1) from estimation to a multiple binary hypothesis testing problem. Specifically, we perform a (essentially standard) reduction of the form (27). (2) Having constructed appropriately separated binary hypothesis tests, we use apply Theorem 3 via inequality (40) to control the testing error in the binary testing problem. Applying the theorem requires bounding certain suprema related to the covariance structure of randomly selected elements of V = {−1, 1}d , as in the arguments in Section D. This is made easier by the symmetry of the binary hypothesis testing problems. With this outline in mind, we turn to the proofs of inequality (33). Our first step is to provide a lower bound of the form (27), giving a Hamming separation for the squared error. To that end, fix δ ∈ [0, 1], and let V = {−1, 1}d . Then for ν ∈ V, we set θν = δν, and define the base distribution Pν on the pair (X, Y ) as follows. Under the distribution Pν , we take X ∈ {−1, 1}d with coordinates that are independent conditional on Y , and δyxj νj exp( 21 yxj θj ) e 2 1 . = δ Pν (Y = y) = for y ∈ {−1, 1} and Pν (Xj = xj | y) = −δ 1 1 2 exp(− 2 xj θj ) + exp( 2 xj θj ) e2 + e 2 That is, Y | X = x has p.m.f. p(y | x, θ) = exp( 21 yx⊤ θ) 1 Pν (x | y) = = , 1 1 Pν (x | y) + Pν (x | −y) 1 + exp(−yx⊤ θ) exp( 2 yx⊤ θ) + exp(− 2 yx⊤ θ) ⊤ the standard logistic model. Moreover, we have that with the logistic loss ℓ(θ; x, y) = log(1+e−yθ x ), b by defining νbj = sign(θbj ) we evidently have θν = argmaxθ EPν [ℓ(θ; X, Y )]. Then for any estimator θ, for j ∈ [d], we have the Hamming separation d ∧ kθb − θν k22 ≥ δ2 d X j=1 1{b νj 6= νj } . Thus, by the sharper variant (40) of Assouad’s Lemma, we obtain   1  X d 2 2   dδ  1 n n n n . max EPν [d ∧ kθb − θν k22 ] ≥ kM−j kM+j Dkl M+j + Dkl M−j 1− ν∈V 2 4d (55) j=1 R sums of integrals γ(dP+j − dP−j ), where We now apply Theorem 3, which requires bounding 1 P P+j is defined in expression (28) (that is, P+j = 2d−1 ν:νj =1 Pν and similarly for P−j ). We claim the following inequality:  δ 2 d Z X e −1 δ2 2 (56) (γ(x, y)(dP+j (x, y) − dP−j (x, y))) ≤ 2 δ sup ≤ . e +1 2 X ,Y kγk∞ ≤1 j=1 Temporarily deferring the proof of inequality (56), let us see how it yields the bound (33) we desire in the corollary. Indeed, Theorem 3 immediately gives d X j=1   n n n n kM−j kM+j Dkl M+j + Dkl M−j ≤ n(eα − 1)2 δ2 , 52 and applying inequality (55) we find that "  1 # α − 1)2 δ 2 2 2 n(e dδ 1− . max EPν [d ∧ kθb − θν k22 ] ≥ ν∈V 2 4d Choosing δ2 = min{ n(eαd−1)2 , 1} yields inequality (33), proving the corollary. We now return to demonstrate our claim (56). Let x\j ∈ {−1, 1}d−1 be the vector x with its jth index removed, and similarly for ν\j . Then we have P+j (x | y) = 1 2d−1 ⊤ x y) exp( 21 δν\j exp( 12 δyxj νj ) \j Pν (x | y) = d−1 2 (eδ/2 + e−δ/2 )d−1 eδ/2 + e−δ/2 ν:νj =1 ν\j ∈{−1,1}d−1   1 1 δyxj νj , exp = d−1 δ/2 2 2 (e + e−δ/2 ) X X 1 where νj = 1 in this case. The result is similar for P−j , because x\j is marginally uniform on {−1, 1}d−1 even conditional on y. Thus we obtain 2d (P+j (x, y) − P−j (x, y)) = 2d (P+j (x | y) − P−j (x | y))P (y) i h 1 δ/2 −δ/2 = δ/2 . sign(yx ) e − e j e + e−δ/2 Incorporating this into the variational quantity (56), we have sup d Z X kγk∞ ≤1 j=1 X ,Y (γ(x, y)(dP+j (x, y) − dP−j (x, y)))2  δx   −δx !2 X −δxj δxj j j 1 γ(x, 1) e 2 − e 2 = sup + γ(x, −1) e 2 − e 2 2d (eδ/2 + e−δ/2 ) x kγk∞ ≤1 j=1  δx !2 d X X δxj j 2 − γ(x) e 2 − e 2 sup ≤ d δ/2 4 (e + e−δ/2 )2 kγk∞ ≤1 j=1 x  2  2 d X X 2 eδ − 1  = d sup γ(x)xj  , (57) 4 eδ + 1 kγk∞ ≤1 d d X j=1 x∈{−1,1} where the inequality is a consequence of Jensen’s inequality and symmetry. But now we can apply standard matrix inequalities to the quantity (57) because of its symmetry. d d Indeed, we may identify γ with vectors γ ∈ R2 , and let vectors wj ∈ {−1, 1}2 be indexed by x ∈ {−1, 1}d where [wj ]x = sign(xj ). Then wj⊤ wk = 0 for j 6= k, and we have  2 d d X X X  sup γ(x)xj  = γ ⊤ wj wj⊤ γ sup kγk∞ ≤1 j=1 γ∈R2d ,kγk∞ ≤1 j=1 x∈{−1,1}d ≤ sup γ∈R2d ,kγk 2≤ 53 √ d X 2d j=1 γ ⊤ wj wj⊤ γ = 2d d X j=1 = 4d , wj wj⊤ op 0.3 g1 0.03 0 g2 0 −0.03 PSfrag replacements −0.3 PSfrag replacements 0 0.5 1 0 0.5 (a) 1 (b) Figure 8. Panel (a): illustration of 1-Lipschitz continuous bump function g1 used to pack Fβ when β = 1. Panel (b): bump function g2 with |g2′′ (x)| ≤ 1 used to pack Fβ when β = 2. because the wj are orthogonal. Returning to inequality (57), we have sup d Z X kγk∞ ≤1 j=1 X ,Y 2 (γ(x, y)(dP+j (x, y) − dP−j (x, y))) ≤ 2  eδ − 1 eδ + 1 2 ≤ δ2 . 2 This is the claimed inequality (56). G Proof of Corollary 7 In this section, we provide the proof of Corollary 7 on density estimation from Section 5.2.2. We defer the proofs of more technical results to later appendices. We provide the proof of the minimax lower bound in Section G.1 and the upper bound in Section G.2. Throughout all proofs, we use c to denote a constant whose value may change from line to line. G.1 Proof of the lower bound (36) As with our proof for logistic regression, the argument follows the general outline described at the beginning of Section F. We remark that our proof is based on an explicit construction of densities identified with corners of the hypercube, a more classical approach than the global metric entropy approach of Yang and Barron [57]. We use the local packing approach since it is better suited to the privacy constraints and information contractions that we have developed. In comparison with our proofs of previous propositions, the construction of a suitable packing of Fβ is somewhat more challenging: the identification of densities with finite-dimensional vectors, which we require for our application of Theorem 3, is not immediately obvious. In all cases, we guarantee that our density functions f belong to the trigonometric Sobolev space, so we may work directly with smooth density functions f . Constructing well-separated densities: We begin by describing a standard framework for defining local packings of density functions. Let gβ : [0, 1] → R be a function satisfying the 54 following properties: (a) The function gβ is β-times differentiable with (i) (i) (i) 0 = gβ (0) = gβ (1/2) = gβ (1) for all i < β. (b) The function gβ is centered with Z 0 1/2 gβ (x)dx = − Z 1 1/2 R1 0 gβ (x)dx = 0, and there exist constants c, c1/2 > 0 such that gβ (x)dx = c1/2 and Z 0 1 2 (i) gβ (x) dx ≥ c for all i < β. (c) The function gβ is nonnegative on [0, 1/2] and non-positive on [1/2, 1], and Lebesgue measure is absolutely continuous with respect to the measures Gj , j = 1, 2, given by Z Z gβ (x)dx. (58) gβ (x)dx and G2 (A) = − G1 (A) = A∩[1/2,1] A∩[0,1/2] (β) (d) Lastly, for almost every x ∈ [0, 1], we have |gβ (x)| ≤ 1 and |gβ (x)| ≤ 1. As illustrated in Figure 8, the functions gβ are smooth “bump” functions. Fix a positive integer k (to be specified in the sequel). Our first step is to construct a family of “well-separated” densities for which we can reduce the density estimation problem to one of identifying corners of a hypercube, which allows application of Lemma 1. Specifically, we must exhibit a condition similar to the separation condition (27). For each j ∈ {1, . . . , k} define the function    io h 1 j − 1 n j , gβ,j (x) := β gβ k x − . 1 x ∈ j−1 k k k k Based on this definition, we define the family of densities  k X νj gβ,j fν := 1 + j=1 for ν ∈ V  ⊆ Fβ . (59) It is a standard fact [58, 54] that for any ν ∈ V, the function fν is β-times differentiable, satisfies |f (β) (x)| ≤ 1 for all x. Now, based on some density f ∈ Fβ , let us define the sign vector v(f ) ∈ {−1, 1}k to have entries Z (f (x) − sgβ,j (x))2 dx. vj (f ) := argmin , kj ] s∈{−1,1} [ j−1 k Then by construction of the gβ and v, we have for a numerical constant c (whose value may depend on β) that kf − fν k22 ≥ c k X j=1 1{vj (f ) 6= νj } Z [ j−1 , kj ] k (gβ,j (x))2 dx = 55 c k2β+1 k X j=1 1{vj (f ) 6= νj } . By inspection, this is the Hamming separation required in inequality (27), whence the sharper version (40) of Assouad’s Lemma 1 gives the result    X 1 k   2   c 1 n n n n Mn Fβ [1], k·k22 , α ≥ 2β 1 − (60) kM−j kM+j (Dkl M+j + Dkl M−j ) , k 4k j=1 where we have P defined P±j to be the probability distribution associated with the averaged densities f±j = 21−k ν:νj =±1 fν . Applying divergence inequalities: Now we must control the summed KL-divergences. To do so, we note that by the construction (59), symmetry implies that f+j = 1 + gβ,j and f−j = 1 − gβ,j for each j ∈ [k]. (61) We then obtain the following result, which bounds the averaged KL-divergences. Lemma 9. For any α-locally private conditional distribution Q, the summed KL-divergences are bounded as k X   (eα − 1)2 n n n n kM−j kM−j Dkl M+j + Dkl M+j ≤ 4c21/2 n 2β+1 . k j=1 The proof of this lemma is fairly involved, so we defer it to Appendix H.4. We note that, for α ≤ 1, we have (eα −1)2 ≤ 3α2 , so we may replace the bound in Lemma 9 with the quantity cnα2 /k2β+1 for a constant c. We remark that standard divergence bounds using Assouad’s lemma [58, 54] provide a bound of roughly n/k2β ; our bound is thus essentially a factor of the “dimension” k tighter. The remainder of the proof is an application of inequality (60). In particular, by applying Lemma 9, we find that for any α-locally private channel Q, there are constants c0 , c1 (whose values may depend on β) such that "  1 #   c1 nα2 2 c0 2 . Mn Fβ , k·k2 , Q ≥ 2β 1 − k k2β+2  1 Choosing kn,α,β = 4c1 nα2 2β+2 ensures that the quantity inside the parentheses is at least 1/2. Substituting for k in the preceding display proves the proposition. G.2 Proof of the upper bound (36) We begin P by fixing k ∈ N; we Rwill optimize the choice of k shortly.PRecall that, since f ∈ Fβ [r], we have f = ∞ f ϕj . Thus we may define Z j = n1 ni=1 Zi,j for each j ∈ {1, . . . , k}, j=1 θj ϕj for θj = and we have ∞ k X X (θj − Z j )2 + θj2 . kfb − f k22 = j=1 Since f ∈ Fβ [r], we are guaranteed that X j>k θj2 = X j>k j=k+1 P∞ j 2β 2β 2 j=1 j θj θj2 j 2β ≤ ≤ r2, and hence 1 X 2β 2 1 j θj ≤ 2β r 2 . k2β k 56 j>k R For the indices j ≤ k, we note that by assumption, E[Zi,j ] = ϕj f = θj , and since |Zi,j | ≤ B, we have     1 B2 B02 k eα + 1 2 2 , = E (θj − Z j ) = Var(Z1,j ) ≤ n n ck n eα − 1 where ck = Ω(1) is the constant in expression (38). Putting together the pieces, the mean-squared L2 -error is upper bounded as   2 i h 1 k 2 b + , Ef kf − f k2 ≤ c nα2 k2β where c is a constant depending on B0 , ck , and r. Choose k = (nα2 )1/(2β+2) to complete the proof. H Information bounds In this appendix, we collect the proofs of lemmas providing mutual information and KL-divergence bounds. H.1 Proof of Lemma 5 Our strategy is to apply Theorem 2 to bound the mutual information. Without loss of generality, we may assume that r = 1 so the set X = {±ej }kj=1 , where ej ∈ Rd . Thus, under the notation of 1 P Theorem 2, we may identify vectors γ ∈ L∞ (X ) by vectors γ ∈ R2k . Noting that ν = |V| ν∈V ν = 0 is the mean element of the “packing” set by our construction, the linear functional ϕν defined in Theorem 2 is    k  1 X δ δ δ ⊤ Ik×k 0k×d−k ϕν (γ) = γ(ej )νj − γ(−ej )νj = γ ν. −Ik×k 0k×d−k 2k 2 2 4k j=1 Define the matrix Then we have that 1 X |V|   Ik×k 0k×d−k A := ∈ {−1, 0, 1}2k×d . −Ik×k 0k×d−k δ2 ⊤ 1 X ⊤ ⊤ δ2 ⊤ νν A γ = γ A γ A Cov(V )A⊤ γ (4k)2 |V| (4k)2 ν∈V  2   2 δ δ Ik×k −Ik×k ⊤ ⊤ ⊤ = γ AA γ = γ γ. −Ik×k Ik×k (4k)2 4k ϕν (γ)2 = ν∈V (62) Here we have used that A Cov(V )A⊤ = AId×d A⊤ by the fact that V = {−1, 1}k × {0}d−k . We complete our proof using the bound (62). The operator norm of the matrix specified in (62) is 2. As a consequence, since we have the containment n o n o B∞ = γ ∈ R2k : kγk∞ ≤ 1 ⊂ γ ∈ R2k : kγk22 ≤ 2k , we have the inequality sup γ∈B∞ 1 X δ2 1 δ2 ϕν (γ)2 ≤ · 2 · 2k = . |V| 16k2 4 k ν∈V Applying Theorem 2 completes the proof. 57 H.2 Proof of Lemma 6 Our strategy is to apply Theorem 2 to bound the mutual information. Because the mutual information is independent of the radius of the set X , we may assume without loss of generality that X = {−1, 1}k . Thus, under the notation of Theorem 2, we may identify vectors γ ∈ L∞ (X ) by veck 1 P k tors γ ∈ R2 . Noting that ν = |V| ν∈V ν = 0 is the mean element of the packing set V = {−1, 1} by our construction, we have p(x) = 21k under the sampling (51) and the linear functional ϕν defined in Theorem 2 is ϕν (γ) = X x∈{−1,1}k γ(x)(pν (x) − p(x)) = 1 2k X x∈{−1,1}k γ(x)(1 + δν ⊤ x − 1) = δ 2k X γ(x)ν ⊤ x. x∈{−1,1}k k Define the vector uν ∈ Z2 , indexed by x ∈ {−1, 1}k , so that uν (x) = ν ⊤ x. Identifying the vector k γ ∈ R2 with γ : X → R under the same indexing, we then have ϕν (γ) = 2δk γ ⊤ uν and X ϕν (γ)2 = ν∈V δ2 ⊤ X uν u⊤ γ ν γ. 4k ν∈V k Let the matrix Hk ∈ {−1, 1}2 ×k be a binary expansion matrix defined as follows: the jth row of Hk corresponds to the k-bit binary expansion of the number 2k−1 − j + 1 (i.e. the first row to 2k−1 , the second to 2k−1 − 1, etc.) where we replace 0s with -1s in the binary expansion. Explicitly, define Hk recursively by     1 12k−1 12 ⊗ Hk−1 and H1 = , Hk = −1 −12k−1 P ⊤ ⊤ ⊤ 2 ⊤ where ⊗ denotes the Kronecker product. √ Then ν uν uν = (Hk Hk ) = Hk Hk Hk Hk , and Hk has orthogonal columns. Thus kHk kop = 2k and k(Hk Hk⊤ )2 kop = 4k . As a consequence, using the containment n o n o k k B∞ = γ ∈ R2 : kγk∞ ≤ 1 ⊂ γ ∈ R2 : kγk22 ≤ 2k , we have sup X γ∈B∞ (X ) ν∈V ϕν (γ)2 ≤ δ2 4k sup γ ⊤ (Hk Hk⊤ )2 γ ≤ 2k δ2 . kγk22 ≤2k Applying Theorem 2 to divide by 2k = card(V) yields the result. H.3 Proof of Lemma 7 It is no loss of generality to assume the radius r = 1. We use the notation of Theorem 2, recalling the linear functionals ϕν : L∞ (X ) → R. Because the set X = {−1, 1}d , we can identify vectors d γ ∈ L∞ (X ) with vectors γ ∈ R2 . Moreover, we have (by construction of the sampling scheme) that p(x) = 1/2d , and thus ϕν (γ) = X x∈{−1,1}d γ(x)(pν (x) − p(x)) = 1 X δ X ⊤ γ(x)(1 + δν x − 1) = γ(x)ν ⊤ x. 2d 2d x∈X 58 x∈X d For each ν ∈ V, we may construct a vector uν ∈ {−1, 1}2 , indexed by x ∈ {−1, 1}d , with ( 1 if ν = ±ej and sign(νj ) = sign(xj ) ⊤ uν (x) = ν x = −1 if ν = ±ej and sign(νj ) 6= sign(xj ). For ν = ej , we see that ue1 , . . . , ued are the first d columns Pof the standard Hadamard transform matrix (and u−ej are their negatives). Then we have that x∈X γ(x)ν ⊤ x = γ ⊤ uν , and ϕν (γ)2 = δ2 ⊤ γ uν u⊤ ν γ. 4d ⊤ Note also that uν u⊤ ν = u−ν u−ν , and as a consequence we have X d ϕν (γ)2 = ν∈V δ2 ⊤ X 2δ2 ⊤ X uν u⊤ uej u⊤ γ γ νγ = ej γ. d 4 4d (63) j=1 ν∈V But now, studying the quadratic form (63), we note that the vectors uej are orthogonal. As a consequence, the vectors (up to scaling) uej are the only eigenvectors corresponding to positive P eigenvalues of the positive semidefinite matrix dj=1 uej u⊤ ej . Thus, since the set o n o n d d B∞ = γ ∈ R2 : kγk∞ ≤ 1 ⊂ γ ∈ R2 : kγk22 ≤ 2d , we have via an eigenvalue calculation that sup X γ∈B∞ ν∈V ϕν (γ)2 ≤ = 2δ2 4d 2δ2 4d sup γ:kγk22 ≤2d γ⊤ d X uej u⊤ ej γ j=1 kue1 k42 = 2δ2 , since kuej k22 = 2d for each j. Applying Theorem 2 to divide by 2d completes the proof. H.4 Proof of Lemma 9 This result relies on Theorem 3, along with a careful argument to understand the extreme points of γ ∈ L∞ ([0, 1]) that we use when applying the result. First, we take the packing V = {−1, 1}β and densities fν for ν ∈ V as in the construction (59). Overall, our first step is to show for the purposes of applying Theorem 3, it is no loss of generality to identify γ ∈ L∞ ([0, 1]) with vectors γ ∈ R2k , where γ is constant on intervals of the form [i/2k, (i + 1)/2k]. With this identification complete, we can then provide a bound on the correlation of any γ ∈ B∞ with the densities f±j defined in (61), which completes the proof. With this outline in mind, let the sets Di , i ∈ {1, 2, . . . , 2k}, be defined as Di = [(i − 1)/2k, i/2k) except that D2k = [(2k − 1)/2k, 1], so the collection {Di }2k i=1 forms a partition of the unit interval [0, 1]. By construction of the densities fν , the sign of fν − 1 remains constant on each Di . Let us define (for shorthand) the linear functionals ϕj : L∞ ([0, 1]) → R for each j ∈ {1, . . . , k} via ϕj (γ) := Z γ(dP+j − dP−j ) = 2k Z X i=1 Di γ(x)(f+j (x) − f−j (x))dx = 2 59 Z γ(x)gβ,j (x)dx, D2j−1 ∪D2j where we recall the definitions (61) of the mixture densities f±j = 1 ± gβ,j . Since the set B∞ from Theorem 3 is compact, convex, and Hausdorff, the Krein-Milman theorem [48, Proposition 1.2] guarantees that it is equal to the convex hull of its extreme points; moreover, since the functionals γ 7→ ϕ2j (γ) are convex, the supremum in Theorem 3 must be attained at the extreme points of B∞ ([0, 1]). As a consequence, when applying the divergence bound k X j=1 n n kM−j Dkl M+j  + n n kM+j Dkl M−j  α 2 ≤ 2n(e − 1) sup k X γ∈B∞ j=1 ϕ2j (γ), (64) we can restrict our attention to γ ∈ B∞ for which γ(x) ∈ {−1, 1}. Now we argue that it is no loss of generality to assume that γ, when restricted to Di , is a constant (apart from a measure zero set). Fix i ∈ [2k], and assume for the sake of contradiction that there exist sets Bi , Ci ⊂ Di such that γ(Bi ) = {1} and γ(Ci ) = {−1}, while µ(Bi ) > 0 and µ(Ci ) > 0 where µ denotes Lebesgue measure.4 We will construct vectors γ1 and γ2 ∈ B∞ and a value λ ∈ (0, 1) such that Z Z Z γ(x)gβ,j (x)dx = λ γ1 (x)gβ,j (x)dx + (1 − λ) γ2 (x)gβ,j (x)dx Di Di Di simultaneously for all j ∈ [k], while on Dic = [0, 1] \ Di , we will have the equivalence γ1 |Dc ≡ γ2 |Dc ≡ γ|Dc . i i i Indeed, set γ1 (Di ) = {1} and γ2 (Di ) = {−1}, otherwise setting γ1 (x) = γ2 (x) = γ(x) for x 6∈ Di . For the unique index j ∈ [k] such that [(j − 1)/k, j/k] ⊃ Di , we define R R C gβ,j (x)dx Bi gβ,j (x)dx so 1 − λ = R i . λ := R Di gβ,j (x)dx Di gβ,j (x)dx By the construction of the function gβ , the functions gβ,j do not change signs on Di , and the absolute continuity conditions on gβ specified in equation (58) guarantee 1 > λ > 0, since µ(Bi ) > 0 and µ(Ci ) > 0. We thus find that for any j ∈ [k], Z Z Z γ(x)gβ,j (x)dx = γ1 (x)gβ,j (x)dx + γ2 (x)gβ,j (x)dx Di Bi Ci Z Z Z Z = gβ,j (x)dx − gβ,j (x)dx = λ gβ,j (x)dx − (1 − λ) gβ,j (x)dx Bi Ci Di Di Z Z = λ γ1 (x)gβ,j (x)dx + (1 − λ) γ2 (x)gβ,j (x)dx. (Notably, for j such that gβ,j is identically 0 on Di , this equality is trivial.) By linearity and the strong convexity of the function x 7→ x2 , then, we find that for sets Ej := D2j−1 ∪ D2j , !2 Z k k X X γ(x)gβ,j (x)dx ϕ2j (γ) = j=1 j=1 <λ Z k X j=1 4 Ej γ1 (x)gβ,j (x)dx Ej !2 + (1 − λ) X Z ν∈V γ2 (x)gβ,j (x)dx Ej For a function f and set A, the notation f (A) denotes the image f (A) = {f (x) | x ∈ A}. 60 !2 . Thus one of the densities γ1 or γ2 must have a larger objective value than γ. This is our desired contradiction, which shows that (up to measure zero sets) any γ attaining the supremum in the information bound (64) must be constant on each of the Di . Having shown that γ is constant on each of the intervals Di , we conclude that the supremum (64) can be reduced to a finite-dimensional problem over the subset n o B1,2k := u ∈ R2k | kuk∞ ≤ 1 of R2k . In terms of this subset, the supremum (64) can be rewritten as the upper bound sup k X γ∈B∞ j=1 2 ϕj (γ) ≤ sup k  X γ∈B1,2k j=1 γ2j−1 Z gβ,j (x)dx + γ2j Z gβ,j (x)dx D2 j D2j−1 2 . By construction of the function gβ , we have the equality Z D2j−1 gβ,j (x)dx = − Z gβ,j (x)dx = D2j Z 1 2k gβ,1 (x)dx = 0 Z 1 2k 0 c1/2 1 gβ (kx)dx = β+1 . β k k This implies that k k X X   1 n n n n M kM M kM ϕj (γ)2 ≤ sup + D D kl kl +j −j +j −j 2eα (eα − 1)2 n γ∈B∞ j=1 ≤ sup k  X γ∈B1,2k j=1 j=1 2 c1/2 ⊤ γ (e − e ) = 2j−1 2j kβ+1 c21/2 k2β+2 sup γ ⊤ γ∈B1,2k k X j=1 (e2j−1 − e2j )(e2j−1 − e2j )⊤ γ, (65) where ej ∈ R2k denotes the jth standard basis vector. Rewriting this using the Kronecker product ⊗, we have   k X 1 −1 ⊤ (e2j−1 − e2j )(e2j−1 − e2j ) = Ik×k ⊗  2I2k×2k . −1 1 j=1 Combining this bound with our inequality (65), we obtain k X j=1 I n n kM−j Dkl M+j  + n n kM−j Dkl M+j  α 2 ≤ 4n(e − 1) c21/2 k2β+2 sup kγk22 = 4c21/2 γ∈B1,2k n(eα − 1)2 . k2β+1 Technical arguments In this appendix, we collect proofs of technical lemmas and results needed for completeness. I.1 Proof of Lemma 1 b By assumption (27), we have Fix an (arbitrary) estimator θ. Φ(ρ(θ, θ(Pν ))) ≥ 2δ d X j=1 61 1{[v(θ)]j 6= νj } . Taking expectations, we see that h i h i b 1 , . . . , Zn ), θν )) b 1 , . . . , Zn ), θ(P ))) ≥ max EP Φ(ρ(θ(Z sup EP Φ(ρ(θ(Z ν ν∈V P ∈P ≥ ≥ h i 1 X b 1 , . . . , Zn ), θν )) EPν Φ(ρ(θ(Z |V| ν∈V d oi h n 1 X X b j 6= νj , EPν 1 [ψ(θ)] 2δ |V| ν∈V j=1 as the average is smaller than the maximum of a set and using the separation assumption (27). Recalling the definition (28) of the mixtures P±j , we swap the summation orders to see that      X 1 X 1 X  b b j 6= νj + 1 b j 6= νj Pν [v(θ)]j 6= νj = Pν [v(θ)] Pν [v(θ)] |V| |V| ν:ν =1 |V| ν:ν =−1 ν∈V j j  1    1 b j 6= νj + P−j [v(θ)] b j 6= νj . = P+j [v(θ)] 2 2 This gives the statement claimed in the lemma, while taking an infimum over all testing procedures ψ : Z n → {−1, +1} gives the claim (29). Proof of unbiasedness for sampling strategy (25) I.2 We compute the expectation of a random variable Z sampled according to the strategy (25); i.e., we compute E[Z | v] for a vector v ∈ Rd . By scaling, it is no loss of generality to assume that kvk2 = 1, and using the rotational symmetry of the ℓ2 -ball, we see it is no loss of generality to assume that v = e1 , the first standard basis vector. Let the function sd denote the surface area of the sphere in Rd , so that sd (r) = dπ d/2 r d−1 Γ(d/2 + 1) is the surface area of the sphere of radius r. (We use sd as a shorthand for sd (1) when convenient.) Then for a random variable W sampled uniformly from the half of the ℓ2 -ball with first coordinate W1 ≥ 0, symmetry implies that by integrating over the radii of the ball, Z p  2 1 sd−1 E[W ] = e1 1 − r 2 rdr. sd 0 Making the change of variables to spherical coordinates (we use φ as the angle), we have 2 sd Z 1 sd−1 0 Noting that p d dφ 1− r2  2 rdr = sd Z π/2 0 2sd−1 sd−1 (cos φ) sin φ dφ = sd Z π/2 0 cosd−1 (φ) = −(d − 1) cosd−2 (φ) sin(φ), we obtain Z 0 π/2 cos d−2 cosd−1 (φ) (φ) sin(φ) dφ = − d−1 62 π/2 = 0 1 . d−1 cosd−2 (φ) sin(φ) dφ. Thus E[W ] = 2e1 (d − 1)π d−1 2 Γ( d2 + 1) d dπ 2 Γ( d−1 2 + 1) 2Γ( d2 + 1) 1 , = e1 √ d−1 + 1) πdΓ( d−1 | {z2 } (66) =:cd where we define the constant cd to be the final ratio. Allowing again kvk2 ≤ r, with the expression (66), we see that for our sampling strategy for Z, we have  α  B e 1 B eα − 1 E[Z | v] = v cd − . = cd α α α r e +1 e +1 r e +1 Consequently, the choice √ eα + 1 r eα + 1 r πdΓ( d−1 2 + 1) B= α = α d e − 1 cd e −1 2Γ( 2 + 1) yields E[Z | v] = v. Moreover, we have √ √ eα + 1 3 π d kZk2 = B ≤ r α e −1 4 by Stirling’s approximation to the Γ-function. By noting that (eα + 1)/(eα − 1) ≤ 3/α for α ≤ 1, √ we see that kZk2 ≤ 4r d/α. I.3 Proof of unbiasedness for sampling strategy (26) We compute conditional expectations for each of the uniform quantities in the sampling scheme (26). This argument is based on Corollary 3.7 of Duchi et al. [17], but we present it here for clarity and completeness. In each summation to follow, we implicitly assume that z ∈ {−1, 1}d and that x ∈ {−1, 1}d , as the general result follows by scaling of these quantities. We consider first the case that d is odd. In this case, we have by symmetry that X X X X z= z+ z + ··· + z z:hz,xi≥0 z:hz,xi=1 =   d−1 d−1 2 z:hz,xi=3 −   d−1 d+1 2 z:hz,xi=d x+   d−1 d+1 2 −   d−1 d+3 2     d−1 d−1 x + ··· + x = d−1 x, d−1 2 and as |{z ∈ {−1, 1}d | hz, xi > 0}| = 2d−1 , we obtain that for Z ∼ Uniform({−1, 1}d ) we have     1 d−1 d−1 1 E[Z | hZ, xi ≥ 0] = d−1 d−1 x and E[Z | hZ, xi ≤ 0] = − d−1 d−1 x. 2 2 2 2 Similarly, for d even, we find that X X X z= z+ z + ··· + z:hz,xi≥0 z:hz,xi=2 =   d−1 d 2 z:hz,xi=4 −  d−1 d 2 +1  x+ X z:hz,xi=d  z        d−1 d−1 d−1 d−1 − d x + ··· + x. x= d d d−1 2 +1 2 +2 2 63 d  (because we must Noting that the set {z ∈ {−1, 1}d | hz, xi ≥ 0} has cardinality 2d−1 + 12 d/2 consider vectors z such that hz, xi = 0), we find that for d even we have     d−1 d−1 1 1 ⊤ ⊤ E[Z | Z x ≥ 0] = x and E[Z | Z x ≤ 0] = − x. d d d  d  2d−1 + 21 d/2 2d−1 + 12 d/2 2 2 Inverting the constant multipliers on the vectors x in the preceding equations shows that the strategy (26) is unbiased. 64
10math.ST
Active network management for electrical distribution systems: problem formulation, benchmark, and approximate solution Quentin Gemine* , Damien Ernst* , and Bertrand Cornélusse* arXiv:1405.2806v6 [cs.SY] 1 Jun 2016 * {[email protected], [email protected], [email protected]}, Department of Electrical Engineering and Computer Science, University of Liège, 4000 Liège, Belgium May 31, 2016 Abstract With the increasing share of renewable and distributed generation in electrical distribution systems, Active Network Management (ANM) becomes a valuable option for a distribution system operator to operate his system in a secure and costeffective way without relying solely on network reinforcement. ANM strategies are short-term policies that control the power injected by generators and/or taken off by loads in order to avoid congestion or voltage issues. While simple ANM strategies consist in curtailing temporary excess generation, more advanced strategies rather attempt to move the consumption of loads to anticipated periods of high renewable generation. However, such advanced strategies imply that the system operator has to solve large-scale optimal sequential decision-making problems under uncertainty. The problems are sequential for several reasons. For example, decisions taken at a given moment constrain the future decisions that can be taken, and decisions should be communicated to the actors of the system sufficiently in advance to grant them enough time for implementation. Uncertainty must be explicitly accounted for because neither demand nor generation can be accurately forecasted. We first formulate the ANM problem, which in addition to be sequential and uncertain, has a nonlinear nature stemming from the power flow equations and a discrete nature arising from the activation of power modulation signals. This ANM problem is then cast as a stochastic mixed-integer nonlinear program, as well as second-order cone and linear counterparts, for which we provide quantitative results using state of the art solvers and perform a sensitivity analysis over the size of the system, the amount of available flexibility, and the number of scenarios considered in the deterministic equivalent of the stochastic program. To foster further research on this problem, we make available at http://www.montefiore.ulg.ac.be/~anm/ three test beds based on distribution networks of 5, 33, and 77 buses. These test beds contain a simulator of the distribution system, with stochastic models for the generation and consumption devices, and callbacks to implement and test various ANM strategies. 1 Index terms— Active network management, electrical distribution network, flexibility services, renewable energy, optimal sequential decision-making under uncertainty, large system, Mixed Integer Non-linear Program. 1 Notation We present here the main elements of notation used throughout the text. Some locally defined notation may not be covered in this section. Indices: d m or n mn t Sets: D G C F T N L (i) St S As Ad,s W Device connected to a node. Node of the electrical system. Link of the electrical system between nodes m and n. Time period. Set of electrical devices. Subset of D containing distributed generators. Subset of D that are electrical loads. Subset of C that can be controlled by the DSO. Set of time periods. Set of nodes of the electrical system. Set of links of the electrical system. (i) Space of state vector st (see the variables below for i ∈ {1, 2, 3}). Global state space of the system. Feasible action (or control) space in state s ∈ S. Feasible set of actd,t (see variables). Set of possible realizations of random processes. Parameters: (br) Ymn Branch admittance of link (m, n). (sh) Ymn Shunt admittance of link (m, n) on the side of node m. tmn Transformation ratio of link (m, n) on the side of node m. Y Nodal admittance matrix. Yn· nth row of Y . Ymn Element (m, n) of Y . Vn and Vn Lower and upper operational limits on voltage magnitude |Vn |. I mn Operational limit on current magnitude |Imn |. tan φd Reactive to active power ratio of device d (assumed constant for all devices). Td Duration of a modulation signal sent to a flexible load. 2 ∆Pd Nloads Nir Nv qt Vector of length Td representing the modulation signal sent to a flexible load. Length of the history of load consumption tracked in the state. Length of the history of solar irradiance tracked in the state. Length of the history of wind speed tracked in the state. Index of a quarter of an hour. Variables: Note that some variables may have an additional subscript t. Also some variables are control variables, some represent the state of the system, and the remaining variables are exogenous stochastic processes. V Vector of size |N |, node voltages. Vn Complex voltage at node n, i.e. nth component of V . I Vector of size |N |, current injected in the nodes. Ii If i = l, it is the complex current in link l, if i = n, it is the complex current injected in bus n, i.e. nth component of I. Si Apparent power injected in bus. If i = d, it is the power injected by device d. If i = n, it is the total power injected by all devices connected at node n. Pi Active power injected in bus. If i = d, it is the power injected by device d. If i = n, it is the total power injected by all devices connected at node n. Qi Reactive power injected in bus. If i = d, it is the power injected by one device. If i = n, it is the total power injected by all devices connected at node n. Smn Apparent power entering branch l = (m, n) from the m side. Pmn Active power entering branch l = (m, n) from the m side. Qmn Reactive power entering branch l = (m, n) from the m side. irt Solar irradiance level at time t. vt Wind speed at time t. (1) st Vector representing the state of the devices at time t. (2) st Vector representing the state of the modulation instructions sent to controllable devices, at time t. f lext Vector representing the state of the flexible loads at time t, (2) it is a part of st . (3) st Part of the state of the system that, at time t, keeps track of past realizations of the uncertain phenomena. st Global state of the system at time t. at Vector of control actions taken at time t. pt Maximum level of active power injection for period t + 1 and for each of the generators g ∈ G, part of at . actt Activation indicators of the flexibility services of the loads d ∈ F, part of at . 3 actd,t wt Component of actt for flexible load d ∈ F. Information on exogenous phenomena available at time t. Operators and functions: | · | Magnitude of a complex number or size of a set. ·∗ Complex conjugate. f : S × As × W → S Transition function of the system. r : S × As × S → R Reward function. π : S → As Policy that returns an action for every feasible state. G(n) Set of generators connected to node n. C(n) Set of loads connected to node n. F(n) Set of flexible loads connected to node n. 2 Introduction In Europe, the 20/20/20 objectives of the European Commission and the consequent financial incentives established by local governments are currently driving the growth of electricity generation from renewable energy sources [1]. A substantial part of the investments is made at the distribution networks (DN) level and consists of the installation of wind turbines or photovoltaic panels. The significant increase of the number of these distributed generators (DGs) undermines the fit and forget 1 doctrine, which has dominated the planning and the operation of DNs up to now. This doctrine was developed when the energy was coming from the transmission network (TN) to the consumers, through the distribution network (DN). With this approach, adequate investments in network components (i.e., lines, cables, transformers, etc.) are made to avoid congestion and voltage issues, without requiring continuous monitoring and control of the power flows or voltages. To that end, network planning is done with respect to a set of critical scenarios gathering information about production and demand levels, in order to always ensure sufficient operational margins. Nevertheless, with the rapid growth of DGs, the preservation of such conservative margins implies significant network reinforcement costs2 , because the net energy flow may be reversed, from the distribution network to the transmission network, and flows within the distribution network be very different from the flows historically observed. In order to host a larger share of distributed generation [2] and avoid potentially prohibitive reinforcement costs [3], active network management (ANM) strategies have recently been proposed as alternatives to the fit and forget approach. The principle of ANM is to address congestion and voltage issues via short-term decision-making policies [4]. Frequently, ANM schemes maintain the system within operational limits in quasi real-time by relying on the curtailment of wind or solar generation [5, 6, 7]. Curtailment 1 Under this approach, adequate investments in network components (i.e., lines, cables, transformers, etc.) must be made in order to always avoid congestion and voltage problems. 2 Network reinforcement is the process of upgrading the transmission capacity of lines, cables, transformers, and other devices. As distribution systems of interest in this paper are mostly done of underground cables, upgrading them implies a lot of infrastructure work. 4 of renewable energy may, however, be very controversial from an environmental point of view and should probably be considered as a last resort. In that mindset, it is worth investigating ANM schemes that could also exploit the flexibility of the loads, so as to decrease the reliance on generation curtailment. Exploiting flexible loads within an ANM scheme comes with several challenges. One such challenge is that modulating a flexible load at one instant is often going to influence its modulation range at subsequent instants. This is because flexible loads (e.g. heat pumps) are often constrained to consume a specific amount of energy over a certain duration. In this context, it is therefore important for a distribution system operator (DSO) to take decisions by planning operations over a sufficiently long time horizon [8, 9, 10]. The uncertainty of future power injections from DGs relying on natural energy sources (wind, sun, etc.), as well as the uncertainty of the power consumption of the loads, should also be explicitly accounted for in the ANM strategy. In this work we consider the operation of the medium-voltage (MV) network of the DSO, i.e. low voltage subnetworks are aggregated, since in general current DSOs’ dispatching centers only monitor the MV part, and ANM in low voltage distribution systems is generally performed using distributed algorithms [11]. Many authors have already attempted to provide solutions to these operational planning problems. Since they rely on different formulations, it is difficult for one author to rebuild on top of another’s work. However, these formulations can be considered as an extension of the optimal power flow (OPF) problem [12]. More specifically, they can be assimilated to sequential decision-making problems where, at each time step, constraints that are similar to those used for defining an OPF problem are met. Optimal power flow problems, although non-convex, have been solved for a long time using local nonlinear optimization methods. Interior-point methods are probably the most widespread class of methods dedicated to this problem [13]. If the solution they provide has no guarantee to be globally optimal, then they have been made popular by their convergence speed and their ability to solve problems of large dimensions fairly efficiently. Convexifications of the power flow equations have been successful, in particular in [14] where the author models power flows in a radial distribution system using second-order cone constraints. Recently, semidefinite programming (SDP) was applied as a convex relaxation to the OPF problem [15]. The authors report no duality gap on some standard meshed test systems and randomized versions of these test systems. The zero duality gap property was thus observed experimentally on standard test systems, and further research resulted in sufficient conditions. This is the case, for example, if the objective function is convex and monotonically increasing with the active power generation, and if the network has a radial topology [16, 17]. Another approach aiming at global optimality relies on Lagrangian relaxation (LR) [18]. The author also describes a spatial branch and bound (B&B) algorithm to close the gap, should one exist. The ability of both SDP and LR to decrease the optimality gap within a B&B framework was evaluated in [19]. Although SDP appeared to be computationally more attractive, it showed that it could be very challenging to reach a significant gap reduction within reasonable time limits, even for small test systems. A different approach is considered in [20], where the authors present a linear approximation of the power flow equations with a focus on distribution networks. 5 Multi-period applications related to energy storage are investigated in [21], where the SDP relaxation of [15] is successfully applied, as their particular application met the conditions of having no duality gap. The authors of [22] argue that extending [19] to a multi-period setting yields an SDP too large for current solvers to solve efficiently and suggest relaxing the time-coupling constraints using LR. However, it ended up being computationally too expensive to make the B&B approach worthwhile. Many papers consider the unit commitment problem over an AC network, which is an instance of a multi-period OPF with discrete variables. For instance in [23], a generalized Benders decomposition divides the problem into a linear master problem with discrete variables and nonlinear multi-period sub-problems. Benders cuts are generated from the sub-problems to tighten the MIP master problem. Finally, [24] focused on trying to solve a problem that is mathematically close to the one we consider and provides more information on related research. A first objective of this work is to facilitate the comparison of solution techniques that have been developed in the research community. To that end, we first propose a generic formulation of ANM related decision-making problems. More specifically, we detail a procedure to state these problems as Markov Decision Processes (MDP), where the system dynamics describes the evolution of the electrical network and devices, while the action space encompasses the control actions that are available to the DSO. Afterwards, we instantiate this procedure on networks of 5, 33, and 77 buses, and use the elements of the resulting MDPs to build a simulator of these systems, which is available at http://www.montefiore.ulg.ac.be/~anm/. As a second contribution, we provide quantitative results for the resolution of the ANM problem cast as a stochastic mixed-integer nonlinear program (MINLP), as well as a mixed-integer second-order cone programming (MISOCP) relaxation and a mixed-integer linear programming (MILP) approximation, using state of the art open source and commercial solvers. We then perform a sensitivity analysis over the size of the distribution system, the amount of flexibility available in the system, and the number of scenarios considered in the deterministic equivalent of the stochastic program. Finally, a last contribution lies in the features modeled in this work. Compared to the work of [9] and [10], we explicitly account for uncertainty, and for discrete variables stemming from the activation of flexibility services. Compared to our work, [9] relies only on a continuous nonlinear programming formulation, and thus does not analyze linear or second order cone programming formulations, but models a storage system, and [10] also models discrete decisions variables, but they are related to capacitor banks switching and storage system operation modes. The latter reference also uses MISOCP and MILP formulations. The rest of this paper is structured as follows. The ANM problem of a DN is described in Section 3, where the electrical model and the network operation details are explained, and the operational planning problem is formulated as a Markov decision process. This formulation is then cast as a stochastic mixed-integer nonlinear program in Section 4, where a second order cone relaxation and a linear approximation are also detailed. The test beds built around the different distribution systems are described in Section 5, and test results are presented in Section 6. Section 7 concludes and presents 6 Vm 1:tmn Imn tnm :1 Vn (br) Ymn (sh) Ynm (sh) Ymn Figure 1: π-model of a link. possible extensions of this work. 3 3.1 Problem Description Model of the electrical distribution system In this paper, we are always considering that the network and all its devices are operating in alternating current mode. We also make the choice to represent complex numbers in rectangular coordinates. The electrical distribution system can be mathematically represented by a graph, that is a set of nodes, and a set of links connecting nodes. A node is an electrical bus characterized by a voltage Vn ∈ C. In addition to links connecting a bus to its neighbors, several devices may be connected to a bus. Devices are either injecting or withdrawing power. Every link (m, n) ∈ L ⊂ N 2 connects a pair of nodes m, n ∈ N and represents an overhead line, an underground cable, or a transformer. A link is represented by its π-model, composed of five complex parameters: two ratios tmn and tnm , a branch (br) (sh) (sh) admittance Ymn , and two shunt admittances Ymn and Ynm (see Fig. 1), that are considered fixed in this work, although opportunities to change them dynamically can exist in practice. More details on the π-model of specific links can be found in [25]. To ensure the proper operation of the devices connected to a bus, the voltage magnitude |Vn | at note n should not deviate too much from its nominal voltage level: ∀n ∈ N : V n ≤ |Vn | ≤ V n . (1) If Imn ∈ C is the branch current through link (m, n), its magnitude |Imn | should be kept below a pre-specified limit to prevent excessive heating of conductors and insulating materials: ∀(m, n) ∈ L : |Imn | ≤ I mn . (2) In reality, there are several limits depending on the magnitude and duration of the overcurrent. In this work we consider only the most conservative limit, since we want to keep a sufficient margin as we are taking decisions ahead of time with a relatively high uncertainty. The magnitude of the current Il in link l connecting nodes m and n can be deduced from the voltage at these nodes by   ∗ (l) (br) |Imn | = |tmn |2 Vm − (t(l) ) t V (3) mn nm n Ymn , 7 where ·∗ denotes the complex conjugate operator. Before defining the power injections as a function of voltages, it is convenient to relate the current injected at nodes to the voltage by writing: I =YV , (4) where I = (I1 , . . . , I|N | ) is the vector of the current injection at nodes, V = (V1 , . . . , V|N | ) is the vector of the voltage at nodes, and Y is the |N | × |N | nodal admittance matrix, which has its elements defined by  (l) ∗ (l) (br) if m 6= n and ∃(m, n) ∈ L ,  mn ) tnm Ymn −(t P (sh) (br) 2 Ymn = (5) (m,k)∈L |tmk | (Ymn + Ymn ) if m = n ,   0 otherwise . Regarding the active power Pn and reactive power Qn injected at every node n, they are related to the node voltages through the power flow equations [26]: ∀n ∈ N : Sn = Pn + jQn = Vn In∗ = Vn Yn·∗ V ∗ , (6) where Sn is the apparent power injection at bus n and Yn· denotes the nth row of the nodal admittance matrix. By convention a power injection is positive if it supplies the network and negative if it takes energy from the network. In summary, there are four quantities attached to each node n ∈ N that determine the electrical state of the system: Pn , Qn , and real and imaginary parts of Vn . The power flow equations (6) provide 2|N | relations. 2|N | variables should thus be fixed to obtain a solution to this system of equations. In general, Vn is fixed on one side of the transformer between the MV network and the transmission system, to provide a reference voltage. At other nodes, the active power injection Pn is known, as well as either the reactive power Qn or the voltage magnitude |Vn |, depending on the type of device connected at the node. In this work we consider that we have some control over the power flows in the system, hence we consider that less than 2|N | variables are fixed and that we can act on Pn and Qn at some nodes. The system is actually controlled by acting on the electrical devices attached to these nodes. Electrical devices can be classified into two distinct subsets, the set C ⊂ D of loads that withdraw power from the network, and the set G ⊂ D of generators that inject power into the network. Within each subset, we also distinguish two types of device models. The first ones represent individual injection and withdrawal points. They can model certain types of DGs or consumers that are directly connected to the MV grid (e.g., wind farms, some companies and factories, etc.). The others model an aggregate set of devices that are assimilated to a single connection point at the MV grid (e.g., residential consumers and solar panels). Correspondences between some physical elements and their device model are illustrated in Fig. 2. At node 3, a set of residential loads and a set of distributed solar units have been aggregated into a single load model and a single generator model. 8 Transmission network (HV) Transmission network (HV) HV/MV transformer HV/MV transformer Node 1 Node 1 Node 2 Modeling of electrical devices Node 3 Node 2 Node 3 Distributed generator Node 4 Node 4 Node 5 Node 5 MV/LV transformer Aggregate of loads Aggregate of DG Load Figure 2: System model An active power injection value Pd and a reactive power injection value Qd are associated with every device d ∈ D, and, denoting the set of devices connected at node n by D(n) ⊂ D: X ∀n ∈ N : Sn = Pn + jQn = (Pd + jQd ) . (7) d∈D(n) Every device d has a restricted set Od ⊂ R2 of valid (Pd ,Qd ) injection points. We assume that the loads are operating at a constant power factor, i.e. the ratio between reactive and active powers - denoted as tan φd - remains unchanged: ∀d ∈ C : Od = {(Pd , Qd ) ∈ R2 | Qd = tan φd } . Pd (8) For distributed generators, the injections points have to stay within a polyhedron, as illustrated in Fig. 3. This set is defined by lower and upper bounds on both Pd and Qd , as well as by two linear constraints that prevent a full flexibility on Qg when Pg is close to its maximum. These constraints model the limitations of the power converter and/or of the electric generator [27]. We have: ∀g ∈ G : Og = {(Pd , Qd ) ∈ R2 | Pmin,g ≤ Pg ≤ Pmax,g , Qmin,g ≤ Qg ≤ Qmax,g , Qg ≤ αg+ Pg + βg+ , Qg ≤ αg− Pg + βg− } . 9 (9) Qg ≤ αg+ Pg + βg+ Qg Pmax,g Qmax,g Pg Qmin,g Qg ≤ αg− Pg + βg− Figure 3: Illustration of a polyhedral set Od defining the P-Q capability area of a distributed generator g ∈ G. 3.2 Operational planning problem statement Considering the model of the electrical distribution network presented in Section 3.1, operational planning is a recurring task performed by the DSO to anticipate the evolution of the system, that is the impact of the evolution of the injection and the consumption patterns on the operational limits of the system, and take preventive decisions to stay within these limits. Among the available decisions in the considered timing of operations, we consider that acting on the power injected or consumed by a predefined set of devices is the only type of control the DSO has, as detailed in Section 3.1. We describe the evolution of the system by a discrete-time process having a time horizon T , the number of periods used for the operational planning phase. The period duration is 15 minutes, by analogy with the typical duration of a market period. The power injection and withdrawal levels are constant within a single period, and we neglect the fast dynamics of the system, which may be handled by real time controllers [28]. The control actions in this section are aimed to directly impact these power levels and can introduce timecoupling effects, depending on the type of device. We now describe two control means of the system, the modulation of the generation and the modulation of the demand, as well as one of the possible interaction schemes between the actors of this system. For each device belonging to the set G ⊂ D of DGs, the DSO can impose a curtailment instruction, i.e. an upper limit on the generation level of the DG (cf. Fig. 4). This request can be performed until the time period immediately preceding the one concerned by the curtailment and it is acquired in exchange for a fee. This fee is used to compensate the producer for financial loss related to the energy that could not be produced during modulation periods. We assume that this fee is defined as a per unit compensation for the energy not produced, with respect to the actual potential that is known after the market period. 10 Figure 4: Curtailment of a distributed generator. We also consider that the DSO can modify the consumption of some flexible loads, a subset F of full set of the loads C ⊂ D of the network. An activation fee is associated with this control mean and flexible loads can be notified of activation until the time immediately preceding the start of the service. Once the activation is performed at time t0 , the consumption of the flexible load d is modified by a certain value during Td periods. For each of these modulation periods t ∈ {t0 + 1, ..., t0 + Td }, this value is defined by the modulation function ∆Pd (t − t0 ). An example of modulation function and its influence over the consumption curve are presented in Fig. 5. Loads cannot be modulated in an arbitrary way. There are constraints to be imposed on the modulation signal, which are inherited from the flexibility sources of the loads, such as an inner storage capacity (e.g. electric heater, refrigerator, water pump) or a process that can be scheduled with some flexibility (e.g., industrial production line, dishwasher, washing machine). In any case, we will always consider that the modulation signal ∆Pd has to satisfy the following conditions: • A downward modulation is followed by an increase of the consumption, and conversely. • The integral of the modulation signal is null in order to ensure that the consumption is only shifted, not modified. Other approaches that we do not consider in this work exist to control the system, such as modulating the tariff signal(s), acting on the topology of the network, or using distributed storage sources. We do not model either the automatic regulation devices that often exist in distribution systems, such as On Load Tap Changers of transformers which automatically adapt to control the voltage level. This should be the case, obviously, in a real life application. We will discuss in the conclusion what are the implications of these non-modeled control possibilities. 11 (a) Modulation signal of the consumption (Td = 9). (b) Impact of the modulation signal over the consumption. Figure 5: Illustration of flexibility services. 3.3 Optimal sequential decision-making formulation We now formulate operational planning as an optimal sequential decision-making problem, that is, we explain how the time, the decision process, and uncertainty are included to extend the mathematical model described in Section 3.1. The sequential aspect is induced by the modulation service that is provided by flexible loads. Indeed, if such a service is activated at time t0 for a flexible load d, the action will influence the system for the set of periods {t0 + 1, ..., t0 + Td }. In addition to being a sequential problem, it is also stochastic, because the evolution of the system and the outcome of control actions are affected by several uncertain factors. These factors include, but are not limited to, the wind speed, the level of solar irradiance, and the consumption level of the loads. In this section, we model this problem as a Markov decision process with mixed-integer sets of states and actions. We thus consider that the transition probabilities of the state of the system from a period t to a period t + 1 only depend on the state at time t. 12 However, this state can encompass several past values of wind speed, solar irradiance, consumption levels, and any auxiliary modeling variables, in order to obtain a relevant model. An automatic procedure that determines an adequate number of past values to track in the state is presented in Section 5. Note that modeling the actual system as a Markovian system is not restrictive as all properly modeled systems are Markovian if the state variables capture all the information to model the system from time t and onwards [29]. Finally, the notion of optimality is defined using a reward function that associates an immediate reward (or score) to every transition of the system. The better the cumulated reward over a system trajectory, the better the sequence of control actions for this trajectory. 3.3.1 System state The global state space S of the system is decomposed in three subsets: S = S (1) × S (2) × S (3) . The power injections of the devices are sufficient to obtain the value of the electrical quantities through equations (6) and (7). These injections are determined from the realization of the exogenous consumption and generation processes at a given time period, and from the modulation instructions for that period. If the consumption processes require the representation of the individual consumption of every load, it is possible to obtain the production of DGs given the power level of their energy source (i.e. the wind speed or the level of solar irradiance). We thus define a first state set S (1) such that the (1) vectors st ∈ S (1) are defined by (1) st = (P1,t , . . . , P|C|,t , irt , vt ) , where, at time t ∈ T , the irt and vt components represent the level of solar irradiance and the wind speed, respectively. If, for the sake of simplicity, we consider only solar and wind generation, other types of generators could easily be integrated by increasing the dimension of S (1) . Note that the reactive power withdrawals of loads are known from (1) st through equation (8). (2) The vector st ∈ S (2) , defined as (2) st = (P 1,t , Q̂1,t , . . . , P |G|,t , Q̂|G|,t , f lex1,t , . . . , f lex|F |,t ), contains the upper limits P g,t on the active power injection and the reactive set-points Q̂g,t of the DGs g ∈ G, as authorized by the DSO, and the indicators f lexd,t of the flexibility service state of the loads d ∈ F: ( number of active periods left if service is active f lexd,t = 0 if service is inactive . (3) We denote by st ∈ S (3) the part of the system’s state that, at time t ∈ T , keeps track of past realizations of the uncertain phenomena (i.e. wind speed, solar irradiance, and 13 consumption levels) and contains the optional auxiliary modeling variables. Its purpose is to improve the accuracy of the stochastic modeling and to allow the representation of processes that are required for some reward functions (see Section 3.3.4). The number of past values can be different for each phenomenon and, we have (3) st = (P1,t−1 , . . . , P1,t−Nloads +1 , . . . , P|C|,t−1 , . . . , P|C|,t−Nloads +1 , irt−1 , . . . , irt−Nir +1 , vt−1 , . . . , vt−Nv +1 , (aux) (aux) s1,t , . . . , sNaux ,t ) + where Nloads , Nir , Nv ∈ Z+ 0 , and Naux ∈ Z . The value of these parameters has to be determined when instantiating the presented abstract decision model (see Section 5). A value of 1 for the three former parameters means that the history of the corresponding phenomenon consists of s(1) only, while a value of 0 for the latter parameter means that there is no auxiliary variable. We denote thereafter the vector of the Naux auxiliary (aux) modeling variables by st . 3.3.2 Control actions The control means that are available to the DSO to control the system are modeled by the set As of control actions. This set depends on the state st of the system because it is not possible to activate the flexibility service of a load if it is already active. The components of vectors at ∈ As are defined by at = (pt , q̂t , actt ) , with pt , q̂t ∈ R|G| such that, for period t + 1 and for each of the generators g ∈ G, pg,t and q̂g,t indicate the maximum level of active power injection and the desired reactive set-point, respectively. On the other hand, the vector actt represents the activation indicators of the flexibility services of the loads d ∈ F, where each component actd,t belongs to Ad,s , which is defined as ( {0, 1} if f lexd,t = 0 Ad,s = (10) {0} if f lexd,t > 0 , to ensure that a load which is already active is not activated. By using this representation of the control actions, we consider that a curtailment or flexibility activation action targeting a period t must always be performed at the period t − 1, as described in Section 3. We do not consider the possibility to notify control actions several periods ahead, because it would induce even larger time-coupling effects, while not improving the extent of control of the DSO since in the interaction model considered in this paper the cost associated with an action is independent of the notification delay. 14 3.3.3 Transition function The system evolution from a state st to a state st+1 is described by the transition function f . The new state st+1 depends, in addition to the preceding state, on the control actions at and on the realization of the stochastic processes: f : S × As × W → S , where W is the set of possible realizations of a random process. The general evolution of the system is thus governed by relation st+1 = f (st , at , wt ) , (11) where wt ∈ W represents the exogenous information and follows a probability law pW (·). We could write equivalently that st+1 ∼ pS (·|st , at ), which clearly highlights that the next state of the system follows a probability distribution that is conditional on the current state and on the action taken at the corresponding time step. However, we favor notation of equation (11) as it enables an easier formulation of concepts that are introduced latter in this paper. We now describe the various elements that constitute the transition function. Load consumption The uncertainty about the behavior of consumers inevitably leads to uncertainty about the power level they draw from the network. However, over a one-day horizon, some trends can be observed. For example, consumption peaks arise in the early morning and in the evening for residential consumers, but at levels that fluctuate from one day to another and among consumers. We model the evolution of the consumption of each load d ∈ C by (aux) Pd,t+1 = fd (Pd,t , Pd,t−1 , . . . , Pd,t−Nloads +1 , st , wd,t ) , (12) where wd,t ∼ pWd (·) denotes some components of wt ∼ pW (·). Given the hypothesis of a constant power factor for the loads, the reactive power consumption can directly be deduced from Pd,t+1 : Qq,t+1 = tan φd · Pd,t+1 . (13) Speed and power level of wind generators The uncertainty about the production level of wind turbines is inherited from the uncertainty about the wind speed. The stochastic process that we consider governs the wind speed, which is assumed to be uniform across the network. The production level of the wind generators is then obtained by using a deterministic function that depends on the wind speed realization, this function is the power curve of the considered generator. We can formulate this phenomenon as: (aux) vt+1 = fv (vt , . . . , vt−Nv +1 , st (v) , wt ) , Pg,t+1 = ηg (vt+1 ), ∀g ∈ wind generators ⊂ G , (v) (14) (15) such that wt ∼ pW (v) (·) denotes some components of wt ∼ pW (·) and where ηg is the power curve of generator g. A typical example of power curve ηg (v) is illustrated in Fig. 6. 15 Figure 6: Power curve of a wind generator. Irradiance and photovoltaic production Like wind generators, the photovoltaic generators inherit their uncertainty in production level from the uncertainty associated with their energy source. This source is represented by the level of solar irradiance, which is the power level of the incident solar energy per square meter. The irradiance level is the stochastic process that we model, while the production level is obtained by a deterministic function of the irradiance and of the surface of photovoltaic panels. This function is simpler than the power curve of wind generators and is defined as Pg,t = ηg · surfg · irt , where ηg is the efficiency factor of the panels, assumed constant and with a typical value around 15%, while surfg is the surface of the panels in m2 and is specific to each photovoltaic generator. The irradiance level is denoted by irt and the whole phenomenon is modeled by the following process: (aux) irt+1 = fir (irt , . . . , irt−Nir +1 , st (ir) , wt ), Pg,t+1 = ηg · surfg · irt+1 , ∀g ∈ solar generators ⊂ G , (ir) such that wt (16) (17) ∼ pW (ir) (·) denotes some components of wt ∼ pW (·). Auxiliary modeling variables The evolution of auxiliary modeling variables depends on their meaning and must be determined when instantiating the presented ab(aux) stract decision model. The evolution of each component of st can be either stochastic or deterministic and, without loss of generality, we can write: (aux) (aux) st+1 = faux (st , wt (aux) such that wt ), ∼ pW (aux) (·) denotes some components of wt ∼ pW (·). 16 (18) Impact of control actions The stochastic processes that we described govern the (1) evolution of the state st ∈ S (1) of the consumption of loads (flexibility services excluded) and of the power level of energy sources of DGs. We now define the evolution of (2) the components of st ∈ S (2) by integrating the control actions of the DSO. Concerning the modulation instructions of the generators, we have: ( pg,t if (pg,t , q̂g,t ) ∈ Og , ∀g ∈ G : P g,t+1 = (19) max(p,q̂g,t )∈Og p otherwise , ∀g ∈ G : Q̂g,t+1 = q̂g,t , (20) where max(p,q̂g,t )∈Og p denotes the maximal active production level that generator g can sustain with a reactive set-point of q̂g,t . It is used if needed to ensure that the instructed (P g,t+1 , Q̂g,t+1 ) point is a valid operating point, such a defined by equation (9). As for the components dedicated to the flexible loads, their evolution is governed by: ∀d ∈ F : f lexd,t+1 = max(f lexd,t − 1 ; 0) + actd,t Td , ( ∆Pd (Td − f lexd,t+1 + 1) if f lexd,t+1 > 0 ∆Pd,t+1 = 0 if f lexd,t+1 = 0 . ∀d ∈ F : (1) (21) (22) (2) From vectors st and st , we can determine the active and reactive power injections at nodes and thus obtain the value of the electrical quantities at nodes n ∈ N and links (m, n) ∈ L of the network: X X X Pn,t = min(P g,t ; Pg,t ) + Pd,t + ∆Pd,t , (23) g∈G(n) Qn,t d∈C(n) d∈F (n) X X X = Q̂g,t + Qd,t + tan φd ∆Pd,t , g∈G(n) d∈C(n) ∗ Pn,t − jQn,t = Vn,t Yn· Vn,t ,   ∗ (l) (br) |Imn,t | = |tmn |2 Vm,t − (t(l) mn ) tnm Vn,t Ymn . 3.3.4 (24) d∈F (n) (25) (26) Reward function and goal In order to evaluate the performance of a policy, we first specify the reward function r : S × As × S → R, which associates an instantaneous reward for each transition of the system from a period t to a period t + 1: r(st , at , st+1 ) = − X max{0, g∈G | − X d∈F | Pg,t+1 − P g,t+1 curt (aux) }Cg (st+1 ) 4 {z } curtailment cost of DGs actd,t Cdf lex − Φ(st+1 ) | {z } {z activation cost of flexible loads 17 } penalty function , (27) where Cgcurt (·) is a per-generator function that defines the curtailment price, while Cdf lex (·) defines the activation cost for each flexible load. In this generic definition of the reward, we allow both functions to depend on the auxiliary state variables so that it can model arbitrary processes. The function Φ aims at penalizing a policy that leads the system into an undesirable state (e.g. that violates the operational limits or induces many losses) and, together with Cgcurt and Cdf lex , it must be defined when instantiating the decision model. Note that equation (27) is such that the higher the operational costs and the larger the violations of operational limits, the more negative the reward function. We can now define the return over T periods, denoted RT , as the weighted sum of the rewards that are observed over a system trajectory of T periods RT = T −1 X γ t r(st , at , st+1 ) , (28) t=0 where γ ∈]0; 1[ is the discount factor. Given that γ t < 1 for t > 0, the further in time the transition from period t = 0, the less importance is given to the associated reward. Because the operation of a DN must always be ensured, it does not seem relevant to consider returns over a finite number of periods and we introduce the return R as R = R∞ = lim T −1 X T →∞ γ t r(st , at , st+1 ) , (29) t=0 that corresponds to the weighted sum of the rewards observed over an infinite trajectory of the system. Given that the costs have finite values, assuming the same for penalties, and observing that the reward function r is the sum of an infinite number of these costs and penalties, a constant C exists such that, ∀(st , at , st+1 ) ∈ S × As × S, we have |r(st , at , st+1 )| < C and thus |R| < lim C T →∞ T −1 X t=0 γt = C . 1−γ (30) It means that even if the return R is defined as an infinite sum, it converges to a finite value. One can also observe that, because st+1 = f (st , at , wt ), a function ρ : S×A×W → R exists that aggregates functions f and r such that ρ(st , at , wt ) = r(st , at , f (st , at , wt )) = r(st , at , st+1 ) , (31) with wt ∼ pW (·). Let π : S → As be a policy that associates a control action to each state of the system. We can define, starting from an initial state s0 = s, the expected return R of the policy π by π J (s) = lim T →∞ E { wt ∼pW (·) t=0,1,... T −1 X γ t ρ(st , π(st ), wt )|s0 = s} . t=0 18 (32) We denote by Π the space of all the policies π. For a DSO, addressing the operational planning problem described in Section 3 is equivalent to determine an optimal policy π ∗ among all the elements of Π, i.e. a policy that satisfies the following condition ∗ J π (s) ≥ J π (s), ∀s ∈ S, ∀π ∈ Π . (33) It is well known that such a policy satisfies the Bellman equation [30], which can be written  ∗ ∗ J π (s) = max E ρ(s, a, w) + γJ π (f (s, a, w)) , ∀s ∈ S . (34) a∈As w∼pW (·) If we only take into account the space of stationary policies (i.e. that selects an action independently of time t), it is without loss of generality comparing to the space of policies Π0 : S ×T → A because the return to be maximized corresponds to an infinite trajectory of the system [31]. 4 Lookahead optimization model We now describe a look-ahead algorithm to build a policy based on stochastic programming. The principle is, at each time step t ∈ T , to optimize a model Mt of the system over a finite time horizon Tt = {t, ..., t + T − 1} and to apply the control action ∗ (s ) that corresponds to the first stage of the model. This approximate optimal â∗t = π̂M t t ∗ can be formulated as policy π̂M t ∗ π̂M (st ) = arg max t at st0 ,at0 E h t+T X−1 wt0 ∼pW (·) (35) t0 =t ∀t0 ∈Tt s.t. i 0 γ t −t r(st0 , at0 , f (st0 , at0 , wt0 )) st0 = f (st0 −1 , at0 −1 , wt0 −1 ) , at0 ∈ Ast0 , 0 ∀t ∈ Tt , ∀t0 ∈ Tt \{t} (36) (37) where the shorter the horizon T , the higher the approximation error. The finite lookahead time horizon is not the only source of approximation. First, there is no exact numerical method to solve (35)-(37) without requiring a discrete approximation of the continuous stochastic processes [32]. We detail in Section 4.2 how to build such a discrete approximation. Then, because of the nonlinearity of power-flow equations on the one hand, and the integer variables that model the activation of flexibility services on the other hand, the resulting mathematical problem is very complex to solve. For this reason, it is often required either to resort to local optimization techniques and heuristics, or to use relaxations and approximations of the power-flow equations. In particular, we describe in Section 4.5 several models of the electrical network of different complexity and accuracy. 19 4.1 Model instantiation The decision model presented in Section 3.3 is generic on some of its elements. We now instantiate these elements to obtain a practical model that can be implemented to perform numerical simulations. (aux) Auxiliary state variable We limit the vector st indicates the time of the day: (aux) st to a single auxiliary variable that = qt , (38) which takes values in {0, . . . , 95} to identify the quarter of an hour in the day. This information will be used as an input of the modulation price functions and of the transition function of both production and consumption processes. The relation that governs the evolution of qt can be stated as a function faux : {0, . . . , 95} 7→ {0, . . . , 95}, which is defined as: qt+1 = faux (qt ) = (qt + 1) mod 96 . (39) Modulation prices For the sake of simplicity, we consider that the curtailment price functions Cgcurt depend exclusively on qt . The time of the day being deterministic, these functions are deterministic too and correspond to arrays of 96 price values, which span a whole day. Concerning the activation costs Cdf lex , they are assumed to be constant on a per-load basis. The values of both the arrays and constants are specified in Section 5 when presenting the test instances. Penalty function We choose to penalize a policy for violating operational limits and for the active losses in the network. This is implemented using the following function: X Φ(st+1 ) = k. [max(0, |Vn,t+1 | − V n ) + max(0, V n − |Vn,t+1 |)] n∈N + X max(0, |Imn,t+1 | − I mn )  (m,n)∈L + Closs (qt+1 ) X Pn,t+1 , 4 (40) n∈N where |Vn,t+1 | (n ∈ N ) and Imn,t+1 ((m, n) ∈ L) are determined from st+1 using equations (23)-(26), and where k ∈ R+ 0 is a typically large constant. The per-unit price Closs (qt+1 ) of losses is a deterministic function of the quarter of hour and corresponds to an array of 96 price values. Production and consumption processes The instantiated versions of transition functions (12), (14), and (16), of the stochastic quantities (i.e. the consumption of the 20 loads, the wind speed, and the level of solar irradiance) have the following structure: (x) xt+1 = fx (xt , . . . , xt−Nx +1 , qt , wt ) , (x) (x) with wt = µx,t+1 + σx,t+1 · wt ,   xt−Nx − µx,t−Nx +1 xt − µx,t ∼ pW (x) ·| ,..., , σx,t σx,t−Nx +1 (41) (42) (43) where x denotes the considered process, and where µx,t±∆t and σx,t±∆t are shortcuts for the following per-process functions:   µx,t±∆t = µx (qt ± ∆t) mod 96 , (44)   σx,t±∆t = σx (qt ± ∆t) mod 96 . (45) These functions normalize the processes and remove their diurnal seasonality, and the (x) conditional distribution of wt is then assumed to be stationary. The details of the conditional density functions are not required for the development of the lookahead optimization model, we specify in Section 5 a possible procedure to learn these functions from time series of measurements. 4.2 Discretization of the random process The random process needs to be discretized over the look-ahead horizon to implement the policy with a computer program. A prevalent technique is to use a scenario tree [33] for this purpose. At each time step t ∈ T , the evolution of the stochastic components is aggregated as a finite set W̃tT of outcome trajectories of the exogenous variables: (k) (k) W̃tT = {(wt , . . . , wt+T −1 )|k = 1, . . . , W } , (46) and a probability Pk is associated to each trajectory k ∈ {1, . . . , W }. If two trajectories i (i) (i) (j) (j) and j share the same outcomes up to stage o, i.e. if (wt0 , . . . , wt0 +o ) = (wt0 , . . . , wt0 +o ), they can be interpreted as a single trajectory of probability Pi + Pj up this stage. Fig. 7 provides an example of such a scenario tree, where the nodes represent the outcomes and the edges correspond to the transition probabilities. 4.3 Mathematical program The purpose of the first term in the penalty function is to be an incentive to prevent the policy to bring the system in a state that violates operational limits. This definition allows to evaluate any kind of policy. In a mathematical programming setting, we remove this term from the objective function and add operational constraints defined in 21 equations (1) and (2) to (35)-(37). The new objective function becomes: cost(st , at , st+1 ) = X max{0, g∈G X Pg,t+1 − P g,t+1 curt }Cg (qt+1 ) + actd,t Cdf lex 4 d∈F X Pn,t+1 + Closs (qt+1 ) . 4 (47) n∈N Taking into account the discretization of the stochastic processes, the objective function defined in equation (47), and the additional constraints, we can formulate a new ∗ approximate optimal policy π̂M̂ as t ∗ (st ) = arg π̂M̂ t W t+T i X X−1 h 0 (k) (k) (k) Pk γ t −t cost(st0 , at0 , st0 +1 ) min at s(k) ,...,s(k) , t t+T (k) (48) k=1 t0 =t (k) at ,...,at+T −1 , ∀k∈{1,...,W} s.t. ∀t0 ∈ Tt : (j) (i) at0 = at0 , (i) ∀i, j s.t. (i) (j) (j) (wt ,...,wt0 )=(wt ,...,wt0 ) , (49) 0 ∀(k, t ) ∈ {1, . . . , W } × Tt : (k) (k) (k) (k) st0 +1 = f (st0 , at0 , wt0 ) , (50) (k) at0 ∈ As(k) , (51) t0 ∀(n, k, t0 ) ∈ N × {1, . . . , W } × Tt : (k) (k) (k) V n,t0 ≤ |Vn,t0 | ≤ V n,t0 , (52) ∀(m, n, k, t0 ) ∈ L × {1, . . . , W } × Tt : |Imn,t | ≤ I mn , (53) where (50) stands for equations (12)-(26), and (51) for equation (10). The model takes into account that decisions at stage t0 ∈ Tt only depend on exogenous information up (1) P + 1 P2 P3 P4 + P5 wt (2) wt (3) wt (4) wt (5) wt P1 P 1/( P2 /( + P2 ) P1 + P2 ) 1 (1) 1 (2) 1 (3) 1 (4) P4 P 4/( wt+1 wt+1 wt+1 wt+1 1 (5) wt+1 P5 /( (1) wt+2 (2) wt+2 (3) wt+2 (4) ) wt+2 5) wt+2 + P5 P4 + P (5) Figure 7: Example of scenario tree with T = 3 and W = 5. 22 to stage t0 , i.e. that future unknown data is not used, which is why we integrate the nonanticipativity constraints [32] to the mathematical program using equation (49). Problem (48)-(53) is a mixed-integer program (MIP). For a given distribution system, its complexity depends mainly on the network model chosen to represent power-flow equations (cf. Section 4.5), and on the number of scenarios representing the uncertainty. 4.4 Detailed model of control actions Implementing the model of control actions of Section 3.3.2 in a mathematical program is not straightforward. We now present how it can be implemented in problem (48)-(53). 4.4.1 Generation curtailment This section focuses on the curtailment decision model. To ease the reading, we focus on one particular generator and thus omit subscript g. Note first that the active power injection term of equation (23) that follows a curtailment instruction pt ≥ 0 from stage t, i.e. min(P t+1 ; Pt+1 ), is translated in the mathematical program by min(P t+1 ; Pt+1 ) = Pt+1 − pcurt,t+1 , (54) where pcurt,t+1 ≥ 0 is the amount of active power curtailment induced by the power limit instruction. This quantity is easy to determine in a deterministic setting: P t+1 = pt , (55) pcurt,t+1 = Pt+1 − P t+1 , (56) where Pt+1 is the potential active production level at time step t + 1. Considering several scenarios leads to a less obvious definition of the amount of curtailment. Let pt denote the curtailment instruction that, at time t, is shared by (k) (k) (j) (j) all scenarios j ∈ {1, . . . , W } such that (. . . , wt−1 , wt ) = (. . . , wt−1 , wt ). For one generator, the maximum power allowed and the curtailed power are defined by the following set of constraints for each scenario k: (k) P t+1 = pt , (k) ∆pt+1 (k) pcurt,t+1 = = (57) (k) − P t+1 , (k) max(0, ∆pt+1 ) , (k) Pt+1 (k) (58) (59) (k) where Pt+1 is the potential active production level in scenario k, and ∆pt+1 is an auxiliary variable that has no physical meaning, since it can be negative when pt is not restrictive (k) (k) for scenario k (i.e. when pt ≥ Pt+1 ). The variable pcurt,t+1 would be the power curtailed if scenario k realizes. It contributes linearly to the value of the objective function, proportional to the curtailment cost and weighted by the probability of scenario k. A 23 common relaxation of the max operator of constraint (59) for a variable that tends to be minimized is (k) (k) pcurt,t+1 ≥ ∆pt+1 . (60) However, this holds only if constraint (60) is always tight, which is not always true (k) (k) in problem (48)-(53). Without preventing pcurt,t+1 to be greater than ∆pt+1 , it would allow to discriminate the curtailment decisions between different scenarios even though the nonanticipativity constraint (49) is respected. Indeed, the amount of power curtailed (k) (k) could be increased beyond Pt+1 − P t+1 and it would differ from the set point pt , which is guaranteeing nonanticipativity by being common for all subsequent scenarios. From this analysis, we conclude that a continuous implementation of equation (59) is not possible and we model it using equation (60) and the following additional constraints: (k) (k) (k) pcurt,t+1 ≤ ∆pt+1 − y (k) ∆P t+1 , (k) (k) (61) (k) pcurt,t+1 ≤ (1 − yt+1 ) ∆P t+1 , (62) (k) yt+1 ∈ {0, 1} , (k) (63) (k) where ∆P t+1 and ∆P t+1 are parameters that indicate the maximal and minimal values (k) that ∆pt+1 can take, respectively. It corresponds to a big M formulation [34] and can be interpreted as follow: (k) (k) • if ∆pt+1 < 0, constraint (61) is satisfied only if yt+1 = 1, and constraint (62) then (k) forces pcurt,t+1 = 0 ; (k) • if ∆pt+1 ≥ 0, constraints (60) and (61) can be satisfied simultaneously only if (k) yt+1 = 0 . (k) (k) Parameters ∆P t+1 and ∆P t+1 should be chosen such that the continuous relaxation (k) (k) (k) is as tight as possible. For instance for a wind turbine ∆P t+1 = Pt+1 and ∆P t+1 = (k) (j) Pt+1 − maxj Pt+1 . Finally, the curtailment instruction pg,t are recovered from the solution of M̂t upon the following processing of the solution: ( (k) pg,t if ∃k ∈ {1, ..., W } s.t. pg,t < Pg,t+1 , (64) ∀g ∈ G : pg,t ← +∞ otherwise , This processing is introduced because, in M̂t , the value of pg,t has no meaning when it does not induce an actual curtailment for at least one scenario. Therefore, it makes no sense to interpret these variables as curtailment instructions and equation (64) makes sure that curtailment actions sent to the system actually corresponds to curtailment decisions in the optimization model. 24 4.4.2 Activation of flexibility services This section details how the control actions actd,t defined in Section 3.3.2 are computed. To ease the reading, we focus on one particular device and thus omit subscript d in this section. The superscript (k) is also dropped and the following equations simply needs to be repeated for each scenario of the lookahead model, with equation (49) guaranteeing the nonanticipativity of the model. We first define several auxiliary variables: • zt ∈ {0, 1} is a binary variable used to model the max operator for state transitions; • mt ∈ Z+ is a integer variable used for state transitions. Ignoring the activation signal, the transition rule of the flexible state, i.e. mt+1 = max(0, f lext − 1) , is implemented through the following big M formulation: mt+1 ≤ f lext − 1 + zt (65) mt+1 ≤ T (1 − zt ) (66) mt+1 ≥ f lext − 1 . (67) The influence of the activation signal is then incorporated to the flexible state: f lext+1 = mt+1 + actt T , (68) while the following constraint prevents a double activation of a flexibility service: at + f lext ≤ 1. T (69) Finally, the value of the effective modulation signal, defined in equation (22), is implemented as: X ∆Pt = at−t0 ∆P (t − t0 ) , (70) t0 :t−t0 ≤T where ∆P (·) is the modulation curve of the load, which produces parameters for the mathematical program. 4.5 Detailed network models We detail how the network model described in Section 3.1 is precisely instantiated in the AC non-convex case, then we describe a linearization approach and finally a second order cone program (SOCP) model. To ease reading we consider only one time step and omit the subscripts t and the scenario notation, but in reality these equations are replicated for each time step or node of the scenario tree. In this section, we define (br) gmn + jbmn = Ymn 25 and X (sh) gm + jb(sh) m = (sh) Ymn . n:(m,n)∈L We also consider arbitrarily that node 1 is a slack bus which sets a reference phase angle of 0 and a fixed voltage magnitude. 4.5.1 Non-convex AC model We chose to express relations (6) in rectangular coordinates. Hence we define variables • en as the real part of Vn • fn as the imaginary part of Vn • Pmn as the active power leaving bus m and flowing in link (m, n) • Qmn as the reactive power leaving bus m and flowing in link (m, n) • Pnshunt as the active power shunted at bus n as the reactive power shunted at bus n. • Qshunt n The above powers are defined as ∀(m, n) ∈L : Pmn = em (gmn (em − en ) − bmn (fm − fn )) + fm (bmn (em − en ) + gmn (fm − fn )) , (71) Qmn = fm (gmn (em − en ) − bmn (fm − fn )) − em (bmn (em − en ) + gmn (fm − fn )) , (72) ∀n ∈N : Pnshunt = gn(sh) (e2n + fn2 ), (73) 2 2 Qshunt = b(sh) n n (en + fn ). (74) Then the voltage operational limits are defined for every node n as 2 Vn 2 ≤ e2n + fn2 ≤ Vn , ∀n ∈ N , and the thermal limits by 2 2 Imn ≤ I mn , ∀(m, n) ∈ L, (75) (76) with 2 2 2 Imn = Ireal + Iimag , (77) Ireal = gmn (em − en ) − bmn (fm − fn ) , (78) Iimag = bmn (em − en ) + gmn (fm − fn ) . (79) 26 4.5.2 Linearized model This model proposed in [20] approximates linearly (71) and (72). Note that this approximation does not include the shunt powers, i.e. Pnshunt = Qshunt = 0, ∀n ∈ N . This n yields Pmn = gmn (em − en ) − bmn (fm − fn ), ∀(m, n) ∈ L (80) Qmn = −bmn (em − en ) − gmn (fm − fn ), ∀(m, n) ∈ L. (81) The upper voltage limits and the thermal limits are approximated by a regular polyhedron inscribed in the respective circles of the original limits. The lower voltage operational limit is simply modeled as a lower bound on en , which means that we make the hypothesis that the angles are small. An iterative method could be set up if the approximated solutions are far from feasible solutions of the AC model. However, this turned out to be unnecessary as the decisions taken are most of the time very coherent with those obtained with other models, as illustrated in Section 5. This formulation does not account for losses. 4.5.3 Convex SOCP model By introducing variables un ≥ 0, Rmn ≥ 0 and Tmn ∈ R that substitute the expressions e2n + fn2 √ , 2 em en + fm fn , fm en − em fn , respectively, constraints (71)-(74) can be rewritten without e and f as √ Pmn = gmn 2um − gmn Rmn − bmn Tmn , ∀(m, n) ∈ L √ Qmn = −bmn 2um + bmn Rmn − gmn Tmn , ∀(m, n) ∈ L √ Pnshunt = gn(sh) 2un , ∀n ∈ N √ 2un , ∀n ∈ N . Qshunt = b(sh) n n (82) (83) (84) (85) The additional set of constraints 2 2 2um un = Rmn + Tmn , ∀(m, n) ∈ L (86) are imposed to maintain a relationship between the newly introduced variables. They are then relaxed to obtain a convex second order cone program: 2 2 2um un ≥ Rmn + Tmn , ∀(m, n) ∈ L. Voltage limits can be easily rewritten as a function of un as √ 2 Vn 2 ≤ 2un ≤ Vn , ∀n ∈ N . (87) (88) Thermal limits are approximated in the same way as for the non-convex AC model. Note that as Rmn = Rnm and Tmn = −Tnm , they are in practice replaced by a single variable 27 per branch and constraints (82) and (83) are updated accordingly. It is shown in [14] that this relaxation is tight for radial networks under some conditions on the objective function. These conditions are not met in our formulation since minimizing curtailment is equivalent to maximizing the renewable generation. To mitigate this issue, the losses term in the objective function must be scaled with a coefficient sufficiently large so that (87) are tight, but not too large so that the original objective function is still guiding the solution. This tradeoff is further discussed in Section 5. 5 Test instances We describe below the three test instances of the ANM problem that are used in the results section. The set of models and parameters that are specific to these instances, as well as documentation for their usage, are accessible at http://www.montefiore. ulg.ac.be/~anm/ as Python code. It has been developed to provide a black-box-type simulator that is quick to set up. The DNs on which these instances are based are a toy 5-bus radial test system, a 33-bus non-radial test system [35], and a 77-bus radial test system [36]. Table 1 summarizes some relevant data about these instances. The test systems are also illustrated in Figures 8, 9, and 10. The location of the wind generators, which we assume to be curtailable, is indicated by a circled W . The 77-bus instance also includes non-curtailable generators that model residential photovoltaic panels. case flex level |N | |L| |G| |C| |F| max flex (MW) ∼peak load (MW) Og , ∀g ∈ wind turbines low 1 0.3 case5 medium 2 0.6 high 5 4 1 3 3 0.9 11 case33 medium low 11 0.62 0 ≤ Pg ≤ 20 −5 ≤ Qg ≤ 5 Qg ≤ −0.24Pg + 6.8 Qg ≤ 0.24Pg − 6.8 22 1.3 high 33 37 4 32 32 2 9 0 ≤ Pg ≤ 4.5 −1 ≤ Qg ≤ 1 Qg ≤ −0.2Pg + 1.3 Qg ≤ 0.2Pg − 1.3 Table 1: Summary of test instances. Ext. Grid 1 3 2 4 W 5 Figure 8: 5-bus test system. 28 low case77 medium high 77 76 6 curtailable (out of 59) 53 11 22 33 1.71 3.41 5.01 18 0 ≤ Pg ≤ 4.5 −1 ≤ Qg ≤ 1 Qg ≤ −0.2Pg + 1.3 Qg ≤ 0.2Pg − 1.3 22 2 23 W 24 25 26 28 27 30 29 31 32 5 3 Ext. Grid 4 1 0 W 18 6 19 7 8 20 9 10 11 12 13 14 15 16 17 21 W W Figure 9: 33-bus test system. We consider that the per-unit curtailment prices are the same for all the generators. As described in Section 4.1, this price varies through the day and Figure 11 specifies the values considered in the test instances. We also use these values for the per-unit cost of the losses, i.e. Closs (·), while the constant k that appear in equation (40) is set to 104 . Concerning flexible loads, three different penetration levels exist for each test case. For every configuration, about half of the flexible services offer a downward modulation, followed by an upward rebound effect, and inversely for the other half. The maximal and cumulated modulation magnitude is reported in Table 1 to illustrate the potential offered by flexible loads in every configuration. Finally, the duration of the modulation signals is of 7 time periods for the 5-bus instances, and from 6 to 24 time periods for the 33 and 77-bus instances. The conditional density functions defined in equation (43) are built using a parametric model P(N,n) that relies on a mixture of n Gaussians to represent the probability distribution p(wt+1 |wt , . . . , wt−N +1 ) of the next outcome of the process, conditionally to the last N observed outcomes. In particular, the following procedure allows to fit (i) (i) (i) a model P(N,n) to a set {(w1 , w2 , . . . , wL ), i = 1, . . . , I} of time series of normalized realizations of the process of interest: (i) (i) (i) 1. build a dataset of tuples (wt−N +1 , . . . , wt , wt+1 ), ∀(i, t) ∈ {1, . . . , I} × {N, . . . , L − 1}; 2. model the joint distribution p(wt−N +1 , . . . , wt+1 ) of the dataset using a mixture of n Gaussians, by performing a maximum likelihood estimation [37] of the mixture’s parameters (i.e. the weight ηi , mean µi , and covariance matrix Σi of every Gaussian i ∈ {1, . . . , n}); ·|· 3. ∀i ∈ {1, . . . , n}, deduce from µi and Σi the functions µi (wt−N +1 , . . . , wt ) and ·|· σi (wt−N +1 , . . . , wt ) that define the mean and standard deviation of wt+1 , according to the ith Gaussian in the mixture and conditional to wt−N +1 , . . . , wt [38]; 29 4 3 2 W 45 7 6 5 W 10 9 8 W Ext. Grid 43 42 50 49 41 60 48 13 12 51 0 40 15 46 44 11 38 39 59 57 47 61 72 58 62 26 22 21 1 14 20 25 16 W 19 18 52 W 53 33 54 70 55 69 17 73 63 74 64 68 24 37 71 56 65 32 23 27 W 75 66 31 36 30 29 67 28 76 35 34 Figure 10: 77-bus test system. Table 2: Parameters of the stochastic models used in the implementation of the benchmark. N 1 1 2 Wind speed (Nv ) Solar irradiance (Nir ) Load consumption (Nloads ) n 1 10 10 4. produce p(·|wt , . . . , wt−N +1 ) as the following mixture of conditional Gaussian distributions: n   X ·|· ·|· p(·|wt , . . . , wt−N +1 ) = ηi N µi (wt−N +1 , . . . , wt ), σi (wt−N +1 , . . . , wt ) . (89) i=1 In order to determine an adequate value of the model’s hyper-parameters n and N for each process, we relied on an Approximate Bayesian Computation (ABC) method [39]. Such an approach consists in sampling trajectories from each model and to compare them with the original data to estimate its posterior probability among the set Θ of candidate models [40]. Using Θ = {P(N,m) |n∈{1,...,20},N ∈{1,...,3}}, the most likely parameters identified by this model choice technique are presented in Table 2. We refer the interested reader to [41] for more details on the modeling approach. The datasets that we used are real measurements of the wind speed3 and of the solar irradiance4 . For the residential consumption data, a single stochastic model has been 3 4 http://www.nrel.gov/electricity/transmission/eastern_wind_dataset.html http://solargis.info/ 30 65 60 55 C curt 50 45 40 35 30 25 0 20 40 qt 60 80 Figure 11: Curtailment prices used in the test instance. learned from measurements of a Belgian distribution network and it is used for all the loads of the test instance. However, this model differs among the loads through the use of a scaling factor. The implementation of the statistical algorithms relies on both SciPy [42] and Scikit-learn [43], two Python libraries. 6 Numerical results The goals of this section are to illustrate the operational planning problem and the test instances, as well as to provide some empirical evaluations of the proposed lookahead policy for the considered network models and for scenario trees of varying complexity. ∗ (s ) defined by problem (48)-(53) was applied to every test In particular, the policy π̂M̂ t t instance and penetration level of the flexible loads. The empirical expected return of the policy, for a given test instance, level of flexibility, network model, and scenario tree complexity, is determined from 50 runs of 288 time steps (i.e. of 3 days), each run i corresponding to the following sequence: 1. Initialize the state vector s0 by setting all the flexible loads as inactive and by sampling stochastic components from the joint distributions learned when building the test instance. 2. Run a simulation of 288 time steps, where, at every time step, problem (48)-(53) is implemented as follow: (a) sample 100 trajectories of the exogenous variables over a lookahead horizon (j) (j) of length T = 10, i.e. trajectories (wt , . . . , wt+9 ), with j = 1, . . . , 100; (b) determine the corresponding trajectories of the potential (i.e. not accounting for modulation instructions) power injections of the devices, as they are fully 31 (j) (j) determined by the current state st and by (wt , . . . , wt+9 ); (c) cluster the 100 trajectories of power injections into W scenarios, using a hierarchical clustering method and Ward’s distance [44]; (d) build the corresponding clusters of outcome trajectories, i.e. (k) (k) W̃tT = {(w̃t , . . . , w̃t+9 )|k = 1, . . . , W } , (k) where w̃t0 denotes the centroid of cluster k at time t0 ∈ {t, . . . , t + 9}, and compute the probabilities Pk of the resulting scenarios as Pk = number of trajectories in cluster k ; 100 (e) solve problem M̂t with a discount factor γ = 0.99 and over the scenario tree defined by outcomes of W̃tT and probabilities (P1 , . . . , PW ); (f) recover the action vector at to apply to the system. The motivation behind the use of Ward’s method to cluster trajectories is that it is a minimum variance method, which means that the trajectories of a cluster were selected because they are close to its centroid, in comparison to trajectories of other clusters. Consequently, the scenarios used in the optimization model, which are the centroids of the clusters, differ minimally from the trajectories it summarizes. The implementation has been done using the Python code mentioned in Section 5 to simulate the system and Pyomo [45] to build the mathematical programs. These programs were solved by BONMIN [46] in the MINLP case, and by Gurobi in the MISOCP and MILP cases. At each time step, a budget of 10 minutes is allowed to solve the mathematical program. If the solver reaches the time limit, the current best solution is applied to the system if a feasible solution is available, or the whole simulation run fails if no solution was found. Both solvers stop before the time limit if they reach a relative optimality gap of 1%. Note that BONMIN performs local optimization and must be seen as an heuristic method to solve the non-convex MINLPs, as it comes with no optimality guarantees. In the MISOCP case, the scaling factor of the losses discussed in Section 4.5.3 was fixed empirically to 3. For every combination of test instance, level of flexibility, and network model, the same runs were performed with a scenario tree W̃tT of one scenario (i.e. the mean of the sampled trajectories) and of three scenarios. A version of the problem with perfect information, i.e. with a scenario tree consisting of the actual future trajectory of the exogenous information, was also simulated to obtain a reference value of performance. The overall simulation was carried on in a high-performance computing environment with 128 cores. Each run being limited to a single core, such an infrastructure enabled hundreds of simulations to run in parallel and thus to speed up computations by the same factor. Ignoring failed simulation runs, more than 1 million of mathematical programs were solved for a cumulated time budget of approximately 1122 days. 32 The empirical estimations of the expected return reported in the following results are computed as: 50 287 n ∗ o 1 XX (i) J π̂ (s) ≈ 0.99t rt , 50 s∼p0 (·) E (90) i=1 t=0 (i) where rt corresponds to the instantaneous reward observed during the nth simulation run at time step t, and where p0 (·) denotes the probability distribution described at step (1). Tables 3, 4, and 5, summarize the results of the simulation runs for the 5-bus, 33bus, and 77-bus test systems, respectively. The first columns identifies the test instance configuration and the two latter columns report the expected return and the distribution of solution time. The blue and red bars denote the contributions to the expected return of the expected costs (including losses) and of the penalties from constraint violations, respectively. The box plots’ whiskers cover the whole range of the observed solution times and the red makers indicate the median time. We can first observe from the simulation results of the 5-bus test system that having a perfect forecast of the evolution of the system yields significantly better returns than when decisions are subject to uncertainty. It also shows that considering three possible future scenarios can significantly improve over an optimization performed on the average future scenario, to the expense of the solution time. Among the three network models, the SOCP relaxation is the one that induces the most penalties. These penalties also appear in the deterministic case, which implies that the relaxation is not always tight. We also observe that the policy slightly benefits from an increase of the flexibility level of loads in the deterministic setting but not in the presence of uncertainty. Given the small size of the 5-bus test system, the solution times are very good for every configuration with the exception of the MINLPs, for which worst-case solution time already reaches the time limit for all lookahead models. The results for the 33-bus test system are quite similar, with the notable exception of the solution times. Both the SOCP and LP network models still produce mathematical programs that can be solved within a reasonable time budget. On the other hand, the time limit is very often reached when solving the MINLPs5 . The simulation runs even failed in the two most complex configurations as the solver could not find any feasible solution within the time limit. This observation can be extended to the simulation results of the 77-bus test system, with the difference that, in the 1-scenario configurations, the mean and median solution times are lower while the worst-case time is even larger. None of the 3-scenario runs succeeded for the NLP network model and even the SOCP model produces significantly increased solution times, with worst cases reaching the time limit. Finally, a part of a 5-bus and low-flexibility simulation run is illustrated in Figures 12, 13, and 14, with a 3-scenarios lookahead model and a NLP, SOCP, and linear network model, respectively. The dashed lines in the upper-left subplots represent the estimated 5 Reported solution time can be larger than the time limit. It happens when the solver is executing a complex routine for some amount time before being able to check the limit. 33 case5 Lookahead model Netwok model Flex. level Determinist, T = 10 t t+10 Mean scenario, T = 10 t t+10 3 scenarios, T = 10 t t+10 nlp socp lin nlp socp lin nlp socp lin nlp socp lin nlp socp lin nlp socp lin nlp socp lin nlp socp lin nlp socp lin Exp. return ( costs, penalties) Solution time (s) mean low low low medium medium medium high high high low low low medium medium medium high high high low low low medium medium medium high high high 0 100 200 300 400 500 600 Table 3: Estimation of expected return and distribution of solver time for the 5-bus test system. production in the 3 scenarios of the lookahead model at time step 101 (i.e. when computing decisions for time step 102 and onwards). The bottom-right subplots represent the generator’s P-Q operating points for the whole simulation and the red point corresponds to time step 102. Notable differences can be observed among the network models. At time step 102, both the NLP and LP approaches show a violation of a thermal constraint because of an inadequate scenario tree, but the SOCP model is, on the contrary, quite conservative. This behavior is likely due to the scaling of the losses term in this latter model, as suggested by its chart of P-Q set-points. The policy did not explicitly computed a curtailment of active power but chose an aggressive Q set-point, which led to a power curtailment due to the P-Q capabilities of the generator. This phenomenon is observed several times in the reported simulation, in particular at and prior to time step 102. The NLP and LP models show a similar curtailment pattern, with the latter inducing more curtailment and an over-satisfaction of the thermal limit. We suspect the cause to be the non-inclusion of the losses in the LP model, which may also explain why this approach activates more flexible services than the two other approaches. Another consequence of not accounting for the losses is that the policy makes little use of the generator’s reactive capabilities, as shown by the lower-right subplot of Figure 14. In accordance with results of Tables 3, 4, and 5, the SOCP network model is not always tight and, around time step 110, shows constraint violations in the lower-left subplot of Figure 13, while the two other network models keep the system within the operational limits. 34 case33 Lookahead model Netwok model Flex. level Determinist, T = 10 t t+10 Mean scenario, T = 10 t t+10 3 scenarios, T = 10 t t+10 nlp socp lin nlp socp lin nlp socp lin nlp socp lin nlp socp lin nlp socp lin nlp socp lin nlp socp lin nlp socp lin Exp. return ( low low low medium medium medium high high high low low low medium medium medium high high high low low low medium medium medium high high high costs, penalties) Solution time (s) mean failed failed failed failed 0 200 400 600 800 Table 4: Estimation of expected return and distribution of solver time for the 33-bus test system. case75 Lookahead model Netwok model Flex. level Determinist, T = 10 t t+10 Mean scenario, T = 10 t t+10 3 scenarios, T = 10 t t+10 nlp socp lin nlp socp lin nlp socp lin nlp socp lin nlp socp lin nlp socp lin nlp socp lin nlp socp lin nlp socp lin low low low medium medium medium high high high low low low medium medium medium high high high low low low medium medium medium high high high Exp. return ( costs, penalties) Solution time (s) mean failed failed failed failed failed failed 0 200 400 600 800 Table 5: Estimation of expected return and distribution of solver time for the 77-bus test system. 35 Prod. (MW) Cons. (MW) Time step |I|/Ī Q (MW) Time step Time step P (MW) Figure 12: Illustrations of part of a 5-bus and low-flexibility simulation run, with a 3-scenarios lookahead model and a NLP network model. 36 Prod. (MW) Cons. (MW) Time step |I|/Ī Q (MW) Time step Time step P (MW) Figure 13: Illustrations of part of a 5-bus and low-flexibility simulation run, with a 3-scenarios lookahead model and a SOCP network model. 37 Prod. (MW) Cons. (MW) Time step |I|/Ī Q (MW) Time step Time step P (MW) Figure 14: Illustrations of part of a 5-bus and low-flexibility simulation run, with a 3-scenarios lookahead model and a linear network model. 38 7 Conclusions Active Network Management is an alternative or a complement to network reinforcement in case of massive integration of renewable energy in distribution systems in the future. Mathematically, operational planning, which is the preventive version of active network management we consider in this paper, is an optimal sequential decision-making problem under uncertainty. The properties of the operational planning problem that we want to highlight are the need to optimize over a sufficiently long time horizon, to account for uncertainty of generation and consumption, and to model the discrete decisions related to the activation of flexibility services. In an attempt not to restrict ourselves to one solution method and one research community, we provide a formulation of this problem as a Markov Decision Process (MDP), which does not call for a particular solution method. We provide a simulator and several test beds at http://www.montefiore.ulg. ac.be/~anm/ along with this formulation to foster research in this field, and ease future comparison of results. Although these benchmarks are not taken from real systems, their properties are coherent with what system operators could face in real life. We detail one possible solution method, which is a lookahead optimization model, then cast the MDP as a sequence of MINLPs, MISOCPs, or MILPs, and provide results on the benchmarks we created. Results show that state of the art open source local solvers for MINLP can show good performance on the test instances of limited size, at least when we approximate the stochastic program with few scenarios. Solving the MISOCPs and MILPs is however much more tractable, to the expense of the network model accuracy. In particular, the results of the MILP approximation suggest that it could scale to larger test systems and scenario trees. On the modeling side, we considered that all buses except the slack bus are P-Q buses, and that the power factors of the loads are constant while the generators are flexible as defined by their P-Q capabilities. Possible extensions of this work could be to consider the control of steerable synchronous generation, and of generators with time coupling constraints (e.g. combined heat and power generation). As mentioned in Section 3.2, other approaches exist to control the system, such as modulating the tariff signal(s), acting on the topology of the network, or using distributed storage sources. We did not model either the automatic regulation devices that often exist in distribution systems, such as On Load Tap Changers (OLTCs) of transformers that automatically adapt to control the voltage level. These automatic regulation devices have been recently addressed in [10]. We believe that all of these aspects should be considered in a real life solution. However, computational experiments show that we are at the limit of what can be achieved with modern computers and standard mathematical programing tools. Furthermore, including a more detailed representation of the physical system makes the problem yet more discrete (OLTCs), and more uncertain (for instance, if flexibility services are not as well characterized as what we have assumed). Our experiments also show that increasing the number of scenarios, or stages of the stochastic program, would probably significantly improve the policies. All these observations suggest further research for tailored approximation or decomposition techniques, for instance techniques relying on the dynamic programming framework, in particular approximate dynamic 39 programming, or simulation methods, such as direct policy search [47] or Monte-Carlo tree search [48, 49], or other approaches from the robust and stochastic programming community [50]. Actually the benchmarks that we proposed makes the comparison of new techniques possible. Acknowledgements This research is supported by the public service of Wallonia - Department of Energy and Sustainable Building within the framework of the GREDOR project. The authors give their thanks for the financial support of the Belgian Network DYSCO, an Interuniversity Attraction Poles Program initiated by the Belgian State, Science Policy Office. The authors would also like to thank Raphaël Fonteneau for his precious advices and comments. References [1] D. Fouquet and T.B. Johansson. European renewable energy policy at crossroads – focus on electricity support mechanisms. Energy Policy, 36(11):4079–4092, 2008. [2] Bertrand Cornélusse, David Vangulick, Mevludin Glavic, and Damien Ernst. Global capacity announcement of electrical distribution systems: A pragmatic approach. Sustainable Energy, Grids and Networks, 4:43–53, 2015. [3] David TC Wang, Luis F Ochoa, and Gareth P Harrison. Dg impact on investment deferral: Network planning and security of supply. Power Systems, IEEE Transactions on, 25(2):1134–1141, 2010. [4] J.A.P. Lopes, N. Hatziargyriou, J. Mutale, P. Djapic, and N. Jenkins. Integrating distributed generation into electric power systems: A review of drivers, challenges and opportunities. Electric Power Systems Research, 77(9):1189–1203, 2007. [5] S.N. Liew and G. Strbac. Maximising penetration of wind generation in existing distribution networks. IET Generation Transmission and Distribution, 149(3):256– 262, 2002. [6] L.F. Ochoa, C.J. Dent, and G.P. Harrison. Distribution network capacity assessment: Variable DG and active networks. IEEE Transactions on Power Systems, 25(1):87–95, 2010. [7] M. J. Dolan, E. M. Davidson, I. Kockar, G. W. Ault, and S. D. J. McArthur. Distribution power flow management utilizing an online optimal power flow technique. IEEE Transactions on Power Systems, 27(2):790–799, 2012. [8] Q. Gemine, E. Karangelos, D. Ernst, and B. Cornélusse. Active network management: planning under uncertainty for exploiting load modulation. In Proceedings 40 of the 2013 IREP Symposium - Bulk Power System Dynamics and Control - IX, page 9, 2013. [9] S. Gill, I. Kockar, and G.W. Ault. Dynamic optimal power flow for active distribution networks. Power Systems, IEEE Transactions on, 29(1):121–131, 2014. [10] Leonardo H Macedo, John F Franco, Marcos J Rider, and Ruben Romero. Optimal operation of distribution networks considering energy storage devices. Smart Grid, IEEE Transactions on, 6(6):2825–2836, 2015. [11] Frédéric Olivier, Petros Aristidou, Damien Ernst, and Thierry Van Cutsem. Active management of low-voltage networks for mitigating overvoltages due to photovoltaic units. Smart Grid, IEEE Transactions on, 7(2):926–936, 2015. [12] H.W. Dommel and W.F. Tinney. Optimal power flow solutions. IEEE transactions on Power Apparatus and Systems, PAS-87(10):1866–1876, 1968. [13] F. Capitanescu, M. Glavic, D. Ernst, and L. Wehenkel. Interior-point based algorithms for the solution of optimal power flow problems. Electric Power Systems Research, 77(5–6):508–517, 2007. [14] Rabih A Jabr. Radial distribution load flow using conic programming. Power Systems, IEEE Transactions on, 21(3):1458–1459, 2006. [15] J. Lavaei and S.H. Low. Zero duality gap in optimal power flow problem. IEEE Transactions on Power Systems, 27(1):92–107, 2012. [16] S. Bose, D.F. Gayme, K. Mani Chandy, and S.H. Low. Quadratically constrained quadratic programs on acyclic graphs with application to power flow. ArXiv eprints, 2012. [17] L. Gan, N. Li, U. Topcu, and S. Low. On the exactness of convex relaxation for optimal power flow in tree networks. In Proceedings of the IEEE 51st Annual Conference on Decision and Control (CDC), pages 465–471, 2012. [18] DT Phan. Lagrangian duality and branch-and-bound algorithms for optimal power flow. Operations Research, 60(2):275–285, 2012. [19] A. Gopalakrishnan, A.U. Raghunathan, D. Nikovski, and L.T. Biegler. Global optimization of optimal power flow using a branch & bound algorithm. In Proceedings of the 50th Annual Allerton Conference on Communication, Control, and Computing, pages 609–616, 2012. [20] Saverio Bolognani and Sandro Zampieri. On the existence and linear approximation of the power flow solution in power distribution networks. Power Systems, IEEE Transactions on, 31(1):163–172, 2016. 41 [21] Dennice Gayme and Ufuk Topcu. Optimal power flow with distributed energy storage dynamics. In Proceedings of the 2011 American Control Conference (ACC), pages 1536–1542, 2011. [22] A. Gopalakrishnan, A.U. Raghunathan, D. Nikovski, and L.T. Biegler. Global optimization of multi-period optimal power flow. In Proceedings of the 2013 American Control Conference (ACC), pages 1157–1164, 2013. [23] N. Alguacil and A.J. Conejo. Multiperiod optimal power flow using Benders decomposition. IEEE Transactions on Power Systems, 15(1):196–201, 2000. [24] Q. Gemine, D. Ernst, Q. Louveaux, and B. Cornélusse. Relaxations for multi-period optimal power flow problems with discrete decision variables. In Proceedings of the 18th Power Systems Computation Conference (PSCC-14), page 7, 2014. [25] G. Andersson. Modelling and analysis of electric power systems. EEH-Power Systems Laboratory, Swiss Federal Institute of Technology (ETH), Zürich, Switzerland, 2004. [26] A. Monticelli. State estimation in electric power systems: a generalized approach, volume 507. Springer Science & Business Media, 1999. [27] Stephan Engelhardt, Istvan Erlich, Christian Feltes, Jörg Kretschmann, and Fekadu Shewarega. Reactive power capability of wind turbines based on doubly fed induction generators. Energy Conversion, IEEE Transactions on, 26(1):364–372, 2011. [28] Hamid Soleimani Bidgoli, Mevludin Glavic, and Thierry Van Cutsem. Recedinghorizon control of distributed generation to correct voltage or thermal violations and track desired schedules. In Proceedings of the 19th Power Systems Computation Conference (PSCC 2016), 2016. [29] W.B. Powell. A Unified Framework for Optimization under Uncertainty. Informs TutORials in Operations Research, 2016. [30] R. Bellman. Dynamic Programming. Princeton University Press, 1957. [31] D.P. Bertsekas and S.E. Shreve. Stochastic Optimal Control: The Discrete Time Case. Academic Press New York, 1978. [32] A. Shapiro, D. Dentcheva, and A. Ruszczyński. Lectures on Stochastic Programming: Modeling and Theory. SIAM, 2009. [33] B. Defourny, D. Ernst, and L. Wehenkel. Multistage stochastic programming: A scenario tree based approach to planning under uncertainty, chapter 6, page 51. Information Science Publishing, Hershey, PA, 2011. [34] José Fortuny-Amat and Bruce McCarl. A representation and economic interpretation of a two-level programming problem. Journal of the operational Research Society, pages 783–792, 1981. 42 [35] F. Capitanescu, L. F. Ochoa, H. Margossian, and N. D. Hatzargyriou. Assessing the potential of network reconfiguration to improve distributed generation hosting capacity in active distribution systems. IEEE Trans. Power Syst., 1:346–356, 2015. [36] SEDG Centre. UK generic distribution system (UKGDS) project. http://www. sedg.ac.uk/, 2010. [37] R.A. Redner and H.F. Walker. Mixture densities, maximum likelihood and the EM algorithm. SIAM Review, 26(2):pp. 195–239, 1984. [38] C.M. Bishop. Pattern recognition and machine learning. springer, 2006. [39] J.-M. Marin, P. Pudlo, C.P. Robert, and R.J. Ryder. Approximate bayesian computational methods. Statistics and Computing, 22(6):1167–1180, 2012. [40] A. Grelaud, C.P. Robert, J.-M. Marin, F. Rodolphe, and J.-F. Taly. ABC likelihoodfree methods for model choice in gibbs random fields. Bayesian Analysis, 4(2):317– 335, 06 2009. [41] Quentin Gemine, Bertrand Cornélusse, Mevludin Glavic, Raphaël Fonteneau, and Damien Ernst. A gaussian mixture approach to model stochastic processes in power systems. In Proceedings of the 19th Power Systems Computation Conference (PSCC’16), 2016. [42] E. Jones, T. Oliphant, and P. Peterson. SciPy: Open source scientific tools for Python. 2014. [43] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, and al. Scikit-learn: Machine learning in python. The Journal of Machine Learning Research, 12:2825–2830, 2011. [44] Trevor Hastie, Robert Tibshirani, Jerome Friedman, and James Franklin. The elements of statistical learning: data mining, inference and prediction. The Mathematical Intelligencer, 27(2):83–85, 2005. [45] W.E. Hart, C. Laird, J.-P. Watson, and D.L. Woodruff. Pyomo–optimization modeling in python, volume 67. Springer Science & Business Media, 2012. [46] P. Bonami and J. Lee. BONMIN users manual. Technical report, 2006. [47] L. Busoniu, D. Ernst, B. De Schutter, and R. Babuska. Cross-entropy optimization of control policies with adaptive basis functions. IEEE Transactions on Systems, Man, and Cybernetics, Part B: Cybernetics, 41(1):196–209, 2011. [48] D.P. Bertsekas and J.N. Tsitsiklis. Neuro-Dynamic Programming. Athena Scientific, Belmont, MA, 1996. 43 [49] L. Busoniu, R. Babuska, B. De Schutter, and D. Ernst. Reinforcement Learning and Dynamic Programming Using Function Approximators. CRC Press, Boca Raton, FL, 2010. [50] W.B. Powell. Clearing the Jungle of Stochastic Optimization. Informs TutORials, 2014. 44
5cs.CE
Throughput-Optimal Broadcast in Wireless Networks with Dynamic Topology Abhishek Sinha Leandros Tassiulas Eytan Modiano Laboratory for Information and Decision Systems MIT Electrical Engg. and Yale Institute of Network Science Yale University Laboratory for Information and Decision Systems MIT arXiv:1604.00576v1 [cs.IT] 3 Apr 2016 [email protected] [email protected] ABSTRACT We consider the problem of throughput-optimal broadcasting in time-varying wireless networks, whose underlying topology is restricted to Directed Acyclic Graphs (DAG). Previous broadcast algorithms route packets along spanning trees. In large networks with time-varying connectivities, these trees are difficult to compute and maintain. In this paper we propose a new online throughput-optimal broadcast algorithm which makes packet-by-packet scheduling and routing decisions, obviating the need for maintaining any global topological structures, such as spanning-trees. Our algorithm relies on system-state information for making transmission decisions and hence, may be thought of as a generalization of the well-known back-pressure algorithm which makes point-to-point unicast transmission decisions based on queue-length information, without requiring knowledge of end-to-end paths. Technically, the back-pressure algorithm is derived by stochastically stabilizing the networkqueues. However, because of packet-duplications associated with broadcast, the work-conservation principle is violated and queuing processes are difficult to define in the broadcast problem. To address this fundamental issue, we identify certain state-variables which behave like virtual queues in the broadcast setting. By stochastically stabilizing these virtual queues, we devise a throughput-optimal broadcast policy. We also derive new characterizations of the broadcastcapacity of time-varying wireless DAGs and derive an efficient algorithm to compute the capacity exactly under certain assumptions, and a poly-time approximation algorithm for computing the capacity under less restrictive assumptions. 1. INTRODUCTION The problem of efficiently disseminating packets, arriving at a source node, to a subset of nodes in a network, is known as the Multicast problem. In the special case when the packets are to be distributed among all nodes, the corresponding problem is referred to as the Broadcast problem. Multicast- ACM ISBN 978-1-4503-2138-9. DOI: 10.1145/1235 [email protected] ing and broadcasting is considered to be a fundamental network functionality, which enjoys numerous practical applications ranging from military communications [16], disaster management using mobile adhoc networks (MANET) [9], to streaming services for live web television [24] etc. There exists a substantial body of literature addressing different aspects of this problem in various networking settings. An extensive survey of various multicast routing protocols for MANET is provided in [12]. The authors of [8] consider the problem of minimum latency broadcast of a finite set of messages in MANET. This problem is shown to be NP-hard. To address this issue, several approximation algorithms are proposed in [11], all of which rely on construction of certain network-wide broadcast-trees. Cross-layer solutions for multi-hop multicasting in wireless network are given in [29] and [10]. These algorithms involve network coding, which introduces additional complexity and exacerbates end-to-end delay. The authors of [21] propose a multicast scheduling and routing protocol which balances load among a set of pre-computed spanning trees, which are challenging to compute and maintain in a scalable fashion. The authors of [26] propose a local control algorithm for broadcasting in a wireless network for the so called scheduling-free model, in which an oracle is assumed to make interference-free scheduling decisions. This assumption, as noted by the authors themselves, is not practically viable. In this paper we build upon the recent work of [23] and consider the problem of throughput-optimal broadcasting in a wireless network with time-varying connectivity. Throughout the paper, the overall network-topology will be restricted to a directed acyclic graph (DAG). We first characterize the broadcast-capacity of time-varying wireless networks and propose an exact and an approximation algorithm to compute it efficiently. Then we propose a dynamic link-activation and packet-scheduling algorithm that, unlike any previous algorithms, obviates the need to maintain any global topological structures, such as spanning trees, yet achieves the capacity. In addition to throughput-optimality, the proposed algorithm enjoys the attractive property of in-order packet-delivery, which makes it particularly useful in various online applications, e.g. VoIP and live multimedia communication [4]. Our algorithm is model-oblivious in the sense that its operation does not rely on detailed statistics of the random arrival or network-connectivity processes. We also show that the throughput-optimality of our algorithm is retained when the control decisions are made using locally available and possibly imperfect, state information. Notwithstanding the vast literature on the general topic of broadcasting, to the best of our knowledge, this is the first work addressing throughput-optimal broadcasting in timevarying wireless networks with store and forward routing. Our main technical contributions are the following: • We define the broadcast-capacity for wireless networks with time-varying connectivity and characterize it mathematically and algorithmically. We show that broadcastcapacity of time-varying wireless directed acyclic networks can be computed efficiently under some assumptions. We also derive a tight-bound for the capacity for a general setting and utilize it to derive an efficient approximation algorithm to compute it. • We propose a throughput-optimal dynamic routing and scheduling algorithm for broadcasting in a wireless DAGs with time-varying connectivity. This algorithm is of Max-Weight type and uses the idea of in-order delivery to simplify its operation. To the best of our knowledge, this is the first throughput-optimal dynamic algorithm proposed for the broadcast problem in wireless networks. • We extend our algorithm to the setting when the nodes have access to infrequent state updates. We show that the throughput-optimality of our algorithm is preserved even when the rate of inter-node communication is made arbitrarily small. • We illustrate our theoretical findings through illustrative numerical simulations. The rest of the paper is organized as follows. Section 2 introduces the wireless network model. Section 3 defines and characterizes the broadcast capacity of a wireless DAG. It also provides an exact and an approximation algorithm to compute the broadcast-capacity. Section 4 describes our capacity-achieving broadcast algorithm for DAG networks. Section 5 extends the algorithm to the setting of broadcasting with imperfect state information. Section 6 provides numerical simulation results to illustrate our theoretical findings. Finally, in section 7 we summarize our results and conclude the paper. 2. NETWORK MODEL link (i, j) is activated. Let r ∈ V be the source node. At slot t, A(t) packets arrive at the source. The arrivals, A(t), are i.i.d. over slots with mean E(A(t)) = λ. Our problem is to efficiently disseminate the packets to all nodes in the network. 2.1 Notations and Nomenclature: All vectors in this paper are assumed to be column vectors. For any set X ⊂ Rk , its convex-hull is denoted by conv(X ). Let U, V \ U be a disjoint partition of the set of vertices V of the graph G, such that the source r ∈ U and U ( V . Such a partition is called a proper-partition. To each proper partition corresponding to the set U , associate the propercut vector u ∈ Rm , defined as follows: ui,j = ci,j = 0 if i ∈ U, j ∈ V \ U otherwise (1) Denote the special, single-node proper-cuts by Uj ≡ V \ {j}, and the corresponding cut-vectors by uj , ∀j ∈ V \ {r}. The set of all proper-cut vectors in the graph G is denoted by U. The in-neighbours of a node j is defined as the set of all nodes i ∈ V such that there is a directed edge (i, j) ∈ E. It is denoted by the set ∂ in (j), i.e., ∂ in (j) = {i ∈ V : (i, j) ∈ E} (2) Similarly, we define the out-neighbours of a node j as follows  ∂ out (j) = i ∈ V : (j, i) ∈ E (3) For any two vectors x and y in Rm , define the componentwise product z ≡ x ⊙ y to be a vector in Rm such that zi = xi yi , 1 ≤ i ≤ m. For any set S ⊂ Rm and any vector v ∈ Rm , v⊙S, denotes the set of vectors obtained as the component-wise product of the vector v and the elements of the set S, i.e.,  v ⊙ S = y ∈ Rm : y = v ⊙ s, s ∈ S (4) Also, the usual dot product between two vectors x, y ∈ Rm is defined as, x·y = m X x i yi i=1 2.2 Model of Time-varying Wireless Connectivity First we describe the basic wireless network model without time-variation. Subsequently, we will incorporate timevariation in the basic model. A static wireless network is modeled by a directed graph G = (V, E, c, M), where V is the set of nodes, E is the set of directed point-to-point links1 , the vector c = (cij ) denotes capacities of the edges when the corresponding links are activated and M ⊂ {0, 1}|E| is the set of incidence-vectors corresponding to all feasible link-activations complying with the interference-constraints. The structure of the activation-set M depends on the interference model, e.g., under the primary or node-exclusive interference model [14], M corresponds to the set of all matchings on the graph G. There are a total of |V | = n nodes and |E| = m edges in the network. Time is slotted and at timeslot t, any subset of links complying with the underlying interference-constraint may be activated. At most cij packets can be transmitted in a slot from node i to node j, when Now we incorporate time-variation into our basic framework described above. In a wireless network, the channelSINRs vary with time because of random fading, shadowing and mobility [27]. To model this, we consider a simple ONOFF model where an individual link can be in one of the two states, namely ON and OFF. In an OFF state, the capacity of a link is zero 2 . Thus at a given time, the network can be in any one configuration, out of the set of all possible network configurations Ξ. Each element σ ∈ Ξ corresponds to a sub-graph G(V, Eσ ) ⊂ G(V, E), with Eσ ⊂ E, denoting the set of links that are ON. At a given time-slot t, one of the configuration σ(t) ∈ Ξ is realized. The configuration at time t is represented by the vector σ(t) ∈ {0, 1}|E| , where ( 1, if e ∈ Eσ(t) σ(e, t) = 0, otherwise. 1 We assume all transmit and receiving antennas to be directed and hence all transmissions to be point-to-point [3]. 2 Generalization of the ON-OFF model, to multi-level discretization of link-capacity is straight-forward. At a given time-slot t, the network controller may activate a set of non-interfering links that are ON. The network-configuration process {σ(t)}t≥1 evolves in discretetime according to a stationary ergodic process with the stationary distribution {p(σ)}σ∈Ξ [13], where X p(σ) = 1, p(σ) > 0, ∀σ ∈ Ξ (5) σ∈Ξ Since the underlying physical processes responsible for time-variation are often spatially-correlated [1], [19], the distribution of the link-states is assumed to follow an arbitrary joint-distribution. The detailed parameters of this process depend on the ambient physical environment, which is often difficult to measure. In particular, it is unrealistic to assume that the broadcast-algorithm has knowledge of the parameters of the process σ(t). Fortunately, our proposed dynamic throughput-optimal broadcast algorithm does not require the statistical characterization of the configurationprocess σ(t) or its stationary-distribution p(σ). This makes our algorithm robust and suitable for use in time-varying wireless networks. 3. DEFINITION AND CHARACTERIZATION OF BROADCAST CAPACITY Intuitively, a network supports a broadcast rate λ if there exists a scheduling policy under which all network nodes receive distinct packets at rate λ. The broadcast-capacity of a network is the maximally supportable broadcast rate by any policy. Formally, we consider a class Π of scheduling policies where each policy π ∈ Π consists of a sequence of actions {πt }t≥1 , executed at every slot t. Each action πt consists of two operations: • The scheduler observes the current network-configuration σ(t) and activates a subset of links by choosing a feasible activation vector s(t) ∈ Mσ(t) . Here Mσ denotes the set of all feasible link-activation vectors in the subgraph G(V, Eσ ), complying with the underlying interference constraints. As an example, under the primary interference constraint, Mσ is given by the set of all matchings [6] of the sub-graph G(V, Eσ ). Analytically, elements from the set Mσ will be denoted by their corresponding |E|-dimensional binary incidence-vectors, whose component corresponding to edge e is identically zero if e ∈ / Eσ . • Each node i forwards a subset of packets (possibly empty) to node j over an activated link (i, j) ∈ σ(t), subject to the link capacity constraint. The class Π includes policies that may use all past and future information, and may forward any subset of packets over a link, subject to the link-capacity constraint. To formally introduce the notion of broadcast capacity, we define the random variable Riπ (T ) to be the number of distinct packets received by node i ∈ V up to time T , under a policy π ∈ Π. The time average lim inf T →∞ Riπ (T )/T is the rate of packet-reception at node i. Definition 1. A policy π ∈ Π is called a “broadcast policy of rate λ” if all nodes receive distinct packets at rate λ, i.e., 1 min lim inf Riπ (T ) = λ, i∈V T →∞ T w.p. 1 (6) where λ is the packet arrival rate at the source node r. Definition 2. The broadcast capacity λ∗ of a network is defined to be the supremum of all arrival rates λ, for which there exists a broadcast policy π ∈ Π of rate λ. In the following subsection, we derive an upper-bound on broadcast-capacity, which immediately follows from the previous definition. 3.1 An Upper-bound on Broadcast Capacity Consider a policy π ∈ Π that achieves a broadcast rate of at least λ∗ − ǫ, for an ǫ > 0. Such a policy π exists due to the definition of the broadcast capacity λ∗ in Definition 2. Now consider any proper-cut U of the network G. By definition of a proper-cut, there exists a node i ∈ / U . Let sπ (t, σ(t)) = (sπe (t), e ∈ E) be the link-activation vector chosen by policy π in slot t, upon observing the currentconfiguration σ(t). The maximum number of packets that can be transmitted across the cut U in slot t is upperbounded by the total capacity P of all activated links across the cut-set U , which is given by e∈EU ce sπe (t, σ(t)). Hence, the number of distinct packets received by node i by time T is upper-bounded by the total available capacity across the cut U up to time T , subject to link-activation decisions of the policy π. In other words, we have Riπ (T ) ≤ T X X ce sπe (t, σ(t)) = u · T X sπ (t, σ(t)) (7) t=1 t=1 e∈EU i.e., Riπ (T ) ≤u· T   T 1 X π s (t, σ(t)) , T t=1 where the cut-vector u ∈ Rm , corresponds to the cut-set U , as in Eqn.(1). It follows that, λ∗ − ǫ (a) ≤ ≤ Rjπ (T ) Rπ (T ) ≤ lim inf i T →∞ j∈V T →∞ T T  X  T 1 lim inf u · sπ (t, σ(t)) , T →∞ T t=1 min lim inf (8) where (a) follows from the fact that π is a broadcast policy of rate at least λ∗ − ǫ. Since the above inequality holds for all proper-cuts u, we have   X T 1 sπ (t, σ(t)) (9) λ∗ − ǫ ≤ min lim inf u · u∈U T →∞ T t=1 The following technical lemma will prove to be useful for deriving an upper-bound on the broadcast-capacity. Lemma 1. For any policy π ∈ Π, and any propercut vector u, there exists a collection of vectors βσπ ∈  conv(Mσ ) σ∈Ξ , such that, the following holds w.p. 1  T 1 X π s (t, σ(t)) T →∞ T t=1 X  = min u · p(σ)βσπ min lim inf u · u∈U  u∈U σ∈Ξ The above lemma essentially replaces the minimum cutset bound of an arbitrary activations in (9), by the minimum cut-set bound of a stationary randomized activation, which is easier to handle. Combining Lemma 1 with Eqn. (9), we conclude that for the policy π ∈ Π, there exists a collection of vectors {βσπ ∈ conv(Mσ )}σ∈Ξ such that X  λ∗ − ǫ ≤ min u · (10) p(σ)βσπ u∈U σ∈Ξ  Maximizing the RHS of Eqn. (10) over all vectors βσ ∈ conv(Mσ ), σ ∈ Ξ and letting ǫ ց 0, we have the following universal upper-bound on the broadcast capacity λ∗ X  ∗ λ ≤ max min u · (11) p(σ)βσ βσ ∈conv(Mσ ) u∈U σ∈Ξ Specializing the above bound for single-node cuts of the form Uj = (V \ {j}) → {j}, ∀j ∈ V \ {r}, we have the following upper-bound  X (12) p(σ)βσ λ∗ ≤ max min uj · βσ ∈conv(Mσ ) j∈V \{r} σ∈Ξ It will be shown in Section 4 that in a DAG, our throughputoptimal policy π ∗ achieves a broadcast-rate equal to the RHS of the bound (12). Thus we have the following theorem Theorem 3.1. The broadcast-capacity λ∗DAG of a time-varying wireless DAG is given by: X  λ∗DAG = max min uj · p(σ)βσ (13) βσ ∈conv(Mσ ),σ∈Ξ j∈V \{r} σ∈Ξ The above theorem shows that for computing the broadcastcapacity of a wireless DAG, taking minimum over the singlenode cut-sets {uj , j ∈ V \ {r}} suffice (c.f. Eqn. (11)). 3.2 An Illustrative Example of Capacity Computation In this section, we work out a simple example to illustrate the previous results. Configuration σ4 Figure 1: A Wireless Network and its four possible configurations transmitted over a link if it is ON. Moreover, since the links are assumed to be point-to-point, even if both the links ra and rb are ON at a slot t (i.e., σ(t) = σ3 ), a packet can be transmitted over one of the links only. Hence, the sets of feasible activations are given as follows:     0 1 }, }, Mσ2 = { Mσ 1 = { 1 0     1 0 , }, Mσ4 = φ. Mσ 3 = { 0 1 Here the first coordinate corresponds to activating the edge ra and the second coordinate corresponds to activating the edge rb. To illustrate the effect of link-correlations on broadcastcapacity, we consider three different joint-distributions p(σ), all of them having the following marginal 1 2 1 p(rb = ON) = p(rb = OFF) = 2 p(ra = ON) = p(ra = OFF) = Case 1: Zero correlations. In this case, the links ra and rb are ON w.p. dently at every slot, i.e., p(σi ) = 1/4, Configuration σ1 indepen- i = 1, 2, 3, 4 (14) It can be easily seen that the broadcast capacity, as given in Eqn. (13), is achieved when in configurations σ1 and σ2 , the edges ra and rb are activated w.p. 1 respectively and in the configuration σ3 the edges ra and rb are activated with probability 12 and 12 . In other words, an optimal activation schedule of a corresponding stationary randomized policy is given as follows: βσ∗1 = 1 Wireless network 1 2 ′ 0 , βσ∗2 = 0 1 ′ 2 ′ 1 1 , βσ∗3 = 2 The optimal broadcast capacity can be computed from Eqn. (13) to be λ∗ = 14 + 0 + 14 × 21 = 38 . Case 2: Positive correlations. In this case, assume that the edges ra and rb are positively correlated, i.e., we have Configuration σ2 Configuration σ3 Consider the simple wireless network shown in Figure (1), with node r being the source. The possible network configurations σi , i = 1, 2, 3, 4 are also shown. One packet can be p(σ1 ) = p(σ2 ) = 0; p(σ3 ) = p(σ4 ) = 1 2 Then it is clear that half of the slots are wasted when both the links are OFF (i.e., in the configuration σ4 ). When the network is in configuration σ3 , an optimal randomized activation is to choose one of the two links uniformly at random and send packets over it. Thus 1 1 ′ βσ∗3 = 2 2 The optimal broadcast-capacity, computed from Eqn. (13) is λ∗ = 14 . Case 3: Negative correlations. In this case, we assume that the edges ra and rb are negatively correlated, i.e., we have 1 ; p(σ3 ) = p(σ4 ) = 0 2 It is easy to see that in this case, a capacity-achieving activation strategy is to send packets over the link whichever is ON. The broadcast-capacity in this case is λ∗ = 21 , the highest among the above three cases. In this example, with an arbitrary joint distribution of networkconfigurations {p(σi ), i = 1, 2, 3, 4}, it is a matter of simple ∗ calculation to obtain the optimal activations βσ in Eqn. i (13). However it is clear that for an arbitrary network with arbitrary activations M and configuration sets Ξ, evaluating (13) is non-trivial. In the following section we study this problem under some simplifying assumptions. p(σ1 ) = p(σ2 ) = 3.3 Efficient Computation of Broadcast Capacity In this section we study the problem of efficient computation of the Broadcast Capacity λ∗ of a wireless DAG, given by Eqn. (13). In particular, we show that when the number of possible network configurations |Ξ|(n) grows polynomially with n (the number of nodes in the network), there exists a strongly polynomial-time algorithm to compute λ∗ under the primary-interference constraint. Polynomially-bounded network-configurations arise, for example, when the set Ξ(n) consists of all subgraphs of the graph G with at most d number of edges, for some fixed integer d. In this case |Ξ(n)| can be bounded as follows ! d X m = O(n2d ), |Ξ|(n) ≤ k k=0 2 where m(= O(n )) is the number of edges in the graph G. Theorem 3.2 (Efficient Computation of λ∗ ). Suppose that there exists a polynomial q(n) such that, for a wireless DAG network G with n nodes, the number of possible network configurations |Ξ|(n) is bounded polynomially in n, i.e., |Ξ|(n) = O(q(n)). Then, there exists a strongly poly − time algorithm to compute the broadcast-capacity of the network under the primary interference constraints. Although only polynomially many network configurations are allowed, we emphasize that Theorem (3.2) is highly nontrivial. This is because, each network-configuration σ ∈ Ξ itself contains exponentially many possible activations (matchings). The key combinatorial result that leads to Theorem (3.2) is the existence of an efficient separator oracle for the matching-polytope for any arbitrary graph [22]. We first reduce the problem of broadcast-capacity computation of a DAG to an LP with exponentially many constraints. Then invoking the above separator oracle, we show that this LP can be solved in strongly polynomial-time. Proof. See Appendix 9.1. 3.4 Simple Bounds on λ∗ Using Theorem (3.2) we can, in principle, compute the broadcast-capacity λ∗ of a wireless DAG with polynomially many network configurations. However, the complexity of the exact computation of λ∗ grows substantially with the number of the possible configurations |Ξ|(n). Moreover, Theorem (3.2) does not apply when |Ξ|(n) can no longer be bounded by a polynomial in n. A simple example of exponentially large |Ξ|(n) is when a link e is ON w.p. pe independently at every slot, for all e ∈ E. To address this issue, we obtain bounds on λ∗ , whose computational complexity is independent of the size of |Ξ|. These bounds are conveniently expressed in terms of the broadcastcapacity of the static network G(V, E) without time-variation, i.e. when |Ξ| = 1 and Eσ = E, σ ∈ Ξ. Let us denote the broadcast-capacity of the static network by λ∗stat . Specializing Eqn. (13) to this case, we obtain λ∗stat = max min uj · β. β∈conv(M) j∈V \{r} (15) Using Theorem (3.2), λ∗stat can be computed in poly-time under the primary-interference constraint. Now consider an arbitrary joint distribution p(σ) such that each link is ON uniformly with probability p, i.e., X p(σ) = p, ∀e ∈ E. (16) σ∈Ξ:σ(e)=1 We have the following bounds: Lemma 2 (Bounds on Broadcast Capacity). pλ∗stat ≤ λ∗ ≤ λ∗stat . Proof. See Appendix 9.3. Generalization of the above Lemma to the setting, where the links are ON with non-uniform probabilities, may also be obtained in a similar fashion. Note that, in our example 3.2 the bounds in Lemma 2 are tight. In particular, here the value of the parameter p = 21 , the lower-bound is attained in case (2) and the upper-bound is attained in case (3). The above lemma immediately leads to the following corollary: Corollary 3.3. (Approximation-algorithm for computing λ∗ ). Assume that, under the stationary distribution p(σ), probability that any link is ON is p, uniformly for all links. Then, there exists a poly-time p-approximation algorithm to compute the broadcastcapacity λ∗ of a DAG, under the primary-interference constraints. Proof. See Appendix 9.4. In the following section, we are concerned with designing a dynamic and throughput-optimal broadcast policy for a time-varying wireless DAG network. 4. THROUGHPUT-OPTIMAL BROADCAST POLICY FOR WIRELESS DAGS The classical approach of solving the throughput-optimal broadcast problem in the case of a static, wired network is to compute a set of edge-disjoint spanning trees of maximum cardinality (by invoking Edmonds’ tree-packing theorem [20]) and then routing the incoming packets to all nodes via these pre-computed trees [21]. In the time-varying wireless setting that we consider here, because of frequent and random changes in topology, routing packets over a fixed set of spanning trees is no-longer optimal. In particular, part of the network might become disconnected from time-totime, and it is not clear how to select an optimal set of trees to disseminate packets. The problem becomes even more complicated when the underlying statistical model of the network-connectivity process (in particular, the stationary distribution {p(σ), σ ∈ Ξ}) is unknown, which is often the case in mobile adhoc networks. Furthermore, wireless interference constraints add another layer of complexity, rendering the optimal dynamic broadcasting problem in wireless networks extremely challenging. In this section we propose an online, dynamic, throughputoptimal broadcast policy for time-varying wireless DAG networks, that does not need to compute or maintain any global topological structures, such as spanning trees. Interestingly, we show that the broadcast-algorithm that was proposed in [23] for static wireless network, generalizes well to the time-varying case. As in [23], our algorithm also enjoys the attractive feature of in-order packet delivery. The key difference between the algorithm in [23] and our dynamic algorithm is in link-scheduling. In particular, in our algorithm, the activation sets are chosen based on current networkconfiguration σ(t). 4.1 Throughput-Optimal Broadcast Policy π ∗ All policies π ∈ Π, that we consider in this paper, comprise of the following two sub-modules which are executed at every time-slot t: • π(A) (Activation-module): activates a subset of links, subject to the interference constraint and the current network-configuration σ(t). • π(S) (Packet-Scheduling module): schedules a subset of packets over the activated links. Following the treatment in [23], we first restrict our attention to a sub-space Πin−order , in which the broadcast-algorithm is required to follow the so-called in-order delivery property, defined as follows in−order Definition 3 (Policy-space Π [23]). A policy π belongs to the space Πin−order if all incoming packets are serially indexed as {1, 2, 3, . . .} according to their order of arrival at the source r and a node can receive a packet p at time t, if and only if it has received the packets {1, 2, , . . . , p − 1} by the time t. As a consequence of the in-order delivery, the state of received packets in the network at time-slot t may be succinctly represented by the n-dimensional vector R(t), where Ri (t) denotes the index of the latest packet received by node i by time t. We emphasize that this succinct network-state representation by the vector R(t) is valid only under the action of policies in the space Πin−order . This compact representation of the packet-state results in substantial simplification of the overall state-space description. This is because, to completely specify the current packet-configurations in the network in the general policy-space Π, we need to specify the identity of each individual packets that are received by different nodes. To exploit the special structure that a directed acyclic graph offers, it would be useful to constrain the packet-scheduler π(S) further to the following policy-space Π∗ ⊂ Πin−order . Definition 4 (Policy-space Π∗ ⊂ Πin−order [23]). A broadcast policy π belongs to the space Π∗ if π ∈ Πin−order and π satisfies the additional constraint that a packet p can be received by a node j at time t if all in-neighbours of the node j have received the packet p by the time t. The above definition is further illustrated in Figure 2. The variables Xj (t) and i∗t (j) appearing in the Figure are defined subsequently in Eqn. (19). It is easy to see that for all policies π ∈ Π∗ , the packet Ra (t) = 18 Rj (t) = 10 Rb (t) = 15 Rc (t) = 14 Figure 2: Under a policy π ∈ Π∗ , the set of packets available for transmission to node j at slot t is {11, 12, 13, 14}, which are available at all in-neighbors of node j. The in-neighbor of j inducing the smallest packet deficit is i∗t (j) = c, and Xj (t) = 4. scheduler π(S) is completely specified. Hence, to specify a policy in the space Π∗ , we need to define the activationmodule π(A) only. Towards this end, let µij (t) denote the rate (in packets per slot) allocated to the edge (i, j) in the slot t by a policy π ∈ Π∗ , for all (i, j) ∈ E. Note that, the allocated rate µ(t) is constrained by the current network configuration σ(t) at slot t. In other words, we have µ(t) ∈ c ⊙ Mσ(t) , ∀t (17) This implies that, under any randomized activation Eµ(t) ∈ c ⊙ conv(Mσ(t) ), ∀t (18) In the following lemma, we show that for all policies π ∈ Π∗ , certain state-variables X(t), derived from the state-vector R(t), satisfy so-called Lindley recursion [15] of queuing theory. Hence these variables may be thought of as virtual queues. This technical result will play a central role in deriving a Max-Weight type throughput-optimal policy π ∗ , which is obtained by stochastically stabilizing these virtual-queues. For each j ∈ V \ {r}, define Xj (t) = min Ri (t) − Rj (t) i∈∂ in (j) i∗t (j) = arg min i∈∂ in (j)   Ri (t) − Rj (t) , (19) (20) where in Eqn. (20), ties are broken lexicographically. The variable Xj (t) denotes the minimum packet deficit of node j with respect to any of its in-neighbours. Hence, from the definition of the policy-space Π∗ , it is clear that Xj (t) is the maximum number of packets that a node j can receive from its in-neighbours at time t, under any policy in Π∗ . The following lemma proves a “queuing-dynamics” of the variables Xj (t), under any policy π ∈ Π∗ . Lemma 3 have ([23]). Under all policies in π ∈ Π∗ , we  Xj (t + 1) ≤ Xj (t) − + X µkj (t) k∈∂ in (j) X + µmi∗t (j) (t) account the time-variation of network configurations, which is the focus of this paper. To describe π ∗ (A), we first define the node-set Kj (t) = {m ∈ ∂ out (j) : j = i∗t (m)} where the variables are defined earlier in Eqn. (20). The activation-module π (A) is described in Algorithm 1. The resulting policy in the space Π∗ with the activationmodule π ∗ (A) is called π ∗ . Note that, in steps (1) and (2) above, the computation Algorithm 1 A Throughput-optimal Activation Module π ∗ (A) 1: To each link (i, j) ∈ E, assign a weight as follows: ( P Xj (t) − k∈Kj (t) Xk (t), if σ(i,j) (t) = 1 (23) Wij (t) = 0, o.w. 2: Select an activation s∗ (t) ∈ Mσ(t) as follows:  s∗ (t) ∈ arg max s · c ⊙ W (t) s∈Mσ(t) (21) m∈∂ in (i∗ t (j))  Lemma (3) shows that the variables Xj (t), j ∈ V \ {r} ∗ satisfy Lindley recursions in the policy-space Π . Interestingly, unlike the corresponding unicast problem [25], there is no “physical queue” in the system. Continuing correspondence with the unicast problem, the next lemma shows that any activation module π(A) that “stabilizes” the virtual queues X(t) for all arrival rates λ < λ∗ , constitutes a throughput optimal broadcast-policy for a wireless DAG network. Lemma 4. Suppose that, the underlying topology of the wireless network is a DAG. If under the action of a broadcast policy π ∈ Π∗ , for all arrival rates λ < λ∗ , the virtual queue process {X(t)}∞ 0 is rate-stable, i.e., X 1 lim sup Xj (T ) = 0, w.p. 1, T →∞ T j6=r then π is a throughput-optimal broadcast policy for the DAG network. Proof. See Appendix (9.5). Equipped with Lemma (4), we now set out to derive a dynamic activation-module π ∗ (A) to stabilize the virtual-queue ∗ process {X(t)}∞ 0 for all arrival rates λ < λ . Formally, the ∗ structure of the module π (A) is given by a mapping of the following form: π ∗ (A) : (X(t), σ(t)) → Mσ(t) Thus, the module π ∗ (A) is stationary and dynamic as it depends on the current value of the state-variables and the network-configuration only. This activation-module is different from the policy described in [23] as the latter is meant for static wireless networks and hence, does not take into (22) i∗t (m) ∗ (24) 3: Allocate rates on the links as follows: µ∗ (t) = c ⊙ s∗ (t) (25) of link-weights and link-activations depend explicitly on the current network-configuration σ(t). As anticipated, in the following lemma, we show that the activation-module π ∗ (A) stochastically stabilizes the virtual-queue process {X(t)}∞ 0 . Lemma 5. For all arrival rates λ < λ∗ , under the action of the policy π ∗ in a DAG, the virtual-queue process {X(t)}∞ 0 is rate-stable, i.e., 1 X Xj (T ) = 0, w.p. 1 lim sup T →∞ T j6=r The proof of this lemma is centered around a Lyapunovdrift argument [18]. Its complete proof is provided in Appendix (9.6). Combining the lemmas (4) and (5), we immediately obtain the main result of this section Theorem 4.1. The policy π ∗ is a throughput-optimal broadcast policy in a time-varying wireless DAG network. 5. THROUGHPUT-OPTIMAL BROADCASTING WITH INFREQUENT INTER-NODE COMMUNICATION In practical mobile wireless networks, it is unrealistic to assume knowledge of network-wide packet-state information by every node at every slot. This is especially true in the case of time-varying wireless networks, where network-connectivity changes frequently. In this section we extend the main results of section 4 by considering the setting where the nodes make control decisions with imperfect packet-state information that they currently possess. We will show that the dynamic broadcast-policy π ∗ retains its throughput-optimality even in this challenging scenario. State-Update Model. We assume that two nodes i and j can mutually update their knowledge of the set of packets received by the other node, only at those slots with positive probability, when the corresponding wireless-link (i, j) is in ON state. Otherwise, it continues working with the outdated packet stateinformation. Throughout this section, we assume that the nodes have perfect information about the current networkconfiguration σ(t). Suppose that, the latest time prior to time t when packetstate update was made across the link (i, j) is t − T(i,j) (t). Here T(i,j) (t) is a random variable, supported on the set of non-negative integers. Assume for simplicity, that the network configuration process {σ(t)}∞ 0 evolves according to a finite-state, positive recurrent Markov-Chain, with the stationary distribution {p(σ) > 0, σ ∈ Ξ}. With this assumption, T(i,j) (t) is related to the first-passage time in the finite-state positive recurrent chain {σ(t)}∞ 0 . Using standard theory P [7], it can be shown that the random variable T (t) ≡ (i,j)∈E T(i,j) (t) has bounded expectation for all time t . Analysis of π ∗ with Imperfect Packet-State Information. Consider running the policy π ∗ , where each node j now computes the weights Wij′ (t), given by Eqn.(23), of the incoming links (i, j) ∈ E, based on the latest packet-state information available to it. In particular, for each of its in-neighbour i ∈ ∂ in (j), the node j possess the following information of the number of packets received by node i: Ri′ (t) = Ri (t − T(ij) (t)) (26) ′ Now, if the packet-scheduler module π (S) of a broadcastpolicy π ′ takes scheduling decision based on the imperfect state-information R′ (t) (instead of the true state R(t)), it still retains the following useful property: Lemma 6. π ′ ∈ Π∗ . Figure 3: A 3 × 3 grid network. Wij′ (t), used by policy π ′ and the true link-weights Wij (t), as follows Lemma 7. There exists a finite constant C such that, the expected weight Wij′ (t) of the link (ij), locally computed by the node j using the random update process, differs from the true link-weight Wij (t) by at most C, i.e. |EWij′ (t) − Wij (t)| ≤ C (27) The expectation above is taken with respect to the random packet-state update process. Proof. See Appendix (9.8) From lemma (7) it follows that the policy π ′ , in which link-weights are computed using imperfect packet-state information is also a throughput-optimal broadcast policy for a wireless DAG. Its proof is very similar to the proof of Theorem (4.1). However, since the policy π ′ makes scheduling decision using W ′ (t), instead of W (t), we need to appropriately bound the differences in drift using the Lemma (7). The technical details are provided in Appendix (9.9). Theorem 5.1. The policy π ′ is a throughput-optimal broadcast algorithm in a time-varying wireless DAG. Proof. See Appendix (9.7). The above lemma states that the policy π ′ inherits the inorder delivery property and the in-neighbour packet delivery constraint of the policy-space Π∗ . From Eqn. (23) it follows that, computation of linkweights {Wij (t), i ∈ ∂ in (j)} by node j requires packet-state information of the nodes that are located within 2-hops from the node j. Thus, it is natural to expect that with an ergodic state-update process, the weights Wij′ (t), computed from the imperfect packet-state information, will not differ too much from the true weights Wij (t), on the average. Indeed, we can bound the difference between the link-weights 6. NUMERICAL SIMULATION We numerically simulate the performance of the proposed dynamic broadcast-policy on the 3 × 3 grid network, shown in Figure 3. All links are assumed to be of unit capacity. Wireless link activations are subject to primary interference constraints, i.e., at every slot, we may activate a subset of links which form a Matching [28] of the underlying topology. External packets arrive at the source node r according to a Poisson process of rate λ packets per slot. The following proposition shows that, the broadcast capacity λ∗stat of the static 3 × 3 wireless grid (i.e., when all links are ON with probability 1 at every slot) is 25 . 7. CONCLUSION Proposition 6.1. The broadcast-capacity λ∗stat of the static 3 × 3 wireless grid-network in Figure 3 is 25 . ′ Average Broadcast-Delay Dpπ (λ) See Appendix (9.10) for the proof. In our numerical simulation, the time-variation of the network is modeled as follows: link-states are assumed to evolving in an i.i.d. fashion; each link is ON with probability p at every slot, independent of everything else. Here 0 < p ≤ 1 is the connectivity-parameter of the network. Thus, for p = 1 we recover the static network model of [23]. We also assume that the nodes have imperfect packet-state information as in Section 5. Hence, two nodes i and j can directly exchange packet state-information, only when the link (i, j) (if any) is ON. ′ The average broadcast-delay Dpπ (λ) is plotted in Figure 4 as a function of the packet arrival rate λ. The broadcastdelay of a packet is defined as the number of slots the packet takes to reach all nodes in the network after its arrival. Because of the throughput-optimality of the policy π ′ (Theorem (5.1)), the broadcast-capacity λ∗ (p) of the network, for a given value of p, may be empirically evaluated from the ′ λ-intercept of vertical asymptote of the Dpπ (λ) − λ curve. As evident from the plot, for p = 1, the proposed dynamic algorithm achieves all broadcast rates below λ∗stat = 25 = 0.4. This shows the throughput-optimality of the algorithm π ′ . It is evident from the Figure 4 that the broadcast capacity λ∗ (p) is non-decreasing in the connectivity-parameter p, i.e., λ∗ (p1 ) ≥ λ∗ (p2 ) for p1 ≥ p2 . We observe that, with i.i.d. connectivity, the capacity bounds given in Lemma (2) are not tight, in general. Hence the lower-bound of pλ∗stat is a pessimistic estimate of the actual broadcast capacity ′ λ∗ (p) of the DAG. The plot also reveals that, Dpπ (λ) is nondecreasing in λ for a fixed p and non-increasing in p for a fixed λ, as expected. p = 0.4 p = 0.6 p=1 Packet Arrival Rate λ ′ Figure 4: Plot of average broadcast-delay Dpπ (λ), as a function of the packet arrival rates λ. The underlying wireless network is the 3 × 3 grid, shown in Figure 3, with primary interference constraints. In this paper we studied the problem of throughput-optimal broadcasting in wireless directed acyclic networks with pointto-point links and time-varying connectivity. We characterized the broadcast-capacity of such networks and derived efficient algorithms for computing it, both exactly and approximately. Next, we proposed a throughput-optimal broadcast policy for such networks. This algorithm does not require any spanning tree to be maintained and operates based on local information, which is updated sporadically. The algorithm is robust and does not require statistics of the arrival or the connectivity process, thus making it useful for mobile wireless networks. The theoretical results are supplemented with illustrative numerical simulations. Future work would be to remove the restriction of the directed acyclic topology. It would also be interesting design broadcast algorithms for wireless networks with point-to-multi-point links. 8. REFERENCES [1] P. Agrawal and N. Patwari. Correlated link shadow fading in multi-hop wireless networks. Wireless Communications, IEEE Transactions on, 8(8):4024–4036, 2009. [2] D. Bertsimas and J. N. Tsitsiklis. Introduction to linear optimization, volume 6. Athena Scientific Belmont, MA, 1997. [3] A. Beygelzimer, A. Kershenbaum, K.-W. Lee, and V. Pappas. The benefits of directional antennas in heterogeneouswireless ad-hoc networks. In Mobile Ad Hoc and Sensor Systems. MASS 2008. 5th IEEE International Conference on, pages 442–449. IEEE. [4] Y. Chu, S. Rao, S. Seshan, and H. Zhang. Enabling conferencing applications on the internet using an overlay muilticast architecture. ACM SIGCOMM computer communication review, 31(4):55–67, 2001. [5] S. Dasgupta, C. H. Papadimitriou, and U. Vazirani. Algorithms. McGraw-Hill, Inc., 2006. [6] R. Diestel. Graph theory. Grad. Texts in Math, 2005. [7] R. G. Gallager. Discrete stochastic processes, volume 321. Springer Science & Business Media, 2012. [8] R. Gandhi, S. Parthasarathy, and A. Mishra. Minimizing broadcast latency and redundancy in ad hoc networks. In Proceedings of the 4th ACM international symposium on Mobile ad hoc networking & computing, pages 222–232. ACM, 2003. [9] M. Ge, S. V. Krishnamurthy, and M. Faloutsos. Overlay multicasting for ad hoc networks. In Proceedings of Third Annual Mediterranean Ad Hoc Networking Workshop, 2004. [10] T. Ho and H. Viswanathan. Dynamic algorithms for multicast with intra-session network coding. In Proc. 43rd Annual Allerton Conference on Communication, Control, and Computing, 2005. [11] S. C. Huang, P.-J. Wan, X. Jia, H. Du, and W. Shang. Minimum-latency broadcast scheduling in wireless ad hoc networks. In 26th IEEE INFOCOM 2007. [12] L. Junhai, Y. Danxia, X. Liu, and F. Mingyu. A survey of multicast routing protocols for mobile ad-hoc networks. Communications Surveys Tutorials, IEEE, 11(1):78–91, First 2009. [13] A. Kamthe, M. A. Carreira-Perpiñán, and A. E. Cerpa. Improving wireless link simulation using [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] 9. multilevel markov models. ACM Trans. Sen. Netw., 10(1):17:1–17:28, Dec. 2013. X. Lin, N. Shroff, and R. Srikant. A tutorial on cross-layer optimization in wireless networks. Selected Areas in Communications, IEEE Journal on, 24(8):1452–1463, Aug 2006. D. V. Lindley. The theory of queues with a single server. In Mathematical Proceedings of the Cambridge Philosophical Society, volume 48, pages 277–289. Cambridge Univ Press, 1952. J. Macker, J. Klinker, and M. Corson. Reliable multicast data delivery for military networking. In Military Communications Conference, 1996. MILCOM ’96, Conference Proceedings, IEEE, volume 2, pages 399–403 vol.2, Oct 1996. J. Matoušek. Lectures on discrete geometry, volume 108. Springer New York, 2002. M. J. Neely. Stochastic network optimization with application to communication and queueing systems. Synthesis Lectures on Communication Networks, 3(1):1–211, 2010. N. Patwari and P. Agrawal. Effects of correlated shadowing: Connectivity, localization, and rf tomography. In Information Processing in Sensor Networks, 2008. IPSN’08. International Conference on, pages 82–93. IEEE, 2008. R. Rustin. Combinatorial Algorithms. Algorithmics Press, 1973. S. Sarkar and L. Tassiulas. A framework for routing and congestion control for multicast information flows. Information Theory, IEEE Transactions on, 48(10):2690–2708, 2002. A. Schrijver. Combinatorial optimization: polyhedra and efficiency, volume 24. Springer, 2003. A. Sinha, G. Paschos, C. ping Li, and E. Modiano. Throughput-optimal broadcast on directed acyclic graphs. In Computer Communications (INFOCOM), 2015 IEEE Conference on, pages 1248–1256. D. Smith. Ip tv bandwidth demand: Multicast and channel surfing. In INFOCOM 2007. 26th IEEE International Conference on Computer Communications. IEEE, pages 2546–2550, May 2007. L. Tassiulas and A. Ephremides. Stability properties of constrained queueing systems and scheduling policies for maximum throughput in multihop radio networks. Automatic Control, IEEE Transactions on, 37(12):1936–1948, 1992. D. Towsley and A. Twigg. Rate-optimal decentralized broadcasting: the wireless case, 2008. D. Tse and P. Viswanath. Fundamentals of wireless communication. Cambridge university press, 2005. D. B. West et al. Introduction to graph theory, volume 2. Prentice hall Upper Saddle River, 2001. J. Yuan, Z. Li, W. Yu, and B. Li. A cross-layer optimization framework for multihop multicast in wireless mesh networks. Selected Areas in Communications, IEEE Journal on, 24(11), 2006. APPENDIX 9.1 Proof of Theorem 3.2 Under the primary interference constraint, the set of feasible activations of the graphs are matchings [28]. To solve for the optimal broadcast capacity in a time-varying network, first we recast Eqn. (13) as an LP. Although this LP has exponentially many constraints, using a well-known separation oracle for matchings, we show how to solve this LP in strongly-polynomial time via the ellipsoid algorithm [2]. ′ For a subset of edges E ′ ⊂ E, let χE be the incidence ′ vector, where χE (e) = 1 if e ∈ E ′ and is zero otherwise. Let Pmatching (G(V, E)) = convexhull({χM |M is a matching in G(V, E)}) We have the following classical result by Edmonds [22]. Theorem 9.1. The set Pmatching (G(V, E)) is characterized by the set of all β ∈ R|E| such that : X βe ≥ 0 ∀e ∈ E βe ≤ 1 ∀v ∈ V βe ≤ (28) e∈∂ in (v)∪∂ out (v) X e∈E[U ] |U | − 1 ; 2 U ⊂ V, |U | odd Here E[U ] is the set of edge with both end points in U. Thus, following Eqn. (13), the broadcast capacity of a DAG can be obtained by the following LP : max λ (29) Subject to, λ ≤ X e∈∂ in (v) βσ ∈ ce X σ∈Ξ  p(σ)βσ,e , ∀v ∈ V \ {r} (30) Pmatching (G(V, Eσ )), ∀σ ∈ Ξ (31) The constraint corresponding to σ ∈ Ξ in (31) refers to the set of linear constraints given in Eqn.(28) corresponding to the graph G(V, Eσ ), for each σ ∈ Ξ. Invoking the equivalence of optimization and separation due to the ellipsoid algorithm [2], it follows that the LP (29) is solvable in poly-time, if there exists an efficient separatororacle for the set of constraints (30) and (31). With our assumption of polynomially many network configurations |Ξ|(n), there are only linearly many constraints (n − 1, to be precise) in (30) with polynomially many variables in each constraint. Thus the set of constraints (30) can be separated efficiently. Next we invoke a classic result from the combinatorial-optimization literature which shows the existence of efficient separators for the matching polytopes. Theorem 9.2. [22] There exists a strongly poly-time algorithm, that given G = (V, E) and β : E → R|E| determines if β satisfies (28) or outputs an inequality from (9.1) that is violated by β. Hence, there exists an efficient separator for each of the constraints in (9.1). Since there are only polynomially many network configurations, this directly leads to Theorem 3.2. 9.2 Proof of Lemma 1 Eqn. (37), (38) and Eqn. (38), we have Proof. Fix a time T . For each configuration σ ∈ Ξ, let σ be the index of the time-slots up to time T such {tσ,i }Ti=1 that σ(t) = σ. Clearly we have, X Tσ = T (32) u∈U T ր∞ = min u∈U σ∈Ξ = Hence, we can rewrite Tσ T X Tσ 1 X 1 X π sπ (tσ,i , σ) s (t, σ(t)) = T t=1 T T σ i=1 σ∈Ξ u· Since the process σ(t) is stationary ergodic, we have lim Tσ = p(σ), ∀σ ∈ Ξ, w.p. 1 T min lim inf u · u∈U T ր∞ = min u∈U X 1 T T X s (t, σ(t)) t=1 p(σ) lim inf u · T →∞ σ∈Ξ (36) Let an optimal solution to Eqn. (13) be obtained at  Ξ . Then from Eqn. (39), it follows that X p(σ)βσ∗ ∈ conv(M)  Tσ 1 X π s (tσ,i , σ) , Tσ i=1 w.p. 1 = min u∈U σ∈Ξ (37) ∈ π p(σ) lim u · ζσ,T σk k→∞ π p(σ) lim inf u · ζσ,T . σ Tσ →∞ π lim ζσ,T = βσπ , σk ∀σ ∈ Ξ Where βσπ ∈ Mσ , since Mσ is closed. Hence combining p(σ)βσ∗ σ∈Ξ max  min uj · β β∈conv(M) j∈V \{r} This proves the upper-bound. 9.3.2 Proof of the Lower-bound Since Mσ ⊂ M, the expression for the broadcast-capacity (13) may be re-written as follows: X X  p(σ)βσ (e)1(e ∈ σ) λ∗ = max min ce e∈∂ in (j) σ∈Ξ ∗ Let β ∈ M be the optimal activation, achieving the RHS of (15). Hence we can lower-bound λ∗ as follows X X  p(σ)1(e ∈ σ) λ∗ ≥ min ce β ∗ (e) j∈V \{r} e∈∂ in (j) p min j∈V \{r} X σ∈Ξ ce β ∗ (e) e∈∂ in (j) = p min uj · β ∗ (b) pλ∗stat = (38) X λ∗ ≤ λ∗stat βσ ∈M j∈V \{r} Let us denote k→∞ (39) βσ∗ , σ Using Eqn. (15), this shows that = X min uj · ≤ (a) σ∈Ξ w.p.1 ∀σ ∈ Ξ βσ ∈conv(Mσ ) j∈V \{r} Since s (tσ,i , σ) ∈ Mσ for all i ≥ 1, convexity of the set Mσ π ∈ Mσ for all Tσ ≥ 1. Since the set Mσ implies that ζσ,T σ is closed and bounded (and hence, compact) any sequence in Mσ has a converging sub-sequence. Consider any set of π } , σ ∈ Ξ such that, it converging sub-sequences {ζσ,T σk k≥1 achieves the following u∈U  βσ ∈ conv(Mσ ) =⇒ βσ ∈ conv(M) max π min σ∈Ξ Mσ ⊂ M,  Tσ 1 X π = s (tσ,i , σ) Tσ i=1 X p(σ)βσπ σ∈Ξ Since p(σ) > 0, ∀σ ∈ Ξ, the above implies that Tσ ր ∞ as T ր ∞∀σ, w.p.1. In the rest of the proof we will concentrate on a typical sample path {σ(t)}t≥1 having the above property. π } For each σ ∈ Ξ, define the sequence {ζσ,T σ Tσ ≥1 π ζσ,T σ u∈U X Hence we have, π  min u · Proof. 9.3.1 Proof of the Upper-bound Note that, for all σ ∈ Ξ, we have Eσ ⊂ E. Hence, it follows that (35) Hence from Eqn. (34) we have,  σ∈Ξ This in turn implies that Using countability of Ξ and invoking the union bound, we can strengthen the above conclusion as follows T →∞ p(σ)u · βσπ 9.3 Proof of Lemma 2  X   Tσ T Tσ 1 X π 1 X π s (t, σ(t)) = u· s (tσ,i , σ) (34) T t=1 T Tσ i=1 σ∈Ξ Tσ = p(σ), w.p. 1 ∀σ ∈ Ξ lim T →∞ T X  T 1 X π s (t, σ(t)) T t=1 (33) Hence,   min lim inf u · j∈V \{r} Equality (a) follows from the assumption (16) and equality (b) follows from the characterization (15). This proves the lower-bound. 9.4 Proof of Corollary 3.3 ∗ Consider the optimal randomized-activation vector β ∈ M, corresponding to the stationary graph G(V, E) (15). By Theorem (3.2), β ∗ can be computed in poly-time under the primary interference constraint. Note that, by Caratheodory’s theorem [17], the support of β ∗ may be bounded by |E|. Hence it follows that λ∗stat (15) may also be computed in poly-time. From the proof of Lemma (2), it follows that by randomly activating β ∗ (i.e., βσ (e) = β ∗ (e)1(e ∈ σ), ∀σ ∈ Ξ) we obtain a broadcast-rate equal to pλ∗stat where λ∗stat is shown to be an upper-bound to the broadcast capacity λ∗ in Lemma (2). Hence it follows that pλ∗stat constitutes a p-approximation to the broadcast capacity λ∗ , which can be computed in poly-time. Since P the variables Xi (t)’s are non-negative, we have j6=r Xj (t). Thus, for each node j Pk−1 i=1 Xui (t) ≤ T −1 T −1 1 X 1 X 1 1 X A(t) − A(t). Xj (T ) ≤ Rj (T ) ≤ T t=0 T T T t=0 j6=r Taking limit as T → ∞ and using the strong law of large numbers for the arrival process and Eqn. (40), we have Rj (T ) = λ, ∀j. T This concludes the proof. lim w.p. 1 T →∞ 9.6 Proof of Lemma (5) We begin with a preliminary lemma. Lemma 8. If we have 9.5 Proof of Lemma (4) Assume that under the policy π ∈ Π∗ , the virtual queues Xj (t) are rate stable i.e., limT →∞ Xj (T )/T = 0, a.s. for all j. Applying union-bound, it follows that, P j6=r Xj (T ) = 0, w.p. 1 (40) lim T →∞ T Now consider any node j 6= r in the network. We can construct a simple path p(r = uk → uk−1 . . . → u1 = j) from the source node r to the node j by running the following Path construction algorithm on the underlying graph G(V, E). Q(t + 1) ≤ (Q(t) − µ(t))+ + A(t) (42) + where all the variables are non-negative and (x) = max{x, 0}, then Q2 (t + 1) − Q2 (t) ≤ µ2 (t) + A2 (t) + 2Q(t)(A(t) − µ(t)). Proof. Squaring both sides of Eqn. (42) yields, Q2 (t + 1) ≤ (Q(t) − µ(t))+ 2 + A2 (t) + 2A(t)(Q(t) − µ(t))+ ≤ (Q(t) − µ(t))2 + A2 (t) + 2A(t)Q(t), 2 where we use the fact that x2 ≥ (x+ ) , Q(t) ≥ 0, and µ(t) ≥ 0. Rearranging the above inequality finishes the proof. Algorithm 2 r → j Path Construction Algorithm Require: DAG G(V, E), node j ∈ V 1: i ← 1 2: ui ← j 3: while ui 6= r do 4: ui+1 ← i∗t (ui ); 5: i← i+1 6: end while Applying Lemma 8 to the dynamics (21) of Xj (t) yields, for each node j 6= r, Xj2 (t + 1) − Xj2 (t) ≤ B(t) + X X  2Xj (t) µkj (t) , µmi∗t (t) − m∈V At time t, the algorithm chooses the parent of a node ui in the path p as the one that has the least relative packet deficit as compared to ui (i.e. ui+1 = i∗t (ui )). Since the underlying graph G(V, E) is a connected DAG (i.e., there is a path from the source to every other node in the network), the above path construction algorithm always terminates with a path p(r → j). Note that the output path of the algorithm varies with time. The number of distinct packets received by node j up to time T can be written as a telescoping sum of relative packet deficits along the path p, i.e., =  − = − i=1 Xui (T ) + T −1 X X  X µmi∗t (t) (45) E[µij (t) | X(t), σ(t)] Xj (t) (46) Xj (t)E m∈V µkj (t) | X(t), σ(t) k∈V Xui (T ) + Rr (T ) k−1 X X j6=r = B|V | − 2 i=1 (a) ∆(X(t)|σ(t)) , E[L(X(t + 1) − L(X(t)) | X(t), σ(t)]   X Xj2 (t + 1) − Xj2 (t) | X(t), σ(t) = E Rui (T ) − Rui+1 (T ) + Ruk (T ) i=1 =− where B(t) ≤ c2max + max{a2 (t), c2max } ≤ (a2 (t) + 2c2max ), a(t) is the number of exogenous packet arrivals in a slot, and cmax , maxe∈E ce is the maximum capacity of the links. We assume the arrival process a(t) has bounded second moments; thus, there exists a finite constant B > 0 such that E[B(t)] ≤ E a2 (t) + 2c2max < B. the quadratic Lyapunov function L(X(t)) = PWe define 2 j6=r Xj (t). From (43), the one-slot Lyapunov drift ∆(X(t)), conditioned on the current network-configuration σ(t) yields ≤ B|V | + 2 k−1 X (44) k∈V j6=r Rj (T ) = Ru1 (T ) k−1 X (43) X  (i,j)∈E A(t), t=0 where the equality (a) follows the observation that Xui (T ) = Qui+1 ui (T ) = Rui+1 (T ) − Rui (T ). (41) − X Xk (t) k∈Kj (t) = B|V | − 2 X  (i,j)∈E Wij (t)E[µij (t) | X(t), σ(t)] (47) The broadcast-policy π ∗ is chosen to minimize the upperbound of conditional-drift, given on the right-hand side of (47) among all policies in Π∗ . Next, we construct a randomized scheduling policy π RAND ∈ ∗ ∗ Π . Let βσ ∈ conv(Mσ ) be the part of an optimal solution corresponding to σ(t) ≡ σ given by Eqn. 11. From Caratheodory’s theorem [17], there exist at most (|E| + 1) link-activation vectors sk ∈ σ and the associated nonPM |E|+1 negative scalars {ασk } with k=1 ασk = 1, such that |E|+1 βσ∗ = X ασk sσk . (48) k=1 Define the average (unconditional) activation vector X p(σ)βσ∗ β∗ = Note that this stationary randomized policy π RAND operates independently of the state of received packets in the network, i.e., X(t). However it depends on the current network-configuration σ(t). Since each network node j is relabelled as vl for some l, from (53) we have, for each node j 6= r, the total expected incoming transmission rate to the node j under the policy π RAND , averaged over all network states σ satisfies RAND X E[µπij X (t) | X(t)] = RAND E[µπij (t)] i:(i,j)∈E i:(i,j)∈E X = ql ce βe∗ e∈EUv l l . =λ+ǫ |V | (49) σ∈Ξ (54) Hence, from Eqn. (11) we have, λ∗ ≤ min U : a proper cut X ce βe∗ . (50) e∈EU Suppose that the exogenous packet arrival rate λ is strictly less than the broadcast capacity λ∗ . There exists an ǫ > 0 such that λ + ǫ ≤ λ∗ . From (50), we have X λ+ǫ≤ min ce βe∗ . (51) U : a proper cut e∈EU For any network node v 6= r, consider the proper cuts Uv = V \ {v}. Specializing the bound in (51) to these cuts, we have X λ+ǫ ≤ ce βe∗ , ∀v 6= r. (52) Equation (54) shows that the randomized policy π RAND provides each network node j 6= r with the total expected incoming rate strictly larger than the packet arrival rate λ via proper random link activations conditioned on the current network configuration. According to our notational convention, we have RAND X E[µπir (t) | X(t)] = E[ X RAND µπir (t)] = λ. i:(i,r)∈E i:(i,r)∈E (55) From (54) and (55), if node i appears before node j in the aforementioned topological ordering, i.e., i = vli < vlj = j for some li < lj , then e∈EUv Since the underlying network topology G = (V, E) is a DAG, there exists a topological ordering of the network nodes so that: (i) the nodes can be labelled serially as {v1 , . . . , v|V | }, where v1 = r is the source node with no in-neighbours and v|V | has no outgoing neighbours and (ii) all edges in E are directed from vi → vj , i < j [5]; From (52), we define ql ∈ [0, 1] for each node vl such that X l ql ce βe∗ = λ + ǫ , l = 2, . . . , |V |. (53) |V | e∈E Uv l Consider the randomized broadcast policy π RAND ∈ Π∗ working as follows: Stationary Randomized Policy π RAND : (i) If the observed network-configuration at slot t is σ(t) = σ, the policy π RAND selects 3 the feasible activation set sσk with probability ασk ; (ii) For each incoming selected link e = (·, vl ) to node vl such that se (t) = 1, the link e is activated independently with probability ql ; (iii) Activated links (note, not necessarily all the selected links) are used to forward packets, subject to the constraints that define the policy class Π∗ (i.e., in-order packet delivery and that a network node is only allowed to receive packets that have been received by all of its in-neighbors). X RAND E[µπki X RAND E[µπkj (t)] k:(k,j)∈E k:(k,i)∈E ≤− (t)] − ǫ . |V | (56) The above inequality will be used to show the throughput optimality of the policy π ∗ . The drift inequality (45) holds for any policy π ∈ Π∗ . The broadcast policy π ∗ observes the states (X(t), σ(t)) and and seek to greedily minimize the upper-bound of drift (47) at every slot. Comparing the actions taken by the policy π ∗ with those by the randomized policy π RAND in slot t in (45), we have ∗ ∆π (X(t)|σ(t)) X  π∗ E µij (t) | X(t), σ(t)]Wij (t) ≤ B|V | − 2 (57) (i,j)∈E ≤ B|V | − 2 X (i,j)∈E (∗) = B|V | − 2 X  RAND E µπij (t) | X(t), σ(t)]Wij (t) (i,j)∈E  RAND E µπij (t) | σ(t)]Wij (t) Taking Expectation of both sides w.r.t. (58) the stationary- i.e., process σ(t) and rearranging, we have ∗ ∆π (X(t)) (59) X ≤ B|V | − 2 E (i,j)∈E ≤ B|V | + 2 X  Xj (t) j6=r Xj (t) − cmax ET ≤ EXj′ (t) ≤ Xj (t) X m∈V 2ǫ X Xj (t). ≤ B|V | − |V | Where the expectation is with respect to the random update  fashion, since every in πRAND  X  πRAND  process at the node j. In a similar neighbour i of a node k ∈ ∂ out (j), is at most 2-hop away E µkj (t) E µmi∗t (t) − from the node j, we have k∈V (60) Ri (t) − T cmax ≤ Ri′ (t) ≤ Ri (t) j6=r Note that i∗t = arg mini∈In(j) Qij (t) for a given node j. Since node i∗t is an in-neighbour of node j, i∗t must lie before j in any topological ordering of the DAG. Hence, the last inequality of (60) follows directly from (56). Taking expectation in (60) with respect to X(t), we have     2ǫ E L(X(t + 1)) − E L(X(t)) ≤ B|V | − E||X(t)||1 , |V | where || · ||1 is the ℓ1 -norm of a vector. Summing the above inequality over t = 0, 1, 2, . . . T − 1 yields T −1 2ǫ X E L(X(T )) − E L(X(0)) ≤ B|V |T − E||X(t)||1 . |V | t=0   (64) RAND µπij (t)]Wij (t)   Dividing the above by 2T ǫ/|V | and using L(X(t)) ≥ 0, we have T −1 1 X B|V |2 |V | E[L(X(0))] E||X(t)||1 ≤ + T t=0 2ǫ 2T ǫ Rk (t) − T cmax ≤ Rk′ (t) ≤ Rk (t) It follows that for all i ∈ ∂ in (k) (Ri (t) − Rk (t)) − T cmax ≤ ≤ Ri′ (t) − Rk′ (t) (Ri (t) − Rk (t)) + T cmax Hence, Xk (t) − T cmax ≤ Xk′ (t) ≤ Xk (t) + T cmax Again taking expectation w.r.t. the random packet-state update process, Xk (t) − cmax ET ≤ EXk′ (t) ≤ Xk (t) + cmax ET (65) Combining Eqns (64) and (65) using Linearity of expectation and using Eqn. (23) we have Taking a lim sup of both sides yields T −1 B|V |2 1 XX E[Xj (t)] ≤ T t=0 j6=r 2ǫ Also, (61) −ncmax ET + Wij (t) ≤ EWij′ (t) ≤ Wij (t) + ncmax ET which implies that all virtual-queues Xj (t) are strongly stable [18]. Strong stability of Xj (t) implies that all virtual queues Xj (t) are rate stable [18, Theorem 2.8]. Thus the lemma (7) follows with C ≡ ncmax ET < ∞. 9.7 Proof of Lemma (6) To prove throughput-optimality of TheoremP (5.1), we work with the same Lyapunov function L(X(t)) = j6=r Xj2 (t) as in Theorem (4.1) and follow the same steps until Eqn. (47) to obtain the following upper-bound on conditional drift lim sup T →∞ Proof. Recall the definition of the policy-space Π∗ . For every node i, since Ri (t) is a non-decreasing function of t, if a packet p is allowed to be transmitted to a node j at time slot t, by the policy π ′ , it is certainly allowed to be transmitted by the policy π. This is because Ri′ (t) ≤ Ri (t), ∀j ∈ ∂ out (i) and hence outdated state-information may only prevent transmission of a packet p at a time t, which would otherwise be allowed by the policy π ∗ . As a result, the policy π ′ can never transmit a packet to node j which is not present at all in-neighbours of the node j. This shows that π ′ ∈ Π∗ . 9.8 Proof of Lemma (7) 9.9 Proof of Theorem (5.1) ′ ∆π (X(t)|X(t), X ′ (t), σ(t)) X ′ Wij (t)E(µπij (t)|X(t), X ′ (t), σ(t)) ≤ B|V | − 2 (i,j)∈E (66) Since the policy π ′ makes scheduling decision based on the locally computed weights Wij′ (t), by the definition of the policy π ′ , we have for any policy π ∈ Π: Consider the packet-state update process at node j. Since the capacity of the links are bounded by cmax , from Eqn. (26) and the fact that Ri (t) is non-decreasing, we have Ri (t) − T cmax ≤ Ri′ (t) in ≤ Ri (t), ∀i ∈ ∂ (j) (62) (63) ′ Wij′ (t)E(µπij (t)|X(t), X ′ (t), σ(t)) (i,j)∈E ≥ Hence, from Eq. (19), it follows that Xj (t) − T cmax ≤ Xj′ (t) ≤ Xj (t) X X Wij′ (t)E(µπij (t)|X(t), X ′ (t), σ(t)) (67) (i,j)∈E Taking expectation of both sides w.r.t. the random update process X ′ (t), conditioned on the true network state X(t) and the network configuration σ(t), we have X π′ Wij (t)E(µij (t)|X(t), σ(t)) Cn2 cmax /2 + Since the above holds for any stationary randomized policy π, we conclude λ∗stat ≤ (i,j)∈E (a) ≥ ′ 2 5 (69)  X EWij′ (t)E(µπij (t)|X(t), σ(t)) X EWij′ (t)E(µπij (t)|X(t), σ(t)) r a b r a b X Wij (t)E(µπij (t)|X(t), σ(t)) − Cn2 cmax /2 c d e c d e f g h f g h (i,j)∈E (b) ≥ (i,j)∈E (c) ≥ (i,j)∈E (68) Here the inequality (a) and (c) follows from Lemma (7) and the fact that |E| ≤ n2 /2 and µij (t) ≤ cmax . Inequality (b) follows from Eqn. (67). Thus from Eqn. (66) and (68), the expected conditional drift of the Lyapunov function under the policy π ′ , where the expectation is taken w.r.t. the random update and arrival process is upper-bounded as follows: X ′ Wij (t)E[µπij (t) | X(t), σ(t)] ∆π (X(t)|X(t), σ(t)) ≤ B ′ − 2 Matching M1 (i,j)∈E ′ Matching M2 r a b r a b c d e c d e f g h f g h 2 with the constant B ≡ B|V | + 2Cn cmax . Since the above inequality holds for any policy π ∈ Π, we can follow the exactly same steps in the proof of Theorem (4.1) by replacing an arbitrary π by π RAND and showing that it has negative drift. Matching M3 9.10 Proof of Proposition 6.1 r Like many proofs in this paper, this proof also has a converse and an achievability part. In the converse part, we obtain an upper bound of 25 for the broadcast capacity λ∗stat of the stationary grid network (i.e. when all links are ON w.p. 1). In the achievability part, we show that this upper bound is tight. Part (a): Proof of the Converse: λ∗stat ≤ b fra ≥ λ, fab ≥ λ Applying the primary interference constraint at node a, we then obtain fad ≤ 1 − 2λ Because of symmetry in the network topology, we also have fcd ≤ 1 − 2λ. However, to achieve a broadcast capacity of λ, the total allocated rate towards node d must be atleast λ. Hence we have, c d e f g c h f Matching M5 2 5 a b 2 5 1 5 2 5 1 5 2 5 d e 0 0 g 0 2 5 h ‘Time averaged’ Network Figure 5: Some feasible activations of the 3 × 3 grid network which are activated uniformly at random. The components corresponding to each edge in the resulting overall activation vector β is denoted by the numbers alongside the edges. Part (b): Proof of the Achievability: λ∗stat ≥ 25 : As usual, the achievability proof will be constructive. Consider the following five activations (matchings) M1 , M2 , . . . , M5 of the underlying graph as shown in Figure 5. Now consider a stationary policy π ∗ ∈ Π∗ that activates the matchings M1 , . . . , M5 at each slot uniformly at random with probability 51 for each matching. The resulting ‘time-averaged’ graph is also shown in Figure 5. Using Theorem 3.1, it is clear that λ∗stat ≥ 25 . Combining the above with the converse result in Eqn. (69), we conclude that, λ∗stat = 2 . 5 2 5 2 5 i.e. λ≤ r 2 5 We have shown earlier that for the purpose of achieving capacity, it is sufficient to restrict our attention to stationary randomized policies only. Suppose a stationary randomized policy π achieves a broadcast rate λ and it activates edge e ∈ E at every slot with probability fe . Then for the nodes a and b to receive distinct packets at rate λ, one requires 2(1 − 2λ) ≥ λ a Matching M4  2 5
8cs.DS
EXISTENTIALLY GENERATED SUBFIELDS OF LARGE FIELDS SYLVY ANSCOMBE arXiv:1710.03353v1 [math.LO] 9 Oct 2017 Abstract. We study subfields of large fields which are generated by infinite existentially definable subsets. We say that such subfields are existentially generated. Let L be a large field of characteristic exponent p, and let E ⊆ L be an infinite existentially n generated subfield. We show that E contains L(p ) , the pn -th powers in L, for some n < ω. This generalises a result of Fehm from [3], which shows E = L, under the assumption that L is perfect. Our method is to first study existentially generated subfields of henselian fields. Since L is existentially closed in the henselian field L((t)), our result follows. Large fields were introduced in [8] by Pop: A field L is large1 if every smooth curve defined over L with at least one L-rational point has infinitely many L-rational points. A survey of the theory of large fields is given in [1]. Our fields have characteristic exponent p, i.e. p is the characteristic, if this is positive, and otherwise p = 1. A subset X ⊆ L is existentially definable if it is defined by an existential formula from the language of rings, allowing parameters. We denote by (X) the subfield generated by X. A subfield E ⊆ L is existentially generated if there is an infinite existentially definable subset X ⊆ L which generates E, i.e. E = (X). In section 5 we prove the following theorem. Theorem 1. Let L be a large field of characteristic exponent p, and let E ⊆ L be an existentially generated subfield. Then we have L(p (pn ) for some n < ω, where L n) ⊆ E, pn = {x |x ∈ L} is the subfield of pn -th powers. The motivation for this work was the following result of Arno Fehm. Theorem 2 (Corollary 9, [3]). A perfect large field L has no existentially L-definable proper infinite subfields. In fact, using our terminology, Fehm’s method immediately shows that a perfect large field L has no existentially generated proper subfields. For imperfect L and each n < ω, the subfield n L(p ) is existentially definable, without parameters, by using the Frobenius map. Moreover, if we use parameters then we are able to existentially define various extensions of the subfields n L(p ) . Thus, our result generalises Theorem 2 by removing the assumption that L is perfect. On the other hand, if the characteristic of L is zero, then L is necessarily perfect, so Fehm’s result already applies. The key to our method is to study the same problem in a henselian field K, i.e. a field equipped with a nontrivial henselian valuation. First, we recall some facts about separable field extensions in section 1. Then in the context of an arbitrary field, in section 2 we introduce and study ‘big subfields’; and in section 3 we introduce and study ‘uniformly big subfields’. In section 4 we show that existentially generated subfields of henselian fields are uniformly big, ∞ and that they contain ‘sufficiently many’ points of K (p ) . From this we can deduce Theorem 1, restricted to henselian fields. Finally, in section 5, we use the fact that L is existentially closed in the henselian field L((t)) to finish the proof of Theorem 1. October 11, 2017. 1Large fields are also known as ample fields. 1 2 SYLVY ANSCOMBE Notation. Throughout, C, E, F, K, L will denote fields, C will usually be a subfield ‘of parameters’, K will be henselian, and L will be large. To avoid confusion between Cartesian products and powers, for n < ω and a set X, we let X n = X × . . . × X denote the n-fold Cartesian product, and let X (n) = {xn |x ∈ X} denote the set of n-th powers of elements from X. Sometimes it will be convenient to think of tuples as being indexed by a tuple of variables. If x = (x1 , ..., xm ) is an m-tuple of variables, we write X x for the set of m-tuples from X indexed by x. Let x = (x1 , ..., xm ), y = (y1 , ..., yn ) be two tuples of variables. Despite the abuse of language, we say x is a subtuple of y if {x1 , ..., xm } ⊆ {y1 , ..., yn }. In this case, we write prx : X y −→ X x for the projection that maps each y-tuple to its subtuple corresponding to x. Let F/C be any field extension and let a ∈ F m . We define the locus of a in F over C to be the following: n o locus(a/C) := b ∈ F m ∀f ∈ C[X1 , ..., Xm ] f (a) = 0 =⇒ f (b) = 0 . In other language, this is the set of F -rational points of the smallest Zariski-closed subset of affine m-space, which is defined over C and contains a. In more algebro-geometric contexts, a different notion of ‘locus’ is used. For example, in [6, Chapter II, Section 3], Lang defines the locus a over C to be the set of all specializations of a, which forms a variety. Our locus is simply the set of F -rational points of this variety. In the present paper, we are more interested in F -rational points of varieties than in varieties themselves, so there should be no confusion. Suppose that x is a subtuple of y. Let b ∈ F y , and let a be the subtuple of b corresponding to the variables x. Restricting the projection map, from above, we obtain locus(b/C) −→ locus(a/C), which we also denote by prx . Note that this will not be surjective, in general. 1. Relative inseparable closure It is well-understood that if F/C is a finite normal field extension, then there is a unique intermediate field D, such that F/D is separably algebraic and D/C is purely inseparable. In [2], Deveney and Mordeson study an analogous problem in which we do not assume F/C to be algebraic. Before stating their result, we first recall some basic definitions. Definition 3. A tuple a ⊆ F is a separating transcendence base of an extension F/C if a is algebraically independent over C and F/C(a) is separably algebraic. The following, which for our purposes we treat as a definition, is sometimes known as Mac Lane’s Criterion. For other equivalent statements and a more detailed development of the subject of separability of field extensions, see [7] and [5, Chapter VIII, Proposition 4.1]. Definition 4. A field extension F/C is separable if every finite tuple a ⊆ F contains a separating transcendence base of C(a)/C. Now we come to the theorem of Deveney and Mordeson, which we re-word for our convenience. Fact 5 (cf [2, Theorem 1.1]). Let F/C be a field extension. Consider the set SF (C) := {E ⊆ F | F/E is separable and C ⊆ E}. Then SF (C) has a minimum element, with respect to inclusion. That is, there is D ∈ SF (C) such that for all E ∈ SF (C) we have D ⊆ E. Definition 6. Let F/C be a field extension. The relative inseparable closure of C in F , which we denote by ΛF (C), is the minimum element of SF (C). If a tuple q ⊆ F generates a subfield C = (q) of F , then we say the relative inseparable closure of q in F is ΛF (q) := ΛF (C). EXISTENTIALLY GENERATED SUBFIELDS OF LARGE FIELDS 3 Lemma 7. Let F  F ∗ be an elementary extension. Then ΛF (C) = ΛF ∗ (C). Proof. This follows from Fact 5, and the fact that if F/E is separable then F ∗ /E is separable, for any E.  Lemma 8. Let q ∈ F n , for some n < ω. Then |ΛF (q)| ≤ ℵ0 . Proof. There are several way of seeing this. For example, let F∗  F be an elementary submodel with q ⊆ F∗ and |F∗ | ≤ ℵ0 . Of course it follows that |ΛF∗ (q)| ≤ ℵ0 , and in fact ΛF (q) = ΛF∗ (q), by Lemma 7.  For n < ω, recall F (p n) is the subfield of pn -th powers of elements of F . We denote by \ ∞ n F (p ) := F (p ) n<ω the largest perfect subfield of F . In the proof of the next lemma, we use the notion of pindependence, introduced by Teichmüller in [10], and later developed by Mac Lane, for example in [7]. Since this lemma is the only place in the present paper that this notion appears, we do not give the definitions. Lemma 9. Let F/C be separable and let a ∈ F (p ) . Then ΛF (C(a)) = C(ap ∞ −n | n < ω). Proof. It is clear that ΛF (C(a)) ⊇ C(ap | n < ω). For the reverse inclusion, by it suffices to −n show that some maximal p-independent tuple (i.e. a p-base) of C(ap | n < ω) is p-independent −n in F . Let c ⊆ C be any p-base of C. Then c is a p-base of C(ap | n < ω). Since F/C is separable, c is p-independent in F .  −n 2. Big subfields In this section we introduce the ad hoc notion of ‘big subfields’. Let F/E be any field ∞ ∞ extension. We show in Proposition 13 that if E is a big subfield of F then F (p ) /E (p ) is a finite separable extension. Definition 10. Let the algebraic exponent of F/E, which we denote by algex(F/E), be the maximum of the degrees [E(a) : E], for a ∈ F , if this is finite. If there is no maximum then we simply write algex(F/E) = ∞. We say that E is a big subfield of F if algex(F/E) < ∞. We denote by EF (p F. ∞) the compositum of E and F (p ) , taken inside the common extension ∞ Lemma 11. If E is a big subfield of F , then EF (p ) /E is a finite separable extension of degree ∞ algex(EF (p ) /E). ∞ Proof. Since E is a big subfield of F , E is also a big subfield of EF (p ) . In particular, EF (p ) /E ∞ is algebraic. Let a ∈ F (p ) and suppose that a is not separably algebraic over E. Then −1 −k E(ap )/E(a) is a purely inseparable extension of degree p. In fact E(ap )/E(a) is a purely ∞ inseparable extension of degree pk , for each k < ω. Since a is an element of F (p ) , the algebraic ∞ exponent of EF (p ) /E is infinite, which contradicts our assumption. Therefore a is separably ∞ ∞ algebraic over E. Since a ∈ F (p ) was arbitrary, this shows that EF (p ) /E is a separable algebraic extension. ∞ Let N denote the algebraic exponent of EF (p ) /E. Note that N ≤ algex(F/E) < ∞. ∞ ∞ Therefore there exists b ∈ EF (p ) such that N = [E(b) : E]. We claim that E(b) = EF (p ) . If ∞ not then there exists c ∈ EF (p ) \ E(b), whence [E(b, c) : E] > N. Since E(b, c)/E is a finite separable extension, it is generated by a single element, d say. Therefore the degree [E(d) : E] ∞ is strictly greater than N, which contradicts our choice of N. This shows that E(b) = EF (p ) , ∞ as claimed. In particular, EF (p ) /E is a finite separable extension of degree N.  ∞ ∞ 4 SYLVY ANSCOMBE F.. .. ... .. ... ... ... ... ... ..... .......... .......... .......... .......... . . . . . . . . . . E EF .(p ∞) ... ... .. .... .. .... ... . F (p ∞) Figure 1. Illustration of Lemma 11 Lemma 12. Let F/E be a field extension. Suppose that a is an element in an extension of F which is of degree n both over F and over E. Then the minimal polynomial of a over F is an element of E[x]. Proof. Let m1 ∈ F [x] and m2 ∈ E[x] be the minimal polynomials. Then m1 divides m2 in the polynomial ring F [x]. Since they are both monic and of the same degree, they are equal.  Proposition 13. If E is a big subfield of F then F (p ) /E (p ∞ degree [EF (p ) : E]. ∞ ∞) is a finite separable extension of Proof. By Lemma 11, EF (p ) /E is a finite separable extension. Let N denote the degree ∞ ∞ ∞ ∞ ∞ [EF (p ) : E]. Since E is a subfield of F , E (p ) is a subfield of F (p ) . Moreover, F (p ) /E (p ) is ∞ ∞ ∞ a separable extension, since E (p ) is perfect. Let a ∈ F (p ) . Since E is a big subfield of EF (p ) ,  −k the degrees [E(ap ) : E] k<ω are each bounded by N. Let N0 ≤ N denote the maximum  −k max [E(ap ) : E] k < ω , ∞ 0 p and fix k0 < ω such that N0 = [E(ap 0 ) : E]. Then for each k < ω, we have 0 = [E(a ) :  (pN k k) −k (p ) p 0 ):E . E]; and by applying the k-fold Frobenius isomorphism, we obtain N0 = E (a p−k0 (pk ) Let m ∈ E[x] be the minimal polynomial of a over E. By Lemma 12 we have m ∈ E [x]. ∞ Indeed, this holds for all k < ω, and thus we obtain m ∈ E (p ) [x]. Consequently, m is the −k ∞ −k minimal polynomial of ap 0 over E (p ) . This shows that ap 0 is separably algebraic of degree ∞ ∞ ∞ N0 over E (p ) . Thus a is also separably algebraic of degree ≤ N0 over E (p ) . Since a ∈ F (p ) ∞ ∞ was arbitrary, E (p ) is a big subfield of F (p ) . Another application of Lemma 11 shows that ∞ ∞ ∞ F (p ) /E (p ) is a finite separable extension. Since E/E (p ) is a regular extension, it is linearly ∞ ∞ ∞ ∞ ∞ disjoint from F (p ) /E (p ) . Therefore [F (p ) : E (p ) ] = [EF (p ) : E], as required.  −k −k−k F.. .... ... .. ... .... .. .... . N E.. ..... .......... .......... .......... .......... .......... . .... ... .. ... ... ... .... E (p ∞) EF .(p ...... .......... .......... .......... .......... .......... ∞) .... ... .. ... ... ... ... F (p ∞) N Figure 2. Illustration of Proposition 13 EXISTENTIALLY GENERATED SUBFIELDS OF LARGE FIELDS 5 3. Uniformly big subfields In this section we introduce ‘uniformly big subfields’. eet F be any field and let φ(x; q) be an Lring -formula with one free-variable x and a tuple q ∈ F y of parameters. Denote by X = φ(F ; q) the subset of F defined by φ(x; q), and let E = (X) be the subfield of F which is generated by X. For an elementary extension F  F ∗ , we denote by X ∗ = φ(F ∗ ; q) the set defined in F ∗ by φ(x; q), and we denote by E (∗) := (X ∗ ) the subfield of F ∗ generated by X ∗ .2 Note that neither E nor E (∗) is assumed to be definable. However, each is the union of a chain of definable sets, as follows. Fix an enumeration (fi )i<ω of all the multivariable polynomials over the prime field. For convenience, we arrange the enumeration so that fi is a polynomial in (at most) the variables X0 , ..., Xi−1 . For m < ω, we let φm (x; q) denote the formula  _  ^  ∃ a = (ak )k<m , b = (bl )l<m : x · fi (a) = fj (b) ∧ fi (a) 6= 0 ∧ φ(ak ; q) ∧ φ(bl ; q) . i,j<m k,l<m Note that if φ(x; q) is an existential formula, then φm (x; q) is also (equivalent to) an existential formula, for each m < ω. In F , φm (x; q) defines the union of images of X under the rational functions ffji , for i, j < m. More precisely, we have   fi (a) a, b ⊆ φ(F ; q), fj (b) 6= 0, and i, j < m, . φm (F ; q) = fj (b) ∗ We write Xm := φm (F ∗ ; q). the field E = (X) is the S Xm := φm (F ; q), and similarly S Therefore (∗) ∗ ∗ union m<ω Xm , and the field E = (X ) is the union m<ω Xm . Definition 14. We say that E = (X) is a uniformly big subfield of F if E (∗) = (X ∗ ) is a big subfield of F ∗ , for all elementary extensions F  F ∗ . Note that being ‘uniformly big’ is not strictly a property of the subfield E, but rather a property of a choice of definable generating set X. This slight ambiguity will not cause a problem. Let x = (x1 , ..., xn ) be an n-tuple of variables. For m, n < ω, we let δm,n (x; q) be the formula  ^  ^ X i1 in ∃ a = (ai )i<mn : φm (ai ; q) ∧ ¬ ai x1 ...xn = 0 . ai = 0 ∧ i<mn i<mn P j ij <m Again, note that if φ(x; q) is an existential formula, then δm,n (x; q) is also (equivalent to) an existential formula, for each m, n < ω. In F , δm,n (x; q) defines the set of those n-tuples which are zeroes of some nontrivial polynomial of total degree < m with coefficients from Xm . The set rn (x) := {¬δm,n (x; q) | m < ω} is a (partial) n-type over q. An n-tuple a ∈ F n realises rn (x) if and only if a is algebraically independent over E = (X). Proposition 15. The following are equivalent: (1) E = (X) is a uniformly big subfield of F ; (2) there exists m < ω such that F |= ∀x1 δm,1 (x1 ; q); and (3) trdeg(F/E) is ‘bounded’, i.e. there is a cardinal κ such that for all elementary extensions F  F ∗ we have trdeg(F ∗ /E (∗) ) ≤ κ. Proof. (1 =⇒ 3): Suppose that E = (X) is a uniformly big subfield of F , and let F  F ∗ be any elementary extension. Then E (∗) = (X ∗ ) is a big subfield of F ∗ , and in particular F ∗ /E (∗) is algberaic, i.e. trdeg(F ∗ /E (∗) ) ≤ 0. Thus even 0 is the required bound. (2 =⇒ 1): Suppose that F |= ∀x1 δm,1 (x1 ). Let F  F ∗ be any elementary extension and let a ∈ F ∗ . Then F ∗ |= δm,1 (a; q), so a is the zero of a non-trivial polynomial of degree 2The superscript ‘(∗)’ is intended to indicate that E (∗) depends on φ(x; q) rather than on E. For example, the subfields generated by the sets defined by the formulas x = 1 and x = x coincide for Q but not for Q∗ ≻ Q. 6 SYLVY ANSCOMBE ∗ < m with coefficients from Xm = φm (F ∗ ; q). In particular, a is algebraic of degree < m over E (∗) = (X ∗ ). This shows that algex(F ∗ /E (∗) ) < m, and so E (∗) is a big subfield of F ∗ . Since F ∗ is an arbitrary elementary extension of F , this shows that E is a uniformly big subfield of F. (3 =⇒ 2): in fact we show the contrapositive (¬2 =⇒ ¬3). This is a standard compactness argument. Indeed, by compactness, to show the negation of (3) it suffices to show that rn (x1 , ..., xn ) is consistent, for each n < ω. We suppose the negation of (2), i.e. for each m < ω we have F |= ¬∀x1 δm,1 (x1 ; q). By compactness it follows that r1 (x1 ) is consistent. We proceed by induction, and the consistency of r1 (x1 ) is the base case. Suppose that rn (x1 , ..., xn ) is consistent. Then there exists an elementary extension F  F ∗ and an n-tuple (a1 , ..., an ) in F ∗ that realises the type rn (x1 , ..., xn ). That is, (a1 , ..., an ) is m algebraically independent over E (∗) . Let m < ω. Trivially, (am 1 , ..., an ) is also algebraically (∗) (∗) m independent over E . Moreover, an is of degree exactly m over E (a1 , ..., am n ). In particular m m (a1 , ..., an , an ) is not the zero of any nontrivial polynomial of total degree < m with coefficients m ∗ from E (∗) . Since Xm ⊆ E (∗) , it follows a fortiori that (am 1 , ..., an , an ) is not a zero of any ∗ nontrivial polynomial of total degree < m with coefficients from Xm ; i.e. we have m F ∗ |= ¬δm,n+1 (am 1 , ..., an , an ; q). It follows that the type rn+1 (x1 , ..., xn+1 ) is consistent, as required. By induction, rn (x1 , ..., xn ) is consistent, for all n < ω. As indicated above, this entails the negation of (3), as required.  Finally for this section, we give a straightforward lemma that will be used in the proof of Proposition 25. Lemma 16. Let F  F ∗ be an elementary extension. Then trdeg(F/E) ≤ trdeg(F ∗ /E (∗) ). Proof. Let a ∈ F n be algebraically independent over E. Then we have F |= ¬δm,n (a; q), for all m < ω. Thus also F ∗ |= ¬δm,n (a; q), for all m < ω; and therefore a is algebraically independent over E (∗) .  4. Existentially generated subfields of henselian fields Let (K, v) be an henselian nontrivially valued field, with value group Γv , and let C ⊆ K be a subfield such that K/C is separable. 4.1. The henselian topology. In [9], Prestel and Ziegler study topological fields. In particular, they study those topologies induced by nontrivial valuations, as follows. Let a ∈ K and let α ∈ Γv . We define the ball of radius α around a to be B(α; a) := {x ∈ K | v(x − a) > α}. The collection {B(α; a) | a ∈ K, α ∈ Γv } forms a base for the open sets of the valuation topology induced by v, which is a field topology on K. For tuples a = (a1 , ..., an ) ∈ K n and α = (α1 , ..., αn ) ∈ Γvn , we defined the ball of radius α around a to be n Y B(α; a) := B(αi ; ai ). i=1 In Section 7 of [9], Prestel and Ziegler study topological consequences of henselianity. Specifically, they shows that ‘topological henselianity’ is equivalent to the topology satisfying the ‘Implicit Function Theorem’, in the context of the continuity of functions defined implicitly by the vanishing of polynomials. We refer the reader to [9] for more details. For the present, we simply give the following fact. Fact 17 (cf [9, (7.4) Theorem]). For all f ∈ K[X1 , ..., Xn , Y ] and all (a, b) ∈ K n+1 , if f (a, b) = 0 and f ′ (a, b) 6= 0, then there exist (α, β) ∈ Γvn+1 such that for all a′ ∈ B(α; a) there exists a unique b′ ∈ B(β; b) such that f (a, b) = 0. Moreover, the map a 7−→ b′ is continuous. Proof. This follows from [9, (7.4) Theorem] since the topology induced by the a henselian valuation is indeed a henselian topology.  EXISTENTIALLY GENERATED SUBFIELDS OF LARGE FIELDS 7 In [4, Section 4], Kuhlmann presents a multidimensional version of the Implicit Function Theorem, which we rewrite very slightly for our convenience. Fact 18 (cf [4, Section 4]). Let (K, v) be a henselian valued field. Let f1 , ..., fn ∈ K[X1 , ..., Xl ] with n < l. Set  ∂f1 ∂f1  . . . ∂X ∂Xl−n+1 l  ..  . J˜ :=  ... .  ∂fn ∂fn . . . ∂Xl ∂Xl−n+1 ˜ Assume that f1 , ..., fn admit a common zero a = (a1 , ..., al ) ∈ K l and that det J(a) 6= 0. Then ′ ′ l−n ′ there is some α ∈ Γv such that for all (a1 , ..., al ) ∈ K with v(ai −ai ) > 2α, for i ∈ {1, ..., l−n}, there exists a unique (a′l−n+1 , ..., a′l ) ∈ K n such that (a′1 , ..., a′l ) is a common zero of f1 , ..., fn , and v(ai − a′i ) > α, for i ∈ {l − n + 1, ..., l}. Lemma 19. Let (c, d) ∈ K m+n and suppose that c is a separating transcendence base for C(c, d)/C. Then there exists (γ, δ) ∈ Γvm+n such that locus(c, d/C) ∩ B(γ, δ; c, d) is the graph of a continuous function f : B(γ; c) −→ B(δ; d). Proof. Write d = (d1 , ..., dn ) and let j ∈ {1, ..., n}. We let gj ∈ C[X, Y1, ..., Yj ] and hj ∈ C[X, Y1 , ..., Yj−1] be polynomials such that hj (c, d1, ..., dj−1) 6= 0 and gj (c, d1, ..., dj−1, Yj ) hj (c, d1, ..., dj−1 ) is the minimal polynomial of dj over C(c, d1, ..., dj−1). Since c is a separating transcendence base for C(c, d)/C, dj is separably algebraic over C(c, d1, ..., dj−1), and so gj (c, d1 , ..., dj ) = 0 and ∂gj (c, d1 , ..., dj ) 6= 0. ∂Yj Let Z(g1 , ..., gn ) denote the common zeroes of g1 , ..., gn in K m+n , this is simply the set of Krational points of the algebraic set defined in affine m + n-space by the vanishing of g1 , ..., gn . By our definition of the locus, we have locus(c, d/C) ⊆ Z(g1 , ..., gn ). In fact, there is a Zariski open set U such that (c, d) ∈ U and Z(g1 , ..., gn ) ∩ U = locus(c, d/C) ∩ U. ˜ d) is a lower triangular If we define J˜ as above, using the polynomials g1 , ..., gn , then J(c, ˜ d) 6= 0. By applying Fact 18 matrix with non-zero entries on the diagonal. Therefore det J(c, we obtain α ∈ Γv such that, by writing γ = (2α, ..., 2α) and δ = (α, ..., α), we find that Z(g1 , ..., gn ) ∩ B(γ, δ; c, d) is the graph of a continuous function B(γ; c) −→ B(δ; d). By the continuity, we may assume that B(γ, δ; c, d) ⊆ U, and so we are done.  Lemma 20. Let (c, d) ∈ K 1+n and suppose that c is transcendental over C, and C(c, d)/C(c) is separable. Then there exists γ ∈ Γv such that B(γ; c) ⊆ prx locus(c, d/C), where prx : K 1+n −→ K is the projection onto the x-coordinate, which is the first coordinate. 8 SYLVY ANSCOMBE Proof. Re-ordering if necessary, write d as the pair (d1 , d2 ), where d1 ⊆ d is a separating transcendence base for C(c, d)/C(c), Then (c, d1 ) is a separating transcendence base for C(c, d)/C. Suppose that d1 is an n1 -tuple. By Lemma 19, there exists (γ, δ1 ) ∈ Γv1+n1 such that B(γ, δ1 ; c, d1 ) ⊆ prx,y1 locus(c, d/C), where prx,y1 is the map projecting a (1 + n)-tuple onto its first (1 + n1 )-many coordinates. Projecting again, onto the x-coordinate, we obtain B(γ; c) ⊆ prx locus(c, d/C), as required.  4.2. Bounding the transcendence degree. We suppose throughout this subsection that K is ℵ1 -saturated.3 This subsection is devoted to a proof of Proposition 24. Just as in section 3, we let φ(x; q) be an existential Lring -formula with one free-variable x and a tuple q ∈ K y of parameters. We denote by X = φ(K; q) the subset defined by φ(x; q). Let ΛK (q) denote the relative inseparable closure in K of the subfield generated by the parameters q. Let C be the relative algebraic closure in K of ΛK (q). Note that K/C is regular. Existentially definable sets, such as X, are the projections of algebraic sets. More precisely, using a standard reduction, there exist finitely many multivariable polynomials f1 , ..., fk ∈ C[x, y1 , ..., yr ] such that X = prx (V ), where  V = (x, y1 , ..., yr ) ∈ K 1+r fi (x, y1 , ..., yk ) = 0, for all i ≤ k is the set of (1 + r)-tuples from K at which each of the polynomials fi vanishes, and prx : K 1+r −→ K is the map that projects an r-tuple onto its x-coordinate. In other language, V is the set of K-rational points of the algebraic set defined to be the common zero-locus of the polynomials fi , for i ≤ k. By our assumption that K is ℵ1 -saturated, and by Lemma 8, we may realise in K the type of an element of X which is transcendental over C. Let a ∈ K denote such an element, and let b ∈ K r be an r-tuple such that (a, b) ∈ V . Since K/C is separable, the tuple (a, b) may be reordered into a tuple (c, d) such that c is a separating transcendence base of C(a, b)/C. That is, c is algebraically independent over C, and the extension C(c, d)/C(c) is separably algebraic. In particular, note that a is separably algebraic over C(c). Also, since a is transcendental over C, c is not the empty tuple. Since (c, d) is just a reordering of (a, b), we have prx locus(c, d/C) ⊆ prx V = X, where prx still denotes the projection onto the x-coordinate, corresponding to a, even if this is no longer the first coordinate. Write 1 + r = s + t, where c is an s-tuple and d is a t-tuple. By Lemma 19, there exists (γ, δ) ∈ Γvs+t and a continuous function f : B(γ; c) −→ B(δ; d) such that graph(f) = locus(c, d/C) ∩ B(γ, δ; c, d).  Therefore prx graph(f) ⊆ X. Lemma 21. Let F/C be a field extension and let a = (a1 , ..., an ) and a′ = (a′1 , ..., a′n ) be two n-tuples from F . Suppose that a′ ∈ locus(a/C) and trdeg(a/C) ≤ trdeg(a′ /C). Then there is a C-isomorphism ρ : C(a) −→ C(a′ ) that maps ai 7−→ a′i , for i ≤ n. Proof. This is just a rewriting of [6, Theorem 5] into our language.  Lemma 22. There exists c1 ∈ c such that c1 is algebraic over C(c2 , a), where c2 := c \ {c1 }. Proof. Our assumptions are that c is algebraically independent over C, a is transcendental over C, and a is algebraic over C(c). Therefore, we may choose a subtuple c2 ⊂ c of length n − 1 such that (c2 , a) is algebraically independent over C. Let c1 denote the unique element of c \ c2 . Clearly c1 is algebraic over C(c2 , a), by the Exchange Property.  3In fact it suffices that K is ℵ0 -saturated. To see this, one argues that ΛK (c) is in the definable closure of c. Rather than give the details here, we simply assume that K is ℵ1 -saturated. EXISTENTIALLY GENERATED SUBFIELDS OF LARGE FIELDS 9 By reordering if necessary, we write c = (c1 , c2 ). Fix the corresponding reordering (γ1 , γ2 ) of γ. We reiterate that prx still denotes the projection onto the x-coordinate, corresponding to a, so that prx (c1 , c2 , d) = a. Lemma 23. Let e ∈ B(γ1 ; c1 ) and let α be the x-coordiante of (e, c2 , f(e, c2 )), so that α = prx (e, c2 , f(e, c2 )). Then e is algebraic over C(c2 , α). Proof. If e is algebraic over C(c2 ) then it is certainly algebraic over C(c2 , α), as required. On the other hand, suppose that e is transcendental over C(c2 ). Since d is algebraic over C(c), it follows that trdeg(c, d/C) ≤ trdeg(e, c2 , f(e, c2 )/C). Since a ∈ B(γ1 ; c1 ), f is welldefined on the pair (e, c2 ), and we have (e, c2 , f(e, c2 )) ∈ locus(c, d/C). Putting these together, we have satisfied the hypotheses of Lemma 21, using which we obtain the C-isomorphism ρ : C(c, d) −→ C(e, c2 , f(e, c2 )). Moreover, applying ρ coordinate-wise, we have ρ(c, d) = (e, c, f(e, c2 )). Thus ρ(c1 ) = e and ρ(a) = α. The result now follows from Lemma 22.  Let C(c2 , X) denote the subfield of K generated over C(c2 ) by all elements of X. Proposition 24. Every element of K is algebraic over C(c2 , X). Proof. It follows from Lemma 23 that every element of B(γ1 ; c1 ) is algebraic over C(c2 , X). In particular, c1 is algebraic over C(c2 , X). Therefore every element of B(γ1 ; 0) is algebraic over C(c2 , X). Let t ∈ K. If t ∈ B(γ1 ; 0), then t is algebraic over E. Otherwise, suppose that t ∈ / B(γ1 ; 0). Choose any s ∈ B(γ1 ; 0) \ {0} and note that s is algebraic over C(c2 , X). Then v(t) < v(s), and so v(s−1 ) < v(t−1 ). As a standard application of the ultrametric triangle inequality, we deduce the equality v(s−1 + t−1 ) = v(s−1 ). Therefore (s−1 + t−1 )−1 ∈ B(γ1 ; 0), and so (s−1 + t−1 )−1 is algebraic over C(c2 , X). It follows that t is algebraic over C(c2 , X), as required.  4.3. The proof of Theorem 1 for henselian fields. We are almost in a position to deduce the main theorem, at least in the context of henselian fields. Note that we no longer assume K to be ℵ1 -saturated. Proposition 25. Let K be a henselian field. Let E ⊆ K be an existentially generated subfield of K. Then E is a uniformly big subfield of K. Proof. Let X ⊆ K be an infinite subset of K which generates E and is defined by an existential Lring -formula φ(x; q). Let C be the relative algebraic closure in K of ΛK (q). Let K ∗  K be an arbitrary elementary extension, and let K ∗∗  K ∗ be a further ℵ1 -saturated elementary extension. As usual, let X ∗ denote the subset of K ∗ defined by φ(x; q), and write E (∗) = (X ∗ ). Also, let X ∗∗ denote the subset of K ∗∗ defined by φ(x; q), and write E (∗∗) = (X ∗∗ ). Note that C is the relative algebraic closure of the relative inseparable closure of q in each of K, K ∗ , and K ∗∗ . By ℵ1 -saturation, we may apply the machinery of the previous section to K ∗∗ . We choose the tuple c2 ⊆ K ∗∗ as above. By Proposition 24, K ∗∗ is algebraic over C(c2 , X ∗∗ ). Thus we have trdeg(K ∗∗ /E (∗∗) ) ≤ trdeg(C(c2 )), where the right hand side is the transcendence degree over the prime field. By Lemma 16, we have trdeg(K ∗ /E (∗) ) ≤ trdeg(K ∗∗ /E (∗∗) ). Combining this with the previous inequality, we have satisfied clause (3) of Proposition 15. Therefore E = (X) is a uniformly big subfield of K.  Let Φ : x 7−→ xp denote the Frobenius map. Before proving the main proposition of this section, we give four brief lemmas about the interaction of the Frobenius map with balls in the valuation topology and with loci. 10 SYLVY ANSCOMBE  Lemma 26. Let α ∈ Γv and a ∈ K. Then Φ B(α; a) = B(pα; ap ) ∩ K (p) . Proof. This follows from the fact that v(a − b) > α if and only if v(ap − bp ) > pα.  (pn ) Lemma 27. Let n < ω, let a ∈ K , and let α ∈ Γv . Then   x−a (pn ) (pn ) x, y ∈ B(α; a) ∩ K , y 6= a . K = y−a Proof. Choose β ∈ Γv such that α ≤ pn β. Let z ∈ K. Choose γ ∈ Γv with γ ≤ v(z), and choose any y ∈ K × with v(y) > max{β, β − γ}. Since v(y) > β, y ∈ B(β; 0). Also v(zy) = v(z) + v(y) >γ+β−γ = α. Therefore zy ∈ B(β; 0). This shows that K = {xy −1 | x, y ∈ B(β; 0), y 6= 0}. Since B(β; 0) = −n −n {x − ap | x ∈ B(β; ap )}, we have K = {(x − ap )(y − ap )−1 | x, y ∈ B(β; ap ), y 6= ap }. −n −n −n −n Finally, applying the n-th power of Frobenius, we have K (p n) n = {(x − a)(y − a)−1 | x, y ∈ B(pn β; a) ∩ K (p ) , y 6= a}, by Lemma 26, as required.  Lemma 28. Let (a, b), (c, d) ∈ K 1+n . Then (c, d) ∈ locus(a, b/C) if and only if (cp , d) ∈ locus(ap , b/C). Proof. Suppose first that (c, d) ∈ locus(a, b/C). Let f ∈ C[X, Y] be such that f (ap , b) = 0. Choose g ∈ C[X, Y] such that g(X, Y) = f (X p , Y). Then g(a, b) = 0, and so g(c, d) = 0, i.e. f (cp , d) = 0. Therefore (cp , d) ∈ locus(ap , b/C). For the converse, suppose that (cp , d) ∈ locus(ap , b/C). Let f ∈ C[X, Y] be such that f (a, b) = 0. Denote by f [p] ∈ C[X, Y] the polynomial obtained by raising the coefficients (but not the variables) of f to the p-th power. Since the Frobenius map Φ is a ring homomorphism, we have Φ f (X, Y) = f [p] (X p , Y p ), where if Y = (Y1 , ..., Yn ) then Y p = (Y1p , ..., Ynp ). Therefore f [p] (ap , bp ) = 0, and so f [p](cp , dp ) = 0. It follows that f (c, d) = 0. This shows that (c, d) ∈ locus(a, b/C), as required.   Lemma 29. Let (a, b) ∈ K x,y . Then Φ prx locus(a, b/C) = prx locus(ap , b/C) ∩ K (p) . Proof. This follows from Lemma 28.  Proposition 30. Let K be a henselian field and let φ(x; q) be an existential formula in the language of rings that defines in K an infinite set X = φ(K; q). Then there exist m, n < ω such that n K (p ) ⊆ (X)m . Proof. As usual, let C denote the relative algebraic closure in K of ΛK (q). Note that K/C is regular. Let K ∗ be an ℵ0 -saturated elementary extension of K. Note that K ∗ /C is also ∞ regular. By the saturation of K ∗ , we have that (K ∗ )(p ) C/C is a transcendental extension. By Proposition 25, E := (X) is a uniformly big subfield of K, and thus E (∗) = (X ∗ ) is a big ∞ ∞ subfield of K ∗ . From Proposition 13, we have that (K ∗ )(p ) /(E (∗) )(p ) is a finite separable extension. ∞ Therefore (E (∗) )(p ) C/C is a transcendental extension. In particular, there exists a ∈ ∞ (E (∗) )(p ) which is transcendental over C. Let l < ω be such that a ∈ (X ∗ )l . Since (X)l is also a set defined by an existential Lring -formula, namely φl (x; q), there exists an algebraic set Vl such −n that (X)l = prx (Vl ). Let b ∈ (K ∗ )y be such that (a, b) ∈ Vl∗ . By Lemma 9, K ∗ /C(ap |n < ω) EXISTENTIALLY GENERATED SUBFIELDS OF LARGE FIELDS 11 is separable. Since b is a finite set, there exists n < ω such that C(ap , b)/C(ap ) is separable. By Lemma 20, there exists α′ ∈ Γv∗ such that −n −n B ∗ (α′ ; ap ) ⊆ prx locus∗ (ap , b/C), −n −n where B ∗ (α′ ; ap ) and locus∗ (ap , b/C) denote the appropriate ball and locus in K ∗ . By iteratively applying the Frobenius map Φ to both sides of the above inclusion, and setting α := pn α′ , we have −n −n B ∗ (α; a) ∩ (K ∗ )(p n) ⊆ prx locus∗ (a, b/C), by Lemma 26 and Lemma 29. Note that we have the inclusion prx locus∗ (a, b/C) ⊆ (X ∗ )l . Applying Lemma 27 in K ∗ , we have   x−a ∗ (pn ) ∗ ∗ (pn ) (K ) = x, y ∈ B (α; a) ∩ (K ) , y 6= a y−a   x−w ∗ w, x, y, z ∈ (X )l , y 6= z . ⊆ y−z n This shows that (K ∗ )(p ) is contained in the image of (X ∗ )l under a certain rational function. By definition, (X ∗ )l is already the union of the image of X ∗ under the rational functions ffji , n for i, j < l.4 Thus there exists m ≥ l such that (K ∗ )(p ) ⊆ (X ∗ )m . Finally, since K  K ∗ is an n elementary extension, we have K (p ) ⊆ (X)m , as required.  5. Proof of Theorem 1 We recall one of the several characterizations of largeness given by Pop. Fact 31 (cf [8, Proposition 1.1]). A field L is large if and only if L is existentially closed in L((t)). Using this characterization, we are able to generalise Proposition 30. Proposition 32. Let L be a large field and let φ(x; q) be an existential formula in the language of rings that defines in L an infinite set X = φ(L; q). Then there exist m, n < ω such that L(p n) ⊆ (X)m . Proof. Let X ′ := φ(L((t)); q) denote the set defined by the same formula in the field L((t)). Note that the t-adic valuation on L((t)) is both nontrivial and henselian. Since existential formulas ‘go up’, we have X ⊆ X ′ . Thus X ′ is an infinite existentially definable subset of the henselian field L((t)). By Proposition 30, there exist m, n < ω such that L((t))(p n) ⊆ (X ′ )m . Since L ∃ L((t)), we have (X)m = (X ′ )m ∩ L. Therefore we have the inclusions L(p n) n = L((t))(p ) ∩ L ⊆ (X ′ )m ∩ L = (X)m , as required.  Finally, Theorem 1 is an immediate corollary of Proposition 32. Acknowledgements This research forms part of the author’s doctoral thesis which was completed under the supervision of Jochen Koenigsmann and supported by EPSRC. The author would like to thank Arno Fehm and Jochen Koenigsmann for many helpful conversations, feedback, and encouragement. 4 In fact, we may combine finitely many rational functions into one. More precisely, there exist multivariable polynomials f, g over the prime field such that (X ∗ )l = {f (a)/g(b) | a, b ∈ (X ∗ )k , g(b) 6= 0}. 12 SYLVY ANSCOMBE References [1] Lior Bary-Soroker and Arno Fehm. Open problems in the theory of ample fields. Geometric and differential Galois theory, Séminaires & Congrès 27, 2013. [2] James K. Deveney and John N. Mordeson. Subfields and invariants of inseparable field extensions. Can. J. Math., 29(6):1304–1311, 1977. [3] Arno Fehm. Subfields of ample fields, rational maps and definability. J. of Algebra, 323:1738–1744, 2010. [4] Franz-Viktor Kuhlmann. Valuation theoretic and model theoretic aspects of local uniformization. In Hauser, H., Lipman, J., Oort, F., Quirs, A., Resolution of Singularities: A research textbook in tribute to Oscar Zariski, 381–456. Birkhäuser, 2000. [5] Serge Lang. Algebra. Springer, Third Edition, 1987. [6] Serge Lang. Introduction to Algebraic Geometry. Interscience Publishers, New York, 1958. [7] Saunders Mac Lane. Modular fields. I. Separating transcendence bases. Duke Math. J., 5:372–393, 1939. [8] Florian Pop. Embedding problems over large fields. Ann. Math., 144:1–34, 1996. [9] Alexander Prestel and Martin Ziegler. Model theoretic methods in the theory of topological fields. Journal für die reine und angewandte Mathematik, 299:318–341, 1978. [10] Oswald Teichmüller. p-Algebren Deutsche Mathematik, 1:362–388, 1936. Jeremiah Horrocks Institute, University of Central Lancashire, Preston PR1 2HE, United Kingdom E-mail address: [email protected]
0math.AC
arXiv:1703.01780v5 [cs.NE] 8 Jan 2018 Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results Antti Tarvainen The Curious AI Company [email protected] Harri Valpola The Curious AI Company [email protected] Abstract The recently proposed Temporal Ensembling has achieved state-of-the-art results in several semi-supervised learning benchmarks. It maintains an exponential moving average of label predictions on each training example, and penalizes predictions that are inconsistent with this target. However, because the targets change only once per epoch, Temporal Ensembling becomes unwieldy when learning large datasets. To overcome this problem, we propose Mean Teacher, a method that averages model weights instead of label predictions. As an additional benefit, Mean Teacher improves test accuracy and enables training with fewer labels than Temporal Ensembling. Without changing the network architecture, Mean Teacher achieves an error rate of 4.35% on SVHN with 250 labels, outperforming Temporal Ensembling trained with 1000 labels. We also show that a good network architecture is crucial to performance. Combining Mean Teacher and Residual Networks, we improve the state of the art on CIFAR-10 with 4000 labels from 10.55% to 6.28%, and on ImageNet 2012 with 10% of the labels from 35.24% to 9.11%. 1 Introduction Deep learning has seen tremendous success in areas such as image and speech recognition. In order to learn useful abstractions, deep learning models require a large number of parameters, thus making them prone to over-fitting (Figure 1a). Moreover, adding high-quality labels to training data manually is often expensive. Therefore, it is desirable to use regularization methods that exploit unlabeled data effectively to reduce over-fitting in semi-supervised learning. When a percept is changed slightly, a human typically still considers it to be the same object. Correspondingly, a classification model should favor functions that give consistent output for similar data points. One approach for achieving this is to add noise to the input of the model. To enable the model to learn more abstract invariances, the noise may be added to intermediate representations, an insight that has motivated many regularization techniques, such as Dropout [28]. Rather than minimizing the classification cost at the zero-dimensional data points of the input space, the regularized model minimizes the cost on a manifold around each data point, thus pushing decision boundaries away from the labeled data points (Figure 1b). Since the classification cost is undefined for unlabeled examples, the noise regularization by itself does not aid in semi-supervised learning. To overcome this, the Γ model [21] evaluates each data point with and without noise, and then applies a consistency cost between the two predictions. In this case, the model assumes a dual role as a teacher and a student. As a student, it learns as before; as a teacher, it generates targets, which are then used by itself as a student for learning. Since the model itself generates targets, they may very well be incorrect. If too much weight is given to the generated targets, the cost of inconsistency outweighs that of misclassification, preventing the learning of new (a) (b) (c) (d) (e) Figure 1: A sketch of a binary classification task with two labeled examples (large blue dots) and one unlabeled example, demonstrating how the choice of the unlabeled target (black circle) affects the fitted function (gray curve). (a) A model with no regularization is free to fit any function that predicts the labeled training examples well. (b) A model trained with noisy labeled data (small dots) learns to give consistent predictions around labeled data points. (c) Consistency to noise around unlabeled examples provides additional smoothing. For the clarity of illustration, the teacher model (gray curve) is first fitted to the labeled examples, and then left unchanged during the training of the student model. Also for clarity, we will omit the small dots in figures d and e. (d) Noise on the teacher model reduces the bias of the targets without additional training. The expected direction of stochastic gradient descent is towards the mean (large blue circle) of individual noisy targets (small blue circles). (e) An ensemble of models gives an even better expected target. Both Temporal Ensembling and the Mean Teacher method use this approach. information. In effect, the model suffers from confirmation bias (Figure 1c), a hazard that can be mitigated by improving the quality of targets. There are at least two ways to improve the target quality. One approach is to choose the perturbation of the representations carefully instead of barely applying additive or multiplicative noise. Another approach is to choose the teacher model carefully instead of barely replicating the student model. Concurrently to our research, Miyato et al. [16] have taken the first approach and shown that Virtual Adversarial Training can yield impressive results. We take the second approach and will show that it too provides significant benefits. To our understanding, these two approaches are compatible, and their combination may produce even better outcomes. However, the analysis of their combined effects is outside the scope of this paper. Our goal, then, is to form a better teacher model from the student model without additional training. As the first step, consider that the softmax output of a model does not usually provide accurate predictions outside training data. This can be partly alleviated by adding noise to the model at inference time [4], and consequently a noisy teacher can yield more accurate targets (Figure 1d). This approach was used in Pseudo-Ensemble Agreement [2] and has lately been shown to work well on semi-supervised image classification [13, 23]. Laine & Aila [13] named the method the Π model; we will use this name for it and their version of it as the basis of our experiments. The Π model can be further improved by Temporal Ensembling [13], which maintains an exponential moving average (EMA) prediction for each of the training examples. At each training step, all the EMA predictions of the examples in that minibatch are updated based on the new predictions. Consequently, the EMA prediction of each example is formed by an ensemble of the model’s current version and those earlier versions that evaluated the same example. This ensembling improves the quality of the predictions, and using them as the teacher predictions improves results. However, since each target is updated only once per epoch, the learned information is incorporated into the training process at a slow pace. The larger the dataset, the longer the span of the updates, and in the case of on-line learning, it is unclear how Temporal Ensembling can be used at all. (One could evaluate all the targets periodically more than once per epoch, but keeping the evaluation span constant would require O(n2 ) evaluations per epoch where n is the number of training examples.) 2 Mean Teacher To overcome the limitations of Temporal Ensembling, we propose averaging model weights instead of predictions. Since the teacher model is an average of consecutive student models, we call this the Mean Teacher method (Figure 2). Averaging model weights over training steps tends to produce a 2 prediction prediction 3 3 classification cost consistency cost η η’ θ exponential θ’ moving average 3 label input student model teacher model Figure 2: The Mean Teacher method. The figure depicts a training batch with a single labeled example. Both the student and the teacher model evaluate the input applying noise (η, η 0 ) within their computation. The softmax output of the student model is compared with the one-hot label using classification cost and with the teacher output using consistency cost. After the weights of the student model have been updated with gradient descent, the teacher model weights are updated as an exponential moving average of the student weights. Both model outputs can be used for prediction, but at the end of the training the teacher prediction is more likely to be correct. A training step with an unlabeled example would be similar, except no classification cost would be applied. more accurate model than using the final weights directly [19]. We can take advantage of this during training to construct better targets. Instead of sharing the weights with the student model, the teacher model uses the EMA weights of the student model. Now it can aggregate information after every step instead of every epoch. In addition, since the weight averages improve all layer outputs, not just the top output, the target model has better intermediate representations. These aspects lead to two practical advantages over Temporal Ensembling: First, the more accurate target labels lead to a faster feedback loop between the student and the teacher models, resulting in better test accuracy. Second, the approach scales to large datasets and on-line learning. More formally, we define the consistency cost J as the expected distance between the prediction of the student model (with weights θ and noise η) and the prediction of the teacher model (with weights θ0 and noise η 0 ). h i 2 J(θ) = Ex,η0 ,η kf (x, θ0 , η 0 ) − f (x, θ, η)k The difference between the Π model, Temporal Ensembling, and Mean teacher is how the teacher predictions are generated. Whereas the Π model uses θ0 = θ, and Temporal Ensembling approximates f (x, θ0 , η 0 ) with a weighted average of successive predictions, we define θt0 at training step t as the EMA of successive θ weights: 0 θt0 = αθt−1 + (1 − α)θt where α is a smoothing coefficient hyperparameter. An additional difference between the three algorithms is that the Π model applies training to θ0 whereas Temporal Ensembling and Mean Teacher treat it as a constant with regards to optimization. We can approximate the consistency cost function J by sampling noise η, η 0 at each training step with stochastic gradient descent. Following Laine & Aila [13], we use mean squared error (MSE) as the consistency cost in most of our experiments. 3 Table 1: Error rate percentage on SVHN over 10 runs (4 runs when using all labels). We use exponential moving average weights in the evaluation of all our models. All the methods use a similar 13-layer ConvNet architecture. See Table 5 in the Appendix for results without input augmentation. 250 labels 73257 images GAN [25] Π model [13] Temporal Ensembling [13] VAT+EntMin [16] Supervised-only 27.77 ± 3.18 Π model 9.69 ± 0.92 Mean Teacher 4.35 ± 0.50 500 labels 73257 images 18.44 ± 4.8 6.65 ± 0.53 5.12 ± 0.13 16.88 ± 1.30 6.83 ± 0.66 4.18 ± 0.27 1000 labels 73257 images 8.11 ± 1.3 4.82 ± 0.17 4.42 ± 0.16 3.86 12.32 ± 0.95 4.95 ± 0.26 3.95 ± 0.19 73257 labels 73257 images 2.54 ± 0.04 2.74 ± 0.06 2.75 ± 0.10 2.50 ± 0.07 2.50 ± 0.05 Table 2: Error rate percentage on CIFAR-10 over 10 runs (4 runs when using all labels). 1000 labels 50000 images GAN [25] Π model [13] Temporal Ensembling [13] VAT+EntMin [16] Supervised-only 46.43 ± 1.21 Π model 27.36 ± 1.20 Mean Teacher 21.55 ± 1.48 3 2000 labels 50000 images 33.94 ± 0.73 18.02 ± 0.60 15.73 ± 0.31 4000 labels 50000 images 18.63 ± 2.32 12.36 ± 0.31 12.16 ± 0.31 10.55 20.66 ± 0.57 13.20 ± 0.27 12.31 ± 0.28 50000 labels 50000 images 5.56 ± 0.10 5.60 ± 0.10 5.82 ± 0.15 6.06 ± 0.11 5.94 ± 0.15 Experiments To test our hypotheses, we first replicated the Π model [13] in TensorFlow [1] as our baseline. We then modified the baseline model to use weight-averaged consistency targets. The model architecture is a 13-layer convolutional neural network (ConvNet) with three types of noise: random translations and horizontal flips of the input images, Gaussian noise on the input layer, and dropout applied within the network. We use mean squared error as the consistency cost and ramp up its weight from 0 to its final value during the first 80 epochs. The details of the model and the training procedure are described in Appendix B.1. 3.1 Comparison to other methods on SVHN and CIFAR-10 We ran experiments using the Street View House Numbers (SVHN) and CIFAR-10 benchmarks [17]. Both datasets contain 32x32 pixel RGB images belonging to ten different classes. In SVHN, each example is a close-up of a house number, and the class represents the identity of the digit at the center of the image. In CIFAR-10, each example is a natural image belonging to a class such as horses, cats, cars and airplanes. SVHN contains of 73257 training samples and 26032 test samples. CIFAR-10 consists of 50000 training samples and 10000 test samples. Tables 1 and 2 compare the results against recent state-of-the-art methods. All the methods in the comparison use a similar 13-layer ConvNet architecture. Mean Teacher improves test accuracy over the Π model and Temporal Ensembling on semi-supervised SVHN tasks. Mean Teacher also improves results on CIFAR-10 over our baseline Π model. The recently published version of Virtual Adversarial Training by Miyato et al. [16] performs even better than Mean Teacher on the 1000-label SVHN and the 4000-label CIFAR-10. As discussed in the introduction, VAT and Mean Teacher are complimentary approaches. Their combination may yield better accuracy than either of them alone, but that investigation is beyond the scope of this paper. 4 Table 3: Error percentage over 10 runs on SVHN with extra unlabeled training data. 500 labels 73257 images 6.83 ± 0.66 4.18 ± 0.27 Π model (ours) Mean Teacher 73257 images and labels classification cost 101 500 labels 573257 images 3.26 ± 0.14 2.46 ± 0.06 73257 images and 500 labels 573257 images and 500 labels 100 10­1 model (test set) Mean teacher (student, test set) model (training) Mean teacher (student, training) 10­2 10­3 100% classification error 500 labels 173257 images 4.49 ± 0.27 3.02 ± 0.16 model model (EMA) Mean teacher (student) Mean teacher (teacher) 50% 20% 10% 5% 2% 0k 20k 40k 60k 80k 100k 0k 20k 40k 60k 80k 100k 0k 20k 40k 60k 80k 100k Figure 3: Smoothened classification cost (top) and classification error (bottom) of Mean Teacher and our baseline Π model on SVHN over the first 100000 training steps. In the upper row, the training classification costs are measured using only labeled data. 3.2 SVHN with extra unlabeled data Above, we suggested that Mean Teacher scales well to large datasets and on-line learning. In addition, the SVHN and CIFAR-10 results indicate that it uses unlabeled examples efficiently. Therefore, we wanted to test whether we have reached the limits of our approach. Besides the primary training data, SVHN includes also an extra dataset of 531131 examples. We picked 500 samples from the primary training as our labeled training examples. We used the rest of the primary training set together with the extra training set as unlabeled examples. We ran experiments with Mean Teacher and our baseline Π model, and used either 0, 100000 or 500000 extra examples. Table 3 shows the results. 3.3 Analysis of the training curves The training curves on Figure 3 help us understand the effects of using Mean Teacher. As expected, the EMA-weighted models (blue and dark gray curves in the bottom row) give more accurate predictions than the bare student models (orange and light gray) after an initial period. Using the EMA-weighted model as the teacher improves results in the semi-supervised settings. There appears to be a virtuous feedback cycle of the teacher (blue curve) improving the student (orange) via the consistency cost, and the student improving the teacher via exponential moving averaging. If this feedback cycle is detached, the learning is slower, and the model starts to overfit earlier (dark gray and light gray). Mean Teacher helps when labels are scarce. When using 500 labels (middle column) Mean Teacher learns faster, and continues training after the Π model stops improving. On the other hand, in the all-labeled case (left column), Mean Teacher and the Π model behave virtually identically. 5 (b) 10% 10% 5% consistency ramp-up on 3 10 consistency cost weight 15% (f) 10% off cons. cost function KL-div 0.99 2 10 0.9 3 dual output diff. cost 0.1 5% single output EMA decay .9997 .99 .999 5% .99/ .999 5% .9 10% .0 10% (e) 10 15% 4 (d) 0 0.1 0.3 1 0.25 10 no input dropout both noise noise 15% 5% 0.5 0.75 teacher dropout 0.0 5 5% (c) 15% 0.01 15% MSE aug with men out tati with on augmentation 10 10% (a) 0 15% Figure 4: Validation error on 250-label SVHN over four runs per hyperparameter setting and their means. In each experiment, we varied one hyperparameter, and used the evaluation run hyperparameters of Table 1 for the rest. The hyperparameter settings used in the evaluation runs are marked with the bolded font weight. See the text for details. Mean Teacher uses unlabeled training data more efficiently than the Π model, as seen in the middle column. On the other hand, with 500k extra unlabeled examples (right column), Π model keeps improving for longer. Mean Teacher learns faster, and eventually converges to a better result, but the sheer amount of data appears to offset Π model’s worse predictions. 3.4 Ablation experiments To assess the importance of various aspects of the model, we ran experiments on SVHN with 250 labels, varying one or a few hyperparameters at a time while keeping the others fixed. Removal of noise (Figures 4(a) and 4(b)). In the introduction and Figure 1, we presented the hypothesis that the Π model produces better predictions by adding noise to the model on both sides. But after the addition of Mean Teacher, is noise still needed? Yes. We can see that either input augmentation or dropout is necessary for passable performance. On the other hand, input noise does not help when augmentation is in use. Dropout on the teacher side provides only a marginal benefit over just having it on the student side, at least when input augmentation is in use. Sensitivity to EMA decay and consistency weight (Figures 4(c) and 4(d)). The essential hyperparameters of the Mean Teacher algorithm are the consistency cost weight and the EMA decay α. How sensitive is the algorithm to their values? We can see that in each case the good values span roughly an order of magnitude and outside these ranges the performance degrades quickly. Note that EMA decay α = 0 makes the model a variation of the Π model, although somewhat inefficient one because the gradients are propagated through only the student path. Note also that in the evaluation runs we used EMA decay α = 0.99 during the ramp-up phase, and α = 0.999 for the rest of the training. We chose this strategy because the student improves quickly early in the training, and thus the teacher should forget the old, inaccurate, student weights quickly. Later the student improvement slows, and the teacher benefits from a longer memory. Decoupling classification and consistency (Figure 4(e)). The consistency to teacher predictions may not necessarily be a good proxy for the classification task, especially early in the training. So far our model has strongly coupled these two tasks by using the same output for both. How would decoupling the tasks change the performance of the algorithm? To investigate, we changed the model to have two top layers and produce two outputs. We then trained one of the outputs for classification and the other for consistency. We also added a mean squared error cost between the output logits, and then varied the weight of this cost, allowing us to control the strength of the coupling. Looking at the results (reported using the EMA version of the classification output), we can see that the strongly coupled version performs well and the too loosely coupled versions do not. On the other hand, a moderate decoupling seems to have the benefit of making the consistency ramp-up redundant. 6 Table 4: Error rate percentage of ResNet Mean Teacher compared to the state of the art. We report the test results from 10 runs on CIFAR-10 and validation results from 2 runs on ImageNet. State of the art ConvNet Mean Teacher ResNet Mean Teacher State of the art using all labels CIFAR-10 4000 labels 10.55 [16] 12.31 ± 0.28 6.28 ± 0.15 2.86 [5] ImageNet 2012 10% of the labels 35.24 ± 0.90 [20] 9.11 ± 0.12 3.79 [10] Changing from MSE to KL-divergence (Figure 4(f)) Following Laine & Aila [13], we use mean squared error (MSE) as our consistency cost function, but KL-divergence would seem a more natural choice. Which one works better? We ran experiments with instances of a cost function family ranging from MSE (τ = 0 in the figure) to KL-divergence (τ = 1), and found out that in this setting MSE performs better than the other cost functions. See Appendix C for the details of the cost function family and for our intuition about why MSE performs so well. 3.5 Mean Teacher with residual networks on CIFAR-10 and ImageNet In the experiments above, we used a traditional 13-layer convolutional architecture (ConvNet), which has the benefit of making comparisons to earlier work easy. In order to explore the effect of the model architecture, we ran experiments using a 12-block (26-layer) Residual Network [8] (ResNet) with Shake-Shake regularization [5] on CIFAR-10. The details of the model and the training procedure are described in Appendix B.2. As shown in Table 4, the results improve remarkably with the better network architecture. To test whether the methods scales to more natural images, we ran experiments on Imagenet 2012 dataset [22] using 10% of the labels. We used a 50-block (152-layer) ResNeXt architecture [33], and saw a clear improvement over the state of the art. As the test set is not publicly available, we measured the results using the validation set. 4 Related work Noise regularization of neural networks was proposed by Sietsma & Dow [26]. More recently, several types of perturbations have been shown to regularize intermediate representations effectively in deep learning. Adversarial Training [6] changes the input slightly to give predictions that are as different as possible from the original predictions. Dropout [28] zeroes random dimensions of layer outputs. Dropconnect [31] generalizes Dropout by zeroing individual weights instead of activations. Stochastic Depth [11] drops entire layers of residual networks, and Swapout [27] generalizes Dropout and Stochastic Depth. Shake-shake regularization [5] duplicates residual paths and samples a linear combination of their outputs independently during forward and backward passes. Several semi-supervised methods are based on training the model predictions to be consistent to perturbation. The Denoising Source Separation framework (DSS) [29] uses denoising of latent variables to learn their likelihood estimate. The Γ variant of Ladder Network [21] implements DSS with a deep learning model for classification tasks. It produces a noisy student predictions and clean teacher predictions, and applies a denoising layer to predict teacher predictions from the student predictions. The Π model [13] improves the Γ model by removing the explicit denoising layer and applying noise also to the teacher predictions. Similar methods had been proposed already earlier for linear models [30] and deep learning [2]. Virtual Adversarial Training [16] is similar to the Π model but uses adversarial perturbation instead of independent noise. The idea of a teacher model training a student is related to model compression [3] and distillation [9]. The knowledge of a complicated model can be transferred to a simpler model by training the simpler model with the softmax outputs of the complicated model. The softmax outputs contain more information about the task than the one-hot outputs, and the requirement of representing this 7 knowledge regularizes the simpler model. Besides its use in model compression, distillation can be used to harden trained models against adversarial attacks [18]. The difference between distillation and consistency regularization is that distillation is performed after training whereas consistency regularization is performed on training time. Consistency regularization can be seen as a form of label propagation [34]. Training samples that resemble each other are more likely to belong to the same class. Label propagation takes advantage of this assumption by pushing label information from each example to examples that are near it according to some metric. Label propagation can also be applied to deep learning models [32]. However, ordinary label propagation requires a predefined distance metric in the input space. In contrast, consistency targets employ a learned distance metric implied by the abstract representations of the model. As the model learns new features, the distance metric changes to accommodate these features. Therefore, consistency targets guide learning in two ways. On the one hand they spread the labels according to the current distance metric, and on the other hand, they aid the network learn a better distance metric. 5 Conclusion Temporal Ensembling, Virtual Adversarial Training and other forms of consistency regularization have recently shown their strength in semi-supervised learning. In this paper, we propose Mean Teacher, a method that averages model weights to form a target-generating teacher model. Unlike Temporal Ensembling, Mean Teacher works with large datasets and on-line learning. Our experiments suggest that it improves the speed of learning and the classification accuracy of the trained network. In addition, it scales well to state-of-the-art architectures and large image sizes. The success of consistency regularization depends on the quality of teacher-generated targets. If the targets can be improved, they should be. Mean Teacher and Virtual Adversarial Training represent two ways of exploiting this principle. Their combination may yield even better targets. There are probably additional methods to be uncovered that improve targets and trained models even further. Acknowledgements We thank Samuli Laine and Timo Aila for fruitful discussions about their work, and Phil Bachman and Colin Raffel for corrections to the pre-print version of this paper. We also thank everyone at The Curious AI Company for their help, encouragement, and ideas. References [1] Abadi, Martín, Agarwal, Ashish, Barham, Paul, Brevdo, Eugene, Chen, Zhifeng, Citro, Craig, Corrado, Greg S., Davis, Andy, Dean, Jeffrey, Devin, Matthieu, Ghemawat, Sanjay, Goodfellow, Ian, Harp, Andrew, Irving, Geoffrey, Isard, Michael, Jia, Yangqing, Jozefowicz, Rafal, Kaiser, Lukasz, Kudlur, Manjunath, Levenberg, Josh, Mané, Dan, Monga, Rajat, Moore, Sherry, Murray, Derek, Olah, Chris, Schuster, Mike, Shlens, Jonathon, Steiner, Benoit, Sutskever, Ilya, Talwar, Kunal, Tucker, Paul, Vanhoucke, Vincent, Vasudevan, Vijay, Viégas, Fernanda, Vinyals, Oriol, Warden, Pete, Wattenberg, Martin, Wicke, Martin, Yu, Yuan, and Zheng, Xiaoqiang. TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems. 2015. [2] Bachman, Philip, Alsharif, Ouais, and Precup, Doina. Learning with Pseudo-Ensembles. arXiv:1412.4864 [cs, stat], December 2014. arXiv: 1412.4864. [3] Buciluǎ, Cristian, Caruana, Rich, and Niculescu-Mizil, Alexandru. Model compression. In Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 535–541. ACM, 2006. [4] Gal, Yarin and Ghahramani, Zoubin. Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning. In Proceedings of The 33rd International Conference on Machine Learning, pp. 1050–1059, 2016. [5] Gastaldi, Xavier. Shake-Shake regularization. arXiv:1705.07485 [cs], May 2017. arXiv: 1705.07485. 8 [6] Goodfellow, Ian J., Shlens, Jonathon, and Szegedy, Christian. Explaining and Harnessing Adversarial Examples. December 2014. arXiv: 1412.6572. [7] Guo, Chuan, Pleiss, Geoff, Sun, Yu, and Weinberger, Kilian Q. On Calibration of Modern Neural Networks. arXiv:1706.04599 [cs], June 2017. arXiv: 1706.04599. [8] He, Kaiming, Zhang, Xiangyu, Ren, Shaoqing, and Sun, Jian. Deep Residual Learning for Image Recognition. arXiv:1512.03385 [cs], December 2015. arXiv: 1512.03385. [9] Hinton, Geoffrey, Vinyals, Oriol, and Dean, Jeff. Distilling the Knowledge in a Neural Network. arXiv:1503.02531 [cs, stat], March 2015. arXiv: 1503.02531. [10] Hu, Jie, Shen, Li, and Sun, Gang. Squeeze-and-Excitation Networks. arXiv:1709.01507 [cs], September 2017. arXiv: 1709.01507. [11] Huang, Gao, Sun, Yu, Liu, Zhuang, Sedra, Daniel, and Weinberger, Kilian. Deep Networks with Stochastic Depth. arXiv:1603.09382 [cs], March 2016. arXiv: 1603.09382. [12] Kingma, Diederik and Ba, Jimmy. Adam: A Method for Stochastic Optimization. arXiv:1412.6980 [cs], December 2014. arXiv: 1412.6980. [13] Laine, Samuli and Aila, Timo. Temporal Ensembling for Semi-Supervised Learning. arXiv:1610.02242 [cs], October 2016. arXiv: 1610.02242. [14] Loshchilov, Ilya and Hutter, Frank. SGDR: Stochastic Gradient Descent with Warm Restarts. arXiv:1608.03983 [cs, math], August 2016. arXiv: 1608.03983. [15] Maas, Andrew L., Hannun, Awni Y., and Ng, Andrew Y. Rectifier nonlinearities improve neural network acoustic models. In Proc. ICML, volume 30, 2013. [16] Miyato, Takeru, Maeda, Shin-ichi, Koyama, Masanori, and Ishii, Shin. Virtual Adversarial Training: a Regularization Method for Supervised and Semi-supervised Learning. arXiv:1704.03976 [cs, stat], April 2017. arXiv: 1704.03976. [17] Netzer, Yuval, Wang, Tao, Coates, Adam, Bissacco, Alessandro, Wu, Bo, and Ng, Andrew Y. Reading digits in natural images with unsupervised feature learning. In NIPS Workshop on Deep Learning and Unsupervised Feature Learning, 2011. [18] Papernot, Nicolas, McDaniel, Patrick, Wu, Xi, Jha, Somesh, and Swami, Ananthram. Distillation as a Defense to Adversarial Perturbations against Deep Neural Networks. arXiv:1511.04508 [cs, stat], November 2015. arXiv: 1511.04508. [19] Polyak, B. T. and Juditsky, A. B. Acceleration of Stochastic Approximation by Averaging. SIAM J. Control Optim., 30(4):838–855, July 1992. ISSN 0363-0129. doi: 10.1137/0330046. [20] Pu, Yunchen, Gan, Zhe, Henao, Ricardo, Yuan, Xin, Li, Chunyuan, Stevens, Andrew, and Carin, Lawrence. Variational Autoencoder for Deep Learning of Images, Labels and Captions. arXiv:1609.08976 [cs, stat], September 2016. arXiv: 1609.08976. [21] Rasmus, Antti, Berglund, Mathias, Honkala, Mikko, Valpola, Harri, and Raiko, Tapani. Semisupervised Learning with Ladder Networks. In Cortes, C., Lawrence, N. D., Lee, D. D., Sugiyama, M., and Garnett, R. (eds.), Advances in Neural Information Processing Systems 28, pp. 3546–3554. Curran Associates, Inc., 2015. [22] Russakovsky, Olga, Deng, Jia, Su, Hao, Krause, Jonathan, Satheesh, Sanjeev, Ma, Sean, Huang, Zhiheng, Karpathy, Andrej, Khosla, Aditya, Bernstein, Michael, Berg, Alexander C., and FeiFei, Li. ImageNet Large Scale Visual Recognition Challenge. arXiv:1409.0575 [cs], September 2014. arXiv: 1409.0575. [23] Sajjadi, Mehdi, Javanmardi, Mehran, and Tasdizen, Tolga. Regularization With Stochastic Transformations and Perturbations for Deep Semi-Supervised Learning. In Lee, D. D., Sugiyama, M., Luxburg, U. V., Guyon, I., and Garnett, R. (eds.), Advances in Neural Information Processing Systems 29, pp. 1163–1171. Curran Associates, Inc., 2016. 9 [24] Salimans, Tim and Kingma, Diederik P. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In Advances in Neural Information Processing Systems, pp. 901–901, 2016. [25] Salimans, Tim, Goodfellow, Ian, Zaremba, Wojciech, Cheung, Vicki, Radford, Alec, and Chen, Xi. Improved techniques for training gans. In Advances in Neural Information Processing Systems, pp. 2226–2234, 2016. [26] Sietsma, Jocelyn and Dow, Robert JF. Creating artificial neural networks that generalize. Neural networks, 4(1):67–79, 1991. [27] Singh, Saurabh, Hoiem, Derek, and Forsyth, David. Swapout: Learning an ensemble of deep architectures. arXiv:1605.06465 [cs], May 2016. arXiv: 1605.06465. [28] Srivastava, Nitish, Hinton, Geoffrey, Krizhevsky, Alex, Sutskever, Ilya, and Salakhutdinov, Ruslan. Dropout: A Simple Way to Prevent Neural Networks from Overfitting. J. Mach. Learn. Res., 15(1):1929–1958, January 2014. ISSN 1532-4435. [29] Särelä, Jaakko and Valpola, Harri. Denoising Source Separation. Journal of Machine Learning Research, 6(Mar):233–272, 2005. ISSN ISSN 1533-7928. [30] Wager, Stefan, Wang, Sida, and Liang, Percy. Dropout Training as Adaptive Regularization. arXiv:1307.1493 [cs, stat], July 2013. arXiv: 1307.1493. [31] Wan, Li, Zeiler, Matthew, Zhang, Sixin, Le Cun, Yann, and Fergus, Rob. Regularization of Neural Networks using DropConnect. pp. 1058–1066, 2013. [32] Weston, Jason, Ratle, Frédéric, Mobahi, Hossein, and Collobert, Ronan. Deep learning via semi-supervised embedding. In Neural Networks: Tricks of the Trade, pp. 639–655. Springer, 2012. [33] Xie, Saining, Girshick, Ross, Dollár, Piotr, Tu, Zhuowen, and He, Kaiming. Aggregated Residual Transformations for Deep Neural Networks. arXiv:1611.05431 [cs], November 2016. arXiv: 1611.05431. [34] Zhu, Xiaojin and Ghahramani, Zoubin. Learning from labeled and unlabeled data with label propagation. 2002. 10 Appendix A Results without input augmentation See table 5 for the results without input augmentation. Table 5: Error rate percentage on SVHN and CIFAR-10 over 10 runs, including the results without input augmentation. We use exponential moving average weights in the evaluation of all our models. All the comparison methods use a 13-layer ConvNet architecture similar to ours and augmentation similar to ours, expect GAN, which does not use augmentation. SVHN GANb Π modelc Temporal Ensemblingc VAT+EntMind Ours Supervised-onlye Π model Mean Teacher Without augmentation Supervised-onlye Π model Mean Teacher CIFAR-10 GANb Π modelc Temporal Ensemblingc VAT+EntMind Ours Supervised-onlye Π model Mean Teacher Mean Teacher ResNet Without augmentation Supervised-onlye Π model Mean Teacher a e B 1000 labels all labelsa 18.44 ± 4.8 6.65 ± 0.53 5.12 ± 0.13 8.11 ± 1.3 4.82 ± 0.17 4.42 ± 0.16 3.86 2.54 ± 0.04 2.74 ± 0.06 27.77 ± 3.18 9.69 ± 0.92 4.35 ± 0.50 16.88 ± 1.30 6.83 ± 0.66 4.18 ± 0.27 12.32 ± 0.95 4.95 ± 0.26 3.95 ± 0.19 2.75 ± 0.10 2.50 ± 0.07 2.50 ± 0.05 36.26 ± 3.83 10.36 ± 0.94 5.85 ± 0.62 19.68 ± 1.03 7.01 ± 0.29 5.45 ± 0.14 14.15 ± 0.87 5.73 ± 0.16 5.21 ± 0.21 3.04 ± 0.04 2.75 ± 0.08 2.77 ± 0.09 250 labels 500 labels 1000 labels 2000 labels 4000 labels 18.63 ± 2.32 12.36 ± 0.31 12.16 ± 0.31 10.55 all labelsa 5.56 ± 0.10 5.60 ± 0.10 46.43 ± 1.21 27.36 ± 1.20 21.55 ± 1.48 10.08 ± 0.41 33.94 ± 0.73 18.02 ± 0.60 15.73 ± 0.31 20.66 ± 0.57 13.20 ± 0.27 12.31 ± 0.28 6.28 ± 0.15 5.82 ± 0.15 6.06 ± 0.11 5.94 ± 0.15 48.38 ± 1.07 32.18 ± 1.33 30.62 ± 1.13 36.07 ± 0.90 23.92 ± 1.07 23.14 ± 0.46 24.47 ± 0.50 17.08 ± 0.32 17.74 ± 0.30 7.43 ± 0.06 7.00 ± 0.20 7.21 ± 0.24 4 runs b Salimans et al. [25] c Laine & Aila [13] Only labeled examples and only classification cost d Miyato et al. [16] Experimental setup Source code for the experiments is available at https://github.com/CuriousAI/ mean-teacher. B.1 Convolutional network models We replicated the Π model of Laine & Aila [13] in TensorFlow [1], and added support for Mean Teacher training. We modified the model slightly to match the requirements of the experiments, as described in subsections B.1.1 and B.1.2. The difference between the original Π model described by Laine & Aila [13] and our baseline Π model thus depends on the experiment. The difference between 11 Table 6: The convolutional network architecture we used in the experiments. Layer Input Translation Horizontal flipa Gaussian noise Convolutional Convolutional Convolutional Pooling Dropout Convolutional Convolutional Convolutional Pooling Dropout Convolutional Convolutional Convolutional Pooling Softmax a Hyperparameters 32 × 32 RGB image Randomly {∆x, ∆y} ∼ [−2, 2] Randomly p = 0.5 σ = 0.15 128 filters, 3 × 3, same padding 128 filters, 3 × 3, same padding 128 filters, 3 × 3, same padding Maxpool 2 × 2 p = 0.5 256 filters, 3 × 3, same padding 256 filters, 3 × 3, same padding 256 filters, 3 × 3, same padding Maxpool 2 × 2 p = 0.5 512 filters, 3 × 3, valid padding 256 filters, 1 × 1, same padding 128 filters, 1 × 1, same padding Average pool (6 × 6 → 1×1 pixels) Fully connected 128 → 10 Not applied on SVHN experiments our baseline Π model and our Mean Teacher model is whether the teacher weights are identical to the student weights or an EMA of the student weights. In addition, the Π models (both the original and ours) backpropagate gradients to both sides of the model whereas Mean Teacher applies them only to the student side. Table 6 describes the architecture of the convolutional network. We applied mean-only batch normalization and weight normalization [24] on convolutional and softmax layers. We used Leaky ReLu [15] with α = 0.1 as the nonlinearity on each of the convolutional layers. We used cross-entropy between the student softmax output and the one-hot label as the classification cost, and the mean square error between the student and teacher softmax outputs as the consistency cost. The total cost was the weighted sum of these costs, where the weight of classification cost was the expected number of labeled examples per minibatch, subject to the ramp-ups described below. We trained the network with minibatches of size 100. We used Adam Optimizer [12] for training with learning rate 0.003 and parameters β1 = 0.9, β2 = 0.999, and ε = 10−8 . In our baseline Π model we applied gradients through both teacher and student sides of the network. In Mean teacher model, the teacher model parameters were updated after each training step using an EMA with α = 0.999. These hyperparameters were subject to the ramp-ups and ramp-downs described below. We applied a ramp-up period of 40000 training steps at the beginning of training. The consistency cost coefficient and the learning rate were ramped up from 0 to their maximum values, using a 2 sigmoid-shaped function e−5(1−x) , where x ∈ [0, 1]. We used different training settings in different experiments. In the CIFAR-10 experiment, we matched the settings of Laine & Aila [13] as closely as possible. In the SVHN experiments, we diverged from Laine & Aila [13] to accommodate for the sparsity of labeled data. Table 7 summarizes the differences between our experiments. B.1.1 ConvNet on CIFAR-10 We normalized the input images with ZCA based on training set statistics. 12 For sampling minibatches, the labeled and unlabeled examples were treated equally, and thus the number of labeled examples varied from minibatch to minibatch. We applied a ramp-down for the last 25000 training steps. The learning rate coefficient was ramped down to 0 from its maximum value. Adam β1 was ramped down to 0.5 from its maximum value. The 2 ramp-downs were performed using sigmoid-shaped function 1 − e−12.5x , where x ∈ [0, 1]. These ramp-downs did not improve the results, but were used to stay as close as possible to the settings of Laine & Aila [13]. B.1.2 ConvNet on SVHN We normalized the input images to have zero mean and unit variance. When doing semi-supervised training, we used 1 labeled example and 99 unlabeled examples in each mini-batch. This was important to speed up training when using extra unlabeled data. After all labeled examples had been used, they were shuffled and reused. Similarly, after all unlabeled examples had been used, they were shuffled and reused. We applied different values for Adam β2 and EMA decay rate during the ramp-up period and the rest of the training. Both of the values were 0.99 during the first 40000 steps, and 0.999 afterwards. This helped the 250-label case converge reliably. We trained the network for 180000 steps when not using extra unlabeled examples, for 400000 steps when using 100k extra unlabeled examples, and for 600000 steps when using 500k extra unlabeled examples. B.1.3 The baseline ConvNet models For training the supervised-only and Π model baselines we used the same hyperparameters as for training the Mean Teacher, except we stopped training earlier to prevent over-fitting. For supervisedonly runs we did not include any unlabeled examples and did not apply the consistency cost. We trained the supervised-only model on CIFAR-10 for 7500 steps when using 1000 images, for 15000 steps when using 2000 images, for 30000 steps when using 4000 images and for 150000 steps when using all images. We trained it on SVHN for 40000 steps when using 250, 500 or 1000 labels, and for 180000 steps when using all labels. We trained the Π model on CIFAR-10 for 60000 steps when using 1000 labels, for 100000 steps when using 2000 labels, and for 180000 steps when using 4000 labels or all labels. We trained it on SVHN for 100000 steps when using 250 labels, and for 180000 steps when using 500, 1000, or all labels. B.2 Residual network models We implemented our residual network experiments in PyTorch1 . We used different architectures for our CIFAR-10 and ImageNet experiments. B.2.1 ResNet on CIFAR-10 For CIFAR-10, we replicated the 26-2x96d Shake-Shake regularized architecture described in [5], and consisting of 4+4+4 residual blocks. We trained the network on 4 GPUs using minibatches of 512 images, 124 of which were labeled. We sampled the images in the same way as described in the SVHN experiments above. We augmented the input images with 4x4 random translations (reflecting the pixels at borders when necessary) and random horizontal flips. (Note that following [5] we used a larger translation size than on our earlier experiments.) We normalized the images to have channel-wise zero mean and unit variance over training data. We trained the network using stochastic gradient descent with initial learning rate 0.2 and Nesterov momentum 0.9. We trained for 180 epochs, decaying the learning rate with cosine annealing [14] 1 https://github.com/pytorch/pytorch 13 Table 7: Differences in training settings between the ConvNet experiments image pre-processing semi-supervised SVHN zero mean, unit variance supervised SVHN zero mean, unit variance image augmentation translation translation translation + horizontal flip number of labeled examples per minibatch 1 100 varying training steps 180000-600000 180000 150000 Adam β2 during and after ramp-up 0.99, 0.999 0.99, 0.999 0.999, 0.999 EMA decay rate during and after ramp-up 0.99, 0.999 0.99, 0.999 0.999, 0.999 Ramp-downs No No Yes Aspect semi-supervised CIFAR-10 ZCA so that it would have reached zero after 210 epochs. We define epoch as one pass through all the unlabeled examples – each labeled example was included many times in one such epoch. We used a total cost function consisting of classification cost and three other costs: We used the dual output trick described in subsection 3.4 and Figure 4(e) with MSE cost between logits with coefficient 0.01. This simplified other hyperparameter choices and improved the results. We used MSE consistency cost with coefficient ramping up from 0 to 100.0 during the first 5 epochs, using the same sigmoid ramp-up shape as in the experiments above. We also used an L2 weight decay with coefficient 2e-4. We used EMA decay value 0.97. B.2.2 ResNet on ImageNet On our ImageNet evaluation runs, we used a 152-layer ResNeXt architecture [33] consisting of 3+8+36+3 residual blocks, with 32 groups of 4 channels on the first block. We trained the network on 10 GPUs using minibatches of 400 images, 200 of which were labeled. We sampled the images in the same way as described in the SVHN experiments above. Following [10], we randomly augmented images using a 10 degree rotation, a crop with aspect ratio between 3/4 and 4/3 resized to 224x224 pixels, a random horizontal flip and a color jitter. We then normalized images to have channel-wise zero mean and unit variance over training data. We trained the network using stochastic gradient descent with maximum learning rate 0.25 and Nesterov momentum 0.9. We ramped up the learning rate linearly during the first two epochs from 0.1 to 0.25. We trained for 60 epochs, decaying the learning rate with cosine annealing so that it would have reached zero after 75 epochs. We used a total cost function consisting of classification cost and three other costs: We used the dual output trick described in subsection 3.4 and Figure 4(e) with MSE cost between logits with coefficient 0.01. We used a KL-divergence consistency cost with coefficient ramping up from 0 to 10.0 during the first 5 epochs, using the same sigmoid ramp-up shape as in the experiments above. We also used an L2 weight decay with coefficient 5e-5. We used EMA decay value 0.9997. 14 15% (f) 10% cons. cost function KL-div 0.99 0.9 0.1 0.01 MSE 5% Figure 5: Copy of Figure 4(f) in the main text. Validation error on 250-label SVHN over four runs and their mean, when varying the consistency cost shape hyperparameter τ between mean squared error (τ = 0) and KL-divergence (τ = 1). B.3 Use of training, validation and test data In the development phase of our work with CIFAR-10 and SVHN datasets, we separated 10% of training data into a validation set. We removed randomly most of the labels from the remaining training data, retaining an equal number of labels from each class. We used a different set of labels for each of the evaluation runs. We retained labels in the validation set to enable exploration of the results. In the final evaluation phase we used the entire training set, including the validation set but with labels removed. On a real-world use case we would not possess a large fully-labeled validation set. However, this setup is useful in a research setting, since it enables a more thorough analysis of the results. To the best of our knowledge, this is the common practice when carrying out research on semi-supervised learning. By retaining the hyperparameters from previous work where possible we decreased the chance of over-fitting our results to validation labels. In the ImageNet experiments we removed randomly most of the labels from the training set, retaining an equal number of labels from each class. For validation we used the given validation set without modifications. We used a different set of training labels for each of the evaluation runs and evaluated the results against the validation set. C Varying between mean squared error and KL-divergence As mentioned in subsection 3.4, we ran an experiment varying the consistency cost function between MSE and KL-divergence (reproduced in Figure 5). The exact consistency function we used was Cτ (p, q) = Zτ DKL (pτ kqτ ), where Zτ = 2 N 2τ 2 , pτ = τ p + 1−τ , N qτ = τ q + 1−τ , N τ ∈ (0, 1] and N is the number of classes. Taking the Taylor expansion we get DKL (pi kqi ) = X1 i 2 τ 2 N (pi − qi )2 + O N 2 τ 3  where the zeroth- and first-order terms vanish. Consequently, Cτ (p, q) → 1 X (pi − qi )2 N i when τ → 0 Cτ (p, q) = 2 DKL (pkq) N2 when τ = 1. The results in Figure 5 show that MSE performs better than KL-divergence or Cτ with any τ . We also tried other consistency cost weights with KL-divergence and did not reach the accuracy of MSE. 15 The exact reason why MSE performs better than KL-divergence remains unclear, but the form of Cτ may help explain it. Modern neural network architectures tend to produce accurate but overly confident predictions [7]. We can assume that the true labels are accurate, but we should discount the confidence of the teacher predictions. We can do that by having τ = 1 for the classification cost and τ < 1 for the consistency cost. Then pτ and qτ discount the confidence of the approximations while Zτ keeps gradients large enough to provide a useful training signal. However, we did not perform experiments to validate this explanation. 16
9cs.NE
Experimental and causal view on information integration in autonomous agents arXiv:1606.04250v3 [cs.AI] 13 Mar 2018 Philipp Geiger1 and Katja Hofmann2 and Bernhard Schölkopf 3 Abstract. The amount of digitally available but heterogeneous information about the world is remarkable, and new technologies such as self-driving cars, smart homes, or the internet of things may further increase it. In this paper we examine certain aspects of the problem of how such heterogeneous information can be harnessed by autonomous agents. After discussing potentials and limitations of some existing approaches, we investigate how experiments can help to obtain a better understanding of the problem. Specifically, we present a simple agent that integrates video data from a different agent, and implement and evaluate a version of it on the novel experimentation platform Malmo. The focus of a second investigation is on how information about the hardware of different agents, the agents’ sensory data, and causal information can be utilized for knowledge transfer between agents and subsequently more data-efficient decision making. Finally, we discuss potential future steps w.r.t. theory and experimentation, and formulate open questions. 1 1.1 Main contributions The main contribution of this paper consists of two investigations: • In Section 5 we use a simulated experimentation platform Malmo to obtain a better understanding of the problem of integrating heterogeneous information. More specifically, we present a simple agent that harnesses video data from a different agent, and implement and evaluate a version of it. 2 3 The common structure of both investigations is that we start with a description of a scenario that captures certain core aspects of the general problem, in particular containing a variety of heterogeneous information sources, and then sketch a method to perform information integration and subsequent decision making in these scenarios. After experimentally evaluating the method, or illustrating it based on a toy example, we conclude both investigations with a discussion of the advantages and limitations of the respective methods. A reoccurring theme in our investigations is that we try to treat as much information (including models) as possible explicitly as input to algorithms instead of implicitly encoding it into algorithms. Our hope is that this sheds a better, more explicit light on the problem. Introduction Increasing amounts of heterogeneous information are recorded and connected, and this trend is likely to continue in the light of new technology such as self-driving cars, smart homes with domestic robots, or the internet of things. Intuitively, it makes sense to design autonomous agents in a way that they automatically integrate all relevant and well-structured information on their environment that is available. Various aspects of the problem of designing such agents have been investigated previously. In this paper we approach the problem from two directions which, to our knowledge, have not been (exhaustively) examined yet: using sophisticated simulated experiments, on a practical level, and causal models, on a more theoretical level. The complexity of the problem allows us only to take small steps. 1 • In Section 6 we investigate how detailed information on the hardware of different agents (we consider self-driving cars as example), their sensory data, and physical or causal information can be utilized for knowledge transfer between them and subsequent more data-efficient decision making. Max Planck Institute for Intelligent Systems, Tübingen, Germany; email: [email protected] Microsoft Research Cambridge, Cambridge, United Kingdom; email: [email protected] Max Planck Institute for Intelligent Systems, Tübingen, Germany; email: [email protected] 1.2 Structure of the paper The paper is structured as follows: We introduce the experimentation platform and basic concepts in Section 2. In Section 3, we formulate the problem. In Section 4, investigate potentials and limitations of existing approaches for the problem. In Sections 5 and 6, we present our two main investigations. In Section 7, we discuss future directions and pose open questions. We conclude with Section 8. 2 Preliminaries Here we introduce the concepts, models and the experimentation platform we will use in the paper. Autonomous agents. By an (autonomous) agent we mean a mechanism which, at each time point t, takes some input from the environment, in particular its sensory data which we refer to as observation, and outputs some action that influences the environment. Moreover, by an intelligent (autonomous) agent we mean an autonomous agent which is successful in using its inputs and outputs for given tasks, i.e., specific goals w.r.t. the environment, often encoded by a reward or utility function. Note that in this paper we do not define a clear boundary between agent and environment. Usually, we consider the hardware platform of an agent (e.g., the car) as part of the agent. This particularly has to be kept in mind when we talk of several agents in the “same environment”: the hardware of the agents may still differ. (It is almost a philosophical problem to define what precisely the “same environment” means. Here we simply suggest to interpret this notion as if it were used in an everyday conversation. We pose a related question in Section 7.) When we consider some agent A w.r.t. which some task is given and for which we want to infer good actions, while information may come from (sensory data of) a collection C of other agents, then we refer to A as target agent and the agents in C as source agents. Experimentation platform “Malmo”. For the experiments in Section 5 we will use the software Malmo, a simulated environment for experimentation with intelligent agents, that was introduced recently [4]. Malmo is based on “Minecraft”, which is an open-ended computer game where players can explore, construct, collaborate, and invent their own “games within the game” or tasks. The Malmo platform provides an abstraction layer on top of the game through which one or more agents observe the current state of the world (observations are customizable) and interact with it through their specific action sets (or actuators). The advantage of Malmo is that it reflects important characteristics of the problem instances we will introduce in Section 3. To illustrate the platform, three sample observations of an agent in three different maps in Malmo will be depicted in Figure 1. Causal models. Mathematically, a causal model [10, 14] M over a set V of variables consists of a directed acyclic graph (DAG) G with V as node set, called causal diagram or causal DAG, and a conditional probability density pX|PAX =paX (for all paX in the domain of PAX ) for each X ∈ V , where PAX are the parents of X in G. Given a causal model M and a tuple of variables Z of M , the post-interventional causal model Mdo Z=z is defined as follows: drop the variables in Z and all incoming arrows from the causal diagram, and fix the value of variables in Z to the corresponding entry of z in all remaining conditional densities. Based on this, we define the post-interventional density of Y after setting Z to z, denoted by pY |do Z=z or pY |do z , by the the density of Y in Mdo Z=z . On a non-mathematical level, we consider M to be a correct causal model of some part of reality, if it correctly predicts the outcomes of interventions in that part of reality (clearly there are other reasonable definitions of causation). Keep in mind that in this paper, in particular Section 6, will use causal models and causal reasoning in a more intuitive and sometimes less rigorous way, to not be limited by the expressive power of the current formal modeling language. Note that we will use expressions like p(x|y) as shorthand for pX|Y (x|y). 3 Problem formulation Let us describe the problem we consider in this paper in more detail: • Given: a task T w.r.t. some partially unknown environment E, and additional heterogeneous but well-structured information sources H (e.g., in the form of low-level sensory data, or in the form of high-level descriptions). • Goal: design an agent A that automatically harnesses as much relevant information of H as possible to solve T ; more specifically, it should use H to either improve an explicit model of the effects4 of its actions, which then guides its actions, or let its actions directly be guided by H. 4 In this sense, at least the target of the information integration is clear: modeling the dynamics or causal structure of the agent in the environment. Note that alternatively, one could also formulate the problem by letting A only be an actuator, and not a complete agent, and include the agent’s sensors into H. This might be a more precise formulation, however, for the sake of an intuitive terminology, we stick to the definition based on A being an agent.5 To illustrate the general problem, in what follows, we give three concrete examples of desirable scenarios in which agents automatically integrate heterogeneous information. Ideally, agents would be able to simultaneously integrate information sources from all three examples. 3.1 Example 1: sharing information between different self-driving cars Consider self-driving cars. It is desirable that as much information about the environment can be shared amongst them. By such information we mean up-to-date detailed street maps, traffic information, information on how to avoid accidents etc. For instance, assume that one self-driving car leaves the road at some difficult spot due to some inappropriate action, since, for instance, the spot has not been visited by self-driving cars before (or newly appeared due to say some oil spill or rockfall). If we only consider other self-driving cars of the same hardware, this experience could directly be transferred to them by enforcing them not to perform the very action at the very spot. (I.e., for all cars of the same hardware one could treat the experience as if it was their own and make them “learn” from it in the usual reinforcement learning (RL) way.) However, if we assume that there are self-driving cars of different types, then it is not possible to transfer the experience, and thus avoid further accidents, in this straight-forward way. 3.2 Example 2: observing another agent Consider domestic robots. A domestic robot may, with its sensor, observe humans how they handle doors, windows, light switches, or kitchen devices. It should be possible that domestic robots learn from such experience. For instance, one could imagine a robot to reason that, if it is able to operate the door knob in a similar way as a human did before, this would also open the door and and thus allow the robot to walk into the other room (to achieve some task). 3.3 Example 3: integrating high-level information Consider an agent that arrives in a city it has never been to before. The goal is to get to a certain destination, say to the town hall. A resident may be able to explain the way in a simple language, with words such as “... follow this street until you come to a church, then turn right ...”. Or a resident could provide a map and mark directions on the map. One could imagine that an autonomous agent could combine such a description with a model of the “local” (or “low-level”) dynamics that is shared by most environments (which is closely related to the laws of physics). The model of the “local” dynamics could have been either hard-coded, or inferred based on exploration in other (related) environments. In principle it should be possible that 5 Note that the problem we formulate here does not coincide with developing (“strong”) artificial intelligence (AI), as defined, e.g., by the Turing test or simply based on human-level intelligence. We restrict to sources of information that are more or less well-structured - either quantitative measurements with a simple and clear relation to the physical world, or information in a language much more restrictive than natural language. Nonetheless, the formulated problem can be seen as one step from say RL into the direction of AI. such a combination allows the agent to successfully navigate to the destination city hall. 4 Related work: potentials and limitations Various research directions exist that address major or minor aspects of the problem formulated in Section 3. Here we discuss the most relevant such directions we are aware of, highlighting their potentials and limitations w.r.t. the problem. Keep in mind that Sections 5.4 and 6.4 contain additional discussions on the advantages of our approaches over these directions. 4.1 Reinforcement learning One of the most powerful approaches to shaping intelligent autonomous agents is reinforcement learning (RL) [16]. Instead of explicitly hard-coding each detail of an agent, for each environment and objective individually, the idea is to take an approach which is more modular and based on learning instead of hard-coding: the supervisor only determines the reward function and then the agent ideally uses exploration of the unknown environment and exploitation of the gained experience (sensory data) to achieve a high cumulative reward. Regarding the problem we consider in this paper, RL plays a key role for integration of information in the form of recordings of an agent’s own past, or of an agent with the same hardware. However, as mentioned in Section 3, in contrast to RL, here we consider the problem of integrating information beyond such recordings, such as sensory data from agents with different hardware, or higher level information such as maps. Generally, we aim at integrating information from many different sources simultaneously (e.g., many other self-driving cars in Example 1 and many different forms of information as described in Example 1 through Example 3. In particular, we aim at learning from databases that contain desirable as well as undesirable trajectories (e.g., avoid similar accidents as in Example 1). Clearly, we do not present methodology that fully tackles the above shortcomings of LfD methods in this paper. Rather, we make first steps towards such methodology in Sections 5 and 6. 4.3 In multi-agent systems, collections of agents acting in a shared environment are studied [15]. One important task is collaboration between agents [9]. A common approach is to model the collection of agents again as a single agent, by considering tuples of actions and observations as single actions and observations. Learning-based methods have been extensively studied [5]. While multi-agent systems approaches often allow to share and transfer information between agents, regarding the problem we formulated in Section 3 they have certain limitations: Similar as LfD, they usually do not integrate higher-level information sources (as the map in Example 3) or explicit hardware specifications of the agents (which we do in Section 6). Furthermore, if the mapping from some source agents sensory data to a target agents action is learned via modeling all agents as a single one, then it seems difficult to add agents to an environment, while our preliminary investigation in Section 6 in principle allows for adding agents more easily. Also note that the task of collaboration between agents is rather external to the problem we consider. 4.4 4.2 Learning from demonstrations According to [1], in learning from demonstrations (LfD), some “teacher” performs a trajectory which is recorded, and the goal is that a “learner” agent, based on this recording, infers and imitates (or utilizes) the teacher’s “policy” (or the dynamics of the environment, or both). Central notions that [1] uses to analyze and distinguish various types of LfD problems are the record mapping, i.e., what aspects of the teacher’s demonstration are measured and recorded, and the embodiment mapping, i.e., if the recorded actions can directly be implemented by the “learner” and lead to similar observations as the recoded ones, or if the recordings first have to be transformed “to make sense” for the learner. Our problem formulation can be seen as a generalization of LfD. Based on this, while a significant part of the problem we consider can be addressed by LfD methods, others are beyond the scope of these methods: Instead of hand-crafting, e.g., the embodiment mapping for each agent individually, we aim at (semi-)automating the inference of the mapping from recordings of “source” agents to actions of a “target” agent. In particular, we propose to do such a (semi-)automation based on additional information sources on the hardware specifications of the agents involved (Section 6).6 6 Note that there is some work on learning from observations only (not actions) of a “teacher” [12]. However, this approach does not allow to integrate information such as the map in Example 3. Note that a difference to our method in Section 5 is that, e.g., an estimate of the complete transition probability is necessary, while our method only requires an idea of the “low-level” dynamics. Multi-agent systems Transfer learning for agents The problem we consider is related to transfer learning for agents. For instance, [17] consider an example where, in the well-known mountain car example, experience should be transferred although the motor of the car is changed. This comes close to transferring experience between self-driving cars as we suggest in Example 1. However, the scope of methods reviewed in [17] is on transferring observationaction recordings or things such as policies, value functions etc. using an appropriate mapping, while the goal we pursue is to also integrate information which is usually not expressible in these terms (e.g., the map or natural language description in Example 3, or the observation of another agent in Example 2). Furthermore, in this paper we aim at integrating many heterogeneous sources of information, while in transfer learning, even though several sources of information may be considered, they are usually homogeneous. 4.5 Further related areas Other related directions include the following. Recently, the experimentation with intelligent agents in platforms based on computer games has become popular [8]. To our knowledge, the current work is the first one to use such platforms to study the problem of information integration, or related problems such as LfD (Section 4.2). The general integration and transfer of data (not focused on intelligent agents) using causal models has been studied by [11, 3]. The idea of integrating higher-level information (again not for intelligent agents though) has been studied, e.g., by [18]. The relation between intelligent agents and causal models has been studied from a more philosophical perspective, e.g., by [19]. Another related areas is computerized knowledge representation [13]. Compared to general approaches to knowledge representation, our focus is on knowledge about the physical world. Another relevant area is integration of human knowledge [7]. 5 Investigation 1: integration of “non-subjective” information, evaluated in a simulated environment In this section we aim to shed light on the following aspects of the problem formulated in Section 3: • Generally, what experiments, in particular in simulated environments, can be performed to better understand the problem? • How can experimentation (exploration) help an agent to translate “non-subjective” experience not recorded by itself into its own “coordinate system” and use it for (successful) decision making? • How can partial information on the dynamics, such as a controller that is known to work locally, be merged with “higher-level” information such as hints on the path to some goal position? • How can we quantify the efficiency gain from additional information sources? The investigation is structured as follows: in Section 5.1 we describe the scenario, in particular the available heterogeneous information sources, in Section 5.2 we sketch an information-integrating agent for that scenario, then, in Section 5.3, we evaluate an adapted version of the agent in a simulated environment, and last, in Section 5.4 we discuss the advantages of our method over those that do not use additional information, and some further aspects. 5.1 Task. An agent A starts in some unknown landscape and the task is to get to some visually recognizable goal position as quickly as possible. We assume the following • the agent’s own sensory input in the form of images yt and position signal qt (which can be seen an “interactive information” source since the agent can “query” this source via its actions), • the controller ctl , which can be seen as a summary of the agent A’s past subjective experience regarding the invariant local “physical laws” of a class of environments7 , ∗ • a video trajectory y0:L that is a first-person recording of another agent with similar (but not necessarily identical) hardware that runs to the goal in the same environment. Relation to the problem formulated in Section 3. On the one hand, this scenario can be seen as a (very) simplistic version of the scenario described in Example 1: A is a self-driving car that is supposed to get to some marked goal in an unknown environment, ∗ and the video y0:L comes from other cars that have a similar videorecording device but different hardware (engine etc.). On the other hand, this scenario can be seen as a simplistic version of the scenario described in Example 3: the unknown landscape is 7 ∗ 1: input: Controller ctl , video y1:L . 2: for i = 1, . . . , L do 3: Use local controller ctl , optimization method opt and interac- tion with the environment to search locally around the current position for the next qi = arg minq dist(yi∗ , E(Y |Q = q)). 4: Use ctl to go to qi . 5: end for Algorithm 2 Proof-of-concept of Algorithm 1 for Malmo ∗ 1: input: Controller ctl , video y1:L . 2: set r0 = current position, once the mission starts 3: for i = 1, . . . , L do 4: use ctl , opt and teleportation to locally search around position 5: 6: 7: 8: 9: 10: 11: 12: 13: Specifically, we assume that if the distance between position q1 and q2 is small, then ctl successfully steers from q1 to q2 . Alternatively, ctl could be a local model of the dynamics which induces such a controller. ri−1 for the next ri = arg minr E(dist(yi∗ , Y )|Q = r) end for restart the mission set i := 0. while i < L do use ctl to steer to ri if current position is close to ri then set i := i + 1 end if end while some unknown city A arrived in, and instead of a description of the way to the destination in simple natural language, it gets a sequence of photos that describe the path it has to take. 5.2 Scenario Available heterogeneous information. information sources to be available: Algorithm 1 Agent that integrates first-person video of other agent Method First we sketch a general method, i.e., “software” for A, in Algorithm 1, assuming a (stochastic) optimization method opt and an image distance dist as given (for concrete examples, see below). Note that in Algorithm 1 we denote by E(Y |Q = q) the mean image Y observed at position Q = q. The basic idea is that the agent uses local experimentation, based on prior knowledge of the local dynam∗ into information (and eventually actions) ics, to map the video y1:L that directly describes its own situation. Although Algorithm 1 is in principle applicable to the experimental setup we consider in Section 5.3 below, we will evaluate Algorithm 2 instead, which is a simplified proof-of-concept implementation of it, making use of “teleportation”, allowing the agent to directly jump to other positions without needing to navigate there. For Algorithm 2, as optimization method opt, we use simple grid search. (Note that instead one could use gradient descent or Bayesian optimization techniques.) Furthermore, we define the image distance dist using Gaussian blur as follows: dist(u, v) := kN ∗ (ū − v̄)k, where ū is the normalization of u (i.e., subtraction by mean and division by standard deviation over the single pixels), N is a bivariate Gaussian with hand-tuned variance and ∗ is the convolution in both image dimensions. 5.3 Empirical evaluation in a simulated environment To evaluate Algorithm 2, we consider three simple “Parkours” missions in the experimentation platform Malmo, described in Section 2. These missions consist of simple maps that have a special, visually recognizable, position which is defined as goal. A short description (a) Mission 1 (b) Mission 2 (c) Mission 3 Figure 1: First frames of the respective missions, for illustration purposes. while-loop of Algorithm 2 (line 8 and following) gets to the goal within 15 seconds. (This is a significantly weaker evaluation metric than considering the runtime of the complete Algorithm 2 of course.) The outcome of the experiment is given in columns three and four of Table 1 and Figure 2. 5.4 5.4.1 (a) Mission 1 (b) Mission 2 (c) Mission 3 Figure 2: The “ground truth” position trajectory of the demonstrator ∗ (blue dashed line), and the position trajectory of Algorithm 2 q0:L q̂0:K , (red solid line) from top view (x- and y-axis correspond to xand y-coordinate in the map. While Algorithm 2 fails in Mission 2 due to the repetitive structure of some wall, it succeeds in Missions 2 and 3 in spite of its simplicity. Table 1: For each mission (row) a short description (column 2), and the outcome of Algorithm 2 applied to it (columns three and four). Mission Description and image U ∗ q̂0:K versus q0:L 1 Figure 1a. Two passages have to be passed. Figure 1b. With (mortal) lava next to the path. Figure 1c. With spider webs that occlude vision and lead to slow motion. success Figure 2a fail Figure 2b success Figure 2c 2 3 of the three missions is given in column two of Table 1. We generally restrict the possible actions to [−1, 1]2 , where the first dimension is moving forth and back, and the second is strafing (moving sideways). The task is to get to the goal position within 15 seconds in these maps. For each mission, we record one trajectory performed by a human demonstrator, which solves the task. More specifically, we record po∗ sitions, which we denote by q0:L , and observations (video frames), ∗ denoted by y0:L . ∗ We run Algorithm 2 with inputs y0:L and a simple proportional controller [2] (for ctl ), where we tuned the proportional constant ∗ manually in previous experiments (but without providing q0:L or the actions the human demonstrator took). Let q̂0:K denote the trajectory of positions that Algorithm 2 subsequently takes in the map. Furthermore, let U ∈ {fail, success} denote whether the position tracking Discussion Discussion of the experiment Outcome. As shown by Table 1 and Figure 2, Algorithm 2 is successful for Missions 1 and 3. It fails in Mission 2 due to the repetitive structure of a wall that fills the complete image that is observed at ∗ . This wall makes the mapping from position some point during y1:L to observation (video frame) (locally) non-injective which makes the algorithm fail. Note that this problem could quite easily be overcome ∗ together with by using prior assumptions on the smoothness of q0:L considering more than one minimum of dist as the potential true position (using, e.g., Bayesian optimization) or by searching for po∗ . sition sequences longer than 1 that match y1:L Limitation of the experiment. A clear limitation of the exper∗ used the iment is that the human demonstrator that produced y1:L same (simulated) “hardware” as Algorithm 2, while the overall goal of this paper is to integrate heterogeneous information. However, we hope that this experiment can form the basis for more sophisticated ones in the future. 5.4.2 Theoretical analysis and insight ∗ . Assuming there are at Efficiency gain from harnessing y1:L most N positions which the demonstrator can reach within one time step, Algorithm 1 takes only about O(L · N ) steps to get to the goal. Note that this theoretical analysis is supported by the empirical evaluation: Algorithm 2’s trajectories - visualized in Figure 2 - are roughly ∗ as long as y1:L (note that the visualization does not show the local search of length N ). This has to be contrasted with an agent that does not integrate the ∗ information y1:L , and therefore, in the worst case, has to search all positions in the map, a number which is usually is much higher than O(L · N ) (roughly O(L2 )). Comparison to LfD. The task we study is closely related to LfD. However, note that usually in LfD, the target agent (“learner”) has access to the demonstrator’s actions, which is not necessary for our method. Furthermore, in our method, in some sense, the target agent ∗ can be seen as translating y1:L into its own “coordinate system” itself, while this mapping is usually hand-crafted in LfD. Some insights during the development of the method. An interesting insight during the development of Algorithm 5.2 was that while the low-pass filter only led to minor improvements, what really helped was to visit each position say three times and then optimize the distance over the averaged images. Furthermore, it was was surprising how well the simple Euclidean distance we used worked. Algorithm 3 Integration and control algorithm for agent j 1: input: Time point t, description D, specifications (spec k )k∈C , 2: 3: Limitations. Note that the method is limited to environments similar to landscapes where some stochasticity and variation may be contained, but not too much. For instance, if the environment varies to strongly in the dependence on the time an agent spends in the environment, the proposed method most likely fails since the tracking of ∗ y1:L usually takes longer than the original performance of it. 6 Investigation 2: integrating sensory data, hardware specifications and causal relations In this section we aim to shed light on the following aspects of the problem formulated in Section 3: • How can information on the the hardware specifications of various agents be used for knowledge transfer between them? • To what extent can causal models help, e.g., for integrating those hardware specifications (i.e., information on the “data producing mechanisms”)?8 • How can information from the “subjective perspective” of an agent (i.e., on the relation between its sensory measurements and its actions) be merged with information from an “outside perspective” (i.e., that of an engineer which sees the hardware specifications of an agent). The investigation is structured as follows: in Section 6.1 we describe the scenario, in particular the available heterogeneous information sources, in Section 6.2 we outline an information-integrating agent for that scenario, then, in Section 6.3, we give an intuitive toy example of scenario and method, and last, in Section 6.4 we discuss advantages and limitations of our approach. Keep in mind the definition of causal models in Section 2. It needs to be mentioned that at certain points in this section we will allow ourselves some extent of imprecision (in particular in the treatment of the (causal) model M and how it is inferred), since we aim at going beyond what current rigorous modeling languages allow. 4: 5: 6: • specifications spec k of the hardware of each agent k • past experiences (i.e., actions and observations) ekt of all agents k ∈ C, consisting of observations y k (t) and control outputs uk (t), i.e., ekt = (uk (0), y k (0), . . . , uk (t), y k (t)). • a description D (e.g., a physical or causal model or collection of such models) consisting of (1) a set of independence statements9 and (2) a set of dependence statements, possibly including specific information on the shape of the dependence, w.r.t. the factors contained in the specifications spec k and the experiences ek , for k ∈ C. Potentially, the various independence and dependence information pieces could come from different sources, say targeted experiments as well as general prior knowledge. We assume the dependence structure (including the precise shapes of the dependences) to be time-invariant. Relation to general problem. This scenario captures certain aspects of Example 3 in that some higher-level information in the form of the description D is available. While here, as a first step, we only consider mathematical models, in the future one could also imagine to include informal but well-structured models and descriptions (in simple natural language), possibly translating them into formal models as an intermediate step (using, e.g., machine learning). Furthermore, the scenario captures important aspects of Example 1, since we consider the integration of information from certain source selfdriving cars for the decision making of a given target car. 6.2 6.1 Scenario Task. We consider a scenario where a collection C of autonomous agents, think of self-driving cars, operates in a shared environment. (For simplicity we assume that the number of agents is small compared to the size of the environment, such that they do not affect each other.) We assume that while some hardware components of the agents differ, others are invariant between them. We assume that for each car a task (e.g., to track some trajectory) is given and fixed. Available heterogeneous information. Note that we could allow C to vary over time, e.g., to account for the fact that new cars get on the road every day, however, for the sake of a simple exposition, we leave it fixed here. We assume the following information sources to be available at time t: 8 Another reason why causal reasoning could help is that in the end we are interested in the causal effects of an agent on its environment, and not just correlational information. experiences (ekt )k∈C . Initialize a causal model M by the causal diagram implied by the description D over the set of factors in (spec k )k∈C and (ekt )k∈C . Update the “belief” over the mechanisms in M using all values of variables contained in (spec k )k∈C and the experiences (ekt )k∈C (possibly based on additional priors). From the updated M , calculate M j , the implication of M for agent j. Find action u(t) that is optimal w.r.t. the given task, under M j . output: u(t) Sketch of a method We sketch a method for the described scenario in Algorithm 3. It first derives a “global” causal diagram - applying to all agents from the potentially heterogeneous description D (line 2). Then (line 3) the causal conditionals of M , which are not determined by D, are inferred from the given hardware specifications as well as the experiences gathered by all agents up to time t. Last, based on the hardware specifications of agent j, the implications of M for agent j are calculated (line 4) and the optimal action under these implications is performed (line 5). 6.3 A toy example Let us illustrate how the method proposed in Section 6.2 works in a concrete toy scenario. The core intuition is that while some details 9 Clearly, independence assertions are central to integration of information: only based on statements of the form “Y is more or less independent of all factors that potentially will be included, except for this and this small set” it seems possible to rigorously (automatically) reason about integration. of the dynamics of self-driving cars may vary between different cars, they can still share information on say the road conditions (friction, drag, etc.) at certain positions y, or the like. hp u(t) y(t) F (t) G(t) ÿ(t) Figure 3: Sketch of the causal diagram H. The power hp influencing only F (t) implies that knowledge on the mechanism fG for G(t) can be transferred between two cars even if they differ in hp. Specific scenario. We consider two simplified self-driving cars, i.e., C = {1, 2}, where we assume the observation y k (t) (or y(t) if we refer to a model for both cars) to be the car’s position. We consider the following concrete instances of the information sources listed in Section 6.1. (Note that, for the sake of simplicity, we assume all mechanisms to be deterministic, such that we can model them by functions f... instead of conditional distributions p(. . . |pa... ), although the latter would be more general, see Section 2.) • The specification for car k is given by its power (e.g., measured in horse powers), i.e., spec k = hp k . • The experience of car k consist of all past position-action pairs of both cars, i.e., ekt = (uk (0), y k (0), . . . , uk (t), y k (t)). • The description D consists of three elements: – an engineer contributes the equation F (t) = fF (u(t), hp) for the engine of the cars10 , where F (t) is the force produced by the engine (incl. gears), and fF a known function, 1 – a physicist contributes the equation ÿ(t) = m (F (t)+G(t)) for the acceleration ÿ(t) of the cars, where G(t) are other forces that affect the cars, such as friction and drag, and m is the known mass (which we assume to be the same for both cars), – another physicist produces a set of additional independence assertions, such that altogether the description D implies the causal diagram H depicted in Figure 3.11 Implementation of our method. We suggest the following concrete implementation of the crucial part of our method, i.e., line 3 and 4 in Algorithm 3, based on the concrete instances of information available in this toy scenario. Keep in mind that fG , the function that maps a position y to the corresponding force G at that position and thus models the generating mechanism for G(t), is the only unknown part of M after initializing it by D. • Line 3: Use the experience (ekt )k∈C , to infer the function fG on all positions y visited by either of the cars, based on the equation mÿ − fF (u, hp k ) = fG (y) 10 In particular, the mechanism specification implies non-influence by all other relevant factors. 11 A better way to describe the physical forces causally might be to replace ÿ(t) in the equations and in D by expressions based on v(t + ∆t), v(t), and ∆t, where v(t) denotes the velocity. for all k ∈ C, and the fact that the l.h.s. of this equation as well as y are known for all positions (and accelerations) visited by either of the cars. • Line 4: calculate “p(ÿ|do(u), y, hp j )”, i.e., the effect of control action u of agent j at position y, for all positions that were visited before by either of the cars. 6.4 Discussion The toy example in Section 6.3 shows how in principle the integration of heterogeneous information could help some “target” selfdriving car for better decision making in situations not visited by it but by different “source” self-driving cars. It is important to note that all listed information sources were necessary for this: the hardware specifications are necessary to understand F (t), the experience is necessary to infer fG , and the independence knowledge (hp not affecting G(t)) is necessary to transfer the knowledge about the force G(t) on various positions y between the cars. Note that the above scenario cannot be tackled by standard RL approaches since we transfer knowledge between agents of different hardware. Furthermore, methods like LfD or transfer learning (see Sections 4.2 and 4.4) usually do not automatically harness information on hardware specifications of agents. Based on our preliminary investigation above, it seems that causal models are helpful in that they provide a language in which one can express relevant assumptions and reason about them. However, from a practical perspective, it is not clear if the necessary calculations could not be genuinely done e.g. in classical probabilistic models. An important question is whether the method sketched in Section 6.2 can be generalized to dependence statements in more natural - but still well-structured - language than equations and causal diagrams. 7 Outlook: future directions and open questions Here we sketch a potential agenda for future investigations and pose interesting open questions. 7.1 Potential future directions “Universal representation of physical world”. An interesting subject-matter of future research would be a “universal representation” of the physical world - a rich representation to which each information source could be translated, and from which each agent could derive the implications for its specific sensor and actuator configurations. Such a representation would be more efficient than handcrafting mappings for each (new) pair of source and agent individually (as is usually done in e.g. LfD, see Section 4.2), reducing the number of necessary mappings from n2 to n, where n is the number of agents. One starting point would be representations that are already used to integrate laser or radar scanner data on the one hand with (stereo) video camera data on the other hand in self-driving cars [6]. Another starting point would be the global positioning system (GPS) which is a successful universal representation of position with clear, hardware-independent semantics. Investigation and classification of the “integration mapping”. Another important concept for integration of heterogeneous information could be the mapping that transforms a collection of pieces of well-structured heterogeneous information into a model of the current situation or even directly into action recommendations. The study of such a mapping could build on the investigation of related mappings in LfD and transfer learning for agents (see Sections 4.2 and 4.4). Furthermore, parts of such a mapping could be learned (which would be related to machine-learning-based multi-agent systems, see Section 4.3. Generally, it would be interesting to examine the basic conditions under which the integration of heterogeneous information can be beneficial. Note that one way to classify and order various sources of information (and the mappings that are necessary to integrate them) would be from “closest to the agent A”, i.e., it’s own past observations and actions to “most distant”, e.g., agentindependent descriptions of the world in simple natural language, as exemplified in Section 3. Further experiments. Further experiments, with a gradually increasing difficulty (e.g. along the ordering proposed in the previous paragraph), could be performed, e.g. using the platform Malmo (Section 2) to gain a better understanding of integration of information: 1. Agents can observe other agents from a third-person perspective, enabling Example 2 in Section 3. 2. Higher level observations can be provided in the form of natural language (typed chat or external information in the form of natural language), or through artifacts such as maps, sign-posts, symbolic clues, etc. 7.2 Open questions It would also be interesting to investigate how the following questions could be answered: • One of the main question which guided our investigation in Section 6 can be cast as follows. While the information relevant to an agent is usually in the form of effects of its actions in certain situations, a lot of knowledge is formulated in non-causal form: for instance street maps at various granularities for self-driving cars. How are these two forms of information related? Is there a standard way to translate between them? Stated differently, how can various forms of information be translated into a model of the dynamics of the agent in the world. • Where is the boundary between additional heterogeneous information and prior knowledge? • How can the need for information integration be balanced with privacy restrictions? For instance, one may imagine cases where the mapping from a source agent’s experience to a target agent’s action is rather simple in principle, but information collected by the source agent cannot or should not be transmitted to the other, at least not in full. • How can big databases of information be filtered for useful information, i.e., the information which is correct and relevant for the current environment and task? • To what extent is the problem of information transfer between two different agents in the “same” environment just a special case of transfer between different environments (by considering the hardware of an agent as part of the environment)? • How can we reason without having a “global” model such as Figure 3? What about interfaces to build global from “local” models, describing only say the engine? • Generally, what are potential theoretical limitations of automated information integration, e.g. in terms of computability? 8 Conclusions In this paper, we considered the problem of designing agents that autonomously integrate available heterogeneous information about their environment. We investigated how experimentation in simulated environments on the one hand, and causal models on the other, can help to address it. A next step would be to perform more sophisticated experiments, ideally guided by specific problems e.g. from the area of self-driving cars. 9 Acknowledgments The authors thank Mathew Monfort, Nicole Beckage, Roberto Calandra, Matthew Johnson, Tim Hutton, David Bignell, Daniel Tarlow, Chris Bishop and Andrew Blake for helpful discussions, and the anonymous reviewers for useful hints. REFERENCES [1] Brenna D. Argall, Sonia Chernova, Manuela Veloso, and Brett Browning, ‘A survey of robot learning from demonstration’, Robotics and Autonomous Systems, 57(5), 469 – 483, (2009). [2] Karl Johan Aström and Richard M Murray, Feedback systems: an introduction for scientists and engineers, Princeton university press, 2010. [3] Elias Bareinboim and Judea Pearl, ‘Causal inference from big data: Theoretical foundations and the data-fusion problem’, Technical report, CALIFORNIA UNIV LOS ANGELES DEPT OF COMPUTER SCIENCE, (2015). [4] David Bignell, Katja Hofmann, Tim Hutton, and Matthew Johnson, ‘The Malmo platform for artificial intelligence experimentation’, in IJCAI (to appear), (2016). [5] Lucian Buşoniu, Robert Babuška, and Bart De Schutter, ‘Multi-agent reinforcement learning: An overview’, in Innovations in Multi-Agent Systems and Applications-1, 183–221, Springer, (2010). [6] Andreas Geiger, Julius Ziegler, and Christoph Stiller, ‘Stereoscan: Dense 3d reconstruction in real-time’, in Intelligent Vehicles Symposium (IV), 2011 IEEE, pp. 963–968. IEEE, (2011). [7] Andreas Holzinger, ‘Interactive machine learning for health informatics: when do we need the human-in-the-loop?’, Brain Informatics, 3(2), 119–131, (2016). [8] 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). [9] Reza Olfati-Saber, Alex Fax, and Richard M Murray, ‘Consensus and cooperation in networked multi-agent systems’, Proceedings of the IEEE, 95(1), 215–233, (2007). [10] J. Pearl, Causality, Cambridge University Press, 2000. [11] Judea Pearl and Elias Bareinboim, ‘Transportability of causal and statistical relations: A formal approach’, in In Proceedings of the TwentyFifth National Conference on Artificial Intelligence. AAAI Press, Menlo Park, CA, pp. 247–254, (2011). [12] Bob Price and Craig Boutilier, ‘Accelerating reinforcement learning through implicit imitation’, J. Artif. Int. Res., 19(1), 569–629, (December 2003). [13] John F Sowa, ‘Knowledge representation: logical, philosophical, and computational foundations’, (1999). [14] P. Spirtes, C. Glymour, and R. Scheines, Causation, prediction, and search, MIT, Cambridge, MA, 2nd edn., 2000. [15] Peter Stone and Manuela Veloso, ‘Multiagent systems: A survey from a machine learning perspective’, Autonomous Robots, 8(3), 345–383, (2000). [16] Richard S Sutton and Andrew G Barto, Reinforcement learning: An introduction, MIT press, 1998. [17] Matthew E Taylor and Peter Stone, ‘Transfer learning for reinforcement learning domains: A survey’, The Journal of Machine Learning Research, 10, 1633–1685, (2009). [18] Vladimir Vapnik and Akshay Vashist, ‘A new learning paradigm: Learning using privileged information’, Neural Networks, 22(5), 544– 557, (2009). [19] James Woodward, Making things happen: A theory of causal explanation, Oxford University Press, 2005.
2cs.AI
THE ORDER OF DOMINANCE OF A MONOMIAL IDEAL arXiv:1802.04863v1 [math.AC] 13 Feb 2018 GUILLERMO ALESANDRONI Abstract. Let S be a polynomial ring in n variables over a field, and let M be a monomial ideal of S. We introduce the notion of order of dominance of S/M , denoted odom(S/M ), which has many similarities with the codimension of S/M . In particular, we show that odom(S/M ) has the following properties: (i) codim(S/M ) ≤ odom(S/M ) ≤ pd(S/M). (ii) If odom(S/M ) = q, then bi (S/M ) ≤ qi , for all i. (iii) pd(S/M ) = n if and only if odom(S/M ) = n. 1. Introduction One of the fundamental concepts of dimension theory is that of codimension or height. In the context of monomial ideals this definition is simple and intuitive: if M is a monomial ideal in S = k[x1 , . . . , xn ], where k is a field, the codimension of the S-module S/M is the cardinality of the smallest subset A of {x1 , . . . , xn } such that every minimal generator of M is divisible by some variable of A. The importance of codimension in the study of monomial resolutions is obvious as it tells us how short a resolution can be. That is, codim(S/M ) ≤ pd(S/M ). In this article we introduce a new and sharper lower bound for the projective dimension; a notion that we call order of dominance. Although unorthodox, we define the order of dominance in this introduction after analyzing three motivational examples. Here is the first example. Let M1 = (a, b, c) be an ideal of S = k[a, b, c]. Then, pd(S/M1 ) ≥ codim(S/M1 ) = #{a, b, c} = 3. In this case, codim(S/M1 ) is a good lower bound of pd(S/M1 ) because, as we know, pd(S/M1 ) = 3. However, we can define a slightly different ideal for which codimension is a bad lower bound. Consider, for instance, the ideal M2 = (ad, bd, cd) of the ring S = k[a, b, c, d]. In this example we have that codim(S/M2 ) = #{d} = 1, while pd(S/M2 ) = 3. This apparently discouraging fact inspired the present work. Let us revisit the definition of codimension given in the first paragraph. It is easy to see that the subset A of {x1 , . . . , xn }, whose cardinality is precisely codim(S/M ), has the following properties: (i) Every minimal generator of M is divisible by some variable of A. (ii) If A′ ( A, there is a minimal generator of M that is not divisible by any variable of A′ . Indeed, the subset A of {x1 , . . . , xn } with #A = codim(S/M ) is the smallest subset of {x1 , . . . , xn } satisfying (i) and (ii) but, usually, not the only one. It follows from one of our main results (Theorem 3.5) that the cardinality of any subset of {x1 . . . , xn } satisfying (i) and (ii) is a lower bound for pd(S/M ). Thus, when we want to find a lower bound for pd(S/M ) we can look for the largest cardinality of a subset of {x1 , . . . , xn } satisfying (i) and (ii). 1 2 GUILLERMO ALESANDRONI In the particular case of M2 , codim(S/M2 ) is given by the cardinality of {d}, and {d} certainly satisfies (i) and (ii). However, the set {a, b, c} also satisfies (i) and (ii) and thus, according to Theorem 3.5, pd(S/M2 ) ≥ #{a, b, c} = 3. This is good news because, in fact, pd(S/M2 ) = 3. Now the scenario looks better but, as the next example shows, it is not good enough. Let M3 = (ad, bd, cd, d2 ) be an ideal of S = k[a, b, c, d] (note that M3 is obtained from M2 by adding a minimal generator). In this case, codim(S/M3 ) = #{d} = 1, and pd(S/M3 ) = 4. By simple inspection, we can verify that {d} is the only subset of {a, b, c, d} satisfying (i) and (ii). Thus, we are unable to improve the lower bound given by codim(S/M3 ). Yet, we can do one last trick. By polarizing, we can interpret M3 as the monomial ideal M3′ = (a1 d1 , b1 d1 , c1 d1 , d1 d2 ) of S ′ = k[a1 , b1 , c1 , d1 , d2 ]. It is easy to see that {a1 , b1 , c1 , d2 } is the largest subset of {a1 , b1 , c1 , d1 , d2 } satisfying (i) and (ii). Thus, we have that pd(S/M3 ) = pd(S ′ /M3′ ) ≥ #{a1 , b1 , c1 , d2 } = 4. This lower bound is optimal, for pd(S/M3 ) = 4. We have just introduced the main concept of this paper; the order of dominance. More precisely, if M is a monomial ideal of S, Mpol is the polarization of M , and we view Mpol as an ideal of the ring Spol , then the order of dominance of S/M , denoted odom(S/M ), is the largest cardinality of a set A of variables of Spol , having the following properties: (i) Every minimal generator of Mpol is divisible by some variable of A. (ii) If A′ ( A, then there is a minimal generator of Mpol that is not divisible by any variable of A′ . We should not assume that odom(S/M ) will always equal pd(S/M ), but we may regard odom(S/M ) as a refined version of codim(S/M ). Below is a summary of the main properties of odom(S/M ). Let M be an arbitrary monomial ideal in S. Then: (a) codim(S/M ) ≤ odom(S/M ) ≤ pd(S/M). (b) If odom(S/M ) = q, then bi (S/M ) ≤ qi , for all i. (c) pd(S/M ) = n if and only if odom(S/M ) = n if and only if bi (S/M ) ≤  , for all i. n i 2. Background and Notation Throughout this paper S represents a polynomial ring in n variables over a field. In some examples, n takes a specific value, and the variables are denoted with the letters a, b, c, etc. Everywhere else, n is arbitrary, and S is denoted S = k[x1 , . . . , xn ]. The letter M always represents a monomial ideal in S. We open this section by defining the Taylor resolution as a multigraded free resolution, something that will turn out to be fundamental in the present work. The construction that we give below can be found in [Me]. Construction 2.1. Let M = (m1 , . . . , mq ). For every subset {mi1 , . . . , mis } of {m1 , . . . , mq }, with 1 ≤ i1 < . . . < is ≤ q, we create a formal symbol [mi1 , . . . , mis ], called a Taylor symbol. The Taylor symbol associated to {} will be denoted by [∅]. For each s = 0, . . . , q, set Fs is ≤ q} given by the equal  to the free S-module with basis {[mi1 , . . . , mis ] : 1 ≤ i1 < . . . < L q S[mi1 , . . . , mis ] Taylor symbols corresponding to subsets of size s. That is, F = s s i1 <...<is (note that F0 = S[∅]). Define f0 : F0 → S/M s[∅] 7→ f0 (s[∅]) = s THE ORDER OF DOMINANCE OF A MONOMIAL IDEAL 3 For s = 1, . . . , q, let fs : Fs → Fs−1 be given by s X (−1)j+1 lcm(mi1 , . . . , mis ) d [mi1 , . . . , m fs ([mi1 , . . . , mis ]) = ij , . . . , mis ] d lcm(mi1 , . . . , m ij , . . . , mis ) j=1 and extended by linearity. The Taylor resolution TM of S/M is the exact sequence fq f1 f0 TM : 0 → Fq −→ Fq−1 → · · · → F1 −→ F0 −→ S/M → 0. Following [Me], we define the multidegree of a Taylor symbol [mi1 , . . . , mis ], denoted mdeg[mi1 , . . . , mis ], as follows: mdeg[mi1 , . . . , mis ] = lcm(mi1 , . . . , mis ). Definition 2.2. Let M be a monomial ideal, and let fi f1 f0 F : · · · → Fi −→ Fi−1 → · · · → F1 −→ F0 −→ S/M → 0 be a free resolution of S/M . We say that a basis element [σ] of F has homological degree i, denoted hdeg[σ] = i, if [σ] ∈ Fi . F is said to be a minimal resolution if for every i, the differential matrix (fi ) of F has no invertible entries. Note: From now on, every time that we make reference to a free resolution F of S/M we will assume that F is obtained from TM by means of consecutive cancellations. To help us remember this convention, the basis elements of a free resolution will always be called Taylor symbols. Definition 2.3. Let M be a monomial ideal, and let fi f1 f0 F : · · · → Fi −→ Fi−1 → · · · → F1 −→ F0 −→ S/M → 0 be a minimal free resolution of S/M . • For every i, the ith Betti number bi (S/M ) of S/M is bi (S/M ) = rank(Fi ). • For every i, j ≥ 0, the graded Betti number bij (S/M ) of S/M , in homological degree i and internal degree j, is bij (S/M ) = #{Taylor symbols [σ] of Fi : deg[σ] = j}. • For every i ≥ 0, and every monomial l, the multigraded Betti number bi,l (S/M ) of S/M , in homological degree i and multidegree l, is bi,l (S/M ) = #{Taylor symbols [σ] of Fi : mdeg[σ] = l}. • The projective dimension pd (S/M ) of S/M is pd (S/M ) = max{i : bi (S/M ) 6= 0}. Since the idea of polarization will play an important role in section 4, it is convenient to αn 1 introduce some common notation. If m = xα 1 . . . xn is a monomial in S, its polarization ′ will be denoted m = x1,1 . . . x1,α1 . . . xn,1 . . . xn,αn . If G is a set of monomials, then the set of all polarizations m′ of monomials m of G will be denoted Gpol . The polarization of a monomial ideal M of S will be denoted Mpol . Finally, Mpol will be regarded as an ideal in Spol , the polynomial ring over k whose variables are the ones that appear in the factorizations of the minimal generators of Mpol . We close this section with the concept of dominance [Al1, Al2] which is at the heart of this work. Definition 2.4. Let L be a set of monomials, and let M be a monomial ideal with minimal generating G. 4 GUILLERMO ALESANDRONI • An element m ∈ L is a dominant monomial (in L) if there is a variable x, such that for all m′ ∈ L \ {m}, the exponent with which x appears in the factorization of m is larger than the exponent with which x appears in the factorization of m′ . In this case, we say that m is dominant in x, and x is a dominant variable for m. • L is called a dominant set if each of its monomials is dominant. • M is called a dominant ideal if G is a dominant set. • If G′ is a dominant set contained in G, we will say that G′ is a dominant subset of G. (This does not mean that the elements of G′ are dominant in G, as the concept of dominant monomial always depends on a reference set.) Example 2.5. Let M be minimally generated by G = {a2 b, ab3 c, bc2 , a2 c2 }, and let G′ = {a2 b, ab3 c, bc2 }. Note that ab3 c is the only dominant monomial in G, being b a dominant variable for ab3 c. It is easy to check that G′ is a dominant set and, given that G′ ⊆ G, G′ is a dominant subset of G. (Incidentally, notice that two of the dominant monomials in G′ are not dominant in G.) Finally, the ideal M ′ , minimally generated by G′ , is a dominant ideal, for G′ is a dominant set. 3. Order of Dominance β1 αn ′ βn 1 Definition 3.1. Let l = xα 1 . . . xn , and l = x1 . . . xn be two monomials. We say that l ′ strongly divides l , if αi < βi , whenever αi 6= 0. β1 αn βn 1 Let a, b be elements of S, of the form a = αxα 1 . . . xn , b = βx1 . . . xn , where α, β ∈ k, and α1 , . . . , αn , β1 , . . . , βn ≥ 0. We will say that a and b have the same scalars if α = β. Lemma 3.2. Let M be minimally generated by G, and let F be a minimal resolution of αn 1 S/M . Let lcm(G) = xα 1 . . . xn , and let 1 ≤ q ≤ n. Suppose that the following conditions hold: (i) G contains a dominant set {d1 , . . . , dq } such that, for all i = 1, . . . , q, di is dominant in xi , and xi appears with exponent αi in the factorization of di . αq 1 (ii) Every monomial in G is divisible by at least one of xα 1 , . . . , xq . Then there is a Taylor symbol [σ] in the basis of F such that hdeg[σ] = q, and mdeg[σ] = αq βq+1 βn 1 xα 1 . . . xq xq+1 . . . xn , where βq+1 ≤ αq+1 , . . . , βn ≤ αn . α q+1 Proof. Let G′ = G ∪ {xq+1 +1 , . . . , xnαn +1 }, and let M ′ be the ideal (minimally) generated α +1 q+1 by G′ . Notice that the set L = {d1 , . . . , dq , xq+1 , . . . , xnαn +1 } is dominant, of cardinality αq+i +1 n, and such that each di is dominant in xi , and each xq+i is dominant in xq+i . Also, α q+1 αq 1 lcm(L) = lcm(G′ ) = xα 1 . . . xq xq+1 +1 . . . xnαn +1 . α q 1 By hypothesis, each element of G is divisible by at least one of xα 1 , . . . , xq . It follows that no monomial of G′ strongly divides lcm(L). αq 1 Let A = {[σ] ∈ TM : xα 1 . . . xq | mdeg[σ]}, and B = {[σ] ∈ TM ′ : mdeg[σ] = lcm(L)}. Let f :A→B α q+1 [l1 , . . . , lk ] → [l1 , . . . , lk , xq+1 +1 , . . . , xnαn +1 ]. Notice that f is bijective. Moreover, if we define Ai = {[σ] ∈ A : hdeg[σ] = i}, and Bi = {[σ] ∈ B : hdeg[σ] = i + (n − q)}, then f defines a bijection between Ai and Bi . THE ORDER OF DOMINANCE OF A MONOMIAL IDEAL 5 Suppose that FM is a free resolution of S/M , obtained from TM by doing the consecutive cancellations 0 → S[σ1 ] → S[τ1 ] → 0, .. . 0 → S[σr ] → S[τr ] → 0, where [σ1 ], . . . , [σr ], [τ1 ], . . . , [τr ] ∈ A. We will show that it is possible to obtain a free resolution FM ′ (of S/M ′ ) from TM ′ , by doing the cancellations 0 → Sf [σ1 ] .. . → Sf [τ1 ] → 0, 0 → Sf [σr ] → Sf [τr ] → 0, (r) with the property that if aστ is an entry of FM , determined by [σ], [τ ] ∈ A, then f [σ], f [τ ] (r) (r) are in the basis of FM ′ , and the entry bτ σ , determined by them, has the same scalar as aτ σ . The proof is by induction on r. If r = 0, then FM = TM and FM ′ = TM ′ . Thus, if [σ], [τ ] ∈ A, then f [σ], f [τ ] ∈ FM ′ . In particular, if [τ ] is a facet of [σ], f [τ ] is a facet of f [σ], and these Taylor symbols are of the form αq+1 +1 [σ] = [l1 , . . . , lk ], f [σ] = [l1 , . . . , lk , xq+1 , . . . , xnαn +1 ] αq+1 +1 [τ ] = [l1 , . . . , lbi , . . . , lk ], f [τ ] = [l1 , . . . , lbi , . . . , lk , xq+1 , . . . , xnαn +1 ]. Therefore, i+1 mdeg f [σ] i+1 mdeg[σ] , b(0) a(0) τ σ = (−1) τ σ = (−1) mdeg[τ ] mdeg f [τ ] (0) (0) On the other hand, if [τ ] is not a facet of [σ], f [τ ] is not a facet of f [σ], and aστ = 0 = bτ σ . (0) (0) In either case, aτ σ and bτ σ have the same scalar (either (−1)i+1 or 0). Let us assume that our claim holds for r − 1. Now, let us prove it for r. Let GM (respectively, GM ′ ) be the resolution obtained from TM (respectively, TM ′ ) by doing the cancellations 0 → S[σi ] → S[τi ] → 0, i = 1, . . . , r − 1 (respectively, 0 → Sf [σi ] → Sf [τi ] → 0, i = 1, . . . , r − 1). By induction hypothesis, if (r−1) is an entry of GM , determined by basis elements [σ], [τ ] ∈ A, then f [σ], f [τ ] are in aτ σ (r−1) (r−1) the basis of GM ′ , and the entry bτ σ determined by them, has the same scalar as aτ σ . Since neither [σr ] nor [τr ] is in {[σ1 ], . . . , [σr−1 ], [τ1 ], . . . , [τr−1 ]}, it follows that neither f [σr ] nor f [τr ] is in {f [σ1 ], . . . , f [σr−1 ], f [τ1 ], . . . , f [τr−1 ]}. This means that f [σr ], f [τr ] are in the basis of GM ′ . Let us define FM from GM by doing the consecutive cancellation 0 → S[σr ] → S[τr ] → 0. (r−1) (r−1) (r−1) (r−1) Since aτr σr is invertible, aτr σr 6= 0 and, given that aτr σr , bτr σr have the same scalar, (r−1) (r−1) bτr σr 6= 0. In addition, since mdeg f [σr ] = mdeg f [τr ], we must have that bτr σr ∈ k \ {0}. Hence, we can define FM ′ from GM ′ by doing the consecutive cancellation 0 → Sf [σr ] → Sf [τr ] → 0. (r) Moreover, if aτ σ is an entry of FM , determined by two Taylor symbols [σ], [τ ] ∈ A, then neither [σ] nor [τ ] is in {[σ1 ], . . . , [σr ], [τ1 ], . . . , [τr ]}, and thus, neither f [σ] nor f [τ ] is in {f [σ1 ], . . . , f [σr ], f [τ1 ], . . . , f [τr ]}. This means that f [σ], f [τ ] are in the basis of FM ′ . Finally, 6 GUILLERMO ALESANDRONI (r) (r) we need to show that the entry bτ σ , determined by f [σ], f [τ ] has the same scalar as aτ σ . By [Al], (r−1) (r−1) (r−1) (r−1) (r−1) a(r) − τ σ = aτ σ aτ σr aτr σ (r−1) aτr σr , (r−1) (r−1) and b(r) − τ σ = bτ σ (r−1) (r−1) bτ σr bτr σ (r−1) bτr σr (r−1) . (r−1) (r−1) By induction hypothesis, the pairs aτ σ and bτ σ , aτ σr and bτ σr , aτr σ and bτr σ , (r) (r) (r−1) and bτr σr , have the same respective scalars. Therefore, aτ σ and bτ σ have the same scalar, and our claim is proven. Let us take r to be as large as possible. That is, let FM be obtained from TM by means of r consecutive cancellations between pairs of elements of A, with the property that if aτ σ is an entry of FM , determined by Taylor symbols [σ], [τ ] of A, then aτ σ is noninvertible. It follows from [Al2, Theorem 3.3] that if HM is a minimal resolution of S/M obtained from FM by means of consecutive cancellations, those consecutive cancellations do not involve elements of A. Suppose, by means of contradiction, that no Taylor symbol of HM in homological degree q belongs to A. This implies that no Taylor symbol of FM in homological degree q belongs to A. Since f ↾ Aq : Aq → Bq is a bijection that sends elements in homological degree q to elements in homological degree q + (n − q) = n, it follows that no Taylor symbol of FM ′ in homological degree n belongs to B. Thus, if HM ′ is a minimal resolution of S/M ′ , obtained from FM ′ by means of consecutive cancellations, no Taylor symbol of HM ′ in homological degree n belongs to B. But given that the minimal generating set G′ of M ′ contains the dominant set L, of cardinality n, such that no element of G′ strongly divides lcm(L), it follows from [Al2, Theorem 5.2] that HM ′ must contain a basis element [θ], such that hdeg[θ] = n, and mdeg[θ] = lcm(L), a contradiction. We conclude that the minimal resolution of S/M contains a Taylor symbol [σ], such that hdeg[σ] = q, and [σ] ∈ A.  (r−1) aτr σr Lemma 3.3. Let M be minimally generated by G, and let F be a minimal resolution of αn 1 S/M . Let lcm(G) = xα 1 . . . xn , and let 1 ≤ i1 < . . . < iq ≤ n, where 1 ≤ q ≤ n. Suppose that the following conditions hold: (i) G contains a dominant set {d1 , . . . , dq } such that, for all j = 1, . . . , q, dj is dominant in xij , and xij appears with exponent αij in the factorization of dj . αi α (ii) Every monomial in G is divisible by at least one of xi1i1 , . . . , xiq q . Then there is a Taylor symbol [σ] in the basis of F such that hdeg[σ] = q, and mdeg[σ] = xλ1 1 . . . xλnn , where λj = αj if j ∈ {i1 , . . . , iq }, and λj ≤ αj if j ∈ / {i1 , . . . , iq }. Proof. Let f be a permutation of {1, . . . , n}, such that f (j) = ij , for all j = 1, . . . , q. For all j = 1, . . . , n, we define yj = xf (j) ; and δj = αf (j) . Then lcm(G) = y1δ1 . . . ynδn ; each dj is dominant in yj , and yj appears with exponent δj in the factorization of dj . δ Moreover, each monomial in G is divisible by at least one of y1δ1 , . . . , yq q . By Lemma 3.2, δ ǫq+1 δ1 F has a basis element [σ], such that hdeg[σ] = q and mdeg[σ] = y1 . . . yq q yq+1 . . . ynǫn , where ǫq+1 ≤ δq+1 , . . . , ǫn ≤ δn . With our original terminology, this means that F has a Taylor symbol [σ], such that hdeg[σ] = q, and mdeg[σ] = xλ1 1 . . . xλnn , where λj = αj if j ∈ {i1 , . . . , iq }, and λj ≤ αj if j ∈ / {i1 , . . . , iq }.  Definition 3.4. Let M be minimally generated by G. Let I be the class of all sequences 1 ≤ i1 < . . . < iq ≤ n, with q ≥ 1, such that the following conditions hold: (i) G contains a dominant set D = {d1 , . . . , dq } such that each dj is dominant in xij . THE ORDER OF DOMINANCE OF A MONOMIAL IDEAL 7 αn 1 (ii) If lcm(D) = xα 1 . . . xn , and m is an element of G dividing lcm(D), then m is divisible αi αi1 by at least one of xi1 , . . . , xiq q . We define the order of dominance of S/M , denoted odom(S/M ), as the maximum of the cardinalities of the sequences of I . In the next section we give a more intuitive definition of order of dominance. (The definition in the next section is much more similar to the one given in the introduction.)  Theorem 3.5. Let odom(S/M ) = q. Then, pd(S/M ) ≥ q, and br (S/M ) ≥ qr , for all r. Proof. Let G be the minimal generating set of M . By definition, there is a sequence 1 ≤ i1 < . . . < iq ≤ n, with q ≥ 1, such that: (i) G contains a dominant set {d1 , . . . , dq } such that, for all j = 1, . . . , q, dj is dominant in xij , and xij appears with exponent αij ≥ 1 in the factorization of dj . αi α (ii) If m ∈ G, and m | lcm(d1 , . . . , dq ), then m is divisible by at least one of xi1i1 , . . . , xiq q . Let ij1 , . . . , ijr be a subsequence of i1 , . . . iq . Then lcm(dj1 , . . . , djr ) = xβ1 1 . . . xβnn , where βk = αk if k ∈ {ij1 , . . . , ijr }, and βk < αk if k ∈ {i1 , . . . , iq } \ {ij1 , . . . , ijr }. Let G′ = {m ∈ G : m | lcm(dj1 , . . . , djr )}. Notice that {dj1 , . . . , djr } is a dominant set of cardinality r, such that each djk is dominant in xijk , and each xijk appears with exponent αijk in the αi αi factorization of djk . In addition, every m ∈ G′ is divisible by at least one of xij j1 , . . . , xijrjr αi α 1 because, otherwise, m could not be divisible by any of xi1i1 , . . . , xiq q , which contradicts property (ii). Let M ′ be the ideal (minimally) generated by G′ , and let FM ′ be a minimal resolution of S/M ′ . By Lemma 3.3, FM ′ contains a Taylor symbol [σ], such that hdeg[σ] = r, and mdeg[σ] = xλ1 1 . . . xλnn , where λk = βk if k ∈ {ij1 , . . . , ijr }, and λk ≤ βk if k ∈ / {ij1 , . . . , ijr }. In particular λk = αk if k ∈ {ij1 , . . . , ijr }, and λk < αk if k ∈ {i1 , . . . , iq } \ {ij1 , . . . , ijr }. Since FM ′ is a subresolution of the minimal resolution FM of S/M [GHP], we conclude that FM contains a Taylor symbol [σ], such that hdeg[σ] = r, and mdeg[σ] = xλ1 1 . . . xλnn , where λk = αk if k ∈ {ij1 , . . . , ijr }, and λk < αk , if k ∈ {i1 , . . . , iq } \ {ij1 , . . . , ijr }. By defining [σij1 ,...,ijr ] = [σ], we can establish a correspondence between the set Ar of all subsequences ij1 , . . . , ijr of i1 , . . . , iq , and the set Br of basis elements of FM in homological degree r. Let f : Ar → Br {ij1 , . . . , ijr } → [σij1 ,...,ijr ] be the function that determines this correspondence. If {ij1 , . . . , ijr } and {it1 , . . . , itr } are different sequences of Ar , then there must be an index that belongs to one sequence but αis not to the other; say λsk ∈ {is1 , . . . , isr } \ {it1 , . . . , itr }. Hence, xis k | mdeg[σis1 ,...,isr ], and αis k xis k ∤ mdeg[σit1 ,...,itr ]. This implies that mdeg[σis1 ,...,isr ] 6= mdeg[σit1 ,...,itr ]. In particular, k [σis1 ,...,isr ] 6= [σit1 ,...,itr ], and thus, f is one-to-one. Finally,   q br (S/M ) = #Br ≥ #Ar = r and given that r is arbitrary, the theorem holds.  In the 1970s, Buchsbaum, Eisenbud and Horrocks posed  a conjecture that in the context of monomial ideals reads: If M is artinian, bi (S/M ) > ni , for all i. Although the conjecture 8 GUILLERMO ALESANDRONI was proven for artinian monomial ideals [Ch, CE], the inequalities above hold for a larger class of monomial ideals. In Theorem 4.8, we will show that pd(S/M ) = n if and only if  bi (S/M ) ≤ ni , for all i. Our next theorem is the key to such characterization. Theorem 3.6. Let M be minimally generated by G. Suppose that G contains a dominant set L,of cardinality n, such that no monomial of G strongly divides lcm(L). Then br (S/M ) ≥ n r , for all r. αn 1 Proof. Let L = {d1 , . . . , dn }, where each dj is dominant in xj . Let lcm(L) = xα 1 . . . xn . Then, each xi appears with exponent αi in the factorization of di . Since no minimal generαn 1 ator strongly divides lcm(L), every m ∈ G must be divisible by at least one of xα 1 , . . . , xn . Thus, odom(S/M ) = n, and the result follows from Theorem 3.5.  4. Nets Definition 4.1. Let M be minimally generated by G. Let X = {xi1 , . . . , xiq } be a set of variables of S. We will say that X is a net of M if every monomial of G is divisible by at least one element of X. We will say that X is a minimal net of M , if X itself is a net of M , but no proper subset of X is a net of M . Example 4.2. Let M = (a2 e, b3 f, ce2 , d2 f 3 ). Let X1 = {a, b, c, d}; X2 = {e, f }; X3 = {a, c, f }; X4 = {b, d, c}; X5 = {d, e, f }; X6 = {b, d, e, f }. Note that X1 , X2 , X3 , and X4 are minimal nets of M (and there are no other minimal nets of M ), while X5 and X6 are nets (but not minimal nets) of M . Theorem 4.3. Let M be minimally generated by G. Let X = {xi1 , . . . , xiq } be a minimal net of M .Then, G contains a dominant set D = {d1 , . . . , dq } with the following properties: (i) For all j = 1, . . . , q, dj is dominant in xij . αn 1 (ii) If lcm(D) = xα 1 . . . xn , and m is an element of G dividing lcm(D), then m is divisible αiq αi1 by one of xi1 , . . . , xiq . Proof. By definition, every monomial of G is divisible by some variable of X. In addition, if 1 ≤ j ≤ q, since X is a minimal net, not every monomial of G is divisible by a variable of X \ {xij }. Therefore, there exists mj ∈ G such that mj is divisible by xij , but mj is not divisible by any monomial of X \ {xij }. Thus, there is a dominant set {m1 , . . . , mq } ⊆ G such that, for all j = 1, . . . , q, mj is divisible by xij , but is not divisible by any variable of X \ {xij }. Let G1 = {m ∈ G : xi1 | m but m is not divisible by any of xi2 , . . . , xiq }. (Notice that G1 6= ∅, for m1 ∈ G1 .) Let ǫ1 ≥ 1 be the smallest exponent with which xi1 appears in the factorization of an element of G1 , and let d1 ∈ G1 be such that xi1 appears with exponent ǫ1 in the factorization of d1 . Let G2 = {m ∈ G : xi2 | m but m is not divisible by any of xiǫ11 , xi3 , . . . , xiq } (G2 6= ∅, for m2 ∈ G2 .) Let ǫ2 ≥ 1 be the smallest exponent with which xi2 appears in the factorization of an element of G2 , and let d2 ∈ G2 be such that the exponent with which xi2 appears in the factorization of d2 is ǫ2 . Suppose that Gk−1 and dk−1 have been defined. Let Gk = {m ∈ G : xik | m, but m is not ǫk−1 ǫk+1 divisible by any of xǫi11 , . . . , xik−1 , xk+1 , . . . , xiq }. (Notice that Gk 6= ∅, for mk ∈ Gk .) Let ǫk be the smallest exponent with which xik appears in the factorization of an element of Gk . Let dk ∈ Gk be such that xik appears with exponent ǫk in the factorization of dk . By recurrence, we have constructed a set D = {d1 , . . . , dq }, with the following properties: THE ORDER OF DOMINANCE OF A MONOMIAL IDEAL 9 (i) D is dominant; each dj is dominant in xij ; and xij appears with exponent ǫj in the factorization of dj . In fact, by construction, xij appears with exponent ǫj in the factorization of dj ; d1 , . . . , dj−1 are not divisible by xij ; and dj+1 , . . . , dq are not ǫ divisible by xijj . ǫ (ii) Every m ∈ G dividing lcm(D), is divisible by one of xǫi11 , . . . , xiqq . In fact, if m ∈ G, and m | lcm(D), there is a variable of X that divide m. Let j be the largest number ǫj−1 divides m, in {1, . . . , q} such that xij divides m. Then, either one of the xǫi11 , . . . , xij−1 ǫ or m ∈ Gj , in which case xijj | m.  Corollary 4.4. If X is a minimal net of M , then odom(S/M ) ≥ #X. Proof. Let X = {xi1 , . . . , xiq }. By Theorem 4.3, the minimal generating set G of M contains a dominant set D = {d1 , . . . , dq } with the following properties: (i) For all j = 1, . . . , q, dj is dominant in xij . αn 1 (ii) If lcm(D) = xα 1 . . . xn , and m is an element of G dividing lcm(D), then m is divisible αiq αi1 by one of xi1 , . . . , xiq . By definition of order of dominance, odom(S/M ) ≥ q = #X.  Theorem 4.5. If X is a minimal net of Mpol , then odom(S/M ) ≥ #X. Proof. Let Spol = k[x1,1 , . . . , x1,β1 , . . . , xn,1 , . . . , xn,βn ]. Suppose that X contains two variables of the form xi,r , xi,s , where r > s. Then every monomial of Gpol that is divisible by xi,r is also divisible by xi,s and thus, X \ {xi,r } is also a net of Mpol , which contradicts the minimality of X. Hence, X must be of the form X = {xi1 ,r1 , . . . , xiq ,rq }, where 1 ≤ i1 < . . . < iq ≤ n, and r1 , . . . , rq ≥ 1. By Theorem 4.3, there is a dominant subset Lpol = {l1′ , . . . , lq′ } of Gpol such that, if lcm(Lpol ) = x1,1 . . . x1,α1 . . . xn,1 . . . xn,αn , the following properties hold: (i) Each lj′ is dominant in xij ,rj , and xij ,rj appears with exponent 1 in the factorization of lj′ . (ii) If m′ ∈ Gpol and m′ | lcm(Lpol ), then m′ is divisible by at least one of xi1 ,r1 , . . . , xiq ,rq . Let L = {l1 , . . . , lq } be the subset of G obtained from Lpol by depolarizing. The fact that Lpol is dominant, with lj′ dominant in xij ,rj , means that for all k 6= j, xij ,rj ∤ lk′ . It follows r α that xijj ∤ lk , for all k 6= j. Then xijj ∤ lk , for all k 6= j. Therefore, L = {l1 , . . . , lq } is a dominant set, such that (i) Each lj is dominant in xij , and xij appears with exponent αj (≥ rj ) in the factorization of lj . r (ii) If m ∈ G and m | lcm(L), then m is divisible by at least one of xri11 , . . . , xiqq . r Let G1 = {m ∈ G : m | lcm(L); xri11 | m; and m is not divisible by any of xri22 , . . . , xiqq }. (G1 6= ∅, for l1 ∈ G1 .) Let t1 be the largest integer such that every m ∈ G1 is divisible by xti11 . Let d1 ∈ G1 be such that xi1 appears with exponent t1 in the factorization of d1 . r Let G2 = {m ∈ G : m | lcm(L); xri22 | m; and m is not divisible by any of xti11 , xri33 , . . . , xiqq }. (G2 6= ∅, for l2 ∈ G2 .) Let t2 be the largest integer such that every m ∈ G2 is divisible by xti12 . Let d2 ∈ G2 be such that xi2 appears with exponent t2 in the factorization of d2 . Suppose that Gk−1 , tk−1 , and dk−1 have been defined. tk−1 rk+1 r Let Gk = {m ∈ G : m | lcm(L); xrikk | m; and m is not divisible by any of xti11 , . . . , xik−1 , xik+1 , . . . , xiqq }. (Gk 6= ∅, for lk ∈ Gk .) Let tk be the largest integer such that every m ∈ Gk is divisible by 10 GUILLERMO ALESANDRONI xitkk . Let dk ∈ Gk be such that xik appears with exponent tk in the factorization of dk . Thus, by recurrence, we can define a dominant subset D = {d1 , . . . , dq } of G, such that (i) each dj is dominant in xij , and xij appears with exponent tj in the factorization of dj . We claim that D also has the following property: t (ii) if m ∈ G and m | lcm(D), then m is divisible by at least one of xti11 , . . . , xiqq . In fact, if m ∈ G and m | lcm(D), then m | lcm(L) (by construction, each dj ∈ D divides r lcm(L)). Then m must be divisible by one of xri11 , . . . , xiqq . Let k be the largest number t k−1 among 1, . . . , q, such that xrikk | m. If m is not divisible by one of xti11 , . . . , xik−1 , then tk m ∈ Gk . Thus, xik | m, and (ii) holds. By Theorem 3.5, odom(S/M ) ≥ q = #X.  Theorem 4.6. If odom(S/M ) = q, then there is a minimal net X of Mpol such that #X = q. Proof. By definition of order of dominance, for some sequence 1 ≤ i1 < . . . < iq ≤ n, there is a dominant subset D = {d1 , . . . , dq } of G, with the following properties: (i) each dj is dominant in xij ; αn 1 (ii) if lcm(D) = xα 1 . . . xn , and m is an element of G dividing lcm(D), then m is divisible αi αi1 by one of xi1 , . . . , xiq q . α αi We claim that the set G′ = {m ∈ G : m is not divisible by any of xi1i1 , . . . , xiq q } is empty. Suppose, by means of contradiction, that G′ 6= ∅. Let G′′ = {lcm(D ∪ {m}) : m ∈ G′ }. Let lcm(D ∪ {d}) be a minimal element of G′′ , in the sense that if lcm(D ∪ {m}) | lcm(D ∪ {d}), then lcm(D ∪ {m}) = lcm(D ∪ {d}). αi αi Note that D ∪ {d} is a dominant set. In fact, since d is not divisible by any of xi1 1 , . . . , xiq q , by property (ii) we must have that d ∤ lcm(D). Hence, there exist i ∈ {1, . . . , n} \ {i1, . . . , iq } such that xi appears with exponent δ > αi in the factorization of d. Thus, D ∪ {d} is a dominant set such that (i) each dj is dominant in xij , and xij appears with exponent αij in the factorization of dj . Also, d is dominant in xi , and xi appears with exponent δ in the factorization of d. In addition to this, D ∪ {d} has the following property: αi αi (ii) if m ∈ G and m | lcm(D∪{d}), then m is divisible by at least one of xi1 1 , . . . , xiq q , xδi . αi αi In fact, if such an m is not divisible by any of xi1 1 , . . . , xiq q , then m ∈ G′ , and lcm(D ∪ {m}) ∈ G′′ . Since lcm(D ∪ {m}) | lcm(D ∪ {d}), the minimality of lcm(D ∪ {d}) implies that lcm(D ∪ {m}) = lcm(D ∪ {d}). Hence, m must be divisible by xδi . Thus, odom(S/M ) ≥ #(D ∪ {d}) = q + 1, an absurd. αiq 1 Therefore, G′ = ∅, which means that every m ∈ G is divisible by at least one of xαi i1 , . . . , xiq . After polarizing D, we obtain a dominant set Dpol = {d′1 , . . . , d′q }, such that each d′j is dominant in xij ,αij . Also, every m′ ∈ Gpol is divisible by at least one of xi1 ,αi1 , . . . , xiq ,αiq .  Thus, X = {xi1 ,αi1 , . . . , xiq ,αiq } is a minimal net of Mpol . Corollary 4.7. Let Ξ be the class of all minimal nets of Mpol . Then odom(S/M ) = max{#X : X ∈ Ξ}. Proof. By Theorem 4.5, odom(S/M ) ≥ max{#X : X ∈ Ξ}. By Theorem 4.6, odom(S/M ) ≤ max{#X : X ∈ Ξ}.  THE ORDER OF DOMINANCE OF A MONOMIAL IDEAL 11 Corollary 4.7 gives an alternative definition of the concept of order of dominance; that is, odom(S/M ) is the largest cardinality of a minimal net of Mpol . The next two theorems summarize our main results. In particular, the equivalence between parts (i) and (ii) in Theorem 4.8 is reminiscent of the Buchsbaum, Eisenbud, Horrocks conjecture. Theorem 4.8. Let M be a monomial ideal of S = k[x1 , . . . , xn ], minimally generated by G. The following are equivalent: (i) pd(S/M ) = n. (ii) bi (S/M ) ≥ ni , for all i. (iii) G contains a dominant set D of cardinality n, such that no monomial of G strongly divides lcm(D). (iv) odom(S/M ) = n. (v) There is a minimal net of Mpol , of cardinality n. Proof. (i)⇔ (iii) [Al2, Corollary 5.3]. αn 1 (iii)⇒ (iv) Let lcm(D) = xα 1 . . . xn . Since D is dominant, and #D = n, D can be expressed in the form D = {d1 , . . . , dn }, where each dj is dominant in xj . Then, the exponent with which xj appears in the factorization of dj must be αj . In addition, since no monomial of G αn 1 strongly divides xα 1 . . . xn , it follows that every m ∈ G dividing lcm(D) must be divisible α1 αn by one of x1 , . . . , xn . Hence, odom(S/M ) ≥ #D = n. By Theorem 3.5 and Hilbert’s Syzygy Theorem, odom(S/M ) ≤ pd(S/M ) ≤ n. (iv)⇒(i) It follows from Theorem 3.5 and Hilbert’s Syzygy Theorem. (iv)⇒(ii) It follows from Theorem 3.5. (ii)⇒(i) Obvious. (iv)⇒(v) It follows from Theorem 4.6. (v)⇒(iv) By Corollary 4.7, odom(S/M ) ≥ n. By Theorem 3.5 and Hilbert’s Syzygy theorem, odom(S/M ) ≤ pd(S/M ) ≤ n.  Theorem 4.9. Let M be a monomial ideal in S. Then: (i) pd(S/M ) ≥ odom(S/M ) ≥ codim(S/M ). (ii) Let codim(S/M ) = p. If odom(S/M ) > codim(S/M ), then         p p p p−1 bi (S/M ) ≥ + > + , for all i. i i−1 i i−1 Proof. (i) By Theorem 3.5, pd(S/M ) ≥ odom(S/M ). By Corollary 4.4, odom(S/M ) ≥ #X for every minimal net X of M . Since codim(S/M ) is the smallest cardinality of a minimal net of M , it follows that odom(S/M ) ≥ codim(S/M ). (ii) Let odom(S/M ) = q. Then q ≥ p + 1. After applying Theorem 3.5 and some elementary combinatorics, we obtain             q p+1 p p p p−1 bi (S/M ) ≥ ≥ = + > + , for all i. i i i i−1 i i−1  Over the course of the last three decades, several mathematicians have obtained lower bounds for the Betti numbers of monomial ideals. Charalambous, Evans, Miller, Boocher, and Seiner have all made contributions to this problem [BS, Ch, CE, CEM]. One of the sharpest bounds can be expressed as follows: 12 GUILLERMO ALESANDRONI   If M is not a complete intersection, and codim(S/M ) = p, then bi (S/M ) ≥ pi + p−1 i−1 , for all i. Thus, Theorem 4.9 (ii) slightly improves the lower bound mentioned above whenever odom(S/M ) > codim(S/M ). (For instance, odom(S/M ) > codim(S/M ) when M has two minimal nets of different cardinality.) Acknowledgements: I am grateful to my dear wife Danisa for her support and encouragement, and for typing this article. References [Al1] G. Alesandroni, Minimal resolutions of dominant and semidominant ideals, J. Pure Appl. Algebra 221 (2017), 780-798. [Al2] G. Alesandroni, Monomial ideals with large projective dimension (arXiv: 1710.05124). [BS] Lower bounds for Betti numbers of monomial ideals (arXiv: 1706. 09866). [Ch] H. Charalambous, Betti numbers of multigraded modules, J. Algebra 137 (1991), no. 2, 491-500. [CE] H. Charalambous, E. G. Evans, A deformation theory approach to Betti numbers of finite length modules, J. Algebra 143 (1991), no.1, 246-251. [CEM] H. Charalambous, E. G. Evans, M. Miller, Betti numbers for modules of finite length, Proc. Amer. Math. Soc. 109 (1990), no.1, 63-70. [Ei] D. Eisenbud, Commutative Algebra with a View Toward Algebraic Geometry, Springer-Verlag, New York-Berlin-Heidelberg, (1995). [GHP] V. Gasharov, T. Hibi, I. Peeva, Resolutions of a-stable ideals, J. Algebra 254 (2002), no. 2, 375-394. [Me] J. Mermin, Three simplicial resolutions, Progress in Commutative Algebra 1, Edited by Francisco, Christopher / Klingler, Lee C. / Sather-Wagstaff, Sean / Vassilev, Janet C. De Gruyter (2012). Department of Mathematics, Wake Forest University, 1834 Wake Forest Rd, Winston-Salem, NC 27109 E-mail address: [email protected]
0math.AC
Learning with Opponent-Learning Awareness Jakob N. Foerster2,† Richard Y. Chen1,† Maruan Al-Shedivat4 [email protected] [email protected] [email protected] Shimon Whiteson2 Pieter Abbeel3 Igor Mordatch1 [email protected] [email protected] [email protected] arXiv:1709.04326v2 [cs.AI] 12 Dec 2017 1 OpenAI 2 University of Oxford Abstract Multi-agent settings are quickly gathering importance in machine learning. Beyond a plethora of recent work on deep multi-agent reinforcement learning, hierarchical reinforcement learning, generative adversarial networks and decentralized optimization can all be seen as instances of this setting. However, the presence of multiple learning agents in these settings renders the training problem non-stationary and often leads to unstable training or undesired final results. We present Learning with Opponent-Learning Awareness (LOLA), a method that reasons about the anticipated learning of the other agents. The LOLA learning rule includes an additional term that accounts for the impact of the agent’s policy on the anticipated parameter update of the other agents. We show that the LOLA update rule can be efficiently calculated using an extension of the likelihood ratio policy gradient update, making the method suitable for model-free reinforcement learning. This method thus scales to large parameter and input spaces and nonlinear function approximators. Preliminary results show that the encounter of two LOLA agents leads to the emergence of tit-for-tat and therefore cooperation in the infinitely iterated prisoners’ dilemma, while independent learning does not. In this domain, LOLA also receives higher payouts compared to a naive learner, and is robust against exploitation by higher order gradient-based methods. Applied to infinitely repeated matching pennies, LOLA agents converge to the Nash equilibrium. In a round robin tournament we show that LOLA agents can successfully shape the learning of a range of multi-agent learning algorithms from literature, resulting in the highest average returns on the IPD. We also apply LOLA to a grid world task with an embedded social dilemma using deep recurrent policies. Again, by considering the learning of the other agent, LOLA agents learn to cooperate out of selfish interests. 1 Introduction Due to the advent of deep RL methods that allow the study of many agents in rich environments, multi-agent reinforcement learning has flourished in recent years. However, most of this work considers fully cooperative settings (Omidshafiei et al., 2017; Foerster et al., 2018, 2017) and emergent communication in particular (Das et al., 2017; Mordatch and Abbeel, 2017; Lazaridou, Peysakhovich, and Baroni, 2016; Foerster et al., 2016; Sukhbaatar, Fergus, and others, 2016). † Equal Contribution 3 UC Berkeley 4 CMU Considering future applications of multi-agent RL, such as self-driving cars, it is obvious that many of these will be only partially cooperative and contain elements of competition and selfish incentives. The human ability to maintain cooperation in a variety of complex social settings has been vital for the success of human societies. Emergent reciprocity has been observed even in strongly adversarial settings such as wars (Axelrod, 2006), making it a quintessential and robust feature of human life. In the future, artificial learning agents are likely to take an active part in human society, interacting both with other learning agents and humans in complex partially competitive settings. Failing to develop learning algorithms that lead to emergent reciprocity in these artificial agents would lead to disastrous outcomes. How reciprocity can emerge among a group of learning, self-interested, reward maximizing RL agents is thus a question both of theoretical interest and of practical importance. Game theory has a long history of studying the learning outcomes in games that contain cooperative and competitive elements. In particular, the tension between cooperation and defection is commonly studied in the iterated prisoners’ dilemma. In this game, selfish interests can lead to an outcome that is overall worse for all participants, while cooperation maximizes social welfare, one measure of which is the sum of rewards for all agents. Interestingly, in the simple setting of an infinitely repeated prisoners’ dilemma with discounting, randomly initialized RL agents pursuing independent gradient descent on the exact value function learn to defect with high probability. This shows that current state-of-the-art learning methods in deep multi-agent RL can lead to agents that fail to cooperate reliably even in simple social settings with explicit actions to cooperate and defect. One well-known shortcoming is that they fail to consider the learning process of the other agents and simply treat the other agent as a static part of the environment. As a step towards reasoning over the learning behaviour of other agents in social settings, we propose Learning with Opponent-Learning Awareness (LOLA). The LOLA learning rule includes an additional term that accounts for the impact of one agent’s parameter update on the learning step of the other agents. For convenience we use the word ‘oppo- nent’ to describe the other agent, even though the method is not limited to zero-sum games and can be applied in the general-sum setting. We show that this additional term, when applied by both agents, leads to emergent reciprocity and cooperation in the iterated prisoners’ dilemma (IPD). Experimentally we also show that in IPD, each agent is incentivized to switch from naive learning to LOLA, while there are no additional gains in attempting to exploit LOLA with higher order gradient terms. This suggests that within the space of local, gradient-based learning rules both agents using LOLA is a stable equilibrium. This is further supported by the good performance of the LOLA agent in a round-robin tournament, where it successfully manages to shape the learning of a number of multi-agent learning algorithms from literature. This leads to the overall highest average return on the IPD, and good performance on IMP. We also present a version of LOLA adopted to the deep RL setting using likelihood ratio policy gradients, making LOLA scalable to settings with high dimensional input and parameter spaces. We evaluate the policy gradient version of LOLA on the iterated prisoners dilemma (IPD) and iterated matching pennies (IMP), a simplified version of rock-paper-scissors. We show that LOLA leads to cooperation with high social welfare, while independent policy gradients, a standard multiagent reinforcement learning approach, does not. The policy gradient finding is consistent with prior work, e.g., Sandholm and Crites (1996). We also extend LOLA to settings where the opponent policy is unknown and needs to be inferred from state-action trajectories of the opponent’s behaviour. Finally, we apply LOLA with and without opponent modelling to a grid-world task with an embedded underlying social dilemma. This task has temporally extended actions and therefore requires high dimensional recurrent policies for agents to learn to reciprocate. Again, cooperation emerges in this task when using LOLA, even when the opponent’s policy is unknown and needs to be estimated. 2 Brafman and Tennenholtz (2003) introduce the solution concept of an ‘efficient learning equilibrium’ (ELE), in which neither side is encouraged to deviate from the learning rule. The algorithm they propose applies to settings where all Nash equilibria can be computed and enumerated. At the intersection of RL and evolutionary methods, Tuyls et al. (2003) uses replicator dynamics for understanding the convergence points of multi-agent systems. While it is beyond the scope of this work to list all relevant methods in multi-agent RL, we refer the reader to an excellent review on the subject (Busoniu, Babuska, and De Schutter, 2008). However, we note that multi-agent RL historically focuses on settings without function approximation and often considers methods and feature representations that are highly tuned towards specific problem settings, such as the iterated prisoners dilemma. Recent evaluations by Zawadzki, Lipson, and Leyton-Brown (2014) suggest that independent learning is still one of the most robust and versatile methods. Related Work The study of general-sum games has a long history in game theory and evolution. Thousands of papers have been written on the iterated prisoners’ dilemma (IPD) alone, including the seminal work on the topic by Axelrod (2006). This work popularized tit-for-tat (TFT), a strategy in which an agent cooperates on the first move and then copies the opponent’s most recent move, as a robust and simple strategy in the IPD. Learning and stability in sequential, general sum games has also been studied in the multi-agent RL community. Seminal work includes the family of WoLF algorithms (Bowling and Veloso, 2002), which achieve convergence by using different learning rates depending on whether an agent is winning or losing, Joint-action-learners, (Claus and Boutilier, 1998; Banerjee and Sen, 2007) and friend-or-foe learning (Littman, 2001). Wunder, Littman, and Babes (2010), Zinkevich, Greenwald, and Littman (2006) and Sandholm and Crites (1996) explicitly study the convergence dynamics and equilibria of learning in iterated games. Figure 1: In the coin game, two agents ‘red’ and ‘blue’, get 1 point for picking up each coin. However, the ‘red agent’ loses 2 points when the ‘blue agent’ picks up a red coin and vice versa. Effectively this is a world with an embedded social dilemma where the action to cooperate and defect are temporally extended. In contrast, potentially due to the issues mentioned above, most work in deep multi-agent RL focuses on fully cooperative settings (Omidshafiei et al., 2017; Foerster et al., 2018, 2017) and emergent communication in particular (Das et al., 2017; Mordatch and Abbeel, 2017; Lazaridou, Peysakhovich, and Baroni, 2016; Foerster et al., 2016; Sukhbaatar, Fergus, and others, 2016). As an exception, Leibo et al. (2017) consider the outcomes of independent learning in general sum settings. Lowe et al. (2017) propose a centralized actor-critic architecture for efficient training in these mixed environments. However, none of these methods explicitly reasons about the learning behaviour of other agents. Lanctot et al. (2017) generalize the ideas of game-theoretic best response style algorithms, such as NFSP (Heinrich and Silver, 2016), to produce more general policies. In contrast to LOLA, these best-responsealgorithms assume a given set of opponent policies, rather than attempting to shape the learning of the other agents. The problem setting of Lerer and Peysakhovich (2017) is closest to our setting. They directly generalize tit-fortat to complex environments using deep RL. The authors explicitly train a fully cooperative and a defecting policy for both agents and then construct a tit-for-tat policy that switches between these two in order to encourage the opponent to cooperate. Similar in spirit to this work, Munoz de Cote and Littman (2008) propose a Nash equilibrium algorithm for repeated stochastic games that explicitly attempts to find the egalitarian point by switching between competitive and zero-sum strategies. A similar point underlies MQubed, Crandall and Goodrich (2011), which balances bestresponse, cautious, and optimistic learning biases. Reciprocity and cooperation are not emergent properties of the learning rules in these algorithms but rather directly coded into the algorithm. By contrast, LOLA makes no assumptions about cooperation and simply assumes that each agent is maximizing its own return. Our work also relates to opponent modeling, such as fictitious play (Brown, 1951) and action-sequence prediction (Mealing and Shapiro, 2015). Mealing and Shapiro (2013) also propose a method that finds a policy based on predicting the opponent’s future action. Furthermore, Hernandez-Leal and Kaisers (2017) directly model the distribution over opponents. While these methods model the opponent strategy, they do not address the learning dynamics of the opponent. By contrast, Zhang and Lesser (2010) carry out policy prediction under one-step learning dynamics. However, the opponents’ policy updates are assumed to be fixed and only used to learn a best response to the anticipated updated parameters. By contrast, LOLA directly models the policy updates of all opponents such that each agent actively drives its opponents’ policy updates to maximize its own reward. Differentiating through the opponent’s learning step, which is unique to LOLA, is crucial for the emergence of tit-for-tat and reciprocity. Hernandez-Leal et al. (2017) offer an upto-date survey of methods addressing the non-stationarity in multi-agent learning. With LOLA, each agent differentiates its estimated return through the opponents’ policy update. Similar ideas were proposed by Metz et al. (2016), whose training method for generative adversarial networks differentiates through multiple update steps of the opponent. Their method relies on an end-to-end differentiable loss function, and thus does not work in the general RL setting. However, the overall results are similar: anticipating the opponent’s update stabilises the training outcome. Outside of purely computational studies the emergence of cooperation and defection in RL settings has also been studied and compared to human data Kleiman-Weiner et al. (2016). 3 Background Our work assumes a multi-agent task that is commonly described as a stochastic game G, specified by a tuple G = hS, U, P, r, Z, O, n, γi. Here n agents, a ∈ A ≡ {1, ..., n}, choose actions, ua ∈ U , and s ∈ S is the state of the environment. The joint action u ∈ U ≡ U n leads to a state transition based on the transition function P (s0 |s, u) : S × U×S → [0, 1]. The reward functions ra (s, u) : S ×U → R specify the reward for each agent, lastly γ ∈ [0, 1) is the discount factor. We further define the discounted future return from time P∞ l a t onward as Rta = l=0 γ rt+l for each agent, a. As a naive learner, each agent maximizes its total discounted return in expectation separately. This can be done with policy gradient methods (Sutton et al., 1999) such as REINFORCE (Williams, 1992). Policy gradient methods update an agent’s policy, parameterized by θ a , by performing gradient ascent on an estimate of the expected discounted total reward E [R0a ]. By convention, bold lowercase letters denote column vectors. 4 Methods In this section, we review the naive learner’s strategy and introduce the LOLA learning rule. We first derive the update rules when agents have access to exact gradients and Hessians of their expected discounted future return in Sections 4.1 and 4.2. In Section 4.3, we derive the learning rules based purely based on policy gradients, thus removing access to exact gradients and Hessians. This renders LOLA suitable for deep RL. However, we still assume agents have access to opponent’s policy parameters in policy gradientbased LOLA. Next, in Section 4.4, we incorporate opponent modeling into the LOLA learning rule, such that each LOLA agent only infers the opponent’s policy parameter from experiences. Finally, we discuss higher order LOLA learning in Section 4.5. For simplicity, we assume the number of agents is n = 2 and display the update rules for agent 1 only. The same derivation holds for arbitrary numbers of agents. 4.1 Naive Learner Suppose each agent’s policy π a is parameterized by θ a and V a (θ 1 , θ 2 ) is the expected total discounted return for agent a as a function of both agents’ policy parameters (θ 1 , θ 2 ). A naive learner iteratively optimizes for its own expected total discounted return separately, such that at the ith iteration, θia a is updated to θi+1 according to 1 θi+1 = argmaxθ1 V 1 (θ 1 , θi2 ) 2 θi+1 = argmaxθ2 V 2 (θi1 , θ 2 ). In the reinforcement learning setting, agents do not have access to {V 1 , V 2 } over all parameter values. Instead, we assume that agents only have access to the function values and gradients at (θi1 , θi2 ). Using this information the naive learn- ers apply the gradient ascent update rule fnl1 : 1 θi+1 = θi1 + fnl1 (θi1 , θi2 ), fnl1 = ∇θi1 V 1 (θi1 , θi2 ) · δ, (4.1) where δ is the step size. 4.2 Learning with Opponent Learning Awareness A LOLA learner optimizes its return under one step lookahead of opponent learning. Instead of optimizing the expected return under the current parameters, V 1 (θi1 , θi2 ), a LOLA agent optimizes V 1 (θi1 , θi2 + ∆θi2 ), which is the expected return after the opponent updates its policy with one learning step, ∆θi2 . Going forward we have drop the subscript i for clarity. Assuming small ∆θ 2 , a first-order Taylor expansion results in: V 1 (θ 1 , θ 2 +∆θ 2 ) ≈ V 1 (θ 1 , θ 2 )+(∆θ 2 )T ∇θ2 V 1 (θ 1 , θ 2 ). (4.2) The LOLA objective (4.2) differs from prior work, e.g., Zhang and Lesser (2010), that predicts the opponent’s policy parameter update and learns a best response. LOLA learners attempt to actively influence the opponent’s future policy update, and explicitly differentiate through the ∆θ 2 with respect to θ 1 . Since LOLA focuses on this shaping of the learning direction of the opponent, the dependency of ∇θ2 V 1 (θ 1 , θ 2 ) on θ 1 is dropped during the backward pass. Investigation of how differentiating through this term would affect the learning outcomes is left for future work. By substituting the opponent agent’s naive learning step: ∆θ 2 = ∇θ2 V 2 (θ 1 , θ 2 ) · η The gradient of E R01 (τ ) follows from the policy gradient derivation:   ∇θ1 E R01 (τ ) = E R01 (τ )∇θ1 log π 1 (τ ) X  XT T =E ∇θ1 log π 1 (u1t |st ) · γ l rl1 t=0 l=t  X  T =E ∇θ1 log π 1 (u1t |st )γ t Rt1 (τ ) − b(st ) , t=0 where b(st ) is a baseline for variance reduction. Then the policy gradient-based update rule fnl, pg for the naive learner is 1 1 (4.5) fnl, pg = ∇θ 1 E R0 (τ ) · δ. For the LOLA update, we derive the following estimator of the second-order term in (4.4) based on policy gradients. The derivation (omitted) closely resembles the standard proof of the policy gradient theorem, exploiting that agents sample actions independently. We further note that this second order term is exact in expectation: ∇θ1 ∇θ2 E R02 (τ ) h T i = E R02 (τ )∇θ1 log π 1 (τ ) ∇θ2 log π 2 (τ ) X Xt  T =E γ t rt2 · ∇θ1 log π 1 (u1l |sl ) t=0 l=0 T  Xt 2 2 ∇θ2 log π (ul |sl ) . (4.6) l=0 The complete LOLA update for agent 1 using policy gradients is (4.3) 1 1 flola, pg = ∇θ 1 E R0 (τ ) · δ+ T ∇θ2 E R01 (τ ) ∇θ1 ∇θ2 E R02 (τ ) · δη. into (4.2) and taking the derivative of (4.2) with respect to θ 1 , we obtain our LOLA learning rule: 4.4 1 1 θi+1 = θi1 + flola (θi1 , θi2 ), which includes a second order correction term 1 flola (θ 1 , θ 2 ) = ∇θ1 V 1 (θ 1 , θ 2 ) T + ∇θ2 V 1 (θ 1 , θ 2 ) ∇θ1 ∇θ2 V 2 (θ 1 , θ 2 ) · δη, (4.4) where the step sizes δ, η are for the first and second order updates. LOLA agents can evaluate (4.4) explicitly if they have access to the gradients and Hessians of {V 1 , V 2 } at each agent’s current policy parameter (θi1 , θi2 ). 4.3 Learning via Policy Gradient When agents do not have access to exact gradients or Hessians, we derive the update rules fnl, pg and flola, pg based on approximations of the derivatives in (4.1) and (4.4). Denote an episode of horizon T as τ = (s0 , u10 , u20 , r01 , r02 , ..., sT +1 , u1T , u2T , rT1 , rT2 ) and its corresponding discounted return for agent a at timestep t as PT Rta (τ ) = l=t γ l−t rla . Given this definition, the expected episodic return conditioned on the agents’ policies (π 1 , π 2 ), E R01 (τ ) and E R02 (τ ), approximate V 1 and V 2 respectively, as do the gradients and Hessians. (4.7) LOLA with Opponent Modeling Both versions (4.4) and (4.7) of LOLA learning assume that each agent has access to the exact parameters of the opponent. However, in adversarial settings the opponent’s parameters are typically obscured and have to be inferred from the the opponent’s state-action trajectories. Our proposed opponent modeling is similar to behavioral cloning Ross, Gordon, and Bagnell (2011); Bojarski et al. (2016). Instead of accessing agent 2’s true policy parameters θ 2 , agent 1 models the opponent’s behavior with θ̂ 2 , where θ̂ 2 is estimated from agent 2’s trajectories using maximum likelihood: X θ̂ 2 = argmax log πθ2 (u2t |st ) (4.8) θ2 t Then, θ̂ 2 replaces θ 2 in the LOLA update rule, both for the exact version (4.4) using the value function and the gradient based approximation (4.7). We compare the performance of LOLA agents with opponent modeling against policygradient based LOLA (4.7) in our experiments. 4.5 Higher Order LOLA By substituting the naive learning rule (4.3) into the LOLA objective (4.2), the LOLA learning rule so far assumes that the opponent is a naive learner. We call this setting firstorder LOLA, which corresponds to the first-order learning rule of the opponent agent. However, we can also consider a higher order LOLA agent that assumes the opponent applies a first-order LOLA learning rule, thus replacing (4.3). This leads to third-order derivatives in the learning rule. While the third-order terms are typically difficult to compute using policy gradient due to high variance, when the exact value function is available it is tractable. We examine the benefits of higher-order LOLA in our experiments. 5 Experimental Setup In this section, we summarize the settings where we compare the learning behavior of NL and LOLA agents. The first setting (Sec. 5.1) consists of two classical infinitely iterated games, the iterated prisoners dilemma (IPD) and iterated matching pennies (IMP). Each round in these two environments requires a single action from each agent. We can obtain the discounted future return of each player given both players’ policies, which leads to exact policy updates for NL and LOLA agents. The second setting (Sec. 5.2) is called ‘Coin Game‘, a more difficult two-player environment, where each round requires the agents to take a sequence of actions and exact discounted future reward can not be calculated. The policy of each player is parameterized with a deep recurrent neural network. In the policy gradient experiments with LOLA, we assume offline-learning, i.e., agents play many (batch-size) parallel episodes using their latest policies. Policies remain unchanged within each episode, with learning happening between episodes. One setting where this kind of offline learning naturally arises is when training policies using realworld data. E.g., in the case of autonomous cars all data from a fleet of cars can be collected over night and used for training in order to release new policies the next day. 5.1 Iterated Games We first review the two iterated games, IPD and IMP, and explain how we can model iterated games as memory-1 twoagent MDP. C D C (-1, -1) (0, -3) D (-3, 0) (-2, -2) Matching pennies Gibbons (1992) is a zero-sum game, with per-step payouts shown in Table 2. This game only has a single mixed strategy Nash equilibrium which is both players playing 50%/50% heads / tails. Head Tail Tail (-1, +1) (+1, -1) Table 2: Payoff matrix of matching pennies. Agents in both IPD and IMP can condition their actions on past history. Agents in an iterated game are endowed with a memory of length K if the agents act based on the results of the last K rounds. Press and Dyson Press and Dyson (2012) proved that agents with a good memory-1 strategy can effectively force the iterated game to be played as memory-1. Thus, we consider memory-1 iterated games in our work. We can model the memory-1 IPD and IMP as a two-agent MDP, where the state at time 0 is empty, denoted as s0 , and at time t ≥ 1 is both agents’ actions from t − 1: st = (u1t−1 , u2t=1 ) for t > 1. Each agent’s policy is fully parametrized by 5 probabilities. For agent a in the case of the IPD, they are the probability of cooperation at game start π a (C|s0 ), and the cooperation probabilities in the four memories: π a (C|CC), π a (C|CD), π a (C|DC), and π a (C|DD). By analytically solving the multi-agent MDP we can derive each agent’s future discounted reward as an analytical function of the agents’ policies and calculate the exact policy update for both NL and LOLA agents. We also organize a round-robin tournament where we compare LOLA-Ex to a number of state of the art multiagent learning algorithms, both on the IPD and IMP. 5.2 Coin Game Next, we study LOLA in a more high-dimensional setting called the ‘Coin Game’, where each round requires agents to take sequential actions and we parametrize agents’ policies with deep neural networks. The ‘Coin Game’ was first Table 1: Payoff matrix of prisoners’ dilemma. Table 1 shows the per-step payoff matrix of the prisoners’ dilemma. In a single-shot prisoners’ dilemma, there is only one Nash equilibrium Fudenberg and Tirole (1991), where both agents defect. In the infinitely iterated prisoners’ dilemma, the folk theorem (Roger, 1991) shows that there are infinitely many Nash equilibria. Two notable ones are the always defect strategy (DD), and tit-for-tat (TFT). In TFT each agent starts out with cooperation and then repeats the previous action of the opponent. The average returns per step in self-play are −1 and −2 for TFT and DD respectively. Head (+1, -1) (-1, +1) NL-Ex. LOLA-Ex. NL-PG LOLA-PG %TFT 20.8 81.0 20.0 66.4 IPD R(std) -1.98(0.14) -1.06(0.19) -1.98(0.00) -1.17(0.34) IMP %Nash R(std) 0.0 0(0.37) 98.8 0(0.02) 13.2 0(0.19) 93.2 0(0.06) Table 3: We summarize results for NL vs. NL and LOLA vs. LOLA settings with either exact gradient evaluation or policy gradient approximation. Shown is the probability of agents playing TFT and Nash for the IPD and IMP respectively as well as the average reward per step, R, and (STD) at the end of training for 50 training runs. Figure 2: Shown is the probability of playing heads in the iterated matching pennies (IMP) at the end of 50 training runs for both agents as a function of state under naive learning NL-Ex, a), and LOLA-Ex b) when using the exact gradients of the value function. Also shown is the normalized discounted return for both agents in NL-Ex vs. NL-Ex and LOLA-Ex vs. LOLA-Ex with exact gradient, c), and the normalized discounted return for both agents in NL-PG vs. NL-PG and LOLA-PG vs. LOLAPG with policy gradient approximation, d). We can see in a) that NL-Ex results in near deterministic strategies, indicated by the accumulation of points in the corners. These strategies are easily exploitable by other deterministic strategies leading to unstable training and high variance in the reward per step in c). In contrast, LOLA agents learn to play the only Nash strategy, 50%/%50, leading to low variance in the reward per step. One interpretation is that LOLA agents anticipate that exploiting a deviation from Nash increases their immediate return, but also renders them more exploitable by the opponent’s next learning step. Best viewed in color. proposed in Lerer and Peysakhovich (2017) as a higher dimensional expansion of the iterated prisoner’s dilemma with multi-step actions. As shown in Figure 1, in this setting two agents, ‘red’ and ‘blue’, are tasked with collecting coins. The coins are either blue or red, and appear randomly on the grid-world. A new coin with random color and random position appears after the last one is picked up. Agents pick up coins by moving onto the position where the coin is located. While every agent receives a point for picking up a coin of any colour, whenever an picks up a coin of different color, the other agent loses 2 points. As a result, if both agents greedily pick up any coin available, they receive 0 points in expectation. In ‘Coin Game’, agents’ policies are parametrized with a recurrent neural network and one cannot obtain the future discounted reward as a function of both agents’ policies in closed form. Policy gradient-based learning is applied for both NL and LOLA agents in our experiments. We further experiment LOLA with opponent-modelling in this environment to examine the behavior of LOLA agents without access to the opponent’s policy parameters. 5.3 Training Details In policy gradient-based NL and LOLA settings, we train agents with actor-critic method (Sutton and Barto, 1998) and parametrize each agent with a policy actor, and a policy critic for variance reduction during policy updates. During training, we use gradient descent with step size 0.005 for the actor, 1 for the critic, and the batch size 4000 for rollouts. The discout rate γ is set to 0.96 for the prisoners’ dilemma and the coin game and 0.9 for matching pennies. The high value of γ for the ‘Coin Game’ and IPD was chosen in order to allow for long time horizons, which are known to be required for cooperation in the IPD. We found that a lower γ produced more stable learning on the IMP. For the coin game the agent’s policy architecture is a recurrent neural network with 32 hidden units and 2 convolutional layers with 3 × 3 filters, stride 1, and ‘relu’ activation for input processing. The input is presented as a 4 channel grid, with 2 channels encoding the positions of the 2 agents and 2 channels for the red and blue coins respectively. For the tournament, we use baseline algorithms and the corresponding hyperparameter values as provided in the literature (Bowling and Veloso, 2002). The tournament is played in a round-robin fashion between all pairs of agents for 1000 episodes, 200 steps each. 6 Results In this section, we summarize the experimental results. We aim to answer the following questions: 1. With the exact policy update, how do pairs of LOLA agents behave in iterated games compared with pairs of NL agents? 2. How do LOLA-Ex agents fair in a round robin tournament involving a set of multi-agent learning algorithms from literature? 3. Does replacing the exact policy update with policy gradient updates change the learned behaviors of LOLA and NL agents? 4. Does the learning of LOLA agents scale to highdimensional settings where the agents’ policies are parametrized by deep neural networks? 5. When replacing access to the exact parameters of the opponent agent with opponent modeling, does LOLA Figure 3: Shown is the probability of cooperation in the iterated prisoners dilemma (IPD) at the end of 50 training runs for both agents as a function of state under naive learning NL-Ex a), and LOLA-Ex b) when using the exact gradients of the value function. Also shown is the normalized discounted return for both agents in NL-Ex vs. NL-Ex and LOLA-Ex vs. LOLA-Ex, with the exact gradient, c), and the normalized discounted return for both agents in NL-PG vs. NL-PG and LOLA-PG vs. LOLA-PG, with policy gradient approximation, d). We can see that NL-Ex leads to DD, resulting in an average reward of ca. −2. In contrast, the LOLA-Ex agents play tit-for-tat in b): When in the last move agent 1 defected and agent 2 cooperated (DC, green points), most likely in the next move agent 1 will cooperate and agent 2 will defect, indicated by a concentration of the green points in the bottom right corner. Similarly, the yellow points (CD), are concentrated in the top left corner. While the results for the NL-PG and LOLA-PG with policy gradient approximation are more noisy, they are qualitatively similar. Best viewed in color. agents’ behavior preserve? 6. Exploiting LOLA: Can LOLA agents be exploited by using higher order gradients, i.e., does LOLA lead to an arms race of ever higher order corrections or is LOLA / LOLA stable? We answer the first two questions in Sec. 6.1, the next two questions in Sec. 6.2 and the last one in Sec. 6.3. 6.1 Iterated Games We first compare the behaviors of LOLA agents with NL agents, with either exact policy updates or policy gradient updates. Figures 3a) and 3b) show the policy for both agents at the end of training under naive learning (NL-Ex) and LOLA (LOLA-Ex) when the agents have access to exact gradients and Hessians of {V 1 , V 2 }. Here we consider the settings of NL vs NL and LOLA vs LOLA. We study mixed learning of one LOLA agent vs. an NL agent in Section 6.3. Under NLEx, the agents learn to defect in all states, indicated by the accumulation of points in the bottom left corner of the plot. However, under LOLA-Ex, in most cases the agents learn TFT. In particular agent 1 cooperates in the starting state s0 , CC and DC, while agent 2 cooperates in s0 , CC and CD. As a result, Figure 3c) shows that the normalized discounted reward1 is close to −1 for LOLA-Ex vs. LOLA-Ex, corresponding to TFT, while NL vs. NL results in an normalized discounted reward of −2, corresponding to the fully defective (DD) equilibrium. Figure 3d) shows the normalized discounted reward for NL-PG and LOLA-PG where agents 1 We use following definition for the normalized discounted reP ward: (1 − γ) Tt=0 γ t rt . learn via policy gradient. LOLA-PG also demonstrates cooperation while agents defect in NL-PG. We conduct the same analysis for IMP in Figure 2. In this game, under naive learning the agents’ strategies fail to converge. In contrast, under LOLA the agents’ policies converge to the only Nash equilibrium, playing 50%/50% heads / tails. Table 3 summarizes the numerical results comparing LOLA with NL agents in both the exact and policy gradient settings in the two iterated game environments. In IPD, LOLA agents learn policies consistent with TFT with a much higher probability and achieve higher normalized discounted rewards than NL (−1.06 vs −1.98). In IMP, LOLA agents converge to the Nash equilibrium more stably while NL agents do not. The difference in stability is illustrated by the high variance of the normalized discounted returns for NL agents compared to the low variance under LOLA (0.37 vs 0.02). In Figure 4 we show the average normalized return of our LOLA-Ex agent against a set of learning algorithms from literature. We find that LOLA-Ex receives the highest normalized return in the IPD, clearly indicating that it successfully shapes the learning outcome of other algorithms in this general sum setting. In IMP LOLA-Ex achieves stable performance close to the middle of the distribution of results. 6.2 Coin Game We summarize our experiment results in the Coin Game environment. To examine the scalability of LOLA learning rules, we compare NL-PG vs. NL-PG and LOLA-PG vs. LOLA-PG. Figure 5 demonstrates that NL-PG agents collect coins indiscriminately, corresponding to defection. In Average reward per step −0.5 NL-Q JAL-Q PHC WoLF-PHC NL-Ex LOLA-Ex 0.4 −1.0 0.2 −1.5 0.0 PHC WoLF-PHC 200 400 600 Episode NL-Ex LOLA-Ex −0.2 −2.0 −2.5 NL-Q JAL-Q −0.4 0 200 400 600 Episode 800 1000 0 (a) 800 1000 (b) Figure 4: Shown are the normalized returns of a round-robin tournament on IPD in a) and IMP in b). LOLA-Ex agents achieve the best performance on IPD and are within error bars for IMP. Shading indicates a 95% confidence interval of the error of the mean. Baselines from (Bowling and Veloso, 2002): naive Q-learner (NL-Q), joint-action Q-learner (JAL-Q), policy hillclimbing (PHC), and “Win or Learn Fast” (WoLF) PHC. contrast, LOLA-PG agents learn to pick up coins predominantly (around 80%) of their own color, showing that LOLA learning rule leads to cooperation Coin Game as well. Removing the assumption that agents can access the exact parameters of opponents, we examine LOLA agents with opponent modeling (Section 4.4). Figure 5 demonstrates that without access to the opponent’s policy parameters, LOLA agents with opponent modeling pick up coins of their own color around 70% of the time, slightly inferior compared to the performance of LOLA-PG agents. We emphasize that with opponent modeling neither agent can recover the exact policy parameters of the opponent, since there is a large amount of redundancy in the neural network parameters. For example, each agent could permute the weights of their fully connected layers. Opponent modeling introduces noise in the opponent agent’s policy parameters, thus increasing the variance of the gradients (4.7) during policy updates, which leads to inferior performance of LOLA-OM vs. LOLA-PG in Figure 5. 6.3 Exploitability of LOLA We address the exploitability of LOLA learning rule in this section. We consider the IPD setting, where one can calculate the exact value function of each agent giving their policies. Thus, we can evaluate the higher order LOLA terms. We pitch a NL-Ex or LOLA-Ex agent against NLEx, LOLA-Ex, and a 2nd-order LOLA agent. We compare the normalized discounted return of each agent in all settings and address the question of whether there is an arms race to incorporate ever higher orders of LOLA correction terms between the two agents. Table 4 shows a LOLA-Ex learner can achieve higher payouts against NL-Ex. Thus, there is an incentive for either agent to switch from naive learning to first order LOLA. Furthermore, two LOLA-Ex agents playing against each other both receive higher normalized discounted reward than a LOLA-Ex agent playing against a NL-Ex. This makes LOLA a dominant learning rule in IPD compared to naive learning. However, we further find that 2nd-order LOLA provides no incremental gains when playing against a LOLA-Ex agent, leading to a reduction in payouts for both agents. These experiments were carried out with a LR of 0.5. While it is beyond the scope of this work to prove that LOLA vs LOLA is a dominant learning rule in the space of all possible gradient-based rules, these initial results are encouraging. NL-Ex LOLA-Ex NL-Ex (-1.99, -1.99) (-1.28, -1.54) LOLA-Ex (-1.54, -1.28) (-1.04, -1.04) 2nd-Order (-1.14, -1.17) Table 4: Higher order LOLA results on the IPD. A LOLAEx agent obtains higher normalized return compared to a NL-Ex agent. However in this setting there is no incremental gain from using higher order LOLA in order to exploit another LOLA agent in the IPD. In fact both agents do worse with the 2nd order corrections. 7 Conclusions & Future Work We presented Learning with Opponent-Learning Awareness (LOLA), a learning method for multi-agent settings that considers the learning processes of other agents. We show that when both agents have access to exact value function and apply the LOLA learning rule, cooperation emerges based on tit-for-tat in the infinitely repeated iterated prisoners’ dilemma while independent naive learners defect. We also find that LOLA leads to stable learning of the Nash equilibrium in IMP. In our round-robin tournament against other multi-agent learning algorithms we show that exact LOLA agents achieve the highest average returns on the IPD and respectable performance on IMP. We also derive a policy gradient-based version of LOLA, applicable to deep reinforcement learning setting. Experiments on IPD and IMP (a) (b) Figure 5: Shown is the percentage of all picked up coins that match in colour, in a), and the total points obtained, in b), for a pair of naive learners using policy gradient (NL-PG), LOLA-agents (LOLA-PG), and a pair of LOLA-agents with opponent modelling (LOLA-OM). Also shown is the standard deviation of the percentage and the points obtained in order to indicate variability of the result, based on 5 training runs. We see that LOLA and LOLA-OM learn to cooperate, while NL does not. Best viewed in color. demonstrate similar learning behavior to the setting with exact value function. In addition, we scale the policy gradient-based version of LOLA to ‘Coin Game’, a multi-step game which requires deep recurrent policies. LOLA agents learn to cooperate, as colored agents pick up coins of their color with high probability while naive learners pick up coins indiscriminately. We further remove agents’ access to the opponent agents’ policy parameters and replace with opponent modeling. LOLA agents with opponent modeling also learn to cooperate. We briefly address the exploitability of LOLA agents. Empirical results show that in the IPD both agents are incentivized to use LOLA, while higher order exploits show no further gain. In the future we would like to continue to address the exploitability of LOLA, when adversarial agents explicitly aim to take advantage of a LOLA learner using global search methods rather than using gradient-based methods only. Just as LOLA is a way to exploit a naive learner, there should be means of exploiting LOLA learners in turn, unless LOLA is itself an equilibrium learning strategy. Acknowledgements We would like to thank Jascha Sohl-Dickstein, David Balduzzi, Karl Tuyls, Marc Lanctot, Michael Bowling, Ilya Sutskever, Bob McGrew, and Paul Cristiano for fruitful discussion. We would like to thank Michael Littman for providing feedback on an early version of the manuscript. We would like to thank our reviewers for critical and thoughtful feedback. References Axelrod, R. M. 2006. The evolution of cooperation: revised edition. Basic books. Banerjee, D., and Sen, S. 2007. Reaching paretooptimality in prisoner’s dilemma using conditional joint action learning. Autonomous Agents and Multi-Agent Systems 15(1):91–108. Bojarski, M.; Del Testa, D.; Dworakowski, D.; Firner, B.; Flepp, B.; Goyal, P.; Jackel, L. D.; Monfort, M.; Muller, U.; Zhang, J.; et al. 2016. End to end learning for selfdriving cars. arXiv preprint arXiv:1604.07316. Bowling, M., and Veloso, M. 2002. Multiagent learning using a variable learning rate. Artificial Intelligence 136(2):215–250. Brafman, R. I., and Tennenholtz, M. 2003. Efficient learning equilibrium. In Advances in Neural Information Processing Systems, volume 9, 1635–1643. Brown, G. W. 1951. Iterative solution of games by fictitious play. Busoniu, L.; Babuska, R.; and De Schutter, B. 2008. A comprehensive survey of multiagent reinforcement learning. IEEE Transactions on Systems, Man, And CyberneticsPart C: Applications and Reviews, 38 (2), 2008. Claus, C., and Boutilier, C. 1998. The dynamics of reinforcement learning in cooperative multiagent systems. AAAI/IAAI 1998:746–752. Crandall, J. W., and Goodrich, M. A. 2011. Learning to compete, coordinate, and cooperate in repeated games using reinforcement learning. Machine Learning 82(3):281–314. Das, A.; Kottur, S.; Moura, J. M.; Lee, S.; and Batra, D. 2017. Learning cooperative visual dialog agents with deep reinforcement learning. arXiv preprint arXiv:1703.06585. Foerster, J.; Assael, Y. M.; de Freitas, N.; and Whiteson, S. 2016. Learning to communicate with deep multi-agent reinforcement learning. In Advances in Neural Information Processing Systems, 2137–2145. Foerster, J.; Nardelli, N.; Farquhar, G.; Torr, P.; Kohli, P.; Whiteson, S.; et al. 2017. Stabilising experience replay for deep multi-agent reinforcement learning. In 34th International Conference of Machine Learning. cooperative-competitive environments. arXiv:1706.02275. arXiv preprint Mealing, R., and Shapiro, J. L. 2013. Opponent modelling by sequence prediction and lookahead in twoplayer games. In ICAISC (2), 385–396. Mealing, R., and Shapiro, J. 2015. Opponent modelling by expectation-maximisation and sequence prediction in simplified poker. IEEE Transactions on Computational Intelligence and AI in Games. Metz, L.; Poole, B.; Pfau, D.; and Sohl-Dickstein, J. 2016. Unrolled generative adversarial networks. arXiv preprint arXiv:1611.02163. Foerster, J.; Farquhar, G.; Afouras, T.; Nardelli, N.; and Whiteson, S. 2018. Counterfactual multi-agent policy gradients. In AAAI. Mordatch, I., and Abbeel, P. 2017. Emergence of grounded compositional language in multi-agent populations. arXiv preprint arXiv:1703.04908. Fudenberg, D., and Tirole, J. 1991. Game theory, 1991. Cambridge, Massachusetts 393:12. Gibbons, R. 1992. Game theory for applied economists. Princeton University Press. Munoz de Cote, E., and Littman, M. L. 2008. A polynomialtime Nash equilibrium algorithm for repeated stochastic games. In 24th Conference on Uncertainty in Artificial Intelligence (UAI’08). Heinrich, J., and Silver, D. 2016. Deep reinforcement learning from self-play in imperfect-information games. arXiv preprint arXiv:1603.01121. Omidshafiei, S.; Pazis, J.; Amato, C.; How, J. P.; and Vian, J. 2017. Deep decentralized multi-task multi-agent rl under partial observability. arXiv preprint arXiv:1703.06182. Hernandez-Leal, P., and Kaisers, M. 2017. Learning against sequential opponents in repeated stochastic games. Press, W. H., and Dyson, F. J. 2012. Iterated prisoners dilemma contains strategies that dominate any evolutionary opponent. Proceedings of the National Academy of Sciences 109(26):10409–10413. Hernandez-Leal, P.; Kaisers, M.; Baarslag, T.; and de Cote, E. M. 2017. A survey of learning in multiagent environments: Dealing with non-stationarity. arXiv preprint arXiv:1707.09183. Kleiman-Weiner, M.; Ho, M. K.; Austerweil, J. L.; Littman, M. L.; and Tenenbaum, J. B. 2016. Coordinate to cooperate or compete: abstract goals and joint intentions in social interaction. In COGSCI. Lanctot, M.; Zambaldi, V.; Gruslys, A.; Lazaridou, A.; Tuyls, K.; Perolat, J.; Silver, D.; and Graepel, T. 2017. A unified game-theoretic approach to multiagent reinforcement learning. In Advances in Neural Information Processing Systems (NIPS). Lazaridou, A.; Peysakhovich, A.; and Baroni, M. 2016. Multi-agent cooperation and the emergence of (natural) language. arXiv preprint arXiv:1612.07182. Leibo, J. Z.; Zambaldi, V.; Lanctot, M.; Marecki, J.; and Graepel, T. 2017. Multi-agent reinforcement learning in sequential social dilemmas. In Proceedings of the 16th Conference on Autonomous Agents and MultiAgent Systems, 464–473. International Foundation for Autonomous Agents and Multiagent Systems. Roger, B. M. 1991. Game theory: analysis of conflict. Ross, S.; Gordon, G. J.; and Bagnell, J. A. 2011. No-regret reductions for imitation learning and structured prediction. In In AISTATS. Citeseer. Sandholm, T. W., and Crites, R. H. 1996. Multiagent reinforcement learning in the iterated prisoner’s dilemma. Biosystems 37(1-2):147–166. Sukhbaatar, S.; Fergus, R.; et al. 2016. Learning multiagent communication with backpropagation. In Advances in Neural Information Processing Systems, 2244–2252. Sutton, R. S., and Barto, A. G. 1998. Reinforcement learning: An introduction, volume 1. MIT press Cambridge. Sutton, R. S.; McAllester, D. A.; Singh, S. P.; Mansour, Y.; et al. 1999. Policy gradient methods for reinforcement learning with function approximation. In NIPS, volume 99, 1057–1063. Tuyls, K.; Heytens, D.; Nowe, A.; and Manderick, B. 2003. Extended replicator dynamics as a key to reinforcement learning in multi-agent systems. In European Conference on Machine Learning, 421–431. Springer. Lerer, A., and Peysakhovich, A. 2017. Maintaining cooperation in complex social dilemmas using deep reinforcement learning. arXiv preprint arXiv:1707.01068. Williams, R. J. 1992. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning 8(3-4):229–256. Littman, M. L. 2001. Friend-or-foe q-learning in generalsum games. In ICML, volume 1, 322–328. Wunder, M.; Littman, M. L.; and Babes, M. 2010. Classes of multiagent q-learning dynamics with epsilon-greedy exploration. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), 1167–1174. Lowe, R.; Wu, Y.; Tamar, A.; Harb, J.; Abbeel, P.; and Mordatch, I. 2017. Multi-agent actor-critic for mixed Zawadzki, E.; Lipson, A.; and Leyton-Brown, K. 2014. Empirically evaluating multiagent learning algorithms. arXiv preprint arXiv:1401.8074. Zhang, C., and Lesser, V. R. 2010. Multi-agent learning with policy prediction. In AAAI. Zinkevich, M.; Greenwald, A.; and Littman, M. L. 2006. Cyclic equilibria in markov games. In Advances in Neural Information Processing Systems, 1641–1648. A A.1 Appendix Derivation of Second-Order derivative In this section, we derive the second order derivatives of LOLA in the policy gradient setting. Recall that an episode of horizon T is τ = (s0 , u10 , u20 , r01 , r02 , ..., sT , u1T , u2T , rT1 , rT2 ) PT and the corresponding discounted return for agent a at timestep t is Rta (τ ) = l=t γ l−t rla . We denote Eπ1 ,π2 ,τ as the expectation taken over both agents’ policy and the episode τ . Then, " # T T Y Y 1 1 1 1 1 2 2 2 ∇θ1 ∇θ2 Eπ1 ,π2 ,τ R0 (τ ) = ∇θ1 ∇θ2 Eτ R0 (τ ) · π (ul |sl , θ ) · π (ul |sl , θ ) l=0  = Eτ R01 (τ ) ·  = Eτ R01 (τ ) · T Y l=0 ∇θ 1 l=0 l=0 !  π 1 (u1l |sl , θ 1 ) · ∇θ 1 QT l=0   = Eπ1 ,π2 ,τ R01 (τ ) · R01 (τ ) · l=0 π 1 (u1l |sl , θ 1 ) # T Y l=0 !T  π 2 (u2l |sl , θ 2 )    !T QT 2 2 2 ∇θ 2 l=0 π (ul |sl , θ ) QT 2 2 2 l=0 π (ul |sl , θ ) π 2 (u2l |sl , θ 2 ) !  !T  QT QT 1 1 1 2 2 2 2 ∇ π (u |s , θ ) ∇θ 1 π (u |s , θ ) θ l l l l l=0 l=0  QT QT 1 (u1 |s , θ 1 ) 2 (u2 |s , θ 2 ) π π l=0 l=0 l l l l !T  ! T T Y Y    π 2 (u2l |sl , θ 2 ) π 1 (u1l |sl , θ 1 ) ∇θ2 log ∇θ1 log = Eπ1 ,π2 ,τ R01 (τ ) · " T Y ∇θ 2 ! 1 1 1 l=0 π (ul |sl , θ ) QT π 1 (u1l |sl , θ 1 ) · = Eπ1 ,π2 ,τ T Y l=0 l=0 X T l=0  X T ∇θ1 log π 1 (u1l |sl , θ 1 ) l=0 ∇θ2 log π 2 (u2l |sl , θ 2 ) T # . The second equality is due to πl is only a function of θl . The third equality is multiply and divide the probability of the episode τ . The fourth equality factors the probability of the episode τ into the expectation Eπ1 ,π2 ,τ . The fifth and sixth equalities are standard policy gradient operations. Similar derivations lead to the the following second order cross-term gradient for a single reward of agent 1 at time t  T   Xt  Xt 1 1 1 1 1 2 2 2 ∇θ2 log π (ul |sl , θ ) . ∇θ1 ∇θ2 Eπ1 ,π2 ,τ rt = Eπ1 ,π2 ,τ rt · ∇θ1 log π (ul |sl , θ ) l=0 l=0 Sum the rewards over t, ∇θ1 ∇θ2 Eπ1 ,π2 ,τ R01 (τ ) = Eπ1 ,π2 ,τ X T t=0 γ t rt1 · Xt l=0  Xt ∇θ1 log π 1 (u1l |sl , θ 1 ) l=0 ∇θ2 log π 2 (u2l |sl , θ 2 ) T  , which is the 2nd order term in the Methods Section. A.2 Derivation of the exact value function in the Iterated Prisoners’ dilemma and Iterated Matching Pennies In both IPD and IMP the action space consists of 2 discrete actions. The state consists of the union of the last action of both agents. As such there are a total of 5 possible states, 1 state being the initial state, s0 , and the other 4 the 2 x 2 states depending on the last action taken. As a consequence the policy of each agent can be represented by 5 parameters,θ a ,the probabilities of taking action 0 in each of these 5 states. In the case of the IPD these parameters correspond to the probability of cooperation in s0 , CC, CD, DC and DD: π a (C|s0 ) = θa,0 , π a (C|CC) = θa,1 , π a (C|CD) = θa,2 , π a (C|DC) = θa,3 , π a (C|DD) = θa,4 , π a (D|s0 ) = 1 − θa,0 , π a (D|CC) = 1 − θa,1 , π a (D|CD) = 1 − θa,2 , π a (D|DC) = 1 − θa,3 , π a (D|DD) = 1 − θa,4 , a ∈ {1, 2}. We denote θ a = (θa,0 , θa,1 , θa,2 , θa,3 , θa,4 ). In these games the union of π 1 and π 2 induces a state transition function P (s0 |s) = P (u|s). Denote the distribution of s0 as p0 : T p0 = θ1,0 θ2,0 , θ1,0 (1 − θ2,0 ), (1 − θ1,0 )θ2,0 , (1 − θ1,0 )(1 − θ2,0 ) , the payout vector as r 1 = (−1, −3, 0, −2)T and the transition matrix is and r 2 = (−1, 0, −3, −2)T ,   P = θ 1 θ 2 , θ 1 (1 − θ 2 ), (θ 1 − 1)θ 2 , (1 − θ 1 )(1 − θ 2 ) Then V1 , V2 can be represented as V 1 (θ 1 , θ 2 ) = pT0 r 1 + 2 1 2 V (θ , θ ) = pT0 2 r + X∞ t=1 X∞ t=1 γ t P t r1   γ t P t r2 . Since γ < 1 and P is a stochastic matrix, the infinite sum converges and I r1 , I − γP I V 2 (θ 1 , θ 2 ) = pT0 r2 , I − γP V 1 (θ 1 , θ 2 ) = pT0 where I is the identity matrix. An equivalent derivation holds for the Iterated Matching Pennies game with r 1 = (−1, 1, 1, −1)T and r 2 = −r 1 . A.3 Figures 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 0.8 CC CD DC DD P0 0.2 0.0 0.0 0.2 0.4 0.6 0.8 P(cooperation | state)_agent 0 Average reward per step P(cooperation | state)_agent 1 1.0 0.2 a0 Lola a1 Lola a0 NL a1 NL 1.4 1.6 1.8 2.0 0.0 1.0 1.2 0.0 0.2 0.4 0.6 0.8 P(cooperation | state)_agent 0 1.0 0 50 100 Iterations 150 200 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 HH HT TH TT P0 0.2 0.0 0.0 0.2 0.4 0.6 0.8 P(Head | state)_agent 0 0.2 Average reward per step P(Head | state)_agent 1 (a) 0.2 0.0 0.1 a0 Lola a1 Lola a0 NL a1 NL 0.2 0.0 1.0 0.1 0.0 0.2 0.4 0.6 0.8 P(Head | state)_agent 0 1.0 0 50 100 Iterations 150 200 (b) Figure 6: Shown is the probability of cooperation in the prisoners dilemma (a) and the probability of heads in the matching pennies game (b) at the end of 50 training runs for both agents as a function of state under naive learning (left) and LOLA (middle) when using the exact gradients of the value function. Also shown is the average return per step for naive and LOLA (right) 1.0 0.8 0.8 0.6 0.6 0.4 1.0 Average reward per step P(cooperation | state)_agent 1 1.0 0.4 CC CD DC DD P0 0.2 0.0 0.0 0.2 0.4 0.6 0.8 P(cooperation | state)_agent 0 0.2 a0 Lola a1 Lola a0 NL a1 NL 2.0 0.0 1.0 1.5 0.0 0.2 0.4 0.6 0.8 P(cooperation | state)_agent 0 1.0 0 20 40 60 Iterations 80 100 (a) 0.3 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 HH HT TH TT P0 0.2 0.0 0.0 0.2 0.4 0.6 0.8 P(Head | state)_agent 0 Average reward per step P(Head | state)_agent 1 0.2 0.2 0.1 0.0 0.1 a0 Lola a1 Lola a0 NL a1 NL 0.2 0.0 1.0 0.0 0.2 0.4 0.6 0.8 P(Head | state)_agent 0 1.0 0.3 0 20 40 60 Iterations 80 100 (b) Figure 7: Same as Figure A.3, but using the policy gradient approximation for all terms. Clearly results are more noisy by qualitatively follow the results of the exact method.
2cs.AI
Streaming Graph Challenge: Stochastic Block Partition Edward Kao, Vijay Gadepally, Michael Hurley, Michael Jones, Jeremy Kepner, Sanjeev Mohindra, Paul Monticciolo, Albert Reuther, Siddharth Samsi, William Song, Diane Staheli, Steven Smith arXiv:1708.07883v1 [cs.DC] 25 Aug 2017 MIT Lincoln Laboratory, Lexington, MA Abstract—An important objective for analyzing realworld graphs is to achieve scalable performance on large, streaming graphs. A challenging and relevant example is the graph partition problem. As a combinatorial problem, graph partition is NP-hard, but existing relaxation methods provide reasonable approximate solutions that can be scaled for large graphs. Competitive benchmarks and challenges have proven to be an effective means to advance state-of-the-art performance and foster community collaboration. This paper describes a graph partition challenge with a baseline partition algorithm of sub-quadratic complexity. The algorithm employs rigorous Bayesian inferential methods based on a statistical model that captures characteristics of the real-world graphs. This strong foundation enables the algorithm to address limitations of well-known graph partition approaches such as modularity maximization. This paper describes various aspects of the challenge including: (1) the data sets and streaming graph generator, (2) the baseline partition algorithm with pseudocode, (3) an argument for the correctness of parallelizing the Bayesian inference, (4) different parallel computation strategies such as node-based parallelism and matrix-based parallelism, (5) evaluation metrics for partition correctness and computational requirements, (6) preliminary timing of a Python-based demonstration code and the open source C++ code, and (7) considerations for partitioning the graph in streaming fashion. Data sets and source code for the algorithm as well as metrics, with detailed documentation are available at GraphChallenge.org. I. I NTRODUCTION In the era of big data, analysis and algorithms often need to scale up to large data sets for real-world applications. With the rise of social media and network data, algorithms on graphs face the same challenge. Competitive benchmarks and challenges have proven to be an effective means to advance state-of-the-art performance and foster community collaboration. Previous benchmarks such as Graph500 [1] and the Pagerank Pipeline [2] are examples of such, targeting analysis of large graphs and focusing on problems with sub-quadratic complexity, such as search, path-finding, and PageRank computation. However, some analyses on graphs with valuable applications are NP-hard. The graph partition and the *This material is based upon work supported by the Defense Advanced Research Projects Agency under Air Force Contract No. FA8721-05-C-0002. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the Department of Defense. graph isomorphism (i.e. matching) problems are wellknown examples. Although these problems are NP-hard, existing relaxation methods provide good approximate solutions that can be scaled to large graphs [3], [4], especially with the aid of high performance computing hardware platform such as massively parallel CPUs and GPUs. For example, the 10th DIMACS Implementation Challenge [5] resulted in substantial participation in the graph partition problem, mostly with solutions based on modularity maximization. To promote algorithmic and computational advancement in these two important areas of graph analysis, our team has implemented a challenge for graph isomorphism [6] and graph partition at GraphChallenge.org. This paper describes the graph partition challenge with a recommended baseline partition algorithm of sub-quadratic complexity. Furthermore, the algorithm employs rigorous Bayesian inferential methods based on the stochstic blockmodels that capture characteristics of the real-world graphs. Participants are welcome to submit solutions based on other partition algorithms as long as knowledge on the true number of communities (i.e. blocks) is not assumed. All entries should be submitted with performance evaluation on the challenge data sets using the metrics described in Section V. Graph partition, also known as community detection and graph clustering, is an important problem with many real-world applications. The objective of graph partition is to discover the distinct community structure of the graph, specifically the community membership for each node in the graph. The partition gives much insight to the interactions and relationships between the nodes and enables detection of nodes belonging to certain communities of interest. Much prior work has been done in the problem space of graph partition, with a comprehensive survey in [7]. The most well-known algorithm is probably the spectral method by [8] where partition is done through the eigenspectrum of the modularity matrix. Most of the existing partition algorithms work through the principle of graph modularity where the graph is partitioned into communities (i.e. modules) that have much stronger interactions within them than between them. Typically, partitioning is done by maximizing the graph modularity [9]. [10] extends the concept of modularity for time-dependent, multiscale, and multiplex graphs. Modularity maximization is an intuitive and convenient approach, but has inherent challenges such as resolution limit on the size of the detectable communities [11], degeneracies in the objective function, and difficulty in identifying the optimal number of communities [12]. To address these challenges, recent works perform graph partition through membership estimation based on generative statistical models. For example, [13], [14], [15], [16] estimate community memberships using the degree corrected stochastic blockmodels [17], and [18] proposes a mixed-memberships estimation procedure by applying tensor methods to the mixed-membership stochastic blockmodels [19]. The baseline partition algorithm for this challenge is based on [14], [15], [16], because of its rigorous statistical foundation and subquadratic computational requirement. Under this approach, each community is represented as a “block” in the model. Going forward, this paper will use the term “block” as the nomenclature for a community or a graph cluster. When some nodes in the graph have known memberships a priori, these nodes can serve as “cues” in the graph partition problem. [20] is an example of such using random walks on graph. This challenge will focus on the graph partition problem where such cues are not available. In many real-world applications, graph data arrives in streaming fashion over time or stages of sampling [21]. This challenge addresses this aspect by providing streaming graph data sets and recommending a baseline partition algorithm that is suitable for streaming graphs under the Bayesian inference paradigm. This paper describes the graph partition challenge in detail, beginning with Section II on the data sets and streaming graph generator. Section III describes the baseline partition algorithm, including pseudocode on the core Bayesian updates. Section IV focuses on the parallel computation of the baseline algorithm, argues for the correctness of parallelizing the Bayesian updates, then proposes parallel computation strategies such as nodebased parallelism and matrix-based parallelism. Section V describes the evaluation metrics for both partition correctness and computational requirements, including a preliminary timing of a Python-based demonstration code and the open source C++ code by Tiago Peixoto [22]. Considerations for partitioning the graph in streaming fashion are given throughout the paper. II. DATA S ETS The data sets for this challenge consist of graphs of varying sizes and characteristics. Denote a graph G “ pV, Eq, with the set V of N nodes and the set E of E edges. The edges, represented by a N ˆ N adjacency matrix A, can be either directed or undirected, binary or weighted. Specifically, Aij is the weight of the edge from node i to node j. A undirected graph will have a symmetric adjacency matrix. In order to evaluate the partition algorithm implementation on graphs with a wide range of realistic characteristics, graphs are generated according to a truth partition b: of B : blocks (i.e. clusters), based on the degree-corrected stochastic blockmodels by Karrer and Newman in [17]. Under this generative model, each edge, Aij , is drawn from a Poisson distribution of rate λij governed by the equations below: Aij „ Poissonpλij q (1) λij “ θi θj Ωbi bj (2) where θi is a correction term that adjusts node i’s expected degree, Ωbi bj the strength of interaction between block bi and bj , and bi the block assignment for node i. The degree-corrected stochastic blockmodels enable the generation of graphs with characteristics and variations consistent with real-world graphs. The degree correction term for each node can be drawn from a Power-Law distribution with an exponent between ´3 and ´2 to capture the degree distribution of realistic, scale-free graphs [23]. The block interaction matrix Ω specifies the strength of within- and between-block (i.e. community) interactions. Stronger between-block interactions will increase the block overlap, making the block partition task more difficult. Lastly, the block assignment for each node (i.e. the truth partition b: ) can be drawn from a multinomial distribution with a Dirichlet prior that determines the amount of variation in size between the blocks. Figure 1 shows generated graphs of various characteristics by adjusting the parameters of the generator. These parameters server as “knobs” that can be dialed to capture a rich set of characteristics for realism and also for adjusting the difficulty of the block partition task. Real-world graphs will also be included in the data sets. Since the truth partition is not available in most real-world graphs, generated graphs with truth will be embedded with the real-world graphs. While the entire graph will be partitioned, evaluation on the correctness of the partition will be done only on the generated part of the hybrid graph. Embedding will be done by adding edges between nodes in the real-world graph and the generated graph, with a relatively small probability proportional to the product of both node degrees. In real-world applications, graph data often arrives in streaming fashion, where parts of the input graph become available at different stages. This happens as interactions and relationships take place and are observed over time, or as data is collected incrementally by exploring the graph from starting points (e.g. breadth first search and snowball sampling) [21]. Streaming graph (a) streaming graph as edges emerge (a) baseline (b) increased block overlap (b) streaming graph with snowball sampling Fig. 2. Streaming graphs generated in two ways: (a) as edges emerge over time and (b) as the graph is explored from starting point(s). (c) higher block size variation (d) more high degree nodes Fig. 1. Generated graphs with varying characteristics. Nodes are colored and shaped according to their true block assignments. Graphs are typically much larger. Small graphs are shown here for the purpose of demonstration. For simplicity and clarity, the edge directions (i.e. arrows) are not displayed. data sets in this challenge are generated in both ways, as demonstrated in Figure 2. The partition algorithm should process the streaming graph at each stage and ingest the next stage upon completion of the current stage. Performance evaluated using the metrics in Section V should be reported at each stage of the processing. For efficiency, it is recommended that the partition algorithm leverages partitions from the previous stage(s) to speed up processing at the current stage. The baseline partition algorithm for this challenge is a natural fit for streaming processing, as discussed in Section III. III. BASELINE A LGORITHM This section described the recommended baseline partition algorithm, although participants are welcome to submit solutions based on other partition algorithms as long as knowledge on the true number of blocks is not assumed. The baseline graph partition algorithm for this challenge, chosen for its rigorous statistical foundation and sub-quadratic, OpE log2 Eq, computational requirement, is developed by Tiago Peixoto in [14], [15], [16] based on the degree-corrected stochastic blockmodels by Karrer and Newman in [17]. Given the input graph, the algorithm partitions the nodes into B blocks (i.e. clusters or communities), by updating the nodal block assign- ment represented by vector b of N elements where bi P t1, 2, ..., Bu, and the inter-block and intra-block edge count matrix (typically sparse in a large graph) represented by M of size B ˆ B, where each element Mij represents the number or the total weight of edges going from block i to block j. The diagonal elements represent the edge counts within each block. For conciseness, this matrix will be referred to as the inter-block edge count matrix going forward. The goal of the algorithm is to recover the truth partition b: of B : blocks (i.e. clusters). The algorithm performs a Fibonacci search (i.e. golden section search) [24] through different numbers of blocks B and attempts to find the minimum description length partition. The best overall partition b˚ with the optimal number of block B ˚ minimize the total description length of the model and the observed graph (i.e. entropy of the fitted model). To avoid being trapped in local minima, the algorithm starts with each node in its own block (i.e. B “ N ) and the blocks are merged at each step of the Fibonacci search, followed by iterative Monte Carlo Markov Chain (MCMC) updates on the block assignment for each node to find the best partition for the current number of blocks. The block-merge moves and the nodal updates are both governed by the same underlying log posterior probability of the partition given the observed graph: ˆ ppb|Gq 9 ÿ t1 ,t2 Mt1 t2 log M t1 t2 dt1 ,out dt2 ,in ˙ (3) The log posterior probability is a summation over all pairs of blocks t1 and t2 where dt1 ,out is the total outdegree for block t1 and dt2 ,in is the total in-degree for block t2 . Note that in computing the posterior proba- bilities on the block assignments, the sufficient statistics for the entire graph is only the inter-block edge counts, giving much computational advantage for this algorithm. Another nice property of the log posterior probability is that it is also the negative entropy of the fitted model. Therefore, maximizing the posterior probability of the partition also minimizes the overall entropy, fitting nicely into the minimum description length framework. The block-merge moves and the nodal block assignment updates are described in detail next, starting with the nodal updates. A. Nodal Block Assignment Updates The nodal updates are performed using the MCMC, specifically with Gibbs sampling and the MetropolisHastings algorithm since the partition posterior distribution in Equation 3 does not have a closed-form and is best sampled one node at a time. At each MCMC iteration, the block assignment of each node i is updated conditional on the assignments of the other nodes according to the conditional posterior distribution: ppbi |b´i , Gq. Specifically, the block assignment bi for each node i is updated based on the edges to its neighbors, AiNi and ANi i , the assignments of its neighbors, bNi , and the inter-block edge count, M . For each node i, the update begins by proposing a new block assignment. To increase exploration, a block is randomly chosen as the proposal with some predefined probability. Otherwise, the proposal will be chosen from the block assignments of nodes nearby to i. The new proposal will be considered for acceptance according to how much it changes the log posterior probability. The acceptance probability is adjusted by the Hastings correction, which accounts for potential asymmetry in the directions of the proposal to achieve the important detailed balance condition that ensures the correct convergence of the MCMC. Algorithm 1 in Appendix A is a detailed description of the block assignment update ř at each node, using some additional notations: dt,in “ ř k Mkt is the number of edges into block t, dt,out “ k Mtk the number of edges out of block t, dt “ dt,in ` dt,out the number of edges into and out of block t, Kit the number of edges between nodes i and block t, and β is the update rate that controls the balance between exploration and exploitation. The block assignments are updated for each node iteratively until convergence when the improvement in the log posterior probability falls below a threshold. B. Block-Merge Moves The block-merge moves work in almost identical ways as the nodal updates described in Algorithm 1 in Appendix A, except that it takes place at the block level. Specifically, a block-merge move proposes to reassign all the nodes belonging to the current block i to a proposed block s. In other words, it is like applying Algorithm 1 on the block graph where each node represents the entire block (i.e. all the nodes belonging to that block) and each edge represents the number of edges between the two blocks. Another difference is that the block-merges are done in a greedy manner to maximize the log posterior probability, instead of through MCMC. Therefore, the Hastings correction computation step and the proposal acceptance step are not needed. Instead, the best merge move over some number of proposals is computed for each block according to the change in the log posterior probability, and the top merges are carried out to result in the number of blocks targeted by the Fibonacci search. C. Put It All Together Overall, the algorithms shifts back and forth between the block-merge moves and the MCMC nodal updates, to find the optimal number of blocks B ˚ with the resulting partition b˚ . Optimality is defined as having the minimum overall description length, H, of the model and the observed graph given the model: B2 E ˙ Mrs dr,out ds,in r,s (4) where the function hpxq “ p1 ` xq logp1 ` xq ´ x logpxq. The number of blocks may be reduced at a fixed rated (e.g. 50%) at each block-merge phase until the Fibonacci 3-point bracket is established. At any given stage of the search for optimal number of blocks, the past partition with the closest and higher number of blocks is used to begin the block-merge moves, followed by the MCMC nodal updates, to find the best partition at the targeted number of blocks. Figure 3 shows the partition at selected stages of the algorithm on a 500 node graph: The algorithm description in this section is for directed graphs. Very minor modifications can be applied for undirected graphs that have no impact on the computational requirement. These minor differences are documented in Peixoto’s papers [14], [15], [16]. Advantageously, the baseline partition algorithm with its rigorous statistical foundation, is ideal for processing streaming graphs. Good partitions found on the graph at a previous streaming stage are samples on the posterior distribution of the partition, which can be used as starting partitions for the graph at the current stage. This has the natural Bayesian interpretation of the posterior distribution from a previous state serving as the prior distribution on the current state, as additional data on the graph arrives. ˆ H“Eh ˙ ˆ `N log B ´ ÿ Mrs log IV. PARALLEL C OMPUTATION S TRATEGIES Significant speed up of the baseline partition algorithm is the primary focus of this graph challenge, and is (a) 250 blocks (b) 32 blocks (c) 8 blocks (d) 4 blocks proposed to use asynchronous Gibbs sampling as a way to parallelize MCMC updates [25], [26]. In asynchronous Gibbs sampling, the parameters are updated in parallel and asynchronous fashion without any dependency constraint. In [26], a proof is given to show that when the parameters in the MCMC sparsely influence one another (i.e. the Dobrushin’s condition), asynchronous Gibbs is able to converge quickly to the correct distribution. It is difficult to show analytically that the MCMC nodal updates here satisfy the Dobrushin’s condition. However, since the graph is typically quite sparse, the block assignment on each node influences one another sparsely. This gives intuition on the adequacy of parallel MCMC updates for the baseline partition algorithm. In fact, parallel MCMC updates based on one-iteration-old block assignments have shown to result in equally good partitions compared to the sequential updates, based on the quantitative metrics in Section V-A, for the preliminary tests we conducted so far. B. Parallel Updates on Nodes and Blocks Fig. 3. Partitions at selected stages of the algorithm, with the nodes colored and shaped according to their block assignments. The algorithm begins with too many blocks (i.e. over partition) and performs block-merges and nodal updates as it searches for the optimal partition. The Fibonacci search eventually converges to the partition with the optimal number of blocks, which is shown in (c) with 8 blocks. necessary for computation on large graphs. Since the same core computation, described in Algorithm 1 in Appendix A, is repeated for each block and each node, parallelizing this core computation across the blocks and nodes provides a way to speed up the computation potentially by the order of the number of processors available. This section first discusses the correctness in parallelizing the MCMC updates. It then examines some of the parallel computation schemes for the baseline algorithm, with their respective advantages and requirements. A. Correctness of Parallel MCMC Updates The block-merge moves are readily parallelizable, since each of the potential merge move is evaluated based on the previous partition and the best merges are carried out. However, the nodal block assignment updates are not so straight forward, since it relies on MCMC through Gibbs sampling which is by nature a sequential algorithm where each node is updated one at a time. Parallelizing MCMC updates is an area of rising interest, with the increasing demand to perform Bayesian inference on large data sets. Running the baseline partition algorithm on large graphs is a perfect example of this need. Very recently, researchers have An intuitive and straight-forward parallel computation scheme is to evaluate each block-merge and update each nodal block assignment (i.e. Algorithm 1 in Appendix A) in distributed fashion across multiple processors. The block-merge evaluation is readily parallelizable since the computation is based on the previous partition. The MCMC nodal updates can be parallelized using the one-iteration-old block assignments, essentially approximating the true conditional posterior distribution with: ´ ppbi |b´ ´i , Gq. The conditional block assignments, b´i , may be more “fresh” if asynchronous Gibbs sampling is used so that some newly updated assignments may become available to be used for updates on later nodes. In any case, once all the nodes have been updated in the current iteration, all the new block assignments are gathered and their modifications on the inter-block edge count matrix aggregated (this can also be done in parallel). These new block assignments and the new inter-block edge count matrix are then available for the next iteration of MCMC updates. C. Batch Updates Using Matrix Operations Given an efficient parallelized implementation of large-scale matrix operations, one may consider carrying out Algorithm 1 as much as possible with batch computation using matrix operations [27]. Such matrix operations in practice perform parallel computation across all nodes simultaneously. Under this computation paradigm, the block assignments are represented as a sparse N ˆ B binary matrix Γ, where each row πi is an indicator vector with a value of one at the block it is assigned to and zeros ‚ everywhere else. This representation results in simple matrix products for the inter-block edge counts: M “ ΓTAΓ (5) The contributions of node i of block assignment r to the inter-block edge count matrix row r and column r are: ∆M row,i “ Ai Γ (6) AT‚i Γ (7) ‚ ∆M ` col,i‚ ‚ “ These contributions are needed for computing the acceptance probabilities of the nodal block assignment proposals, which makes up a large part of the overall computation requirement. Algorithm 2 in Appendix B is a batch implementation of the nodal updates described in Algorithm 1. The interblock edge counts under each of the N proposal are represented using a 3D matrix M of size N ˆ B ˆ B. For clarity, computations of the acceptance probabilities involving the inter-block edge counts and degrees are specified using tensor notation. Note that much of these computations may be avoided with clever implementations. For example: ‚ If the proposed block assignment for a node is the same as its previous assignment, its acceptance probability does not need to be computed. ‚ New proposals only change two rows and columns of the inter-block edge count matrix, corresponding to moving the counts from the old block to the new block, so most of the entries in M are simply copies of M ´ . ‚ The inter-block edge count matrix should be sparse, especially when there is a large number of communities, since most communities do not interact with one another. This gives additional opportunity for speeding up operations on this matrix. ‚ Similarly, each node is likely to connect with only a few different communities (i.e. blocks). Therefore, changes by each nodal proposal on the inter-block edge count matrix will only involve a few selected rows and columns. Limiting the computation of change in log posterior, ∆S, to these rows and columns may result in significant computation speedup. V. M ETRICS An essential part of this graph challenge is a canonical set of metrics for comprehensive evaluation of the partition algorithm implementation by each participating team. The evaluation should report both the correctness of the partitions produced, as well as the computational requirements, efficiency, and complexity of the implementations. For streaming graphs, evaluation should be done at each stage of the streaming processing, for example, the length of time it took for the algorithm to finish processing the graph after the first two parts of the graph become available, and the correctness of the output partition on the available parts so far. Efficient implementations of the partition algorithm leverage partitions from previous stages of the streaming graph to “jump start” the partition at the current stage. A. Correctness Metrics The true partition of the graph is available in this challenge, since the graph is generated with a stochastic block structure, as described in Section II. Therefore, correctness of the output partition by the algorithm implementation can be evaluated against the true partition. On the hybrid graphs where a generated graph is embedded within a real-world graph with no available true partition, correctness is only evaluated on the generated part. Evaluation of the output partition (i.e. clustering) against the true partition is well established in existing literature and a good overview can be found in [28]. Widely-adopted metrics fall under three general categories: unit counting, pair-wise counting, and information theoretic metrics. The challenge in this paper adopts all of them for comprehensiveness and recommends the pairwise precision-recall as the primary correctness metric for its holistic evaluation and intuitive interpretation. Computation of the correctness metrics described in this section are implemented in Python and shared as a resource for the participants at GraphChallenge.org. Table I provides a simple example to demonstrate each metric, where each cell in row i and column j is the count of nodes belonging to truth block i and reported in output block j. TABLE I C ONTINGENCY TABLE OF TRUE VS . OUTPUT PARTITION Truth A Truth B Total Output A 30 1 31 Output B 2 20 22 Output C 0 3 3 Total 32 24 56 In this example, the nodes are divided into two blocks in the true partition, but divided into three blocks in the output partition. Therefore, this is an example of over-clustering (i.e. too many blocks). The diagonal cells shaded in green here represent the nodes that are correctly partitioned whereas the off-diagonal cells shaded in pink represent the nodes with some kind of partition error. 1) Unit Counting Metrics: The most intuitive metric is perhaps the overall accuracy, specifically the percentage of nodes correctly partitioned. This is simply the fraction of the total count that belong to the diagonal entries of the contingency table after the truth blocks and the output blocks have been optimally associated to maximize the diagonal entries, typically using a linear assignment algorithm [29]. In this example, the overall accuracy is simply 50{66 “ 89%. While this one single number provides an intuitive overall score, it does not account for the types and distribution of errors. For example, truth block B in Table I has three nodes incorrectly split into output block C. If instead, these three nodes were split one-by-one into output block C, D, and E, a worse case of over-clustering would have taken place. The overly simplified accuracy cannot make this differentiation. A way to capture more details on the types and distribution of errors is to report block-wise precisionrecall. Block-wise precision is the fraction of correctly identified nodes for each output block (e.g. Precision(Output A) “ 30{31) and the block-wise recall is the fraction of correctly identified nodes for each truth block (e.g. Recall(Truth B) “ 20{24). The block-wise precision-recall present a intuitive score for each of the truth and output blocks, and can be useful for diagnosing the block-level behavior of the implementation. However, it does not provide a global measure on correctness. 2) Pairwise Counting Metrics: Measuring the level of agreement between the truth and the output partition by considering every pair of nodes has a long history within the clustering community [30], [31]. The basic idea is simple, by considering every pair of nodes which belongs to one of the following four categories: (1) in the same truth block and the same output block, (2) in different truth blocks and different output blocks, (3) in the same truth block but different output blocks, and (4) in different truth blocks but the same output block. Category (1) and (2) are the cases of agreements between the truth and the output partition, whereas categories (3) and (4) indicate disagreements. An intuitive overall score on the level of agreement is the fraction of all pairs belonging to category (1) and (2), known as the Rand index [30]. [31] proposes the adjusted Rand index with a correction to account for the expected value of the index by random chance, to provide a fairer metric across different data sets. Categories (4) and (3) can be interpreted as type I (i.e. false positives) and type II (i.e. false negative) errors, if one considers a “positive” case to be where the pair belongs to the same block. The pairwise precision-recall metrics [32] can be computed as: Pairwise-recall “ #Category 1 #Category 1 ` #Category 3 (9) Pairwise-precision considers all the pairs reported as belonging to the same output block and measures the fraction of them being correct, whereas pairwise-recall considers all the pairs belonging to the same truth block and measures the fraction of them reported as belonging to the same output block. In the example of Table I, the pairwise-precision is about 90% and the pairwiserecall about 81%, which indicates this to be a case of over-clustering with more Type II errors. Although pairwise counting is somewhat arbitrary, it does present holistic and intuitive measures on the overall level of agreement between the output and the true partition. For the challenge, the pairwise precision-recall will serve as the primary metrics for evaluating correctness of the output partition. 3) Information Theoretic Metrics: In recent years, holistic and rigorous metrics have been proposed based on information theory, for evaluating partitions and clusterings [28], [33]. Specifically, these metrics are based on the information content of the partitions measured in Shannon entropy. Naturally, information theoretic precision-recall metrics can be computed as: Information-precision “ Information-recall “ IpT ; Oq HpOq IpT ; Oq HpT q (10) (11) where IpT ; Oq is the mutual information between truth partition T and the output partition O, and HpOq is the entropy (i.e. information content) of the output partition. Using the information theoretic measures, precision is defined as the fraction of the output partition information that is true, and recall is defined as the fraction of the truth partition information captured by the output partition. In the example of Table I, the information theoretic precision is about 57% and recall about 71%. The precision is lower than the recall because of the extra block in the output partition introducing information content that does not correspond to the truth. The information theoretic precision-recall provide a rigorous and comprehensive measure of the correctness of the output partition. However, the information theoretic quantities may not be as intuitive to some and the metrics tend to be harsh, as even a small number of errors often lower the metrics significantly. B. Computational Metrics Pairwise-precision “ #Category 1 #Category 1 ` #Category 4 (8) The following metrics should be reported by the challenge participants to characterize the computational requirements of their implementations: ‚ ‚ E/second/Watt. Memory requirement: The amount of memory required to execute the implementation. Processor requirement: The number and type of processors used to execute the implementation. C. Implementation Complexity Metric Total lines-of-code count: This measure the complexity of the implementation. SCLC [34] and CLOC [35] are open source line counters that can be used for this metric. The Python demonstration code for this challenge has a total of 569 lines. The C++ open source implementation is a part of a bigger package, so it is difficult to count the lines on just the graph partition. VI. S UMMARY Fig. 4. Processing rate for three different implementations of the baseline algorithm across graphs of increasing size. Overall, the slope of the rates follow the complexity of the algorithm, OpE log2 Eq. ‚ ‚ ‚ ‚ ‚ Total number of edges in the graph (E): This measures the amount of data processed. Execution time: The total amount of time taken for the implementation to complete the partition, in seconds. Rate: This metric measures the throughput of the implementation, in total number of edges processed over total execution time (E/second). Figure 4 shows the preliminary results on this metric between three different implementations of the partition algorithm, when run on a HP ProLiant DL380 Gen9 with 56 cores of Intel(R) Xeon(R) processors at 2.40GHz, and 512 GB of HPE DDR4 memory at 2400 MHZ. The three implementations are: (1) C++ serial implementation and (2) C++ parallel implementation by Tiago Peixoto [22], and (3) Python serial implementation. The C++ implementations leverage the Boost Graph Library (BGL) extensively. Since the algorithm complexity is super-linear, the rate drops as the size of the graph increases, with a slope matching the change in rate according to the analytical complexity of the algorithm, OpE log2 Eq. The serial C++ implementation is about an order of magnitude faster than the Python implementation. With parallel updates, the C++ implementation gains another order of magnitude in rate when the graph is large enough. The Python implementation is limited in its ability to process very large graphs due to the lack of a fast implementation of sparse matrices in Python. All three implementations are available at GraphChallenge.org. Energy consumption in watts: The total amount of energy consumption for the computation. Rate per energy: This metric captures the throughput achieved per unit of energy consumed, measured in This paper gives a detailed description of the graph partition challenge, its statistical foundation in the stochastic blockmodels, and comprehensive metrics to evaluate the correctness, computational requirements, and complexity of the competing algorithm implementations. This paper also recommends strategies for massively parallelizing the computation of the algorithm in order to achieve scalability for large graphs. Theoretical arguments for the correctness of the parallelization are also given. Our hope is that this challenge will provide a helpful resource to advance state-of-the-art performance and foster community collaboration in the important and challenging problem of graph partition on large graphs. Data sets and source code for the algorithm as well as metrics, with detailed documentation are available at GraphChallenge.org. VII. ACKNOWLEDGMENT The authors would like thank Trung Tran, Tom Salter, David Bader, Jon Berry, Paul Burkhardt, Justin Brukardt, Chris Clarke, Kris Cook, John Feo, Peter Kogge, Chris Long, Jure Leskovec, Henning Meyerhenke, Richard Murphy, Steve Pritchard, Michael Wolfe, Michael Wright, and the entire GraphBLAS.org community for their support and helpful suggestions. Also, the authors would like to recognize Ryan Soklaski, John Griffith, and Philip Tran for their help on the baseline algorithm implementation, as well as Benjamin Miller for his feedback on the matrix-based parallelism. R EFERENCES [1] Richard C Murphy, Kyle B Wheeler, Brian W Barrett, and James A Ang. Introducing the graph 500. Cray Users Group (CUG), 2010. [2] Patrick Dreher, Chansup Byun, Chris Hill, Vijay Gadepally, Bradley Kuszmaul, and Jeremy Kepner. Pagerank pipeline benchmark: Proposal for a holistic system benchmark for big-data platforms. In Parallel and Distributed Processing Symposium Workshops, 2016 IEEE International, pages 929–937. IEEE, 2016. [3] Yu Jin and Joseph F Jaja. A high performance implementation of spectral clustering on cpu-gpu platforms. In 2016 IEEE International Parallel and Distributed Processing Symposium Workshops, pages 825–834. IEEE, 2016. [4] Hiroki Kanezashi and Toyotaro Suzumura. An incremental localfirst community detection method for dynamic graphs. In 2016 IEEE International Conference on Big Data, pages 3318–3325. IEEE, 2016. [5] David A Bader, Henning Meyerhenke, Peter Sanders, and Dorothea Wagner. Graph partitioning and graph clustering, volume 588. American Mathematical Soc., 2013. [6] Siddharth Samsi, Vijay Gadepally, Michael Hurley, Michael Jones, Edward Kao, Sanjeev Mohindra, Paul Monticciolo, Albert Reuther, Steven Smith, William Song, Diane Staheli, and Jeremy Kepner. Static graph challenge: Subgraph isomorphism. In 2017 IEEE High Performance Extreme Computing Conference (HPEC). IEEE, 2017. [7] Santo Fortunato. Community detection in graphs. Physics Reports, 486(3):75–174, 2010. [8] Mark EJ Newman. Finding community structure in networks using the eigenvectors of matrices. Physical review E, 74(3):036104, 2006. [9] Mark EJ Newman. Modularity and community structure in networks. Proceedings of the national academy of sciences, 103(23):8577–8582, 2006. [10] Peter J Mucha, Thomas Richardson, Kevin Macon, Mason A Porter, and Jukka-Pekka Onnela. Community structure in time-dependent, multiscale, and multiplex networks. science, 328(5980):876–878, 2010. [11] Andrea Lancichinetti and Santo Fortunato. Limits of modularity maximization in community detection. Physical Rev. E, 84(6):066122, 2011. [12] Benjamin H Good, Yves-Alexandre de Montjoye, and Aaron Clauset. Performance of modularity maximization in practical contexts. Physical Rev. E, 81(4):046106, 2010. [13] Karrer-Brian Ball, Brian and Mark E.J. Newman. An efficient and principled method for detecting communities in networks. Physical Review E, 84:036103, 2011. [14] Tiago P Peixoto. Efficient monte carlo and greedy heuristic for the inference of stochastic block models. Physical Rev. E, 89(1):012804, 2014. [15] Tiago P Peixoto. Parsimonious module inference in large networks. Physical Rev. Letters, 110(14):148701, 2013. [16] Tiago P Peixoto. Entropy of stochastic blockmodel ensembles. Physical Rev. E, 85(5):056122, 2012. [17] Brian Karrer and Mark EJ Newman. Stochastic blockmodels and community structure in networks. Physical Rev. E, 83(1):016107, 2011. [18] Furong Huang, UN Niranjan, M Hakeem, and Animashree Anandkumar. Fast detection of overlapping communities via online tensor methods. arXiv preprint arXiv:1309.0787, 2013. [19] Edoardo M Airoldi, David M Blei, Stephen E Fienberg, and Eric P Xing. Mixed membership stochastic blockmodels. Journal of Machine Learning Research, 9(1981-2014):3, 2008. [20] Steven Thomas Smith, Edward K Kao, Kenneth D Senne, Garrett Bernstein, and Scott Philips. Bayesian discovery of threat networks. IEEE Transactions on Signal Processing, 62(20):5324– 5338, 2014. [21] Nesreen K Ahmed, Jennifer Neville, and Ramana Kompella. Network sampling: From static to streaming graphs. ACM Transactions on Knowledge Discovery from Data (TKDD), 8(2):7, 2014. [22] Tiago P Peixoto. Graph-tool repository. https://git.skewed.de/ count0/graph-tool/tree/master, 2014. [23] Albert-László Barabási. Scale-free networks: a decade and beyond. science, 325(5939):412–413, 2009. [24] William H Press, Saul A Teukolsky, William T Vetterling, and Brian P Flannery. Numerical recipes in C, volume 2. Cambridge Univ Press, 1982. [25] Alexander Terenin, Daniel Simpson, and David Draper. Asynchronous gibbs sampling. arXiv preprint arXiv:1509.08999, 2015. [26] Christopher De Sa, Kunle Olukotun, and Christopher Ré. Ensuring rapid mixing and low bias for asynchronous gibbs sampling. arXiv preprint arXiv:1602.07415, 2016. [27] Jeremy Kepner and John Gilbert. Graph algorithms in the language of linear algebra. SIAM, 2011. [28] Marina Meilă. Comparing clusterings – an information based distance. Journal of multivariate analysis, 98(5):873–895, 2007. [29] Harold W Kuhn. The hungarian method for the assignment problem. Naval research logistics quarterly, 2(1-2):83–97, 1955. [30] William M Rand. Objective criteria for the evaluation of clustering methods. Journal of the American Statistical Association, 66(336):846–850, 1971. [31] Lawrence Hubert and Phipps Arabie. Comparing partitions. Journal of classification, 2(1):193–218, 1985. [32] Arindam Banerjee, Chase Krumpelman, Joydeep Ghosh, Sugato Basu, and Raymond J Mooney. Model-based overlapping clustering. In Proceedings of the eleventh ACM SIGKDD international conference on Knowledge discovery in data mining, pages 532– 537. ACM, 2005. [33] Ryan S Holt, Peter A Mastromarino, Edward K Kao, and Michael B Hurley. Information theoretic approach for performance evaluation of multi-class assignment systems. In SPIE Defense, Security, and Sensing, pages 76970R–76970R. International Society for Optics and Photonics, 2010. [34] Brad Appleton. Source code line counter. http://www.bradapp. com/clearperl/sclc.html. [35] Al Danial. Count lines of code. https://github.com/AlDanial/cloc, 2017. A PPENDIX A: PARTITION A LGORITHM P SEUDOCODE Algorithm 1: Block Assignment Update At Each Node i ´ input : b´ i , bNi : current block labels for node i and its neighbors Ni ´ M : current B ˆ B inter-block edge count matrix AiNi , ANi i : edges between i and all its neighbors output: b` i : the new block assignment for node i // propose a block assignment obtain the current block assignment r “ b´ i draw a random edge of i which connects with a neighbor j, obtain its block assignment u “ b´ j draw a uniform random variable x1 „ Uniformp0, 1q if x1 ď d´B`B then u // with some probability, propose randomly for exploration propose b` i “ s by drawing s randomly from t1, 2, ..., Bu else // otherwise, propose by multinomial ´ ¯ draw from neighboring blocks to u M ´ `M ´ u u propose b` i “ s from MultinomialDraw d´ u end // accept or reject the proposals if s “ r then ´ return b` i “ bi // proposal is the same as the old assignment. done! else compute M ` under proposal (update only rows and cols r and s, on entries for blocks connected to i) compute proposal probabilities for the ” ı Hastings correction: ” ı ´ ´ ` ř ř Mts `Mst `1 M ` `Mrt `1 prÑs “ tPtb´ u Kit d´ `B and psÑr “ tPtb´ u Kit trd` `B Ni Ni t t compute change in log„posterior (t1ˆand t2 only ˙need to cover ˆ rows and cols ˙r and s): ř Mt´ t Mt` t ´ ` ` Mt1 t2 log d´ 1d´2 ∆S “ t1 ,t2 ´Mt1 t2 log d` 1d`2 ‚ ‚ t1 ,out t2 ,in compute probability of”acceptance: ı sÑr paccept “ min expp´β∆Sq pprÑs ,1 draw a uniform random variable x3 „ Uniformp0, 1q if x3 ď paccept then return b` // accept the proposal i “s else return b` // reject the proposal i “r end end t1 ,out t2 ,in A PPENDIX B: M ATRIX -BASED BATCH U PDATE P SEUDOCODE Algorithm 2: Batch Assignment Update for All Nodes input : Γ´ : current block assignment matrix for all nodes M ´ : current B ˆ B inter-block edge count matrix A: graph adjacency matrix output: Γ` : new block assignments for all nodes // propose new block assignments compute node degrees: k “ pA ` AT q1 ´ ´ ´ ´T compute block degrees: d´ 1 ; d´ “ d´ out “ M 1 ; din “ M out ` din compute probability for drawing each neighbor: PNbr “ RowDividepA ` AT , kq draw neighbors (Nbr is a binary selection matrix): Nbr “ MultinomialDrawpPrn q compute probability of uniform random proposal: pUnifProp “ Nbr Γ´Bd´ `B T compute probability of block transition: PBlkTran “ RowDividepM ´ ` M ´ , d´ q ´ compute probability of block transition proposal: PBlkProp “ Nbr Γ PBlkTran propose new assignments uniformly: ΓUnif “ UniformDrawpB, N q propose new assignments from neighborhood: ΓNbr “ MultinomialDrawpPBlkProp q draw N Uniformp0, 1q random variables x compute which proposal to use for each node: IUnifProp “ x ď pUnifProp select block assignment proposal for each node: ΓP “ RowMultiplypΓUnif , IUnifProp q ` RowMultiplypΓNbr , p1 ´ IUnifProp qq // accept or reject the proposals ` ´ T ´ compute change in edge counts by row and col: ∆M ` row “ AΓ ; ∆M col “ A Γ update edge count matrix for each proposal: (resulting matrix is N ˆ P ˆ P ): ` ` ` ` ´ ´ ´ P P M` ijk “ Mjk ´ Γij ∆M row,ik ` Γij ∆M row,ik ´ Γik ∆M col,ij ` Γik ∆M col,ij update block degrees for each proposal: (resulting is N ˆ P ): ř matrix ` ` ` ´ř P Dout,ij “ d´ ´ Γ ∆M ` Γ ∆M ij ij out,j row,ik row,ik k k ř ` ` ` ´ř P Din,ij “ d´ in,j ´ Γij k ∆M col,ik k ∆M col,ik ` Γij compute the ”proposal probabilities for Hastings correction (N ˆ 1 vectors): ı T prÑs “ ppNbr Γ´ q ˝ pΓP M ´ ` ΓP M ´ ` 1q ˝ RepMatp d´1`B , N q 1 ” ı `T 1 ´ psÑr,i “ ppNbr Γ´ q ˝ pΓ´ M` ` 1q ˝ D` `D 1 ` i ` Γ Mi out in `B compute change in log posterior (only need to operate on the impacted rows and columns corresponding to r, s, and the neighboring blocks ˙ ˙ ˆ „ ˆ to i): ` ´ ř Mjk Mijk ´ ` ∆S i “ jk ´Mijk log D` `D` ` Mjk log d´ `d´ ‚‚ out,ij ‚‚ in,ik out,j in,k compute probabilities ” of accepting the proposal (N ı ˆ 1 vector): 1 pAccept “ min expp´β∆Sq ˝ psÑr ˝ prÑs ,1 draw N Uniformp0, 1q random variable xAccept compute which proposals to accept: IAccept “ xAccept ď pAccept return Γ` “ RowMultiplypΓP , IAccept q ` RowMultiplypΓ´ , p1 ´ IAccept qq A PPENDIX C: L IST OF N OTATIONS updating node i Nbr : Matrix of N ˆ N elements where each row Nbr,i is a binary indicator vector with 1 only at j, indicating that j is selected when updating i pUnifProp : Vector of N elements representing the probability of uniform proposal when updating each node PBlkTran : Matrix of BˆB elements where each element PBlkTran,ij is the probability of landing in block j when randomly traversing an edge from block i PBlkProp : Matrix of N ˆ B elements where each element PBlkProp,ij is the probability of proposing block assignment j for node i ΓUnif : Block assignment matrix from uniform proposal across all blocks. It has N ˆB elements where each row ΓUnif,i is a binary indicator vector with 1 only at the block node i is assigned to ΓNbr : Block assignment matrix from neighborhood proposal. It has N ˆ B elements where each row ΓUnif,i is a binary indicator vector with 1 only at the block node i is assigned to IUnifProp : Binary vector of N elements with 1 at each node taking the uniform proposal and 0 at each node taking the neighborhood proposal IAccept : Binary vector of N elements with 1 at each node where the proposal is accepted and 0 where the proposal is rejected Uniformpx, yq: Uniform distribution with range from x to y δtk : Dirac delta function which equals 1 if t “ k and 0 otherwise. RowDividepA, bq: Matrix operator that divides each row of matrix A by the corresponding element in vector b RowMultiplypA, bq: Matrix operator that multiplies each row of matrix A by the corresponding element in vector b UniformDrawpB, N q: Uniformly choose an element from t1, 2, ..., Bu as the block assignment N times for each node, and return a N ˆ B matrix where each row i is a binary indicator vector with 1 only at j, indicating node i is assigned block j MutinomialDrawpPBlkProp q: For each row of the proposal probability matrix PBlkProp,i , draw an block according to the multinomial probability vector PBlkProp,i and return a N ˆ B matrix where each row i is a binary indicator vector with 1 only at j, indicating node i is assigned block j ‚ Below is a list of notations used in this document: N : Number of nodes in the graph B: Number of blocks in the partition A: Adjacency matrix of size N ˆ N , where Aij is the edge weight from node i to j k: Node degree vector of N elements, where ki is the total (i.e. both in and out) degree of node i K: Node degree matrix of N ˆ B elements, where kit is the total number of edges between node i and block t Ni : Neighborhood of node i, which is a set containing all the neighbors of i ´ : Superscript that denotes any variable from the previous MCMC iteration ` : Superscript that denotes any updated variable in the current MCMC iteration b: Block assignment vector of N elements where bi is the block assignment for node i Γ: Block assignment matrix of N ˆ B elements where each row Γi is a binary indicator vector with 1 only at the block node i is assigned to. ΓP is the proposed block assignment matrix. M : Inter-block edge count matrix of size B ˆB, where Mij is the number of edges from block i to j ` M : Updated inter-block edge count matrix for each proposal, of size N ˆ B ˆ B ∆M ` row{col : Row and column updates to the inter-block edge count matrix, for each proposal. This matrix is of size N ˆ B. din : In-degree vector of B elements, where din,i is the number of edges into block i dout : Out-degree count vector of B elements, where dout,i is the number of edges out of block i d: Total edge count vector of B elements, where di is the total number of edges into and out of block i. d “ din ` dout ` Din{out : In and out edge count matrix for each block, on each proposal. It is of size N ˆ B ∆S: The difference in log posterior between the previous block assignment and the new proposed assignment β: Learning rate of the MCMC prÑs : Probability of proposing block s on the node to be updated which currently is in block r pAccept : Probability of accepting the proposed block on the node PNbr : Matrix of N ˆ N elements where each element PN br,ij is the probability of selecting node j when ‚ ‚ ‚ ‚ ‚
8cs.DS
DOI: 10.1109/TPWRD.2017.2688356 Published in: IEEE Transactions on Power Delivery 1 Online Calibration of Phasor Measurement Unit Using Density-Based Spatial Clustering Xinan Wang, Student Member, IEEE, Di Shi, Senior Member, IEEE, Zhiwei Wang, Member, IEEE, Chunlei Xu, Qibing Zhang, Xiaohu Zhang, Member, IEEE, Zhe Yu, Member, IEEE Abstract—Data quality of Phasor Measurement Unit (PMU) is receiving increasing attention as it has been identified as one of the limiting factors that affect many wide-area measurement system (WAMS) based applications. In general, existing PMU calibration methods include offline testing and model based approaches. However, in practice, the effectiveness of both is limited due to the very strong assumptions employed. This paper presents a novel framework for online bias error detection and calibration of PMU measurement using density-based spatial clustering of applications with noise (DBSCAN) based on much relaxed assumptions. With a new problem formulation, the proposed data mining based methodology is applicable across a wide spectrum of practical conditions and one side-product of it is more accurate transmission line parameters for EMS database and protective relay settings. Case studies demonstrate the effectiveness of the proposed approach. Index Terms—PMU, data quality, data calibration, data mining, DBSCAN, transmission line parameter. I. INTRODUCTION P HASOR measurement unit (PMU) is envisioned to be one of the enabling technologies in smart grid, with the promise of massive installation in future power systems. On one hand, most synchrophasor-based applications, especially the mission critical ones, require the measurements to be very reliable and accurate. On the other, although PMU data are expected to be highly accurate, this potential accuracy and reliability are not always achieved in actual field installation due to various causes [1]. It has been observed under many occasions that PMU measurements can have various types of data quality issues. To ensure accurate, reliable and consistent PMU data, there are pressing needs to calibrate PMU to fulfill the claimed performance. As discussed in [2], the PMU device itself is typically very accurate, but the instrumental channel, where a PMU gets its inputs, is usually much less accurate. In particular, the instrumentation channel (e.g., potential and current transformers) can introduce magnitude and phase angle errors that are magnitudes of orders higher than the typical PMU accuracy. A practically useful calibration method should be capable of handling inaccuracies originated from both sources. This work is funded by SGCC Science and Technology Program under contract no. 5455HJ160007. X. Wang, D. Shi, Z. Wang, X. Zhang, and Y. Zhe are with GEIRI North America, 5451 Great America Parkway, Ste. 125, Santa Clara, CA 95054. (Email: [email protected]). C. Xu and Q. Zhang are with State Grid Jiangsu Electric Power Company, 215 Shanghai Road, Gulou, Nanjing, 210024, China. Previously the Performance and Standards Task Team (PSTT) published a PMU system testing and calibration guide [3]. As discussed and widely accepted in the 2016 NASPI Work Group meeting, PMU data quality efforts need to be implemented to ensure the highest synchrophasor signal quality for applications. The modified IEEE C37.118 standard requires the total vector error (TVE) between a measured phasor and its true value to be well within 1% under steady-state operating conditions [4]. Towards these requirements, many PMU calibration schemes have been proposed. In general, these methods can be divided into two categories based on how they are implemented: offline testing/calibration [5]-[11] and modelbased approaches [12]-[16]. The former works by comparing PMU output against standard testing signal(s), using certain types of specialized equipment or systems whose accuracies are at least one level greater than the to-be-tested PMUs. This type of methods requires specialized equipment/system, and due to their offline nature, errors originated from the instrumentation channel cannot be duplicated and compensated. The latter works by fitting PMU measurements into a mathematical model for fidelity check, assuming parameters of the system/device(s) and the model are known a priori and accurate. In [12], the authors present a phasor-data-based state estimator (PSE) that is capable of identifying and correcting bias error(s) in phase angles. This approach assumes the phasor magnitudes and network parameters are both accurate. Paper [13] proposes the idea of a “super calibrator” for substationlevel data filtering and state estimation, the input of which includes PMU data, SCADA data, and a detailed 3-phase model of the substation, etc. Despite complexity of the model, the accuracy level of SCADA data adds uncertainty, or even degrades performance of the approach. Paper [1] proposes a calibration-factor-based iterative non-linear solution approach for 3-phase PMU data calibration. Performance of the approach is highly dependent upon accuracy of the 3-phase transmission line parameters in the EMS database. The PMU data calibration approach in [14] again assumes the TL impedances are known to be exact. Papers [15] and [16] attempt to accomplish line parameter estimation and PMU calibration simultaneously, with the assumption that one of the two PMUs generates perfect measurements, which, in practice, is really difficult to tell. The strong assumptions used in existing model-based methods undermine their practicability. This paper presents a novel data mining based synchrophasor measurement calibration framework which detects and corrects DOI: 10.1109/TPWRD.2017.2688356 Published in: IEEE Transactions on Power Delivery the overall systematic or bias error(s) introduced by both PMU and its instrumentation channel. Major contribution of the proposed method lies in that it does not require accurate prior knowledge of the system mathematical model/parameters. Furthermore, one byproduct of the proposed method is more accurate impedance parameters of the transmission line for EMS database and protective relay settings. By relaxing those strong assumptions employed in existing model based approaches, the proposed method advances the practicability of online PMU calibration. The remainder of this paper is organized as follows. Section II describes the problem and related mathematical models. Section III presents the proposed framework. Case studies are presented in section IV while conclusion and future work are discussed in section V. B. Notations and Models Fig. 1 shows a measured voltage phasor 𝑉̅ , its corresponding true phasor value 𝑉̅𝑡𝑟𝑢𝑒 , and the associated bias errors in magnitude 𝜕𝑉 and phase angle 𝜕𝜃. The following relationship is derived: 𝑉̅ = 𝑉 ∙ 𝑒 𝑗𝜃𝑉 (1) 𝑉̅𝑡𝑟𝑢𝑒 = (𝑉 + 𝜕𝑉) ∙ 𝑒 𝑗(𝜃𝑉 +𝜕𝜃) (2) where V and 𝜃𝑉 are the magnitude and phase angle of phasor 𝑉̅ , respectively. Im. II. PROBLEM DESCRIPTION AND FORMULATION TABLE I MAXIMUM BIAS ERRORS INTRODUCED BY DIFFERENT PORTIONS OF THE PMU MEASUREMENT CHAIN IN A 230-KV SYSTEM [2] Voltage Phasor Current Phasor Magnitude (%) Phasor Angle (degree) Magnitude (%) Phasor Angle (degree) 0.6 1.04 1.2 0.52 PT/CT 100 ft 400 ft 100 ft 400 ft 100 ft 400 ft 100 ft 400 ft 0.115 0.411 0.066 0.066 Cabling 0.009 PMU Total 0.009 0.1 0.709 0.02 0.709 1.175 1.471 0.03 0.1 1.366 0.09  0.57 0.63 V v Re. Fig. 1. Bias error in PMU measurement A PI model as shown in Fig. 2 is considered in this work as the model for a general transmission line. It could either be a nominal PI model if the line is short or an equivalent PI if the line is longer [28]. In Fig. 2, 𝑉𝑠 and 𝐼𝑠 represent the positive sequence voltage and current phasors measured at sending end of the line while 𝑉𝑟 and 𝐼𝑟 are the corresponding phasors collected from receiving end. Variables 𝑍 and 𝑌 represent series impedance and shunt admittance of the PI model. IS Ir Z VS Y/2 Y/2 Vr Fig. 2.Transmission line nominal/equivalent PI model The following equations are derived from nodal analysis: 𝑌 𝑌 (3) 𝐼𝑠 − 𝑉𝑠 ∙ + 𝐼𝑟 − 𝑉𝑟 ∙ = 0 2 2 𝑌 (4) 𝑉𝑠 − 𝑍 ∙ (𝐼𝑠 − 𝑉𝑠 ∙ ) − 𝑉𝑟 = 0 2 and 𝑍 = 𝑅 + 𝑗𝑋 (5) 𝑌 = 𝐺 + 𝑗𝐵𝑐 (6) where G and 𝐵𝑐 are line shunt conductance and susceptance. Combing equations (3)-(4) to solve for Y and Z yields: 2 0.02 1.366 V Vtrue A. Bias Error in PMU Measurements Generally speaking, errors in synchrophasor measurements can originate from three possible sources as discussed in [19]: transducers, synchronization, and phasor estimation algorithm. Impacts of these three sources can be summarized into two categories: random error and bias (systematic) error. Random error, as its name suggests, is random in either direction in its nature and difficult to predict. Random error can be circumvented from measurements via statistical means. Extensive studies have been conducted in reducing random error or its influences to PMU measurements, with satisfactory results observed: unbiased linear least squares (LS) is used in [21]; non-linear LS algorithms are used in [22]-[23]; total LS is introduced in [24]; other optimization procedures are discussed in [25] and [26]. Systematic or bias error is reproducible inaccuracy that is consistent in the same direction. Bias error is much harder to estimate and remove. Authors of [2] have examined the maximum bias errors introduced by different portions of the measurement chain. Table I summarizes the maximum bias error for a typical 230-kV system. For example, with a 400-ft instrumentation cable, the maximum bias errors in the magnitude and phase angle of the voltage phasor are 0.709% and 1.471 degree, respectively. These bias errors are no longer negligible and a systematic approach needs to be developed to identify and remove them, which is the scope of this paper. Source of Error 2 𝑍= 𝑉𝑠 − 𝑉𝑟 2 𝐼𝑠 ∙ 𝑉𝑟 − 𝐼𝑟 ∙ 𝑉𝑠 (7) DOI: 10.1109/TPWRD.2017.2688356 Published in: IEEE Transactions on Power Delivery 𝑌 =2∙ 𝐼𝑠 + 𝐼𝑟 (8) 𝑉𝑠 + 𝑉𝑟 Substituting each phasor in (7)-(8) with its magnitude and phase angle according to (1) and setting phase angle of Ir, 𝜃𝐼𝑟 , as the reference, the following equations can be derived: ′ ′ 𝑖2𝜃 𝑉𝑠 2 𝑒 𝑉𝑠 𝑖2𝜃 𝑉𝑟 2 𝑒 𝑉𝑟 − 𝑅 = 𝑟𝑒𝑎𝑙( ) ′ ′ ′ 𝑖(𝜃𝐼 +𝜃𝑉 ) 𝑖𝜃𝑉 𝐼𝑠 ∙ 𝑉𝑟 𝑒 𝑠 𝑟 − 𝐼𝑟 ∙ 𝑉𝑠 𝑒 𝑠 ′ 𝑉𝑠 2 𝑒 𝑖2𝜃𝑉𝑠 𝑋 = 𝑖𝑚𝑎𝑔( 𝐼𝑠 ∙ 𝑉𝑟 𝑒 ′ 𝑉𝑟 2 𝑒 𝑖2𝜃𝑉𝑟 − 𝑖(𝜃 ′ +𝜃 ′ ) 𝐼𝑠 𝑉𝑟 ′ − 𝐼𝑟 ∙ 𝑉𝑠 𝑒 𝑖𝜃𝑉𝑠 (9) ) (10) ′ 𝐵𝑐 = 𝑖𝑚𝑎𝑔(2 ∙ 𝐼𝑠 𝑒 𝑖𝜃𝐼𝑠 + 𝐼𝑟 ′ ′ 𝑉𝑠 𝑒 𝑖𝜃𝑉𝑠 + 𝑉𝑟 𝑒 𝑖𝜃𝑉𝑟 ) (11) where 𝜃𝑉′𝑠 = 𝜃𝑉𝑠 − 𝜃𝐼𝑟 , 𝜃𝑉′𝑟 = 𝜃𝑉𝑟 − 𝜃𝐼𝑟 , and 𝜃𝐼′𝑠 = 𝜃𝐼𝑠 − 𝜃𝐼𝑟 . Shunt conductance of a transmission line, G, is usually very small and therefore neglected from the PI model. III. PROPOSED SOLUTION A. Least Square Estimator (LSE) To investigate the sensitivity of line parameters to bias errors in PMU measurements, partial derivatives need to be taken for (9)-(11), all of which are complex equations. For the derivatives to be valid, they must obey the Cauchy-Riemann equations [27]. The compliance checking/procedure is not discussed here due to space consideration, but the validation has been completed. The following equations have been derived: ∂𝑅 = 𝐴𝑅 ∙ ∂𝑉𝑠 + 𝐵𝑅 ∙ ∂𝑉𝑟 + 𝐶𝑅 ∙ 𝜕𝐼𝑠 + 𝐷𝑅 ∙ 𝜕𝐼𝑟 + 𝐸𝑅 (12) ∙ ∂𝜃′𝑉𝑠 + 𝐹𝑅 ∙ ∂𝜃′𝑉𝑟 + 𝐺𝑅 ∙ ∂𝜃′𝐼𝑠 ∂𝑋 = 𝐴𝑋 ∙ ∂𝑉𝑠 + 𝐵𝑋 ∙ ∂𝑉𝑟 + 𝐶𝑋 ∙ 𝜕𝐼𝑠 + 𝐷𝑋 ∙ 𝜕𝐼𝑟 + 𝐸𝑋 (13) ∙ ∂𝜃′𝑉𝑠 + 𝐹𝑋 ∙ ∂𝜃′𝑉𝑟 + 𝐺𝑋 ∙ ∂𝜃′𝐼𝑠 ∂𝐵𝑐 = 𝐴𝐵 ∙ ∂𝑉𝑠 + 𝐵𝐵 ∙ ∂𝑉𝑟 + 𝐶𝐵 ∙ 𝜕𝐼𝑠 + 𝐷𝐵 ∙ 𝜕𝐼𝑟 + 𝐸𝐵 (14) ∙ ∂𝜃′𝑉𝑠 + 𝐹𝑋 ∙ ∂𝜃′𝑉𝑟 + 𝐺𝑋 ∙ ∂𝜃′𝐼𝑠 where coefficients Ax~Gx are all partial derivatives. Taking R as an example, these coefficients are: 𝐴𝑅 = 𝜕𝑅 𝜕𝐼𝑠 , 𝐷𝑅 = 𝜕𝑅 𝜕𝐼𝑟 , 𝐸𝑅 = 𝜕𝑅 ′ ∂𝜃𝑉 𝑠 , 𝐹𝑅 = 𝜕𝑅 ′ ∂𝜃𝑉 𝑟 𝜕𝑅 𝜕𝑉𝑠 , 𝐵𝑅 = , and 𝐺𝑅 = 𝜕𝑅 ∂𝜃𝐼′𝑠 𝜕𝑅 𝜕𝑉𝑟 , 𝐶𝑅 = . For space consideration, detailed information of these partial derivatives is discussed in Appendix I. Put equations (12)-(14) into matrix form to obtain: 𝐴𝑅 ∂𝑅 [ ∂𝑋 ] = [ 𝐴𝑋 ∂𝐵𝑐 𝐴𝐵 𝐵𝑅 𝐶𝑅 𝐵𝑋 𝐶𝑋 𝐵𝐵 𝐶𝐵 𝐷𝑅 𝐸𝑅 𝐷𝑋 𝐸𝑋 𝐷𝐵 𝐸𝐵 𝐹𝑅 𝐹𝑋 𝐹𝐵 ∂𝑉𝑠 ∂𝑉𝑟 𝜕𝐼𝑠 𝐺𝑅 𝐺𝑋 ] ∙ 𝜕𝐼𝑟 ∂𝜃𝑉′𝑠 𝐺𝐵 ∂𝜃𝑉′𝑟 ′ [ ∂𝜃𝐼𝑠 ] (15) It should be noted that coefficients Ax~Gx vary with the loading (current), as can be seen from the expression of, for example, 𝐶𝑅 + 𝑖𝐶𝑋 = 𝜕𝑍 ∂𝐼𝑠 3 = 𝑉𝑟 𝑒 𝑖(𝜃′𝑉 +𝜃′𝐼 ) 𝑖2𝜃′𝑉 𝑖2𝜃′𝑉 𝑟 𝑠 ∙(𝑉𝑟 2 𝑒 𝑟 −𝑉𝑠 2 𝑒 𝑠) 2 𝑖𝜃′𝑉 𝑖(𝜃′𝑉 +𝜃′𝐼 ) 𝑠 −𝐼𝑠 𝑉𝑟 𝑒 𝑟 𝑠 ) (𝐼𝑟𝑉𝑠 𝑒 . Assuming N sets of PMU measurements under different load conditions are collected, the following matrix can be written: 𝐴𝑅1 𝐴𝑋1 𝐴𝐵1 𝐴𝑅2 𝐴𝑋2 𝐻= 𝐴𝐵2 ⋮ 𝐴𝑅𝑁 𝐴𝑋𝑁 [𝐴𝐵𝑁 𝐵𝑅1 𝐵𝑋1 𝐵𝐵1 𝐵𝑅2 𝐵𝑋2 𝐵𝐵2 ⋮ 𝐵𝑅𝑁 𝐵𝑋𝑁 𝐵𝐵𝑁 𝐶𝑅1 𝐷𝑅1 𝐶𝑋1 𝐷𝑋1 𝐶𝐵1 𝐷𝐵1 𝐶𝑅2 𝐷𝑅2 𝐶𝑋2 𝐷𝑋2 𝐶𝐵2 𝐷𝐵2 ⋮ ⋮ 𝐶𝑅𝑁 𝐷𝑅𝑁 𝐶𝑋𝑁 𝐷𝑋𝑁 𝐶𝐵𝑁 𝐷𝐵𝑁 𝐸𝑅1 𝐸𝑋1 𝐸𝐵1 𝐸𝑅2 𝐸𝑋2 𝐸𝐵2 ⋮ 𝐸𝑅𝑁 𝐸𝑋𝑁 𝐸𝐵𝑁 𝐹𝑅1 𝐹𝑋1 𝐹𝐵1 𝐹𝑅2 𝐹𝑋2 𝐹𝐵2 ⋮ 𝐹𝑅𝑁 𝐹𝑋𝑁 𝐹𝐵𝑁 𝐺𝑅1 𝐺𝑋1 𝐺𝐵1 𝐺𝑅2 𝐺𝑋2 𝐺𝐵2 ⋮ 𝐺𝑅𝑁 𝐺𝑋𝑁 𝐺𝐵𝑁 ] (16) ∂𝑅1 ∂𝑋1 ∂𝑉𝑠 ∂𝐵𝑐1 ∂𝑉𝑟 ∂𝑅2 𝜕𝐼𝑠 ∂𝑋2 (17)-(18) 𝐹 = 𝜕𝐼𝑟 , 𝐸 = ′ ∂𝐵 𝑐2 ∂𝜃𝑉𝑠 ⋮ ∂𝜃𝑉′𝑟 ∂𝑅𝑛 ′ [ ∂𝜃𝐼𝑠 ] ∂𝑋𝑛 [∂𝐵𝑐𝑛 ] If an accurate set of line impedance parameters is known a priori, the bias error in the PMU measurements can be easily estimated using the standard least square estimator, as: 𝐹 = (𝐻𝑇 𝐻)−1 𝐻𝑇 𝐸 (19) Seven unknowns appear in F and therefore the rank of H matrix has to be no less than seven which requires 3×𝑁 ≥ 7 or 𝑁 ≥ 3, (𝑁 ∈ 𝑁 ∗ ). Vector E is comprised of the difference between the true line impedance values and the calculated ones using (9)-(11). With the assumption that accurate line impedances are known, here are the steps for evaluating the bias errors in PMU measurements: -Step 1: calculate line impedance parameters R, X, and B according to (9)-(11); -Step 2: evaluate vector E by comparing the calculated line impedances (from step1) to their corresponding references obtained from the EMS database: REMS, XEMS, and BEMS; -Step 3: evaluate matrix H with the partial derivatives calculated from PMU measurements: 𝑉𝑠 , 𝑉𝑟 , 𝐼𝑠 , and 𝐼𝑟 ; -Step 4: solve for vector 𝐹 based on (19). The aforementioned least square estimator is able to identify bias errors in PMU measurements assuming the line’s actual impedances, as the references, are known a priori. In practice, these parameters are read off from EMS database and were originally calculated based on tower geometries, conductor dimensions, estimates of line length, and conductor sags, etc. They only approximate the effects of conductor sags and ignore the dependence of impedance parameters on temperature and loading conditions [17]-[18]. Therefore, the challenge is that only approximates of line impedances are known and without DOI: 10.1109/TPWRD.2017.2688356 Published in: IEEE Transactions on Power Delivery knowing their true values the calculated bias errors might be far from being accurate. In the following section, this paper shows how this challenge can be addressed by using data mining technology like Density-based Spatial Clustering. B. Sensitivity Analysis This subsection conducts sensitivity analysis and investigates influence of errors in referenced line impedances on bias error estimation in PMU measurements. A simulated transmission line with specifications shown in Appendix II is used for this study. Errors are added to all three line impedance references, one at a time, and the least square estimator described in section II. C is employed to evaluate F. As an example, results of the sensitivity analysis for line reactance X are shown in Fig. 3-Fig. 4. 4 references are exactly known a priori, all bias error can be accurately estimated. TABLE II RESULTS FOR SENSITIVITY ANALYSIS 𝝏𝑹 𝝏𝑿 𝝏𝑩𝒄 Error (%) -10 -5 0 -10 -5 0 -10 -5 0 𝝏𝑰𝒔 𝝏𝑰𝒓 𝛛𝜽′𝑽𝒔 𝛛𝜽′𝑽𝒓 0.051 0.072 0.152 0.005 0.005 0.001 0.025 0.025 0.036 0.075 0.003 0.003 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.200 0.200 0.283 0.658 0.163 0.162 0.010 0.101 0.101 0.142 0.329 0.082 0.081 0.005 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.061 0.061 0.162 0.360 0.090 0.080 0.010 0.030 0.030 0.081 0.181 0.045 0.040 0.005 0.000 0.000 0.000 0.000 0.000 0.000 0.000 𝛛𝑽𝒔 𝛛𝑽𝒓 0.051 p.u. 𝛛𝜽′𝑰𝒔 rad However, in practice, line impedance references cannot be known exactly, as discussed in II. D. To address this challenge, a data mining approach based on DBSCAN is proposed to address the uncertainties in TL impedance references. Fig. 3.Sensitivity analysis-estimated bias error in phase angle vs. line reactance C. DBSCAN Basics Density-based spatial clustering of applications with noise (DBSCAN) is an unsupervised data mining technique which is able to classify data points of any dimension into core points, reachable points and outliers [20]. A core point p contains at least minPts points (including p) within the designated searching distance ε. A reachable point q exists if there exists a path p1, p2,..., q, so that all points on the path, except q, are core points. Points that are not reachable from any other point are outliers. Core points and reachable points can form a cluster while outliers are excluded from such cluster. Fig. 5 shows an example for DBSCAN with minPts=4. Note that setting minPts to 3 will generate the same clustering result. ε p1 p2 p4 p3 p5 q Fig. 4.Sensitivity analysis-estimated bias error in magnitude vs. line reactance Fig. 5. Schematic diagram of DBSCAN with minPts=4 From Fig. 3-Fig. 4, it can be observed that the influence of error in XEMS on bias error estimation is linear. A 10% error in 𝑋𝐸𝑀𝑆 will result in: 0.16 rad error in ∂𝜃𝑉′𝑠 and ∂𝜃𝑉′𝑟 ; 0.01 rad error in ∂𝜃𝐼′ ; 0.66 pu error in 𝜕𝐼𝑟 ; 0.28 pu error in 𝜕𝐼𝑠 ; 0.20 pu 𝑠 error in both ∂𝑉𝑠 and ∂𝑉𝑟 . Bias error estimation in 𝜃𝐼′𝑠 is not really affected by error in XEMS while its corresponding magnitude is affected the most among all bias errors. Results of the sensitivity analysis are summarized in Table II. A few observations can be made based on Table II, 1) PMU measurement bias error(s) estimation is generally sensitive to error(s) in line impedance references; 2) impact of reference errors to bias error estimation is linear; 3) if line impedance As shown in Fig. 5, core points are in red, each of which has at least 4 points with distance less than ε. The yellow ones (reachable points) are reachable from the red ones but do not have the required minimum number of points nearby within the distance of ε. The blue one is not reachable from any other point and therefore is an outlier. The red and yellow points form a cluster with the blue one excluded. D. PMU Calibration Using DBSCAN Although EMS references can be significantly wrong, our experience shows that the error bands are generally well within 20%. Therefore, we may define 𝛼 as the error band multiplier for impedance references obtained from the EMS database DOI: 10.1109/TPWRD.2017.2688356 Published in: IEEE Transactions on Power Delivery (REMS, XEMS, and BEMS). The following constraints can be considered: (1 − 𝛼)𝑅𝐸𝑀𝑆 ≤ 𝑅 ≤ (1 + 𝛼)𝑅𝐸𝑀𝑆 { (1 − 𝛼)𝑋𝐸𝑀𝑆 ≤ 𝑋 ≤ (1 + 𝛼)𝑋𝐸𝑀𝑆 (1 − 𝛼)𝐵𝐸𝑀𝑆 ≤ 𝐵𝑐 ≤ (1 + 𝛼)𝐵𝐸𝑀𝑆 (20) The corresponding feasibility region can be visualized as the cube shown in Fig. 6. 5 𝐹 ′ = (𝐻 𝑇 𝐻)−1 𝐻𝑇 𝐸 ′ Fig. 7 shows an exemplary DBSCAN result for one data set (one column in F’). Point zero is pre-defined as one of the core point and the cluster search always starts from zero. The minimum number requirement minPts is set to be 3. In this particular example, the clustering results indicates that a total of 6 points are either core or reachable points while two points are identified to be outliers (the ones with 𝜕𝐼𝑠 and 𝜕𝜃𝐼′ ). 𝑠 Fig. 7. An example of bias error identification using DBSCAN The pseudo-code for the proposed DBSCAN based PMU calibration is presented below. algorithm DBSCAN_based_PMU_calibration is input: PMU phasor measurements, Nodes (R, X, Bc) in the cube. The basic idea of the proposed approach is to 1) scan every output: PMU bias errors point within feasible region (a total of M points); 2) evaluate the matrix(H) ←PMU measurements corresponding bias errors in the PMU measurements; 3) form matrix(E’) ←Matrix(Nodes(R, X, Bc) - EMS(R, X, Bc)) sets of points with each set containing seven 4-dimentional data //(LSE: Least Square Estimator) points, and each data point has the form of (∂𝑅, ∂𝑋, ∂𝐵𝑐 , 𝑥), matrix(F’) ←LSE(H, E’) where x is one of the bias errors in PMU measurements (a total vector(CCP)← //CCP: count cluster point of M sets). 4) apply DBSCAN to cluster all the M data sets to find out the one with least number of outliers (maximum minPts← 3 number of core and reachable points) and minimum searching for each column in matrix(F’) do distance. Once this cluster is identified, the actual bias errors in // i← row index for matrix (F’), (1≤i≤ 7) all PMU channels and errors in line impedance references can // j← column index for matrix (F’) be determined accordingly. residual(i, j)← |𝐹′(𝑖, 𝑗)| (1≤i≤ 7) To minimize the computation, equation (19) is extended to if residual(i,j) is within the boundary 𝛼 (21). As compared to vector E and F in (19), matrix E’(3N-by𝐶(𝑖, 𝑗) ← 𝐹′(𝑖, 𝑗) M) and F’(7-by-M) are the extended version which relates CCP(j)++ multiple bias error sets to multiple sets of the error in referenced Endforeach impedances. Fig. 7 shows a simple illustrative example of the DBSCAN algorithm for bias error identification. for each column in matrix(C) do 𝑀 // i← row index for matrix (F’), (1≤i≤ 7) 𝜕𝑅1 𝜕𝑅12 𝜕𝑅11 𝜕𝑋1𝑀 𝜕𝑋12 𝜕𝑋11 // j← column index for matrix (C) 𝑀 1 2 𝜕𝐵𝑐1 𝜕𝐵𝑐1 𝜕𝐵𝑐1 𝜕𝑉𝑠1 𝜕𝑉𝑠2 𝜕𝑉𝑠𝑀 distance(i, i ±1 ) ← |𝐶(𝑖, 𝑗) − 𝐶(𝑖 ± 1, 𝑗)| . //find the 𝜕𝑅2𝑀 𝜕𝑅22 𝜕𝑅21 𝜕𝑉𝑟1 𝜕𝑉𝑟2 𝜕𝑉𝑟𝑀 𝑀 distance from each cluster point to its neighbor cluster point 𝜕𝑋21 𝜕𝑋22 ⋯ 𝜕𝑋2 𝜕𝐼𝑠1 𝜕𝐼𝑠2 ⋯ 𝜕𝐼𝑠𝑀 𝑀 1 2 ⋯ 𝜕𝐵𝑐2 𝜕𝐵𝑐2 𝜕𝐼𝑟1 𝜕𝐼𝑟2 ⋯ 𝜕𝐼𝑟𝑀 = (𝐻 𝑇 𝐻)−1 𝐻𝑇 𝜕𝐵𝑐2 eps(j)= (maximum(|distance|), 𝑚𝑖𝑛𝑃𝑡𝑠) // eps(j) is the : : : ⋯ 𝜕𝜃𝑉𝑠′1 𝜕𝜃𝑉𝑠′2 ⋯𝜕𝜃𝑉𝑠′𝑀 (21) : cluster searching distance for jth column : : 𝜕𝜃𝑉𝑟′1 𝜕𝜃𝑉𝑟′2 𝜕𝜃𝑉𝑟′𝑀 : : : Endforeach 𝜕𝑅𝑁𝑀 [ 𝜕𝜃𝐼𝑠′1 𝜕𝜃𝐼𝑠′2 𝜕𝜃𝐼𝑠′𝑀 ] 𝜕𝑅𝑁1 𝜕𝑅𝑁2 k← column in F’ with maximum CPP and minimum eps 𝜕𝑋𝑁𝑀 𝜕𝑋𝑁1 𝜕𝑋𝑁2 𝑀 1 2 𝜕𝐵𝑐𝑁 [𝜕𝐵𝑐𝑁 𝜕𝐵𝑐𝑁 ] output Fig. 6. Feasible region for transmission line (TL) impedances Or DOI: 10.1109/TPWRD.2017.2688356 Published in: IEEE Transactions on Power Delivery A flowchart of the proposed data mining based PMU data calibration approach is shown in Fig. 8. 6 references and PMU measurements can be evaluated accordingly. IV. EXPERIMENTAL VALIDATION Four case studies are presented in this section to demonstrate the procedure and effectiveness of the proposed PMU data calibration framework. A testing system with parameters shown in Table VIII has been set up in Matlab/Simulink for these experiments. A. Case I: The ideal case-no error in impedance references Objective of the first case study is to validate performance of the proposed method when no error exists in the TL impedance references. Basically, different sets of combinations of bias errors have been added to the PMU measurements and the proposed approach is used to identify them. The results for six representative cases are summarized in Table III, in which both the true bias errors and the calculated ones are presented and compared. The agreement between true bias errors and calculated ones validates the proposed approach under the ideal condition with no error in the referenced impedances. TABLE III BIAS ERROR IDENTIFICATION UNDER THE IDEAL CONDITION True Calculated True Calculated True Calculated -3 p.u. or rad (×10 ) Fig. 8. Flow chart of proposed PMU data calibration approach As shown in the sensitivity analysis of section III, impacts of EMS reference errors to the calculation of bias error in each PMU measurement are given. In the ideal case when there is no error in the EMS reference and no bias error in the PMU measurements, by using DBSCAN, all the seven curves in the 4-dimensional space (∂𝑅, ∂𝑋, ∂𝐵𝑐 , 𝑥), where x is one of the bias errors in PMU measurements, intersect at a single point (0, 0, 0, 0). When there are errors either in the EMS references or in the PMU measurements, according to the proposed approach, coordinates of this intersection corresponds to the error(s) in the EMS reference, while the outlier(s) identified correspondingly are the bias errors in PMU measurements. The aforementioned discussion is for the situation without noise. When noise exists in PMU measurements, the seven curves typically will not intercept exactly at a single point but instead will stay very close to each other around one particular zone/region, which may be referred to as the “zero region”. By looking at the searching distance and number of outliers, the “zero region” can be identified and therefore the errors in EMS 𝝏𝑽𝒔 𝝏𝑽𝒓 𝝏𝑰𝒔 𝝏𝑰𝒓 𝝏𝜽′𝑽𝒔 𝝏𝜽′𝑽𝒓 𝝏𝜽′𝑰𝒔 0 0 10 0 0 1.75 0 0.0334 0.0335 10.0591 0.1480 0.0067 1.7601 -0.0001 10 10 0 0 1.75 0 0 9.9634 9.9613 -0.2240 -0.5332 1.7836 0.0603 -0.0070 10 10 10 0 0 1.7 05 10.0395 10.0402 10.0177 -0.2318 0.0185 1.7536 -0.0070 𝝏𝑽𝒔 𝝏𝑽𝒓 𝝏𝑰𝒔 𝝏𝑰𝒓 𝝏𝜽′𝑽𝒔 𝝏𝜽′𝑽𝒓 𝝏𝜽′𝑰𝒔 10 10 10 0 0 1.75 1.75 10.0161 10.0154 9.9647 -0.3783 0.0579 1.7937 1.7663 10 10 10 10 0 1.75 1.75 10.0891 10.0894 10.0591 9.9659 0.0138 1.7522 1.7698 10 10 10 10 1.7 1.7 5 1.7 5 10.0033 10.0034 9.9328 9.6749 1.7731 1.7757 1.7676 5 B. Case II: One referenced impedance has error The second case study considers error in one of the referenced impedances. Towards this goal, errors are added to each of the referenced impedances, one at a time, and different combinations of bias errors are considered for PMU measurements. For space consideration, only the result for a representative case is presented below. And in this particular case, a -2% error is considered for the series resistance, REMS, and 0.01 p.u. bias error is added to magnitude of the sendingend current phasor. A 20% error band is considered for the referenced impedances with 𝛼 being set to 20%. The proposed approach scans all 4-dimensional data points collected from matrix F’, and for visualization purpose, only the relationship between bias errors and errors in R is plotted as shown in Fig. 9. The dashed line marks the outcome of DBSCAN and the Xaxis gives the corresponding error in REMS. To help illustrate the DOI: 10.1109/TPWRD.2017.2688356 Published in: IEEE Transactions on Power Delivery DBSCAN process, Fig. 10 visualizes the corresponding DBSCAN clustering results, in terms of size of the cluster and searching distance. Final results are summarized in Table IV. 7 p.u. and 0.00175 rad are added to Vs and θVr, respectively. A 20% error band is considered for the referenced impedances with 𝛼 being set to 20%. To help illustrate the DBSCAN process, Fig. 11 visualizes the clustering results, in terms of size of the cluster and searching distance. Both errors in the referenced impedances and the bias errors in PMU measurements are successfully identified. Final results are summarized in Table V. Fig. 9. Relationships between identified bias errors and error in REMS Fig. 11. DBSCAN clustering results for case III TABLE V TEST RESULTS FOR CASE III True Calculated p.u. or rad (×10-3) Fig. 10. Results of DBSCAN for case II TABLE IV TEST RESULTS FOR CASE II True Calculated -3 p.u. or rad (×10 ) 𝝏𝑽𝒔 0 0.0230 𝝏𝑽𝒓 0 0.0345 𝝏𝑰𝒔 10 10.0328 𝝏𝑰𝒓 0 -0.0175 𝝏𝜽′𝑽𝒔 0 0.0224 𝝏𝜽′𝑽𝒓 0 0.0130 𝝏𝜽′𝑰𝒔 0 -0.0149 Calculated Error in R (%) X (%) BC (%) -2.02 0.01 -0.01 𝝏𝑽𝒔 10 10.0612 𝝏𝑽𝒓 0 0.0334 𝝏𝑰𝒔 0 0.0316 𝝏𝑰𝒓 0 0.1591 𝝏𝜽′𝑽𝒔 0 0.0036 𝝏𝜽′𝑽𝒓 1.75 1.7617 𝝏𝜽′𝑰𝒔 0 0.0047 X (%) BC (%) −4.2 −5.8 0.02 D. Case IV: All referenced impedance values have errors In the fourth case study, a set of -2%, -5%, 2% errors are considered for REMS, XEMS, and BEMS, respectively; bias errors of 0.01 p.u. and 0.00175 rad are added to Vs and θVr, respectively. A 20% error band is considered for the referenced impedances with 𝛼 being set to 20%. Experimental results shown in Table VI demonstrate again the effectiveness of the proposed method when all referenced impedance values have errors. One key value of the proposed approach lies in its capability of PMU calibration without knowing an accurate system model. TABLE VI TEST RESULTS FOR CASE IV According to Table IV, the proposed approach successfully identifies not only bias error in PMU measurements but also error in the referenced TL series resistance. C. Case III: Two referenced impedances have errors In the third case study, -4% error and -6% error are considered for REMS and XEMS, respectively; bias errors of 0.01 Calculated Error in R (%) True Calculated p.u. or rad (×10-3) 𝝏𝑽𝒔 10 10.0143 𝝏𝑽𝒓 0 0.0054 Calculated Error in R (%) X (%) BC (%) −2.1 -5.2 2.2 DOI: 10.1109/TPWRD.2017.2688356 Published in: IEEE Transactions on Power Delivery E. 𝝏𝑰𝒔 0 -0.0375 𝝏𝑰𝒓 0 -0.0846 𝝏𝜽′𝑽𝒔 1.75 1.7967 𝝏𝜽′𝑽𝒓 0 -0.0437 𝝏𝜽′𝑰𝒔 0 -0.0091 8 TABLE VII TEST RESULTS FOR CASE V Calculated Calculated Error in -3 p.u. or rad (×10 ) Case V: Experiment using real PMU data In the fifth case study, PMU data are collected for a 500-kV transmission line in Jiangsu Electricity Power Grid with the name of “Huadong-Tianhui Line #5621”. PMU data reporting rate is 25 samples per second. Using these real PMU data, the proposed approach is applied to identify both errors from EMS database and bias errors in the measured phasors. As discussed above, cluster size and searching distance, ε, are used as the criteria for DBSCAN. Part of the spatial clustering results are visualized in fig. 12, which shows the relationship between errors in the reference values of R, X, and Bc, and the cluster size. As shown in fig. 12, the top three points with the largest cluster size are A1~A3, of which A2 has the smallest searching distance. The final results are summarized in Table VII. The results show, 1) TL impedance parameters, R, X and Bc in the EMS database have errors of -14%, 5.4% and 12.6% respectively; 2) no significant bias error in the voltage phasors collected from the real PMU is identified; 3) bias errors of 0.0171 pu and 0.0164 pu are identified in the magnitudes of sending-end and receiving-end current phasors, respectively; 4) no significant bias error is identified in the phase angles of the two current phasors. 𝝏𝑽𝒔 -0.0032 𝝏𝑽𝒓 -0.0033 𝝏𝑰𝒔 0.0171 𝝏𝑰𝒓 0.0164 𝝏𝜽′𝑽𝒔 0.0003 𝝏𝜽′𝑽𝒓 0.0027 𝝏𝜽′𝑰𝒔 -5.6238e-5 R (%) X (%) BC (%) -14.0 6.4 12.6 Computation time of the proposed approach is dependent upon the number of data points to scan within the feasibility region. In one experiment, a total of 1 million points (worst case scenario) are processed using a Matlab program, and the solution process takes roughly 29 seconds (recoding the program using C++ will greatly speed up the solution process). Fortunately, PMU data calibration does not need to be conducted very often, and once a week or longer will work for most cases. Structure of the proposed algorithm is suitable for parallel processing, which will further speed up the solution process. V. CONCLUSION This paper presents a novel approach for online calibration of PMU by using density-based spatial clustering. As compared to existing methods, the proposed one has two major merits: 1) it identifies the overall bias errors introduced by both PMU and its instrumentation channel; 2) it does not require accurate system model/parameters. Therefore, it is applicable across a wide spectrum of practical conditions. In addition, one by- A3:   0.00042 A2:   0.00014 A1:   0.00060 Fig. 12. Experiment result with real PMU data (errors in R, X, and Bc vs. cluster size) DOI: 10.1109/TPWRD.2017.2688356 Published in: IEEE Transactions on Power Delivery TABLE VIII SPECIFICATIONS OF THE SIMULATED TRANSMISSION LINE product of the proposed approach is more accurate TL impedance estimates for improved system modeling, more accurate protective relay settings, and other related applications. Future work includes: 1) extending the proposed framework to system level to achieve simultaneous calibration of multiple PMUs; 2) decomposing the spatial clustering process so that state-of-the-art parallel computing techniques can be employed to speed up the computation. APPENDIX I Partial derivatives of impedance to the PMU measurements are presented as follows: 𝜕𝑍 2𝑉𝑠 𝑒 2𝑖𝜃′𝑉𝑠 =− 𝑖𝜃′ ∂𝑉𝑠 𝐼𝑟 𝑉𝑠 𝑒 𝑉𝑠 − 𝐼𝑠 𝑉𝑟 𝑒 𝑖(𝜃′𝑉𝑟+𝜃′𝐼𝑠 ) − (22) 𝐼𝑟 𝑒 𝑖𝜃′𝑉𝑠 (𝑉𝑟 2 𝑒 2𝑖𝜃′𝑉𝑟 − 𝑉𝑠 2 𝑒 2𝑖𝜃′𝑉𝑠 ) (𝐼𝑟 𝑉𝑠 𝑒 𝑖𝜃′𝑉𝑠 − 𝐼𝑠 𝑉𝑟 𝑒 𝑖(𝜃′𝑉𝑟 +𝜃′𝐼𝑠 ) )2 𝜕𝑍 𝑉𝑟 𝑒 𝑖(𝜃′𝑉𝑟 +𝜃′𝐼𝑠 ) (𝑉𝑟 2 𝑒 2𝑖𝜃′𝑉𝑟 − 𝑉𝑠 2 𝑒 2𝑖𝜃′𝑉𝑠 ) = (𝐼𝑟 𝑉𝑠 𝑒 𝑖𝜃′𝑉𝑠 − 𝐼𝑠 𝑉𝑟 𝑒 𝑖(𝜃′𝑉𝑟 +𝜃′𝐼𝑠 ) )2 ∂𝐼𝑠 (24) 𝜕𝑍 𝑉𝑠 𝑒 𝑖𝜃′𝑉𝑠 (𝑉𝑟 2 𝑒 2𝑖𝜃′𝑉𝑟 − 𝑉𝑠 2 𝑒 2𝑖𝜃′𝑉𝑠 ) =− (𝐼𝑟 𝑉𝑠 𝑒 𝑖𝜃′𝑉𝑠 − 𝐼𝑠 𝑉𝑟 𝑒 𝑖(𝜃′𝑉𝑟 +𝜃′𝐼𝑠 ) )2 ∂𝐼𝑟 𝜕𝑍 2𝑖𝑉𝑟 2 𝑒 2𝑖θ′𝑉𝑟 = ∂𝜃𝑉𝑟 ′ 𝐼𝑟 𝑉𝑠 𝑒 𝑖𝜃′𝑉𝑠 − 𝐼𝑠 𝑉𝑟 𝑒 𝑖(𝜃′𝑉𝑟 +𝜃′𝐼𝑠 ) 𝑖𝑚𝑎𝑔( 𝑟𝑒𝑎𝑙 ( 𝜕𝑉𝑟 𝜕𝑍 𝑖𝐼𝑠 𝑉𝑟 𝑒 𝑖(𝜃′𝑉𝑟 +𝜃′𝐼𝑠 ) (𝑉𝑟 2 𝑒 2𝑖θ′𝑉𝑟 − 𝑉𝑠 2 𝑒 2𝑖𝜃′𝑉𝑠 ) (𝐼𝑟 𝑉𝑠 𝑒 𝑖𝜃′𝑉𝑠 − 𝐼𝑠 𝑉𝑟 𝑒 𝑖(𝜃′𝑉𝑟 +𝜃′𝐼𝑠 ) )2 𝜕𝑍 𝜕𝑉𝑠 𝜕𝑍 (28) ) , 𝐵𝑅 = 𝑟𝑒𝑎𝑙( 𝜕𝑍 𝜕𝑅 𝜕𝑉𝑟 ) , 𝐵𝑋 = ) , 𝐶𝑅 = 𝑟𝑒𝑎𝑙( ) , 𝐶𝑋 = 𝑖𝑚𝑎𝑔 ( ) , 𝐷𝑅 = ∂𝐼𝑠 𝜕𝑍 ∂𝐼𝑟 𝜕𝑍 𝑖𝑚𝑎𝑔 ( 𝑟𝑒𝑎𝑙( ) , 𝐴𝑋 = 𝑖𝑚𝑎𝑔( ) , 𝐷𝑋 = 𝑖𝑚𝑎𝑔 ( ∂𝜃′𝑉𝑠 𝜕𝑍 ∂𝜃𝐼𝑠 ′ ) , 𝐹𝑅 = 𝑟𝑒𝑎𝑙( ), 𝐺𝑋 = 𝑖𝑚𝑎𝑔( ) , 𝐸𝑅 = 𝑟𝑒𝑎𝑙( ∂𝐼𝑟 𝜕𝑍 ∂θ′𝑉𝑟 𝜕𝑍 ∂𝜃𝐼𝑠 ′ line resistance, 𝛺/𝑘𝑚 0.013333 Lline line inductances, H/𝑘𝑚 7.4342e-4 Cline line capacitances, 𝐹/𝑘𝑚 1.0001e-8 D length of line, km 150 fsource source frequency, Hz 60 Voltage level kV 500 North American SynchroPhasor Initiative Performance & Standards Task Team, “Synchrophasor Measurement Accuracy Characterization,” November 2007. [3] North American SynchronPhasor Initiatibe (NASPI), Performance and Standards Task Team (PSTT), “PMU System Testing and Calibration Guide”, Nov. 5, 2007. [4] IEEE Standard for Synchrophasor Measurements for Power Systems, IEEE Std C37. 118. 1TM-2011. [5] P. Komarnicki, C. Dzienis, Z. A. Styczynski, J. Blumschein, and V. Centeno, “Practical Experience with PMU System Testing and Calibration Requirements,” IEEE PES General Meeting, 2008. [6] K. Narendra, Z. Zhang, J. Lane, B. Lackey and E. Khan, “Calibration and Testing of TESLA Phasor Measurement Unit (PMU) Using Double F6150 Test Instrument,” Bulk Power System Dynamics and Control – VII. Revitalizing Operational Reliability, 2007 iREP Symposium, pp. 1-13, Aug. 2007. [7] G. Stenbakken and T. Nelson, “Static Calibration and Dynamic Characterization of PMUs at NIST,” IEEE PES General Meeting, pp. 14, June 2007. [8] G. Stenbakken and M. Zhou, “Dynamic Phasor Measurement Unit Test System,” IEEE PES General Meeting, pp. 1-8, June 2007. [9] G. Stenbakken, T. Nelson, M. Zhou and V. Centeno, “Reference Values for Dynamic Calibration of PMUs,” Proceedings of the 41st Hawaii International Conference on System Sciences, pp. 1-6, Jan. 2008. (27) 𝜕𝑍 𝑖𝐼𝑠 𝑉𝑟 𝑒 𝑖(𝜃′𝑉𝑟 +𝜃′𝐼𝑠 ) (𝑉𝑟 2 𝑒 2𝑖𝜃′𝑉𝑟 − 𝑉𝑠 2 𝑒 2𝑖𝜃′𝑉𝑠 ) = (𝐼𝑟 𝑉𝑠 𝑒 𝑖𝜃′𝑉𝑠 − 𝐼𝑠 𝑉𝑟 𝑒 𝑖(𝜃′𝑉𝑟 +𝜃′𝐼𝑠 ) )2 ∂𝜃𝐼𝑠 ′ 𝜕𝑉𝑠 Rline [2] (26) 𝑖𝐼𝑟 𝑉𝑠 𝑒 𝑖𝜃′𝑉𝑠 (𝑉𝑟 2 𝑒 2𝑖𝜃′𝑉𝑟 − 𝑉𝑠 2 𝑒 2𝑖𝜃′𝑉𝑠 ) − (𝐼𝑟 𝑉𝑠 𝑒 𝑖𝜃′𝑉𝑠 − 𝐼𝑠 𝑉𝑟 𝑒 𝑖(𝜃′𝑉𝑟 +𝜃′𝐼𝑠 ) )2 𝜕𝑅 Value D. Shi, D. J. Tylavsky, and N. Logic, “An Adaptive Method for Detection and Correction of Errors in PMU Measurements,” IEEE Trans. Smart Grid, vol. 3, no. 4, Dec. 2012. (25) 𝜕𝑍 2𝑖𝑉𝑠 2 𝑒 2𝑖𝜃′𝑉𝑠 =− 𝑖𝜃′ ∂𝜃𝑉𝑠 ′ 𝐼𝑟 𝑉𝑠 𝑒 𝑉𝑠 − 𝐼𝑠 𝑉𝑟 𝑒 𝑖(𝜃′𝑉𝑟 +𝜃′𝐼𝑠 ) 𝐴𝑅 = 𝑟𝑒𝑎𝑙( Description, Unit [1] (23) 𝐼𝑠 𝑒 𝑖(𝜃′𝑉𝑟+𝜃′𝐼𝑠 )(𝑉𝑟 2 𝑒 2𝑖𝜃′𝑉𝑟 − 𝑉𝑠 2 𝑒 2𝑖𝜃′𝑉𝑠 ) + (𝐼𝑟 𝑉𝑠 𝑒 𝑖𝜃′𝑉𝑠 − 𝐼𝑠 𝑉𝑟 𝑒 𝑖(𝜃′𝑉𝑟+𝜃′𝐼𝑠 ) )2 𝜕𝑍 Variables REFERENCES 𝜕𝑍 2𝑉𝑟 𝑒 2𝑖𝜃′𝑉𝑟 = ∂𝑉𝑟 𝐼𝑟 𝑉𝑠 𝑒 𝑖𝜃′𝑉𝑠 − 𝐼𝑠 𝑉𝑟 𝑒 𝑖(𝜃′𝑉𝑟+𝜃′𝐼𝑠 ) − 9 ∂𝐼𝑠 𝜕𝑍 ) , 𝐸𝑋 = ∂𝜃′𝑉𝑠 𝜕𝑍 ) , 𝐹𝑋 = 𝑖𝑚𝑎𝑔 ( ∂θ′𝑉𝑟 ) , 𝐺𝑅 = ). By the same means, the partial derivative equations of Y to each PMU components can be generated and 𝐴𝐵 , 𝐵𝐵 ⋯ 𝐺𝐵 can be calculated accordingly. Due to the space limitation, they are not presented here. APPENDIX II A transmission line with two PMUs installed at both terminals is simulated in this study using Matlab/Simulink with specifications shown in Table VIII. [10] Y. Hu and D. Novosel, “Progresses in PMU Testing and Calibration,” in Proc. 3rd Int. Con. on Electric Utility Deregulation and Restructuring and Power Technologies, Nanjing, pp. 150 – 155, 2008. [11] R. Pirret, “Testing and Calibration of Phasor Measurement Units,” Technical note, Fluke Calibration, 2013. [12] L. Vanfretti, J. H. Chow, S. Sarawgi, and B. Fardanesh, “A Phasor-databased State Estimator Incorporating Phase Bias Correction,” IEEE Trans. Power Syst., vol. 26, pp. 111-119, Feb. 2011. [13] A. P. S. Meliopoulos, G. J. Cokkinides, F. Galvan, and B. Fardanesh, “GPS-Synchronized Data Acquisition: Technology Assessment and Research Issues,” Proceedings of the 39th Annual Hawaii International Conference on System Science, Hawaii, Jan. 4-7, 2006. [14] Q. Zhang, V. Vittal, G. Heydt, etc., “The Integrated Calibration of Synchronized Phasor Measurement Data in Power Transmission Systems,” IEEE Trans. Power Devliery, vol. 26, no. 4, pp.2573-2581, 2011. [15] Z. Wu, L. Zora, and A. G. Phadke, “Simultaneous Transmission Line Parameter and PMU Measurement Calibration,” IEEE PES General Meeting, 2015. [16] D. Ritzmann, P. S. Wright, W. Holderbaum, etc., “A Method for Accurate Transmission Line Impedance Parameter Estimation,” IEEE Trans. Instru. and Meas., vol. 65, no. 10, Oct. 2016. [17] D. Shi, Utilizing Synchrophasor Technology to Determine Transmission Line Impedance Parameters, Arizona State University, 2009. DOI: 10.1109/TPWRD.2017.2688356 Published in: IEEE Transactions on Power Delivery [18] H. Zhou, X. Zhao, D. Shi, etc., “Calculating Sequence Impedances of Transmission Line Using PMU Measurements,” 2015 IEEE Power & Energy Society General Meeting, 2015. [19] P. Castello, M. Lixia, C. Muscas, and P. A. Pegoraro., “Impact of the Model on the Accuracy of Synchrophasor Measurement,” IEEE Trans. Instr. and Meass, vol. 61, no. 8, pp. 2179–2188, Aug 2012. [20] M. Ester, H. P. Kriegel, J. Sander, and X. Xu, “A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise,” Kdd., vol. 96, no. 34, 1996. [21] D. Shi, D. J. Tylavsky, K. Koellner, etc., “Transmission Line Parameters Identification Using PMU Measurements,” Eur. Trans. Elect. Power, vol. 21, no. 4, pp. 1574-1588, 2011. [22] C. S. Indulkar and K. Ramalingam, “Estimation of Transmission Line Parameters from Measurements,” Int. J. Elect. Power Energy Syst., vol. 30, no. 5, pp. 337-342, Jun. 2008. 10 Qibing Zhang received the B.S. degree in electrical engineering from Zhejiang University, Zhejiang, China, in 2007, and the M.S. degree in electrical engineering from Shanghai Jiao Tong University, Shanghai, China, in 2010. His research interests include power system operation and control and relay protection. Xiaohu Zhang (S’12) received the B.S. degree in electrical engineering from Huazhong University of Science and Technology, Wuhan, China, in 2009, the M.S. degree in electrical engineering from Royal Institute of Technology, Stockholm, Sweden, in 2011, and the Ph.D. degree in electrical engineering at The University of Tennessee, Knoxville, in 2017. [23] C. Borda, A. Olarte, and H. Diaz, “PMU-based Line and Transformer Parameter Estimation,” in Proc. IEEE/PES Power Syst. Conf. Expo., Mar. 2009, pp. 1-8. Currently, he works as a power system engineer at GEIRI North America, Santa Clara, CA, USA. His research interests are power system operation, planning and stability analysis. [24] K. Dasgupta and S. A. Soman, “Line Parameter Estimation Using Phasor Measurements by the Total Least Squares Approach,” in Proc. IEEE Power Energy Soc. General Meeting, pp. 1-5, Jul. 2013. Zhe Yu received his B.E. degree from Department of Electrical Engineering, Tsinghua University, Beijing, China in 2009, M.S. degree from Department of Electrical and Computer Engineering, Carnegie Mellon University, Pittsburgh, PA, USA in 2010, and Ph.D. from the School of Electrical and Computer Engineering, Cornell University, Ithaca, NY, USA in 2016. He joined Globe Energy Internet Research Institute North America in 2017. His current research interests focus on the power system and smart grid, demand response, dynamic programming, and optimization. [25] L. Philippot and J. C. Maun, “An Application of Synchronous Phasor Measurement to the Estimation of the Parameters of an Overhead Transmission Line,” in Proc. Conf. Fault Disturbance Anal. Precise Meas. Power Syst., Arlington, VA, pp. 1–5, Nov. 1995. [26] A. M. Dán and D. Raisz, “Estimation of Transmission Line Parameters Using Wide-area Measurement Method,” in Proc. IEEE Trondheim PowerTech, pp. 1–6, Jun. 2011. [27] Cauchy-Riemann Equations. [Online]. Available at: http://en.wikipedia.org/wiki/Cauchy%E2%80%93Riemann_equations. [28] J. Zaborszky and J. W. Rittenhouse, Electric Power Transmission: The Power System in the Steady State. New York, NY, USA: Ronald, 1954. Xinan Wang (S’15) received the B.S. degree in electrical engineering from Northwestern Polytechnical University, Xi’an, China, in 2013, and the M.S. degree in electrical engineering from Arizona State University, Tempe, AZ, USA, in 2016. He currently works as a research assistant in the Advanced Power System Analytics Group at GEIRI North America. His research interests include WAMS and grid integration of renewables. Di Shi (M’12, SM’17) received the Ph.D. degree in electrical engineering from Arizona State University, Tempe, AZ, USA, in 2012. He currently leads the Advanced Power System Analytics Group at GEIRI North America, Santa Clara, CA, USA. He has published over 50 journal and conference papers and hold 13 US patents/patent applications. Zhiwei Wang received the B.S. and M.S. degrees in electrical engineering from Southeast University, Nanjing, China, in 1988 and 1991, respectively. He is President of GEIRI North America, Santa Clara, CA, USA. His research interests include power system operation and control, relay protection, power system planning, and WAMS. Chunlei Xu received the B.S. degree in electrical engineering from Shanghai Jiao Tong University, Shanghai, China, in 1999. He currently leads the Dispatching Automation department at Jiangsu Electrical Power Company in China. His research interests include power system operation and control and WAMS.
3cs.SY
Hybrid Gradient Boosting Trees and Neural Networks for Forecasting Operating Room Data arXiv:1801.07384v2 [cs.LG] 24 Jan 2018 Hugh Chen University of Washington {hughchen}@uw.edu Scott Lundberg University of Washington {slund1}@cs.washington.edu Su-In Lee University of Washington {suinlee}@cs.washington.edu Abstract Time series data constitutes a distinct and growing problem in machine learning. As the corpus of time series data grows larger, deep models that simultaneously learn features and classify with these features can be intractable or suboptimal. In this paper, we present feature learning via long short term memory (LSTM) networks and prediction via gradient boosting trees (XGB). Focusing on the consequential setting of electronic health record data, we predict the occurrence of hypoxemia five minutes into the future based on past features. We make two observations: 1) long short term memory networks are effective at capturing long term dependencies based on a single feature and 2) gradient boosting trees are capable of tractably combining a large number of features including static features like height and weight. With these observations in mind, we generate features by performing "supervised" representation learning with LSTM networks. Augmenting the original XGB model with these features gives significantly better performance than either individual method. 1 Background In hospitals, data is constantly recorded – often in the form of physiological signals such as blood oxygen, heart rate, blood pressure and more. In this paper, we address the problem of hypoxemia (low arterial blood oxygen) within operating rooms; one of the common yet potentially serious concerns that anesthesiologists deal with while safeguarding patients. In particular, one recent study found that hypoxemic events occur every 29 surgery hours on average for two hospitals’ operating rooms [1]. These events can cause serious patient harm during general anesthesia and surgery and are correlated with cardiac arrest, cardiac arryhythmias, decreased cognitive function, and more [2, 3]. In order to assist anesthesiologists, Lundberg et. al. (2017) developed a method for hypoxemia prediction on operating room data with the aim of interpretability [4]. They compared parzen windows, linear SVM, linear lasso, and gradient boosting trees. They found that gradient boosting trees with pre-processed features was the most performant method for hypoxemia predictions. In their evaluation of their machine learning technique, they found that their method made more accurate hypoxemia predictions than five practicing anesthesiologists. Lundberg et. al. showed that gradient boosting trees are very powerful methods for prediction (particularly for encoding interactions), but the preprocessed time series features used – exponential moving averages/variances – can be improved. Representation learning would take advantage of the recurrence/memory that neural networks can encode, and pass latent representations into a gradient boosting tree to further improve on doctor performance. In general, representation learning has already achieved great success in 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. speech recognition, signal processing, object recognition, and natural language processing [5]. It is well suited to time series biomedical data because inherent/latent structure is a reasonable assumption in physiological data. We explore this approach and present a framework for forecasting biomedical time series data. 2 Methods Long short term memory networks Long short term memory networks are a sophisticated way to explicitly retain memory [6]. In comparison to the autoregressive methods used in the previous exploration of hypoxemia (Lundberg et. al.), recurrent neural networks like LSTM networks are capable of capturing more complex dependencies. We train these networks in Python using Keras, an open source neural network library, with a Tensorflow backend [7, 8]. We utilize 72 CPUs (Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz) to train our networks and our tree models. In terms of the design, the networks in this paper simply utilize two layers, because adding too many layers made convergence difficult for our application. We found that important steps in training LSTM networks for operating room data are to impute missing values by the training mean, standardize data, and to randomize sample ordering (for time series in particular) prior to training. To prevent overfitting, we utilized dropouts between layers as well as recurrent dropouts for the LSTM nodes [9]. Using a learning rate of 0.001, rmsprop for an optimizer, and a sigmoid output layer gave us the best final results. The LSTM models were run until their validation accuracy did not improve for twenty rounds. To the best of our knowledge this is one of the first applications of RNNs within an operating room setting, and we are unaware of any others. RNNs have been applied in other health settings: Lipton et al., (2015) applied LSTM networks in a clinical setting, Che et al. applied GRUs for imputation in clinical and synthetic data sets (2016) [10, 11]. Chauhan and Vig (2015) and Rajpurkar et. al. (2017) have done work that focused on univariate applications of neural networks in health settings [12, 13]. Gradient Boosting Trees Gradient boosting trees work well in practice due to their ease of use and flexibility. Imputing, standardizing, and randomizing are all unnecessary because gradient boosting trees are based on splits in the training data. We postulate that gradient boosting trees are better at incorporating important static features in predictions than LSTM networks and saw very good performance with simple methods of processing time series features (exponential moving averages/variances). We found that a learning rate of 0.02, a max tree depth of 6, subsampling rate of 0.5, and a logistic objective gave us good performance. All XGB models were run until their validation accuracy was non-improving for five rounds. We train these models in Python using xgboost, an open source library for gradient boosting trees [14]. Methodology 1. 2. 3. 4. 5. 3 Run XGB using processed times series data (EMA/EMV) and raw static data. Identify the most important features. Run supervised learning with univariate LSTM networks on these features. Use second to last LSTM layer to create features for XGB. Retrain XGB model with additional hidden features for the final model. Experimental Results Data 57,000 surgeries containing real-time features sampled minute by minute such as SaO2 (blood oxygen), ETCO2 (exhaled carbon dioxide), etc. as well as static summary information such as height, weight, ASA codes, etc. obtained under appropriate Institutional Review Board (IRB) approval. After splitting surgeries into multiple time points, there are ≈ 8, 000, 000 samples with ≈ 120, 000 positive examples. These labels represent a time series binary hypoxemia classification problem where SaO2 less than 92% is considered hypoxemia. Evaluation Metric Area under the precision-recall (PR) curve is our evaluation metric. PR curves are widely used for binary classification tasks to summarize the predictive accuracy of a model. Rather than ROC curves, PR curves are better suited to classification problems with imbalanced labels. True positives (T P ) are positive sample points that are classified as positive whereas true negatives (T N ) are negative sample points that are classified as negative. Then, false positives (F P ) 2 are negative sample points that are classified as positive whereas false negatives (F N ) are positive tp tp sample points that are classified as negative. Precision is defined as tp+f p and recall is tp+f n . The PR curve is plotted with precision (y-axis) for each value of recall (x-axis). In order to summarize this curve, it is conventional to use area under the curve (AUC) to measure prediction performance. Performance We demonstrate that long short term memory networks outperform autoregressive methods. Figure 1: Univariate models trained on SaO2 only (the feature that determines hypoxemia) with different lookbacks. All methods attempt to predict whether there will be desaturation in the next five minutes. Figure 1 reveals two things. First, we see that on a univariate signal, LSTM networks substantially outperform autoregressive methods – even performant ones like gradient boosting trees. Second, we see that LSTM networks improve in performance even after the autoregressive methods saturate in terms of accuracy. Utilizing lookbacks of 60 rather than 30 markedly improves LSTM network performance – suggesting that they successfully identify complex long term patterns relevant to prediction. Moving forward, the LSTM networks use lookbacks of 60 minutes to predict desaturation. Model 1 2 Table 1: LSTM network Performance on Hypoxemia Test PR-AUC Train Time LSTM network (200x200) on raw (SaO2) LSTM network (400x400) on raw (40 features) 0.23183 0.23315 ≈ 43.00 hours ≈ 62.67 hours PR-AUC on the test set. We also evaluate the time required to train the neural network. Here (200x200) denotes that there were two layers each with 200 LSTM nodes. The raw (SaO2) denotes the input to the LSTM network. Although multivariate LSTM networks to predict hypoxemia appear promising, they take a substantial amount of time to train. Despite having twice as many nodes, Table 1 Model 2 (a multivariate LSTM network with 40 features) only gives a slight improvement over Table 1 Model 1 (a univariate LSTM network with SaO2). Based on training the gradient boosting model, we suspect that static features contain more information relevant to prediction than the multivariate LSTM networks are capable of utilizing (Figure 2 justifies the importance of static features). Additionally, the cost of training the LSTM network is already increasing drastically with the model size. In order to successfully capture all relationships in a complete multivariate network, the network size would need to increase to an intractably large size. Preliminary results with a GeForce GTX 1050 GPU were approximately three times faster, but a multivariate network would likely still be intractable. Then, Table 2 shows that XGB utilizing only processed SaO2 (Table 2 Model 1) does not immediately do well. Yet when XGB has access to all 40 processed features (Table 2 Model 2) PR-AUC increases drastically – from 0.20580 to 0.22999. This result suggests that gradient boosting trees are able to leverage the 39 remaining features to improve predictive accuracy in a way that LSTM networks alone could not. In figure 2, SaO2 dominates the top 10 most important features for hypoxemia prediction, but static features like weight and age are also of importance. Training models to effectively utilize 3 Figure 2: Feature attribution for Table 2 Model 2. Table 2: XGB Performance on Hypoxemia 1 2 3 4 5 6 7 Model Test PR-AUC XGB on processed (SaO2 only) XGB on processed (40 features) XGB on LSTM hidden (200 features) XGB on processed (40 features) + LSTM output (1 feature) XGB on processed (40 features) + LSTM hidden (200 features) XGB on processed - no SaO2 (39 features) + LSTM output (1 feature) XGB on processed - no SaO2 (39 features) + LSTM hidden (200 features) 0.20580 0.22999 0.23354 0.24714 0.24836 0.24251 0.24678 PR-AUC on the test set. We don’t report the time to train the gradient boosting trees because the training times were fairly short – with the slowest model taking approximately 4 hours to train. Processed denotes three exponential moving averages (EMA) with α = 5.0, 1.0, and 0.1 as well as an exponential moving variance (EMV) with α = 5.0 for all time series features. LSTM output denotes using the probability for hypoxemia output by the final sigmoid layer as an input to XGB. LSTM hidden denotes using the outputs from the penultimate LSTM layer as inputs to XGB. The LSTM output/hidden features are generating using Model 1 from Table 1. these additional features did not appear tractable with LSTM networks (Table 1), thus motivating our exploration of a hybrid approach. Then, in Model 3 of Table 2 XGB utilizing LSTM latent representations gives slightly better performance than the LSTM network alone, suggesting that gradient boosting trees are able to capture the non-linearity in the final layer of the LSTM network. Next, Model 4 shows that augmenting XGB with a supervised latent representation of SaO2 from our LSTM network gives substantially better performance than either individual model. Since gradient boosting trees work well on hidden features alone (Model 3), we combine them in Model 5 with the processed features, which yields the most performant model for hypoxemia prediction. Because we included the EMAs/EMV in Models 4 and 5, how much of the predictive performance is due to the EMAs/EMV and how much is due to the hidden LSTM features is still an open question. In Models 6 and 7 the hidden features are revealed to be much more informative than the single predictive probability, suggesting that the hidden features not only serve as fairly powerful surrogates for the EMAs/EMV, but that they also capture additional information that EMAs/EMV features do not. This suggests that supervised representation learning is capable of finding sensible representations. If these representations can be learned for many tasks and data sets, machine learning research scientists may be able to work additively on impactful questions in health. Through representation learning, motifs in time series data can be conveyed between research groups with access to different data sets in anonymous yet meaningful ways – protecting patient privacy. At a high level, this hybrid approach is very simplistic. Yet this simplicity offers two nice properties, the first being generalizability – our hybrid approach to machine learning can easily be applied to any problem that would benefit from more sophisticated time series processing. The second property being accessibility – using the open source packages available, these two methodologies can easily be combined in very performative ways for biomedical data. Accessibility ideally encourages a 4 trend towards representation learning as a means to make additive progress (collaboration rather than competition) on biomedical prediction tasks. References [1] Jesse M. Ehrenfeld, L. M. Funk, Schalkwyk J. Van, A. F. Merry, W. S. Sandberg, and A. Gawande. The incidence of hypoxemia during surgery: evidence from two institutions. Canadian Journal of Anesthesia, 57(10):888–897, 2010. [2] C. M. Dunham, A. E. Hutchinson B. M. Hileman, E. A. Chance, and G. S. Huang. Perioperative hypoxemia is common with horizontal positioning during general anesthesia and is associated with major adverse outcomes: a retrospective study of consecutive patients. BMC Anesthesiol., 14:43, 2014. [3] L. Strachan and D. W. Noble. Hypoxia and surgical patients–prevention and treatment of an unnecessary cause of morbidity and mortality. J. R. Coll. Surg. Edinb., 46:297–302, 2001. [4] Scott M Lundberg, Bala Nair, Monica S Vavilala, Mayumi Horibe, Michael J Eisses, Trevor Adams, David E Liston, Daniel King-Wai Low, Shu-Fang Newman, Jerry Kim, and Su-In Lee. Explainable machine learning predictions to help anesthesiologists prevent hypoxemia during surgery. bioRxiv, 2017. [5] Yoshua Bengio, Aaron C. Courville, and Pascal Vincent. Unsupervised feature learning and deep learning: A review and new perspectives. CoRR, abs/1206.5538, 2012. [6] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural Comput., 9(8):1735– 1780, November 1997. [7] François Chollet. keras. https://github.com/fchollet/keras, 2015. [8] Martín Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Gregory S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian J. Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Józefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mané, Rajat Monga, Sherry Moore, Derek Gordon Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul A. Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda B. Viégas, Oriol Vinyals, Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. CoRR, abs/1603.04467, 2016. [9] Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. J. Mach. Learn. Res., 15(1):1929–1958, January 2014. [10] Zhengping Che, Sanjay Purushotham, Kyunghyun Cho, David Sontag, and Yan Liu. Recurrent neural networks for multivariate time series with missing values. CoRR, abs/1606.01865, 2016. [11] Zachary Chase Lipton, David C. Kale, Charles Elkan, and Randall C. Wetzel. Learning to diagnose with LSTM recurrent neural networks. CoRR, abs/1511.03677, 2015. [12] S. Chauhan and L. Vig. Anomaly detection in ecg timesignals via deep long short-term memory networks. In Proc. IEEE International Conference on Data Science and Advanced Analytics (DSAA), 2015. 36678 2015, pages 1–7, October 2015. [13] Pranav Rajpurkar, Awni Y. Hannun, Masoumeh Haghpanahi, Codie Bourn, and Andrew Y. Ng. Cardiologist-level arrhythmia detection with convolutional neural networks. CoRR, abs/1707.01836, 2017. [14] Tianqi Chen and Carlos Guestrin. Xgboost: A scalable tree boosting system. In Proceedings of the 22Nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’16, pages 785–794, New York, NY, USA, 2016. ACM. 5
2cs.AI
Finite nilpotent groups coincide with their 2-closures arXiv:1611.01634v1 [math.GR] 5 Nov 2016 in all of their faithful permutation representations Alireza Abdollahi∗a,b and Majid Arezoomand†a a Department of Mathematics, University of Isfahan, Isfahan 81746-73441, Iran b School of Mathematics, Institute for Research in Fundamental Sciences (IPM), P. O. Box 19395-5746, Tehran, Iran Abstract. Let G be any group and G be a subgroup of Sym(Ω) for some set Ω. The 2-closure of G on Ω, denoted by G(2),Ω , is by definition, {θ ∈ Sym(Ω) | ∀α, β ∈ Ω, ∃g ∈ G, αθ = αg , β θ = β g }. The group G is called 2-closed on Ω if G = G(2),Ω . We say that a group G is a 2-closed group if H = H (2),Ω for any set Ω such that G ∼ = H ≤ Sym(Ω). Here we show that the center of any finite 2-closed group is cyclic and a finite nilpotent group is 2-closed if and only if it is cyclic or a direct product of a generalized quaternion group with a cyclic group of odd order. Keywords: Nilpotent group, Permutation group, 2-Closure. 1 Introduction and results Let Ω be a set and G be a group with G ≤ Sym(Ω). Then G acts naturally on Ω × Ω by (α1 , α2 )g = (α1g , α2g ), where g ∈ G and α1 , α2 ∈ Ω. The 2-closure of G on Ω, denoted by ∗ † E-mail: [email protected] Email: [email protected] 1 G(2),Ω , is {θ ∈ Sym(Ω) | ∀α, β ∈ Ω, ∃g ∈ G, αθ = αg , β θ = β g }. G(2),Ω contains G and is the largest subgroup of Sym(Ω) whose orbits on Ω × Ω are the same orbits of G [13, Definition 5.3 and Theorem 5.4]. The notion of 2-closure as a tool in the study of permutation groups was introduced by I. Schur [13]. The study of 2-closures of permutation groups has been initiated by Wielandt [13] in 1969, to present a unified treatment of finite and infinite permutation groups, based on invariant relations and invariant functions. For further studies and applications see [3, 4, 5, 7, 8, 9, 10, 11, 12]. Since G ≤ G(2),Ω , it is an interesting question that how far the 2-closure of a permutation group G is from G? In 2012, K. M. Monks in his Ph.D. thesis proved that every finite cyclic group is 2-closed in all of its faithful permutation representations [6, Theorem 12]. Derek Holt in his answer to a question [14] proposed by the second author in Mathoverflow introduced a class of abstract groups called 2-closed groups consisting of all groups which are 2-closed in all of their faithful permutation representations. That is, an abstract group G is 2-closed if H = H (2),Ω for any set Ω with G ∼ = H ≤ Sym(Ω). So all finite cyclic groups by Monk’s result are 2-closed. Holt [14] mentioned that generalized quaternion groups Q2n of order 2n , n ≥ 3, and the quasicyclic p-group Zp∞ are also 2-closed and the group Q2n × C2 is not 2-closed, where Cm is a finite cyclic group of order m. Our main results are the following. Theorem 1. The center of every finite 2-closed group is cyclic. We determine all finite nilpotent 2-closed groups. Theorem 2. A finite nilpotent group is 2-closed if and only if it is cyclic or a direct product of a generalized quaternion group with a cyclic group of odd order. Our notations are standard and are mainly taken from [2], but for the reader’s convenience we recall some of them as follows: Sym(Ω): The symmetric group on the set Ω. Q2n : The generalized quaternion group of order 2n , n ≥ 3. Cn : The finite cyclic group of order n. 2 αg : The action of g on α. Gα : The point stabilizer of α in G. αG : The orbit of α under G. Z(G): The center of G. Z2 (G): The second center of G. CG (H): The centralizer of the subgroup H of a group G. NG (H): The normalizer of the subgroup H of a group G. HG : The core of the subgroup H of G, that is the intersection of all G-conjugates of H. 2 Proof of Theorem 1 Recall that a group G is a 2-closed group if H = H (2),Ω for any set Ω such that G ∼ =H≤ Sym(Ω). First, let us prove or recall some useful results. Lemma 2.1. ([13, Exercise 5.29]) Let G ≤ Sym(Ω), A, B ≤ G and [A, B] = 1. Then [A(2),Ω , B (2),Ω ] = 1. In particular, if G is abelian then G(2),Ω is also abelian. Furthermore, if H ≤ G then (CG (H))(2),Ω ≤ CG(2),Ω (H (2),Ω ). Proof. Let x ∈ A(2),Ω and y ∈ B (2),Ω . Then for each α ∈ Ω there exist gα ∈ A and hα ∈ B such that (α, αx )y = (α, αx )gα and (α, αy )x = (α, αy )hα which imply that αxy = αxgα , αy = αgα , αx = αhα and αyx = αyhα . So αxy = αhα gα = αgαhα = αyhα = αyx . Thus xy = yx which means that [A(2),Ω , B (2),Ω ] = 1.  Remark 1. Let G ≤ Sym(Ω). By Lemma 2.1, Z(G) ≤ Z(G)(2),Ω ≤ Z(G(2),Ω ). Furthermore, if G is 2-closed on Ω then the centralizer of each subgroup of G is 2-closed on Ω. In particular, the center of G is a 2-closed group on Ω. The proof of the following lemma is straightforward and so we omit the proof. Lemma 2.2. Let G ≤ Sym(Ω) and H ≤ Sym(Γ) be permutation isomorphic. Then G(2),Ω ≤ Sym(Ω) and H (2),Γ ≤ Sym(Γ) are permutation isomorphic. 3  Lemma 2.3. Let G ≤ Sym(Ω) and x ∈ Sym(Ω). Then (x−1 Gx)(2),Ω = x−1 G(2),Ω x. In particular, NSym(Ω) (G) ≤ NSym(Ω) (G(2),Ω ). Proof. Let a ∈ (x−1 Gx)(2),Ω and α, β ∈ Ω. (αx , β x )a = (αx , β x )x −1 gx Then there exists g ∈ G such that = (α, β)gx . Thus (α, β)xax −1 = (α, β)g , which implies that xax−1 ∈ G(2),Ω . Hence a ∈ x−1 G(2),Ω x and so (x−1 Gx)(2),Ω ⊆ x−1 G(2),Ω x. Conversely, let a ∈ x−1 G(2),Ω x. Then xax−1 = g for some g ∈ G(2),Ω . Let α, β ∈ Ω. Then there exists −1 −1 −1 −1 h ∈ G such that (αx , β x )g = (αx , β x )h . So (α, β)a = (α, β)x −1 hx , which means that a ∈ (x−1 Gx)(2),Ω . Hence x−1 G(2),Ω x ⊆ (x−1 Gx)(2) and the proof is complete.  Corollary 2.4. Let G ≤ Sym(Ω) and H ≤ Sym(Γ) be permutation isomorphic. Then G(2),Ω = G if and only if H (2),Γ = H. Proof. Let G(2),Ω = G. Then by Lemma 2.2, H and H (2),Γ are permutation isomorphic, as subgroups of Sym(Γ). Now [2, Exercise 1.6.1] implies that H and H (2),Γ are conjugate in Sym(Γ). Since, by [13, Theorem 5.9], (H (2),Γ )(2),Γ = H (2),Γ , Lemma 2.3 implies that H (2),Γ = H. Similary, one can prove the converse direction.  In [14], D. Holt pointed out that cyclic groups of prime power order and generalized quaternion groups are 2-closed groups. We prove the latter for completeness. Lemma 2.5. Finite cyclic groups of prime power orders and generalized quaternion groups are 2-closed. Proof. Let G ≤ Sym(Ω) for some set Ω. First, let G be a finite cyclic p-group, p a prime. We claim that Gα = 1 for some α ∈ Ω. Then [13, Theorem 5.12] implies that G is 2-closed on Ω. Suppose, towards a contradiction, that for all α ∈ Ω, Gα 6= 1. Thus for each α ∈ Ω there exists an element xα ∈ Gα of order p. Since G has only one subgroup of order p, there exists x ∈ G of order p such that for each α ∈ Ω, hxi = hxα i. Hence T hxi ≤ α∈Ω Gα (= 1), a contradiction. Since the generalized quaternion group Q2n , n ≥ 3, has only one subgroup of order 2, the later case can be proved in a similar argument.  Proposition 1. Let G = H × K ≤ Sym(Ω), where (|H|, |K|) = 1. Then Z(G)(2),Ω = Z(H)(2),Ω × Z(K)(2),Ω . 4 Proof. Let x ∈ Z(G)(2),Ω and α, β ∈ Ω. Then there exists g = hk ∈ Z(G) such that (α, β)x = (α, β)hk , where h ∈ Z(H) and k ∈ Z(K). Let n = |H| and m = |K|. Then there exist r, s ∈ Z such that rn + sm = 1. Since, by Lemma 2.1, Z(G)(2),Ω is abelian, n αx = αh nkn n n = αk and β x = β h n kn n = β k , which implies that xn ∈ Z(K)(2),Ω . Similarly, we have xm ∈ Z(H)(2),Ω . Hence x = xrn+sm = xrn xsm ∈ Z(H)(2),Ω Z(K)(2),Ω . Now let x ∈ Z(H)(2),Ω ∩ Z(K)(2),Ω . Then for each α ∈ Ω there exist h ∈ Z(H) and k ∈ Z(K) such that αx = αh = αk . Thus hk −1 ∈ Z(G)α . Hence by Lemma 2.13, h ∈ Z(H)α . Thus αx = α. This proves x = 1 and completes the proof.  Remark 2. Note that if (|H|, |K|) 6= 1, then the conclusion of Proposition 1 may not be true. For, let G = h(1, 2)(3, 4), (3, 4)(5, 6)i. Then G(2),Ω = h(1, 2), (3, 4), (5, 6)i, where Ω = {1, . . . , 6}. But A(2),Ω = A and B (2),Ω = B, where A = h(1, 2)(3, 4)i and B = h(3, 4)(5, 6)i. The following corollary is proved in [6, Theorem 12]. Our proof is slightly different. Corollary 2.6. ([6, Theorem 12]) Every finite cyclic group is a 2-closed group. Proof. Let G be a finite cyclic permutation group of order n = pn1 1 . . . pnk k , where pi ’s are distinct primes and ni ’s are positive integers. Then G ∼ = Cpn1 1 × · · · × Cpnk k . Now the result follows from Lemma 2.5 and Proposition 1 immediately.  Lemma 2.7. Let G be a finite abelian p-group, p a prime. Then G is a 2-closed group if and only if it is cyclic. Proof. If G is cyclic, then the result follows from Corollary 2.6. Conversely, suppose that G is a closed group. We prove that G is cyclic. Suppose, towards a contradiction, that G is not cyclic. Then G = G1 × · · · × Gn , where Gi ∼ = C p ki , 1 ≤ k 1 ≤ k 2 ≤ · · · ≤ k n and n ≥ 2. Let Gi = hgi i, i = 1, . . . , n. Then G = hg1 , . . . , gn i. Let Ωi = {α1i , . . . , αpi ki }, S i = 1, . . . , n and Ωn+1 = {β1 , . . . , βp } be n + 1 pairwise disjoint sets and Ω = n+1 i=1 Ωi . Let H = hh1 , . . . , hn i, where h1 = (β1 , . . . , βp )(α11 , . . . , αp1k1 ) i i hi = (α1i−1, . . . , αpi−1 ki−1 )(α1 , . . . , αpki ), 2 ≤ i ≤ n. Then H = hh1 i × · · · × hhn i ≤ Sym(Ω). Since for each i, gi and hi has same order, there exists an isomorphism ϕ : G → H. Hence G acts on Ω by the rule αg = αϕ(g) . 5 Furthermore, G is also faithful on Ω. Hence G and H are permutation isomorphic on Ω. Thus Lemma 2.4 implies that H (2),Ω = H if and only if G(2),Ω = G. Since G is a 2-closed group, G(2),Ω = G and so H (2),Ω = H. Let x = (β1 , . . . , βp ) and γ, δ ∈ Ω. Then    (γ, δ)h1 γ, δ ∈ Ωn+1      (γ, δ) γ, δ ∈ / Ωn+1 x , (γ, δ) = −1   (γ, δ)h1h2 or (γ, δ)h1 γ ∈ Ωn+1 , δ ∈ / Ωn+1      (γ, δ)h1h−1 2 or (γ, δ)h1 γ ∈ / Ω ,δ ∈ Ω n+1 n+1 which means that x ∈ H (2),Ω . Since H ≤ H (2),Ω , for all i = 1, . . . , n, we have (α1i , . . . , αpi ki ) ∈ H (2),Ω . Since H is abelian, Lemma 2.1 implies that H (2),Ω is also abelian and so |H (2) | ≥ p.pk1 pk2 · · · pkn = p|H|, a contradiction.  Lemma 2.8. Let Gi ≤ Sym(Ωi ), Ω be disjoint union of Ωi ’s, i = 1, . . . , n and G = G1 × · · · × Gn . Then the natural action of G on Ω is faithful. Furthermore, if G(2),Ω = G (2),Ωi then for each i = 1, . . . , n, Gi = Gi . In particular, if G is a 2-closed group then Gi is a 2-closed group, i = 1, . . . , n. (2),Ωi Proof. The first part is clear. Let i ∈ {1, . . . , n} and x ∈ Gi . Then for each α, β ∈ Ωi there exists gα,β ∈ Gi such that (α, β)x = (α, β)gα,β . Put x = (x1 , . . . , xn ), where xi = x and for all j 6= i, xj = 1. Let γ, δ ∈ Ω. Then    (γ, δ)x      (γ, δ) x (γ, δ) =   (γ x , δ)      (γ, δ x ) γ, δ ∈ Ωi γ, δ ∈ / Ωi γ ∈ Ωi , δ ∈ / Ωi γ∈ / Ωi , δ ∈ Ωi = (γ, δ)g , where g = (g1 , . . . , gn ), gi = gγ,δ and for all j 6= i, gj = 1. This implies that x ∈ G(2),Ω . (2),Ωi Hence, x ∈ G and x ∈ Gi . Thus Gi = Gi .  We now show that finite cyclic groups are the only finite abelian 2-closed groups. Theorem 3. A finite abelian group is 2-closed if and only if it is cyclic. Proof. By Corollary 2.6, it is enough to prove that if G is not cyclic, then it is not a 2-closed group. Suppose, towards a contradiction, that G is a non-cyclic 2-closed group. 6 Let |G| = pn1 1 · · · pnk k , where pi ’s are distinct primes and ni ≥ 1. Then G = P1 × · · · × Pk , where Pi is the Sylow pi -subgroup of G. Since G is not cyclic, at least one of Pi ’s, say P1 , is not cyclic. Hence, by Lemma 2.7, there exists a set Ω1 such that P1 ≤ Sym(Ω1 ) and (2),Ω1 P1 6= P1 , which contradicts Lemma 2.8. 2.1 Proof of Theorems 1 and 2  In this section, we are going to classify all finite nilpotent 2-closed groups. Let us recall an important result: Theorem 4. (Universal embedding theorem [2, Theorem 2.6 A]) Let G be an arbitrary group with a normal subgroup N and put K := G/N. Let ψ : G → K be a homomorphism of G onto K with kernel N. Let T := {tu | u ∈ K} be a set of right coset representatives of N in G such that ψ(tu ) = u for each u ∈ K. Let x ∈ G and fx : K → N be the map with fx (u) = tu xt−1 uψ(x) for all u ∈ K. Then ϕ(x) := (fx , ψ(x)) defines an embedding ϕ of G into N ≀ K. Furthermore, if N acts faithfully on a set ∆ then G acts faithfully on ∆ × K by the rule (δ, k)x = (δ fx (k) , kψ(x)). Now we are ready to prove Theorem 1. Proof of Theorem 1. Suppose, towards a contradiction, that Z(G) is not cyclic. Then there exists a non-cyclic Sylow p-subgroup N of Z(G). Hence, by Lemma 2.7, there exists a set ∆ such that N ≤ Sym(∆) and N (2),∆ 6= N. Let K = G/N and Γ = ∆ × K. Keeping the notations of Theorem 4, G acts faithfully on Γ by the rule (δ, k)x = (δ fx (k) , kψ(x)) ∀δ ∈ ∆, ∀k ∈ K, ∀x ∈ G. Furthermore, since N is in the center of G, if a ∈ N then for all δ ∈ ∆ and k ∈ K, we have (δ, k)a = (δ a , k). Since G is a 2-closed group, Remark 1 implies that Z(G) is 2-closed on Γ. Hence N is 2-closed on Γ, by [13, Exercise 5.28]. Let θ ∈ N (2),∆ . Then for each δ1 , δ2 ∈ ∆ there exists xδ1 ,δ2 ∈ N such that (δ1 , δ2 )θ = (δ1 , δ2 )xδ1 ,δ2 . Define θ : Γ → Γ by the rule (δ, k)θ = (δ θ , k). Then θ ∈ Sym(Γ) and for each (δ1 , k1 ), (δ2 , k2 ) ∈ Γ, we have x x ((δ1 , k1 ), (δ2 , k2 ))θ = ((δ1θ , k1), (δ2θ , k2 )) = ((δ1 δ1 ,δ2 , k1 ), (δ2 δ1 ,δ2 , k2 )) = ((δ1 , k1 ), (δ2 , k2 ))xδ1 ,δ2 , 7 which means that θ ∈ N (2),Γ . Hence θ ∈ N and so θ = y for some y ∈ N. Thus for each δ ∈ ∆ and k ∈ K, (δ, k)θ = (δ, k)y , which implies that for each δ ∈ ∆, δ θ = δ y . Hence θ = y ∈ N, which proves that N is 2-closed on ∆, a contradiction.  Now we study finite 2-closed 2-groups. First, we consider finite 2-groups having a normal elementary abelian subgroup of rank 2. Lemma 2.9. Let G be a finite 2-group having a normal subgroup N ∼ = C2 × C2 . Then G is not a 2-closed group. Proof. Suppose, towards a contradiction, that G is a 2-closed group. Without loss of generality, we may assume that N = h(1, 2), (3, 4)i. Let a = (1, 2) and b = (3, 4). Since, by Theorem 2, Z(G) is cyclic, we may assume that a ∈ Z(G) and we have b ∈ / Z(G). Let C = CG (N) and L = C/N. Then |G : C| = 2 and G = Chti for some t ∈ G \ C, where t2 ∈ C. Since b ∈ / Z(G), t−1 bt = ab. Let ∆ = {1, 2, 3, 4}. Then, by Universal embedding theorem 4, C embeds in N ≀ C/N ≤ Sym(∆ × C/N) . Let s ∈ C/N. Then for each i ∈ {1, . . . , 4} and x ∈ N, (i, s)x = (ix , s) and moreover C(1,s) = C(2,s) = hbi, C(3,s) = C(4,s) = hai. Now, again by Universal embedding theorem, G embeds in C ≀ G/C ≤ Sym(Γ × G/C), where Γ := ∆ × C/N. Let {1, t} be the set of right transversal of C in G. Then for each γ ∈ Γ, we have   (γ g , 1) g (γ, 1) =  (γ gt−1 , t)   (γ tgt−1 , t) g (γ, t) =  (γ tg , 1) g∈C , g∈ /C g∈C g∈ /C . Then for each s ∈ C/N, since t−1 bt = ab, it follows that G((1,s),1) = G((2,s),1) = hbi, G((1,s),t) = G((2,s),t) = habi, and G((3,s),1) = G((3,s),t) = G((4,s),1) = G((4,s),t) = hai. 8 Let Ω = Γ × G/C, s ∈ C/N and k ∈ G/C. Define the map θ on Ω as follows    ((i, s), k) i = 1, 2   . ((i, s), k) 7→ ((4, s), k) i = 3     ((3, s), k) i = 4 Then clearly 1 6= θ ∈ Sym(Ω). We claim that θ ∈ G(2),Ω . Let α = ((i, s), k) and β = ((j, s′ ), k ′ ). Then    (α, β)      (α, β)b θ (α, β) =   (α, β)b or (α, β)ab      (α, β)b or (α, β)ab i, j ∈ {1, 2} i, j ∈ {3, 4} i ∈ {1, 2}, j ∈ {3, 4} . i ∈ {3, 4}, j ∈ {1, 2} This proves our claim. Now θ fixes ((1, 1), 1) and ((1, 1), t). Since G((1,1),1) ∩ G((1,1),t) = hbi ∩ habi = 1, we conclude that G(2),Ω 6= G, a contradiction.  In the following lemma, we prove that no finite nilpotent 2-closed group can be splitted over any normal subgroup with an abelian complement. Lemma 2.10. Let G be a finite nilpotent group, G = MH, M E G, H ≤ G be abelian and H ∩ M = 1. Then G is not a 2-closed group. Proof. Suppose, towards a contradiction, that G is a 2-closed group. Then, by Theorem 1, G has a unique minimal normal subgroup. Hence HG = 1. Let Ω = {Hm | m ∈ M} be the set of right cosets of H in G. Then G acts on Ω, by right multiplication, faithfully. Let ϕ : G → Sym(Ω) be the corresponding monomorphism. Let H = hh1 i × hh2 i × · · · × hht i, t ≥ 1 and o(hi ) = ni . Let Γi be a set of ni elements S such that Γi ∩ Ω = ∅, Γi ’s be pairwise disjoint, τi be an ni -cycle on Γi , Ω′ = ( ti=1 Γi ) ∪ Ω and G = hϕ(M), τ1 ϕ(h1 ), . . . , τt ϕ(ht )i. Then G ≤ Sym(Ω′ ). Let {m1 , . . . , ml } be a generating set of M. Then G = hm1 , . . . , ml , h1 , . . . , ht i, where h−1 i mj hi = ωi,j (m1 , . . . , ml ), ωi,j (m1 , . . . , ml ) is a word on {m1 , . . . , ml }, and we have some relations rm (m1 , . . . , ml ), and Rn (h1 , . . . , ht ) m = 1, . . . , s, n = 1, . . . , s′ , in terms of m1 , . . . , ml and h1 , . . . , ht , respectively. So G = hϕ(m1 ), . . . , ϕ(ml ), τ1 ϕ(h1 ), . . . , τt ϕ(ht )i 9 and ′ (τi ϕ(hi ))ni = 1, (τi ϕ(hi ))−1 ϕ(mj )τi ϕ(hi ) = ωi,j (ϕ(m1 ), . . . , ϕ(ml )), ′ rm (ϕ(m1 ), . . . , ϕ(ml )), Rn′ (ϕ(h1 ), . . . , ϕ(ht )) ′ ′ where ωi,j (ϕ(m1 ), . . . , ϕ(ml )) = ϕ(ωi,j (m1 , . . . , ml )), rm (ϕ(m1 ), . . . , ϕ(ml )) = ϕ(rm (m1 , . . . , ml )) and Rn′ (ϕ(h1 ), . . . , ϕ(ht )) = ϕ(Rn (h1 , . . . , ht )). Hence, by Von Dyck’s Theorem, there exists an epimorphism from G to G. Let H = hτ1 ϕ(h1 ), . . . , τt ϕ(ht )i. Then it is easy to see that G = ϕ(M)H and ϕ(M) ∩ H = 1. Hence |G| = |ϕ(M)||H| = |M||H| = |G|, which implies that G ∼ / G. We claim that τ1 is an = G. So G acts faithfully on Ω′ . Clearly τ1 ∈ element of the 2-closure of G on Ω′ . Let α, β ∈ Ω′ . Then    (α, β) α, β ∈ Ω      (α, β) or (α, β)τ1 ϕ(h1 ) α, β ∈ /Ω τ1 , (α, β) = −1 −1 ϕ(m h1 mh1 )τ1 ϕ(h1 )   (α, β) α = Hm ∈ Ω, β ∈ / Ω      (α, β)ϕ(m−1 h1 mh−1 1 )τ1 ϕ(h1 ) α∈ / Ω, β = Hm ∈ Ω, which proves the claim. Hence G is not 2-closed on Ω′ , a contradiction.  Corollary 2.11. Let G be a finite 2-group. Then G is a 2-closed group if and only if it is cyclic or a generalized quaternion group. Proof. Let G be a 2-closed group. Then, by Lemma 2.9, G has no normal subgroup isomorphic to C2 × C2 . Hence, by [1, Lemma 1.4], G is cyclic, dihedral, semidihedral or a generalized quaternion group. By Lemma 2.10, G is not a dihedral or semidihedral group. Thus G is cyclic or a generalized quaternion group. The converse follows from Lemma 2.5 and Corollary 2.6.  Now we study finite 2-closed p-groups, where p is an odd prime. Lemma 2.12. Let p be an odd prime and G be a finite p-group. Then G is a 2-closed group if and only if it is cyclic. Proof. One direction is clear by Corollary 2.6. Now we prove the converse direction. Suppose, towards a contradiction, that G is a non-cyclic 2-closed group. Since p 6= 2, [1, Lemma 1.4] implies that G has a normal subgroup N isomorphic to Cp × Cp . Let N = hai × hbi. By Proposition 1, Z(G) is cyclic. So we may assume that a ∈ Z(G) and 10 b∈ / Z(G). Hence N ∩ Z(G) = hai. Put C := CG (N). Then |G : C| = p and there exists t ∈ G \ C such that G = htiC and tp ∈ C. Let H := hbi and Ω = {Hg | g ∈ G}. Then HG = 1 and Ω = Sp−1 i=0 Ωi , where Ωi = {Hti x | x ∈ C}. Note that Ωi ∩ Ωj = ∅ whenever i 6= j. We claim that in the action of G on Ω, by right multiplication, G(2),Ω 6= G. Since |N| = p2 , N ≤ Z2 (G). Let i ∈ {0, . . . , p − 1}. Then [ti−2 , b−1 ] ∈ N ∩ Z(G). So [ti−2 , b−1 ] = asi for some si ∈ {0, . . . , p − 1}. On the other hand, if i 6= 2 then si 6= 0. To see this, let i 6= 2 and si = 0. Then ti−2 ∈ CG (b). Since C ≤ CG (b) ≤ G and b ∈ / Z(G), we have C = CG (b). Thus ti−2 ∈ C. Now (i − 2, p) = 1 and tp ∈ C imply that t ∈ C, which is a contradiction. Hence for each i 6= 2, (si , p) = 1 and there exist ki , li ∈ Z such that ki si + li p = 1, which implies that [ti−2 , b−ki ] = a. We define the map θ : Ω → Ω as follows: (Hti x)θ =   Hti x if i 6= 2  Hti xa if i = 2 where x ∈ C, i = 0, . . . , p − 1. It is clear that 1 6= θ ∈ Sym(Ω). Let α, β ∈ Ω, where α = Hti x ∈ Ωi and β = Htj y ∈ Ωj . Then    (α, β)      (α, β)a θ (α, β) = −j kj j   (α, β)t b t      (α, β)t−ibki ti i, j 6= 2 i, j = 2 i = 2, j 6= 2 . i 6= 2, j = 2 Note that in the last two equalities, we use the facts x, y ∈ C = CG (N), t−r bkr tr ∈ N and [tr−2 , b−kr ] = a, where r ∈ {i, j}. So we have proved that θ ∈ G(2),Ω . Furthermore, θ ∈ (G(2),Ω )H ∩ (G(2),Ω )Ht and GH ∩ GHt = H ∩ t−1 Ht = 1 which implies that G 6= G(2),Ω , a contradiction.  Proof of “if” part of Theorem 2. Let G be a finite nilpotent 2-closed group. Then Lemma 2.8 implies that all Sylow subgroups of G are 2-closed. Now the result follows from Corollary 2.11 and Lemma 2.12.  Now to prove Theorem 2, it is enough to prove that Q2n × Cm , where n ≥ 3 and m ≥ 3 is an odd integer is a 2-closed group. Holt [14] mentioned that he thinks the group 11 Q2n × Cm is 2-closed for all odd integers m > 0. In what follows we give a proof of the latter. Let us start with the following lemma. Lemma 2.13. Let G = H × K ≤ Sym(Ω). If (|H|, |K|) = 1, then for each α ∈ Ω, G α = H α × Kα . Proof. Let α ∈ Ω. It is clear that Hα , Kα E Gα and Hα ∩ Kα = 1. So it is enough to prove that Gα = Hα Kα . Clearly Hα Kα ⊆ Gα . Now let x ∈ Gα . Then there exist −1 h ∈ H and k ∈ K such that x = hk and αx = α. Hence αh = αk . On the other hand, t hk −1 = k −1 h. Thus αh = αk −t for each integer t ≥ 1. Let n = |H| and m = |K|. Then there exist r, s ∈ Z such that rn + sm = 1. Hence αh = αh rn+sm = αh sm = α, αk = αk rn+sm = αk rn = α. So x ∈ Hα Kα , which completes the proof.  Lemma 2.14. Let G = H × K ≤ Sym(Ω) be transitive and Ω = αG . If (|H|, |K|) = 1, then the action of G on Ω is equivalent to the action of G on Ω1 × Ω2 , where Ω1 = αH , Ω2 = αK and G acts on Ω1 × Ω2 by the rule (αh , αk )g = (αhh1 , αkk1 ), where g = h1 k1 . Proof. First note that, by Lemma 2.13, Gα = Hα × Kα . This implies that the map λ : Ω → Ω1 × Ω2 , where λ(αhk ) = (αh , αk ) is well-defined and one-to-one. Clearly λ is onto. Hence λ is a bijection. Now let β ∈ Ω and x = hk ∈ G, where h ∈ H and k ∈ K. Then there exists g = h1 k1 ∈ G, where h1 ∈ H and k1 ∈ K, such that β = αg . Furthermore, λ(β x ) = λ(αgx ) = λ(αh1 hk1 k ) = (αh1 h , αk1k ) = (αh1 , αk1 )x = λ(β)x . This completes the proof.  Recall that G, H ≤ Sym(Ω) are called k-equivalent if G and H has same orbits on Ω × · · · × Ω (k-time), see [13, Definition 4.1]. Lemma 2.15. ([12, Lemma 2.3.2]) Let G, H ≤ Sym(Ω) be k-equivalent, k ≥ 1. Let N be an intransitive normal subgroup of both G and H. Let Ω be the set of orbits of N on Ω. Then G = G/N and H = H/N are k-equivalent on Ω. 12 Lemma 2.16. Let G = H × K ≤ Sym(Ω) be finite, H, K 6= 1 and H be abelian. Then H E G(2),Ω . Furthermore, if (|H|, |K|) = 1 then H acts intransitively on Ω and moreover G/H and G(2),Ω /H (2),Ω both act faithfully on Ω := {αH | α ∈ Ω}. Proof. Since H ≤ Z(G) and, by Remark 1, Z(G) ≤ Z(G(2),Ω ), we have H E G(2),Ω . Now let (|H|, |K|) = 1. Since K 6= 1, Lemma 2.13 implies that H is intransitive on Ω. On the other hand, G(2),Ω (and also G) acts on Ω by the rule (αH )x = (αx )H , where α ∈ Ω and x ∈ G(2),Ω . To complete the proof, it is enough to prove that H (2),Ω and H are the kernels of the actions of G(2),Ω and G on Ω, respectively. Let L be the kernel of the action of G on Ω. Then H ≤ L. Let x ∈ L and α ∈ Ω be arbitrary. Then (αx )H = αH which implies that x ∈ Gα H. On the other hand, by Lemma 2.13, Gα = Hα × Kα . So x ∈ HKα . This shows that for each α ∈ Ω, there exist kα ∈ Kα and hα ∈ H such that x = hα kα . Since every element in G has a unique presentation as a product of an element of H by an element of K, for each α, α′ ∈ Ω, we have kα = kα′ . Thus k = kα , for each α ∈ Ω, fixes all elements of Ω. Hence k = 1 which implies that x ∈ H. This proves that H = L. Finally, let M be the kernel of G(2),Ω on Ω. We prove that M = H (2),Ω . Let x ∈ H (2),Ω . Then for each α ∈ Ω, there exists hα ∈ H such that αx = αh . Thus for each α ∈ Ω, (αH )x = (αx )H = (αhα )H = αH . Hence H (2),Ω ≤ M. Let x ∈ M and α, β ∈ Ω. Then x ∈ G(2),Ω , (αx )H = αH and (β x )H = β H . Hence there exist h1 , h2 ∈ H such that αx = αh1 and β x = β h2 . Furthermore, there exists g ∈ G −1 such that αx = αg and β x = β g . Thus gh−1 1 ∈ Gα and gh2 ∈ Gβ . Since Gα = Hα Kα and Gβ = Hβ Kβ , there exist r1 ∈ Hα , s1 ∈ Kα and r2 ∈ Hβ and s2 ∈ Kβ such that −1 gh−1 1 = r1 s1 and gh2 = r2 s2 . Hence r1 h1 s1 = r2 h2 s2 . Again, since every element of G has a unique presentation as a product of an element of H by an element of K, s1 = s2 and r1 h1 = r2 h2 . Hence −1 α x = α h 1 = α r1 r2 h 2 −1 = α r2 h 2 , β x = β h 2 = β r2 r1 h 1 = β r1 h 1 = β r2 h 2 , which implies that x ∈ H (2),Ω . This completes the proof.  Proposition 2. Let G = H × K ≤ Sym(Ω) be finite, (|H|, |K|) = 1, H be abelian, H (2),Ω = H and K (2),Ω = K, where Ω = {αH | α ∈ Ω}. Then G(2),Ω = G. 13 Proof. By Lemma 2.16, H (2),Ω = H implies that G/H and G(2),Ω /H both act faithfully on Ω. Also Lemma 2.15 implies that G(2),Ω /H ≤ (G/H)(2),Ω . Since G/H ∼ = K and K (2),Ω = K, Lemma 2.2 implies that (G/H)(2),Ω ∼ = G/H ≤ G(2),Ω /H. Thus = K. Also K ∼ |G(2),Ω /H| = |K|, which implies that |G(2),Ω | = |H||K| = |G|. Hence G(2),Ω = G.  We are now ready to complete the proof of Theorem 2 by giving the proof of its “only if” part. Proof of “only if” part of Theorem 2. It follows from Proposition 2 and Lemma 2.5.  Acknowledgments This research was financially supported by Iran National Science Foundation: INSF. The first author was supported in part by grant No. 95050219 from School of Mathematics, Institute for Research in Fundamental Sciences (IPM). The first author was additionally financially supported by the Center of Excellence for Mathematics at the University of Isfahan. References [1] Y. Berkovich, Groups of prime power order, Vol. 1, Expositions in Mathematics 46, Walter de Gruyter GmbH & Co. KG, Berlin, 2008. [2] J. D. Dixon and B. Mortimer, Permutation groups, Springer, New York, 1996. [3] I. A. Faradžev, M. H. Klin and M. E. Muzichuk, Investigations in Algebraic Theory of Combinatorial Objects, Vol. 84 of the series Mathematics and Its Applications, (1994) pp 1-152. [4] M. W. Liebeck, C. E. Praeger and J. Saxl, A classification of maximal subgroups of the finite alternating and symmetric groups, J. Algebra 111(2) (1987) 365-383. 14 [5] M. W. Liebeck, C. E. Praeger and J. Saxl, On the 2-closures of finite permutation groups, J. London Math. Soc. 37(2) (1998) 241-252. [6] K. M. Monks, The mobius number of the symmetric groups, Colorado State University, 2012. [7] M. E. O’Nan, Estimation of Sylow subgroups in primitive permutation groups, Math. Z. 147 (1976) 101-111. [8] I. N. Ponomarenko, Graph isomorphism problem and 2-closed permutation groups, Appl. Algebra Engrg. Comm. Comput., 5(1) (1994) 9-22. [9] S. Evdokimov and I. Ponomarenko, Two-closure of odd permutation group in polynomial time, Discrete Math. 235 (2001) 221-232. [10] C. E. Praeger, On elements of prime order in primitive permutation groups, J. Algebra 60 (1979) 126-157. [11] C. E. Praeger and J. Saxl, Closures of finite primitive permutation groups, Bull. London Math. Soc. 24 (1992) 251-258. [12] J. Xu, M. Giudici, C.H. Li and C. Praeger, Invariant relations and Aschbacher classes of finite linear groups, Electron. J. Combin. 18 (2011) #P225. [13] H. W. Wielandt, ‘Permutation groups through invariant relations and invariant functions’, Lecture Notes, Ohio State University, 1969. Also published in: Wielandt, Helmut, Mathematische Werke (Mathematical works) Vol. 1. Group theory. Walter de Gruyter & Co., Berlin, 1994, pp. 237-296. [14] http://mathoverflow.net/questions/235114/2-closure-of-a-permutation-group. 15
4math.GR
1 Wideband DOA Estimation through Projection Matrix Interpolation arXiv:1706.08280v1 [cs.IT] 26 Jun 2017 J. Selva Abstract—This paper presents a method to reduce the complexity of the deterministic maximum likelihood (DML) estimator in the wideband direction-of-arrival (WDOA) problem, which is based on interpolating the array projection matrix in the temporal frequency variable. It is shown that an accurate interpolator like Chebyshev’s is able to produce DML cost functions comprising just a few narrowband-like summands. Actually, the number of such summands is far smaller (roughly by factor ten in the numerical examples) than the corresponding number in the ML cost function that is derived by dividing the spectrum into separate bins. The paper also presents two spinoffs of the interpolation method. The first is a fast procedure to compute one-dimensional search estimators like Multiple Signal Classification (MUSIC), that exploits the close relation between Chebyshev interpolation and the Discrete Cosine Transform (DCT). And the second is a detection-estimation procedure for the DML estimator. The methods in the paper are assessed in several numerical examples. I. I NTRODUCTION The estimation of the directions of arrival (DOAs) to an array of sensors is a fundamental problem in signal processing, which has been studied in multitude papers during the last decades. Most of the existing estimators are based on the so-called narrowband assumption, i.e, on considering that the signals’ bandwidths are much smaller than their corresponding central frequencies. As is well known, this assumption greatly simplifies the modeling, because the geometry of a given impinging wave just translates into a single complex factor for each sensor-wave pair. Actually, the various estimation methods in array processing can be viewed as effective ways to exploit this single-factor structure, [1]. In practice, however, the signals’ bandwidths are often wide relative relative to their central frequencies and, as a consequence, the array geometry affects separate spectral components differently. Thus, in this wideband case there is a factor for each combination of sensor, wave and spectral component, and this fact complicates the estimation significantly. In the literature, most techniques attempt to reduce this wideband case to the narrowband one, by dividing the spectrum into separate bins, and then using a narrowband model in each of them. Afterward, the main issue is how these separate models should be combined. There are fundamentally two approaches for this combination. It can either be coherent [2]– [5] in the sense that it incorporates the array snapshots from separate bins into a single covariance matrix, or incoherent, meaning that a narrowband estimate is computed for each bin first, and then these last estimates are combined through a method like a weighted average, [6]. Besides, there exist methods that share features of the coherent and incoherent approaches like the test of orthogonality of projected subspaces (TOPS) in [7], [8]. The methods that employ this reduction to the narrowband case have been surveyed in several references, [7], [9, Ch. 3] and [10, Sec. 4.3]. We must additionally mention that the direct estimation through well-established methodologies like the maximum likelihood (ML) principle has also been attempted in a number of references. The deterministic and stochastic ML estimators have been analyzed in [11] theoretically. An approximate ML estimator has been proposed in [12], [13] and the ML estimator for near-field sources has been analyzed in [14]. The main drawback of these direct approaches is their complexity, given that the cost function is the sum of the narrowband cost functions for each spectral bin, and the number of bins is usually high. In this paper, we propose to interpolate the projection matrix appearing in the DML cost function using a Chebyshev interpolator, in order to reduce the cost function’s complexity. Specifically, we will show that such interpolator is able to exploit the smooth variation with the temporal frequency, in order to yield a cost function composed of just a few narrowband-like components. Though other interpolators are usable, we consider only the Chebyshev interpolator for simplicity and due to its excellent performance. The paper has been organized as follows. In the next subsections we introduce the notation and recall several results on Chebyshev interpolation. Then, in Sec. II we will introduce the signal model for the wideband DOA problem, and in Sec. III the proposed interpolation method for the DML cost function. In Sec. IV we will derive an interpolator for one-dimensional search estimators, that will be employed in incoherent MUSIC (IC-MUSIC) and in the detection-estimation procedure in Sec. V. Finally, we will assess the methods in the paper in Sec. VI numerically. A. Notation The notation will be the following. • We will write vectors and matrices in lower and upper bold face respectively. So y will denote a vector and Y a matrix. • I will denote the identity matrix. • [y]k and [Y ]p,q will represent the kth and (p, q) elements of y and Y respectively. • The vector formed by appending a scalar a to a column vector y will be denoted [y; a]. • ’⊙’ will be the element-by-element product of two equalsize matrices or vectors. † • Y will denote the pseudo-inverse of matrix Y . As is well known, Y † = (Y H Y )−1 Y H if Y has full-column rank. 2 • New symbols and functions will be introduced using the operator ’≡’. xm (t) = B. Background on Chebyshev interpolation • • • • TP (y) and UP (y) respectively denote the Chebyshev polynomials of the first and second kinds and order P . yp is the pth root of TP (y), yp ≡ − cos(π(p − 1/2)/P ), p = 1, 2, . . . , P . y(x) denotes the linear function mapping the interval [a, b] onto [−1, 1]. xp is the set of abscissas following yp = y(xp ). δp denotes the discrete delta function: δ0 = 1 and δp = 0 if p 6= 0. Using these definitions, the Chebyshev interpolator of g(x) is g̃(x) ≡ P −1 X ck Tk (y(x)), (1) k=0 where the coefficients ck are given by ck ≡ P  πk  1  2 − δk X p− . g(xP −p+1 ) cos P p=1 P 2 (2) Alternatively, the following formula expresses g̃(x) in terms of the samples g(xp ), g̃(x) = P X φp (x)g(xp ), (3) p=1 where φp (x) ≡ TP (y(x)) . P UP −1 (yp )(y(x) − yp ) K X e−j2πfo τm γk bm (γk )sk (t − τm γk ) + wm (t), (5) k=1 In this paper, the well-known Chebyshev interpolator will play a key role, [15, Sec. 6.2]. In order to recall it, we first consider a generic function g(x), defined in an interval [a, b], and introduce the following notation: • demodulation from frequency fo to baseband, the signal from the mth sensor follows the model (4) A key observation is that (2) is the type-2 DCT of the samples g(xp ), except for a scale factor and an index reversal. This fact allows us to oversample g̃(x) using a procedure akin to the zero-padding FFT method [16], but based on the DCT. Specifically, consider an integer R > P , the roots of the Rth Chebyshev polynomial yr′ ≡ − cos(π(r − 1/2)/R), (r = 1, . . . , R), and the corresponding abscissas for g̃(x), x′r , [yr′ ≡ y(x′r )]. In order to compute the samples g̃(x′r ), r = 1, 2, . . . , R, we may first compute the coefficients ck through one type-2 DCT [Eq. (2)], then add zero padding up to length R, and finally obtain the desired samples g̃(x′r ) through one type-3 DCT (inverse of type-2 DCT). where • τm is the delay between the array’s reference point and the mth sensor at the propagation velocity, τm ≡ • dm , (propagation velocity c), c (6) γk is the sine of the kth angle of arrival, γk ≡ sin θk , (7) bm (γk ) is the mth sensor pattern, sk (t) is the lowpass equivalent of the kth impinging signal, • and the wm (t) are independent complex white noise processes of equal variance. Next, we assume that the receiver takes N samples of each xm (t) with a period T fulfilling the Nyquist condition (BT < 1), and then computes the DFT. If these last samples are denoted x̃(r/(N T )) (integer r), then for large N they follow the model • • K  r   r  X = e−j2π(fo +r/(N T ))τm γk bm (γk )s̃k NT NT k=1  r  , +w̃m NT (8) with r = r1 , r1 + 1, . . . , r2 , where r1 and r2 are the first and last frequency indices in which at least one signal has significant power, and s̃k (r/(N T )) and w̃m (r/(N T )) have the obvious definitions. In vector notation, this model can be written as xr = A(r, γ)sr + wr , (9) x̃m where  r  , [γ]k ≡ γk , NT [A(r, γ)]m,k ≡ e−j2π(fo +r/(N T ))τm γk bm (γk ),  r  [sr ]k ≡ s̃k , [S]·,r ≡ sr , NT  r . [wr ]m ≡ w̃m NT [xr ]m ≡ x̃m (10) For the model in (9), the DML estimator of S and γ is given by the arguments minimizing the cost function L0 (S, γ) ≡ r2 X kxr − A(r, γ)sr k2 . (11) r=r1 II. S IGNAL MODEL Consider a linear array of M sensors at positions dm , into which K wideband signals impinge with angles of arrival θk relative to the broadside, (m = 1, . . . , M , k = 1, . . . , K). We assume that these signals are passband with spectra contained in [fo − B/2, fo + B/2], where B > 0 and fo > B/2. After As is well known, this cost function can be minimized in sr for fixed γ, using the pseudo-inverse of A(r, γ). If the resulting sr is substituted into (11), then we obtain the compressed cost function, r2 X kP⊥ (r, γ)xr k2 , (12) L1 (γ) ≡ r=r1 3 where P⊥ (r, γ) denotes the projection matrix for the orthogonal complement of A(r, γ), is divided into separate bins using a filter bank. For this, divide the range [r1 , r2 ] into Pb bins of the form P⊥ (r, γ) ≡ I − A(r, γ)A(r, γ)† . Ib,p ≡ [r1 + (p − 1)d, r1 + pd[, 1 ≤ p ≤ Pb , (13) At this point, we have that the number of summands in (12) is usually very high (on the thousands), and each of them depends on a different projection matrix P⊥ (r, γ). This implies that the direct minimization of L1 (γ) would be too expensive computationally. In the next section, we propose an interpolation method that reduces the number of summands drastically. III. P ROPOSED INTERPOLATION METHOD In the DML cost function in (12), the number of summands can be very large though, additionally, the projection matrix P⊥ (r, γ) varies smoothly with the frequency index r. We may exploit this last fact by means of an interpolator for P⊥ (r, γ) in order to reduce the number of summands. In this paper, we propose to employ the Chebyshev interpolator in (3) due to its high accuracy for a small number of input function values. Specifically, we propose to interpolate P⊥ (r, γ) using the Chebyshev interpolator in (3) with linear mapping (14) and interpolation abscissas r2 + r1 r2 − r1 xp + , (15) ρp ≡ 2 2 where xp was already defined in Sec. I-B. The resulting interpolator is P⊥ (r, γ) ≈ P X φp (r)P⊥ (ρp , γ). (16) p=1 Let us insert this formula into (12) in order to obtain a new DML cost function. We have L1 (γ) ≈ L1,c (γ) ≡ r2 X P X r=r1 = r2 X tr = P X r=r1 P nX φp (r)P⊥ (ρp , γ)xr p=1 p=1 2 o r=r1 Finally, we define the correlation matrices r2 X φp (r)xr xH r , (18) r=r1 in order to write L1,c (γ) as L1,c (γ) = P X tr{P⊥ (ρp , γ)Rp }. where φb,p (r) is the indicator function for the pth bin,  1 if ρb,p − d/2 ≤ r < ρb,p + d/2 φb,p (r) ≡ 0 otherwise. (22) Now, a derivation similar to that in (17) but using the bin interpolator in (21) yields the cost function L1 (γ) ≈ L1,b (γ) ≡ Pb X tr{P⊥ (ρb,p , γ)Rb,p }, (23) p=1 where Rb,p is the covariance matrix for the pth bin, X Rb,p ≡ xr xH r . (24) We will check in the numerical examples that, though (19) and (23) have a similar form, the Chebyshev interpolator has produced a much smaller number of summands; i.e, P in (19) is much smaller than Pb in (23). Finally, note that in (19) each summand can be interpreted as a narrowband cost function at the frequency fo + ρp /(N T ). However, the expected values of the covariance matrices Rp do not necessarily admit a decomposition into a noise and signal subspace, given that (18) is a wideband average of the outer products xr xH r ; (i.e, r varies along the full frequency range [r1 , r2 ]). IV. C OMPLEXITY REDUCTION AND r2 o n X φp (r)xr xH . (17) tr P⊥ (ρp , γ) r Rp ≡ p=1 APPLIED TO ONE - DIMENSIONAL SEARCH ESTIMATORS : BEAMFORMER p=1 φp (r)P⊥ (ρp , γ)xr xH r where d ≡ (r2 − r1 )/Pb , let ρb,p denote the pth bin’s center, and consider the bin (or piecewise constant) interpolator given by Pb X P⊥ (r, γ) ≈ φb,p (r)P⊥ (ρb,p , γ), (21) r∈Ib,p 2x − r1 − r2 , r2 − r1 y(x) = (20) (19) p=1 This is the DML cost function proposed in this paper. For assessing later its performance, let us introduce another cost function based on the usual approach, in which the spectrum IC-MUSIC For estimators involving a one-dimensional search in the DOA parameter γ, like IC-MUSIC, an additional Chebyshev interpolator may substantially reduce the total computational burden, by decreasing the number of cost-function evaluations required. We may illustrate this technique for a simple beamformer estimator, and then adapt it to other cases. In a so-called beamformer estimator, the estimates are the abscissas of the K main local minima of L1,c (γ) [or L1,b (γ)], where γ is a scalar parameter. The technique that we propose starts by introducing a Chebyshev interpolator for P⊥ (ρp , γ) of the form in (3) with weight functions ηq (γ) [akin to φp (x)], domain [−1, 1], and interpolation abscissas γ̃q . For a sufficiently large order Q, this interpolator is P⊥ (r, γ) ≈ Q X ηq (γ)P⊥ (r, γ̃q ). (25) q=1 Next, we write P⊥ (r, γ̃q ) as P⊥ (r, γ̃q ) = I − âp,q âH p,q , (26) 4 where âp,q is the normalized signature âp,q ≡ but starting from (30), we obtain the last line of (28) but with U b,p U H b,p in place of Rp , a(ρp , γ̃q ) . ka(ρp , γ̃q )k (27) L1,mu (γ) Finally, we insert (26) and (27) into (19) to obtain an interpolation formula for L1,c (γ), L1,c (γ) ≈ = Q X ηq (γ) P X tr{Rp } − âH p,q Rp âp,q . Q X (28) (31) ηq (γ) P X H âH p,q U b,p U b,p âp,q . (32) p=1 This is the interpolator proposed for the IC-MUSIC pseudospectrum in (30). In (32), we have used the approximation PQ q=1 ηq (γ) ≈ 1, given that the Chebyshev interpolator also approximates the constant functions. V. P ROPOSED DML DETECTION - ESTIMATION METHOD In the sequel, we present a detection-estimation method for computing the DML estimate, that resembles well-known procedures for the narrowband case, like those in [17], [18] and [19, Sec. 4.6)]. Fundamentally, it is a combination of two steps, one for detecting additional components, and another for refining a given estimate. The first is a variant of the Generalized Likelihood Ratio (GLR) test in [20], and the second is the modified variable projection method (MVP) in [21] which converges in a small number of iterations. The method operates on a given estimate γ K,α , repeating in turn a detection step followed by an estimation step, until a statistical test fails. The sub-indices K and α in γ K,α are the length of this same vector and the number of iterations in the estimation step respectively. The initial vector γ 0,0 is empty. Both steps are described in the next two sub-sections. A. Detection step p=1 The second estimator is IC-MUSIC, in which the onedimensional search is performed on the total pseudo-spectrum consisting of the sum of the usual MUSIC pseudo-spectra in separate bins. This sum is the result of replacing Rb,p with U b,p U H b,p in the cost function in (23), where U b,p spans the signal subspace of Rb,p , tr{P⊥ (ρb,p , γ)U b,p U H b,p }. p=1 Q X q=1 ηq (γ) Pb X P   X H âH ηq (γ) KP − p,q U b,p U b,p âp,q ≈ KP − p=1 tr{P⊥ (ρp , γ o )Rp } − âH p,q P⊥ (ρp , γ o )Rp âp,q . (29) L1,mu (γ) ≡ Q X q=1 q=1 P X H H tr{U b,p U H b,p } − âp,q U b,p U b,p âp,q p=1 L1,mu (γ) ≈ In this expression, the p-index sum is the value of L1,c (γ̃q ), and it is only necessary to compute Q such values for fully specifying the formula. This fact allows us to compute the beamformer estimates in the following steps: 1) Compute L1,c (γ̃q ), q = 1, 2 . . . , Q, [p-index sum in (28)]. Note that the vectors âp,q are constant and, therefore, can be pre-computed. 2) Upsample the previous step’s output to a number of samples R > Q, using the DCT zero-padding technique in Sec. I-B. 3) Locate the main local minima in the sample sequence from the previous step. 4) Refine, if necessary, the local minima’s abscissas using a one-dimensional optimization method like Newton’s. This steps involves no evaluations of L1,c (γ), given that we may instead evaluate its interpolator in (28). As can be readily inferred, this technique is applicable to any other one-dimensional search estimator, and we will employ in this paper two of them. The first is an extended beamformer that takes into account a fixed component vector γ o . Its cost function is L1,c ([γ o ; γ]) and its interpolator is obtained by replacing Rp with P⊥ (ρp , γ o )Rp in (28), · P X Finally, we may simplify this last expression as follows: q=1 q=1 L1,c ([γ o , γ]) ≈ ηq (γ) · q=1 Q P nX X  o ηq (γ) I − âp,q âH = tr p,q Rp p=1 Q X q=1 Q P nX o X tr ηq (γ)P⊥ (ρp , γ̃q )Rp p=1 ≈ (30) p=1 Next, in order to obtain its interpolator, note that this expression has the same form as L1,c (γ) in (19), but with U b,p U H b,p in place of Rp . Therefore, if we repeat the derivation in (28) Given an iterate γ K,α (which can be initially empty), the detection method decides whether to look for an additional parameter γ and, if so, selects as γ the minimum of L1,c ([γ K,α ; γ]). The detection is based on a statistical test for L1,c (γ K,α ), assuming that γ K,α is the true parameter vector. More precisely, if γ K,α is the true vector, then L1,c (γ K,α ) follows a χ2 distribution with 2(M − K)(r2 − r1 + 1) degrees of freedom. Thus, an additional component is sought if L1,c (γ K,α ) > A, with A≡ σ 2 −1 F (1 − PF A ), 2 (33) where F is the χ2 cumulative distribution function, and PF A a fixed false-alarm probability. We may summarize this detection step as follows. If L1,c (γ K,α ) < A, the iterative process finishes and the final estimate is γ K,α , but if L1,c (γ K,α ) > A then it proceeds to 5 the estimation step with the new vector γ K+1,0 = [γ K,α ; γ], where γ = arg min L1,c ([γ K,α ; γ ′ ]). (34) ′ γ This minimum is located using the DCT zero-padding technique in Sec. IV. B. Estimation step This step is an implementation of the MVP method in [21], already used in [18], [22] and [19, Sec. 4.6)] for the narrowband problem. For introducing it, let us define first the following matrix of differentials with the same size as A(r, γ), [D(r, γ)]m,k ≡ d [A(r, γ)]m,k . dγk (35) Its explicit expression can be readily computed from (10). Also, it is convenient to define the following shorthand notation Ap,K,α ≡ A(ρp , γ K,α ), Dp,K,α ≡ D(ρp , γ K,α ), (36) P⊥,p,K,α ≡ P⊥ (ρp , γ K,α ). (37) Given an iterate γ K,α , the MVP method refines it using the iteration γ K,α+1 = γ K,α − µH −1 (38) K,α g K,α , where usually µ = 1, though µ < 1 may be used to ensure a cost function decrease, and g K,α and H K,α are the gradient and approximate Hessian of (19) at γ = γ K,α , g K,α ≡ −2Re{diag{ P X A†p,K,α Rp P⊥,p,K,α D p,K,α }} (39) p=1 H K,α ≡ 2Re{ ⊙ P X T (DH p,K,α P⊥,p,K,α D p,K,α }) p=1 (A†p,K,α Rp (A†p,K,α )H )}. (40) These expressions can be efficiently computed from the Housholder QR decompositions of the matrices Ap,K,α , as shown in [19, Sec. 4.6.4b)]. Actually, it is not necessary to compute neither A†p,K,α nor P⊥,p,K,α . The iteration in (38) is repeated until there is no significant reduction in the cost function’s value. Afterward, the execution proceeds to the detection step again. VI. N UMERICAL EXAMPLES We have performed several numerical examples following the signal model in Sec. II, which are presented in the sequel. In them, the main parameters were the following: Central frequency. The signals’ central frequency was fo = 2.4 GHz. Received signals. There were two simulation scenarios, that we term “independent-signals” (IS) and “correlated-signals” (CS) scenarios. In the IS scenario, the lowpass equivalents of the received signals were three linearly-modulated signals so,k (t) with raised-cosine modulating pulse (roll-off 0.2). The modulation sequences in the three were variance-one independent and complex white. The corresponding lowpass signals at the sensor array reference point were a′k so,k (t− τk′ ), with Amplitudes a′k : 0.626 + j0.7798, −0.4432 − j0.552, 0.3138 + j0.3908, Delays τk′ /(2fo ): 0, 0.6, 37.53. In the CS scenario, the lowpass equivalents were generated as in the IS scenario, except for the fact that the three initial signals so,k (t) were the same one. DFT length. N = 2048 and the sampling period T followed BT = 0.8. The frequency index range was [r1 , r2 ] = [−819, 818], where index 0 was exactly placed at frequency fo . Sensor array. Uniform linear array with M = 10 sensors and isotropic patterns, [bm (γ) = 1 for all sensors]. Angles of arrival. −0.7895, −0.6816, and 0.2734 rads. Corresponding parameters in γ: −0.71, −0.63, and 0.27. Signal-to-noise ratio (SNR). Ratio of the signal and noise powers in (8), averaged over all the values of r and m in that equation. Detection false-alarm probability. In the example about the detection method, we have used PF A = 0.01. Estimators. We have evaluated three estimators: • IC-MUSIC. Incoherent MUSIC with interpolated pseudospectrum in (32). The local minima were located using the DCT technique in Sec. I-B, followed by a onedimensional Newton method for each minimum. • BinML. DML estimator using the bin cost function in (23). • ChebML. Proposed DML implementation based on minimizing the cost function in (19). In both BinML and ChebML, the detection-estimation method in Sec. V was used in all cases. However, for known number of signals K, the pair of detection and estimation steps was executed exactly K times, i.e, the test in Sec. V-A was not employed. One-dimensional search in BinML and ChebML. In all cases, it was Q = 50 and the Chebyshev grid was oversampled by factor 2 using the DCT zero-padding method in Sec. I-B. Number of Monte Carlo trials. The estimators’ performances have been evaluated in 100 Monte Carlo trials. A. Projection matrix interpolation performance Fig. 1 shows the error of the bin interpolator in (21) when used to approximate the projection matrix P⊥ (r, γ) for Pb = 47 bins. This last number of bins ensures an error below −50 dB at all frequencies, as can be readily checked, and is the minimum Pb fulfilling this condition. In this figure, the error is defined as the maximum amplitude among the elements of P⊥ (r, γ) − Pˆ⊥ (r, γ), where P⊥ (r, γ) and Pˆ⊥ (r, γ) are the true and interpolated projection matrices respectively. The oscillations in this figure are due to the fact that the error is negligible close to the bins’ centers and increases away from them. Fig. 2 shows the same error but for the Chebyshev interpolator and several interpolation orders P . Note that P = 4 ensures by large the −50 dB threshold while, as just commented, the bin interpolator requires Pb = 47. As can be readily seen, the Chebyshev interpolation error decreases very 6 −60 −50 Interpolation error (dB) Interpolation error (dB) −40 −60 −70 −80 −90 0 500 1000 Frequency index 1500 −80 5 −100 7 −120 −140 9 −160 −180 11 −200 −220 0 Fig. 1. Interpolation error for the projection matrix using the bin interpolator with 47 bins. This is the smallest number of bins ensuring the −50 dB threshold for all frequencies. 2 Fig. 3. Projection matrix approximation error using the Chebyshev interpolator versus the parameter difference γ2 − γ1 for several interpolation orders P. 2 3 4 5 −40 −60 −80 −100 0 6 7 −120 −140 −160 −180 −750 −500 −250 0 250 Frequency index 500 750 −20 RMS error (dB) Interpolation error (dB) −20 0.5 1 1.5 Parameter difference γ2 − γ1 Fig. 2. Projection matrix approximation error using the Chebyshev interpolator versus the frequency index. 10 −60 −80 −100 −120 −10 B. Performance of the BinML and ChebML estimators Fig. 4(a) shows the RMS error of the IC-MUSIC estimator for P = 10 and 50 bins, and of the BinML estimator for P = 40 to 70 bins, in the IS scenario and assuming a known number of signals K. Note that IC-MUSIC if far from the Cramer-Rao (CR) bound and BinML attains it. Fig. 4(b) shows the same error but for the ChebML estimator. Note that the mismatch is negligible already for P = 5. Thus, in this example ChebML requires at least ten times less cost function summands than BinML, with the corresponding savings in computational burden. – – – IC-MUSIC ——– BinML + + + CR bound 0 40, 50, 60 10 20 30 40 Signal-to-noise ratio (dB) ✸ ✑ ✑ 70 50 60 (a) RMS error in dB for the estimation of γ1 of estimators IC-MUSIC (10 and 50 bins) and BinML (40 to 70 bins) in the IS scenario. Crosses (’+’) mark the CR bound. −20 −40 RMS error (dB) fast with P . Actually, P = 6 already places the error below the −100 dB threshold. These error curves have a −∞ value at the positions corresponding to the Chebyshev polynomial roots after the linear interval mapping [−1, 1] → [r1 , r2 ], as explained in Sec. (I-B). Fig. 3 shows the same error for the Chebyshev interpolator but versus the parameter difference |γ2 − γ1 |, assuming two impinging waves. Again, we can see the strong reduction in the error as P increases. Also, note that there is no relevant error increase for small parameter differences. 50 −40 1 −60 2 −80 3 4 5, 6,. . . −100 −120 −10 0 10 20 30 40 Signal-to-noise ratio (dB) 50 60 (b) RMS error in dB for the estimation of γ1 of estimator ChebML (P = 1, 2, . . .) in the IS scenario. Crosses (’+’) mark the CR bound. Fig. 4. RMS error in dB for the estimation of γ1 of estimators IC-MUSIC (a), BinML (a), and ChebML (b) in the IS scenario, together with CR bound. 7 0 −20 10 50 −40 −60 −80 −100 −10 −40 RMS error (dB) RMS error (dB) −20 – – – IC-MUSIC ——– BinML + + + CR bound 0 40, 50 ❅ ❅ ❘ ✶ ✏ 60, 70 10 20 30 40 Signal-to-noise ratio (dB) 50 −60 −80 −100 −120 −10 60 (a) RMS error in dB for the estimation of γ1 of estimators IC-MUSIC (10 and 50 bins) and BinML (40 to 70 bins) in the CS scenario. Crosses (’+’) mark the CR bound. 0 10 20 30 40 Signal-to-noise ratio (dB) 50 60 (a) RMS error and CR bound (’+’) for the detection scheme in Sec. V. 2 ❅ ❅ ❘ RMS error (dB) −30 −40 Detection probability −20 1 3 −50 −60 4 −70 5 −80 0.8 0.6 0.4 0.2 6 −90 −100 −10 1 0 −10 7 0 10 20 30 40 Signal-to-noise ratio (dB) 50 60 (b) RMS error in dB for the estimation of γ1 of estimator ChebML (P = 1, 2, . . .) in the CS scenario. Crosses (’+’) mark the CR bound. 0 10 20 30 40 Signal-to-noise ratio (dB) 50 60 (b) Probability of detecting the three impinging waves for the detection scheme in Sec. V. Fig. 6. Performance of the detection scheme in Sec. V in the IS scenario. Fig. 5. RMS error in dB for the estimation of γ1 of estimators IC-MUSIC (a), BinML (a), and ChebML (b) in the CS scenario, together with CR bound. VII. C ONCLUSIONS Figs. 5(a) and 5(b) are the equivalents of Figs. 4(a) and 4(b) but for the CS scenario. Note that in this case the CR bound is higher due to the correlation among impinging waves. Here, we may draw roughly the same conclusions as in the IS case, except for the fact that BinML and ChebML require a somewhat higher order at high SNRs, (P = 6 or 7 for ChebML, Pb = 70 or more for BinML). C. Performance of the detection-estimation scheme Fig. 6 shows the performance of the detection scheme in Sec. V in the IS scenario for P = 6 (and unknown K). The curve in Fig. 6(b) is the probability of detecting the three components in γ, and Fig. 6(a) shows the RMS error but estimated for those realizations in which the three components had been detected. The detector employed the actual noise variance σ 2 in the test in (33), if the SNR was below 37 dB. For larger SNRs, σ 2 is kept at the 37 dB level in the detection test, given that the error in the approximation of the true wave parameters by γ K,α becomes noticeable at high SNRs. Note that the detector obtains the three components with probability almost equal to one for SNRs above the −5 dB threshold. We have presented an interpolation method for the wideband DOA problem, that makes it possible to obtain DML cost functions composed of a small number of narrowbandlike components. The method is based on approximating the projection matrix involved in the DML cost function using a Chebyshev interpolator. Compared with the approach based on dividing the spectrum into separate bins and then applying a narrowband model in each of them, the proposed method produces a much smaller number of cost function summands, so reducing the computational burden significantly. We have presented two spin-offs of the method that combine the already commented interpolator with another one of the same type. This second interpolator is used to reduce the complexity of one-dimensional searches. These spin-off are an implementation of the IC-MUSIC estimator and a detection-estimation scheme for the DML estimator. The methods in the paper have been assessed in several numerical examples. R EFERENCES [1] Harry L. van Trees, Detection, Estimation, and Modulation Theory. Part IV, Optimum array processing, John Wiley & Sons, Inc, first edition, 2002. 8 [2] H. Wang and M. Kaveh, “Coherent signal-subspace processing for the detection and estimation of angles of arrival of multiple wideband sources,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 33, no. 4, pp. 823–831, Aug 1985. [3] S. Valaee and P. Kabal, “Wideband array processing using a two-sided correlation transformation,” IEEE Transactions on Signal Processing, vol. 43, no. 1, pp. 160–172, Jan 1995. [4] T. K. Yasar and T. E. Tuncer, “Wideband DOA estimation for nonuniform linear arrays with Wiener array interpolation,” in 2008 5th IEEE Sensor Array and Multichannel Signal Processing Workshop, July 2008, pp. 207–211. [5] W. J. Zeng and X. L. Li, “High-resolution multiple wideband and nonstationary source localization with unknown number of sources,” IEEE Transactions on Signal Processing, vol. 58, no. 6, pp. 3125–3136, June 2010. [6] M. Wax, Tie-Jun Shan, and T. Kailath, “Spatio-temporal spectral analysis by eigenstructure methods,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 32, no. 4, pp. 817–827, Aug 1984. [7] Yeo-Sun Yoon, L. M. Kaplan, and J. H. McClellan, “TOPS: new DOA estimator for wideband signals,” IEEE Transactions on Signal Processing, vol. 54, no. 6, pp. 1977–1989, June 2006. [8] A. K. Shaw, “Improved wideband DOA estimation using modified TOPS (mTOPS) algorithm,” IEEE Signal Processing Letters, vol. 23, no. 12, pp. 1697–1701, Dec 2016. [9] Sathish Chandran, Ed., Advances in Direction-of-Arrival Estimation, Artech House, 2006. [10] Engin Tuncer and Benjamin Friedlander, Eds., Classical and modern direction-of-arrival estimation, Elsevier, 2009. [11] M. A. Doron, A. J. Weiss, and H. Messer, “Maximum-likelihood direction finding of wide-band sources,” IEEE Transactions on Signal Processing, vol. 41, no. 1, pp. 411–414, Jan 1993. [12] Lean Yip, Joe C. Chen, Ralph E. Hudson, and Kung Yao, “Cramer-Rao bound analysis of wideband source localization and DOA estimation,” in International Symposium on Optical Science and Technology. International Society for Optics and Photonics, 2002, pp. 304–316. [13] L. Yip, C. E. Chen, R. E. Hudson, and K. Yao, “DOA estimation method for wideband color signals based on least-squares joint approximate diagonalization,” Proceedings of Sensor Array and Multichannel Signal Processing, pp. 104–107, 2008. [14] Joe C. Chen, Ralph E. Hudson, and Kung Yao, “Maximum-likelihood source localization and unknown sensor location estimation for wideband signals in the near-field,” IEEE Transactions on Signal Processing, vol. 50, no. 8, pp. 1843–1854, 2002. [15] John C. Mason and David C. Handscomb, Chebyshev polynomials, CRC Press, 2002. [16] Donald Fraser, “Interpolation by the FFT revisited–an experimental investigation,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 37, no. 5, pp. 665–675, May 1989. [17] I. Ziskind and M. Wax, “Maximum likelihood localization of multiple sources by alternating projection,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 36, pp. 1553–1560, Oct. 1988. [18] J. Selva, “ML estimation and detection of multiple frequencies through periodogram estimate refinement,” IEEE Signal Processing Letters, vol. 24, no. 3, pp. 249–253, March 2017. [19] T. V. Ho, J. G. McWhirter, A. Nehorai, U. Nickel, B. Ottersten, B. D. Steinberg, P. Stoica, M. Viberg, Z. Zhu, S. Haykin, et al., Radar array processing, vol. 25, Springer Science & Business Media, 2013. [20] Mats Viberg, Björn Ottersten, and T. Kailath, “Detection and estimation in sensor arrays using weighted subspace fitting,” IEEE Transactions on Signal Processing, vol. 39, no. 11, pp. 2436–2449, Nov. 1991. [21] L. Kaufman, “A variable projection method for solving separable nonlinear least squares problems,” BIT, vol. 15, pp. 49–57, 1975. [22] J. Selva, “An efficient Newton-type method for the computation of ML estimators in a Uniform Linear Array,” IEEE Transactions on Signal Processing, vol. 53, no. 6, pp. 2036–2045, June 2005.
7cs.IT
Two Gaussian Approaches to Black-Box Optomization Lukáš Bajer arXiv:1411.7806v1 [cs.NE] 28 Nov 2014 1 Martin Holeňa CMA Evolution Strategy CMA-ES [7, 8] is the state-of-the-art evolutionary optimization method, at least in the area of continuous black-box optimization. Basically, it consists in generating new search points by sampling from a multidimensional normal distribtion, the mean and variance of which are updated from generation to generation. In particular, the population (g+1) (g+1) x1 , . . . , xλ ∈ Rd of the g + 1-st generation, g ≥ 1, follows the normal distribution (g) with mean m ∈ Rd and variance (σ (g) )2 C (g) ∈ Rd,d resulting from the update in the g-th generation,  (g+1) xi ∼ N m(g) , (σ (g) )2 C (g) . (1) Here, σ (g) is the step size in the g-th generation. C (g) ∈ Rd,d and σ (g) > 0 are updated separately, C (g) being in the most simple case obtained as the unbiased empirical estimate based on the g-th generation: ! !⊤ λ λ λ X X X 1 1 1 (g) (g) (g) (g) (g) xi − x xi − x . (2) Cemp = λ − 1 i=1 λ j=1 j λ j=1 j The positive semidefinite matrix C (g) can be diagonalised in the basis formed by its (g) (g) eigenvectors b1 , . . . , bd , C (g) = B (g) D (g) B (g)⊤ , (g) (3) (g) where B (g) = (b1 · · · bd ) and D (g) is a diagonal matrix such that its k-th diagonal element (g) is the eigenvalue corresponding to the eigenvector bk . Consequently, the coordinates of (g+1) B (g) points generated according to (1) in that basis, {xi } , are uncorrelated:  (g+1) B (g) (g+1) {xi } = B (g)⊤ xi ∼ N B (g)⊤ m(g) , (σ (g) )2 B (g)⊤ C (g) B (g) . (4) 2 Optimization Based on Gaussian Processes A Gaussian process (GP) on a d-dimensional Euclidean space X is a collection of random variables, GPX = (f (x))x∈X , such that the joint distribution of any finite number of them is a multidimensional normal distribtion. Following [4], we differentiate two ways of using GPs in black-box optimization: 1 (i) (ii) As a surrogate model to be optimized instead of the black box objective function. On the found optimum or optima, the original black-box objective function is then evaluated. This use of GPs has been introduced in the popular Efficient Global Optimization (EGO) algorithm [14]. As the optimization method, also evolutionary optimization can be used, in particular CMA-ES [4], but this is not the only possibility: For example, traditional low-degree polynomial models, aka response surface models [20], are much more efficiently optimized using traditional smooth optimization methods. For the evolution control of the evolutionary optimization of the original objective function, i.e., for controlling the composition of its population [5, 6, 9, 23]. Irrespective of the way in which a GP is used, its construction is always based on a sequence (x1 , y1 ), . . . , (xn , yn ) ∈ X × R of training pairs and is subsequently employed to compute the random variable f (x) for x 6∈ {x1 , . . . , xn }. Since the distribution of (f (x), f (x1 ), . . . , f (xn )) is multidimensional normal, also the conditional distribution of f (x) conditioned on f (x1 ), . . . , f (xn ) is normal, f (x)|f (x1 ), . . . , f (xn ) ∼ N(µ(x; X, Y ), Σ(x; X, Y )), (5) where X = (x1 , . . . , xn ), Y = (y1 , . . . , yn ), µ(·; X, Y ) : X → X, Σ(·; X, Y ) : X → X2 . There are two commonly encountered possibilities how define the functions µ(·; X, Y ), describing the conditional GP mean, and Σ(·; X, Y ), describing the conditional GP variance: 1. A GP is the superposition of a deterministic function f¯ : X → R and a GP with zero mean. For the latter, it can be shown [21] that the function describing its mean fulfils 2 (∀x ∈ X) µ0 (x; X, Y ) = K(x, X)(K(X, X) + σnoise In )−1 Y ⊤ , (6) whereas the function describing its variance fulfills 2 (∀x ∈ X) Σ0 (x; X, Y ) = K(x, x) − K(x, X)(K(X, X) + σnoise In )−1 K(X, x). (7) Here, an i.i.d. Gaussian noise is assumed, In is the n-dimensional identity matrix, K : X × X → R is a symmetric function, and K(x, X) = (K(x, x1 ), . . . , K(x, xn )), K(X, x) = K(x, X)⊤ , K(X, X) = (K(x1 , X)⊤ , . . . , K(xn , X)⊤ )⊤ . (8) The resulting superposition then fulfils 2 (∀x ∈ X) µ(x; X, Y ) = f¯(x) + K(x, X)(K(X, X) + σnoise In )−1 (Y − (f¯(x1 ), . . . , f¯(xn )))⊤ , (9) whereas Σ = Σ0 . 2. A GP is the superposition of a Bayesian mean assuming the multiplicative form w f¯ and a GP with zero mean, where w is a random variable with w ∼ N(1, σw2 ), σw > 0, 2 and f¯ has the same meaning as above. In that case, it can be shown [21] that for x ∈ X, 2 µ(x; X, Y ) = K(x, X)(K(X, X) + σnoise In )−1 Y ⊤ + 2 + (f¯(x) − (f¯(x1 ), . . . , f¯(xn ))(K(X, X) + σnoise In )−1 K(X, x))ŵ, (10) 2 Σ(x; X, Y ) = K(x, x) − K(x, X)(K(X, X) + σnoise In )−1 K(X, x)+ + 2 σw2 (K(X, X) + σnoise In )−1 Y ⊤ + κ̂2 , (11) 2 1 + σw2 (f¯(x1 ), . . . , f¯(xn ))(K(X, X) + σnoise In )−1 (f¯(x1 ), . . . , f¯(xn ))⊤ where ŵ = 2 1 + σw2 (f¯(x1 ), . . . , f¯(xn ))(K(X, X) + σnoise In )−1 (f¯(x1 ), . . . , f¯(xn ))⊤ , 2 1 + σw2 (f¯(x1 ), . . . , f¯(xn ))(K(X, X) + σnoise In )−1 Y ⊤ 2 κ̂ = (f¯(x) − (f¯(x1 ), . . . , f¯(xn ))(K(X, X) + σnoise In )−1 K(X, x)) (12) (13) Simple, but frequently used examples of the function K occurring in (6)–(7) and (10)– (11) include: • Squared exponential, (∀x, x′ ∈ X) K(x, x′ ) = e− kx−x′ k2 2ℓ2 , ℓ > 0. (14) Here, ℓ is a parameter called characteristic length-scale. It is a parameter of the function KSE , not of the Gaussian process, the process is nonparametric. Therefore ℓ is referred to as a hyperparameter. • γ-Exponential, ′ − ′ (∀x, x ∈ X) K(x, x ) = e  kx−x′ k ℓ γ , ℓ > 0, 0 < γ ≤ 2, (15) which has 2 hyperparameters, λ and γ. • Dot product, (∀x, x′ ∈ X) K(x, x′ ) = (σ 2 + x⊤ x′ )p , σ ≥ 0, p ∈ N, (16) which has 2 hyperparameters, σ and p, or in its generalized version, (∀x, x′ ∈ X) K(x, x′ ) = (σ 2 + x⊤ Σx′ )p , Σ ∈ Rd,d positive definite, (17) which has, in addition, the matrix of hyperparameters Σ, defining a dot product in general coordinates. 3 2.1 GP-based criteria to choose the points for evaluation Whereas traditional response surface and surrogate models employ basically only one criterion for the choice of points in which the black box objective function should be evaluated, namely the global or at least local minimum of the model (if the optimization objective is minimization), GPs offer several additional criteria: (i) Minimum of a prescribed quantile (Qα ) of the distribution of f (x)|f (x1 ), . . . , f (xn ), α ∈ (0, 1). x∗α = arg min qα (N(µ(x; X, Y ), Σ(x; X, Y ))). x∈X (18) Usually, (18) is expressed using quantiles of the standard normal distribution, uα = qα (N(0, 1)), p p x∗α = arg min µ(x; X, Y ) + Σ(x; X, Y )uα = arg min µ(x; X, Y ) − Σ(x; X, Y )u1−α . x∈X x∈X (19) (ii) For α = 0.5, (19) turns to the traditional global minimum criterion, applied to µ(·; X, Y ). Probability of improvement (PoI), ! f − µ(x; X, Y ) min p x∗PI = arg max P (f (x) < fmin |f (x1 ), . . . , f (xn )) = φ , (20) x∈X Σ(x; X, Y ) where φ denotes the distribution function of N(0, 1), fmin is the minimum value found so far. More generally, probability of improvement with respect to a given T ≤ fmin , ! T − µ(x; X, Y ) . (21) x∗PI—T = arg max P (f (x) < T |f (x1 ), . . . , f (xn )) = φ p x∈X Σ(x; X, Y ) (iii) Expected improvement (EI), x∗EI = arg max E((fmin − f (x))I(f (x) < fmin )|f (x1 ), . . . , f (xn )), x∈X ( 1 f (x) < fmin, (22) where I(f (x) < fmin ) = 0 f (x) ≥ fmin . Introducing the normalized mean improvement ν : X → R, (∀x ∈ X) ν(x) = fmin − µ(x; X, Y ) p , Σ(x; X, Y ) and the notation ϕ for the density of N(0, 1), (22) can be expressed as [13] p x∗EI = arg max Σ(x; X, Y )(ν(x)φ(ν(x)) + ϕ(ν(x)))). x∈X 4 (23) (24) 3 Possible Synergy Directly connecting both considered Gaussian approaches is not possible because the normal distribution in CMA-ES is a distribution on the input space of the objective function (fitness), whereas the normal distribution in GPs is on the space of its function values. Nevertheless, it is still possible to achieve some synergy through using information from CMA-ES for the GP, and/or using information from the GP for CMA-ES. According to whoat was recalled at the beginning of Section 2, the latter possibility corresponds to using GP for the evolution control of CMA-ES. 3.1 Using Information from CMA-ES for the GP We see 2 straightforward possibilities where some information from CMA-ES can be used in the GP. 1. The function f¯ occurring in (9), (10) and (11) can be constructed using the fit(g) (g) ness values f (x1 ), . . . . . . , f (xλ ) of individuals from some particular generation or several generations of CMA-ES. Its construction can be as simple as setting f¯ to a constant aggregating the considered fitness values, e.g., their mean or weighted mean, but it can also consist in training, with those values, a response surface model, principally of any kind. 2. Kruisselbrink et al. [16], who combine CMA-ES with a GP using the γ-exponential function K, propose to employ in (15) the Mahalanobis distance of vectors x and x′ given by the covariance matrix obtained in the g-th generation of CMA-ES, (σ (g) )2 C (g) , instead of their Euclidean distance. This is actually a specific consequence of another possibility of using information from CMA-ES for the GP – replacing the original space of d-dimensional vectors, Rd , by the space of their principal components with respect to C (g) . In this context, it is worth recalling that in [2, 3, 15], Mahalanobis instead of Euclidean distance was used when combining CMA-ES with quadratic response surface models in [2, 3, 15]. In the approach presented there, the space of the principal components with respect to C (g) is used, together with an estimate of density, to locally weight the model predictions with respect to the considered input. In this way, a connection to the other kind of synergy is established, i.e., to the evolution control of CMA-ES, giving us the possibility to use both kinds in combination. 3.2 GP-Based Evolution Control of CMA-ES We intend to test the following approaches to using GP for the evolution control of CMAES. (i) Basic approach. In the (g + 1)-th generation, λ′ points x̃1 , . . . , x̃λ′ ∈ Rd are sampled from the distribution N(m(g) , (σ (g) )2 C (g) ), where λ′ is several to many times larger then λ. For all of them, a selected criterion from among those introduced in 2.1 5 Algorithm 1 Input: generation g, points x̃1 , . . . , x̃λ′ ∈ Rd ∼ N(m(g) , (σ (g) )2 C (g) ), their linear ordering ≺c , c ∈ {Qα , PoI, EI} with α ∈ (0, 1) according to a GP-based criterion to choose the points for evaluation, λ ∈ N, λ < card{x̃1 , . . . , x̃λ′ }, k ∈ {1, . . . , λ}. Step 1. Perform k-means clustering of S = {x̃1 , . . . , x̃λ′ }, k ∈ {1, . . . , λ} into sets S1 , . . . , Sk . (g+1) Step 2. For j = 1, . . . , k, choose xj = max≺c Sj . (g+1) (g+1) : i = 1, j − 1}. Step 3. For j = k + 1, . . . , λ, choose xj = max≺c S \ {xi (g+1) (g+1) Output: Points x1 , . . . , xλ to be evaluated by the original fitness function. Figure 1: Algorithm of the proposed strategy for choosing the λ points to be evaluated by the original fitness from among the λ′ evaluated by the Gaussian process (g+1) (g+1) is computed. Based on the value of that criterion, the λ points x1 , . . . , xλ for the evaluation by the original black-box fitness are chosen. This can be done according to various strategies, we intend to use the one described in Algorithm 1, with which we have a good experience from using radial basis function networks for the evolution control in the evolutionary optimization of catalytic materials [10]. The linear ordering ≺c stands in the cases c =PoI and c =EI for ≤, in the case c = Qα for ≥. The use of a linear ordering relates the proposed approach to ranking-based evolution control of CMA-ES [2, 3, 15, 23], as well as to surrogate modelling of CMA-ES by ordinal regression [17, 18, 19, 22]. Most similar is the approach by Ulmer et al. [23], the difference being that they don’t use clustering. (ii) GP on low-dimensional projections attempts to improve the basic approach in view of the experience reported in the literature [15] and obtained also in our earlier experiments [1] that GPs are actually advantageous only in low dimensional spaces. Instead of the sampled points x̃1 , . . . , x̃λ′ , the GP is trained only with their first [ℓ] [ℓ] ℓ < d principal components with respect to C (g) , x̃1 , . . . , x̃λ′ , i.e., with the projec(g) (g) tions of x̃1 , . . . , x̃λ′ to the ℓ-dimensional space Xℓ = span(b1 , . . . , bℓ ), provided the (g) orthonormal eigenvectors bi are enumerated according to decreasing eigenvalues. (iii) GP on low-dimensional projections within restricted distance attempts to decreaase the deterioration of the GP on low-dimensional projections with respect to the GP on the original sampled points x̃1 , . . . , x̃λ′ by using only points x̃i within a prescribed [ℓ] small distance ǫ from their respective projections x̃i . To this end, points from the distribution N(m(g) , (σ (g) )2 C (g) ) are resampled until λ′ points x̃i are obtained fulfilling [ℓ] [ℓ] kx̃i − x̃1 k < ǫ, or equivalently, kx̃i k2 − kx̃1 k2 < ǫ2 . (25) (iv) Two-stage sampling. Trainig the GP for the (g + 1)-th generation can easily suffer from the lack of training data in a part of the search space where a substantial proportion of the points x̃1 , . . . , x̃λ′ will be sampled. To alleviate it, the points (g+1) (g+1) x1 , . . . , xλ to be evaluated by the original fitness can be sampled in two stages: (g+1) (g+1) 1. First, points x1 , . . . , xλ′′ , where λ′′ < λ, are sampled from the distribu(g) (g) 2 (g) tion N(m , (σ ) C ), evaluated by the original fitness, and included into training the GP. 6 2. Then, λ′ points x̃1 , . . . , x̃λ′ are sampled from the same distribution, and for them, a selected criterion from among those introduced in 2.1 is computed, (g+1) (g+1) based on which the points xλ′′ +1 , . . . , xλ for the evaluation by the original black-box fitness are chosen. To this end, again Algorithm 1 can be used, with the following changes: • In the input, the numbers λ′ and k have now to fulfill λ − λ′′ < card{x̃1 , . . . , x̃λ′ }, k ∈ {1, . . . , λ − λ′′ }. (26) (g+1) (g+1) : i = 1, j − 1} is chosen only for • In Step 3, xj = max≺c S \ {xi ′′ j = k + 1, . . . , λ − λ . (g+1) (g+1) • The output contains only the points xλ′′ +1 , . . . , xλ . (v) Needless to say, this approach has to be combined with some of the approaches (i)–(iii) and can be combined with any of them. Generation-based evolution control. Whereas the previous four approaches represent, in terms of [11, 12], individual-based evolution control, we want to test also one approach that is generation-based, in the sense that the desired number λ of points is evaluated by the original black-box fitness function only in selected generations. Similarly to the evolution strategy in [18, 19], our approach selects those generations adaptively, according to the agreement between the ranking of considered points by the surrogate model and by the black-box fitness. Differently to that strategy, however, we want to base the estimation if that agreement not on the generations in which λ points have been evaluated by the black-box fitness, but on evaluating a small and evolvable number λ′′′ of additional points in each generation. In this context, it is important that in situations when the fitness is evaluated empirically, using some measurement or testing, the evaluation hardware causes the evaluation costs to increase step-wise, and to remain subsequently constant for some λhw evaluated points (e.g. in the optimization of catalyst preformance described in [10], λhw is the number of channels in the chemical reactor in which the catalysts are tested). In such a situation, the costs of evaluation are the lowest if λ is a multiple of λhw , and if the evaluation of the λ′′′ additional points in each generation is cumulated for nhw generations such that nhw = max nλ′′′ ≤ λhw . n∈N (27) Setting nhw = 1 covers the case when such a situation does not occur and the evaluation costs increase linearly with the number of points. If glast is the last generation in which λ points have been evaluated by the black-box fitness, then for g+1 ∈ Rd are sampled from the distrig = glast , . . . , glast + nhw − 1, points x̃g+1 1 , . . . , x̃λ′ (g+1) (g+1) bution N(m(g) , (σ (g) )2 C (g) ), from which the points x1 , . . . , xλ′′′ are selected by Algorithm 1, in which the input λ is replaced with λ′′′ . Subsequently, all the points (g +1) (g +n ) x1 last , . . . , xλ′′′last hw are evaluated by the black-box fitness, and for each generation g = glast + 1, . . . , glast + nhw , the agreement between the ranking of xg1 , . . . , xgλ′′′ by the current Gaussian process, GPcurrent , and the black-box fitness is estimated. If the agreement is sufficient in all considered generations, then the procedure is repeated using glast + nhw instead of glast and unchanged λ′′′ . Otherwise, additional 7 points xgλ′′′ +1 , . . . , xgλ′′′ +λ are selected from x̃g1 , . . . , x̃gλ′ for the first generation g in which the agreement was not sufficient. Then a new Gaussian process, GPnew , is trained using the training set Tnew = g [ ′ ′ {xg1 , . . . , xgλ′′′ } ∪ {xgλ′′′ +1 , . . . , xgλ′′′ +λ }, (28) g ′ =1 optionally including also some or all points from the set Tcurrent used for training GPcurrent . At that occasion, aslo the value of λ′′′ can be changed. Provided the conditions 1 ≤ λ′′′ < λ and λ′′′ + λ ≤ λ′ are fulfilled, the value of λ′′′ can be arbitrary. Needless to say, the smaller λ′′′ , the larger will be the proportion of points from the generation in which the GP was trained in its training set, and the more similar the obtained GP will normally be to a GP trained only with data from that generation, which is the usual way of using surrogate models in traditional generation-based strategies [11, 12, 18, 19]. It is also worth pointing out that our generation-based evolution control was explained here as a counterpart to the basic individual-based approach (i), but counterparts to the approaches (ii) and (iii) are possible as well. References [1] L. Bajer, V. Charypar, and M. Holeňa. Model guided sampling optimization with Gaussian processes for expensive black-box optimization. In GECCO 2013, pages 1715–1716, 2013. [2] Z. Bouzarkouna, A. Auger, and D.Y. Ding. Investigating the local-meta-model cmaes for large population sizes. In EvoApplications 2010, pages 402–411, 2010. [3] Z. Bouzarkouna, A. Auger, and D.Y. Ding. Local-meta-model cma-es for partially separable functions. In GECCO 2011, pages 869–876, 2011. [4] D. Büche, N.N. Schraudolph, and P. Koumoutsakos. Accelerating evolutionary algorithms with Gaussian process fitness function models. IEEE Transactions on Systems, Man, and Cybernetics, Part C: Applications and Reviews, 35:183–194, 2005. [5] M.A. El-Beltagy and A.J. Keane. Evolutionary optimization for computationally expensive problems using Gaussian processes. In International Conference on Artificial Intelligence, pages 708–714, 2001. [6] M. Emmerich, A. Giotis, M. Özdemir, T. Bäck, and K. Giannakoglou. Metamodelassisted evolution strategies. In PPSN VII, pages 361–370, 2002. [7] N. Hansen. The CMA evolution strategy: A comparing review. In Towards a New Evolutionary Computation, pages 75–102. Springer Verlag, Berlin, 2006. [8] N. Hansen and A. Ostermaier. Completely derandomized self-adaptation in evolution strategies. Evolutionary Computation, 9:159–195, 2001. 8 [9] E. Hoffman and S. Holemann. Controlled model assisted evolution strategy with adaptive preselection. In International IEEE Symposium on Evolving Fuzzy Systems, pages 182–187, 2006. [10] M. Holeňa, D. Linke, and L. Bajer. Surrogate modeling in the evolutionary optimization of catalytic materials. In GECCO 2012, pages 1095–1102, 2012. [11] Y. Jin. A comprehensive survery of fitness approximation in evolutionary computation. Soft Computing, 9:3–12, 2005. [12] Y. Jin, M. Olhofer, and B. Sendhoff. Managing approximate models in evolutionary aerodynamic design optimization. In CEC 2001, pages 592–599, 2001. [13] D.R. Jones. A taxonomy of global optimization methods based on response surfaces. Journal of Global Optimization, 21:345–383, 2001. [14] D.R. Jones, M. Schonlau, and W.J. Welch. Efficient global optimization of expensive black-box functions. Journal of Global Optimization, 13:455–492, 1998. [15] S. Kern, N. Hansen, and P. Koumoutsakos. Local metamodels for optimization using evolution strategies. In PPSN IX, pages 939–948, 2006. [16] J.W. Kruisselbrink, M.T.M. Emmerich, A.H. Deutz, and T. Bäck. A robust optimization approach using kriging metamodels for robustness approximation in the CMA-ES. In CEC 2010, pages 1–8, 2010. [17] I. Loshchilov, M. Schoenauer, and M. Seba. Comparison-based optimizers need comparison-based surrogates. In PPSN XI, pages 364–373, 2010. [18] I. Loshchilov, M. Schoenauer, and M. Seba. Self-adaptive surrogate-assisted covariance matrix adaptation evolution strategy. In GECCO 2012, pages 321–328, 2012. [19] I. Loshchilov, M. Schoenauer, and M. Seba. Intensive surrogate model exploitation in self-adaptive surrogate-assisted CMA-ES (saACM-ES). In GECCO 2013, pages 439–446, 2013. [20] R.H. Myers, D.C. Montgomery, and C.M. Anderson-Cook. Response Surface Methodology: Proces and Product Optimization Using Designed Experiments. John Wiley and Sons, Hoboken, 2009. [21] E. Rasmussen and C. Williams. Gaussian Process for Machine Learning. MIT Press, Cambridge, 2006. [22] T.P. Runarsson. Ordinal regression in evolutionary computation. In PPSN IX, pages 1048–1057, 2006. [23] H. Ulmer, F. Streichert, and A. Zell. Evolution strategies assisted by Gaussian processes with improved pre-selection criterion. In IEEE Congress on Evolutionary Computation, pages 692–699, 2003. 9
9cs.NE
Inverse Reinforcement Learning for Marketing Igor Halperin NYU Tandon School of Engineering arXiv:1712.04612v1 [q-fin.CP] 13 Dec 2017 e-mail: [email protected] December 14, 2017 Abstract: Learning customer preferences from an observed behaviour is an important topic in the marketing literature. Structural models typically model forward-looking customers or firms as utility-maximizing agents whose utility is estimated using methods of Stochastic Optimal Control. We suggest an alternative approach to study dynamic consumer demand, based on Inverse Reinforcement Learning (IRL). We develop a version of the Maximum Entropy IRL that leads to a highly tractable model formulation that amounts to low-dimensional convex optimization in the search for optimal model parameters. Using simulations of consumer demand, we show that observational noise for identical customers can be easily confused with an apparent consumer heterogeneity. 1 Introduction Understanding customer choices, demand and preferences, with customers being consumers or firms, is an eternal theme in the marketing literature. In particular, structural models for marketing build models of consumers or firms by modelling them as utilitymaximizing rational agents (see e.g. [1] for a review). Unlike ”reduced-form” (purely statistical) models, structural models aim to dissect true consumer choices and demand preferences from effects induced by particular marketing campaigns, thus enabling promoting new products and offers, whose attractiveness to consumer could then be assessed based on the learned consumer utility. In particular, in the area of consumer demand research, one can distinguish between static demand and dynamic demand. This paper deals with learning a consumer demand utility function in a dynamic, multi-period setting, where customers can be both strategic and non-strategic in choosing their optimal consumption over some pre-defined period of time (a week, a month, a year etc.). Such setting is relevant for marketing different recurrent utility-like plans and services such as cloud computing plans, internet data plans, utility plans (electricity, gas, phone), and so on. Structural models approach such problems by modeling forward-looking consumers as rational agents maximizing their streams of expected utilities of consumption over a planning horizon rather than their one-step utility. Structural models typically specify a 1 model for a consumer utility, and then estimate such model using methods of Dynamic Programming and Stochastic Optimal Control. The fact that such models are typically computationally heavy, as they often involve a repeated solution of a Bellman optimality equation, is one of the main stumbling blocks for a wide industrial-level deployment of structural models. We propose an alternative approach to the problem of learning consumer demand utility in a dynamic, multi-period setting, which is based on Inverse Reinforcement Learning (IRL). While IRL is widely used in robotics over years [2], more recently it has been applied in other areas as well, in particular to study human behaviour, see e.g. [3]. We are not aware, however, of any literature that would apply Inverse Reinforcement Learning specifically for problems in marketing. The main contribution of this paper is a new version of the Maximum Entropy IRL method (Ziebart 2008), that leads to a highly tractable convex optimization problem for optimal model parameters. Our model enables an easy simulation, which makes it possible to use it to study finite-sample properties of estimators for optimal parameters of the consumer utility. In particular, we use simulations to demonstrate that due to finite-sample effects, consumers with identical demand utilities might easily be mistaken for heterogeneous consumers. 1.1 Related work Learning customers preferences given their observed behaviour is an active research topic for psychology, marketing, statistical decision making, optimal control, and Artificial Intelligence (AI) communities. Depending on the field, it is usually referred to as the problem of customer choice in the marketing and psychology literature, preference elicitation in the statistical decision making literature, and Inverse Reinforcement Learning in the AI literature. In the specific context of learning the consumer dynamic demand utility, previous research largely follows the Stochastic Optimal Control (SOC) approach. In particular, a recent paper by Xu et. al. [4] develops a structural SOC-based model for estimation of mobile phone users’ preferences using their observed data daily consumption. On the side of Inverse Reinforcement Learning, our framework is rooted in The Maximum Entropy IRL (MaxEnt-IRL) [5, 6] method. Other relevant references to the Maximum Entropy IRL are Refs. [7, 8, 9]. 1.2 Outline of our approach Similarly to Xu et. al. [4], a framework presented here focuses on consumption data. While our method can be applied to a number of different business settings as outlined in the introduction (such as cloud plans, data plans, utility plans etc.), we follow Ref. [4] and consider a consumption utility of mobile phone users, to facilitate a direct comparison with their approach. Our model parametrizes users utility (reward) function in terms of a low number of free parameters (that include, in particular, the user price sensitivity), and then estimates these parameters given users’ histories of data consumption. Unlike Ref. [4], we do not follow the Stochastic Optimal Control approach, but instead rely on IRL methods devel2 oped for similar tasks in the AI and Machine Learning communities. More specifically, we develop a model based on a highly tractable version of a popular Maximum Entropy (MaxEnt) IRL method [5, 6]. Our approach has a number of important advantages over the model of Ref. [4]. First, our model estimation is much simpler, and amounts to a convex optimization problem with 5 variables, which can be easily handled using standard off-she-shelf optimization software. This enables a very efficient numerical implementation of our model. In contrast, the model of Xu et. al. relies on Monte Carlo for the model estimation. Second, our model is much easier to generalize, if needed, by adding additional features. Third, tractability of our model allows us to investigate the impact of finite-sample ”observational noise” on estimated model parameters. This issue was not addressed in Ref. [4] that suggested a substantial users’ heterogeneity based on estimation of their model with relatively short (9 months) history for a small number of users. Last but not least, our approach is general enough to be applied, with proper modifications, to learning of customer preferences in other similar settings as suggested above. The rest of the paper is organized as follows. In Sect. 2 we present our model. In Sect. 3, we show how the estimated model can be used for counterfactual simulations and design of marketing strategies. Sect. 4 presents numerical experiments. 2 Model formulation 2.1 User utility function Consider a customer that purchased a single-service plan with the monthly price F , initial quota q0 , and price p to be paid for the unit of consumption upon breaching the monthly quota on the plan1 . We specify a single-step utility (reward) function of a customer at time t = 0, 1, . . . , T −1 (where T is a lenght of a payment period, e.g. a month) as follows: 1 (1) r(at , qt , dt ) = µat − βa2t + γat dt − ηp(at − qt )+ + κqt Iat =0 2 Here at ≥ 0 is the daily consumption on day t, qt ≥ 0 is the remaining allowance at the start of day t, and dt is the number of remaining days until the end of the billing cycle, and we use a short notation x+ = max(x, 0) for any x. The fourth term in Eq.(1) is proportional to the payment p(at − qt )+ made by the customer once the monthly quota q0 is exhausted. Parameter η gives the price sensitivity of the customer, while parameters µ, β, γ specify the dependence of the user reward on the state-action variables qt , dt , at . Finally, the last term ∼ κqt Iat =0 gives the reward received upon zero consumption at = 0 at time t (here Iat =0 is an indicator function that is equal to one if at = 0, and is zero otherwise). Model calibration amounts to estimation of parameters η, µ, β, γ, κ given the history of user’s consumption. 1 For plans that do not allow breaching the quota q0 , the present formalism still applies by setting the price p to infinity. 3 Note that the reward (1) can be equivalently written as follows (here K = 5): r(at , qt , dt ) = ΘΦ(at , qt , dt ) = K−1 X θk Φk (at , qt , dt ) (2) k=0 where 1 θ0 = µhat i, θ1 = − βha2t i, θ2 = γhat dt i, 2 θ3 = −ηph(at − qt )+ i, θ4 = κhqt Iat =0 i (here hXi stands for the empirical mean of X), and the following set of basis functions {Φk }K−1 k=0 is used: Φ0 (at , qt , dt ) = at /hat i, Φ1 (at , qt , dt ) = a2t /ha2t i, Φ2 (at , qt , dt ) = at dt /hat dt i, Φ3 (at , qt , dt ) = (at − qt )+ /h(at − qt )+ i Φ4 (at , qt , dt ) = qt Iat =0 /hqt Iat =0 i (3) Our definition of the user reward given by Eq.(1) is similar to the definition proposed in Ref. [4], but differs from it in four aspects. First, we add a possible bi-linear dependence of the reward on daily consumption and the number dt of the remaining days on the plan. Second, we do not scale parameter β to β = 1 as in Ref. [4] (this is because our framework is not, and should not be, scale-invariant). Third, we add a reward for zero consumption, given by the term κqt Iat =0 in Eq.(1)2 . Last, and most importantly, we do not add a random daily ”user shock” ξt to the value of µ, as was done in Ref. [4]. The fundamental reason for the presence of such ”private user shocks” in the user utility function in the approach of Ref. [4] is that in the setting of classical Markov decision process (MDP) problems where the dynamics are typically stochastic but both policy and rewards are deterministic, a demonstrated sub-optimal (instead of an optimal) behavior can lead to diverging solutions for model parameters, and/or assign zero probabilities to demonstrated trajectories3 . It is exactly this problem that is addressed by introducing private (i.e. unobserved to the modeller) shocks ξt in the structural model approach adopted in Ref. [4]: the reward function is augmented by an additional random term σ(at , qt , dt )ξt with some parametrized ”volatility” function σ(at , qt , dt ) (in Ref.[4], the particular form σ(at , qt , dt ) = at was used), while the exercised policy π(at , qt , dt , ξt ) that gives the next value of at is a deterministic function of ξt . All model estimations in this framework are therefore based 2 We note that our specification of no-consumption behavior is more flexible than what suggested by Xu et. al. [4], who interpret zero-consumption events as observations of a Gaussian process censored at zero. Instead, our model unties the link between the zero-consumption and non-zero consumption events at the price of introducing an additional free parameter κ. 3 The classical MDP problems deal with a completely observed Markov process, where an optimal deterministic policy always exists. Therefore, classical Stochastic Optimal Control methods typically work with deterministic policies. 4 on a Monte Carlo simulation of paths of the private shocks ξt , and then using them to generate paths of the observables (at , qt ) at each time step. Instead of relying on the structural models’ paradigm, we follow the ideas of the Maximum Entropy approach to Inverse Reinforcement Learning (IRL), which is probabilistic and assigns probabilities to observed paths [5, 6]. Due to its probabilistic specification, this approach does not require introducing a random shock to the utility function in order to reconcile the model with a possible sub-optimal behavior. As will be clear below, our approach has a number of advantages over the method of Ref. [4]. Most importantly, it does not need Monte Carlo to estimate parameters of the user utility, and instead relies on a straightforward Maximum Likelihood Estimation (MLE) with a convex negative loglikelihood function with 5 variables, which can be done very efficiently using the standard off-the-shelf convex optimization software. Moreover, our model enables, if needed, easily generalizations of the reward function by adding more of basis functions, while keeping the rest of the methodology intact. 2.2 Inverse Optimal Control and Inverse Reinforcement Learning The problem of estimating the reward (traditionally referred to as the inter-temporal utility function in economics and econometrics literature) given the observed behavior is a problem of inverse optimal control. In direct optimal control, the objective is to optimize the strategy (i.e. the consumption policy π(at |qt , dt )) such that the expected total reward (total utility) of the user is maximized, assuming the the dynamics of consumption are known, or estimated independently. The (direct) Reinforcement Learning (RL) addresses the same problem, but without knowledge of the dynamics and instead relying on samples from the system. In contrast, in the Inverse Optimal Control (IOC) or Inverse Reinforcement Learning (IRL) formulations, the problem is to find the reward given the observed behavior (which can be obtained in an off-line or on-line setting). While in the IOC setting the dynamics are assumed to be known, in the IRL approaches the dynamics are unknown, and only samples obtained under these dynamics are available. Note that Ref. [4] uses a two-step structural approach to estimating the consumption model which first estimates the empirical policy and then finds structural parameters of the utility function that are consistent with this empirically ”observed” optimal policy. A similar approach that tries to simultaneously estimate both the reward and policy function compatible with this reward is sometimes employed in the IRL literature. On the contrary, our Maximum Entropy IRL model is much simpler, as in our setting the reward parameters Θ automatically fix the user policy function, due to the fact that the cumulative consumption process is deterministic given the daily consumption. 2.3 Maximum Entropy IRL and Relative Entropy IRL The Maximum Entropy IRL (MaxEnt-IRL) [5, 6] method is currently the most popular approach to IRL. The Maximum Entropy argument is applied in our setting to a singlestep (daily) transition probability P (qt+1 , at |qt , dt ). The MaxEnt solution is to require that this distribution should match empirical counts φk (at , qt , dt ) along such one-step paths, 5 but otherwise should stay as close as possible to a uniform distribution. Quantitatively, the last condition is imposed as the condition of minimization of the Kallback-Leibler relative entropy between the distribution sought and a uniform distribution. We use an extension of the MaxEnt-IRL called Relative Entropy IRL [7] which replaces the uniform distribution in the MaxEnt method by a non-uniform benchmark (or ”prior”) distribution π0 (at |qt , dt ). This produces the exponential single-step transition probability: P (qt+1 = qt − at , at |qt , dt ) ≡ π(at |qt , dt ) π0 (at |qt , dt ) π0 (at |qt , dt ) = exp (r(at , qt , dt )) = exp (ΘΦ(at , qt , dt )) Zθ (qt , dt ) Zθ (qt , dt ) where Zθ (qt , dt ) is a state-dependent normalization factor Z Zθ (qt , dt ) = π0 (at |qt , dt ) exp (ΘΦ(at , qt , dt )) dat (4) (5) We note that most applications of MaxEnt IRL deal with multi-step trajectories as prime objects, and define the partition function Zθ on the space of trajectories. While the fist applications of MaxEnt IRL calculated Zθ exactly for small discrete state-action spaces as in [5], for large or continuous state-action spaces such calculation can only be done approximately using approximate dynamic programming, or other methods. For example, the Relative Entropy IRL approach of Bourarias et. al. [7] uses importance sampling from a reference (”background”) policy distribution to calculate Zθ 4 . It is this calculation that poses the main computational bottleneck for applications of MaxEnt/RelEnt IRL methods for large or continuous state-action spaces. In contrast to that, in our approach state-dependent normalization factors Zθ (qt , dt ) are defined per each time step. Because we trade a path-dependent ”global” partition function Zθ for a local state-dependent factor Zθ (qt , dt ), we do not need to rely on exact or approximate dynamic programming to calculate this factor. Our method is somewhat similar to the approach of Bourarias et. al. (as it also relies on the Relative Entropy minimization), but in our case both the reference distribution π0 (at |qt , dt ) and normalization factor Zθ (qt , dt ) are defined on a single time step, and calculation of Zθ (qt , dt ) amounts to computing the integral (5). As we show below, this integral can be calculated analytically with a properly chosen distribution π0 (at |qt , dt ). To this end, we propose to use a mixture discrete-continuous distribution for the reference (”prior”) action distribution π0 (at |qt , dt ): π0 (at |qt , dt ) = ν̄0 δ(at ) + (1 − ν̄0 )π̃0 (at |qt , dt )Iat >0 (6) where δ(x) stands for the Dirac delta-function, and Ix>0 = 1 if x > 0 and zero otherwise. The continuous component π̃0 (at |qt , dt ) is given by a spliced Gaussian distribution     (1 − ω0 (qt , dt ))φ1 at , µ0 +γ0 dt , 1 if 0 < at ≤ qt β0 β0   (7) π̃0 (at |qt , dt ) =  ω0 (qt , dt )φ2 at , µ0 +γ0 dt −η0 p , 1 if a ≥ q t t β0 β0 4 Furthermore, the reference distribution can be adapted to the estimated path distribution, as is done in the Guided Cost Search algorithm of Ref. [9]. 6 where φ1 (at , µ1 , σ12 ) and φ2 (at , µ2 , σ22 ) are probability density functions of two truncated normal distributions defined separately for small and large daily consumption levels, 0 ≤ at ≤ qt and at ≥ qt , respectively (in particular, they both are separately normalized to one). The mixing parameter 0 ≤ ω0 (qt , dt ) ≤ 1 is determined by the continuity condition at at = qt :     µ0 + γ0 dt 1 µ0 + γ0 dt − η0 p 1 (1 − ω0 (qt , dt ))φ1 qt , , = ω0 (qt , dt )φ2 qt , , (8) β0 β0 β0 β0 As this matching condition may involve large values of qt where the normal distribution would be exponentially small, in practice it is better to use it by taking logarithms of both sides: ω0 (qt , dt ) = 1 n    o 1 0 dt 1 + exp log φ2 qt , µ0 +γ0βd0t −η0 p , β10 − log φ1 qt , µ0 +γ , β0 β0 (9) The ”prior” mixing-spliced distribution (6), albeit represented in terms of simple distributions, leads to potentially quite complex dynamics that make intuitive sense and appear largely consistent with observed patterns of consumption. In particular, note that Eq.(7) indicates that large fluctuations at > qt are centered around a smaller mean value µ−γdβt −ηp t of smaller fluctuations 0 < at ≤ qt . Both a reduction of the than the mean value µ−γd β mean upon breaching the remaining allowance barrier and a decrease of the mean of each component with time appear quite intuitive in the current context. As will be shown below, a ”posterior” distribution π(at |qt , dt ) inherits these properties, while also further enriching the potential complexity of dynamics5 . The advantage of using the mixed-spliced reference distribution (6) as a reference distribution π0 (at |qt , dt ) is that the state-dependent normalization constant Zθ (qt , dt ) can be evaluated exactly with this choice: Zθ (qt , dt ) = ν̄0 eκqt + (1 − ν̄0 ) (I1 (θ, qt , dt ) + I2 (θ, qt , dt )) (10) where s  (µ0 + µ + (γ0 + γ)dt )2 (µ0 + γ0 dt )2 − I1 (θ, qt , dt ) = (1 − ω0 (qt , dt )) 2(β0 + β) 2β0     +γ)dt t −(β0 +β)qt √ 0 N − µ0 +µ+(γ0√+γ)d − N − µ0 +µ+(γ β0 +β β0 +β     × µ0√ +γ0 dt 0 dt −β0 qt N − µ0 +γ√ − N − β0 β0 s  β0 (µ0 + µ − (η0 + η)p + (γ0 + γ)dt )2 I2 (θ, qt , dt ) = ω0 (qt , dt ) exp (11) β0 + β 2(β0 + β)   +γ)dt −(β0 +β)qt  1 − N − µ0 +µ−(η0 +η)p+(γ √ 0 2 (µ0 − η0 p + γ0 dt ) β0 +β   − + ηpqt × 2β0 √ 0 dt −β0 qt 1 − N − µ0 −η0 p+γ β0 exp β0 + β  β0 5 in particular, it promotes a static mixing coefficient ν0 to a state- and time-dependent variable νt = ν(qt , dt ). 7 where N (x) is the cumulative normal probability distribution. T Probabilities of T -steps paths τi = {ait , qti , dit }t=0 (where i enumerates different userpaths) are obtained as products of single-step probabilities: P (τi ) = Y (at ,qt ,dt )∈τi Here Φ(τi ) (at , qt , dt ) = served path τi :  π0 (at |qt , dt ) exp (ΘΦ(at , qt , dt )) ∼ exp ΘΦ(τi ) (at , qt , dt ) Zθ (qt , dt ) (12) n oK−1 (τ ) Φk i (at , qt , dt ) are cumulative feature counts along the obk=0 (τ ) Φk i (at , qt , dt ) = X Φk (at , qt , dt ) (13) (at ,qt ,dt )∈τi Therefore, the total path probability in our model is exponential in the total reward along a trajectory, as in the ”classical” MaxEnt IRL approach [5], while the pre-exponential factor is computed differently as we operate with one-step, rather than path-probabilities. Parameters Θ defining the exponential path probability distribution (12) can be estimated by the standard Maximum Likelihood Estimation (MLE) method. Assume we have N historically observed single-cycle consumption paths, and assume these path probabilities are independent6 . The total likelihood of observing these data is L(θ) = N Y Y i=1 (at ,qt ,dt )∈τi π0 (at |qt , dt ) exp (ΘΦ(at , qt , dt )) Zθ (qt , dt ) (14) The negative log-likelihood is therefore, after omitting the term log π0 (at |qt , dt ) that does not depend on Θ7 , and rescaling by 1/N ,   N X 1 1 X X ΘΦ(at , qt , dt ) − log L(θ) = log Zθ (qt , dt ) − N N i=1 (at ,qt ,dt )∈τi (qt ,dt )∈τi   N X X 1  = log Zθ (qt , dt ) − ΘΦ(τi ) (at , qt , dt ) (15) N i=1 (qt ,dt )∈τi (0) Given an initial guess for the optimal parameter θk , we can also consider a regularized version of the negative log-likelihood:   N X X 1 1  log Zθ (qt , dt ) − ΘΦ(τi ) (at , qt , dt ) + λ||θ − θ(0) ||q (16) − log L(θ) = N N i=1 (qt ,dt )∈τi 6 A more complex case of co-dependencies between rewards for individual customers can be considered, but we will not pursue this approach here. Note that this specification formally enables calibration at the level of an individual customer, in which case N would be equal to the number of consumption cycles observed for this user. However, in practice the feasibility of single-name calibration depends on finite-sample properties of the MLE, which will be discussed in Sect. 4. 7 Note that Zθ (qt , dt ) still depends on π0 (at |qt , dt ), see Eq.(5). 8 where λ is a regularization parameter, and q = 1 or q = 2 stand for the L1 - and L2 -norms, respectively. The regularization term can also be given a Bayesian interpretation as the contribution of a prior distribution on θk when the MLE estimation (14) is replaced by a Bayesian Maximum A-Posteriori (MAP) estimation. As is well known, exponential models like (12) give rise to convex negative loglikelihood functions, therefore our final objective function (16) is convex in parameters Θ (as can also be verified by a direct calculation), and therefore has a unique solution for any value of θ(0) and λ. This ensures stability of the calibration procedure and a smooth evolution of estimated model parameters Θ between individual customers or between groups of customers. 2.4 Computational aspects The regularized negative log-likelihood function (16) can be minimized using a number of algorithms for convex optimization. If λ = 0 (i.e. no regularization is used), or q = 2, the objective function is differentiable, and gradient-based methods can be used to calibrate parameters θk . When λ > 0 and the L1 -regularization is used, the objective function is non-differentiable at zero, which can be addressed by using the Orhant-Wise variant of the L-BFGS algorithm, as suggested in Ref. [8]. 2.5 Possible extensions for different payment schemes So far, we assumed a pricing scheme where a customer pays an upfront price Fj in the beginning of a month, has an initial quota of q0j ,, and pays a fixed price p for a unit of consumption once the quota is spent before the end of the month. In practice, there may exist a number of modifications to such pricing scheme. First, some service providers may not allow for additional consumption beyond the quota q0 , so that customers who breach it would only be given a minimally required level of service, for example a low speed access. As was mentioned above, this case can be treated in our framework by taking the limit p → ∞ in the formulae above. Other service/pricing schemes would require further adjustments to the model. In particular, in addition to a ”main” monthly plan, customers might have access to different plan adjustments and extensions available once the monthly quota is exhausted. This could be handled in our framework by making the state dynamics fully stochastic, rather than locally deterministic as before: qt+1 = (qt + qe − at )+ where qe is an extra quota that can be added to the plan at a cost C(qe ). As such irregular adjustments would probably be only made only a few (or zero) days in a month, qe would be equal zero at most days in a month, and therefore can again be modeled as a mixture of a delta-function at zero and a discrete (or continuous, depending on range of options offered by the service provider) distribution. A mixing weight of this distribution can depend on the current remaining quota qt , remaining days dt to the end of a payment period, and possibly some other additional factors. Simultaneously, the reward function 9 (1) would need to be adjusted by subtracting an additional term ηC(qe ): 1 r(at , qt , dt , qe ) = µat − βa2t + γat dt − ηp(at − qt − qe )+ + κ(qt + qe )Iat =0 − ηC(qe ) 2 While such extensions of the model are possible, we leave them for a future research, and concentrate on the basic setting presented above in our numerical experiments below. 3 3.1 Counterfactual simulations Action probabilities After the model parameters Θ are estimated using the MLE method of Eq.(15) or (16), the model can be used for counterfactual simulations of total user rewards assuming that users adopt plans with different upfront premia Fj , prices pj , and initial quota qj (0). To this end, note that given the daily consumption at and the previous values qt−1 , dt−1 , the next values are deterministic: qt = (qt−1 − at )+ , dt = dt−1 − 1. Therefore, in our model path probabilities are solely defined by action probabilities, and the probability density of different actions at ≥ 0 at time t can be obtained from a one-step probability P (τ ) ∼ exp (r(at , qt , dt )). Using Eqs.(1) and (4), this gives:   1 2 π0 (at |qt , dt ) exp µat − βat + γat dt − ηp(at − qt )+ + κqt Iat =0 (17) π(at |qt , dt ) = Zθ (qt , dt ) 2 Using the explicit form of a mixture discrete-continuous prior distribution π0 (at |qt , dt ) given by Eq.(6), we can express the ”posterior” distribution π(at |qt , dt ) in the same form: π(at |qt , dt ) = νt δ(at ) + (1 − νt )π̃(at |qt , dt )Iat >0 (18) where the mixture weight becomes state- and time-dependent: νt = ν̄0 exp{κqt } ν̄0 exp{κqt } = Zθ (qt , dt ) ν̄0 eκqt + (1 − ν̄0 ) (I1 (θ, qt , dt ) + I2 (θ, qt , dt )) (here we used Eq.(10)), and the spliced Gaussian component is     (1 − ω(θ, qt , dt ))φ1 at , µ0 +µ+(γ0 +γ)dt , 1 if 0 < at ≤ qt β0 +β β0 +β   π̃(at |qt , dt ) =  ω(θ, qt , dt )φ2 at , µ0 +µ−(η0 +η)p+(γ0 +γ)dt , 1 if at ≥ qt β0 +β β0 +β (19) (20) where the weight ω(θ, qt , dt ) can be obtained using Eqs.(17) and (10). After some algebra, this produces the following formula ω(θ, qt , dt ) = I2 (θ, qt , dt ) 1 = I t ,dt ) 1 I1 (θ, qt , dt ) + I2 (θ, qt , dt ) 1 + I2 (θ,q (θ,qt ,dt ) 10 (21) where functions I1 (θ, qt , dt ), I2 (θ, qt , dt ) are defined above in Eqs.(11). The ratio I1 (θ, qt , dt )/I2 (θ, qt , dt ) can be equivalently represented in the following form: I1 (θ, qt , dt ) =e I2 (θ, qt , dt )   2 µ +µ+(γ0 +γ)dt p (η +η)2 −p(η0 +η) qt − 0 β +β − 2(β0 +β) 0 0 R qt   µ +µ+(γ0 +γ)dt 2 − 21 (β0 +β) at − 0 β +β e 0 dat  R ∞ − 1 (β0 +β) at − µ0 +µ+(γ0 +γ)dt −(η0 +η)p 2 β0 +β e 2 dat qt 0 (22) It can be checked by a direct calculation that Eq.(21) with the ratio I1 (θ, qt , dt )/I2 (θ, qt , dt ) given by Eq.(22) coincides with the formula for the weight that would be obtained from a continuity condition at at = qt if we started directly with Eq.(20). This would produce, similarly to Eq.(9), 1   o n  µ0 +µ+(γ0 +γ)dt 1 1 t −(η0 +η)p , − log φ q , , 1 + exp log φ2 qt , µ0 +µ+(γ0β+γ)d 1 t β0 +β β0 +β β0 +β 0 +β (23) The fact that two expressions (21) and (23) coincide means that the ”posterior” distribution π(at |qt , dt ) is continuous at at = qt as long as the prior distribution π0 (at |qt , dt ) is continuous there. Along with continuity at at = qt , the optimal (or ”posterior”) action distribution π(at |qt , dt ) has the same mixing discrete-spliced Gaussian structure as the reference (”prior”) distribution π0 (at |qt , dt ), while mixing weights, means and variances of the component distributions are changed. Such structure-preserving property of our model is similar in a sense to a structure-preservation property of conjugated priors in Bayesian analysis. Note that simulation from the spliced Gaussian distribution (20) is only slightly more involved than simulation from the standard Gaussian distribution. This involves first simulating a component of the spliced distribution, and then simulating a truncated normal random variable from this distribution. Different consumption paths are obtained by a repeated simulation from the mixing distribution (18), along with deterministic updates of the state variables qt , dt . Examples will be presented below in Sect. 4. ω0 (qt , dt ) = 3.2 Total expected utility of a plan Given a consumption plan for a particular service with the monthly fee Fj , initial allowance q0,j and price pj (where j = 1, . . . , J), the total expected utility at the start of the plan is X E [r(at , qt , dt )|q0 = q0,j , p = pj ] (24) Rjtot = −ηFj + t If a given customer picked plan j among all J possible plans, and we assume the customer acted rationally, this produces a set of inequalities Rjtot ≥ Rktot , ∀k 6= j (25) which equivalently can be represented as a set of inequalities for parameter η: P P t E [r(at , qt , dt )|q0 = q0,k , p = pk ] − t E [r(at , qt , dt )|q0 = q0,j , p = pj ] , ∀k 6= j η≥ Fk − Fj (26) 11 Depending on the specification of a consumption plan, this relation can be used for either a verification (or improvement) of an estimate of η obtained from the MLE procedure presented above, or alternatively as the only source for calibration of η. In particular, some service providers do not permit any additional consumption beyond the plan limit. While this can formally be represented as a particular case of the formalism presented above in the limit p → ∞, it also would mean that any consumption beyond a quota limit would not be present in data, and hence the price sensitivity parameter η could not be learned from the MLE procedure. The only way to infer η in such case would be to rely on inequalities (26) which provide a low bound for this parameter. Expected rewards that appear in the numerator of Eq.(26) should be calculated by simulation after other model parameters are estimated using the MLE. 3.3 Counterfactual simulation for promotion design For the promotion design of possible upgrade offers (Fj , q0,j , pj ) (j = 1, . . . , J), one can rely on a counter-factual analysis of a future customer behavior upon different plan upgrade scenarios. We can simulate N future consumption paths, and then again use Eq.(24) which we repeat here for convenience, to calculate the expected utility of future consumption: X E [r(at , qt , dt )|q0 = q0,j , p = pj ] (27) Rjtot = −ηFj + t Different consumption plans can therefore be compared quantitatively, and sorting them in the decreasing order in Rjtot (with j = 1, . . . , J) reveals their decreasing attractiveness to the customer in terms of their total expected utilities. 4 4.1 Numerical experiments Simulation of consumptions paths To test our model, we generate artificial data from the model by simulating paths of daily consumption from the mixing-spliced distribution Eq.(18) as described at the end of Sect. 3.1. The simulation of daily consumption is illustrated in Fig. 1, while the resulting trajectories for remaining allowance are shown in Fig. 2, where we pick the following values of model parameters: q0 = 600, p = 0.55, µ = 0.018, β = 0.00125, γ = 0.0005, η = 0.1666, κ = 0.0007. In addition, we set µ0 = µ, β0 = β, γ0 = γ, η0 = η, κ0 = κ, and ν0 = 0.05. Note that consumption may vary quite substantially from one month to another (e.g. a customer can run out of the quota at about 80% of the time period, or can have a residual unused quota at the end of the month) purely due to the observational noise, even though the utility function stays the same. 12 Figure 1: Simulated daily consumption 4.2 Finite-sample properties of MLE estimators While the Maximum Likelihood Estimation (MLE) is known to provide asymptotically unbiased results for estimated model parameters, in practice we have to deal with data that have limited length of history at the level of individual customers. For example, the structural model of Ref. [4] was trained on 9 months of data for 1000 customers. While the number of customers to be included for analysis can potentially be increased by collecting more data, collecting long individual-level consumption histories might be more difficult due to a number of factors such as e.g. a customer mobility. In view of such potential limitations with availability of long time series for service consumption, it is important to investigate finite-sample properties of the MLE estimators in the setting of our model. In particular, note that even if two customers have the same ”true” model parameters, their finite-sample MLE estimates would be in general different for these customers. Therefore, ability of the model to differentiate between individual customers hinges upon the size of the bias and variance of its MLE estimator in realistically expected settings regarding the amount of data available for analysis. We note that the authors of Ref. [4] reported a substantial heterogeneity of estimated model parameters for their dataset of 9 months of observations for 1000 users, however they did not address the finite-sample properties of their estimators, thus leaving out a simplest interpretation of their results as due to ”observational noise” in their estimators that would be observed even for a perfectly homogeneous set of customers. We have estimated the ”empirical” distribution of MLE estimators for our model by repeatedly sampling Nm months of consumption history, which is done Np times, while keeping the model parameters fixed as per above. For each model parameter, we compute a histogram of its Np estimated values. The results are presented in Figs. 3- 5, where we show the resulting histograms for Nm = 10, 100 and 1000 months of data, respectively, while keeping the number of ex13 Figure 2: Simulated remaining allowance periments Np = 100 for all graphs. Note that for all parameters except β, the standard deviation of the MLE estimate for Nm = 10 is nearly equal its mean. This implies that two users with 10 months of daily observations can hardly be differentiated by the model unless their implied parameters differ by a factor of two or more. This might cast some doubts on a model-implied customer heterogeneity suggested in a similar setting in Ref. [4], and suggests that some, if not all, of this heterogeneity can simply be explained by a finite-sample noise of a model estimation procedure, while all customers are actually undistinguishable from the model perspective. On the other hand, one can see how both the bias and variance of MLE estimators decrease, as they should, with an increased span of the observation period from 10 usermonths to 1000 user-months. These results suggest that in practice, the model should be calibrated using groups of customers with a similar consumption behavior. While the problem of finding such groups is outside of scope of this work, this task can be addressed using available techniques for clustering time series. 5 Summary We have presented a very tractable version of Maximum Entropy Inverse Reinforcement Learning (IRL) for a dynamic consumer demand estimation, that can be applied technique for designing appropriate marketing strategies for new products and services. The same approach can be applied, upon proper modifications to similar problems in marketing and pricing of recurrent utility-like services such as cloud plans, internet plans, electricity and gas plans, etc. The model enables easy simulations, which is helpful for conducting counter-factual experiments. On the IRL/Machine Learning side, unlike most of other versions of the Maximum Entropy IRL, our model does not have to solve a Bellman optimality equation even once. The model estimation in our approach amounts to convex optimization in a low-dimensional space, which can be solved using a standard off-the14 shelf optimization software. This is much easier computationally than structural models that typically rely on a Monte Carlo simulation for model parameter estimation. References [1] P. Chintagunta, T. Erdem, P. E. Rossi, and M. Wedel, ”Structural Modeling in Marketing: Review and Assessment”, Marketing Science, Vol. 25, no.6 (2006), pp. 604-616. [2] J. Kober, J. A. Bagnell, and J. Peters, ”Reinforcement Learning in Robotics: a Survey”, International Journal of Robotic Research, vol. 32, no. 11 (2013), pp. 12381278. [3] S. Liu, M. Araujo, E. Brunskill, R. Rosetti, J. Barros, and R. Krishnan, ”Undestanding Sequential Decisions via Inverse Reinforcement Learning”, 2013 IEEE 14th International Conference on Mobile Data Management. [4] L. Xu, J.A. Smith, Y. Hu, Y. Cheng, and Y. Zhu, ”A Dynamic Structural Model for Heterogeneous Mobile Data Consumption and Promotion Design” (2015), working paper, available at https://www.krannert.purdue.edu/academics/MIS/workshop/Xuetal 2015 DynamicMobileData.pdf. [5] Brian D. Ziebart et. al., ”Maximum Entropy Inverse Reinforcement Learning” (2008), AAAI, p. 1433-1438 (2008). [6] B.D. Ziebart, J.A. Bagnell, and Anind K. Dey, ”The Principle of Maximum Causal Entropy for Estimating Interacting Processes”, IEEE Transactions on Information Theory, (2012). [7] A. Boularias, J. Kober, and J. Peters, ”Relative Entropy Inverse Reinforcement Learning” (2011). [8] , M. Kalakrishnan, P. Pastor, L. Righetti, and S. Schaal, ” Learning Objective Functions for Manipulations”, in International Conference on Robotics and Automation (ICRA), 2013. [9] C. Finn, S. Levine, and P. Abbeel, ”Guided Cost Learning: Deep Inverse Optimal Control via Policy Optimization” (2016). 15 Figure 3: Distributions of MLE estimators for Nm = 10 months of data 16 Figure 4: Distributions of MLE estimators for Nm = 100 months of data 17 Figure 5: Distributions of MLE estimators for Nm = 1000 months of data 18
2cs.AI
arXiv:1612.00432v1 [math.GR] 1 Dec 2016 Magnus pairs in, and free conjugacy separability of, limit groups Larsen Louder & Nicholas W.M. Touikan December 2, 2016 Abstract There are limit groups having non-conjugate elements whose images are conjugate in every free quotient. Towers over free groups are freely conjugacy separable. 1 Introduction This paper is concerned with the problem of finding free quotients of finitely generated groups in which non-conjugate elements have non-conjugate images. Given a finitely generated group G which is not a limit group, there is a finite collection of limit group quotients G ։ L1 , . . . , G ։ Ln of G such that every homomorphism G → F, where F is a free group, factors through one of the factor groups G ։ Li , hence it suffices to consider the problem only for limit groups. We are reduced then to the problem of finding free quotients of limit groups in which non-conjugate elements have non-conjugate images. A group is freely conjugacy separable, or F-conjugacy separable, if for any pair u, v ∈ G of nonconjugate elements there is a homomorphism to some free group G → F such that the images of u and v in F are non-conjugate. We will give two different types of examples of limit groups which are not F-conjugacy separable for entirely different reasons. In Section 2 we produce a limit group L with elements u, v such that the cyclic groups hui, hvi are nonconjugate, but whose normal closures hhuii and hhvii coincide. We call such a pair of elements a Magnus pair (see Definition 2.1.) Such elements must have conjugate images in any free quotient by a theorem of Magnus [Mag31]. In Section 3 we construct a limit group which is a double of a free group over a cyclic group generated by a C-test word (see Definition 3.1). These limit groups, called C-doubles, are low rank and we are able to construct their Makanin-Razborov diagrams encoding all homomorphisms into any free group and directly observe the failure of free conjugacy separability. This limit group was independently discovered and studied by Simon Heil [Hei16], who published a preprint while this paper was in preparation. He uses this limit group to show that limit groups are not freely subgroup separable. 1 Definition 1.1. A sequence of homomorphisms {φi : G → H} is discriminating if for every finite subset P ⊂ G\ {1} there is some N such that for all j ≥ N, 1 6∈ φj (P ). Definition 1.2. A finitely generated group L is a limit group if there is a discriminating sequence of homomorphisms {φi : L → F}, where F is a free group. Theorem A. The class of limit groups is not freely conjugacy separable. This should be seen in contrast to the fact that limit groups are conjugacy separable [CZ07]. Furthermore Lioutikova in [Lio03] proves that iterated centralizer extensions (see Definition 4.3) of a free group F are F-conjugacy separable. It is a result of of Kharlampovich and Miasnikov [KM98b] that all limit groups embed in to iterated centralizer extensions. Moreover by [GLS09, Theorem 5.3] almost locally free groups [GLS09, Definition 4.2] cannot have Magus pairs. This class includes the class of limit groups which are ∀∃-equivalent to free groups. The class of iterated centralizer extensions and the class of limit groups ∀∃-equivalent to free groups are contained in the class of towers, also known as NTQ groups. We generalize these previous results to the class of towers with the following strong F-conjugacy separability result: Theorem B. Let F be a non-abelian free group and let G be a tower over F (see Definition 4.3). There is a discriminating sequence of retractions {φi : G ։ F}, such that for any finite subset S ⊂ G of pairwise non-conjugate elements, there is some positive integer N such that for all j ≥ N the elements of φj (S) are pairwise non-conjugate in F. Similarly for any indivisible γ ∈ L with cyclic centralizer there is some positive integer M such that for all k ≥ M , rk (γ) is indivisible. This theorem also settles [GLS09, Question 7.1], which asks if arbitrarily large collections of pairwise nonconjugate elements can have pairwise nonconjugate images via a homomorphism to a free group. The proof of Theorem B is in Section 4 and follows from results of Sela [Sel03] and Kharlampovich and Myasnikov [KM05], which form the first step in their (respective) systematic studies of the ∀∃-theory of free groups. Finally, in Section 5 we analyze the failure of free conjugacy separability of our limit group with a Magnus pair and show that this is very different from C-double constructed in Section 3. We then show that the free conjugacy separability does not isolate the class of towers within the class of limit groups. Throughout this paper, unless mentioned otherwise, F will denote a nonabelian free group, Fn will denote a non-abelian free group of rank n, and F(X) will denote the free group on the basis X. 2 A limit group with a Magnus pair Consider the of the fundamental group of the graph of spaces U given in Figure 1. We pick elements u, v ∈ π1 (U) corresponding to the similarly labelled loops 2 Σu ◭ ◭ u◭ ◮ ◭ ◭ ◮ v ◭ ◭ ◭ Σv Figure 1: The graph of spaces U. The attaching maps are of degree 1 and the black arrows show the orientations. given in Figure 1 and we also consider groups π1 (Σu ), π1 (Σv ) to be embedded into π1 (U). Definition 2.1. Let G be a group, and let ∼± be the equivalence relation g ∼± h if and only if g is conjugate to h or h−1 , and denote by [g]± the ∼± equivalence class of g. A Magnus pair is a pair of ∼± classes [g]± 6= [h]± such that hhgii = hhhii. Note that if h ∈ [g]± then hhgii = hhhii, and that the relation “have the same normal closure” is coarser than ∼± , and if a group has a Magnus pair then it is strictly coarser than ∼± . To save notation we will say that g and h are a Magnus pair if their corresponding equivalence classes are. Lemma 2.2. The elements u and v in π1 (U) are a Magnus pair. Proof. The graph of spaces given in Figure 1 gives rise to a cyclic graph of groups splitting D of π1 (U). The underlying graph X has 4 vertices and 8 edges where the vertex groups are hui, hvi, π1 (Σu ), and π1 (Σv ). Now note that π1 (Σu ) can be given the presentation π1 (Σu ) = ha, b, c, d | abcd = 1i = ha, b, ci and that the incident edge groups have images hai, hbi, hci, habci = hdi. Without loss of generality v ±1 is conjugate to a,b, and c in π1 (U) and u±1 is conjugate to d = abc in π1 (U) which means that u ∈ hhvii and, symmetrically considering Σv , v ∈ hhuii. On the other hand, the elements hai, hbi, hci, habci are pairwise non-conjugate in ha, b, ci and we now easily see that u and v are non-conjugate by considering the action on the Bass-Serre tree. u and v therefore form a Magnus pair. 3 2.1 Strict homomorphisms to limit groups Definition 2.3. Let G be a finitely generated group and let D be a 2-acylindrical cyclic splitting of G. We say that a vertex group Q of D is quadratically hanging (QH) if it satisfies the following: • Q = π1 (Σ) where Σ is a compact surface such that χ(Σ) ≤ −1, with equality only if Σ is orientable or ∂(Σ) 6= ∅. • The images of the edge groups incident to Q correspond to the π1 -images of ∂(Σ) in π1 (Σ). Definition 2.4. Let G be torsion-free group. A homomorphism ρ : G → H is strict if there some 2-acylindrical abelian splitting D of G such that the following hold: • ρ is injective on the subgroup AD generated by the incident edge groups of each each abelian vertex group A of D. • ρ is injective on each edge group of D. • ρ is injective on the “envelope” R̂ of each non-QH, non-abelian vertex group R of D, where R̂ is constructed by first replacing each abelian vertex group A of D by AD and then taking R̂ to be the subgroup generated by R and the centralizers of the edge groups incident to R. • the ρ-images of QH subgroups are non-abelian. This next Proposition is a restatement of Proposition 4.21 of [CG05] in our terminology. It is also given as Exercise 8 in [BF09, Wil09]. Proposition 2.5. If L is a limit group, G is some finitely generated group such that there is a strict homomorphism ρ : G → L, then G is also limit group. 2.2 π1 (U) is a limit group but it is not freely conjugacy separable. Consider the sequence of continuous maps given in Figure 2. The space on the top left obtained by taking three disjoint tori, identifying them along the longitudinal curves as shown, and then surgering on handles H1 , H2 is homeomorphic to the space U. A continuous map from U to the wedge of three circles is then constructed by filling in and collapsing the handles to arcs h1 , h2 , identifying the tori, and then mapping the resulting torus to a circle so that the image of the longitudinal curve u (or v, as they are now freely homotopic inside a torus) maps with degree 1 onto a circle in the wedge of three circles. Lemma 2.6. The homomorphism π1 (U) → F3 given by the continuous map in Figure 2 is onto, the vertex groups π1 (Σv ), π1 (Σu ) have non-abelian image and the edge groups hui, hvi are mapped injectively. 4 H1 Σv u ◭ v ◭ Σu h1 H2 u ◭ v ◭ h1 h2 u ◭ h1 h2 u h2 Figure 2: A continuous map from U to the wedge of three circles. The space on the top left is homeomorphic to U. This can be seen by cutting along the curves labelled u, v. Proof. The surjectivity of the map π1 (U) → F3 as well as the injectivity of the restrictions to hui, hvi are obvious. Note moreover that the image of π1 (Σu ) contains (some conjugate of) hu, h1 uh−1 1 i and is therefore non-abelian, the same is obviously true for the image of π1 (Σv ). The final ingredient is a classical result of Magnus. Theorem 2.7 ([Mag31]). The free group F has no Magnus pairs. Proposition 2.8. π1 (U) is a limit group. For every homomorphism ρ : π1 (U) → F the images ρ(u), ρ(v) of the elements u, v given in Lemma 2.2 are conjugate in F even though the pair u, v are not conjugate in π1 (U). Proof. Lemma 2.6 and Proposition 2.5 imply that π1 (U) is a Limit group. Lemma 2.2 and Theorem 2.7 imply that, for every homomorphism π1 (U) → F to a free group F, the image of u must be conjugate to the image of v ±1 even though u 6∼± v. 5 3 A different failure of free conjugacy separability We now construct another limit group L that is not freely conjugacy separable, but for a completely different reason. Definition 3.1 (C-test words [Iva98]). A non-trivial word w(x1 , . . . , xn ) is a C-test word in n letters for Fm if for any two n-tuples (A1 , . . . , An ), (B1 , . . . , Bn ) of elements of Fm the equality w(A1 , . . . , An ) = w(B1 , . . . , Bn ) 6= 1 implies the existence of an element S ∈ Fm such that Bi = SAi S −1 for all i = 1, 2, . . . , n. Theorem 3.2 ([Iva98, Main Theorem]). For arbitrary n ≥ 2 there exists a non-trivial indivisible word wn (x1 , . . . , xn ) which is a C-test word in n letters for any free group Fm of rank m ≥ 2. Definition 3.3 (Doubles and retractions). Let F(x, y) denote the free group on two generators, let w = w(x, y) denote some word in {x, y}±1 . The amalgamated free product D(x, y; w) = hF(x, y), F(r, s) | w(x, y) = w(r, s)i is the double of F(x, y) along w. The homomorphism ρ : D(x, y; w) ։ F(x, y) given by r 7→ x, s 7→ y is the standard retraction. Definition 3.4. Let u ∈ F(x, y) ≤ D(x, y; w), but with u 6∼± wn for any n, be given by a specific word u(x, y). Its mirror image is the distinct element u(r, s) ∈ F(r, s) ≤ D(x, y; w). u(x, y) and u(r, s) form a mirror pair. It is obvious that mirror pairs are not ∼± -equivalent. Let w be a C-test word and let L = D(x, y; w). It is well known that any such double is a limit group. We will call L a C-double. Lemma 3.5. The C-double L cannot map onto a free group of rank more than 2. Proof. w is not primitive in F(x, y) therefore by [She55] L = D(x, y; w) is not free. Theorem 3.2 specifically states that w is not a proper power. It now follows from [Lou13, Theorem 1.5] that D(w) cannot map onto F3 . The proof of the next theorem amounts to analyzing a Makanin-Razborov diagram. We refer the reader to [Hei16] for an explicit description of this diagram. Theorem 3.6. For any map φ : L → F from a C-double to some free group, if u(x, y) ∈ F(x, y) lies in the commutator subgroup [F(x, y), F(x, y)], but is not conjugate to wn for any n, then the images φ (u(x, y)) and φ (u(r, s)) of mirror pairs are conjugate. In particular the limit group L is not freely conjugacy separable. Furthermore mirror pairs u(x, y), u(r, s) do not form Magnus pairs. 6 Proof. To answer this question we must analyze all maps for L to a free group. By Lemma 3.5, any such map factors through a surjection onto F2 , or factors through Z. Case 1: φ(w) = 1. In this case the factor F(x, y) does not map injectively, it follows that its image is abelian. It follows that φ factors through the free product πab : D(x, y; w) → F(x, y)ab ∗ F(r, s)ab . In this case all elements of the commutator subgroups of F(x, y) and F(r, s) are mapped to the identity and therefore have conjugate images. Case 2: φ(w) 6= 1. In this case the factors F(x, y), F(r, s) ≤ D(x, y; w) map injectively. By Theorem 3.2, since w is a C-test word and φ(w(x, y)) = φ(w(r, s), there is some S ∈ F2 such that Sφ(x)S −1 = φ(r) and Sφ(y)S −1 = φ(s). Suppose now that w(x, y) mapped to a proper power, then by [Bau65, Main Theorem] w(x, y) ∈ F(x, y) is part of a basis, which is impossible. It follows that the centralizer of φ (w) is hφ(w)i so that S = φ(w)n . Therefore φ(r) = wn φ(x)w−n and φ(s) = wn φ(y)w−n and the result follows in this case as well. We now show that a mirror pair u(x, y) and u(r, s) is not a Magnus pair. Consider the quotient D(x, y; w)/hhu(x, y)ii. By using a presentation with generators and relations, the group canonically splits as the amalgamated free product (F(x, y)/hhu(x, y)ii) ∗hwi (F(r, s)/hhwn ii) where hwn i = hwi∩hhuii and w is the image of w in hwi/hwn i. Now if hhu(x, y)ii = hhu(r, s)ii then we must have D(x, y; w)/hhu(r, s)ii = D(x, y; w)/hhu(x, y)ii. This implies F(r, s)/hh(u(r, s))ii = F(r, s)/hhwn ii, which implies by Theorem 2.7 that u(r, s) ∼± wn , which is a contradiction. It seems likely that failure of free conjugacy separability should typically follow from C-test word like behaviour, rather than from existence of Magnus pairs. 4 Towers are freely conjugacy separable. Definition 4.1. Let G be a group. A regular quadratic extension of G is an extension G ≤ H such that • H splits as a fundamental group of a graph of groups with two vertex groups: Hv1 = G and Hv2 = π1 (Σ) where Hv2 is a QH vertex group (See Definition 2.3.) • There is a retraction H ։ G such that the image of π1 (Σ) in G is non abelian. We say that Σ is the surface associated to the quadratic extension. And note that if ∂Σ = ∅ then H = G ∗ π1 (Σ). 7 Definition 4.2. Let G be a group. An abelian extension by the free abelian group A is an extension G ≤ G∗hui (hui⊕A) = H where u ∈ G is such that either its centralizer ZG (u) = hui, or u = 1. In the case where u = 1 the extension is G ≤ G ∗ A and it is called a singular abelian extension. Definition 4.3. Let F be a (possibly trivial) free group. A tower of height n over F is a group G obtained from a sequence of extensions F = G0 ≤ G1 ≤ . . . ≤ Gn = G where Gi ≤ Gi+1 is either a regular quadratic extension or an abelian extension. The G′i s are the levels of the tower G and the sequence of levels is a tower decomposition. A tower consisting entirely of abelian extensions is an iterated centralizer extension. Definition 4.4. Let F = G0 ≤ . . . ≤ Gn = G be a tower decomposition of G. We call the graphs of groups decomposition of Gi with one vertex group Gi−1 and the other vertex group a surface group or a free abelian group as given in Definitions 4.1 and 4.2 the ith level decomposition. Towers appear as NTQ groups in the work of Kharlampovich and Miasnikov, and as ω-residually free towers, as well as completions of strict resolutions in the the work of Sela. It is a well known fact that towers are limit groups [KM98a]. This also follows easily from Proposition 2.5 and the definitions. Proposition 4.5. Let G be a tower of height n over F. Then G is discriminated by retractions G → Gn−1 . G is also discriminated by retractions onto F. Following Definition 1.15 of [Sel03] we have: Definition 4.6. Let G be a tower. A closure of G is another tower G⋆ with an embedding θ : G ֒→ G⋆ such that there is a commutative diagram G0 G1 ≤ ... ≤ Gn = G ≤ G⋆1 ≤ ... ≤ G⋆n = G⋆ = ≤ G0 where the injections Gi ֒→ G⋆i are restrictions of θ and the horizontal lines are tower decompositions. Moreover the following must hold: 1. If Gi ≤ Gi+1 is a regular quadratic extension with associated surface Σ such that ∂Σ is “attached” to hu1 i, . . . , hun i ≤ Gi then G⋆i ≤ G⋆i+1 is a regular quadratic extension with associated surface Σ such that ∂Σ is “attached” to hθ(u1 )i, . . . , hθ(un )i ≤ G⋆i , in such a way that θ : Gi ֒→ G⋆i extends to a monomorphism θ : Gi+1 ֒→ G⋆i+1 which maps the vertex group π1 (Σ) surjectively onto the vertex group π1 (Σ) ≤ G⋆i+1 . 8 2. If Gi ≤ Gi+1 is an abelian extension then G⋆i ≤ G⋆i+1 is also an abelian extension. Specifically (allowing ui = 1) if Gi+1 = Gi ∗hui i (hui i ⊕ Ai ), then G⋆i+1 = G⋆i ∗hθ(ui )i (hθ(ui )i⊕A′i ). Moreover we require the embedding θ : Gi+1 → G⋆i+1 to map hui i⊕Ai to a finite index subgroup of hθ(ui )i⊕A′i . We will now state one of the main results of [KM05] and [Sel03] but first some explanations of terminology are in order. Towers are groups that arise as completed limit groups corresponding to a strict resolution and the definition of closure corresponds to the one given in [Sel03]. We also note that our requirement on the Euler characteristic of the surface pieces given in Definitions 2.3 and 4.1 ensures that our towers are coordinate groups of normalized NTQ systems as described in the discussion preceding [KM05, Lemma 76], we also point out that a correcting embedding as described right before [KM05, Theorem 12] is in fact a closure in the terminology we are using. We now give an obvious corollary (in fact a weakening) of [Sel03, Theorem1.22], or [KM05, Theorem 12]; they are the same result. Let X, Y denote fixed tuples of variables. Lemma 4.7 (∀∃-lifting Lemma). Let F be a fixed non-abelian free group and let G = hF, X | R(F, X)i be a standard finite presentation of a tower over F. Let Wi (X, Y, F) = 1 and Vi (X, Y, F) 6= 1 be (possibly empty) finite systems of equations and inequations (resp.) If the following holds: m  _  Wi (X, Y, F) = 1 ∧ Vi (X, Y, F) 6= 1 F |= ∀X∃Y R(F, X) = 1 → i=1 then there is an embedding θ : G ֒→ G⋆ into some closure such that G⋆ |= ∃Y m   _ Wi (θ(X), Y, F) = 1 ∧ Vi (θ(X), Y, F) 6= 1 i=1 where X and F are interpreted as the corresponding subsets of G = hF, X | R(F, X)i In the terminology of [Sel03] we have G = hF, Xi and G⋆ = hF, X, Zi for some collection of elements Z. Let Y = (y1 , . . . , yk ) be a tuple of elements in G⋆ that witness the existential sentence above. A collection of words yi (F, X, Z) =G∗ yi is called a set of formal solution in G⋆ . According to [KM05, Definition 24] the tuple Y ⊂ G⋆ is an R-lift. Proposition 4.8. Let G be a tower over a non abelian free group Fand let S ⊂ G be a finite family of pairwise non-conjugate elements of G. There exists a discriminating family of retractions ψi : G ։ F such that for each ψi the elements of ψi (S) are pairwise non-conjugate. 9 Proof. Suppose towards a contradiction that this was not the case. Then either there exists a finite subset P ⊂ G \ {1} such that for every retraction r : G ։ F, 1 ∈ r(P ) or the elements of r(S) are not pairwise non-conjugate. If we write elements of P and S as fixed words {pi (F, X)} and {sj (F, X)} (resp.) then we can express this as a sentence. Indeed, consider first the formula:     _ _ ΦP,S (F, X, t) =  pi (F, X) = 1 ∨  t−1 si (F, X)t = sj (F, X) pi ∈P (si ,sj )∈∆(S) where ∆(S) = {(x, y) ∈ S × S | x 6= y)}. In English this says that either some element of P vanishes or two distinct elements of S are conjugated by some element t. We therefore have: F |= ∀X [(R(F, X)) = 1) → ∃tΦP,S (F, X, t)] . (1) It now follows by Lemma 4.7 that there is some closure θ : G ֒→ G⋆ such that G⋆ |= ∃tΦP,S (F, θ(X), t). Since 1 6∈ P and θ is a monomorphisms none of the pi (F, X) are trivial so   _  G⋆ |= ∃t  t−1 si (F, X)t = sj (F, X)  . (si ,sj )∈∆(S) In particular there are elements u, v ∈ G which are not conjugate in G but are conjugate in G⋆ . We will derive a contradiction by showing that this is impossible. We proceed by induction on the height of the tower. If the tower has height 0 then G = F and the result obviously holds. Suppose now that the claim held for all towers of height m ≤ n. Let G have height n and let u, v be nonconjugate elements of G let G ≤ G⋆ be any closure and suppose that there is some t ∈ G⋆ \ G such that tut−1 = v. Let D be the nth level decomposition of G⋆ and let T be the corresponding Bass-Serre tree. Let T (G) be the minimal G-invariant subtree and let DG be the splitting induced by the action of G on T (G). By Definition 4.6 DG is exactly the nth level decomposition of G and two edges of T (G) are in the same G-orbit if and only if they are in the same G⋆ -orbit. We now consider separate cases: Case 1: Without loss of generality u is hyperbolic in the nth level decomposition of G. If v is elliptic in the nth level decomposition of G then it is elliptic in the nth -level decomposition of G⋆ and therefore cannot be conjugate to u which acts hyperbolically on T . It follows that both u, v must be hyperbolic elements with respect to the nth level decomposition of G. Let lu , lv denote the axes of u, v (resp.) in T (G) ⊂ T . Since tut−1 = v, we must have t · lu = lv . Let e be some edge in lu then by the previous paragraph t·e ⊂ lv must be in the same G-orbit as e, which means that 10 there is some g ∈ G such that gt·e = e, but again by Definition 4.6 the inclusion G ≤ G⋆ induces a surjection of the edge groups of the nth level decomposition of G to the edge groups of the nth level decomposition of G⋆ , it follows that gt ∈ G which implies that t ∈ G contradicting the fact that u, v were not conjugate in G. Case 2: The elements u, v are elliptic in the nth level decomposition of G. Suppose first that u, v were conjugate into Gn−1 , then the result follows from the fact that there is a retraction G ։ Gn−1 and by the induction hypothesis. Similarly by examining the induced splitting of G ≤ G⋆ , we see that u cannot be conjugate into Gn−1 and v into the other vertex group of the nth -level decomposition. We finally distinguish two sub-cases. Case 2.1: Gn−1 ≤ G is an abelian extension by the free abelian group A and u, v are conjugate in G into some free abelian group hwi ⊕ A. Any homomorphic image of hwi ⊕ A in F must lie in a cyclic group, since u 6= v in G⋆ and G⋆ is discriminated by retractions onto F, there must be some retraction r : G⋆ → F such that r(u) 6= r(v) which means that u, v are sent to distinct powers of a generator of the cyclic subgroup r(hwi ⊕ A). It follows that their images are not conjugate in F so u, v cannot be conjugate in G⋆ . Case 2.2: Gn−1 ≤ G is a quadratic extension and u and v are conjugate in G into the vertex group π1 (Σ). Arguing as in Case 1 we find that if there is some t ∈ G⋆ such that tut−1 = v then there is some g ∈ G such that gt fixes a vertex of T (G) ⊂ T whose stabilizer is conjugate to π1 (Σ). Again by the surjectively criterion in item 1. of Definition 4.6, gt ∈ G contradicting the fact that u, v were not conjugate in G. All the possibilities have been exhausted so the result follows. proof of Theorem B. Let S1 ⊂ S2 ⊂ S3 ⊂ . . . be an exhaustion of representatives of distinct conjugacy classes of G by finite sets. For each Sj let {ψij } be the discriminating sequence given by Proposition 4.8. We take {φi } to be the diagonal sequence {ψii }. This sequence is necessarily discriminating and the result follows. It is worthwhile to point out that test sequences given in the proof of [Sel03, Theorem 1.18] or the generic sequence given in [KM05, Definition 44], because of their properties, must satisfy the conclusions of Theorem B. As an immediate consequence of the Sela’s completion construction ([Sel03, Definition 1.12]) or canonical embeddings into NTQ groups ([KM06, §7]) Theorem B implies the following: Corollary 4.9. Let L be a limit group and suppose that for some finite set S ⊂ L there is a homomorphism f : L → F such that: • The elements of f (S) are pairwise non-conjugate. • There is a factorization f = fm ◦ fm−1 ◦ · · · ◦ f1 11 such that each fi is a strict homomorphisms between limit groups (see Definition 2.4). Then there is a discriminating sequence ψi : L → F such that for all i the elements ψi (S) are pairwise non-conjugate. 5 5.1 Refinements π1 (U) is almost freely conjugacy separable. The limit group L constructed in Section 3 had an abundance of pairs of nonconjugate elements whose images had to have conjugate images in every free quotient. The situation is completely different for our Magnus pair group. Proposition 5.1. hui, hvi ≤ π1 (U) are the only maximal cyclic subgroups of π1 (U) whose conjugacy classes cannot be separated via a homomorphism to a free group π1 (U) → F. Proof. We begin by embedding π1 (U) into a hyperbolic tower. Let ρ : π1 (U) ։ F3 be the strict homomorphism given in Figure 2. Consider the group L = hπ1 (U), F3 , s | u = ρ(u), svs−1 = ρ(v)i. This presentation naturally gives a splitting D of L given in Figure 3. We have Σu ◭ ◭ u◭ ◮ ◭ F3 ◭ ◭ ◮ ◭ v ◭ Σv Figure 3: The splitting D of L. a retraction ρ∗ : L ։ F3 given by   g 7→ ρ(g); g ∈ π1 (U) f 7→ f ; f ∈ F3 ρ∗ :  s 7→ 1 It therefore follows that L is a hyperbolic tower over F3 . 12 Claim: if α, β ∈ π1 (U) ≤ L are non-conjugate in π1 (U) and α, β are not both conjugate to hui or hvi in π1 (U) then they are not conjugate in L. If both α and β are elliptic, then this follows easily from the fact that the vertex groups are malnormal in L. Also α cannot be elliptic while β is hyperbolic. Suppose now that α, β are hyperbolic. Let T be the Bass-Serre tree corresponding to D and let T ′ = T (π1 (U)) be the minimal π1 (U) invariant subtree. Suppose that there is some s ∈ L such that sαs−1 = β, then as in the proof of Proposition 4.8 and Proposition we find that for some g ∈ π1 (U) either gs permutes two edges in T ′ that are in distinct π1 (U)-orbits or it fixes some edge in T ′ . The former case is impossible and it is easy to see that the latter case implies that gs ∈ π1 (U). Therefore we have a contradiction to the assumption that α, β are not conjugate in π1 (U). The claim is now proved. It therefore follows that if α, β ∈ π1 (U) ≤ L are as above, then by Theorem B there exists some retraction r : L ։ F3 such that r(α), r(β) are non-conjugate. This construction gives an alternative proof to the fact that π1 (U) is a limit group. The group L constructed is a triangular quasiquadratic group and the retraction ρ∗ makes it non-degenerate, and therefore an NTQ group. L and therefore π1 (U) ≤ L are therefore limit groups by [KM98a]. 5.2 C-doubles do not contain Magnus pairs. Theorem B enables us to examine a C-double L more closely. Proposition 5.2. The C-double L constructed in Section 3 does not contain a Magnus pair. Proof. We need to show that if two elements u, v of L have the same normal closure in L then they must be conjugate. Suppose that u, v are both elliptic with respect to the splitting (as a double) of L but not conjugate. By Theorem 3.2 if they are conjugate to a mirror pair (ug , v h ) for some g, h ∈ L then they do not form a Magnus pair, i.e. they have separate normal closures. Otherwise there are homomorphisms L → F in which u, v have non-conjugate images, therefore by Theorem 2.7 the normal closures of their images are distinct; so hhuii 6= hhvii as well. Suppose now that u or v is hyperbolic in L. Recall the generating set x, y, r, s for L given in Definition 3.3. Let F = F(x, y) and consider the embedding into a centralizer extension, represented as an HNN extension L ֒→ hF, t|tw(x, y) = w(x, y)ti = F∗thwi x 7→ x, r 7→ t −1 y 7→ y xt, s 7→ t−1 yt The stable letter t makes mirror pairs conjugate in this bigger group. A hyperbolic element of L can be written as a product of syllables u = a1 (x, y)a2 (r, s) · · · al (r, s) 13 with a1 or al possibly trivial. The image of u in F∗thwi is   u = a1 (x, y) t−1 a2 (x, y)t · · · t−1 al (x, y)t . Consider the set of words of the form   w1 (x, y) t−1 w2 (x, y)t · · · wN −1 (x, y) t−1 wN (x, y)t , with w1 or wN possibly trivial. This set is clearly closed under multiplication, inverses and passing to Fthwi -normal form. It follows that we can identify the image of L with this set of words, which we call t−1 ∗ t-syllabic words. Each factor wi (x, t) or t−1 wj (x, y)t is called a t−1 ∗ t-syllable. It is an easy consequence of Britton’s Lemma that if u is a hyperbolic, i.e. with cyclically reduced syllable length more than 1, t−1 ∗ t-syllabic word and g −1 ug is again t−1 ∗ t-syllabic for some g in F∗thwi then g must itself be t−1 ∗ tsyllabic. Indeed this can be seen by cyclically permuting the F∗thwi -syllables of a cyclically reduced word u. We refer the reader to [LS01, §IV.2] for further details about normal forms and conjugation in HNN extensions. Suppose now that u, v are non conjugate in L, but have the same normal closure in L. Since at least one of them is hyperbolic in L, it is clear from the embedding that its image must also be hyperbolic with respect to the HNN splitting F∗thwi. Now, since hhuiiL = hhviiL , in the bigger group F∗thwi we have: hhuiiF∗t hwi = hhhhuiiL iiF∗t hwi = hhhhviiL iiF∗t hwi = hhviiF∗t hwi By Theorem B or [Lio03] centralizer extensions are freely conjugacy separable, therefore they cannot contain Magnus pairs. It follows that u, v must be conjugate in the bigger F∗thwi . Let g −1 ug =F∗thwi v. Now both u and v must be hyperbolic so it follows that g must also be a t−1 ∗ t-syllabic word; thus g is in the image of L of F∗thwi . Furthermore since the map L ֒→ F∗thwi is an embedding g −1 ug =F∗thwi v ⇒ g −1 ug =L v, contradicting the fact that u, v are non conjugate in L. 5.3 A non-tower limit group that is freely conjugacy separable In this section we construct a limit group that is freely conjugacy separable but which does not admit a tower structure. Let H ≤ [F, F] be some f.g. malnormal subgroup of F, e.g. H = haba−1 b−1 , b−2 a−1 b2 ai ≤ F(a, b). And pick h ∈ H \ [H, H] such that H is rigid relative to h, i.e. H has no non-trivial cyclic or free splittings relative to hhi. Because h ∈ [F, F] there is is a quadratic extension F < F ∗hhi π1 (Σ) where Σ has one boundary component and has genus g = genus(h), in particular there is a retraction onto F. Consider now the subgroup L = H ∗hhi π1 (Σ). 14 Proposition 5.3. L as above is freely conjugacy separable. Proof. Because H ≤ F was chosen to be malnormal, an easy Bass-Serre theory argument (e.g. apply [LS01, Theorem IV.2.8]) tells us that α, β ∈ L are conjugate if and only if they are conjugate in F ∗hhi π1 (Σ). On the other hand by Theorem B, F ∗hhi π1 (Σ), and hence L, are freely conjugacy separable. Definition 5.4. A splitting X is elliptic in a splitting Y if every edge group in X is conjugate to a vertex group of Y. Otherwise we say X is hyperbolic in Y. Theorem 5.5 ([RS97, Theorem 7.1]). Let G be an f.p. group with a single end. There exists a reduced, unfolded Z-splitting of G called a JSJ decomposition of G with the following properties: 1. Every canonical maximal QH (recall definition 2.3) subgroup (CMQ) of G is conjugate to a vertex group in the JSJ decomposition. Every QH subgroup of G can be conjugated into one of the CMQ subgroups of G. Every non-CMQ vertex groups in the JSJ decomposition is elliptic in every Z-splitting of G. 2. An elementary Z-splitting G = A ∗C B or G = A∗C which is hyperbolic in another elementary Z-splitting is obtained from the JSJ decomposition of G by cutting a 2-orbifold corresponding to a CMQ subgroup of G along a weakly essential simple closed curve (s.c.c.). 3. Let Θ be an elementary Z-splitting G = A ∗C B or G = A∗C which is elliptic with respect to any other elementary Z splitting of G. There exists a G-equivariant simplicial map between a subdivision of TJSJ , the BassSerre tree corresponding to the JSJ decomposition, and TΘ , the Bass-Serre tree corresponding to Θ. 4. Let Λ be a general Z-splitting of G. There exists a Z-splitting Λ1 obtained from the JSJ decomposition by splitting the CMQ subgroups along weakly essential s.c.c. on their corresponding 2-orbifolds, so that there exists a G-equivariant simplicial map between a subdivision of the Bass-Serre tree TΛ1 and TΛ . 5. If JSJ1 is another JSJ decomposition of G, then there exists a G-equivariant simplicial map h1 from a subdivision of TJSJ to TJSJ1 , and a G-equivariant simplicial map h2 from a subdivision of TJSJ1 to TJSJ , so that h1 ◦ h2 and h2 ◦ h1 are G-homotopic to the corresponding identity maps. We note that item 5. of the above theorem describes the canonicity of a JSJ decomposition. Lemma 5.6. The splitting L = H ∗hhi π1 (Σ) is a cyclic JSJ splitting. Proof. This is an elementary Z splitting of L, let’s see how it can be obtained from the JSJ decomposition given in Theorem 5.5. The first case is if h is elliptic in every other splitting. Then by 3. of Theorem 5.5 there exists an L- equivariant 15 map ρ from TJSJ to the Bass-Serre tree T corresponding to H ∗hhi π1 (Σ) in which H stabilizes a vertex v. It follows that H acts on φ−1 ({v}) = TH ⊂ TJSJ . Since H is rigid relative to h and h acts elliptically on TJSJ , TH cannot be infinite, since that would imply that H admits an essential cyclic splitting relative to h. TH must in fact be a point. Otherwise TH is a finite tree tree and there must be a “boundary” vertex u ∈ TH such that H 6≥ Lu . Since φ(u) = v, L-equivariance implies that Lu fixes v so that Lu ≤ H, which is a contradiction. It follows that in this case H is actually a vertex group of the JSJ decomposition and π1 (Σ) must be a CMQ vertex group. The second case is that h is hyperbolic in some other Z-splitting D of L. Since H is rigid relative to h, H must be hyperbolic with respect to D. Now by 2. of Theorem 5.5 the splitting L = H ∗hhi π1 (Σ) can be obtained from the JSJ splitting of L by cutting along a simple closed curve on some CMQ vertex group, and this curve is conjugate to h. But this means that H admits a cyclic splitting as a graph of groups with a QH vertex group π1 (Σ′ ) such that the π1 -image of some connected component of ∂Σ′ is conjugate to hhi, in particular H must have a cyclic splitting relative to h, which contradicts the fact that H is rigid relative to h. Proposition 5.7. The limit group L = H ∗hhi π1 (Σ) does not admit a tower structure. Proof. Suppose towards a contradiction that L was a tower, consider the last level: Ln−1 < Ln = L. Since L has no non-cyclic abelian subgroups Ln−1 < L must be a hyperbolic extension. This means that L admits a cyclic splitting D with a vertex group Ln−1 and a QH vertex group Q. Since L = H ∗hhi π1 (Σ) is a JSJ decomposition and π1 (Σ) is a CMQ vertex group. By 1. and 4. of Theorem 5.5, the QH vertex group Q must be represented as π1 (Σ1 ), where Σ1 is a connected subsurface Σ1 ⊂ Σ. It follows from 4. of Theorem 5.5 that the other vertex group must be Ln−1 = H ∗hhi π1 (Σ′ ) where Σ′ = Σ \ Σ1 . Since Ln−1 < L is a quadratic extension there is a retraction L ։ Ln−1 . Note however that because Σ′ has at least two boundary components H ∗hhi π1 (Σ′ ) = H ∗ Fm where m = −χ(Σ′ ). Now since we have a retraction L ։ Ln−1 there is are xi , yi ∈ Ln−1 such that g Y [xi , yi ] h= i=1 But this would imply that h ∈ [Ln−1 , Ln−1 ] which is clearly seen to be false by abelianizing H ∗ Fm and remembering that h 6∈ [H, H]. 16 References [Bau65] Gilbert Baumslag. Residual nilpotence and relations in free groups. J. Algebra, 2:271–282, 1965. [BF09] Mladen Bestvina and Mark Feighn. Notes on Sela’s work: limit groups and Makanin-Razborov diagrams. In Geometric and cohomological methods in group theory, volume 358 of London Math. Soc. Lecture Note Ser., pages 1–29. Cambridge Univ. Press, Cambridge, 2009. [CG05] Christophe Champetier and Vincent Guirardel. Limit groups as limits of free groups. Israel J. Math., 146:1–75, 2005. [CZ07] S. C. Chagas and P. A. Zalesskii. Limit groups are conjugacy separable. Internat. J. Algebra Comput., 17(4):851–857, 2007. [GLS09] Anthony M Gaglione, Seymour Lipschutz, and Dennis Spellman. Almost locally free groups and a theorem of magnus: Some questions. Groups–Complexity–Cryptology, 1(2):181–198, 2009. [Hei16] Simon Heil. Jsj decompositions of doubles of free groups. arXiv preprint arXiv:1611.01424, 2016. [Iva98] SV Ivanov. On certain elements of free groups. Journal of Algebra, 204(2):394–405, 1998. [KM98a] O. Kharlampovich and A. Myasnikov. Irreducible affine varieties over a free group. I. Irreducibility of quadratic equations and Nullstellensatz. J. Algebra, 200(2):472–516, 1998. [KM98b] O. Kharlampovich and A. Myasnikov. Irreducible affine varieties over a free group. II. Systems in triangular quasi-quadratic form and description of residually free groups. J. Algebra, 200(2):517–570, 1998. [KM05] Olga Kharlampovich and Alexei Myasnikov. Implicit function theorem over free groups. J. Algebra, 290(1):1–203, 2005. [KM06] Olga Kharlampovich and Alexei Myasnikov. Elementary theory of free non-abelian groups. J. Algebra, 302(2):451–552, 2006. [Lio03] Ekaterina Lioutikova. Lyndon’s group is conjugately residually free. Internat. J. Algebra Comput., 13(3):255–275, 2003. [Lou13] Larsen Louder. Scott complexity and adjoining roots to finitely generated groups. Groups, Geometry, and Dynamics, 7(2):451–474, 2013. [LS01] Roger C. Lyndon and Paul E. Schupp. Combinatorial group theory. Classics in Mathematics. Springer-Verlag, Berlin, 2001. Reprint of the 1977 edition. 17 [Mag31] Wilhelm Magnus. Untersuchungen über einige unendliche diskontinuierliche Gruppen. Math. Ann., 105(1):52–74, 1931. [RS97] E. Rips and Z. Sela. Cyclic splittings of finitely presented groups and the canonical JSJ decomposition. Ann. of Math. (2), 146(1):53–109, 1997. [Sel03] Z. Sela. Diophantine geometry over groups. II. Completions, closures and formal solutions. Israel J. Math., 134:173–254, 2003. [She55] Abe Shenitzer. Decomposition of a group with a single defining relation into a free product. Proceedings of the American Mathematical Society, 6(2):273–279, 1955. [Wil09] Henry Wilton. Solutions to Bestvina & Feighn’s exercises on limit groups. In Geometric and cohomological methods in group theory, volume 358 of London Math. Soc. Lecture Note Ser., pages 30–62. Cambridge Univ. Press, Cambridge, 2009. 18
4math.GR
A Serial Multilevel Hypergraph Partitioning Algorithm arXiv:1601.01336v1 [cs.DS] 6 Jan 2016 Foad Lotfifar · Matthew Johnson Abstract The graph partitioning problem has many applications in scientific computing such as computer aided design, data mining, image compression and other applications with sparse-matrix vector multiplications as a kernel operation. In many cases it is advantageous to use hypergraphs as they, compared to graphs, have a more general structure and can be used to model more complex relationships between groups of objects. This motivates our focus on the less-studied hypergraph partitioning problem. In this paper, we propose a serial multi-level bipartitioning algorithm. One important step in current heuristics for hypergraph partitioning is clustering during which similar vertices must be recognized. This can be particularly difficult in irregular hypergraphs with high variation of vertex degree and hyperedge size; heuristics that rely on local vertex clustering decisions often give poor partitioning quality. A novel feature of the proposed algorithm is to use the techniques of rough set clustering to address this problem. We show that our proposed algorithm gives on average between 18.8% and 71.1% better quality on these irregular hypergraphs by comparing it to state-of-the-art hypergraph partitioning algorithms on benchmarks taken from real applications. Keywords Hypergraph Partitioning · Load Balancing · Multi-level Partitioning · Rough Set Clustering · Recursive Bipartitioning 1 Introduction This paper is concerned with hypergraph partitioning. A hypergraph is a generalization of a graph in which School of Engineering and Computing Sciences, Durham University, South Rd, Durham, County Durham DH1 3LE, United Kingdom E-mail: [email protected], [email protected] edges (or hyperedges) can contain any number of vertices rather than just two. Thus hypergraphs are able to represent more complex relationships and model less structured data [7,23,44] and thus can, for some applications in High Performance Computing, provide an improved model. For this reason, hypergraph modelling and hypergraph partitioning have become widely used in the analysis of scientific applications [2,7,9, 22, 24, 32, 42, 47]. We propose a Feature Extraction Hypergraph Partitioning (FEHG) algorithm for hypergraph partitioning which makes novel use of the technique of rough set clustering. We evaluate it in comparison with several state-of-the-art algorithms. 1.1 The Hypergraph Partitioning Problem We first define the problem formally. A hypergraph H = (V, E) is a finite set of vertices V and a finite set E ⊆ 2V of hyperedges. Each hyperedge e ∈ E can contain any number of vertices (constrast with a graph where every edge contains two vertices). Let e ∈ E and v ∈ V be a hyperedge and a vertex of H, respectively. Then hyperedge e is said to be incident to v or to contain v, if v ∈ e. This is denoted e . v. The pair he, vi is further called a pin of H. The degree of v is the number of hyperedges incident to v and is denoted d(v). The size or cardinality of a hyperedge e is the number of vertices it contains and is denoted |e|. An example of a hypergraph with 16 vertices and 16 hyperedges is given in Fig. 1. Let ω: V 7→ N and γ: E 7→ N be functions defined on the vertices and hyperedges of H. For v ∈ V and e ∈ E, we call ω(v) and γ(e) the weights of v and e. For a non-negative integer k, a k-way partitioning of H is a collection of non-empty disjoint sets Π = {π1 , π2 , · · · , πk } 2 Foad Lotfifar, Matthew Johnson v13 e13 e5 v10 e10 v1 e15 e1 e4 v2 e7 v5 v7 e6 v14 e14 v11 v9 e12 v15 v4 v8 v12 e2 e3 e8 e16 v3 v6 v16 e9 e11 Fig. 1: A sample hypergraph H with 16 vertices and 16 hyperedges. Vertices and hyperedges are represented as square and circular nodes, respectively. The weights of the vertices and hyperedges are assumed to be 1. Sk such that i=1 πi = V . If k = 2, we call Π a bipartition. We say that vertex v ∈ V is assigned to a part π if v ∈ π. Furthermore, the weight of a part π ∈ Π is the sum of the weights of the vertices assigned to that part. A hyperedge e ∈ E is said to be connected to (or spans on) the part π if e ∩ π 6= ∅. The connectivity degree of a hyperedge e is the number of parts connected to e and is denoted λe (H, Π). A hyperedge is said to be cut if its connectivity degree is more than 1. We define the partitioning cost of a k-way partitioning Π of a hypergraph H: cost(H, Π) = X e∈E (γ(e) · (λe (H, Π) − 1)) (1) The imbalance tolerance is a real number  ∈ (0, 1). Then a k-way partitioning Π of a hypergraph H satisfies the balance constraint if W · (1 − ) 6 ω(π) 6 W · (1 + ), ∀π ∈ Π (2) P where W = v∈V ω(v)/k is the average weight of a part. The Hypergraph Partitioning Problem is to find a k-way partitioning with minimum cost subject to the satisfaction of of the balance constraint. 1.2 Heuristics for Hypergraph Partitioning The Hypergraph Partitioning Problem is known to be NP-Hard [18], but many good heuristic algorithms have been proposed to solve the problem [6, 11, 15, 28] and we now briefly give an overview of the methods that have been developed. As graph partitioning is a well-studied problem and good heuristic algorithms are known [16] one might expect to solve the hypergraph partitioning problem using graph partitioning. This requires a transformation of the hypergraph into a graph that preserves its structure. There is no known algorithm for this purpose [25]. Move-based or flat algorithms start with an initialisation step in which vertices are assigned at random to the parts. Then the algorithm builds a new problem solution based on the neighbourhood structure of the hypergraph [15,36]. The main weakness of these algorithms is that while the solution found is locally optimal, whether or not it is also globally optimal seems to depend on the density of the hypergraph and the initial random distribution [21]. Saab and Rao [35] show that the performance of one such algorithm (the KL algorithm) improves as the graph density increases. Recursive bipartitioning algorithms generate a bipartitioning of the original hypergraph and are then recursively applied independently to both parts until a k-way partitioning is obtained [15,6,11]. Direct k-way algorithms calculate a k-way partitioning by working directly on the hypergraph [36]. There is no consensus on which paradigm gives better partitioning. Karypis reports some advantages of direct k-way partitioning over recursive algorithms [20]. Cong et al. report that direct algorithms are more likely to get stuck in local minima [8]. Aykanat et al. report that direct algorithms give better results for large k [4]. In fact, recursive algorithms are widely used in practice and are seen to achieve good performance and quality. We mention in passing that other algorithms consider the hypergraph partitioning problem with further restrictions. Multi-constraint algorithms, are used when more than one partitioning objective is defined by assigning a weight vector to the vertices [4]. In the context of VLSI circuit partitioning, there are terminals, such as I/O chips, that are fixed and cannot be moved. Therefore when partitioning these circuits some vertices are fixed and must be assigned to particular parts. Problems of this type are easier to solve and faster running times can be achieved [1, 6, 4]. In this paper, we introduce a multi-level algorithm so let us describe this general approach. These algorithms have three distinct phases: coarsening, initial partitioning and uncoarsening. During coarsening vertices are merged to obtain hypergraphs with progressively smaller vertex sets. After the coarsening stage, the partitioning problem is solved on the resulting smaller hypergraph. Then in the uncoarsening stage, the coarsening stage is reversed and the solution obtained on the small hy- A Serial Multilevel Hypergraph Partitioning Algorithm pergraph is used to provide a solution on the input hypergraph. The coarsening phase is sometimes also known as the refinement phase. During coarsening the focus is on finding clusters of vertices to merge to form vertices in the coarser hypergraph. One wishes to merge vertices that are, in some sense, alike so a metric of similarity is required; examples are Euclidean distance, Hyperedge Coarsening, First Choice (FC), or the similarity metrics proposed by Alpert et al. [3], and Catalyurek and Aykanat [7]. A problem encountered with high dimensional data sets is that the similarity between objects becomes very non-uniform and defining a similarity measure and finding similar vertices to put into one cluster is very difficult. This situation is more probable when the mean and standard deviation of the vertex degrees increases (see, for example, the analysis of Euclidean distance as a similarity measures by Ertöz et al. [14]). Although other measures, such as cosine measure and jaccard distance, address the issue and resolve the problem to some extent, they also have limitations. For example, Steinbach et al. [40] have evaluated these measures and found that they fail to capture similarity between text documents in document clustering techniques (used in areas such as text mining and information retrieval). The problem is that cosine and jaccard distances emphasise the importance of shared attributes for measuring similarity and they ignore attributes that are not common to pairs of vertices. Consequently, other algorithms use other clustering techniques to resolve the problem such as shared nearest neighbour (SNN) methods [13] and global vertex clustering information. Decisions for vertex clustering are made locally and global decisions are avoided due to their high cost and complexity though they give better results [43]. All proposed heuristics reduce the search domain and try to find vertices to be matched using some degree of randomness [11]. This degrades the quality of the partitioning by increasing the possibility of getting stuck in a local minimum and they are highly dependent on the order the vertices are selected for matching. A better trade-off is needed between the low cost of local decisions and the high quality of global ones. Furthermore, there is a degree of redundancy in modelling scientific applications with hypergraphs. Removing this redundancy can help in some optimisations such as clustering decisions, storage overhead, and processing requirements. An example is proposed by Heinz and Chandra [22] in which the hypergraph is transformed into a Hierarchy DAG (HDAG) representation and reducing the memory requirement for storing hypergraphs. Similarly, one can identify redundancies in the coarsen- 3 ing phase and make better vertex clustering decisions and achieve better partitioning on the hypergraph. The FEHG algorithm proposed in this paper makes novel use of the technique of rough set clustering to categorise the vertices of a hypergraph in the coarsening phase. FEHG treats hyperedges as features of the hypergraph and tries to discard unimportant features to make better clustering decisions. It also focuses on the trade-off to be made between local vertex matching decisions (which have low cost in terms of the space required and time taken) and global decisions (which can be of better quality but have greater costs). The emphasis of our algorithm is on the coarsening phase: good vertex clustering decisions here can lead to high quality partitioning [20]. 2 Preliminaries 2.1 Rough Set Clustering Rough set clustering is a mathematical approach to uncertainty and vagueness in data analysis. The idea was first introduced by Pawlak in 1991 [33]. The approach is different from statistical approaches, where the probability distribution of the data is needed, and fuzzy logic, where a degree of membership is required for an object to be a member of a set or cluster. The approach is based on the idea that every object in a universe is tied with some knowledge or attributes such that objects which are tied to the same attributes are indiscernible and can be put together in one category [34]. The data to be classified are called objects and they are described in an information system: Definition 1 (Information System) An information system is a system represented as I = (U, A, V, F) where: • U is a non-empty finite set of objects or the universe. • A is a non-empty finite set of attributes with size |A|= t. • V = (V1 , V2 , . . . , Vt ) where, for each a ∈ A, Va is the set of values for a. • F : U × A 7→ V is a mapping function such that, for u ∈ U, a ∈ A, F(u, a) ∈ Va . For any subset of attributes B = {b1 , b2 , · · · , bj } ⊆ A, the B-Indiscernibility relation is defined as follow:  IND(B) = (u, v) ∈ U2 | ∀b ∈ B, F(u, b) = F(v, b) 4 Foad Lotfifar, Matthew Johnson (3) When (u, v) ∈ IND(B), it is said that u and v are indiscernible under B. The equivalence class of u with respect to B is represented as [u]B and includes all objects which are indiscernible with u. The equivalence relation provides a partitioning of the universe U in which each object belongs only one part and it is denoted U/IND(B) or simply U/B. The set of attributes can contain some redundancy. Removing this redundancy could lead us to a better clustering decisions and data categorisation while still preserving the indiscernibility relation amongst the objects [46,48]. The remained attributes after removing the redundancy is called the reduct set [41]. More precisely, if B ⊆ A, then B is a reduct of A if IND(B) = IND(A) and B is minimal (that is, no attribute can be removed from B without changing the indiscernibility relation). But the reduct is not unique and it is known that finding a reduct of an information system is an NP-hard problem [39]. This is one of the computational bottlenecks of rough set clustering. A number of heuristic algorithms have been proposed for problems where the number of attributes is small. Examples have been given by Wroblewski using genetic algorithms [45,46], and by Ziarko and Shan who use decision tables based on Boolean algebra [48]. These methods are not applicable to hypergraphs which usually represent applications with high dimensionality and where the operations have to be repeated several time during partitioning. We propose a relaxed feature reduction method for hypergraphs by defining the Hyperedge Connectivity Graph (HCG). 2.2 The Hyperedge Connectivity Graph The Hyperedge Connectivity Graph (HCG) of a hypergraph is the main tool used used in our algorithm for removing superfluous and redundant information during vertex clustering in the coarsening phase. The similarity between two hyperedges ei and ej is denoted sim(ei · ej ) (we will discuss later possible similarity measures). similarity measure that reduces the number of edges in the HCG. Different similarity measures, such as Jaccard Index or Cosine Measure, can be used for measuring the similarity. As the hyperedges of the hypergraph are weighted, similarity between two hyperedges is scaled according to the weight of hyperedges: for ei , ej ∈ E γ(e )+γ(ej ) the scaling factor is 2×maxi e∈E (γ(e)) . One of the characteristics of the HCG is that it assigns hyperedges to non-overlapping clusters (that is, the connected components of the HCG). 3 The Serial Partitioning Algorithm The proposed Feature Extraction Hypergraph Partitioning (FEHG) algorithm is a multi-level recursive serial bipartitioning algorithm composed of three distinct phases: coarsening, initial partitioning, and uncoarsening. The emphasis of FEHG is on the coarsening phase as it is the most important phase of the multi-level paradigm [20]. We provide a general outline of the algorithm before going into further detail. In the coarsening phase, we transfer the hypergraph into an information system and we use rough set clustering decisions to match pairs of vertices. This is done in several steps. First, the reduct set is found to reduce the size of the system and remove superfluous information. Second, the vertices of the hypergraph are categorised using their indispensability relations. These categories are denoted as core and noncore where, in some sense, vertices that belong to the same core are good candidates to be matched together and the non-core vertices are what is left over. The cores are traversed before the non-cores for finding pair-vertex matches. The whole coarsening procedure is depicted in Fig. 2. 3.1 The Coarsening The first step of the coarsening stage is to transfer the hypergraph H = (V, E) into an information system. The information system representing the hypergraph is Definition 2 (Hyperedge Connectivity Graph) For IH = (V, E, V, F); that is, the objects are the verticesV a given similarity threshold s ∈ (0, 1), the Hyperedge and the attributes are the hyperedges E. We define the Connectivity Graph (HCG) of a hypergraph H = (V, E) set of values as each being in [0, 1] and the mapping is a graph G s = (V, E) where V = E and two hyperedges function is defined as: ei , ej ∈ V are adjacent in G s if sim(ei , ej ) > s. The definition is similar to that of intersection graphs [12] (graphs that represent the intersections of a family of sets) or line graphs of hypergraphs (graphs whose vertex set is the set of the hyperedges of the hypergraph and two hyperedges are adjacent when their intersection is non-empty). The difference is the presence of the f (e) , 0 ∀e0 .v γ(e ) F(v, e) = P (4) where f (e) = γ(e) if e . v and is otherwise 0. The transformation of the hypergraph given in Fig. 1 into an information system is given in Table 1. A Serial Multilevel Hypergraph Partitioning Algorithm 5 Transfer the hypergraph into an information system Find redundant attributes and remove them Categorise vertices as core and non-core vertices Yes No Cores? Traverse each core list and find best pair matches Traverse the non-core list and find best pair matches Fig. 2: The coarsening phase at a glance. The dashed arrow means that non-core vertex list is processed after all cores have been processed. Table 1: The transformation of the hypergraph H depicted in Fig. 1 into an information system. The values are rounded to 2 decimal places. v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14 v15 v16 e1 0.33 0.25 0 0 0.33 0 0 0 0 0 0 0 0 0 0 0 e2 0 0.25 0 0.16 0 0 0 0.2 0 0 0 0 0 0 0 0 e3 0 0 0.33 0.16 0 0.33 0 0 0 0 0 0 0 0 0 0 e4 0 0 0 0.16 0 0 0 0.2 0 0 0 0.33 0 0 0 0.25 e5 0.33 0 0 0 0 0 0 0 0 0.33 0 0 0.5 0 0 0 e6 0 0 0 0 0 0 0.33 0 0.25 0 0 0 0 0 0 0 e7 0 0.25 0.33 0 0.33 0 0.33 0 0 0 0 0 0 0 0 0 e8 0 0 0 0.16 0 0 0 0.2 0 0 0 0 0 0 0 0.25 e9 0 0 0.33 0 0 0.33 0 0 0.25 0 0 0 0 0 0 0 e10 0.33 0 0 0 0.33 0 0 0 0 0.33 0 0 0 0 0 0 e11 0 0 0 0 0 0.33 0 0 0.25 0 0.5 0 0 0 0 0 e12 0 0 0 0.16 0 0 0 0.2 0 0 0 0.33 0 0 0 0.25 e13 0 0 0 0 0 0 0 0 0 0.33 0 0 0.5 0 0 0 e14 0 0 0 0 0 0 0.33 0 0.25 0 0.5 0 0 1.0 0 0 e15 0 0.25 0 0 0 0 0 0 0 0 0 0 0 0 1.0 0 e16 0 0 0 0.16 0 0 0 0.2 0 0 0 0.33 0 0 0 0.25 Calculating the HCG: Initially, hyperedges are not assigned to any cluster. Then, until all hyperedges are assigned, a hyperedge e is selected, a new cluster number is assigned to it and the cluster is developed around e by processing its adjacent hyperedges using Definition 2. At the end of HCG calculation, each hyperedge is assigned to exactly one cluster. We refer to the cluster set as edge partitions and denote it E R . The size and weight of each eR ∈ E R is the number of hyperedges it contains and the sum of their weights, respectively. An example of the HCG for the sample hypergraph in Fig. 1 and similarity threshold s = 0.5 is depicted in Fig. 3. same edge partition are removed from the information system IH and replaced by their representative. After this reduction, the new information system is built and  R represented as IH = V, E R , VR , F R in which the attribute set is replaced by E R . In the new information system, the set of values is VeRR ⊆ N. Furthermore, the mapping function for ∀eR ∈ E R is redefined as follows: Hyperedges belonging to the same edge partition are considered to be similar. For each edge partition, we choose a representative and all other hyperedges in the We can further reduce the set of attributes by picking the most important ones. For this purpose, we define a clustering threshold c ∈ [0, 1] and the mapping function F R (v, eR ) = |{e . v ∧ e ∈ eR |e ∈ E }| . (5) 6 Foad Lotfifar, Matthew Johnson Table 2: The reduced information system that is built based on the HCG in Fig. 3. u2 u5 u13 u15 C1 u10 u12 u8 C3 C2 u1 u4 u6 u16 u9 u7 u11 C5 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14 v15 v16 C6 C4 u14 u3 Fig. 3: An example of Hyperedge Connectivity Graph (HCG) of the hypergraph H depicted in Fig. 1 and the similarity threshold s = 0.5. is changed according to Eq.(6) below to construct the final information system I f . ( f F (v, eR ) = R F (v,eR ) 1, if |{e.v,∀e∈E}| >c 0, otherwise. (6) An example of the reduced information system and the final table using the clustering threshold c = 0.5 for the hypergraph of Fig. 1 is depicted in Table 3. The final table is very sparse compared to the original table. At this point, we use rough set clustering. For every vertex, we calculate its equivalence class. Then, a partitioning U/IND(E R ) on the vertex set is obtained using the equivalence relations. We refer to parts in U/IND(E R ) as cores such that each vertex belongs to a unique core. For some of the vertices in the hypergraph, the mapping function gives zero output for all attributes that is F f (v, eR ) = 0, ∀eR ∈ E R . These vertices are assigned to a list denoted as the non-core vertex list. We observe that cores are built using global clustering information. The final operation is to match pairs of vertices. Cores are visited sequentially one at a time and they are searched locally to find pair matches. Inside each core, a vertex u is selected at random and matched with its “most similar” neighbour. Then the process is repeated with the remaining vertices. These decisions are made with a local measure of similarity. We use the Weighted Jaccard Index that is defined as follows: P {e.v ∧ e.u} γ (e) {e.v ∨ e.u} γ(e) J (u, v) = P , v, u ∈ V , and ∀e ∈ E. (7) This is similar to non-weighted jaccard index in PaToH (where it is called Scaled Heavy Connectivity Matching). This captures similarity in high dimensional datasets C1 3 1 0 1 2 0 0 0 0 3 0 0 2 0 0 0 C2 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 C3 0 1 1 3 0 0 0 3 0 0 0 3 0 0 0 1 C4 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 C5 0 0 0 0 0 0 2 0 2 0 1 0 0 1 0 0 C6 0 0 2 0 0 3 0 0 2 0 1 0 0 0 0 0 Table 3: The final information system for clustering threshold c = 0.5. v1 v5 v10 v13 v2 v3 v6 v4 v8 v12 v16 v9 v11 v7 v14 v15 C1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 C2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 C3 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 C4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C5 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 C6 0 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0     Core 1     Core 2     Core 3     Core 4  Core 5 Core 6 better than Euclidean based similarity measures. Vertices that do not find any pair matches during core search are transferred into the non-core vertex list (such as v15 in Table 2). One possible problem is that only a small fraction of the hypergraph’s vertices might belong to cores. This can happen, for example, the average vertex degree in the hypergraph is high so there is a large denominator in Eq.(6). As proposed by Karypis [20], we define the compression ratio between two levels of coarsening in the multi-level paradigm with c levels as follows: r= |Vi | , ∀0 6 i < c |Vi+1 | (8) A Serial Multilevel Hypergraph Partitioning Algorithm An advantage of the multi-level approach is that it provides a trade-off between quality and speed-up. The more coarsening levels, the better the partitioning quality, but the longer the running time and the greater the memory consumption. On the other hand, with few coarsening levels, we end up with a large hypergraph in which it is not possible to find a good partitioning. Having many coarsening levels will give a very small coarsest hypergraph with perhaps few feasible solutions. This may result in a poor partitioning quality. Karypis [20] provides a tradeoff between quality and levels of partitioning by limiting the compression ratio r to between 1.5 and 1.8. In order to satisfy a certain compression ratio, we will visit the non-core vertex list and select vertices randomly. For every selected vertex, the algorithm finds a pair match among its unmatched adjacent vertices in the non-core list. When pair matches are found, the hypergraph is contracted to build a coarser hypergraph for the next coarsening level. This is done by merging matched vertices. The weight of the coarser vertex is the sum of the weight of two merged vertices and its set of incident hyperedges is the union of the hyperedges incident on each of the merged vertices. After building the coarser hypergraph, we perform two final operations on the hyperedge list. First, hyperedges of unit size are removed as they do not have any impact on the partitioning cut. Second, identical hyperedges (that is, those having the same vertex set) are detected and each set of identical hyperedges is replaced by a single hyperedge whose weight is the sum of the weight of hyperedges in the set. To find identical hyperedges, each hyperedge is hashed to an integer number based on its vertex list. To avoid hash conflicts, the content of the hyperedges are compared if they hash to the same number. 3.2 Initial Partitioning and Refinement The coarsening phase ends when the number of the vertices in the coarsest hypergraph is less than a threshold (that is 100 in our algorithm). The size of the coarsest hypergraph is very small compared to the original hypergraph and its partitioning can be calculated quickly. We use a series of algorithms for this purpose. The best partitioning that preserves the balancing constraint is selected and it is projected back to the original hypergraph. The category of algorithms used for this stage are random (randomly assigns vertices to the parts), linear (linearly assigns vertices to the parts starting from a random part), and FM Based (selects a vertex randomly and assigns it to part 1 and all other vertices to part 0; then the FM algorithm is run and the bipartitioning is developed). 7 Then partitioning algorithms refine the partitioning as the hypergraph is projected back in the uncoarsening phase. Due to the success of the FM algorithm in practice, we use a variation of FM algorithm known as Early-Exit FM (FM-EE) [20] and Boundary FM (BFM) [6]. 4 Evaluations In this section we provide the evaluation of our algorithm compared to state-of-the-art partitioning algorithms including PHG (the Zoltan hypergraph partitioner) [11], PaToH [6] and hMetis [26]. PaToH is a serial hypergraph partitioner developed by Çatalyürek and it is claimed to be the fastest multilevel recursive bipartitioning based tool. The earliest and the most popular tool for serial hypergraph partitioning is hMetis developed by Karypis and Kumar; it is specially designed for VLSI circuit partitioning and the algorithms are based on multilevel partitioning schemes and support recursive bisectioning (shmetis and hmetis) and direct k-way partitioning (kmetis). Finally, Zoltan data management services for parallel dynamic applications is a toolkit developed at Sandia National Laboratories. The library includes a wide range of tools for problems such as Dynamic Load Balancing, Graph/Hypergraph Colouring, Matrix Operations, Data Migration, Unstructured Communications, Distributed Directories and Graph/Hypergraph Partitioning. It follows a distributed memory model and uses MPI for interprocessor communications. It is available within Trilinos, an open source software project for scientific applications, since version 9.0 [37]. All of these algorithms are multi-level recursive bipartitioning algorithms and PHG is a parallel hypergraph partitioner while the other two are serial partitioning tools. For the evaluation, we have selected a number of test hypergraphs from a variety of scientific applications with different specifications. The hypergraphs are obtained from the University of Florida Sparse Matrix Collection [10]. It is a large database of sparse matrices from real applications. Each sparse matrix from the database is treated as the hypergraph incident matrix with the vertices and hyperedges as rows and columns of the matrix, respectively. This is similar to the column-net model proposed in [7]. The weight of each vertex and each hyperedge is assumed to be 1. The list of test data used for our evaluation is in Table 4. The simulations are done on a computer with Intel(R) Xeon(R) CPU E5-2650 2.00GHz processor, 8GB of RAM and 40GB of disk space and the operating system running on the system is 32-Bit Ubuntu 12.04 LTS. Furthermore, we set the imbalance tolerance to 8 Foad Lotfifar, Matthew Johnson Table 4: Tested hypergraphs for sequential algorithm simulation and their specifications Hypergraph CNR-2000 AS-22JULY06 CELEGANSNEURAL NETSCIENCE PGPGIANTCOMPO GUPTA1 MARK3JAC120 NOTREDAME WWW PATENTS MAIN STD1 JAC3 COND-MAT-2005 1 Description Small web crawl of Italian CNR domain Internet routers Neural Network of Nematode C. Elegans Co-authorship of scientists in Network Theory Largest connected component in graph of PGP users Linear Programming matrix (A × AT ) Jacobian from MULTIMOD Mark3 Barabasi’s web page network of nd.edu Pajek network: mainNBER US Patent Citations Chemical process simulation Collaboration network, www.arxiv.org Rows 325,557 22,963 297 1,589 10,680 31,802 54,929 325,729 240,547 21,982 40,421 Columns 325,557 22,963 297 1,589 10,680 31,802 54,929 325,729 240,547 21,982 40,421 Non-Zeros 3,216,152 96,872 2,345 5,484 48,632 2,164,210 322,483 929,849 560,943 1,455,374 351,382 NSCC1 100,977 1 57 396 1 1 1,921 231,666 240,547 1 1,798 NSCC stands for the Number of Strongly Connected Components. 2% and the number of parts (the value of k) is each of {2, 4, 8, 16, 32}. The final imbalances achieved by the algorithms are not reported because the balancing requirement was always met. 4.1 Algorithm Parameters Each of the evaluated tools has different input parameters that can be set by the user. We use default parameters for each tool. All algorithms use a variation of the FM algorithm (FM-EE and BFM) in their refinement phase. PHG uses an agglomerative coarsening algorithm that uses the inner product as the measure of similarity between the vertices [11]. This is also used in hMetis. The default partitioning tool for hMetis is shmetis and the default coarsening scheme is the Hybrid First Choice (HFC) scheme which is a combination of the First Choice (FC) [20] and Greedy First Choice scheme (which is a variation of the FC algorithm in which vertices are grouped and the grouping is biased in favor of faster reduction in the number of the hyperedges in the coarser hypergraph). PaToH is initialised by setting the SBProbType parameter to PATOH SUGPARAM DEFAULT. It uses Absorption Clustering using Pins as the default coarsening algorithm (this is an agglomerative vertex clustering scheme). The similarity metric, known as absorption metric, of two vertices u and v is calculated as follows: X 1 . (9) |e|−1 {∀e∈E|u∈e and v∈e} The algorithm finds the absorption metric for every pin that connects u and the cluster that vertex v is already assigned to. See the manuals of the tools for the full description of the parameters [6,27, 38]. The FEHG algorithm has two parameters that need to be set: the similarity threshold in Definition 2 for building the HCG, and the clustering threshold in Eq.(6). In the rest of this subsection, we look further at these two parameters. In graph theory, a set of vertices are said, informally, to be clustered if they induce more edges (or hyperedges) than one would expect if the edges had been placed in the graph at random. There are various ways in which one can formally define a clustering coefficient (CC) of either a vertex or a graph, and for hypergraphs various definitions have been proposed [19,29,30]. We need something a little different as we are interested in the clustering of hyperedges and we want to take account of their weights. Given a hypergraph H = (V, E), we define CC for a hyperedge e ∈ E as follows: CC(e)    P |e∩e0 | 0   {e0 ∩e6=∅} |e|−1 ·γ(e ) P P , ∀e0 , e00 ∈ E\e, 00 = {v∈e} {e00 .v} γ(e )  0, (10) if |e| > 1 otherwise, and the CC of H is calculated as the average of CC over all its hyperedges: CC H = X CC(e) . |E| (11) e∈E During coarsening, each time we proceed to the next coarsening level, the structure of the hypergraph changes and so the value of CC in the coarser hypergraph is different. To recalculate the CC value in each coarsening level could be costly so we are interested in finding a way of updating the CC value without a complete recalculation (possibly sacrificing accuracy in the process). Foudalis et al. [17] studied the structure of social network graphs and looked at several characteristic metrics including the clustering coefficient. They found that social networks have high CC compared to random networks, and that the CC is negatively correlated to the degree of vertices. Two vertices with low vertex degree are more likely to cluster to each other than two vertices with higher degree. In addition, Bloznelis [5] has theoretically investigated random intersection graphs1 and 1 Random intersection graphs can be obtained from randomly generated bipartite graphs which have bipartition V ∪W A Serial Multilevel Hypergraph Partitioning Algorithm 9 edge partitions C2 and C4 can be removed from the reduced information system in Table 3 without causing any changes in the cores. Using this strategy, the partitioning cut for CNR-2000 is 29.9% better than the best bipartitioning cut reported in Fig. 4 and this is achieved for c = 0.6. 4.2 Simulations Fig. 4: The variation of bipartitioning cut based on the clustering threshold. Values are normalised with the best cut for each hypergraph. shown that the CC is inversely related to the average vertex degree in the graph. Based on these results, we update the value of CC from one coarsening level to the next based on the inverse of the average vertex degree. Finally, the similarity threshold is set as the CC of the hypergraph at the beginning of the coarsening phase. In the simulation section, we investigate how our algorithm performs, in terms of partition quality and running time, when the similarity threshold is updated compared to when it is recalculated in each coarsening level. In order to investigate the impact of the clustering threshold on the quality of the partitioning, we have checked the dependency of the algorithm on the clustering threshold. Figure 4 depicts the quality of the 2-way partitioning of the hypergraphs for variable clustering threshold values. The cut is normalised based on the best partitioning cut for each hypergraph. The average correlation between the cut and the clustering threshold over all hypergraphs is calculated to be 0.2442 and excluding CNR-2000 is 0.2096, a very weak correlation. The standard deviation of the changes with respect to the average cut values is also less than 4.2% over all hypergraphs. Therefore, changing the clustering threshold has a very small effect on the partitioning quality. (An exception occurs for the CNR-2000 hypergraph such that the variation of change is very high.) Hyperedges with high CC values are those that are more likely clustered with other hyperedges and those with low CC values do not form any cluster and form edge partitions in HCG of size 1. Consequently, we can remove every edge partition in HCG of unit size and set the value of the clustering threshold to zero in Eq.(6). As an example, if each vertex vi in V = {v1 , v2 , · · · vn } selects the set Di ⊂ W of its neighbours in the bipartite graph randomly and independently such that the elements of W have equal probability to be selected. This can be considered to define a hypergraph by assuming that V and W are the sets of vertices and hyperedges, respectively. In the first evaluation, we assume unit weight for both vertices and hyperedges of the hypergraph. In this situation, a partitioning algorithms performs well if it can capture strongly connected components of the hypergraph. A strongly connected component is a group of the vertices that are tightly coupled together. Assuming that the hypergraph represents a graph (by limiting the hyperedge cardinality to two), a strongly connected component is a clique. Because the weight of all hyperedges is 1, the aim of the partitioning algorithm is to take these cliques out of the cut as they are the major cause of increasing the cut; therefore, the vertex connectivity is more important for identifying those cliques. An algorithm that identifies those cliques and merged their vertices to build a coarser vertex is the one that gives better partitioning quality and the clustering algorithm that captures those strongly connected components in the first few levels of coarsening would obtain competitive partitioning qualities. Each algorithm is run 20 times and its average cut is stated in Table 5 as well as the best cut among all runs. The results in the table are normalised with respect to the minimum value among algorithms. For example, FEHG finds the minimum average cut of 79 for a bipartitioning on the CELEGANSNEURAL hypergraph. PHG, hMetis and PaToH find, respectively, average bipartitioning cuts that are worse by factors of 1.07, 1.17, and 1.01. The results show that FEHG performs very well compared to PHG and hMetis and it is competitive with PaToH ; considering the best cut, this is found in 30 (of the 55 cases) by FEHG and in 27 of the cases by PaToH (this includes some ties). As can be seen from the results, all algorithms give similar partitioning cut when the hypergraph has only a few strongly connected components. In this situation, even the local clustering algorithms can capture these strongly connected components and merge their vertices; therefore the differences in partitioning cut for different algorithms that are using different clustering methods (either global or local) is very small. As the number of strongly connected components increases, it is harder to identify those components especially when the boundaries between them are not clear and they have overlaps. This situation happens 10 Foad Lotfifar, Matthew Johnson Table 5: Quality comparison of the algorithms for different part sizes and 2% imbalance tolerance. The values are normalised according to the minimum value for each hypergraph; therefore, the algorithm that gives 1.0 cut value is considered to be the best. Unit weights are assumed for both vertices and hyperedges. Number of Parts 2 AS-22JULY06 CELEGANSNEURAL CNR–2000 COND–MAT–2005 NETSCIENCE∗ PGPGIANTCOMPO GUPTA1 MARK3JAC120 NOTREDAME∗ PATENTS–MAIN STD1–JAC3 ∗ 4 8 16 32 AVE BEST AVE BEST AVE BEST AVE BEST AVE BEST FEHG 1.11 1.00 1.02 1.00 1.04 1.01 1.01 1.00 1.01 1.03 PHG 2.90 2.46 1.77 1.56 1.64 1.36 1.43 1.34 1.37 1.32 hMetis 1.34 1.95 1.19 1.30 1.16 1.18 1.04 1.06 1.09 1.04 PaToH 1.00 1.43 1.00 1.03 1.00 1.00 1.00 1.00 1.00 1.00 Min Value 136 93 355 319 629 599 1051 995 1591 1529 FEHG 1.00 1.00 1.09 1.00 1.10 1.06 1.11 1.08 1.07 1.03 PHG 1.07 1.00 1.04 1.03 1.02 1.00 1.06 1.00 1.00 1.00 hMetis 1.17 1.21 1.00 1.05 1.00 1.04 1.00 1.02 1.00 1.00 PaToH 1.01 1.04 1.00 1.06 1.03 1.07 1.03 1.06 1.05 1.05 Min Value 79 77 195 184 354 342 548 536 773 769 FEHG 1.37 1.00 1.71 1.07 1.59 1.41 1.53 1.45 1.63 1.51 PHG 35.88 45.62 12.48 9.17 5.73 4.84 3.54 2.98 2.42 2.02 hMetis 12.19 18.82 8.24 8.43 5.08 4.71 3.46 3.29 2.66 2.50 PaToH 1.00 1.71 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 Min Value 81 45 244 202 569 509 1014 911 1927 1830 FEHG 1.00 1.00 1.00 1.00 1.00 1.00 1.01 1.02 1.01 1.00 PHG 1.17 1.17 1.11 1.10 1.05 1.05 1.03 1.03 1.02 1.01 hMetis 1.05 1.07 1.11 1.12 1.11 1.12 1.11 1.10 1.01 1.01 PaToH 1.02 1.02 1.03 1.03 1.00 1.00 1.00 1.10 1.00 1.00 Min Value 2134 2087 5057 4951 8609 8485 12370 12150 16270 16150 FEHG 0.0 0.0 0.0 0.0 2.00 1.50 1.50 1.00 2.08 1.81 PHG 0.0 0.0 0.0 0.0 1.50 1.00 1.40 1.00 1.87 1.5 hMetis 2.0 2.0 5.0 5.0 4.22 3.50 1.75 1.75 1.99 1.87 1.00 PaToH 0.0 0.0 0.0 0.0 1.00 1.00 1.00 1.00 1.00 Min Value 0 0 0 0 2 2 8 8 16 16 FEHG 2.12 1.27 1.00 1.00 1.04 1.00 1.00 1.08 1.00 1.00 PHG 13.23 1.83 1.44 1.04 1.25 1.04 1.02 1.00 1.08 1.00 hMetis 9.7 9.61 1.46 1.71 1.04 1.40 1.31 1.40 1.26 1.27 PaToH 1.00 1.00 1.04 1.27 1.00 1.04 1.02 1.15 1.08 1.06 Min Value 18 18 242 200 419 400 695 617 956 930 FEHG 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 PHG 1.58 1.45 1.31 1.24 1.15 1.04 1.07 1.04 1.09 1.05 hMetis 1.73 1.82 1.61 1.69 1.58 1.64 1.60 1.57 1.51 1.48 PaToH 1.22 1.17 1.08 1.09 1.04 1.05 1.05 1.07 1.08 1.09 Min Value 486 462 1466 1384 3077 2893 5342 5134 8965 8519 FEHG 1.01 1.01 1.02 1.01 1.01 1.00 1.00 1.00 1.06 1.07 PHG 1.00 1.01 1.02 1.02 1.02 1.00 1.00 1.00 1.72 1.78 hMetis 1.00 1.00 1.00 1.02 1.00 1.00 1.30 1.00 4.20 1.78 PaToH 1.00 1.02 1.00 1.00 1.00 1.00 1.26 1.20 1.00 1.00 Min Value 408 400 1229 1202 2856 2835 6317 6245 3142 2944 FEHG 0 0 1.00 1.00 1.12 1.12 1.09 1.03 1.06 1.07 PHG 4326 4326 158.56 288.69 13.82 16.78 2.09 3.06 1.72 1.78 hMetis 880 707 67.92 129.92 10.98 12.65 3.36 3.37 2.23 2.30 Patoh 24 22 1.90 3.31 1.00 1.00 1.00 1.00 1.00 1.00 Min Value 0 0 27 13 316 259 1577 1484 3142 2944 FEHG 1.20 1.00 1.03 1.01 1.05 1.03 1.00 1.00 1.00 1.00 PHG 12.49 13.19 2.52 2.30 1.79 1.65 1.42 1.38 1.23 1.18 hMetis 2.38 2.77 1.16 1.24 1.26 1.43 1.26 1.31 1.21 1.22 PaToH 1.00 1.02 1.00 1.00 1.00 1.00 1.00 1.00 1.01 1.00 Min Value 643 528 3490 3198 6451 6096 11322 10640 16927 16460 FEHG 1.01 1.00 1.00 1.03 1.00 1.00 1.00 1.00 1.00 1.00 PHG 1.15 1.08 1.16 1.10 1.18 1.13 1.28 1.35 1.33 1.29 hMetis 1.05 1.00 1.52 1.03 1.54 1.23 1.70 1.53 1.71 1.51 Patoh 1.00 1.00 1.08 1.00 1.16 1.14 1.00 1.26 1.30 1.29 Min Value 1490 1371 3735 3333 7616 6167 13254 11710 22242 21200 When the minimum cut for the average or best cases are zero, the values shown are actual cut values rather than normalised values. A Serial Multilevel Hypergraph Partitioning Algorithm in hypergraphs such as Notredame, Patents-Main, and CNR-2000. As shown, FEHG achieves a superior quality improvement compared to Zoltan and hMetis, but PaToH still generates very good partitionings with absorption clustering using pins. One reason that may explain this is that PaToH allows matching between a group of vertices instead of pair-matching. Therefore, the algorithm can merge strongly connected components of vertices in the first few levels of coarsening and remove them from the cut. Though hMetis also allows multiple matches, it seems that the agglomerative clustering strategy of PaToH is much better compared to the hybrid first choice algorithm in hMetis. The standard deviation (STD) from the average cut is calculated for some of the algorithms and is reported in Table 6. This shows the reliability of the partitioning algorithm when it is used in practical applications. The values are reported as a percentage of STD based on the average partitioning cut for each algorithm. We note, first, that the standard deviation is an increasing function of the number of parts (this is due to the recursive bipartitioning nature of the algorithms which adds to the STD in each recursion), and, second, that the percentage of the STD based on the average cut is decreasing as the number of parts increases (as the average cut increases exponentially when as the number of parts increases, while the increase of the STD is linear). We observe very good reliability for hMetis despite the fact that it gives the worst quality (on average) compared to the others. If we consider bring the average of the cut into the calculation, the least reliability is obtained for hMetis and PHG. Our evaluations recognises FEHG and PHG as the most reliable algorithms compared to others. In some practical applications such as parallel distributed systems, hypergraph partitioning is employed to reduce the communication volume between the processor set. In this situation, the weight of hyperedges represents the volume of communications between a group of vertices, and the objective of hypergraph partitioning is to reduce the number of messages communicated between processors as well as the volume of communications2 . In order to model this scenario, we set the weight of the hyperedges to be their sizes for the next phase of simulations. The main reason for this simulation is that we want to investigate the performance of the clustering 2 If we assume the vertices are the tasks of the parallel application, the weight of the vertices shows the amount of computational effort the processors spend for each vertex. In our scenario, we assumed that the computation time spent for processing all vertices is the same (unit vertex weights) and the aim is to reduce the number and volume of communications. An example of this situation is in large scale vertex-centric graph processing tools such as Pregel [31]. 11 Table 6: The percentage of the Standard Deviation (STD) of the cut based on the average partitioning cut for each algorithm with variable number of parts. Unit weights are assumed for both vertices and hyperedges. Number of Parts AS-22JULY06 CNR-2000 COND MAT PGPGIANT GUPTA1 MARK3JAC NOTREDAME PATENTS STD1 JAC3 2 4 8 16 32 FEHG 22.4 8.8 3.8 2.8 1.7 PHG 21.8 14.6 7.6 5.8 4.1 hMetis 0 1.6 1.6 2.1 1.6 2.7 PaToH 2.9 4.5 3.2 3.5 FEHG 56.4 31.3 24.8 14 6.9 PHG 18.9 24.9 17.4 13.3 11.4 4.5 hMetis 7.5 8.1 8.3 6.8 PaToH 47.9 79 17.2 15.1 9.2 FEHG 1.3 1.1 1.0 0.7 0.6 PHG 1.5 1.5 1 0.9 0.8 hMetis 0.6 1.3 0.8 0.9 0.8 PaToH 1.8 3.7 1.1 1.2 1.1 FEHG 8 23 18 16 18 PHG 48 65 45 53 46 25 hMetis 3 11 13 24 PaToH 0 0 7 2 5 FEHG 20 9.5 4.1 2.3 1.9 PHG 20.1 18.6 8.6 7.5 4.4 hMetis 1.7 3.1 2.2 2.6 2.1 PaToH 0 0 1.7 0.3 0.5 FEHG 1.5 1.4 0.8 1.3 3.9 PHG 1 1.2 0.9 0.8 2.0 hMetis 3.2 1.2 1 2.6 1.6 PaToH 0 0.9 0.6 3.1 8.5 FEHG 0 33.2 11.2 6.7 3.6 PHG 0 2.9 1.5 1.6 1.4 hMetis 9.5 3.5 3.1 2.7 1.8 Patoh 4.1 15.5 8.5 3.3 2 FEHG 23.2 7.6 4 2.9 2 PHG 16 19.7 15.1 9.8 7.7 1.1 hMetis 2.4 1.7 1.4 1.1 PaToH 10.9 4.2 3.4 2 1.8 FEHG 17.3 6.6 5.6 4.1 2.5 PHG 13.3 8.7 8.3 4.5 2.7 hMetis 6.7 29.1 17.5 10.3 7.9 Patoh 8.4 12.6 7.9 6.2 3.3 algorithms in multi-level hypergraph partitioning tools when there are weights on the hyperedges. When hyperedges have different weights, vertex connectivity is no longer the only measure used for clustering decisions. Compared to the previous scenario, taking a group of strongly connected components of vertices will not always result in cut reduction as connectivity, as well as how tightly the vertices are connected to each other, is important. The simulation results for this scenario are depicted in Fig. 5. According to the results, FEHG gives the best partitioning cut on most of the hypergraphs (in 40 out of the 55 cases). In our evaluation, we have three different 12 Foad Lotfifar, Matthew Johnson (a) (d) (b) No results for hMetis for 16 and 32 parts. (e) (c) (f ) Fig. 5: Comparing the variation of the average cut for different partitioning numbers. The weight of vertices are unit and the weight of hyperedges are their sizes. Fig. 5: (Continued) Comparing the variation of the average cut for different partitioning numbers. The weight of vertices are unit and the weight of hyperedges are their sizes. types of hypergraphs. The first group are those with very irregular structure and high variation of vertex degree graphs, but the difference between all partitioners, exor hyperedge size: CNR-2000, GUPTA1, Notredame WWW, cept hMetis, is small. On these types of hypergraphs, AS-22JULY06, and STD JAC3. FEHG gives much better we can get reasonable partitioning quality using local quality, finding smaller cuts than the other algorithms partitioners and the performance of the algorithm highly in every case. This shows that FEHG suits well this depends on the vertex similarity measure; for example, type of hypergraph (such as is found in social networks). the one proposed by hMetis gives the worst quality. The second group have less irregularity: COND-MAT-2005, The third group are those with regular structure and PGPGIANTCOMPO, and CELEGANSNEURAL hypergraphs. These very small variability of vertex degree and hyperedge size: hypergraphs have less variable vertex degree or hyNETSCIENCE, PATENTS MAIN, and MARK3JAC120. The evalperedge size than the first group. Again, FEHG gives uations show that the quality of FEHG is worse than the best partitioning results on these types of hyperthe other partitioners. In the case of NETSCIENCE (which A Serial Multilevel Hypergraph Partitioning Algorithm (g) Cut of size zero found for 2-way and 4-way partitioning. No results for hMetis for 32-way partitioning. 13 (j) (k) (h) Fig. 5: (Continued) Comparing the variation of the average cut for different partitioning numbers. The weight of vertices are unit and the weight of hyperedges are their sizes. (i) Fig. 5: (Continued) Comparing the variation of the average cut for different partitioning numbers. The weight of vertices are unit and the weight of hyperedges are their sizes. has a very small size), most of the algorithms go through only one level of coarsening. The difference between the cuts is less than 50. Due to the regular structure, local vertex matching decisions give much better results than global vertex matching. We have noticed that in these hypergraphs, the algorithm builds cores that contain a very small fraction of the vertices. Therefore, FEHG mostly relies on the local and random vertex matching which is based on Jaccard similarity. It seems that Jaccard similarity does not perform well compared to the other partitioners and the agglomerative vertex matching of PHG gives the best results. The results show that PaToH, which was very competitive with our algorithm for the unit hyperedge size tests, here generates very bad partitioning results. This suggests that our algorithm is more reliable than PaToH considered over all types of hypergraphs. Overall, PaToH and, then, hMetis generate the worst partitioning quality. Some of the partitioning results are not reported for hMetis because the algorithm terminates with an internal error on some of the hypergraphs and part numbers. Perhaps the reason is that hMetis suits only partitioning on unit hyperedge size as it is designed for VLSI circuit partitioning. The running times of the algorithms are reported in Table 7. The ranking of algorithms in order of decreasing running time is hMetis, FEHG, PHG, and PaToH. We note that allowing multiple matches of the vertices can provide not only better partitioning quality compared to pair-matching, but also that it can improve the running time of the algorithm because of the faster reduction in hypergraph size during coarsening. In the case of non-unit hyperedge weights, we have tested our 14 algorithm to see the effects of multiple matching on the performance of the algorithm. In order to do this, we match all vertices that belong to a core when a core is found in our rough set clustering algorithm. The only limitation is that we do not allow the weight of a coarser vertex to exceed the size of a part because it makes it difficult to maintain the balance constraint. The evaluation shows that using multiple matching in our algorithm can improve the runtime by up to 7% and the maximum improvement is observed for CNR-2000 (up to 30% improvement in runtime). In another evaluation, we have evaluated the performance of our clustering coefficient update strategy. For this purpose, we calculate the CC of the hypergraph in every coarsening level and compare the results with when updates are used. The quality does not improve in all cases. For example, the quality of the third type of hypergraph described above was diminished by 1% on average. The best quality improvement is for CNR-2000 that is 6% and it was between 0.2% to 1.5% on other hypergraphs. On the other hand, the runtime of the algorithms are increased by up to 16%. This shows that our update method is very reliable and there is no need to calculate the CC in each coarsening level. Finally, the detailed running time of FEHG and the amount of time the algorithm spends in each section is given in Table 8 for {2, 8, 32}-way partitioning on some of the hypergraphs. In the table, the overall running time is given in the first row. Build is the time for building data structures and preparation time, recursion is recursive bipartitioning time, vcycle is the amount of time for reduction and hypergraph projection in the multi-level paradigm, HCG is for building HCG, matching includes the time for rough set matching algorithm. Finally, coarsening, initPart and refinement are the time taken for building the coarser hypergraph in the coarsening phase, initial partitioning and uncoarsening phases of FEHG. The most time consuming part of the algorithm is building HCG: around 27% of the whole running time. The rough set clustering takes only 13% of the runtime. Building the coarser hypergraph and the initial partitioning and the coarsening each takes around 20%. One can reduce the initial partitioning time by decreasing the number of algorithms in this section. According to the data, the part where one can most usefully perform optimisations is in building the HCG. If the number of hyperedges is much higher than the number of vertices, its running time can take up most of the algorithm’s running time. The refinement phase takes at most 6% of the whole running time. Therefore, using mores passes of the FM algorithm to improve the quality will not increase the overall time significantly. On the other hand, Foad Lotfifar, Matthew Johnson there is little need for this. As discussed in [20], a good coarsening algorithm causes less effort in the refinement phase and increasing the passes of the FM algorithm does not make considerable improvement to the cut. This is the case for our FEHG algorithm. 5 Conclusion In this paper, we have proposed a serial multi-level hypergraph partitioning algorithm (FEHG) based on feature extraction and attribute reduction using rough set clustering. The hypergraph is transformed into an information system and rough set clustering techniques are used to find pair-matches of the vertices during the coarsening phase. This was done by, first, categorising the vertices into core and non-core vertices which is a global clustering decision using indispensability relations. In the later step, cores are traversed one at a time to find best matchings between vertices. This provides a trade-off between global and local vertex matching decisions. The algorithm is evaluated against the state-of-theart partitioning algorithms and we have shown that FEHG can achieve up to 40% quality improvement on hypergraphs from real applications. We chose our test hypergraphs to model different scenarios in real applications and we found that FEHG is the most reliable algorithm and generates the highest quality partitionings on most of the hypergraphs. The quality improvement was much better in hypergraphs with more irregular structures; that is, with higher variation of vertex degree or hyperedge size. We found that one of the drawbacks of local vertex matching decisions is that they perform very differently under various problem circumstances and their behaviour can change based on the structure of the hypergraph under investigation. The worst case observed was PaToH that generated very good and competitive partitioning compared to our algorithm when the hyperedge weights were assumed to be 1, while it gave much worse quality when the hyperedge weights were driven by the hyperedge sizes. Evaluation of the runtime of the algorithms has shown that the FEHG, while using global clustering decisions, runs slower than PHG and PaToH, but faster than hMetis. We showed that the runtime can be improved by using multiple matching on the vertex set instead of pair-matching. Furthermore, we have observed that the most time consuming part of the algorithm is building HCG. In future work, we are planning to improve this aspect of the proposed algorithm to improve the runtime. A Serial Multilevel Hypergraph Partitioning Algorithm 15 Table 7: Comparing the running time of algorithms for different partitioning. Vertices have unit weights and hyperedge weights are equal to their size. The times are reported in milliseconds. AS-22JULY06 CELEGANSNEURAL NETSCIENCE PGPGIANTCOMPO CNR-2000 GUPTA1 MARK3JAC120 NOTREDAME WWW PATENTS MAIN STD1 JAC3 COND-MAT-2005 FEHG-ADJ PHG hMetis PaToH FEHG-ADJ PHG HMETIS PATOH FEHG-ADJ PHG HMETIS PATOH FEHG-ADJ PHG HMETIS PATOH FEHG-ADJ PHG HMETIS PATOH FEHG-ADJ PHG HMETIS PATOH FEHG-ADJ PHG HMETIS PATOH FEHG-ADJ PHG HMETIS PATOH FEHG-ADJ PHG HMETIS PATOH FEHG-ADJ PHG HMETIS PATOH FEHG-ADJ PHG HMETIS PATOH The performance of serial hypergraph partitioning algorithms is limited and it is not possible to partition very large hypergraphs with billions of vertices and hyperedges using the computing resources of one computer, and in future work we will propose a scalable parallel version of the FEHG algorithm based on the parallel rough set clustering techniques. Acknowledgements We would like to thank four anonymous reviewers who gave helpful comments on a preliminary 2 109 157 126 82 8 4 12 4 5 4 – 2 114 44 170 12 19480 3035 22590 2004 1843 937 994 914 708 318 1748 128 1588 2129 5442 632 1933 1274 11850 396 4970 1116 4086 1720 643 318 3800 162 Number of Parts 4 8 16 210 308 412 274 413 522 344 803 1370 212 336 422 15 21 27 7 19 25 18 32 – 4 6 8 10 17 27 6 10 22 – 14 20 2 4 4 224 325 408 57 89 114 234 354 452 20 32 46 30570 39720 50140 5202 7317 9267 41680 50990 61190 3960 6000 8084 3014 4020 4918 1853 2648 3453 4066 11990 43000 2140 3544 5370 1304 1913 2546 588 891 1204 4570 7010 9410 272 416 604 4071 6487 9095 3673 5054 6203 12770 17190 23270 1262 1950 2626 3187 4430 5860 2156 2919 3610 24080 32860 38580 734 1024 1340 12270 19610 26710 2005 2775 3451 11480 19610 57300 3884 5372 8380 1137 1612 2210 535 750 954 7038 9930 13740 284 370 500 32 523 634 5902 514 33 22 – 12 34 32 – 8 491 147 544 62 57560 11060 68850 10390 6095 4285 331000 7298 3192 1592 11130 796 11130 7207 28060 3316 7514 4251 42630 1648 32630 4033 175500 10830 2772 1178 20020 584 version of this paper. We also thank Prof. Andre Brinkmann and Dr. Lars Nagel from the Efficient Computing and Storage Group at Johannes Gutenberg University of Mainz for their help and support. References 1. Alpert, C., Caldwell, A., Kahng, A., Markov, I.: Hypergraph partitioning with fixed vertices [vlsi cad]. ComputerAided Design of Integrated Circuits and Systems, IEEE Transactions on 19(2), 267–272 (2000) 16 Foad Lotfifar, Matthew Johnson 0.0831 0.0118 0.0000 0.0025 0.0257 0.0071 0.0181 0.0124 0.0051 0.2456 0.0113 0.0081 0.0088 0.0727 0.0184 0.0470 0.0553 0.0230 0.4007 0.0110 0.0157 0.0159 0.1059 0.0292 0.0771 0.0905 0.0535 1.5562 0.4568 0.0000 0.0048 0.0000 0.0000 0.0000 1.0467 0.0286 6.2414 0.5750 0.2712 0.1453 1.7675 0.7289 1.3447 1.1754 0.2041 9.8867 0.4578 0.5302 0.2789 2.9710 1.1691 2.5044 1.4581 0.4734 2. Alpert, C.J.: Multi-way graph and hypergraph partitioning. Ph.D. thesis, UCLA Computer Science Department (1996) 3. Alpert, C.J., Huang, J.H., Kahng, A.B.: Multilevel circuit partitioning. Computer-Aided Design of Integrated Circuits and Systems, IEEE Transactions on 17(8), 655–667 (1998) 4. Aykanat, C., Cambazoglu, B.B., Uçar, B.: Multi-level direct k-way hypergraph partitioning with multiple constraints and fixed vertices. Journal of Parallel and Distributed Computing 68(5), 609–625 (2008) 5. Bloznelis, M., et al.: Degree and clustering coefficient in sparse random intersection graphs. The Annals of Applied Probability 23(3), 1254–1289 (2013) 6. Çatalyürek, Ü., Aykanat, C.: Patoh (partitioning tool for hypergraphs). In: Encyclopedia of Parallel Computing, pp. 1479–1487. Springer (2011) 7. Catalyurek, U.V., Aykanat, C.: Hypergraph-partitioningbased decomposition for parallel sparse-matrix vector multiplication. Parallel and Distributed Systems, IEEE Transactions on 10(7), 673–693 (1999) 8. Cong, J., Lim, S.K.: Multiway partitioning with pairwise movement. In: Proceedings of the 1998 IEEE/ACM International Conference on Computer-aided Design, ICCAD ’98, pp. 512–516. ACM, New York, NY, USA (1998) MAIN 1.9312 0.3496 0.0000 0.0604 0.4512 0.2275 0.4377 0.3019 0.0868 4.9619 0.3474 0.2091 0.1625 1.1641 0.5581 1.0932 1.1883 0.2150 7.6629 0.3456 0.3908 0.2547 1.8239 0.8517 1.7197 1.8681 0.3724 7.3650 0.4181 0.0000 1.7775 3.6833 0.1238 1.1945 0.0466 0.1072 18.2084 0.4182 0.4072 4.8115 8.7172 0.3300 3.0456 0.1084 0.3463 28.5887 0.4173 0.8082 9.6070 11.8124 0.4540 4.3973 0.3006 0.7559 COND -MAT -2005 0.0059 0.0014 0.0000 0.0003 0.0007 0.0009 0.0013 0.0003 0.0007 0.0167 0.0006 0.0026 0.0004 0.0049 0.0012 0.0043 0.0002 0.0024 0.0363 0.0010 0.0027 0.0024 0.0029 0.0028 0.0054 0.0133 0.0053 JAC3 0.0080 0.0003 0.0000 0.0000 0.0034 0.0000 0.0000 0.0040 0.0000 0.0218 0.0009 0.0008 0.0009 0.0023 0.0005 0.0013 0.0116 0.0033 0.0360 0.0009 0.002 0.0013 0.0023 0.0004 0.0012 0.0230 0.0045 STD1 0.1461 0.0230 0.0000 0.0036 0.0224 0.0352 0.0332 0.0190 0.0086 0.3722 0.0235 0.0161 0.0095 0.0514 0.0903 0.0838 0.0650 0.0309 0.6258 0.0233 0.0331 0.0156 0.0776 0.1317 0.1267 0.1372 0.0772 PATE NTS EDAM E NOTR IANT COM PO E CIEN C ANSN PGPG 32 NETS 8 CELE G 2 Overall Build Recursion Vcycle HCG Matching Coarsening InitPart Refinement Overall Build Recursion Vcycle HCG Matching Coarsening InitPart Refinement Overall Build Recursion Vcycle HCG Matching Coarsening InitPart Refinement AS-22 J Parts ULY0 6 EURA L Table 8: The time that FEHG algorithm spends in each phase of the algorithms. Times are reported in seconds. 0.6155 0.0697 0.0000 0.0203 0.2475 0.0638 0.1108 0.0748 0.0260 1.7036 0.0700 0.0562 0.0604 0.6657 0.1749 0.3349 0.2346 0.1017 2.7925 0.0699 0.112 0.0992 0.9619 0.2597 0.5536 0.4734 0.2545 9. Curino, C., Jones, E., Zhang, Y., Madden, S.: Schism: a workload-driven approach to database replication and partitioning. Proceedings of the VLDB Endowment 3(12), 48–57 (2010) 10. Davis, T.A., Hu, Y.: The university of florida sparse matrix collection. ACM Transactions on Mathematical Software 38(1), 1 (2011) 11. Devine, K., Boman, E., Heaphy, R., Bisseling, R., Catalyurek, U.: Parallel hypergraph partitioning for scientific computing. In: Parallel and Distributed Processing Symposium, 2006. IPDPS 2006. 20th International, p. 10pp (2006) 12. Erdos, P., Goodman, A.W., Pósa, L.: The representation of a graph by set intersections. Canad. J. Math 18(106112), 86 (1966) 13. Ertoz, L., Steinbach, M., Kumar, V.: A new shared nearest neighbor clustering algorithm and its applications. In: Workshop on Clustering High Dimensional Data and its Applications at 2nd SIAM International Conference on Data Mining, pp. 105–115 (2002) 14. Ertöz, L., Steinbach, M., Kumar, V.: Finding clusters of different sizes, shapes, and densities in noisy, high dimensional data. In: SDM, pp. 47–58. SIAM (2003) 15. Fiduccia, C.M., Mattheyses, R.M.: A linear-time heuristic for improving network partitions. In: 19th Conference on Design Automation, pp. 175–181. IEEE (1982) A Serial Multilevel Hypergraph Partitioning Algorithm 16. Fjällström, P.O.: Algorithms for graph partitioning: A survey. Linköping electronic articles in computer and information science 3(10) (1998) 17. Foudalis, I., Jain, K., Papadimitriou, C., Sideri, M.: Modeling social networks through user background and behavior. In: Proceedings of the 8th International Conference on Algorithms and Models for the Web Graph, WAW’11, pp. 85–102. Springer-Verlag (2011) 18. Garey, M.R., Johnson, D.S.: Computers and intractability: a guide to the theory of np-completeness. 1979. San Francisco, LA: Freeman (1979) 19. Gavin, A.C., Bösche, M., Krause, R., Grandi, P., Marzioch, M., Bauer, A., Schultz, J., Rick, J.M., Michon, A.M., Cruciat, C.M., et al.: Functional organization of the yeast proteome by systematic analysis of protein complexes. Nature 415(6868), 141–147 (2002) 20. George, K.: Multilevel hypergraph partitioning. Tech. rep., University of Minnesota (2002) 21. Goldberg, M.K., Burstein, M.: Heuristic improvement technique for bisection of VLSI networks. IBM Thomas J. Watson Research Division (1983) 22. Heintz, B., Chandra, A.: Beyond graphs: Toward scalable hypergraph analysis systems. SIGMETRICS Perform. Eval. Rev. 41(4), 94–97 (2014) 23. Hendrickson, B.: Graph partitioning and parallel solvers: Has the emperor no clothes? In: Solving Irregularly Structured Problems in Parallel, pp. 218–225. Springer (1998) 24. Hu, T., Liu, C., Tang, Y., Sun, J., Xiong, H., Sung, S.Y.: High-dimensional clustering: a clique-based hypergraph partitioning framework. Knowledge and information systems 39(1), 61–88 (2014) 25. Ihler, E., Wagner, D., Wagner, F.: Modeling hypergraphs by graphs with the same mincut properties. Inf. Process. Lett. 45(4), 171–175 (1993) 26. Karypis, G.: hmetis: Hypergraph and circuit partitioning - version 1.5 (2007) 27. Karypis, G., Kumar, V.: hmetis: A hypergraph partitioning package version 1.5”, user manual (1998) 28. Karypis, G., Kumar, V.: Multilevel k-way hypergraph partitioning. In: Proceedings of ACM/IEEE Design Automation Conference, pp. 343–348 (1999) 29. Klamt, S., Haus, U.U., Theis, F.: Hypergraphs and cellular networks. PLoS Comput Biol 5(5), e1000,385 (2009) 30. Latapy, M., Magnien, C., Del Vecchio, N.: Basic notions for the analysis of large two-mode networks. Social Networks 30(1), 31–48 (2008) 31. Malewicz, G., Austern, M.H., Bik, A.J., Dehnert, J.C., Horn, I., Leiser, N., Czajkowski, G.: Pregel: A system for large-scale graph processing. In: Proceedings of the 2010 ACM SIGMOD International Conference on Management of Data, SIGMOD ’10, pp. 135–146. ACM, New York, NY, USA (2010) 32. Márquez, C., Cesar, E., Sorribes, J.: Graph-based automatic dynamic load balancing for hpc agent-based simulations. In Proc. of 3rd Workshop on Parallel and Distributed Agent-Based Simulations (PADABS2015), Vienna, Austria (2015) 33. Pawlak, Z.: Rough Sets: Theoretical Aspects of Reasoning About Data. Kluwer Academic Publishers, Norwell, MA, USA (1991) 34. Pawlak, Z., Polkowski, L., Skowron, A.: Rough sets: An approach to vagueness. Encyclopedia of Database Technologies and Applications pp. 575–580 (2005) 35. Saab, Y., Rao, V.: On the graph bisection problem. Circuits and Systems I: Fundamental Theory and Applications, IEEE Transactions on 39(9), 760–762 (1992) 17 36. Sanchis, L.: Multiple-way network partitioning. Computers, IEEE Transactions on 38(1), 62–81 (1989) 37. Sandia National Laboratories: Trilinos: Open source software libraries for the development of scientific applications (2014) 38. Sandia National Laboratories: Zoltan: Parallel partitioning, load balancing and data-management services (2014) 39. Skowron, A., Rauszer, C.: The discernibility matrices and functions in information systems. In: Intelligent Decision Support, pp. 331–362. Springer (1992) 40. Steinbach, M., Karypis, G., Kumar, V., et al.: A comparison of document clustering techniques. KDD workshop on text mining 400(1), 525–526 (2000) 41. Thangavel, K., Pethalakshmi, A.: Review: Dimensionality reduction based on rough set theory: A review. Appl. Soft Comput. 9(1), 1–12 (2009) 42. Tian, Z., Hwang, T., Kuang, R.: A hypergraph-based learning algorithm for classifying gene expression and arraycgh data with prior knowledge. Bioinformatics 25(21), 2831–2838 (2009) 43. Trifunovic, A.: Parallel algorithms for hypergraph partitioning. Ph.D. thesis, University of London (2006) 44. Wang, L., Xiao, Y., Shao, B., Wang, H.: How to partition a billion-node graph. In: Data Engineering (ICDE), 2014 IEEE 30th International Conference on, pp. 568–579. IEEE (2014) 45. Wróblewski, J.: Finding minimal reducts using genetic algorithms. In: Proccedings of the second annual join conference on infromation science, pp. 186–189 (1995) 46. Wróblewski, J.: Genetic algorithms in decomposition and classification problems. In: Rough Sets in Knowledge Discovery 2, pp. 471–487. Springer (1998) 47. Zhou, D., Huang, J., Schölkopf, B.: Learning with hypergraphs: Clustering, classification, and embedding. In: Advances in neural information processing systems, pp. 1601–1608 (2006) 48. Ziarko, W., Shan, N.: Discovering attribute relationships, dependencies and rules by using rough sets. In: hicss, p. 293. IEEE (1995)
8cs.DS
Phone-aware Neural Language Identification Zhiyuan Tang, Dong Wang, Yixiang Chen, Ying Shi, Lantian Li Center for Speech and Language Technologies (CSLT), Tsinghua University Corresponding author:[email protected] arXiv:1705.03152v2 [cs.CL] 22 May 2017 Abstract Pure acoustic neural models, particularly the LSTM-RNN model, have shown great potential in language identification (LID). However, the phonetic information has been largely overlooked by most of existing neural LID models, although this information has been used in the conventional phonetic LID systems with a great success. We present a phone-aware neural LID architecture, which is a deep LSTM-RNN LID system but accepts output from an RNN-based ASR system. By utilizing the phonetic knowledge, the LID performance can be significantly improved. Interestingly, even if the test language is not involved in the ASR training, the phonetic knowledge still presents a large contribution. Our experiments conducted on four languages within the Babel corpus demonstrated that the phone-aware approach is highly effective. Index Terms: language identification, long short-term memory 1. Introduction Language identification (LID) lends itself to a wide range of applications, e.g., mix-lingual (code-switching) speech recognition. Early methods are based on statistical models of phonetic or acoustic units [1, 2, 3]. Recent methods are based on probabilistic acoustic modeling, among which the i-vector model is perhaps the most successful [4, 5]. Recently, deep neural models have attracted much attention in LID. Lopez-Moreno et al. [6] proposed a DNN-based approach which uses a DNN to discriminate different languages at the frame-level, and the language posteriors of an utterance are generated by a simple average of all the frame-level posteriors of the utterance. An RNN-based approach was later proposed by Gonzalez-Dominguez et al. [7], and better performance was obtained with much less parameters compared to the DNN-based model. Due to the advantage in temporal modeling, the RNN approach has been followed by a number of researchers, e.g., [8, 9]. Other neural model structures were also investigated, e.g., CNN [10, 11] and TDNN [12, 13]. Compared to the i-vector approach that is based on a probabilistic model, these pure neural methods show clear advantage in short utterances (e.g., 2∼3 seconds) [6, 7, 9]. The main advantage of the neural-based methods, compared to the i-vector model, is that they are discriminative and can learn complex decision bounds between languages, provided that sufficient data is provided. Moreover, the power of feature learning associated with deep neural nets often provides better robustness against noise and speaker variation, which is highly important for LID. Deep neural models are also used in a hybrid way, i.e., to generate features [14] or alignment [15, 16] for an i-vector model. In this case, the phonetic DNN/RNN model is trained for phone discrimination as in automatic speech recognition (ASR). This model is then used to produce bottle-neck features or acoustic alignment for constructing the i-vector model. By using the phonetic information that is directly related to LID, the i-vector model can be consistently improved. The above two-approaches have their own disadvantages. For the pure neural approach, the entire system relies on raw features, ignoring any phonetic information that is known to be important from the beginning of LID research [2]; for the hybrid system, it is still based on a probabilistic model that (1) involves a strong Gaussian assumption that is not suitable for dealing with complex class (here, language) boundaries; (2) requires relatively more speech frames to estimate a reliable i-vector, which is not applicable to many real applications that require quick identification, e.g., code-switch ASR. In this paper, we follow the pure neural model scheme, and enhance the existing models by introducing phonetic information as an auxiliary feature. Due to the clear advantage of the LSTM-RNN in both ASR and LID, we adopt this model in the study, though the idea of leveraging phonetic information is applicable to any neural models. The architecture is illustrated in Figure 1, which involves a phonetic RNN that is trained to discriminate phones as in ASR and produces phonetic features once the training is done, and an LID RNN which receives the phonetic features and uses them together with the raw acoustic feature to perform LID. This model has the following properties: • The phonetic RNN can be trained with flexible objectives. It can be discriminant for phones (as in ASR) or for both phones and languages, following the multi-task learning principle [17]. • The phonetic RNN can be trained independently from the LID RNN. This means that it can be trained using data of any languages that are totally different from the target languages of the LID task. This is particularly attractive when the LID task is to discriminate lowresource languages. • The phonetic feature extraction and propagation is flexible. It can be extracted from any place of the phonetic RNN, and can be propagated to any place of the LID RNN. This architecture is a reminiscence of the early phonetic recognition and language modeling (PRLM) approach [18], where a phone recognizer is used as a front-end to decode phonetic units, followed by a phonetic LM to perform scoring. The two RNNs in our architecture can be regarded as corresponding to the phone recognizer and the LM respectively, although the structure is much more flexible than the historic model. In fact, if the phonetic features are derived from the output layer of the phonetic RNN and are propagated to the input layer of the LID RNN, and if the raw feature is omitted, we obtain a PRLM system where the LID RNN is essentially an RNN-based phone LM. This architecture was recently studied by Salamea et al. [19]. The rest of the paper is organized as follows: the model structure is described in Section 2 and the experiments are re- ASR output LID output In the above equations, the W terms denote weight matrices and those associated with the cells were constrained to be diagonal in our implementation. The b terms denote bias vectors. xt and yt are the input and output symbols respectively; it , ft , ot represent respectively the input, forget and output gates; ct is the cell and mt is the cell output. rt and pt are two output components derived from mt , where rt is recurrent and fed to the next time step, while pt is not recurrent and contributes to the present output only. σ(·) is the logistic sigmoid function, and g(·) and h(·) are non-linear activation functions, often chosen to be hyperbolic. denotes element-wise multiplication. LID output input input Figure 1: The architecture of phone-aware neural language identification. ported in Section 3, followed by some conclusions and future work in Section 4. 2. Model structure We choose the LSTM-RNN as the phonetic RNN and the LID RNN components in the study. One reason for the choice is that LSTM-RNN has been demonstrated to perform well in both the ASR output LID output pure neural approach [7] and the hybrid approach [16]. Another reason is that this structure (phonetic feature plus RNN LID) is in accordance with our motivation to model the phonetic dynamics as in the old PRLM approach [18]. This section first describes the LSTM-RNN the study, and then LSTM structure used inLSTM presents the phone-aware LID system. 2.2. Phone-aware LID system As a preliminary work to demonstrate the concept, we design a simple phone-aware LID system as shown in Figure 3, where both the phonetic RNN and the LID RNN involve a single LSTM layer. Although the phonetic features can be extracted from any places of the phonetic RNN, we choose to use the output of the recurrent projection layer. Similarly, the receiver of the phonetic features is also flexible and we will investigate the performance of difference choices. The configure shown in Figure 3 uses the non-linear function g(·) as the receiver. With this configure, most computation of the LID RNN remains the same, except that the cell value should be updated as follows: ct = ft 0 0 g(Wcx xt + Wcr rt−1 + Wcr r t + bc ) ct−1 + it where rt0 is the phonetic feature propagated from the phonetic RNN. r 't 1 2.1. LSTM structure  rt  1 xt  g' c 't 1 c 't o 't h'  m 't ot ct h  mt yt pt xt g  ct 1 it ct  The associated computation is given as follows: it ft ct ot mt rt pt yt = = = = = = = = σ(Wix xt + Wir rt−1 + Wic ct−1 + bi ) σ(Wf x xt + Wf r rt−1 + Wf c ct−1 + bf ) ft ct−1 + it g(Wcx xt + Wcr rt−1 + bc ) σ(Wox xt + Wor rt−1 + Woc ct + bo ) ot h(ct ) Wrm mt Wpm mt Wyr rt + Wyp pt + by ot ft memory block Figure 2: The LSTM model for the study. The picture is reproduced from [20].  h mt y 't pt rt languages ct 1 projection xt  projection input it g rt recurrent  p 't input ft output recurrent memory block r 't phones f 't i 't recurrent Multilingual The LSTM model proposed in [20] is used in the study, as input shown in Figure 2. projection memory block yt rt 1 Figure 3: The phone-aware LID system. In this study, all the RNN models use the same configuration that the LSTM layer consists of 1, 024 cells, and the dimensionality of both the recurrent and non-recurrent projections is set to 256. The natural stochastic gradient descent (NSGD) algorithm [21] is employed to train the model. 3. Experiments 3.1. Database and configurations The experiments were conducted with the Babel corpus. This corpus was collected as part of the IARPA (Intelligence Advanced Research Projects Activity) Babel program, with aim to develop speech technologies for low-resource languages. In this paper, we chose speech data of four languages from the Babel corpus to conduct the study: Assamese, Georgian, Bengali, and Turkish. For each language, a training dataset and a development dataset were officially provided. Training dataset contains both conversational speech and scripted speech and development dataset only has conversational speech. We used the entire training set of each language in the model training, but randomly selected 2, 000 utterances from the development set of each language to perform the test. The training data sets from the four languages are as follows: Assamese1 187 hours, Georgian2 159 hours, Bengali3 217 hours, and Turkish4 268 hours. The average length of the test utterances is 9.50 seconds, ranging from 0.48 seconds to 56.78 seconds. The raw feature used for the RNN models is 23dimensional Fbanks, with a symmetric 2-frame window to splice neighboring frames. All the experiments were conducted with Kaldi [22]. The default configurations of the Kaldi WSJ s5 nnet3 recipe were used to train the phonetic RNN and the LID RNN. 3.2. Baseline results As the first step, we build three RNN baseline systems using the speech data of two languages: Assamese and Georgian. The three RNN baselines are: multilingual ASR system (AG-ASR), LID system (AG-LID), ASR-LID multi-task system (AG-MLT). For the AG-ASR, the phone sets of the two languages are merged and the softmax group involves all the state targets, which is 3, 349 in our experiment. The ASR performance in terms of word error rate (WER) is 68.2% and 65.5% for Assamese and Georgian on the whole development dataset, respectively. The training and decoding follow the standard WSJ s5 nnet3 recipe of Kaldi. For the AG-LID, the output layer consists of two units, corresponding to the two languages respectively. The training procedure is similar to the one used for training the AG-ASR model. The AG-MLT model involves two groups of targets, and the training utilizes the labels of both phones and languages. The LID for Assamese and Georgian can be conducted by either AG-LID or AG-MLT, using the language posteriors they produce. The performance results with these two systems, in terms of Cavg and equal error rate (EER), are shown in Table 1. Both the frame-level performance and the utterance-level performance are reported. For the utterance-level results, the frame-level posteriors are averaged to produce the utterancelevel posterior, with which the LID is conducted. as the ASR targets can help to regularize the model training and alleviate the impact of variability factors such as noise and speaker. 3.3. Phonetic feature The three baseline RNNs will be used as the candidates of the phonetic RNN. We visualize the discriminative power of the phonetic features produced by these RNNs using PCA. Specifically, 20 test utterances are randomly selected from the test set for each language, and these utterances are fed into the phonetic RNN frame by frame. For each frame, the phonetic feature is read from the recurrent projection layer of the tested RNN, and then is projected into the 2-dimensional space by PCA. Figure 4 presents the distribution of the features for Assamese and Georgian, the two languages ‘known’ in the model training. Figure 5 shows the distribution for Bengali and Turkish, two language that are ‘unknown’ in the model training. Figure 6 shows the distribution of the features of all the four languages. It can be observed that all the three RNNs possess certain discriminative capability for both the known and unknown languages. Comparing the three models, the features generated by the ASRbased RNN is clearly worse, and the features generated by the multi-task RNN looks more discriminative. Note that the phonetic features of Assamese and Bengali are highly overlapped, no matter which phonetic RNN is used. This means that the four-language LID task will be highly difficult, as we will see shortly. 4 2 -4 -10 -4 10 -10 AG-ASR Assamese Georgian 4 -6 20 -5 AG-LID 5 AG-MLT Figure 4: Features of the speech data from Assamese and Georgian, produced by the three phonetic RNNs. 4 Bengali Turkish 4 2 Table 1: LID results of the baseline systems on known languages (Assamese and Georgian). Model AG-LID AG-MLT Cavg Fr. Utt. 0.1545 0.0905 0.0822 0.0399 EER% Fr. Utt. 16.20 9.20 8.68 4.10 The results in Table 1 indicates that both the LID RNN and the multi-task LID RNN are capable of language discrimination, and the multi-task RNN performs better. This is expected 1 Language collection release IARPA-babel102b-v0.5a. collection release IARPA-babel404b-v1.0a. 3 Language collection release IARPA-babel103b-v0.4b. 4 Language collection release IARPA-babel105b-v0.5. 2 Language -4 -10 -3 10 -20 AG-ASR 10 -4 -5 AG-LID 5 AG-MLT Figure 5: Features of the speech data from Bengali and Turkish, produced by the three phonetic RNNs. 3.4. Phone-aware LID on known languages Due to the clear advantage of the AG-MLT in language discrimination, we first choose this model to be the candidate of the 4 2 Assamese Georgian Bengali Turkish 4 information the phonetic RNN provides is generally valuable. This in fact demonstrates that the phonetic RNN can be trained very flexibly, by using speech data of any languages. This is particulary interesting for languages with too little training data to obtain a reasonable phonetic RNN. Table 3: Results of phone-aware LID on unknown languages (Bengali and Turkish). -4 -10 -4 10 -20 AG-ASR 20 -6 -5 5 AG-LID AG-MLT Figure 6: Features of the speech data from Assamese, Georgian, Bengali and Turkish, produced by the three phonetic RNNs Phonetic RNN AG-MLT LID RNN BT-LID BT-LID Cavg Fr. Utt. 0.1740 0.0813 0.0869 0.0194 EER% Fr. Utt. 17.47 8.65 8.70 2.15 3.6. Phone-aware LID on four languages phonetic RNN to produce phonetic features. The LID RNNs are trained to discriminate the two known languages: Assamese and Georgian. The results are shown in Table 2, where four configurations for the ‘receiver’ of the phonetic feature are tested: the input gate, the forget gate, the output gate and the g function. Compared to the results with the baseline RNNs (Table 1), introducing the phonetic feature leads to clear performance improvement, on both the frame-level and the utterance-level, in terms of both Cavg and EER. Then we use the AG-ASR and AG-LID models as the phonetic RNNs with only the best configurations above, that is, the g function or output gate as the receiver. The AG-ASR results in better performance than both the baseline and AG-LID, which further confirms our conjecture that phonetic information is valuable for neural-based LID. Table 2: Results of phone-aware LID on known languages (Assamese and Georgian). Cavg Phonetic RNN AG-MLT AG-MLT AG-MLT AG-MLT AG-ASR AG-ASR AG-LID AG-LID Inf. receiver input gate forget gate output gate g function output gate g function output gate g function Fr. 0.0762 0.0765 0.0752 0.0726 0.0801 0.0795 0.1310 0.1279 Utt. 0.0298 0.0280 0.0286 0.0264 0.0298 0.0283 0.0638 0.0640 EER% Fr. Utt. 7.99 3.25 8.01 3.20 7.91 3.15 7.57 2.92 8.38 3.28 8.38 3.08 13.67 7.00 13.45 6.95 3.5. Phone-aware LID on unknown languages We now test the generalizability of the phonetic feature. Specifically, we use the feature to help discriminate two new languages, i.e., the languages that are unknown during the phonetic RNN training, which are Bengali and Turkish in our experiment. To test the gain with the phonetic feature, the LID RNN trained with the two target languages, Bengali and Turkish, denoted by BT-LID, is used as the baseline. For simplicity, we only test the scenario where the AG-MLT is used as the phonetic RNN, and the g function is used as the feature receiver. The results are shown in Table 3. It can be seen that although the phonetic RNN has no knowledge of the two target languages, the phonetic feature it produces is still highly valuable for the LID task. This is understandable as the phonetic units are often shared by human languages, and so the phonetic The final experiment tests the LID performance on all the four languages. The baseline system is the RNN LID model trained with the data of the four languages, denoted by AGBT-LID. For the phone-aware system, the AG-MLT is used to produce the phonetic feature, and the g function is used as the feature receiver. The results are shown in Table 4. Again, the performance is greatly improved by involving the phonetic feature. Table 4: Results of phone-aware LID on four languages (Assamese, Georgian, Bengali and Turkish). Phonetic RNN AG-MLT LID RNN AGBT-LID AGBT-LID Cavg Fr. Utt. 0.2131 0.1499 0.1531 0.0833 EER% Fr. Utt. 21.34 15.75 15.43 9.27 4. Conclusions We presented a phone-aware LSTM-RNN model for language identification. Our argument is that phonetic information is important for LID. This information has been successfully used in the historical phonetic models such as the famous PRLM system, but it has been largely ignored by the present pure acoustic methods, either the i-vector model or the pure neural model. Particularly with the LSTM-RNN model, the inherent power on modeling temporal dynamics with this model has been largely wasted without phonetic information involved. The phoneaware architecture we proposed in the paper employs a deep neural model to produce phonetic features and these features are propagated to the vanilla LSTM-RNN LID system. Our experiments conducted on the data of four languages of the Babel corpus demonstrated that the phone-aware model can dramatically improve performance of the LSTM-RNN LID system. In the future, we will test the phone-aware approach on more languages and under more complex conditions. Particularly, we expect that with the phonetic information, the RNN-based LID may be significantly improved on long utterances, by providing the phonetic normalization. 5. References [1] L. F. Lamel and J.-L. Gauvain, “Language identification using phone-based acoustic likelihoods,” in Acoustics, Speech, and Signal Processing, 1994. ICASSP-94., 1994 IEEE International Conference on, vol. 1. IEEE, 1994, pp. I–293. [2] M. A. Zissman et al., “Comparison of four approaches to automatic language identification of telephone speech,” IEEE Transactions on speech and audio processing, vol. 4, no. 1, p. 31, 1996. [3] H. Li, B. Ma, and C.-H. Lee, “A vector space modeling approach to spoken language identification,” IEEE Transactions on Audio, Speech, and Language Processing, vol. 15, no. 1, pp. 271–284, 2007. [4] N. Dehak, A.-C. Pedro, D. Reynolds, and R. Dehak, “Language recognition via i-vectors and dimensionality reduction,” in Proceedings of the Annual Conference of International Speech Communication Association (INTERSPEECH), 2011, pp. 857–860. [5] D. Martınez, O. Plchot, L. Burget, O. Glembek, and P. Matejka, “Language recognition in ivectors space,” Proceedings of Interspeech, Firenze, Italy, pp. 861–864, 2011. [6] I. Lopez-Moreno, J. Gonzalez-Dominguez, O. Plchot, D. Martinez, J. Gonzalez-Rodriguez, and P. Moreno, “Automatic language identification using deep neural networks,” in Acoustics, Speech and Signal Processing (ICASSP), 2014 IEEE International Conference on. IEEE, 2014, pp. 5337–5341. [7] J. Gonzalez-Dominguez, I. Lopez-Moreno, H. Sak, J. GonzalezRodriguez, and P. J. Moreno, “Automatic language identification using long short-term memory recurrent neural networks.” in Interspeech, 2014, pp. 2155–2159. [8] G. Gelly, J.-L. Gauvain, V. Le, and A. Messaoudi, “A divide-andconquer approach for language identification based on recurrent neural networks,” Interspeech 2016, pp. 3231–3235, 2016. [9] R. Zazo, A. Lozano-Diez, J. Gonzalez-Dominguez, D. T. Toledano, and J. Gonzalez-Rodriguez, “Language identification in short utterances using long short-term memory (LSTM) recurrent neural networks,” PloS one, vol. 11, no. 1, p. e0146917, 2016. [10] A. Lozano-Diez, R. Zazo Candil, J. González Domı́nguez, D. T. Toledano, and J. Gonzalez-Rodriguez, “An end-to-end approach to language identification in short utterances using convolutional neural networks,” in Proceedings of the Annual Conference of the International Speech Communication Association, INTERSPEECH. International Speech and Communication Association, 2015. [11] M. Jin, Y. Song, I. Mcloughlin, L.-R. Dai, and Z.-F. Ye, “LIDsenone extraction via deep neural networks for end-to-end language identification,” in Proc. of Odyssey, 2016. [12] M. Kotov and M. Nastasenko, “Language identification using time delay neural network d-vector on short utterances,” in Speech and Computer: 18th International Conference, SPECOM 2016, Budapest, Hungary, August 23-27, 2016, Proceedings, vol. 9811. Springer, 2016, p. 443. [13] D. Garcia-Romero and A. McCree, “Stacked long-term tdnn for spoken language recognition,” Interspeech 2016, pp. 3226–3230, 2016. [14] Y. Song, B. Jiang, Y. Bao, S. Wei, and L.-R. Dai, “I-vector representation based on bottleneck features for language identification,” Electronics Letters, vol. 49, no. 24, pp. 1569–1570, 2013. [15] L. Ferrer, Y. Lei, M. McLaren, and N. Scheffer, “Study of senonebased deep neural network approaches for spoken language recognition,” IEEE/ACM Transactions on Audio, Speech and Language Processing (TASLP), vol. 24, no. 1, pp. 105–116, 2016. [16] Y. Tian, L. He, Y. Liu, and J. Liu, “Investigation of senone-based long-short term memory rnns for spoken language recognition,” Odyssey 2016, pp. 89–93, 2016. [17] R. Caruana, “Multitask learning,” Machine Learning, vol. 28, no. 1, pp. 41–75, 1997. [18] P. Matejka, L. Burget, P. Schwarz, and J. Cernocky, “Brno university of technology system for nist 2005 language recognition evaluation,” in Speaker and Language Recognition Workshop, 2006. IEEE Odyssey 2006: The. IEEE, 2006, pp. 1–7. [19] C. Salamea, L. F. D’Haro, R. de Córdoba, and R. San-Segundo, “On the use of phone-gram units in recurrent neural networks for language identification,” Odyssey 2016, pp. 117–123, 2016. [20] H. Sak, A. W. Senior, and F. Beaufays, “Long short-term memory recurrent neural network architectures for large scale acoustic modeling,” in Proceedings of the Annual Conference of International Speech Communication Association (INTERSPEECH), 2014, pp. 338–342. [21] D. Povey, X. Zhang, and S. Khudanpur, “Parallel training of deep neural networks with natural gradient and parameter averaging,” arXiv preprint arXiv:1410.7455, 2014. [22] D. Povey, A. Ghoshal, G. Boulianne, L. Burget, O. Glembek, N. Goel, M. Hannemann, P. Motlicek, Y. Qian, P. Schwarz et al., “The kaldi speech recognition toolkit,” in IEEE 2011 workshop on automatic speech recognition and understanding, no. EPFLCONF-192584. IEEE Signal Processing Society, 2011.
9cs.NE
1 Fast k -means based on KNN Graph arXiv:1705.01813v1 [cs.LG] 4 May 2017 Cheng-Hao Deng, and Wan-Lei Zhao Abstract—In the era of big data, k-means clustering has been widely adopted as a basic processing tool in various contexts. However, its computational cost could be prohibitively high as the data size and the cluster number are large. It is well known that the processing bottleneck of k-means lies in the operation of seeking closest centroid in each iteration. In this paper, a novel solution towards the scalability issue of k-means is presented. In the proposal, k-means is supported by an approximate k-nearest neighbors graph. In the k-means iteration, each data sample is only compared to clusters that its nearest neighbors reside. Since the number of nearest neighbors we consider is much less than k, the processing cost in this step becomes minor and irrelevant to k. The processing bottleneck is therefore overcome. The most interesting thing is that k-nearest neighbor graph is constructed by iteratively calling the fast k-means itself. Comparing with existing fast k-means variants, the proposed algorithm achieves hundreds to thousands times speed-up while maintaining high clustering quality. As it is tested on 10 million 512-dimensional data, it takes only 5.2 hours to produce 1 million clusters. In contrast, to fulfill the same scale of clustering, it would take 3 years for traditional k-means. Index Terms—fast clustering, k-means, k-nearest neighbor graph F 1 I NTRODUCTION Clustering problems arise from a wide variety of applications such as knowledge discovery [1], data compression [2], large-scale image linking [3] and visual vocabulary construction [4]. Since the general k -means algorithm [5], [6] was proposed in 1982, continuous efforts have been made to search for better solution for this issue. Various algorithms have been proposed in the last two decades, such as mean shift [7], DB-SCAN [8], spectral clustering [9], RankOrder [10] BIRCH [11] and Clusterdp [12], etc. Among these algorithms, k-means [6] remains popular for its simplicity, efficiency and moderate but stable performance under different contexts. It is known as one of top ten most popular algorithms in data mining [13]. In traditional k -means, given a set of n data samples in real d-dimensional space Rd , and an integer k, clustering is modeled as a distortion minimization process. The clustering process partitions n samples into k sets such that to minimize the mean squared distance from each sample to its nearest cluster centroid. It could be formularized as min X k Cr − xi k2 , (1) q(xi )=r where xi ∈ Rd and Cr is the centroid of cluster r. In Eqn. 1, function q(xi ) returns the closest centroid (among k centroids) for sample xi . In general, there are two major steps in the k-means iteration. In the first step, each sample is assigned to its closest centroid. In its second step, each centroid Cr is updated by taking the average over assigned samples. The above two steps are repeated until there is no distortion change (Eqn. 1) in two consecutive iterations. • Fujian Key Laboratory of Sensing and Computing for Smart City, and the School of Information Science and Engineering, Xiamen University, Xiamen, 361005, P. R. China. Wan-Lei Zhao is the corresponding author. E-mail: [email protected]. Although k -means remains popular, it actually suffers from two major issues. Firstly, it is well-known that k -means only converges to local optima. Recent researches have been working on improving its clustering quality [14], [15], [16]. Thanks to the introduction of incremental optimization strategy in [16], k -means is able to converge to considerably lower distortion. The second issue is mainly about its scalability. Although, the complexity of k -means is linear to the size of input data, the clustering cost could be prohibitively high given both the size of data and the expected number of clusters k are very large. Moreover, according to [17], [18], in its worst case, the running time for k -means could be exponential against the size of input samples. Due to the steady growth of data volume in various forms (web-pages, images, videos, audios and business transactions) on a daily basis, the scalability issue of this traditional algorithm becomes more and more imminent. In each k -means iteration, the most intensive operation is of assigning samples to their closest centroid. As a result, the scalability issue principally is due to the heavy cost of computing nearest centroid for each sample, which is O(n·d·k). In recent years, continuous efforts have been devoted to looking for effective solutions that are still workable in webscale data. Representative works are [19], [20], [21], [22], [23], [24], [25], [26], [27], [28]. However, most of the k -means variants achieve high speed efficiency while sacrificing the clustering quality. Algorithm presented in [29] demonstrates faster speed and maintains relatively high quality. Unfortunately, a lot of extra memory are required. Specifically, its memory complexity is quadratic to k, which turns out to be unsuitable in the case that k is very large. In this paper, an efficient k -means variant is proposed, in which the k -means clustering process is supported by an approximate k-nearest neighbor graph (KNN graph). The approximate KNN graph is built in its pre-processing step, in which the fast k -means itself and a KNN graph construction process are jointly undertaken. We interestingly 0.5 0.5 0.4 0.4 0.3 0.3 Probability Probability 2 0.2 0.1 0.2 0.1 0 0 0 50 100 Rank (a) k-means 150 0 50 100 Rank 150 (b) 2M tree Fig. 1. The stastitics on co-occurrence rate of one sample and its k th nearest neighbor that in the same cluster. Experiments have been conducted on SIFT100K [30] with traditional k-means [5] and two-means tree [31]. In the experiment, the size of each cluster is fixed to 50. Note that the probability of two randomly selected samples that fall into the same cluster is only 50/100000 = 0.0005  0.1. discover that, these two processes could be actually beneficial to each other. This idea is inspired by the following observation • With high probability that one sample and its nearest neighbors reside in the same cluster Fig. 1 shows the co-occurrence rate of one sample and its κ-th nearest neighbor in one cluster. k-means and its variants two-means tree [31] are tested on SIFT100K [30]. The same trend is observed in both cases. If the samples are closer, the probability that they appear in the same cluster is higher. This probability is much higher than the probability of a random collision. With this observation, we learn that one sample and its nearest neighbors should be arranged into the same cluster. On one hand, this indicates if one sample and its neighbors temporarily are not in the same cluster, it is reasonable to compare one sample only to the clusters where its neighbors reside. Among these clusters, there is probably a true one that all the neighboring samples should live together. On the other hand, from the viewpoint of k-nearest neighbor graph (KNN graph) construction, in order to build KNN list for one sample, it is sufficient to compare one sample to samples reside in the same cluster since its neighbors are most likely reside in the same cluster. Based on the above analysis, the scalability issue of k means clustering is addressed in two steps in the paper. Firstly, the fast k -means is called to build an approximate KNN graph for itself. Secondly, the fast k -means clustering is undertaken with the support of constructed KNN graph. During the fast k -means iteration, one sample will only compare to the clusters that its top-κ nearest neighbors reside. Usually, the number of nearest neighbors we consider is considerably smaller than the clustering number k. The number of clusters we actually visit is even fewer. As a consequence, significant speed-up is expected. Moreover, as revealed later, the clustering quality drops very little with such kind of speed-up scheme. Although our primary goal is to speed-up the k -means clustering with the support of KNN graph, we interestingly discover that satisfactory performance is achieved when the constructed KNN graph is applied on the approximate nearest neighbor search (ANNS) tasks. Moreover, comparing with the KNN graph construction algorithms that are specifically designed for approximate nearest neighbor search [32], [33], [34], our algorithm requires much lower computational cost. The remainder of this paper is organized as follows. The reviews about representative works on improving the performance of traditional k -means are presented in Section 2. In Section 3, two important k -means variants are reviewed, which facilitates the discussion of our algorithm in Section 4. Extensive experiment studies over proposed clustering method are presented in Section 5. Section 6 concludes the paper. 2 2.1 R ELATED W ORKS k -means Variants Due to its versatility and simplicity, k -means has been widely adopted in different contexts. In the era of big-data, k -means has been used as a basic tool to process large-scale data of various forms. Unfortunately, as discussed in Section 1, the computational cost could be prohibitively high as the scale of data increases to extraordinarily large, i.e. billion level. Recently, several k -means variants are proposed to either enhance its clustering quality or scalability. In terms of the clustering quality, one of the important work comes from S. Vassilvitskii et al. [14], [21]. The motivation is based on the observation that k -means converges to a better local optima if the initial clustering centroids are carefully selected. According to [14], k -means iteration also converges faster due to the careful selection on the initial cluster centroids. However, in order to adapt the initial centroids to the data distribution, k rounds of scanning over the data are necessary. Although the number of scanning rounds has been reduced to a few in [21], the extra computational cost is still inevitable. Recently, a new variant called boost k -means is proposed [16]. The “egg-chicken” loop in k -means has been simplified as a stochastic optimization process, which is also known as incremental k -means [1]. As indicated by extensive experiments, it is able to converge to a considerably better local optima while involving no extra cost. Due to its superior performance, this incremental optimization scheme is adopted in our design. In order to facilitate our discussion, a more detailed review about boost k -means is given in Section 3. In each k -means iteration, the processing bottleneck is the operation of assigning each sample to its closest centroid. The iteration becomes unbearably slow when both the size and the dimension of the data are very large. Noticed that this is a nearest neighbor search problem, Kanungo et al. [35] proposed to index dataset in a KD Tree [36] to speed-up the sample-to-centroid nearest neighbor search. Unfortunately, this is only feasible when the dimension of data is in few tens. Similar scheme has been adopted by Dan et al. [37]. However, due to the curse of dimensionality, this method becomes ineffective when the dimension of data grows to a few hundreds. A recent work [38] takes similar way to speed-up the nearest neighbor search by indexing dataset with inverted file structure. During the iteration, 3 each centroid is queried against all the indexed data. Attributing to the efficiency of inverted file structure, one to two orders of magnitude speed-up is observed. However, inverted file indexing structure is only effective for sparse vectors. Alternatively, the scalability issue of k -means is addressed by subsampling over the dataset during k -means iteration. Namely, methods in [20], [39] only pick a small portion of the whole dataset to update the clustering centroids each time. For the sake of speed efficiency, the number of iterations is empirically set to small value. It is therefore possible that the clustering terminates without a single pass over the whole dataset, which leads to higher speed but also higher clustering distortion. Even though, when coping with high dimensional data in big size, the speed-up achieved by these methods are still limited. Apart from above methods, the speed-up could be achieved by reducing the comparisons between samples and centroids. In [27], only the “active points”, which are the samples located on the cluster boundaries, are considered to be swapped between clusters. Comparing with other k means variants, it makes a good trade-off between efficiency and clustering quality whereas considerable quality degradation is still inevitable. Another easy way to reduce the number of comparisons between samples and centroids is to conduct the clustering in a top-down hierarchical manner [1], [40], [41]. Specifically, the clustering solution is obtained via a sequence of repeated bisections. The clustering complexity of k -means is reduced from O(t·k·n·d) to O(t·log(k)·n·d) [16]. This is particularly significant when n, d and k are all very large. However, poor clustering performance is achieved in the usual case as it breaks the Lloyd’s condition [16]. 2.2 K-Nearest Neighbor Graph Construction KNN graph is primarily built to support nearest neighbor search [32], [42]. It is also the key data structure in the manifold learning and machine learning, etc [32]. Basically, it tries to find the top-κ nearest neighbors for each data point. When it is built in brute-force way, its time complexity is O(d·n2 ), where both d and n could be very large. As a result, it is computationally expensive to build an exact KNN graph. For this reason, recent works [32], [33], [42], [43] aim to search for an approximate but efficient solution. In [42], an approximate KNN graph is built efficiently by divide-and-conquer strategy. In this algorithm, the original dataset is partitioned into thousands of small subsets by KD trees. KNN list is built by exhaustive comparison within each subset. However, the recall of KNN graph turns out to be very low. Recent works [33], [43] could be viewed as improvements over this work. In 2011, a very successful KNN graph construction algorithm called NN Descent/KGraph [32] has been proposed. This algorithm is proposed based on the observation that “a neighbor of a neighbor is also likely to be a neighbor”. According to [32], its empirical time complexity is only O(n1.14 ). Unfortunately, according to our observation, its recall drops dramatically as the scale of data increases to very large, i.e. 10M. Algorithm presented in [33] faces similar problem. In this paper, a novel KNN graph construction algorithm is proposed and used to support the fast k -means clustering. To the best of our knowledge, this is the first piece of work that KNN graph is used to speed-up k -means clustering. In addition, comparing with other KNN graph construction algorithms, our algorithm is computationally efficient and leads to lowest clustering distortion. Furthermore, when it is applied in ANNS problem, it shows satisfactory performance across different datasets. 3 PRELIMINARIES In order to facilitate our discussions in later sections, two important k -means variants are reviewed, namely, boost k -means (BKM) [16] and two means (2M) tree [31]. As shown later, our speed-up scheme is built upon boost k means instead of traditional k -means as the former always produces clusters of higher quality. While two means tree is used to produce initial clusters for its high efficiency. 3.1 Boost k -means As an extension of incremental k -means [1], boost k-means allows the optimization iteration to be feasible for the whole l2 space. Different from other k -means variants, boost k means iteration is driven by an explicit objective function. Given clusters Sr=1···k P , the composite vector of a cluster is defined as Dr = xi ∈Sr xi . The objective function of boost k -means is written as I= k X Dr0 Dr , nr r=1 (2) which is directly derived from Eqn. 1. With this objective function, the traditional k -means clustering is revised to a stochastic optimization procedure. Each time, one sample is randomly selected and searches for a better re-allocation that leads to highest increase of I . Namely, the variation of function value that is incurred by the possible movement (moving xi from Su to Sv ) is given by (Dv + xi )0 (Dv + xi ) (Du − xi )0 (Du − xi ) + nv + 1 nu − 1 Dv0 Dv Du0 Du − − . nv nu (3) The optimization process seeks for the movement that ∆I(xi ) is the highest and positive. In particular, the movement of xi from Su to Sv is made as soon as we find the movement is appropriate. According to [16], it is able to converge to a much better local optima in comparison to k -means and its variants. The cost of checking the best movement in boost k -means is equivalent to seeking for closest centroid in traditional k -means. As a result, boost k -means is on the same complexity level as traditional k means. Due to its superior performance, boost k -means is fully adopted in our design. Particularly, the speed-up we made in this paper is on boost k -means instead of traditional k means. ∆I(xi ) = 4 3.2 Two Means Tree Two means (2M) tree [31] is a variant of hierarchical bisecting k -means. It has been adopted in KNN graph construction for its high speed efficiency [31]. Alg. 1 shows the general procedure of two means tree. Similar as bisecting k -means, the samples are partitioned recursively into two clusters each time until k clusters are produced. Different from bisecting k -means, one more step is taken in the end of each bisecting. The resulting two clusters are adjusted to equal size. Its complexity is the same as bisecting k means, namely O(d·n·log(n)), which is even faster than one round k -means iteration. In this paper, two means tree is adopted only to generate initial k -means partition. In order to enhance its performance, the aforementioned boost k means is integrated in the bisecting operation (Step 8 in Alg. 1). Algorithm 1. TwoMeans(Xn×d , k ) 1: Input: matrix Xn×d 2: Output: matrix cLabeln×1 3: t = 1. 4: cLabel[1· · ·n] ← 1; 5: Map cLabel[1· · ·n] to partition S ; 6: while t < k do 7: Pop Si with largest size out of S 8: Bisect Si into Su and Sv 9: Adjust Su and Sv to equal size 10: S ← S ∪ Su ∪ Sv 11: t = t + 1; 12: end while 13: Map S to cLabel[1· · ·n]; end In order to facilitate the operations in later steps, the mapping at Line 5 converts cluster labels of samples into cluster set S . At the end of two means tree clustering, cluster set S is mapped back as cluster label representation at Line 13. 4 KNN G RAPH BASED k - MEANS In this section, our solution to the scalability issue of k means is presented. Firstly, a general procedure that how boost k -means is undertaken with the support of KNN graph is given. To support fast clustering, the process of KNN graph construction should be sufficiently fast otherwise it becomes another processing bottleneck. To overcome this problem, a novel light-weight KNN graph construction procedure is also introduced. 4.1 Motivation As illustrated in Fig. 2, there is a strong correlation between the closeness of data samples and their membership living in one cluster. This correlation could be interpreted from either the side of k -means clustering or the side of KNN graph construction. • From the clustering side, if the KNN list of each sample is known, clustering is a process of arranging close neighbors into one cluster. As a result, given one sample, the clustering only needs to check with the clusters its κ-nearest neighbors live in. Such • that it seeks the approriate cluster to move to. It is therefore no need to check with all k − 1 clusters. As a consequence, the processing bottleneck is overcomed. From the KNN graph construction side, if the data samples are already partitioned into small clusters, KNN graph construction is undertaken within each cluster by an exhaustive pair-wise comparison. As a consequence, the KNN graph construction is pulled out in a very efficient manner. Based on the first piece of interpretation, we work out the fast k -means algorithm. Similarly, based on the second piece of interpretation, KNN graph construction algorithm is conceived. 4.2 Fast k -means Driven by KNN Graph Given a KNN graph is ready, boost k -means procedure presented in [16] is revised as Alg. 2. At the beginning of the clustering, 2M tree (Alg. 1) is called to produce k clusters. The initial clusters will be incrementally optimized in the later steps. In each step of the optimization iteration, one sample is randomly selected. Thereafter, all the clusters in which its κ neighbors reside are collected. The selected sample is therefore checked with these clusters to seek for the best move. The iteration terminates until convergence condition is reached. Algorithm 2. GK-means(Xn×d , k, Gn×κ ) 1: Input: matrix Xn×d , k, KNN graph Gn×κ 2: Output: S1 , · · ·, Sr , · · ·Sk 3: cLabel = TwoMeans(Xn×d , k); 4: Q←∅; 5: while not convergence do 6: for each xi ∈ X do 7: for j = 1; j ≤ κ; do 8: b = G[i][j]; 9: Q ← Q ∪ cLabel[b]; 10: j = j + 1; 11: end for 12: Seek v in Q that maximizes ∆I(xi ); 13: if ∆I(xi ) > 0 then 14: Move xi from current cluster to Sv ; 15: end if 16: Q←∅; 17: end for 18: end while end Comparing with the procedure presented in boost k means [16], there are basically two major modifications. Firstly, the initial clusters are initialized by two means tree, whose complexity is only O(n·log(k)·d) [16]. It is considerably faster than traditional k -means initialization. Secondly, as shown from Line 6-12, only clusters that keep the first κ neighbors of xi are visited, the number of which is much smaller than k. Furthermore, it is possible that several neighbors of xi may live in the same cluster. As a consequence, the number of clusters that one sample visits is even smaller than κ. Alg. 2 is built upon boost k -means. Alternatively, similar speed-up is also feasible for traditional k -means. To achieve 5 1.2 Recall Distortion 0.8 54000 0.6 0.4 4.3 52000 KNN Graph Construction with Fast k -means Average Distortion 56000 1 Recall that, Line 12-15 in Alg. 2 is modified to seeking for the closest centroid from the collected clusters. In Section 5, the performance of this alternative configuration will be presented. As will be revealed, similar speed-up is achieved whereas it shows inferior clustering quality in comparison to the one built upon boost k -means. 0.2 As discussed in Section 1, samples live in the same cluster are likely to be neighbors. In the KNN graph construction, this clue could be fully exploited. Namely, the search for κ nearest neighbors for one sample is undertaken within the cluster it resides. Based on this principle, the fast KNN graph construction is conceived. Firstly, fast k -means clustering (Line 6, Alg. 2) is called to produce fixed number of clusters. Thereafter, exhaustive comparisons are conducted within each cluster. The new closer point pairs are used to update the KNN graph (Line 7-13, Alg. 3). In order to control the complexity of KNN graph construction on a low level, the cluster size is fixed to a small constant ξ , i.e. 50. Given the cluster size is fixed to a constant, it is easy to see the cluster number is k0 = b nξ c. According to Alg. 2, a KNN graph is required as an input parameter. In our design, a random KNN graph is supplied at the beginning. Since the KNN graph is randomly initialized, one would not expect good cluster partitions returned by Alg. 2 at the beginning. However, as the iteration continues, the quality of KNN graph Gt is enhanced incrementally. Accordingly, the structure of cluster partitions returned by Alg. 2 becomes better. As a result, the structures of KNN graph and the cluster structures evolve alternatively. Fig. 3 illustrates this intertwined evolving process. The iteration parameter τ controls the final quality of KNN graph. Larger τ leads to preciser KNN graph while taking higher time cost. Algorithm 3. KNN Graph Construction 1: Input: Xn×d : reference set, κ: scale of k-NN Graph 2: Output: KNN Graph Gn×κ 3: t ← 0; 4: Initialize Gtn×κ with random lists; 5: k0 = b n ξ c; 6: for t < τ do 7: S = GK-means(Xn×d , k0 , Gt ) 8: for each Sm ∈ S do 9: for each < i, j >(i<j) ∈ Sm ×Sm do 10: if < i, j > is NOT visited then 11: Update Gt [i] and Gt [j] with d(xi , xj ); 12: end if 13: end for 14: end for 15: t←t+1 16: end for 17: G ← Gt ; end Fig. 2 shows the curves of average recall (top-1) of KNN graph and clustering distortion as the functions of τ . As shown in the figure, at the beginning of this procedure, both the quality of clustering and the quality of KNN graph are very poor. The clustering results are nearly random. 0 50000 0 5 10 15 τ 20 25 30 Fig. 2. The correlation between the KNN graph recall and clustering distortion shown as the function of τ . The experiment is conducted on SIFT100K [30]. Gt update KNN Graph GK-means S t +1 G End Fig. 3. The illustration of the intertwined evolving process in the KNN graph construction. Correspondingly, the average recall of KNN graph is close to 0. However, after only 5 iterations, the clustering distortion drops considerably. In the meantime, the average recall increases to above 0.6. In Alg. 2, there is no specification that which KNN graph construction algorithm should be adopted. As a result, KNN graph supplied by any construction algorithms will achieve similar speed-up. However, as revealed later, the KNN graph algorithm presented in Alg. 3 produces the best clustering quality. Moreover, comparing with other KNN graph construction algorithms [32], [34], [33], Alg. 3 takes much less memory. The extra memory it takes is to keep the KNN graph. Furthermore, it is at least two times faster than NN Descent [32] and small world graph construction [34]. Due to its low computational cost, Alg. 3 can be also adopted to construct KNN graph for approximate nearest neighbor search. According to our observation, although the quality of KNN graph (measured by recall) is usually lower than that of NN Descent [32], it is able to achieve similar or even better performance than the methods presented in [34], [44]. For instance, it takes less than 3ms to fulfill a query on 100 million SIFTs [30] with its recall above 0.9. The full discussion about ANNS with our KNN graph is beyond the focus of this paper. As a summary, the proposed fast k -means consists of two major steps. In the first step, the fast k -means is called to build an approximate KNN graph for itself. In the second step, the fast k -means is performed again to produce k clusters with the support of the approximate KNN graph. Since the KNN graph is built based on the intermediate 6 clustering results in the first step, the information that how the samples are organized as clusters is kept with the KNN graph. The clustering in the second step is therefore guided by such kind of “prior knowledge”. Since this algorithm is based on KNN graph, it is called as graph based k -means (GK-means) from now on. 4.4 Discussion on Parameters In Alg. 2 and Alg. 3, besides the cluster number k, there are additionally three parameters are involved. Parameter τ in Alg. 2 controls the quality of KNN graph. According to our observation, it is sufficient to set τ = 10 for clustering task. While if Alg. 3 is called to produce KNN graph for ANNS task, τ = 10 could be set up-to, i.e. 32. Parameter ξ controls the size of cluster that is used for KNN graph construction. Larger ξ leads to better KNN graph quality whereas it also induces more number of pair-wise comparisons. For this reason, a trade-off has to be made. According to our observation, the recommended range of ξ is [40, 100]. Parameter κ controls the number of neighbors that one sample should consider during the fast k -means clustering. This in turn determines the number of clusters that one sample visits. If only few neighbors are considered, the chance that we miss the true cluster will be high. On the other hand, if too many neighbors are considered during the comparison, a lot of comparisons are required. The speedup over traditional k -means becomes less significant. Again a trade-off has to be made. According to our empirical study, the clustering quality becomes very stable as κ is larger than 40. In our implementation, τ , ξ and κ are fixed to 10, 50 and 50 respectively. 4.5 Complexity Analysis In this section, the complexity of Alg. 2 and Alg. 3 is analyzed. As shown above, GK-means (Alg. 2) is comprised by two major parts, namely two means initialization and fast k -means clustering. For the first part, the complexity of 2M tree initialization is O(d·n·log(k)) [16]. For the second part, since one sample only visits at most κ clusters in the iteration, the cost of clustering is only d·n·κ in each iteration. As a result, the overall complexity is O(d·n·log(k)+t·d·n·κ), where t is the number of iterations. From above analysis, it is clear to see that the cluster number k has very minor impact on the clustering complexity. The KNN graph construcion (Alg. 3) consists of two major steps, namely fast k -means clustering and KNN graph refinement. In the clustering step, according to above analysis, its complexity is O(d·n·log( nξ ) + d·n·κ). Noticed that, t is fixed to 1 in the KNN graph construction. In KNN graph refinement step, one sample is compared to around ξ samples. Therefore, its complexity is O(d·n·ξ). As a result, the complexity of KNN graph construction is O(d·n·log( nξ )+·d·n·κ+d·n·ξ), where both ξ and κ are small constants. Overall, the complexity of the whole procedure is on O(d·n·log(n)) level. 5 E XPERIMENTS ON C LUSTERING TASK In this section, the performance of GK-means is studied in comparison to k -means and its representative variants TABLE 1 Overview of Datasets Datasets SIFT1M [30] VLAD10M [16] Glove1M [48] GIST1M [30] Scale Size Dim. 1M 128 10M 512 1M 100 1M 960 Data Type SIFT [46] VLAD [2] from YFCC [47] Vectorized text word [48] GIST [49] such as boost k -means (BKM) [16], closure k -means [27] and Mini-Batch [20]. AKM [22] and HKM [45] are not considered as inferior performance to closure k -means is reported in [27] . Before the comparisons with other k -means variants, the performance of GK-means is studied under different configurations. Namely, we try to see how well GK-means is performed when it is built upon traditional k means instead of boost k -means. Additionally, GK-means is also tested when the approximate KNN graph is supplied by NN Descent [32]. To do that, we want to search for the best configuration that we can currently set for GK-means. We mainly study the clustering quality and scalability on four large-scale datasets, which are summarized in Tab. 1. The type of data covers from image local features, image global features to vectorized text word features. The dimension of data varies from 100 to 960 dimensions. The scale of all the datasets are above 1 million level. All the methods considered in the paper are implemented in C++ and compiled with GCC 5.4. The simulations are conducted by single thread on a PC with 2.4GHz Xeon CPU and 32G memory setup. 5.1 Evaluation Protocol Similar as [16], [26], the average distortion (or mean squared error [30]) is adopted to evaluate the clustering quality. Basically, it is the average distance between samples and their cluster centroid, which is given in Eqn. 4. As seen from the equation, it is nothing more than taking the average over k -means objective function Eqn. 1. The lower the distortion value, the better quality of the clustering result. This measure is the same as within-cluster sum of squared distortions (WCSSD) in [27]. P 2 q(xi )=r k Cr − xi k E= . (4) n In order to study the relation between the quality of KNN graph and the quality of clustering result, the average recall of KNN graph is also considered. In our evaluation, only the recall of top-1 nearest neighbor is measured. For SIFT1M dataset, the ground-truth of KNN graph is produced by brute-force search, which takes more than 20 hours. While for VLAD10M dataset, it is too costly to produce the ground-truth for the whole set, the recall is therefore estimated by only considering nearest neighbors of 100 randomly selected samples. 5.2 Configuration Test In this section, different configurations on Alg. 2 are tested. As we discussed in Section 4, Alg. 2 could be supported by other KNN graph construction algorithm. In addition, we also pointed out that similar speed-up scheme in Alg. 2 is feasible for traditional k -means. In this section, three 7 42000 40400 41500 Average Distortion 44000 40600 closure k-means KGraph+GK-means GK-means Mini-Batch closure k-means k-means BKM KGraph+GK-means GK-means 45000 43000 42000 41000 40500 41000 40000 40000 40200 20 40 0 60 80 100 120 140 160 Iteration (a) distortion vs. iteration 40000 0.8 Recall 0.9 1 24 Mini-Batch closure k-means k-means BKM KGraph+GK-means GK-means Clustering Quality In this section, the clustering quality of GK-means is studied in comparison to k -means, boost k -means (BKM), closure k means and Mini-Batch. The quality of fast k -means clustering is measured by studying the trend of clustering distortion against the number of iterations. Experiments are conducted on datasets SIFT1M, Glove1M and GIST1M. The cluster number is fixed to 10,000 in all the experiments. Fig. 5(a), (c) and (e) show the trend of clustering distortion as the function of iteration for datasets SIFT1M, Glove and GIST1M respectively. While Fig. 5(b), (d) and (f) show the trend of clustering distortion as the function of clustering time for the algorithms that make a relatively good trade-off between efficiency and quality. The performance of k-means, boost k-means and Mini-Batch are not presented due to their Average Distortion 23 closure k-means KGraph+GK-means GK-means 23.5 23 22.5 22 21.5 22.5 22 21.5 21 21 20.5 20.5 20 20 0 20 40 60 Iteration 0 80 (c) distortion vs. iteration 500 1000 1500 2000 2500 3000 3500 4000 time (s) (d) distortion vs. time GIST1M GIST1M 1.1 1.2 closure k-means k-means BKM KGraph+GK-means GK-means 1.15 Average Distortion different configurations are tested. In the first run, Alg. 2 is supplied with KNN graph from NN Descent [32], which is denoted as “KGraph+GK-means” run. In the second run, Alg. 2 is modified to being built upon traditional k -means, which is denoted as “GK-means− ” run. In the standard setup run “GK-means”, the clustering is built upon boost k means. For both “GK-means− ” and “GK-means”, the KNN graph is supplied by Alg. 3. The experments are conducted on SIFT1M dataset. For all the runs, the cluster number is fixed to 10,000. Fig. 4 shows the distortion trend of these three configurations when KNN graphs of different qualities (reflected by their recall) are supplied. Basically, for all the configurations, higher KNN graph quality leads to steadily lower clustering distortion. When the KNN graphs are on the same recall level, GK-means built upon boost k -means shows much lower clustering distortion. Furthermore, GK-means converges to slightly lower distortion when KNN graph is supplied by Alg. 3. Comparing with KNN graph supplied by NN Descent, KNN graph from Alg. 3 carries the information that how samples should be roughly organized as clusters since KNN list is built in Alg. 3 based on clustering results. In the following, due to its superior performance, the run “GK-means” is selected as the standard configuration of Alg. 2 for further comparison. Glove1M Glove1M 24 23.5 Fig. 4. Configuration test on Alg. 2. Alg. 2 is tested with the support of KGraph [32]. In addition, Alg. 2 is modified to doing clustering with traditional k-means. 500 1000 1500 2000 2500 3000 3500 4000 time (s) (b) distortion vs. time Average Distortion 0.7 closure k-means KGraph+GK-means GK-means 1.08 Average Distortion 0.6 5.3 SIFT1M SIFT1M KGraph+GK-means GK-means 40800 GK-meansAverage Distortion Average Distortion 41000 1.1 1.05 1.06 1.04 1.02 1 0.98 1 0.96 0.95 0 20 40 Iteration 60 (e) distortion vs. iteration 80 0 2000 4000 6000 8000 10000 Time (s) (f) distortion vs. time Fig. 5. Average distortion as a function of iteration times (shown in (a), (c) and (e)) and as a function of running time (shown in (b), (d) and (f)). efficiency or distortion (notably Mini-Batch) are not on the same level as GK-means and closure k -means. As shown from Fig. 5(a), (c) and (e), for all the methods except Mini-Batch, the clustering distortion changes very little after 30 iterations. Boost k -means always demonstrates the best performance in terms of clustering quality. In most of the cases, GK-means shows only slightly lower clustering quality than boost k -means. On SIFT1M and GIST1M, it even outperforms traditional k -means. KGraph+GK-means achieves similar performance as GKmeans across all datasets. However, it is around 2 times slower since it is more costly to construct KNN graph by NN Descent. GK-means shows highest efficiency under all tests. Overall, GK-means offers a much better trade-off between efficiency and clustering quality among all the existing k means variants. 8 Mini-Batch closure k-means k-means BKM GK-means 10 TABLE 2 Performance of GK-means and closuer k-means when partitioning VLAD10M into 1M clusters. The time costs in clustering initialization and k-means iterations are shown Mini-Batch closure k-means k-means BKM GK-means 1000 100 Time cost (min) Time cost (min) 1000 Method KGraph+GK-means GK-means Closure k-means 100 1 0.1 104 105 106 10 1024 107 2048 n 4096 8192 k (a) time vs. size (b) time vs. cluster num Fig. 6. Scalability test on Flickr10M by varying the scale of input data: (a) and by varying the number of clusters: (b). 0.88 0.86 0.86 Mini-Batch closure k-means k-means BKM GK-means 0.84 BKM GK-means 0.82 0.82 Average distortion Average distortion 0.84 Mini-Batch closure k-means k-means 0.8 0.78 0.76 0.8 0.78 0.76 0.74 0.74 0.72 0.72 0.7 104 105 106 107 0.7 1024 2048 n (a) k=1024, varying n 4096 8192 n (b) n=106 , varying k Fig. 7. Average distortion from all 5 methods under two different scalability testings on Flickr10M (best viewed in color). 5.4 Scalability Test on Image Clustering In this section, the scalability of GK-means is tested on VLAD10M. In the test, the number of iterations for all k means variants is fixed to 30. In the first experiment, clustering methods are tested in the way that the scale of input images varies from 10K to 10M. For data in different scales, they are clustered into fixed number of clusters, i.e., 1,024. The time costs for all the methods are presented in Fig. 6(a). Accordingly, the average distortion of all the methods are presented in Fig. 7(a). As shown from Fig. 6(a), GK-means is constantly faster than closure k -means and at least 10 times faster than k means and boost k -means. In the mean time, as shown in Fig. 7, clustering quality of GK-means is close to boost k means across different scales of input data. In contrast, although Mini-Batch demonstrates fastest speed in this test, its clustering quality turns out to be very poor under different settings as is shown in Fig. 7(a). In addition, the scalability of clustering methods is tested in the way that the number of clusters varies from 1,024 to 8,192, while the scale of input data is fixed to 1 million. Fig. 6(b) shows the time cost of all 5 methods. Accordingly, the average distortion from these methods are given in Fig. 7(b). As shown in the figure, for k -means, boost k -means and Mini-Batch clustering methods, the time cost increases linearly as the number of clusters increases. Mini-Batch is no longer efficient as k increases. In contrast, the time cost of closure k -means and GK-means remains nearly constant across different cluster numbers. In terms of clustering Time cost (h) Init. Iter. Total 27.3 3.2 30.5 2.7 2.5 5.2 0.9 9.6 10.5 E Recall 0.649 0.619 0.700 0.40 0.08 N.A. quality, as seen from Fig. 7(b), GK-means demonstrates similar quality as boost k -means and it is considerably better than closure k -means, Mini-Batch and k -means. A clear trend is observed from Fig. 7(b), methods based on boost k -means shows increasingly higher performance than the rest as k grows. Overall, clustering driven by the proposed optimization process shows higher speed and better quality. The highest speed is achieved by GK-means, for which only 18 minutes are required to cluster 1 million 512-dimensional data into 8,192 clusters. Another more challenging scalability test is also conducted, in which VLAD10M is partitioned into 1 million clusters. Two workable algorithms in such case, namely closure k -means and GK-means are tested. For GK-means, besides the standard configuration, GK-means that KNN graph is supplied by NN Descent is also tested, which is denoted as “KGraph+GK-means”. Their performance is shown in Tab. 2. For GK-means and KGraph+GK-means, the recall level of the approximate KNN graph is also reported. As shown in the table, compared to closure k means, the runs from GK-means show significantly lower clustering distortion. In particular, GK-means with standard configuration shows the lowest clustering distortion. Similar as the experiments in Section 5.2, GK-means shows better performance when the KNN graph is supplied by Alg. 3. KNN graph provided by Alg. 3 keeps the information of intermediate clustering structures. Such kind of information will be transferred to the clustering process. It is therefore able to produce better quality even though the recall of its KNN graph is lower than that of NN Descent. GKmeans also achieves the highest speed efficiency in such a challenging test. According to our estimation, it would take more than 3 years to fulfill the same task for traditional k means. 6 C ONCLUSION In this paper, we have presented our solution to the scalability issue of k -means. We show that fast k -means clustering is achievable with the support of an approximate KNN graph. Specifically, in the k -means iteration, one sample only needs to compare with clusters that its nearest neighbors live in. The clustering complexity is therefore irrelevant to clustering number. As shown in the paper, hundreds to thousands times speed-up is achieved in particular in the case that both n and k are very large. In addition, since the fast k -means is built upon boost k -means, it also shows very high clustering quality. Overall, the proposed GKmeans shows considerably better trade-off between clustering quality and efficiency over existing solutions. Moreover, the beauty of this algorithm also lies in the design of fast KNN graph construction process. The KNN graph is built 9 by calling GK-means itself in an intertwined evolving process. In the process, the KNN graph and k -means clustering are incrementally optimized. This intertwined self-evolving process could be generalized as an unsupervised learning framework, which will be our future research work. ACKNOWLEDGEMENT This work is supported by National Natural Science Foundation of China under grants 61572408. R EFERENCES [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] Y. Zhao and G. Karypis, “Empirical and theoretical comparisons of selected criterion functions for document clustering,” Machine Learning, vol. 55, pp. 311–331, Jun. 2004. H. Jégou, F. Perronnin, M. Douze, J. Sánchez, P. Pérez, and C. Schmid, “Aggregating local descriptors into compact codes,” Trans. PAMI, vol. 34, pp. 1704–1716, Sep. 2012. Y. Gong, M. Pawlowski, F. Yang, L. Brandy, L. Bourdev, and R. Fergus, “Web scale photo hash clustering on a single machine,” in CVPR, pp. 19–27, 2015. J. Sivic and A. Zisserman, “Video google: A text retrieval approach to object matching in videos,” in ICCV, Oct. 2003. S. P. Lloyd, “Least squares quantization in PCM,” IEEE Trans. Information Theory, vol. 28, pp. 129–137, Mar. 1982. MacQueen, James, et al., “Some methods for classification and analysis of multivariate observations,” in Proceedings of the fifth Berkeley symposium on mathematical statistics and probability, vol. 1, pp. 281–297, 1967. Y. Cheng, “Mean shift, mode seeking, and clustering,” Trans. PAMI, vol. 17, pp. 790–799, Aug. 1995. M. Ester, H. peter Kriegel, J. Sander, and X. Xu, “A density-based algorithm for discovering clusters in large spatial databases with noise,” in IEEE Transactions on Knowledge and Data Engineering, pp. 226–231, 1996. U. von Luxburg, “A tutorial on spectral clustering,” Statistics and Computin, vol. 17, pp. 395–416, Aug. 2007. C. Otto, D. Wang, and A. Jain, “Clustering millions of faces by identity,” Trans. PAMI, pp. 1–14, Mar. 2017. T. Zhang, R. Ramakrishnan, and M. Livny, “Birch: an efficient data clustering method for very large databases,” in Proceedings of the 1996 ACM SIGMOD International Conference on Management of Data, vol. 25, pp. 103–114, Jun. 1996. A. Rodriguez and A. Laio, “Clustering by fast search and find of density peaks,” Science, vol. 344, no. 6191, pp. 1492–1496, 2014. X. Wu, V. Kumar, J. R. Quinlan, J. Ghosh, Q. Yang, H. Motoda, G. J. McLachlan, A. Ng, B. Liu, P. S. Yu, Z.-H. Zhou, M. Steinbach, D. J. Hand, and D. Steinberg, “Top 10 algorithms in data mining,” Knowledge and Information System, vol. 14, pp. 1–37, Dec. 2007. D. Arthur and S. Vassilvitskii, “K-means++: The advantages of careful seeding,” in Proceedings of the Eighteenth Annual ACMSIAM Symposium on Discrete Algorithms, pp. 1027–1035, 2007. M. Steinbach, G. Karypis, and V. Kumar, “A comparison of document clustering techniques,” in KDD Workshop on Text Mining, 2000. W.-L. Zhao, C.-H. Deng, and C.-W. Ngo, “Boost k-means,” arXiv preprint arXiv:1610.02483, 2016. N. Ailon, R. Jaiswal, and C. Monteleoni, “Streaming k-means approximation,” in NIPS, pp. 10–18, Dec. 2009. A. Vattani, “k-means requires exponentially many iterations even in the plane,” Discrete and Computational Geometry, vol. 45, pp. 596– 616, Mar. 2011. T. Kanungo, D. M. Mount, N. S. Netanyahu, C. D. Piatko, R. Silverman, and A. Y. Wu, “An efficient k-means clustering algorithm: Analysis and implementation,” Trans. PAMI, vol. 24, no. 7, pp. 881– 892, 2002. D. Sculley, “Web-scale k-means clustering,” in Proceedings of the 19th international conference on World wide web, pp. 1177–1178, 2010. B. Bahmani, B. Moseley, A. Vattani, R. Kumar, and S. Vassilvitskii, “Scalable k-means++,” In Proceedings of the VLDB Endowment, vol. 5, no. 7, pp. 622–633, 2012. J. Philbin, O. Chum, M. Isard, J. Sivic, and A. Zisserman, “Object retrieval with large vocabularies and fast spatial matching,” in CVPR, pp. 1–8, Jun. 2007. [23] A. Broder, L. Garcia-Pueyo, V. Josifovski, S. Vassilvitskii, and S. Venkatesan, “Scalable k-means by ranked retrieval,” in Proceedings of the 7th ACM international conference on Web search and data mining, pp. 233–242, 2014. [24] Y. Avrithis, “Quantize and conquer: A dimensionality-recursive solution to clustering, vector quantization, and image retrieval,” in Proceedings of the IEEE International Conference on Computer Vision, pp. 3024–3031, Dec. 2013. [25] Y. Avrithis and Y. Kalantidis, “Approximate gaussian mixtures for large scale vocabularies,” in ECCV, pp. 15–28, 2012. [26] Y. Avrithis, Y. Kalantidis, E. Anagnostopoulos, and I. Z. Emiris, “Web-scale image clustering revisited,” in ICCV, pp. 1502–1510, Dec. 2015. [27] J. Wang, J. Wang, Q. Ke, G. Zeng, and S. Li, “Fast approximate k-means via cluster closures,” in CVPR, pp. 3037–3044, Jun. 2012. [28] A. Meyerson and A. Wong, “Fast and accurate k-means for large datasets,” in NIPS, 2011. [29] C. Elkan, “Using the triangle inequality to accelerate,” in ICML, 2003. [30] H. Jégou, M. Douze, and C. Schmid, “Product quantization for nearest neighbor search,” Trans. PAMI, vol. 33, pp. 117–128, Jan. 2011. [31] N. Verma, S. Kpotufe, and S. Dasgupta, “Which spatial partition trees are adaptive to intrinsic dimension?,” in Proceedings of the Twenty-Fifth Conference on Uncertainty in Artificial Intelligence, pp. 565–574, Jun. 2009. [32] W. Dong, C. Moses, and K. Li, “Efficient k-nearest neighbor graph construction for generic similarity measures,” in WWW, pp. 577– 586, Mar. 2011. [33] C. Fu and D. Cai, “EFANNA: An extremely fast approximate nearest neighbor search algorithm based on knn graph,” arXiv preprint arXiv:1609.07228, 2016. [34] Y. A. Malkov and D. Yashunin, “Efficient and robust approximate nearest neighbor search using hierarchical navigable small world graphs,” arXiv preprint arXiv:1603.09320, 2016. [35] T. Kanungo, D. M. Mount, N. S. Netanyahu, C. D. Piatko, R. Silverman, and A. Y. Wu, “An efficient k-means clustering algorithm: analysis and implementation,” Trans. PAMI, vol. 24, pp. 881–892, Jun. 2002. [36] J. L. Bentley, “Multidimensional binary search trees used for associative searching,” Commun. ACM, vol. 18, pp. 509–517, Sep. 1975. [37] D. Pelleg and A. Moore, “Accelerating exact k-means algorithms with geometric reasoning,” in Proceedings of the Fifth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 277–281, Aug. 1999. [38] A. Broder, L. Garcia-Pueyo, V. Josifovski, S. Vassilvitskii, and S. Venkatesan, “Scalable k-means by ranked retrieval,” in Proceedings of the 7th ACM international conference on Web search and data mining, pp. 233–242, Feb. 2014. [39] A. Goswami, R. Jin, and G. Agrawal, “Fast and exact out-of-core kmeans clustering,” in Fourth IEEE International Conference on Data Mining, pp. 83–90, Nov. 2004. [40] A. K. Jain and R. C. Dubes, Algorithms for Clustering Data. 1988. [41] Y. Zhao and G. Karypis, “Hierarchical clustering algorithms for document datasets,” Data Mining and Knowledge Discovery, vol. 10, pp. 141–168, Mar. 2005. [42] J. Chen, H. ren Fang, and Yousef, “Fast approximate knn graph construction for high dimensional data via recursive lanczos bisection,” Journal of Machine Learning Research, vol. 10, pp. 1989–2012, Dec. 2009. [43] J. Wang, J. Wang, G. Zeng, Z. Tu, R. Gan, and S. Li, “Scalable k-nn graph construction for visual descriptors,” in CVPR, pp. 1106– 1113, Jun. 2012. [44] W. Li, Y. Zhang, Y. Sun, W. Wang, W. Zhang, and X. Lin, “Approximate nearest neighbor search on high dimensional data—experiments, analyses, and improvement,” arXiv preprint arXiv:1610.02455, 2016. [45] M. Muja and D. G. Lowe, “Scalable nearest neighbor algorithms for high dimensional data,” Trans. PAMI, vol. 36, pp. 2227–2240, Nov. 2014. [46] D. Lowe, “Distinctive image features from scale-invariant keypoints,” IJCV, vol. 60, pp. 91–110, Nov. 2004. [47] B. Thomee, D. A. Shamma, G. Friedland, B. Elizalde, K. Ni, D. Poland, D. Borth, and L.-J. Li, “YFCC100M: The new data in multimedia research,” Communications of the ACM, vol. 59, pp. 64– 73, Feb. 2016. 10 [48] J. Pennington, R. Socher, and C. D. Manning, “Glove: Global vectors for word representation,” in Empirical Methods in Natural Language Processing (EMNLP), pp. 1532–1543, 2014. [49] C. Siagian and L. Itti, “Rapid biologically-inspired scene classification using features shared with visual attention,” Trans. PAMI, vol. 29, pp. 300–312, Feb 2007.
2cs.AI
A Direct Coupling Coherent Quantum Observer for a Qubit, including Observer Measurements arXiv:1703.09887v1 [quant-ph] 29 Mar 2017 Ian R. Petersen and Elanor H. Huntington Abstract— This paper proposes a direct coupling coherent quantum observer for a quantum plant which consists of a two level quantum system. The quantum observer, which is a quantum harmonic oscillator, includes homodyne detection measurements. It is shown that the observer can be designed so that it does not affect the quantum variable of interest in the quantum plant and that measured output converges in a given sense to the plant variable of interest. Also, the plant variable of interest-observer system can be described by a set of linear quantum stochastic differential equations. A minimum variance unbiased estimator form of the Kalman filter is derived for linear quantum systems and applied to the direct coupled coherent quantum observer. I. I NTRODUCTION A number of papers have recently considered the problem of constructing a coherent quantum observer for a quantum system; e.g., see [1]–[3]. In the coherent quantum observer problem, a quantum plant is coupled to a quantum observer which is also a quantum system. The quantum observer is constructed to be a physically realizable quantum system so that the system variables of the quantum observer converge in some suitable sense to the variables of interest for the quantum plant. The papers [4]–[7] considered the problem of constructing a direct coupling quantum observer for a given quantum system. In particular, the paper [5] considered the case in which the quantum plant was a two level system and the quantum observer was a linear quantum harmonic oscillator. Also, the papers [8], [9] considered the problem of whether such direct coupling coherent observers could be experimentally implemented. In addition, the paper [10] considered with the direct coupling coherent observer of [4] could be experimentally implemented in an experiment which included homodyne detection measurements of the observer. In this paper, we build on the results of [5] and [10] to consider the case in which the quantum plant is a two level system and the quantum observer is a linear quantum harmonic oscillator subject to measurements using homodyne detection. Similar convergence results for the quantum This work was supported by the Australian Research Council (ARC) under grant FL110100020 and the Air Force Office of Scientific Research (AFOSR), under agreement number FA2386-16-1-4065. Ian R. Petersen is with the Research School of Engineering, The Australian National University, Canberra, ACT 2601, Australia. [email protected] Elanor H. Huntington is with the Research School of Engineering, The Australian National University, Canberra, ACT 0200, Australia. Email: [email protected]. observer as obtained in [10] are obtained in this case. Also, as in [5], the plant observer system considering only the plant variable of interest is described by a set of linear quantum stochastic differential equations (QSDEs) in spite of the fact that finite level systems are normally described in terms of bilinear QSDEs; e.g., see [11]. However, in this case, measurements are available from the quantum observer. This means that we can apply a version of the Kalman filter to the linear plant observer QSDEs. The paper develops a notion of a minimum variance unbiased estimator for a general set of linear QSDEs, building on the fact that the classical Kalman Filter can be regarded as the minimum variance unbiased estimator even in the case of non-Gaussian noises and initial conditions; e.g., see [12], [13]. The equations for this estimator are developed for the general case and then applied to the particular case of the plant observer system. This provides a numerically straightforward way of estimating the variable of interest for the qubit system when using homodyne detection measurements. II. D IRECT C OUPLING C OHERENT Q UANTUM O BSERVER WITH O BSERVER M EASUREMENT We first consider the dynamics of a single qubit spin system, which will correspond to the quantum plant; see also [11]. The quantum mechanical behavior of the system is described in terms of the system observables which are selfadjoint operators on the complex Hilbert space Hp = C2 . The commutator of two scalar operators x and y in Hp is defined as [x, y] = xy − yx. Also, for a vector of operators x in Hp , the commutator of x and a scalar operator y in Hp is the vector of operators [x, y] = xy − yx, and the commutator of x and its adjoint x† is the matrix of operators [x, x† ] , xx† − (x# xT )T , where x# , (x∗1 x∗2 · · · x∗n )T and ∗ denotes the operator adjoint. In the case of complex vectors (matrices) ∗ denotes the complex conjugate while † denotes the conjugate transpose. The vector of system variables for the single qubit spin system under consideration is xp = (x1 , x2 , x3 )T , (σ1 , σ2 , σ3 ), where σ1 , σ2 and σ3 are spin operators. Here, xp is a selfadjoint vector of operators; i.e., xp = x# p . In particular xp (0) is represented by the Pauli matrices; i.e.,     0 1 0 −ii σ1 (0) = , σ2 (0) = , i 0 1 0   1 0 σ3 (0) = . 0 −1 Products of the spin operators satisfy X σi σj = δij + i ǫijk σk . (1) k It then follows that the commutation relations for the spin operators are X [σi , σj ] = 2ii ǫijk σk , (2) k where δij is the Kronecker delta and ǫijk denotes the LeviCivita tensor. The dynamics of the system variables x are determined by the system Hamiltonian which is a self-adjoint operator on Hp . The Hamiltonian is chosen to be linear in xp ; i.e., Hp = rpT xp (0) where rp ∈ R3 . The plant model is then given by the differential equation ẋp (t) = = −ii[xp (t), Hp ]; Ap xp (t); xp (0) = x0p ; zp (t) = Cp xp (t) (3) where zp denotes the system variable to be estimated by the observer and Cp ∈ R1×3 ; e.g., see [11]. Also, Ap ∈ R3×3 . In order to obtain an expression for the matrix Ap in terms of rp , we define the linear mapping Θ : C3 → C3×3 as   0 β3 −β2 0 β1  . Θ(β) =  −β3 (4) β2 −β1 0   dQ is a 2 × 1 vector of quantum noises dP expressed in quadrature form corresponding to the input field for the observer and dyo is the corresponding output field; e.g., see [14], [16]. The observer output zo will be a real scalar quantity obtained by applying homodyne detection 2×2 2×2 to the observer output field. A  o ∈ R , Bo ∈ R , q o Co ∈ R2×2 . Also, xo = is a vector of self-adjoint po system variables corresponding to the observer position and momentum operators; e.g., see [14]. We assume that the plant variables commute with the observer variables. The system dynamics (11) are determined by the observer system Hamiltonian and coupling operators which are operators on the underlying Hilbert space for the observer. For the quantum observer under consideration, this Hamiltonian is a self-adjoint operator given by the quadratic form: Ho = 1 T 2 xo (0) Ro xo (0), where Ro is a real symmetric matrix. Also, the coupling operator L is defined by a matrix Wo ∈ R2×2 so that   L + L∗ = Wo xo . (12) L−L∗ where dw = i Then, the corresponding matrices Ao , Bo and Co in (11) are given by 1 Ao = 2JRo + WoT JWo , Bo = JWoT J, Co = Wo (13) 2 where J= Then, it was shown in [11] that xp (t)xp (t)T = I + i Θ(xp (t)). Similarly, the commutation relations for the spin operators are written as [xp (t), xp (t)T ] = 2iiΘ(xp (t)). (5)  Quantum Observer Quantum Plant = −2Θ(rp )xp (t) Homdyne Detector (8) (9) (10) Note that a quantum system of this form will be physically realizable which means that the commutation relation (5) will hold for all times t ≥ 0. We now describe the linear quantum system which will correspond to the quantum observer; see also [14]–[18]. This system is described by QSDEs of the form = Ao xo dt + Bo dw; dyo zo = = Co xo dt + dw; Kyo zp Plant Observer System. (7) = Θ(β)Θ(γ) − Θ(γ)Θ(β). dxo zo (6) Fig. 1. = −Θ(γ)β, Θ(β)β = 0, Θ(β)Θ(γ) = γβ T − β T γI, Θ (Θ(β)γ) ; yo and hence Ap = −2Θ(rp ). In addition, it is shown in [11] that the mapping Θ(·) has the following properties: Θ(β)γ  e.g., see [14], [16]. Furthermore, we will assume that the quantum observer is coupled to the quantum plant as shown in Figure 1. We define a coupling Hamiltonian which defines Also, it was shown in [11] that − i [xp (t), rpT xp (t)] 0 1 −1 0 xo (0) = x0o ; (11) the coupling between the quantum plant and the quantum observer: Hc = xp (0)T Rc xo (0). The augmented quantum system consisting of the quantum plant and the quantum observer is then a quantum system described by the total Hamiltonian Ha = Hp + Hc + Ho . (14) where the coupling operator L defined in (12). Extending the approach used in [4], [5], we assume that Hp = 0 and we can write Rc = αβ T , (15) √ Ro = ωo I, Wo = κI where α ∈ R2 , β ∈ R2 , ωo > 0 and κ > 0. In addition, we assume dyo zp (t) = −2Θ(α)xp (t)β T xo (t)dt; xp (0) = x0p ; √ κ = − xo dt + 2ωo Jxo dt + 2JβαT xp dt − κdw; 2 xo (0) = x0o ; √ = κxo dt + dw; = αT xp (t); We can now re-write the equations (20) in terms of x̃o as follows   κ √ 2ωo −2 xo dt + 2Jβzp dt − κdw dx̃o = −2ωo − κ2  κ  2ωo −2 = x̃o dt −2ωo − κ2  κ −1  κ −2 2ωo 2ωo −2 Jβzp dt −2 −2ωo − κ2 −2ωo − κ2 √ +2Jβz dt − κdw  κ p  √ −2 2ωo = x̃o dt − κdw; −2ωo − κ2  κ −1 √ √ −2 2ωo dyo = κx̃o dt − 2 κ Jβzp dt + dw −2ωo − κ2 −1  κ √ 2ωo −2 Jβzp dt + dwout (21) = −2 κ −2ωo − κ2 zo (t) = Kyo (t); where α = CpT . (16) Then, the total Hamiltonian (14) will be given by 1 Ha = αT xp (0)β T xo (0) + xo (0)T Ro xo (0) 2 since in this case the quantities αT xp (0) and β T xo (0) are commuting scalar operators. Also, it follows that the augmented quantum system is described by the equations dxp (t) dxo (t) (17) e.g., see [11], [14], [16]. It follows from (17) that the quantity zp (t) = αT xp (t) satisfies the differential equation dzp (t) = −2αT Θ(α)xp (t)β T xo (t)dt = 0. (18) using (8) and the fact that Θ(α) is skew symmetric. That is, the quantity zp (t) remains constant and is not affected by the coupling to the coherent quantum observer: dwout = which is given by G(s) = −κ Combining equations (17), (18) and (19), we obtain the following reduced dimension QSDEs describing the augmented quantum plant variable of interest and the quantum observer: dzp (t) dxo (t) dyo = 0; zp (0) = αT x0p ; √ κ = − xo dt + 2ωo Jxo dt + 2Jβzp dt − κdw; 2 xo (0) = x0o ; √ κxo dt + dw. (20) = This is a set of linear QSDEs. Hence, we can analyze this system in a similar way to [10]. To analyse the system (20), we first calculate the steady state value of the quantum expectation of the observer variables as follows:  κ −1 −2 2ωo < x̄o > = −2 Jβzp −2ωo − κ2   4 κ 4ωo = Jβzp . κ2 + 16ωo2 −4ωo κ Then, we define the quantity 4 x̃o = xo − < x̄o >= xo − 2 κ + 16ωo2  κ −4ωo 4ωo κ  κx̃o dt + dw. We now look at the transfer function of the system   κ √ −2 2ωo ˙x̃o = x̃o − κw; −2ωo − κ2 √ wout = κx̃o + w, (22) zp (t) = zp (0) ∀t ≥ 0. Now using this result in (17), it follows that √ κ dxo (t) = − xo dt + 2ωo Jxo dt + 2Jβzp dt − κdw. 2 (19) √  s + κ2 2ωo −2ωo s + κ2 −1 It is straightforward to verify that this transfer function is such that G(jω)G(jω)† = I for all ω. That is G(s) is all pass. Also, the matrix  − κ2 2ωo is Hurwitz and hence, the system (22) −2ωo − κ2 will converge to a steady state in which dwout represents a standard quantum white noise with zero mean and unit intensity. Hence, at steady state, the equation −1  κ √ 2ωo −2 Jβzp dt + dwout (23) dyo = −2 κ −2ωo − κ2 shows that the output field converges to a constant value plus zero mean white quantum noise with unit intensity. We now consider the construction of the vector K defining the observer output zo . This vector determines the quadrature of the output field which is measured by the homodyne detector. We first re-write equation (23) as dyo = ezp dt + dwout where √ e = −2 κ  − κ2 −2ωo 2ωo − κ2 −1 is a vector in R2 . Then Jβzp . . dzo = Kezp dt + Kdwout . Jβ (24) Hence, we choose K such that Ke = 1 (25) and therefore dzo = zp dt + dn where dn = Kdwout will be a white noise process at steady state with intensity kKk2 . Thus, to maximize the signal to noise ratio for our measurement, we wish to choose K to minimize kKk2 subject to the constraint (25). Note that it follows from (25) and the Cauchy-Schwartz inequality that 1 ≤ kKkkek and hence kKk ≥ However, if we choose K= 1 . kek where x is a n × 1 vector of self adjoint operators on an underlying Hilbert space, dw is a m × 1 vector of quantum noises expressed in quadrature form corresponding to the input field of the system and dy represents the corresponding output field; e.g., see [14]–[16]. Here m is assumed to be even. The measured output of the system z(t) will be a real vector quantity of dimension m 2 obtained by applying homodyne detection to yield one quadrature of each of the output fields; i.e., we write dz(t) = Ddy(t) = DC(t)x(t)dt + Ddw(t). Also, A(t) ∈ Rn×n , B(t) ∈ Rn×m , C(t) ∈ Rm×n , D ∈ m R 2 ×m . The augmented system (20) is a system of the form (27). We will consider linear filters of the following form: dx̂(t) = F (t)x̂(t)dt + G(t)dz(t); eT kek2 (26) (28) x̂(t0 ) = x̂0 ; (29) where x̂(t) ∈ Rn is a vector of estimates for x, F (t) ∈ Rn×n m and G(t) ∈ Rn× 2 . The filter (29) is said to be an unbiased estimator for the system (27) if < x(t) >= E {x̂(t)} ∀t ≥ t0 ; 1 . Hence, this value of then (25) is satisfied and kKk = kek K must be the optimal K. We now consider the special case of ωo = 0. In this case, we obtain  2  √ 4 0 e = 2 κ κ 2 Jβ = √ Jβ. 0 κ κ e.g., see [12]. Here < x(t) >= Tr(ρx(t)) denotes the quantum expectation of x(t) where ρ is the system density operator; e.g. see [14]–[16]. It is straightforward to verify that if (29) is an unbiased estimator for the system (27) then Hence, as κ → 0, kek → ∞ and therefore kKk → 0. This means that we can make the noise level on our measurement arbitrarily small by choosing κ > 0 sufficiently small. However, as κ gets smaller, the system (22) gets closer to instability and hence, takes longer to converge to steady state. and x̂0 =< x0 >; e.g., see [12]. Hence, an unbiased estimator for the system (27) will be a filter of the form Since the QSDEs (20) describing the plant observer system are linear, it should be possible to apply Kalman filtering to this system in order to estimate zp based on the available measurements. However, the QSDEs (20) are not physically realizable; e.g., see [14], [15]. Hence, the quantum Kalman filter such as discussed in [19], [20] formally does not apply; see also [21]. Although the QSDEs (20) could be made physically realizable by adding an extra fictitious quadrature variable to pair with zp , using the technique described in [22], the issue would remain that zp corresponds to a finite level quantum system and hence, its initial condition cannot be Gaussian. To overcome this issue, we will take another approach to Kalman filtering for quantum systems noting that in the classical case, the Kalman filter also has the property that it is optimal linear unbiased estimator for a linear stochastic system, even in the case of non-Gaussian noise and initial conditions; e.g., see [12], [13]. We first consider a general set of linear QSDSs: = A(t)x(t)dt + B(t)dw; = C(t)x(t)dt + dw(t) dx̂(t) = x(t0 ) = x0 ; (27) ∀t ≥ t0 (A(t) − G(t)DC(t)) x̂(t)dt + G(t)dz(t); x̂(t0 ) = III. K ALMAN F ILTER FOR THE P LANT O BSERVER S YSTEM dx(t) dy(t) F (t) = A(t) − G(t)DC(t) < x0 > . (30) Corresponding to the system (20) and the filter (30) is the estimation error e(t) = x(t) − x̂(t) which satisfies de(t) = [A(t) − G(t)DC(t)] e(t)dt+[B(t) − G(t)D] dw(t). The corresponding error variance is defined by J =< e(T )T e(T ) >= Tr[Σ(T )] where Σ(T ) = 1 < e(t)e(t)T + (e(T )e(T )T )T > 2 is the error covariance matrix. It is straightforward to verify that the matrix Σ(T ) satisfies the following matrix differential equation: Σ̇(t) = [A(t) − G(t)DC(t)]Σ(t) +Σ(t)[A(t) − G(t)DC(t)]T + [B(t) − G(t)D] [B(t) − G(t)D] T where Σ(t0 ) 1 < e(t0 )e(t0 )T + (e(t0 )e(t0 )T )T > 2 1 < (x(t0 )− < x0 >)(x(t0 )− < x0 >)T > 2 1 + < ((x(t0 )− < x0 >)(x(t0 )− < x0 >)T )T > 2 Σ0 ; = = = e.g., see [12]. The filter of the form (30) which minimizes the quantity J is the minimum variance unbiased estimator for the system (27). This filter is a version of the Kalman filter for the case of general QSDEs of the form (27). Theorem 1: The minimum variance unbiased estimator for the system (27) is a filter of the form (30) where G(t) = Σ∗ (t)C(t)T DT + B(t)DT  DDT −1 and Σ∗ (t) is defined by the matrix differential equation Σ̇∗ (t) −1 DC(t)]Σ∗ (t) −1 DC(t)]T +Σ∗ (t)[A(t) − B(t)DT DDT  −1 DC(t)Σ∗ (t) −Σ∗ (t)C(t)T DT DDT −1 DB(t)T ; +B(t)B(t)T − B(t)DT DDT = [A(t) − B(t)DT DDT Σ∗ (t0 ) Now the plant observer system (20) defines a set of QSDEs of the form (27), (28) where   0 0 ; A(t) ≡ 2Jβ − κ2 I + 2ωo J   0√ B(t) ≡ ; − κI   √ κI ; D = K; 0 C(t) ≡     σp0 0 z̄p0 . ; Σ0 = < x0 > = 0 Σo0 x̄o0 Hence, the corresponding Kalman filter for the plant observer system (20) is defined by the equations      0 0 ẑp ẑp = d dt 2Jβ − κ2 I + 2ωo J x̂o x̂o       ẑp √ κK dt ; +G(t) dzo − 0 x̂o     ẑp (0) z̄p0 ; = x̄o0 x̂o (0)   −1 0 G(t) = (Σ∗ (t) + I) √ K T KK T ; κI Σ̇∗ = + = Σ0 . Furthermore, the error covariance matrix for this estimator is given by Σ(t) ≡ Σ∗ (t). Proof: The proof of this result follows by an identical argument to the proof of the corresponding classical result; e.g., see [12], [13]. We now construct the above Kalman filter for the system (20). We assume that the density operator for the quantum plant (3) is ρp . It follows that for t0 = 0, < zp (t0 ) >= 3 X Cpi Tr(ρp σi ) = z̄p0 i=1 and write < xo (t0 ) >= x̄o0 . Also using (1), we calculate < (zp (t0 ) − z̄p0 )2 > = = = 2 < zp (t0 )2 > −z̄p0 3 X i=1 2 2 Cpi − z̄p0 σp0 and write 1 < (xo (t0 ) − x̄o0 )(xo (t0 ) − x̄o0 )T > 2 1 + < ((x(t0 ) − x̄o0 )(x(t0 ) − x̄o0 )T )T > 2 = Σo0 . − + Σ∗ (0) =  0 0  Σ∗ T T −1 κ K 2Jβ − 2 I + 2ωo J + κK KK  T 0 0 ∗  Σ −1 2Jβ − κ2 I + 2ωo J + κK T KK T K   0 0 −1 Σ∗ Σ∗ 0 κK T KK T K   0 0  ; −1 0 κI − κK T KK T K   σp0 0 . 0 Σo0  R EFERENCES [1] I. Vladimirov and I. R. Petersen, “Coherent quantum filtering for physically realizable linear quantum plants,” in Proceedings of the 2013 European Control Conference, Zurich, Switzerland, July 2013. [2] Z. Miao, L. A. D. Espinosa, I. R. Petersen, V. Ugrinovskii, and M. R. James, “Coherent quantum observers for n-level quantum systems,” in Australian Control Conference, Perth, Australia, November 2013. [3] Z. Miao, M. R. James, and I. R. Petersen, “Coherent observers for linear quantum stochastic systems,” Automatica, vol. 71, pp. 264–271, 2016. [4] I. R. Petersen, “A direct coupling coherent quantum observer,” in Proceedings of the 2014 IEEE Multi-conference on Systems and Control, Antibes, France, October 2014, also available arXiv 1408.0399. [5] ——, “A direct coupling coherent quantum observer for a single qubit finite level quantum system,” in Proceedings of 2014 Australian Control Conference, Canberra, Australia, November 2014, also arXiv 1409.2594. [6] ——, “Time averaged consensus in a direct coupled distributed coherent quantum observer,” in Proceedings of the 2015 American Control Conference, Chicago, IL, July 2015. [7] ——, “Time averaged consensus in a direct coupled coherent quantum observer network for a single qubit finite level quantum system,” in Proceedings of the 10th ASIAN CONTROL CONFERENCE 2015, Kota Kinabalu, Malaysia, May 2015. [8] I. R. Petersen and E. H. Huntington, “A possible implementation of a direct coupling coherent quantum observer,” in Proceedings of 2015 Australian Control Conference, Gold Coast, Australia, November 2015. [9] ——, “A reduced order direct coupling coherent quantum observer for a complex quantum plant,” in Proceedings of the European Control Conference 2016, Aalborg, Denmark, June 2016. [10] I. R. Petersen and E. Huntington, “Implementation of a direct coupling coherent quantum observer including observer measurements,” in Proceedings of the 2016 American Control Conference, Boston, MA, July 2016. [11] L. A. D. Espinosa, Z. Miao, I. R. Petersen, V. Ugrinovskii, and M. R. James, “Physical realizability and preservation of commutation and anticommutation relations for n-level quantum systems,” SIAM Journal on Control and Optimization, vol. 54, no. 2, pp. 632–661, 2016. [12] M. Athans and E. Tse, “A direct derivation of the optimal linear filter using the maximum principle,” IEEE Transactions on Automatic Control, vol. AC-12, no. 6, pp. 690–698, 1967. [13] H. Kwakernaak and R. Sivan, Linear Optimal Control Systems. Wiley, 1972. [14] M. R. James, H. I. Nurdin, and I. R. Petersen, “H ∞ control of linear quantum stochastic systems,” IEEE Transactions on Automatic Control, vol. 53, no. 8, pp. 1787–1803, 2008. [15] I. R. Petersen, “Quantum linear systems theory,” Open Automation and Control Systems Journal, vol. 8, pp. 67–93, 2016. [16] H. I. Nurdin, M. R. James, and A. C. Doherty, “Network synthesis of linear dynamical quantum stochastic systems,” SIAM Journal on Control and Optimization, vol. 48, no. 4, pp. 2686–2718, 2009. [17] J. Gough and M. R. James, “The series product and its application to quantum feedforward and feedback networks,” IEEE Transactions on Automatic Control, vol. 54, no. 11, pp. 2530–2544, 2009. [18] G. Zhang and M. James, “Direct and indirect couplings in coherent feedback control of linear quantum systems,” IEEE Transactions on Automatic Control, vol. 56, no. 7, pp. 1535–1550, 2011. [19] N. Yamamoto, “Robust observer for uncertain linear quantum systems,” Phys. Rev. A, vol. 74, pp. 032 107–1 – 032 107–10, 2006. [20] H. M. Wiseman and G. J. Milburn, Quantum Measurement and Control. Cambridge University Press, 2010. [21] L. Bouten, R. van Handel, and M. James, “An introduction to quantum filtering,” SIAM J. Control and Optimization, vol. 46, no. 6, pp. 2199– 2241, 2007. [22] S. Wang, H. I. Nurdin, G. Zhang, and M. R. James, “Quantum optical realization of classical linear stochastic systems,” Automatica, vol. 49, no. 10, pp. 3090 – 3096, 2013.
3cs.SY
Lagrangian method for solving Lane-Emden type equation arising in astrophysics on semi-infinite domains K Parand, A R Rezaei, A Taghavi∗ arXiv:1008.2313v2 [math-ph] 16 Aug 2010 Department of Computer Sciences, Shahid Beheshti University, G.C., Tehran, Iran Abstract In this paper we propose a Lagrangian method for solving Lane-Emden equation which is a nonlinear ordinary differential equation on semi-infinite interval. This approach is based on a Modified generalized Laguerre functions Lagrangian method. The method reduces the solution of this problem to the solution of a system of algebraic equations. We also present the comparison of this work with some well-known results and show that the present solution is acceptable. Keywords: Lane-Emden type equations, Nonlinear ODE, Lagrangian method, Collocation method, Laguerre functions, Isothermal gas spheres, Astrophysics. PACS: 02.60.Lj, 02.70.Hm. 1. Introduction Recently, spectral methods have been successfully applied in the approximation of differential boundary value problems defined in unbounded domains. We can apply different approaches using spectral methods to solve problems in semi-infinite domains. The first approach is using Laguerre polynomials/functions [1–5]. Guo [1] suggested a Laguerre-Galerkin method for the Burgers equation and Benjamin-Bona-Mahony (BBM) equation on a semi-infinite interval. It is shown that the Laguerre-Galerkin approximations are convergent on a semi-infinite interval with spectral accuracy. He in [2] introduced a new family of generalized Laguerre polynomials and investigated various orthogonal projections. Shen [3] proposed spectral methods using Laguerre functions and analyzed elliptic equations on regular unbounded domains. In [3] is shown that spectral-Galerkin approximations based on Laguerre functions are stable and convergent with spectral accuracy in the Sobolev spaces. Siyyam [4] applied two numerical methods for solving initial value problem differential equations using the Laguerre Tau method. Maday, et al. [5] proposed a Laguerre type spectral method for solving partial differential equations. Corresponding author. Tel:+98 21 22431653; Fax:+98 21 22431650. Email addresses: [email protected] (K Parand), [email protected] (A R Rezaei), [email protected] (A Taghavi) ∗ August 17, 2010 The second approach is reformulating the original problem in a semi-infinite domain to a singular problem in a bounded domain by variable transformation and then using the Jacobi polynomials to approximate the resulting singular problem [6]. The third approach replacing the semi-infinite domain with [0, K] interval by choosing K, sufficiently large. This method is named domain truncation [7]. The fourth approach of spectral method is based on rational orthogonal functions. Boyd [8] defined a new spectral basis, named rational Chebyshev functions on the semi-infinite interval, by mapping to the Chebyshev polynomials. Guo et al. [9] introduced a new set of rational Legendre functions which is 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. [10] applied pseudospectral methods on a semi-infinite interval and compared rational Chebyshev, Laguerre, and mapped Fourier sine. The authors of [11–13] applied spectral method to solve nonlinear ordinary differential equations on semi-infinite intervals. Their approach was based on a rational Tau method. They obtained the operational matrices of derivative and product of rational Chebyshev, Legendre functions, then applied these matrices together with Tau method to reduce the solution of these problems to the solution of a system of algebraic equations. The authors of [14] also applied pseudospectral method based on rational Legendre functions to solve Lane-Emden equations. This paper is arranged as follows: In section 2 we describe Lane-Emden equation. In section 3 we describe the formulation of generalized Laguerre polynomials and modified generalized Laguerre functions required for our subsequent development. In section 4 we detailed description of Lagrangian interpolants construction and properties then obtained the operational matrices of derivative of modified generalized Laguerre functions to applied these matrices together with the Lagrangian method to reduce the solution of this problem to the solution of the system of algebraic equation. Section 5 summarizes the application of this method for solving Lane-Emden equation and a comparison is made with existing methods in the literature. The results show preference of this method in comparison with the others. The conclusions are described in the final section. 2. Lane-Emden equation In the study of stellar structure [15] an important mathematical model described by the second-order ordinary differential equation xy ′′ + 2y ′ + xg(y) = 0, x > 0, (1) arises, where g(y) is some given function of y. Among the most popular form of g(y) is g(y) = y m , (2) where m is a constant. subject to the conditions y(0) = 1, y ′(0) = 0. (3) 2 This equation is standard Lane-Emden equation. It was first proposed by Lane [16] and studied in more detail by Emden [17]. The Lane-Emden equation describes a variety of phenomena in theoretical physics and astrophysics, including aspects of stellar structure, the thermal history of a spherical cloud of gas, isothermal gas spheres, and thermionic currents [15]. 2.1. Standard Lane-Emden equation This equation is one of the basic equations in the theory of stellar structure and has been the focus of many studies [18–20]. This equation describes the temperature variation of a spherical gas cloud under the mutual attraction of its molecules and subject to the laws of classical thermodynamics. The polytropic theory of stars essentially follows out of thermodynamic considerations, that deal with the issue of energy transport, through the transfer of material between different levels of the star. We simply begin with the Poisson equation and the condition for hydrostatic equilibrium: dP GM(r) = −ρ , dr r2 (4) dM(r) = 4πρr 2 , dr (5) where G is the gravitational constant, P is the pressure at radius r, M(r) is the mass of a star at a certain radius r, and ρ is the density, at a distance r from the center of a spherical star. Combination of these equations yields the following equation, which as should be noted, is an equivalent form of the Poisson Equation.   1 d r 2 dP = −4πGρ. (6) r 2 dr ρ dr From these equations one can obtain the Lane-Emden equation through the simple supposition that the pressure is related to the density, while remaining independent of the temperature. We already know that in the case of a degenerate electron gas that the pres3 sure and density are ρ ∼ P 5 , assuming that such a relation exists for other states of the star we are led to consider a relation of the following form: 1 P = Kρ1+ m , (7) where K and m are constants, at this point it is important to note that m is the polytropic index which is related to the ratio of specific heats of the gas comprising the star. Based upon these assumptions we can insert this relation into our first equation for the hydrostatic equilibrium condition and from this rewrite equation to:     K(m + 1) 1 −1 1 d 2 dy m r = −y m , (8) λ 4πG r 2 dr dr 3 where the additional alteration to the expression for density has been inserted with λ representing the central density of the star and y that of a related dimensionless quantity that are both related to ρ through the following relation ρ = λy m . (9) where m is a constant. Additionally, if place this result into the Poisson equation, we obtain a differential equation for the mass, with a dependance upon the polytropic index m. Though the differential equation is seemingly difficult to solve, this problem can be partially alleviated by the introduction of an additional dimensionless variable x, given by the following: r = ax,  K(m + 1) 1 −1 a= λm 4πG (10)  12 . (11) Inserting these relations into our previous relations we obtain the famous form of the LaneEmden equation, given below:   1 d 2 dy x = −y m . (12) x2 dx dx Taking these simple relations we will have the Lane-Emden equation with g(y) = y m , 2 y ′′ + y ′ + y m = 0, x x > 0. (13) The physically interesting range of m is 0 ≤ m ≤ 5. Numerical and perturbation approaches to solve equation Eq. (1) with g(y) = y m and boundary conditions (3) have been considered by various authors. It has been claimed in the literature that only for m = 0, 1 and 5 the solutions of the Lane-Emden equation (also called the polytropic differential equations) could be given in closed form. In fact, for m = 5, only a 1-parameter family of solutions is presented. The so-called generalized Lane-Emden equation of the first kind have been looked at in Goenner [21] and Havas [22]. 2.2. Methods have been used to solve Lane-Emden equations Recently, many analytical methods have been used to solve Lane-Emden equations, the main difficulty arises in the singularity of the equation at x = 0. Currently, most techniques in use for handling the Lane-Emden-type problems are based on either series solutions or perturbation techniques. Bender et al. [18], proposed a new perturbation technique based on an artificial parameter δ, the method is often called δ-method. Mandelzweig et al. [23] used Quasilinearization approach to solve Lane-Emden equation. This method approximates the solution of a nonlinear differential equation by treating the 4 nonlinear terms as a perturbation about the linear ones, and unlike perturbation theories is not based on the existence of some kind of a small parameter. He showed that the quasilinearization method gives excellent results when applied to different nonlinear ordinary differential equations in physics, such as the Blasius, Duffing, Lane-Emden and ThomasFermi equations. Shawagfeh [24] applied a nonperturbative approximate analytical solution for the LaneEmden equation using the Adomian decomposition method. His solution was in the form of a power series. He used Padé approximants method to accelerate the convergence of the power series. In [25], Wazwaz employed the Adomian decomposition method with an alternate framework designed to overcome the difficulty of the singular point. It was applied to the differential equations of Lane-Emden type. Further in [26] he used the modified decomposition method for solving analytical treatment of nonlinear differential equations such as Lane-Emden equation. The modified method accelerates the rapid convergence of the series solution, dramatically reduces the size of work, and provides the solution by using few iterations only without any need to the so-called Adomian polynomials. Liao [27] provided a reliable, easy-to-use analytical algorithm for Lane-Emden type equations. This algorithm logically contains the well-known Adomian decomposition method. Different from all other analytical techniques, this algorithm itself provides us with a convenient way to adjust convergence regions even without Padé technique. He [28] employed Ritz’s method to obtain an analytical solution of the problem. By the semi-inverse method, a variational principle is obtained for the Lane-Emden equation, which he gave much numerical convenience when applied to finite element methods or Ritz method. Parand et al. [11–13] presented some numerical techniques to solve higher ordinary differential equations such as Lane-Emden. Their approach was based on a rational Chebyshev and rational Legendre tau method. They presented the derivative and product operational matrices of rational Chebyshev and rational Legendre functions. These matrices together with the tau method were utilized to reduce the solution of these physical problems to the solution of systems of algebraic equations. Parand et al. [14] also applied pseudospectral method based on rational Legendre functions to solve Lane-Emden equations. Ramos [29–32] solved Lane-Emden equation through different methods. In [29] he presented linearization methods for singular initial-value problems in second-order ordinary differential equations such as Lane-Emden. These methods result in linear constant-coefficients ordinary differential equations which can be integrated analytical, thus yielding piecewise analytical solutions and globally smooth solutions. Later, he [30] developed piecewise-adaptive decomposition methods for the solution of nonlinear ordinary differential equations. Piecewisedecomposition methods provide series solutions in intervals which are subject to continuity conditions at the end points of each interval, and their adaption is based on the use of either a fixed number of approximants and a variable step size, a variable number of approximants and a fixed step size or a variable number of approximants and a variable step size. In [31], series solutions of the Lane-Emden equation have been obtained by writing this equation as a Volterra integral equation and assuming that the nonlinearities are sufficiently 5 differentiable. These series solutions have been obtained by either working with the original differential equation or transforming it into an ordinary differential equation that does not contain first-order derivatives. It has been shown that these approaches provide exactly the same solutions as those based on Adomian’s decomposition techniques that make use of either a different differential operator that overcomes the singularity at x = 0, or a new dependent variable, and Liao’s homotopy analysis technique. Series solutions to the LaneEmden equation have also been obtained by working directly on the original differential equation or transforming it into a simpler one. Yousefi [33] presented a numerical method for solving the Lane-Emden equations as singular initial value problems. Using integral operator and convert Lane-Emden equations to integral equations and then applying Legendre wavelet approximations. He presented Legendre wavelet properties and then utilized these properties together with the Gaussian integration method to reduce the integral equations to the solution of algebraic equations. In [34], Chowdhury et al. presented a reliable algorithm based on the homotopy-perturbation method (HPM) to solve singular IVPs of time-independent equations.they obtained the approximate and/or exact analytical solutions of the generalized Emden-Fowler type equations.This method is a coupling of the perturbation method and the homotopy method.The HPM is a novel and effective method which can solve various nonlinear equations. The main feature of the HPM is that it deforms a difficult problem into a set of problems which are easier to solve. In this work, HPM yields solutions in convergent series forms with easily computable terms. Aslanov [35] introduced a further development in the Adomian decomposition method to overcome the difficulty at the singular point of non-homogeneous, linear and non-linear Lane-Emden-like equations; and constructed a recurrence relation for the components of the approximate solution and investigated the convergence conditions for the Emden-Fowler type of equations. He improved the previous results on the convergence radius of the series solution. Recently, Dehghan and Shakeri [36] first applied an exponential transformation to the Lane-Emden equation to overcome the difficulty of a singular point at x = 0 and solved the resulting nonsingular problem by the variational iteration method. Yildirim et al. [37] presented approximate exact solutions of a class of Lane-Emden type singular IVPs problems, by the variational iteration method. The variational iteration method yields solutions in the forms of convergent series with easily calculable terms. Bataineh et al. [38] presented a reliable algorithm based on HAM to obtain the exact and/or approximate analytical solutions of the singular IVPs of the Emden-Fowler type. The HAM, first proposed by Liao in his Ph.D. dissertation [27], is a promising method for linear and non-linear problems. HAM contains an auxiliary parameter ~ which provides us with a simple way to adjust and control the convergence region and the rate of convergence of the series solution. Marzban et al. [39] used a method based upon hybrid function approximations. He used the properties of hybrid of block-pulse functions and Lagrange interpolating polynomials together with the operational integration matrix for solving nonlinear second-order, initial value problems and the Lane-Emden equation. 6 3. Properties of modified generalized Laguerre functions This section is devoted to the introduction of the basic notions and working tools concerning orthogonal modified generalized Laguerre functions. More specifically, we presented some properties of modified generalized Laguerre functions, concerning projection process. The Laguerre approximation has been widely used for numerical solutions of differential equations on infinite intervals. Lαn (x) (generalized Laguerre polynomial) is the nth eigenfunction of the Sturm-Liouville problem [40–42]: x d2 α d Ln (x) + (α + 1 − x) Lαn (x) + nLαn (x) = 0, 2 dx dx x ∈ (0, ∞), n = 0, 1, 2, .... , with the normalizing condition:   n+α α Ln (0) = n d α d α L0 (x) = 0, L (x) = −1, dx dx 1 where α > −1. The generalized Laguerre polynomials can be defined with the following recurrence formula: Lα0 (x) = 1, Lα1 (x) = 1 + α − x, nLαn (x) = (2n − 1 + α − x)Lαn−1 (x) − (n + α − 1)Lαn−2 (x), n ≥ 2 these are orthogonal polynomials for the weight function wα = xα e−x . The generalized Laguerre polynomials satisfy the following relation [41]: ∂x Lαn (x) =− n−1 X Lαk (x), (14) k=0 where n ≥ 1 and α > −1. We define Modified generalized Laguerre functions (which we denote MGL functions) Γαn (x) as follows: Γαn (x) = exp(−x/(2L))Lαn (x/L), L > 0 and α > −1. This system is an orthogonal basis [7, 43] with weight function wL (x) = property:   Γ(n + α + 1) α α δnm , < Γn , Γm > w L = L2 n! (15) x L and orthogonality where δnm is the Kronecker function. Boyd [7, 10, 44] offered guidelines for optimizing the map parameter L where L > 0 is the scaling parameter. On a semi-infinite domain, there is always a parameter that must be determined experimentally. 7 Numerical results deponed smoothly on constant parameter L, and therefore, are not very sensitive to L because the dError/dL = 0 at the minimum itself, so the error varies very slowly with L around the minimum. A little trial and error is usually sufficient to find a value that is nearly optimum. In general, there is no way to avoid a small amount of trial and error in choosing L when solving problems on an unbounded domain. Experience and the asymptotic approximations of [44] can help, but some experimentation is always necessary as he explain in his book [7]. 4. Lagrangian interpolation In this section we detailed description of Lagrangian interpolants construction and properties, then we introduce the Lagrangian interpolation of modified generalized Laguerre functions and its operational matrices of derivative is obtained. Let {Lαk }0≤k≤n is a basis in the space Pn of polynomials of degree at most n. When n distinct points are given, another basis in Pn is generated in a natural way. This is the basis of Lagrange polynomials with respect to the prescribed points. An element of the basis attains the value 1 at a certain point and vanishes in the remaining n − 1 points. Let us analyze first the generalize Laguerre polynomial case. We have the set of the Lagrange polynomials in Pn relative to the n points ηk , 0 ≤ k ≤ n − 1, i.e., the zeroes of Lαn . The elements of the basis are denoted by ℓnj 0 ≤ j ≤ n − 1 (denoted Lagrangian interpolants). These polynomials in Pn are uniquely defined by the conditions ( 1 if i = j , 0 ≤ j ≤ n − 1. (16) ℓnj (ηi ) = 0 if i 6= j They actually form a basis because any polynomial p ∈ Pn can be written as follows: p= n−1 X p(ηj )ℓnj . j=0 Therefore, p is a linear combination of the Lagrange polynomials. Such a combination is uniquely determined by the coefficients p(ηj ), 0 ≤ j ≤ n − 1. The following expression is easily proven: ℓnj (x) = n−1 Y k=0,k6=j x − ηk , 0 ≤ j ≤ n − 1. ηj − ηk For future applications, it is more convenient to consider the alternate expression ( Lα (x) n if x 6= ηj , ′α ℓnj (x) = L n (ηj )(x−ηj ) 1 if x = ηj , 8 (17) where 0 ≤ j ≤ n − 1. Of course, we have lim x→ηj ℓnj (x) L′ αn (x) = lim ′ α = 1, 0 ≤ j ≤ n − 1. x→ηj L n (ηj ) Lagrangian interpolants of generalized Laguerre polynomials (we denoted GLP) of order p at the Gauss-Radau-Laguerre quadrature points in R+ is [41]:  xLα (x) 1 n j = 1, ..., n,   ηj L′ αn (ηj ) x−ηj , n ℓj (x) = (18)   Lαn (x) , j = 0, Lα (0) n where ηj , j = 0, 1, 2, ..., n are the n + 1 GLP-Radau points. derivative operator of GLP is: ′ dij = ℓjn (ηi ), moreover for any polynomial p of degree at most n + 1, one gets: ′ p (ηi ) = n X dij p(ηj ). j=0 Funaro [40, 41] obtained derivative matrix of GLP(Dn ):  d α ηi dx Ln (ηi ) 1   i, j = 1, ..., n, i 6= j, d  η −ηj ηj dx Lα  n (ηj ) i   1−α+ηi  i = j = 1, ..., n,   d 2ηi α dij = dx Lαn (ηi ) i = 1, ..., n, j = 0, Ln (0)   α  − 2 Ld n (0) j = 1, ..., n, i = 0,  ηj dx Lα  n (ηj )   − n i = j = 0. α+1 (19) The second derivative operator is obtained either by squaring Dn either by evaluating ℓij (ηi ): d α L (η )((1−α+ηi )(ηi −ηj )−2ηi ) dx n i  i, j = 1, ..., n, i 6= j,  d  ηj (ηi −ηj )2 dx Lα n (ηj )   2 (ηi −α)  n−1  i = j = 1, ..., n,   3η2 − 3ηi ′′ n ′′ ℓijn (ηi ) = i d Lα (α+1−ηi ) dx n (ηi ) − α ηi Ln (0)   2(n+α+1)Lα  n (0)  −  3 (α+1) d Lα (η )  η j n j dx    n(n−1) (α+1)(α+2) i = 1, ..., n, j = 0, (20) j = 1, ..., n, i = 0, i = j = 0. Laguerre polynomials are not suitable for computations [41], and also Lagrangian interpolation of Laguerre polynomials is not suitable for solving some differential equations, such 9 as Lane-Emden equations because of their boundary conditions. So we use Lagrangian interpolation of MGL functions. At first we must find Lagrangian interpolants and derivative operators of MGL functions. Let Γαn (x) = e−x/2 Lαn (x) and by substitution of ηi with x we have, d α Γ (x) dx n x=ηi = e−x/2 d α L (x) dx n x=ηi . (21) Lemma 1. Lagrangian interpolant of Γαn (x) = e−x/2 Lαn (x) is, −x/2 e ℓbni (x) = ℓni (x) −η /2 , e i (22) which ℓnj (x) are Lagrangian interpolants of Laguerre polynomials. α (x) n is Lagrangian interpolant of Γαn (x), using relation (21) and Proof: Suppose γ xΓ x−ηj L’Hôpital’s rule we can find constant γ, ℓbnj (ηi ) = 0, i 6= j xΓα (x) d lim γ n = γ lim (Γαn (x) + x Γαn (x)) = 1 x→ηj x→ηj x − ηj dx 1 , ⇒γ= d α Ln (x) ηj e−ηj /2 dx x=ηj so ℓbnj (x) = xe−x/2 Lαn (x) , x − ηj 1 d α ηj e−ηj /2 dx Ln (x) (23) x=ηj and with comparison of (18) and (23) Lemma 1 is proved. b n ) is: By Eq. (22) derivative operator of Γαn (x) = e−x/2 Lαn (x) (we denote by D −ηj /2 e dbij = dij −η /2 − 1/2δij , e i i, j = 0, ..., n. (24) Where matrix dij is defined in Eq. (19). As pointed out in before the second derivative b n either by evaluating ℓb′′j n (ηi ). For evaluating operator is obtained either by squaring D ′′ ℓbj n (ηi ) we can use the following relation: e−ηj /2 e−ηj /2 ′′ n 1 ′′ n δ − d ℓc (η ) = ij ij −η /2 + −η /2 ℓij (ηj ), j ij 4 e i e i ′′ i, j = 0, ..., n, (25) and ℓijn (ηj ) is defined in Eq. (20). It is obvious that MGL functions is Γαn (x/L), so Lagrangian interpolant of MGL functions is ℓbni (x/L), and derivative operators can be obtained easily. 10 4.1. Function Approximation We define the interpolant approximation of y(x) by In y(x) = n X j=0 bj ℓbnj (x/L). (26) Where ℓbnj (x) is defined in Eq. (23). The bj ’s are the expansion coefficients associated with the family {ℓbnj (x/L)}. A semilogarithmic plot of |bj | versus j is also useful to determine a good choice of L when the exact solution for y(x) is unknown. One can run the code for several different L and then plot the coefficients from each run on the same graph. The best L is the choice that gives the most rapid decrease of the coefficients [7]. Therefore, In y(ℑj ) = bj , j = 0, ..., n. (27) where ℑj = Lηj are the zeroes of ℓbn j (x/L). So derivative operator of MGL functions is (we cLn ): denote by D 1c 1 ′n 1c ′ dd dij , ℓjn (ℑi /L) = ℓc Lij = j (ηi ) = L L L (28) and the second derivative operator is 1 c 1 ′′ n d ′′ (2) ℓj n (ηi ), dLij = 2 ℓc j (ℑi /L) = 2 L L (29) d The relationship between the derivative dx In y(x) and In y(x) at the collocation points ℑi , 0, ..., n can be obtained by differentiation. The result is as: d In y(x) dx x=ℑi = n X j=0 and d 2 I y(x) d2 x n x=ℑi = bj dd Lij n X j=0 d (2) bj dLij x=ℑi , 0 ≤ i ≤ n, x=ℑi , 0 ≤ i ≤ n. i= (30) (31) 5. Solving Lane-Emden equation To apply Lagrangian interpolant of MGL functions to the Lane-Emden Equation introduced in Eq. (1) and Eq. (2) with boundary conditions Eq. (3), at first with Eq. (26) we expand y(x), as follows: In y(x) = n X j=0 bj ℓbnj (x/L), 11 with α = 1 for Lagrangian interpolant of MGL functions. To find the unknown coefficients bj ’s, we substitute the truncated series into the Eq. (1) with g(y) introduced in Eq. (2) and boundary conditions in Eq. (3). So we have: ℑi n X j=0 n X d (2) m bj dLij + 2 bj dd Lij + ℑi bi = 0, i = 1, ..., n − 1 (32) j=0 b0 = 1, n X bj dd L0j = 0. (33) j=0 We have n − 1 equations in Eq. (32), that generates a set of n + 1 nonlinear equations with boundary equations in Eq. (33). Table 1 shows the approximations of y(x) for standard Lane-Emden with m = 3 obtained by the method proposed in this paper for n = 7 and L = 1, and those obtained by Horedt [45]. Table 2 shows the comparison of the first zero of y, between the present method, rational Legendre pseudospectral method [14], method in [39], Padé approximation used by [18] and exact values reported in [45] for m = 2, 3, 4, respectively. Figure 1 shows the result graph of Lane-Emden for n = 6, m = 2, 3, 4. 6. Conclusions The Lane-Emden equation describes a variety of phenomena in theoretical physics and astrophysics, including aspects of stellar structure, the thermal history of a spherical cloud of gas, isothermal gas spheres, and thermionic currents [15]. Since then the equation has been a center of attraction. The main problem in this direction is the accuracy and range of applicability of these approaches. The fundamental goal of this paper has been to construct an approximation to the solution of nonlinear Lane-Emden equation in a semi-infinite interval which has singularity at x = 0. A set of Laguerre functions are proposed to provide an effective but simple way to improve the convergence of the solution by Lagrangian method. Through the comparisons among the exact solutions of Horedt [45], the approximate solutions of Bender [18], recent good results in [14] and the current work, it has been shown that the present work has provided more accurate solutions for Lane-Emden equations. by taking to account N, it seems that the present approach gives the good result with small N. Acknowledgments The authors are very grateful to the reviewers for carefully reading the Paper and for his (or her) comments and suggestions which have improved the Paper. One of the authors (K. Parand) would like to thank Shahid Beheshti University for the awarded grant. 12 References [1] B.Y Guo, J. Shen, Laguerre-Galerkin method for nonlinear partial differential equations on a semiinfinite interval, Numer. Math. 86 4 (2000) 635-654. [2] B.Y, Guo, J. Shen, C.L. Xu, Generalized Laguerre approximation and its applications to exterior problems, J. Comp. Math. 23 (2005) 113-130. [3] J. Shen, Stable and efficient spectral methods in unbounded domains using Laguerre functions, SIAM J. Numer. Anal, 38 4 (2000) 1113-1133. [4] H.I Siyyam, Laguerre tau methods for solving higher order ordinary differential equations, J. Comput. Anal. Appl. 3 2 (2001) 173-182 . [5] Y. Maday, B. Pernaud-Thomas, H. Vandeven, Reappraisal of Laguerre type spectral methods, La Recherche Aerospatiale. 6 (1985) 13-35. [6] B.Y Guo, Jacobi spectral approximation and its applications to differential equations on the half line, J. Comput. Math. 18 1 (2000) 95-112. [7] J.P. Boyd, Chebyshev and Fourier Spectral methods, Second Edition. 2rd ed., Dover., New York, 2000. [8] J.P Boyd, Orthogonal rational functions on a semi-infinite interval, J. Comput. Phys. 70 1 (1987) 63-88. [9] 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. [10] 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. [11] K. Parand, M. Razzaghi, Rational Legendre approximation for solving some physical problems on semi-infinite intervals. Phys. Scr. 69 (2004) 353-357. [12] K. Parand, M. Razzaghi, Rational Chebyshev tau method for solving higher-order ordinary differential equations, Int. J. Comput. Math. 81 1 (2004) 73-80. [13] K. Parand, M. Razzaghi, Rational Chebyshev tau method for solving Volterra’s population model, Appl. Math. Comput. 149 3 (2004) 893-900. [14] K. Parand, M. Shahini, M. Dehghan, Rational Legendre pseudospectral approach for solving nonlinear differential equations of Lane-Emden type, J. Comput. Phys. 228 (2009) 8830-8840. [15] S, Chandrasekhar, Introduction to the Study of Stellar Structure, Dover., New York, 1967. [16] W. Thomson, Collected Papers, Cambridge University Press., Cambridge, 1991. [17] R. Emden, Gaskugeln, Teubner., Leipzig and Berlin, 1907. [18] C.M. Bender, K.A. Milton, S.S. Pinsky, Jr-L.M. Simmons, A new perturbative approach to nonlinear problems, J. Math. Phys. 30 7 (1989) 1447-1455. [19] D.C. Biles, M.P. Robinson, J.S. Spraker, A generalization of the Lane-Emden equation, J. Math. Anal. Appl. 273 (2002) 654-666. [20] G. Bluman, A.F. Cheviakov, M. Senthilvelan, Solution and asymptotic/blow-up behaviour of a class of nonlinear dissipative systems, J. Math. Anal. Appl. 339 (2008) 1199-1209. [21] H. Goenner, Symmetry transformations for the generalized Lane-Emden equation, Gen. Rel. Grav. 33 5 (2001) 833-841. [22] H. Goenner, P. Havas, Exact solutions of the generalized Lane-Emden equation, J. Math. Phys. 41 (2000) 7029-7042. [23] V.B. Mandelzweig, F. Tabakin, Quasilinearization approach to nonlinear problems in physics with application to nonlinear ODEs, Comput. phys. commun. 141 2 (2001) 268-281. [24] N.T. Shawagfeh, Nonperturbative approximate solution for Lane-Emden equation, J. Math. Phys. 34 9 (1993) 4364-4369. [25] A. Wazwaz, A new algorithm for solving differential equations of Lane-Emden type, Appl. math. comput. 118 2-3 (2001) 287-310. [26] A. Wazwaz, The modified decomposition method for analytic treatment of differential equationse, Appl. Math. Comput. 173 1 (2006) 165-176. [27] S. Liao, A new analytic algorithm of Lane-Emden type equations, Appl. Math. Comput. 142 1 (2003) 1-16. 13 [28] J.H. He, Variational approach to the Lane-Emden equation, Appl. Math. Comput. 143 2-3 (2003) 539-541. [29] J.I. Ramos, Linearization techniques for singular initial-value problems of ordinary differential equations, Appl. Math. Comput. 161 2 (2005) 525-542. [30] J.I. Ramos, Piecewise-adaptive decomposition methods, Chaos. Solit. Fract. 40 4 (2007) 1623-1636. [31] J.I. Ramos, Series approach to the Lane-Emden equation and comparison with the homotopy perturbation method, Chaos. Solit. Fract. 38 2 (2008) 400-408. [32] J.I. Ramos, Linearization methods in classical and quantum mechanics, Comput. Phys. Commun. 153 2 (2003) 199-208. [33] S.A. Yousefi, Legendre wavelets method for solving differential equations of Lane-Emden type, Appl. Math. Comput. 181 2 (2006) 1417-1422. [34] MSH. Chowdhury, I. Hashim, Solutions of Emden-Fowler equations by homotopy perturbation method, Nonlinear. Anal. Real. World. Appl. 10 (2007) 104-115. [35] A. Aslanov, Determination of convergence intervals of the series solutions of Emden-Fowler equations using polytropes and isothermal spheres, Phys. Let. A. 372 20 (2008) 3541-3740. [36] M. Dehghan, F. Shakeri, Approximate solution of a differential equation arising in astrophysics using the variational iteration method, New Astronomy. 13 1 (2008) 53-59. [37] A. Yildirim, T. Öziş, Solutions of Singular IVPs of Lane-Emden type by the variational iteration method, Nonlinear. Anal. Ser. A. Theory. Method. Appl. 70 6 (2009) 2480-2484. [38] A.S. Bataineh, M.S.M. Noorani, I. Hashim, Homotopy analysis method for singular IVPs of EmdenFowler type, Commun. Nonlinear. Sci. Numer. Simul., 14 4 (2008) 1121-1131. [39] H.R. Marzban, H.R. Tabrizidooz, M. Razzaghi, Hybrid functions for nonlinear initial-value problems with applications to Lane-Emden type equations, Phys. Lett. A. 372 37 (2008) 5883-5886. [40] D. Funaro, Computational aspects of pseudospectral Laguerre approximations, NASA Contractor Report 181934 ICASE Report No. 89-72 (1989) [41] D. Funaro, Polynomial Approximation of Differential Equations. Springer-Verlag., Berlin, 1992. [42] S.S. Bayin, Mathemathical methods in science and engineering, John Wiley & Sons., New York, 2006. [43] G. Gasper, K. Stempak, W. Trembels, Fractional integration for Laguerre expansions, Methods. Appl. Anal. 2 1 (1995) 67-75. [44] J.P. Boyd, The optimization of convergence for Chebyshev polynomial methods in an unbounded domain, J. Comput. Phys. 45 (1982) 43-79. [45] G.P. Horedt, Polytropes Applications in Astrophysics and Related Fields, Klawer Academic Publishers., Dordrecht, 2004. 14 Table 1: Approximation of y(x) for present method, solutions of Horedt [45] for m = 3 x 0.000 0.100 0.500 1.000 5.000 6.000 6.800 6.896 Present method 1.000000 0.998323 0.959821 0.855057 0.110820 0.043718 0.004165 0.000035 solutions of Horedt [45] 1.000000 0.998336 0.959839 0.855058 0.110820 0.043738 0.004168 0.000036 Table 2: Comparison the first zero of y, between the present method, rational Legendre pseudospectral method [14], method in [39], Padé approximation used by [18] and exact values reported in [45] for m = 2, 3 and 4 m 2 3 4 N 6 7 6 Present method 4.352875 6.896849 14.971546 method in [14] with N = 75 4.35287108 6.89684862 14.9715463 15 method in [39] 4.352875 6.89685 14.971546 Bender 4.3603 7.0521 17.967 Exact value 4.35287460 6.89684862 14.9715463 1.0 0.8 0.6 y(x) m=2 m=3 m=4 0.4 0.2 0 0 5 10 15 x Figure 1: Lane-Emden equation graph obtained by present method 16
5cs.CE
Improved Bounds for Online Dominating Sets of Trees Koji M. Kobayashi arXiv:1710.11414v1 [cs.DS] 31 Oct 2017 Abstract The online dominating set problem is an online variant of the minimum dominating set problem, which is one of the most important NP-hard problems on graphs. This problem is defined as follows: Given an undirected graph G = (V, E), in which V is a set of vertices and E is a set of edges. We say that a set D ⊆ V of vertices is a dominating set of G if for each v ∈ V \ D, there exists a vertex u ∈ D such that {u, v} ∈ E. The vertices are revealed to an online algorithm one by one over time. When a vertex is revealed, edges between the vertex and vertices revealed in the past are also revealed. A revealed subtree is connected at any time. Immediately after the revelation of each vertex, an online algorithm can irrevocably choose vertices which were already revealed and must maintain a dominating set of a graph revealed so far. The cost of an algorithm on a given tree is the number of vertices chosen by it, and its objective is to minimize the cost. Eidenbenz (Technical report, Institute of Theoretical Computer Science, ETH Zürich, 2002) and Boyar et al. (SWAT 2016) studied the case in which given graphs are trees. They designed a deterministic online algorithm whose competitive ratio is at most three, and proved that a lower bound on the competitive ratio of any deterministic algorithm is two. In this paper, we also focus on trees. We establish a matching lower bound for any deterministic algorithm. Moreover, we design a randomized online algorithm whose competitive ratio is exactly 5/2 = 2.5, and show that the competitive ratio of any randomized algorithm is at least 4/3 ≈ 1.333. 1 Introduction The dominating set problem is one of the most important NP-hard problems on graphs. This problem is defined as follows: Given an undirected graph G = (V, E), in which V is a set of vertices and E is a set of edges. We say that a set D ⊆ V of vertices is a dominating set of G if for each vertex v ∈ V \ D, there exists a vertex u ∈ D such that {u, v} ∈ E. The objective of the problem is to construct a minimum dominating set. This problem has been extensively studied for many applications, such as communication in ad-hoc networks (see e.g., [16]) and facility location on networks (e.g., [12]). The dominating set problem has also been studied in online settings [11, 4, 2]. In one of the settings [4, 2], vertices are revealed to an online algorithm one by one, and edges between a revealed vertex and vertices revealed in the past are also revealed. The input of this setting is an undirected graph and a sequence consisting of all the vertices of the graph. (This sequence represents an order of the vertices revealed to an online algorithm.) An online algorithm holds the empty set U at the beginning. When a new vertex is revealed, the algorithm can add vertices revealed so far to U , which means that an added vertex is not necessarily the newly revealed one. The algorithm must not remove a vertex from U . The total number of vertices is not known to an online algorithm before the final vertex is revealed. Thus, U must be a dominating set immediately after the revelation of each vertex. The performance of online algorithms is evaluated using competitive analysis [1, 15]. 1 The cost of an algorithm ALG for an input σ is the size of a dominating set constructed by ALG for σ, which is denoted as CALG (σ). We say that the (strict) competitive ratio of an online algorithm ON is at most c or ON is c-competitive if for any input σ, CON (σ) ≤ cCOP T (σ), in which OP T is an optimal offline algorithm for σ. If ON uses randomization, the expected cost of ON is used. Previous Results and Our Results. For trees, Eidenbenz [4] and Boyar et al. [2] designed a 3-competitive deterministic algorithm, and proved that the competitive ratio of any deterministic online algorithm is at least two (Boyar et al. showed their results in terms of asymptotic competitive ratios, but the results can hold for strict competitive ratios as well). In this paper, we show the following three results for trees: (i) We prove that a lower bound on the competitive ratio of any deterministic algorithm is three. This bound matches the above upper bound. (ii) We establish a randomized online algorithm whose competitive ratio is exactly 5/2 = 2.5. This algorithm is the first non-trivial randomized algorithm for the online dominating set problem for any graph class. (iii) We show that the competitive ratio of any randomized algorithm is at least 4/3 ≈ 1.333. The above results are shown with respect to the strict competitive ratio. However, it is easy to see that the same results for the asymptotic competitive ratios as (i) and (iii) can be shown in a quite similar way to their proofs. (Note that any upper bound on the strict competitive ratio is an upper bound on that on the asymptotic competitive ratio. That is, (ii) holds for the asymptotic competitive ratio.) Related Results. For several graph classes, Eidenbenz [4] and Boyar et al. [2] studied online algorithms of a few variants of dominating sets, namely, connected dominating sets, total dominating sets and independent dominating sets. Their results are summarized in the table in Sec. 6 of [4] and Table 2 in Sec. 1 of [2]. For example, they proved that the optimal competitive ratios on a bipartite graph and a planar graph are n − 1, in which n is the number of given vertices. Boyar et al. [2] defined an incremental algorithm as an algorithm which maintains a dominating set immediately after a new vertex is revealed. An online algorithm is incremental, but an optimal incremental algorithm knows the whole input and can perform better than any online algorithm. They measured the performance of online algorithms compared with an optimal incremental algorithm in addition to an optimal offline algorithm. Moreover, they compared the performance of an optimal incremental algorithm with that of an optimal offline algorithm for several graph classes, which is also summarized in Table 1 in Sec. 1 of [2]. King and Tzeng [11] studied two different variants of online dominating sets on general graphs. One variant is the same as the one studied in this paper, except that immediately after a new vertex is revealed, an online algorithm can choose the new one but cannot choose vertices revealed previously. In this setting, they designed a deterministic algorithm whose competitive ratio is at most n − 1, and proved that the algorithm is the best possible. In the other variant, an online algorithm knows all vertices in advance, and at a time i, all the edges between the i-th vertex vi √ and the other vertices are revealed. They showed an upper bound of 3 n/2 and a lower bound of √ of n for this variant. For the offline setting, the minimum dominating set problem is one of the most significant N P -hard problems on graphs and has been widely studied. One of the most important open problems is to develop exact (exponential) algorithms (see, e.g. [5, 6, 9, 14, 13, 10]). The current fastest algorithm solves this problem in O(1.4864n ) time and polynomial space [10]. Moreover, many variants have been proposed by putting additional constraints on the original dominating set problem and have been extensively studied: for example, connected domination, independent domination and total domination (see, .e.g. [3],[8] and [7], respectively). 2 2 2.1 Preliminaries Model Description We are given an undirected tree and its vertices are revealed to an online algorithm one by one over time. The total number of the vertices is not known to the online algorithm up to the end of the input. When the i-th vertex vi is revealed to the online algorithm, all the edges between vi and vj such that j < i are also revealed. Except for the first revealed vertex, a newly revealed vertex has exactly one edge to a vertex revealed previously. That is, a revealed subtree is connected at any time. An input of the problem is a three-tuple of the form (V, E, S), in which V is the set of all the vertices of a given tree, E is the set of all the undirected edges of the tree, and S is a sequence consisting of all the vertices in V . S represents an order of the vertices revealed to an online algorithm. An algorithm has the empty set U before the first vertex is revealed. The algorithm can add vertices into U immediately after the revelation of each vertex, and it is necessary for U to be a dominating set of the given tree at the end of the input. If the algorithm is online, it does not know when the input has ended, and thus U must be a dominating set immediately after each vertex is revealed. Once a vertex is added into U , it must not be removed from U later. The cost of the algorithm for an input σ is the number of vertices in U at the end of σ, and the objective of the problem is to minimize the cost. We evaluate the performance of an online algorithm using competitive analysis. We say that the competitive ratio of a deterministic online algorithm ON is at most c if for any input σ, CON (σ) ≤ cCOP T (σ). If ON is a randomized online algorithm, then the expected cost of ON is used, which is denoted by E[CON (σ)]. If for any input σ, E[CON (σ)] ≤ cCOP T (σ), then we say that the competitive ratio of a randomized online algorithm ON is at most c against any oblivious adversary. If the number of vertices in a given tree is one, the cost ratio of any algorithm is clearly one. Thus, we assume that this number is at least two. 2.2 Notation and Definitions In this section, we give some definitions and notation used throughout this paper. For any i(= 1, 2, . . .), we use vi to denote the i-th revealed vertex to an online algorithm (the first revealed vertex v1 appears frequently in this paper). We say that vertices v and u are adjacent if {v, u} ∈ E, in which E is the set of all the edges of a given graph. When a vertex v is revealed such that v is adjacent to a vertex u which was revealed before v, then we say that v arrives at u. For any vertex v and any online algorithm ON , DON (v) denotes a dominating set constructed by ON of a revealed graph up to the time of the revelation of v. We will omit ON from the notation when it is clear from the context. For an algorithm ALG including an offline algorithm, DALG (σ) denotes a dominating set constructed by ALG after the end of the input σ. We will omit σ from the notation when it is clear from the context. For a vertex v, we say that ALG selects v if v ∈ DALG . For vertices u and v such that u is revealed after v, deg u (v) denotes the degree of v immediately after u is revealed. deg(v) denotes the degree of v after the end of the input. For a vertex v and a vertex u revealed after v, we say that u is a descendant of v if any vertex on the simple path from v to u is revealed after v. The cost of a deterministic algorithm ALG for a vertex set U is the number of vertices selected by ALG in U . That is, it is the number of vertices in U ∩ DALG . Moreover, if U contains only one vertex, then we simply say the cost for the vertex. In the same way, we use the term “the expected cost of ALG for U (or a vertex)” if ALG is a randomized algorithm. 3 3 3.1 Deterministic Lower Bound Overview of Proof We first outline an input to obtain our lower bound. The tree of the input is constructed according to two routines. The tree can be divided into several subtrees satisfying some properties and we evaluate the competitive ratio for each set of some subtrees. One of the routines appoints a vertex as the root to construct a subtree, which is called a base vertex. The other routine constructs several subtrees with at most two leaves, each of which arises from the base vertex. The set of all the vertices excluding the root in each of the subtrees is called a T -set. It depends on the behavior of an online algorithm ON how many T -sets are constructed and how many leaves and inner vertices composing T -sets are. If a T -set contains two leaves, the leaves share the adjacent vertex. For each T -set, OP T selects one vertex for every consecutive three vertices starting with the parent of a leaf in it. If the degree of a vertex selected by OP T is two, ON selects the vertex and the two adjacent vertices. Otherwise, that is its degree is at least three, ON selects at least three vertices from the vertex and all the adjacent vertices. Let us explain the proof more in detail. If a T -set contains sufficiently many inner vertices, it is called a T3 -set. Otherwise, a T -set such that ℓ modulo 3 = i is called a Ti -set, in which ℓ is the length from the base vertex to a leaf in the T -set. One of the routines tries to force ON to construct one of the following four sets of T -sets from a base vertex (Fig. 1): (1) a set of two T1 -sets and at least zero T0 -set, (2) a set of one T2 -set and at least zero T0 -set, (3) a set of one T3 -set, at most one T1 -set and at least zero T0 -set, and (4) a set of sufficiently many T0 -sets and at most one T1 -set. The cost ratios of these T -sets are three for (1) or (2) and approximately three for (3) or (4), respectively. ON can construct none of these sets. Namely, (5) ON constructs one T1 -set and then does one T2 -set (Further, ON may also construct T0 -sets). In this case, the routine partitions the T2 -set into a vertex u, a T1 -set and a T0 -set (Fig. 2). This T0 -set and all the T -sets in (5) except for the partitioned T2 -set compose a set of T -sets of (1). Then, the routine finishes constructing a subtree from the current base vertex, whose cost ratio is three, and appoints u as a new base vertex. One T0 -set, which is constructed from the above partition of the T2 -set, belongs to the new base vertex u. Since the set of T -sets of u is not classified into any of the above four categories, the routine continues to construct subtrees for u. This is how the routine tries to construct one of the four sets of T -sets for all base vertices and to achieve a lower bound of (approximately) three. Therefore, we have the following theorem: Theorem 3.1 For any ε > 0, the competitive ratio of any deterministic online algorithm is at least 3 − ε. 3.2 Proof of Theorem 3.1 Consider a deterministic online algorithm ON for the input σ, which will be defined below. Without loss of generality, we assume that ON does not select any vertex when a vertex arrives at a selected vertex. Moreover, we assume that when a vertex arrives at a vertex which is not selected, ON selects only one of the two vertices. First we define a routine to construct a subinput. When this routine is executed, it takes a vertex which has already been revealed to ON as a parameter. We call such a vertex a base vertex (whose formal definition will be given later). Let us outline this routine. The routine constructs a subtree with at most two leaves from a base vertex, which is the root of this subtree. The routine continues increasing inner vertices of the subtree by the time ON 4 base vertex (1) T0-set T0-set new base vertex T2-set T1-set (5) (1) T1-set T0-set T0-set u T0-set T1-set T1-set T0-set T0-set (4) (2) T2-set T0-set T1-set T0-set (3) many T0-sets T0-set T3-set many inner vertices T0-set T1-set Figure 1: An example of the five sets of T -sets from (1) to (5). Highlighted vertices denote base vertices. Black vertices denote vertices selected by ON . Vertices with a gray triangle denote vertices selected by OP T . One of the five sets of T -sets is constructed for a base vertex. If (5) is constructed, the T2 -set in the set is partitioned into a new base vertex u, a T1 -set and a T0 -set. After that, the routines force ON to construct one of the five sets of T -sets for u recursively. u is not dominated by OP T yet, but is dominated later. 5 selects a newly revealed vertex. When ON selects it, the routine sets it to be a leaf and reveals another leaf. MaxLength is a sufficiently large positive integer such that MaxLength modulo 3 = 2, which is used in the routine. SubtreeRoutine(vertex v) Step T1: u0 := v and j := 0. Step T2: If j = MaxLength, then finish. j := j + 1. Step T3: A vertex uj arrives at a vertex uj−1 . Execute one of the following two cases. Case T3.1 (ON selects uj ): A vertex u′j−1 arrives at uj−1 , and finish. Case T3.2 (ON does not select uj ): Go to Step T2. Note that ON selects either uj−1 or u′j−1 in Case T3.1 because any online algorithm must select at least one of two consecutive vertices. Also, note that ON selects uj−1 if it is not selected immediately before the execution of Case T3.2 because DON (uj ) must contain either uj−1 or uj . (u0 is already selected at the beginning of the routine, which is shown later.) Suppose that the routine is executed with a vertex v as the parameter and j = t holds when the routine finishes. Also, suppose that the routine gives vertices ui (i ∈ [1, t]) and u′t−1 (if any) such that u1 is the a-th vertex arriving at v, ui+1 arrives at ui , and u′t−1 arrives at ut−1 , during the execution of the routine. Then, let us define the vertex set g(v, a) as follows: (i) If for all i ∈ [1, t], ui is not a base vertex, then g(v, a) = {u1 , u2 , . . . , ut , u′t−1 }. (ii) Suppose that for any i ∈ [1, x − 1], ui is not a base vertex but ux is a base vertex. If x ≤ t − 2, g(v, a) = {u1 , u2 , . . . , ux−1 }. Otherwise, that is, if x ≥ t − 1, g(v, a) = {u1 , u2 , . . . , ut−1 , u′t−1 }. (u′t−1 is not a base vertex. Thus, g(v, a) does not contain any base vertex. Immediately after the execution of the routine, (i) always holds. u2 in (i) can be set to be a base vertex later and then (ii) can hold. Namely, both x = 2 and t modulo 3 = 2 in (ii). These facts will be shown later.) We call this vertex set g(v, a) the a-th T -set of v, and say that v has the T -set. Also, we define ℓ(v, a) = max{i | ui ∈ g(v, a)}, which is called the length of g(v, a). Let us classify g(v, a) into the following four categories: (i) g(v, a) such that ℓ(v, a) = MaxLength is called a T3 -set, (ii) g(v, a) such that ℓ(v, a) < MaxLength and ℓ(v, a) modulo 3 = 0 is called a T0 -set, (iii) g(v, a) such that ℓ(v, a) < MaxLength and ℓ(v, a) modulo 3 = 1 is called a T1 -set, and (iv) g(v, a) such that ℓ(v, a) < MaxLength and ℓ(v, a) modulo 3 = 2 is called a T2 -set. Next, we evaluate the cost of ON for g(v, a), that is, the number of vertices in DON ∩ g(v, a). Cost for a T3 -set: ℓ(v, a) = MaxLength and DON (ut ) (namely, DON ) contains ui (i = 1, 2, . . . , ℓ(v, a)− 2) and either uℓ(v,a)−1 or uℓ(v,a) . Thus, the number of vertices selected by ON in g(v, a) is MaxLength − 1. Costs for a T0 -set, a T1 -set, and a T2 -set: DON contains ui (i = 1, 2, . . . , ℓ(v, a) − 2, ℓ(v, a)). DON also contains either uℓ(v,a)−1 or u′ℓ(v,a)−1 . Thus, the number of vertices selected by ON in g(v, a) is ℓ(v, a). We define the following offline algorithm OF F to give an upper bound on the cost of OP T . Roughly speaking, OF F selects one vertex every consecutive three vertices starting with uℓ(v,a)−1 to deal with u′ℓ(v,a)−1 . Moreover, a T -set does not contain a base vertex v(= u0 ), but OF F selects v to cover u1 for a T1 -set. OF F ’s cost for a T1 -set includes the cost for v. Cost for a T0 -set: OF F selects ℓ(v, a)/3 vertices of u2 , u5 , u8 , . . . , uℓ(v,a)−1 . Cost for a T1 -set: OF F selects (ℓ(v, a) + 2)/3 vertices of u0 , u3 , u6 , . . . , uℓ(v,a)−1 . Cost for a T2 -set: OF F selects (ℓ(v, a) + 1)/3 vertices of u1 , u4 , . . . , uℓ(v,a)−1 . Cost for a T3 -set: OF F selects (ℓ(v, a) + 1)/3 vertices of u1 , u4 , · · · , uℓ(v,a)−1 (OF F ’s selection 6 begins with u1 for u0 , and ℓ(v, a) = MaxLength such that MaxLength modulo 3 = 2 by definition). ON selects all base vertices, which is shown later, while OF F selects a base vertex if its T -sets contain a T1 -set or are all T0 -sets. Then, we introduce another routine TreeRoutine to construct the input σ. This routine uses SubtreeRoutine as a subroutine. Now we formally define a base vertex. A base vertex denotes a vertex set to be the value BaseVtx in the routine. (This is because this definition also applies to a vertex u2 when the routine finishes in Case 3.3.2.) At the beginning, the routine sets v1 to be the first base vertex and calls SubtreeRoutine. Obtaining a T -set by the call, the routine sets a vertex in the T -set to be BaseVtx if it executes Case 3.3.2. Thus, more than one vertices can be base vertices. After the definition of the routine, we will prove that all the base vertices except at most one are classified into the following four categories: (1) a base vertex with two T1 -sets and at least zero T0 -sets, (2) a base vertex with one T2 -set and at least zero T0 -sets, (3) a base vertex with one T3 -set, at most one T1 -set and at least zero T0 -sets, and (4) a base vertex with sufficiently many T0 -sets and at most one T1 -set. Moreover, we will evaluate the cost for each base vertex with its T -sets and prove that each cost ratio of ON to OF F is at least three. Now we define the routine, which uses MaxT0 and MaxT1 as sufficiently large positive integers. TreeRoutine Initialize: Count := 1. v1 is revealed and BaseVtx := v1 . Step 1: CntT0 := 0 and CntT1 := 0. Step 2: Call SubtreeRoutine(BaseVtx). Suppose that it gives a T -set g(v, a), in which v = BaseVtx. Step 3: Execute one of the following four cases. Case 3.1 (g(v, a) is a T0 -set): CntT0 := CntT0 +1. Case 3.1.1 (CntT0 < MaxT0 ): Go to Step 2. Case 3.1.2 (CntT0 = MaxT0 ): Finish. Case 3.2 (g(v, a) is a T1 -set): CntT0 := CntT0 +1. Case 3.2.1 (CntT1 = 0): CntT1 := 1 and go to Step 2. Case 3.2.2 (CntT1 = 1): Finish. Case 3.3 (g(v, a) is a T2 -set): Case 3.3.1 (CntT1 = 0): Finish. Case 3.3.2 (CntT1 = 1): Let u1 ∈ g(v, a) be the vertex arriving at BaseVtx and let u2 ∈ g(v, a) be the vertex which first arrived at u1 . g(v, a) is a T2 -set and hence u2 exists (Fig. 2). BaseVtx := u2 . If Count = MaxT1 , then finish. Otherwise, Count := Count+1 and go to Step 1. Case 3.4 (g(v, a) is a T3 -set): Finish. ON must select v1 . Thus, when SubtreeRoutine is called with BaseVtx = v1 in Step 2, this subroutine executes Case T3.2 for the first execution of Step T3. Now we analyze the routine. In Case 3.3.2, a new base vertex is set and the value of Count increases. Let y be the value of Count when the routine finishes. Then, if the routine finishes in Case 3.1.2, 3.2.2, 3.3.1, or 3.4, then y <MaxT1 and there exist y base vertices. Otherwise, that is, if it finishes in Case 3.3.2, then y =MaxT1 and there exist y + 1 base vertices. Let us evaluate the costs for the z-th base vertex v and T -sets of v. (1): First, suppose that z ∈ [1, y − 1]. Vertices composing T -sets of v are as follows: at most two vertices in a T -set g(v, a), which is a T2 -set, constructed immediately before the execution of 7 Count+1 Count T2 -set T1-set T1 -set v u1 T0 -set u2 Figure 2: Execution example of Case 3.2.2. v is a base vertex when Case 3.2.2 is executed. SubtreeRoutine is executed with v and constructs a T2 -set g(v, a). Since u2 is set to be a new base vertex in Case 3.3.2, the original T2 -set is divided into one T1 -set g(v, a) whose length is one and one T0 -set g(u2 , 1). Thus, if v is the Count-th base vertex, then u2 is the Count+1-st base vertex. Also, u1 becomes a T -set of v and all the descendants of u2 become a T0 -set of u2 . Case 3.3.2, and all the vertices in T -sets constructed at the executions of Cases 3.1.1 and 3.2.1 before the execution of Case 3.3.2. Cases 3.1.1 and 3.2.1 are executed at least zero times and once, respectively. In Case 3.3.2, the routine sets a vertex u2 in g(v, a) to be a new base vertex. The original T -set g(v, a) is divided into two T -sets: a T1 -set g(v, a) of u1 (u′1 , if any) and a T0 -set g(u2 , 1) of the rest of the vertices in the original g(v, a) (see Fig. 2). ON must select the first revealed vertex v1 and also selects u2 by the definition of T2 -sets. Hence, ON selects all base vertices. By organizing the above argument, T -sets of v are as follows: one T0 -set is constructed every time Case 3.1.1 is executed, one T1 -set is constructed when Case 3.2.1 is executed, and one T1 -set is constructed when Case 3.3.2 is executed. That is, v has two T1 -sets and x − 2(≥ 0) T0 -sets. Thus, by the argument about the costs of T -sets, which were discussed before the routine, the total cost for these T -sets and v is as follows: Suppose that the lengths of the two T1 -sets are t1 and t2 , respectively and those of the x − 2 T0 -sets are t3 , t4 , . . . , tx , respectively. Then, the cost of ON is Px i=1 ti + 1, in which the second term follows from the base vertex v. On the other hand, the total cost of OF F for the two T1 -sets and v is (t1 + 2)/3 + (t2 − 1)/3 (v is selected only once and the P former term is greater than the latter by one). The cost for x T0 -sets is xi=3 ti /3. Hence, the total Px cost of OF F for these T -sets is ( i=1 ti + 1)/3. (2): Next, suppose that z = y. We consider the cases finishing the routine: Cases 3.1.2, 3.2.2, 3.3.1, 3.3.2, and 3.4. (2-1) Case 3.2.2: CntT1 used in the routine denotes the number of T1 -sets of v, and thus v has two T1 -sets when the routine finished in Case 3.2.2. The routine can execute Case 3.1.1 several times before the finish. Moreover, as mentioned in (1), if z ≥ 2, the routine executes Case 3.2.2 when z = y − 1, and one T0 -set of v, which is called u2 in Case 3.2.2, is constructed. By the above argument, v has two T1 -sets and can have several T0 -sets. Therefore, the cost for theses T -sets and v is obtained in the same way as that in (1). (2-2) Case 3.3.1: v has one T2 -set and several T0 -sets similarly to (2-1). Suppose that the length of the T2 -set is t1 and those of the x − 1(≥ 0) T0 -sets are t2 , . . . , tx , respectively. Then, the cost P of ON is xi=1 ti + 1. On the other hand, the cost of OF F for v and the T2 -set is (t1 + 1)/3, and P P that for the x − 1 T0 -sets is xi=3 ti /3. Hence, the cost of OF F is ( xi=1 ti + 1)/3. (2-3) Case 3.4: v has two T3 -sets and x − 1(≥ 0) T0 -sets. In addition, v has one T1 -set when CntT1 = 1 at the finish of the routine (CntT1 is set to be zero or one). First, we consider the case 8 in which there does not exist such T1 -set, that is, CntT1 = 0 at the finish of the routine. Suppose that the length of the T3 -set is t1 (= MaxLength) and those of the x − 1 T0 -sets are t2 , . . . , tx , P P respectively. Then, the cost of ON is 1 + t1 − 1 + xi=2 ti = xi=1 ti . The cost of OF F is at most P (t1 + 1)/3 + xi=2 ti /3, in which +1 follows from v. Next, we consider the case in which there exists one T1 -set. Suppose that the length of the T1 -set is t0 . Then, the costs of ON and OF F are Px Px i=0 ti and at most (t1 + 1)/3 + i=2 ti /3 + (t0 − 1)/3, respectively. (2-4) Case 3.1.2: v has MaxT0 T0 -sets. Also, v has one T1 -set if CntT1 = 1 at the finish of the routine. We consider the case in which CntT1 = 0 at the finish. Suppose that x = MaxT0 and the P lengths of the x T0 -sets are t1 , . . . , tx , respectively. Then, the costs of ON and OF F are xi=1 ti + 1 Px and at most i=1 ti /3 + 1, respectively. We next consider the case in which CntT1 = 1 at the finish. P Suppose that the length of the T1 -set is t0 . Then, the costs of ON and OF F are xi=0 ti + 1 and P at most xi=1 ti /3 + 1 + (t0 − 1)/3, respectively. (2-5) Case 3.3.2: As mentioned in (1), v has two T1 -sets and can have several T0 -sets. The costs of ON and OF F for this case are obtained in the same way as those in (1) and (2-1). Moreover, we must consider the z + 1 = y + 1-st base vertex u2 and its T -sets. u2 has one T0 -set. Then, the costs of ON and OF F are obtained in the same way as those in (2-4). However, u2 has just one T0 -set. The cost ratio of ON to OF F for u2 and its T -sets can be quite smaller than three. However, note that there exist MaxT1 base vertices with two T1 -sets, and MaxT1 is a sufficiently large integer. Now, we are ready to evaluate the competitive ratio of ON . As mentioned above, the routine executes Case 3.3.2 y − 1 times and finishes in Case 3.1.2, 3.2.2, 3.3.1, 3.3.2 or 3.4. If it finishes in Case 3.1.2, 3.2.2, 3.3.1 or 3.4, then there exist y base vertices. Otherwise, that is, if it finished in Case 3.3.2, then there exist y + 1 base vertices. By the above argument, we obtain the following results. (2-1) Case 3.2.2: CON (σ)/COF F (σ) = 3. (2-2) Case 3.3.1: CON (σ)/COF F (σ) = 3. (2-3) Case 3.4: CON (σ)/COF F (σ) = 3−ǫ, in which ǫ > 0 approaches zero as the value MaxLength in the subroutine becomes sufficiently large. (2-4) Case 3.1.2: CON (σ)/COF F (σ) = 3 − ǫ′ , in which ǫ′ > 0 approaches zero as the value MaxT0 in the routine becomes sufficiently large. (2-5) Case 3.3.2: CON (σ)/COF F (σ) = 3 − ǫ′′ , in which ǫ′′ > 0 approaches zero as the value MaxT1 in the routine becomes sufficiently large. We have shown that the statement of the theorem is true. 4 4.1 Randomized Upper Bound Algorithm First, we define our algorithm RA. Before the first vertex is revealed, RA chooses to start running one of two deterministic online algorithms A and B, which are defined later, with the probability of 1/2 and thereafter keeps running it up to the end of the input. For a vertex v, p(v) denotes the length of the simple path from v1 to v. Roughly speaking, the difference between A and B is that for a vertex v, A selects v if p(v) is odd, and B selects v if p(v) is even. Then, A and B try to establish the property that for any vertex u of degree at most two, u ∈ / DA ∩ DB . A (B) can select a vertex which A (B) selected previously in the following definition. It means that A (B) does nothing at that time. First, we give the definition of A as follows. 9 Algorithm A Suppose that the i-th vertex vi is revealed. Case 1 (i = 1): Select v1 . Case 2 (i ≥ 2): Suppose that vi arrives at a vertex u. Case 2.1 (deg vi (u) ≥ 3): Select u. Case 2.2 (deg vi (u) ≤ 2): Case 2.2.1 (p(vi) modulo 2 = 0): Select u. Case 2.2.2 (p(vi) modulo 2 = 1): Select vi . Since A selects either a revealed vertex vi or the vertex adjacent to vi , the set of vertices selected by A is a dominating set of a revealed graph immediately after each of A’s selections. The definition of B is quite the same as that of A except for Case 2.2. The process of B in Case 2.2.1 (2.2.2) is the same as that of A in Case 2.2.2 (2.2.1). Thus, the set of vertices selected by B is also a dominating set at any time. Algorithm B Suppose that the i-th vertex vi is revealed. Case 1 (i = 1): Select v1 . Case 2 (i ≥ 2): Suppose that vi arrives at a vertex u. Case 2.1 (deg vi (u) ≥ 3): Select u. Case 2.2 (deg vi (u) ≤ 2): Case 2.2.1 (p(vi) modulo 2 = 0): Select vi . Case 2.2.2 (p(vi) modulo 2 = 1): Select u. 4.2 Basic Properties of RA In this section, we show several basic properties of dominating sets by A and B. Lemma 4.1 The following properties hold for a vertex v: (1) If v = v1 , v ∈ DA and v ∈ DB . Suppose that v 6= v1 . (2) If deg(v) ≥ 3, v ∈ DA and v ∈ DB . (3) Suppose that deg(v) = 2. (3-e) If p(v) modulo 2 = 0, v ∈ / DA and v ∈ DB . (3-o) If p(v) modulo 2 = 1, v ∈ DA and v ∈ / DB . (4) Suppose that deg(v) = 1 and let ũ be the vertex adjacent to v. (4-1) Suppose that deg(ũ) ≥ 3 and deg v (ũ) ≤ 2. (4-1-e) If p(v) modulo 2 = 0, v ∈ / DA and v ∈ DB . (4-1-o) If p(v) modulo 2 = 1, v ∈ DA and v ∈ / DB . (4-2) If deg(ũ) ≥ 3 and deg v (ũ) ≥ 3, then v ∈ / DA and v ∈ / DB . (4-3) Suppose that deg(ũ) ≤ 2. (4-3-e) If p(v) modulo 2 = 0, v ∈ / DA and v ∈ DB . (4-3-o) If p(v) modulo 2 = 1, v ∈ DA and v ∈ / DB . Proof. To show each property in the statement of this lemma, we prove the following properties 10 for each j ≤ i by induction on the number i of revealed vertices. Note that if we have proven them, then each property in the statement is satisfied when i is the number of the vertices of the tree in an input, that is, vi is the final revealed vertex. (1) If j = 1, v1 ∈ DA (vi ) and v1 ∈ DB (vi ). Suppose that j ≥ 2. (2) If deg vi (vj ) ≥ 3, vj ∈ DA (vi ) and vj ∈ DB (vi ). (3) Suppose that deg vi (vj ) = 2. (3-e) If p(vj ) modulo 2 = 0, vj ∈ / DA (vi ) and vj ∈ DB (vi ). (3-o) If p(vj ) modulo 2 = 1, vj ∈ DA (vi ) and vj ∈ / DB (vi ). (4) Suppose that deg vi (vj ) = 1. Let vj be the vertex adjacent to û. (4-1) Suppose that deg vi (û) ≥ 3 and deg vj (û) ≤ 2. (4-1-e) If p(vj ) modulo 2 = 0, vj ∈ / DA (vi ) and vj ∈ DB (vi ). (4-1-o) If p(vj ) modulo 2 = 1, vj ∈ DA (vi ) and vj ∈ / DB (vi ). (4-2) If deg vi (û) ≥ 3 and deg vj (û) ≥ 3, vj ∈ / DA (vi ) and vj ∈ / DB (vi ). (4-3) Suppose that deg vi (û) ≤ 2. (4-3-e) If p(vj ) modulo 2 = 0, vj ∈ / DA (vi ) and vj ∈ DB (vi ). (4-3-o) If p(vj ) modulo 2 = 1, vj ∈ DA (vi ) and vj ∈ / DB (vi ). If i = 1, v1 is revealed. Both A and B execute Case 1 and select v1 . Thus, v1 satisfies (1). We assume that the above properties are satisfied when i ≤ m − 1 (m ≥ 2), that is, before vm is revealed, and we show that they are also satisfied when i = m, that is, immediately after vm is revealed. Each of the above properties depends on the degrees of revealed vertices. When vm is revealed, only the degree of an adjacent vertex u to vm changes. Hence, all the revealed vertices except for u and vertices adjacent to u also satisfy the above properties when i = m by the induction hypothesis. Then, we in what follows show that u and a vertex adjacent to u including vm satisfy the properties. Note that the degree of u may affect an adjacent vertex u′′ (6= vm ) at only the case (4) of the above properties, that is, the case in which u′′ 6= v1 and the degree of u′′ is one. Hence, u′′ also satisfies the above properties when i = m in the other cases by the induction hypothesis. First, we consider the case in which u 6= v1 . Note that deg vm (u) ≥ 2. Suppose that deg vm (u) ≥ 4. When vm is revealed, both A and B execute Case 2.1 and select u. That is, u ∈ DA (vm ) and u ∈ DB (vm ). Thus, u satisfies the property (2) because deg vm (u) ≥ 3. On the other hand, A and B do nothing for vm , and thus vm ∈ / DA (vm ) and vm ∈ / DB (vm ). Then, ′′ deg vm (vm ) = 1 and vm satisfies (4-2). Since the degree of u is one as mentioned above, u′′ satisfies one of the properties (4-1) and (4-2) before vm is revealed by the induction hypothesis. Analogously to vm , A and B do nothing u′′ , and vm keeps (4-1) or (4-2). Suppose that deg vm (u) = 3. In this case, A and B execute Case 2.1, and u ∈ DA (vm ) and u ∈ DB (vm ). Similarly to the case in which deg vm (u) ≥ 4, u and vm satisfy (2) and (4-2), respectively. Let us consider u′′ next. Since the degree of u′′ is one and u′′ is not v1 , deg u′′ (u) ≤ 2. Suppose that p(vm ) modulo 2 = 0. u′′ ∈ / DA (vm−1 ) and u′′ ∈ DB (vm−1 ) by (4-3-e) in the induction hypothesis. When vm is revealed, A and B do nothing for u′′ . Thus, u′′ ∈ / DA (vm ) and u′′ ∈ DB (vm ), ′′ ′′ which means that u satisfies (4-1-e) since deg vm (u) = 3 and deg vm (u ) = 1. If p(vm ) modulo 2 = 1, we can show that u′′ satisfies (4-1-o) similarly. Suppose that deg vm (u) = 2. Thus, deg vm−1 (u) = 1. We discuss u′′ in advance. u′′ is revealed before u by the condition of this case because u is not v1 . However, the degree of u′′ is one, which contradicts that u′′ is not v1 . Hence, there does not exist u′′ in this case. Let u′ (6= vm ) be a vertex adjacent to u. Suppose that deg vm (u′ ) ≤ 2 and p(vm ) modulo 2 = 0. A and B execute Case 2.2.1 by definition when vm is revealed. Hence, A and B select u and vm , respectively, which indicates 11 that vm ∈ / DA (vm ), vm ∈ DB (vm ) and u ∈ DA (vm ). Also, p(u) modulo 2 = 1 because p(vm ) modulo 2 = 0. Hence, u ∈ / DB (vm ) by (4-3-o) in the induction hypothesis. Thus, u ∈ / DB (vm ). Then, vm satisfies (4-3-e) since deg vm (vm ) = 1. In addition, u satisfies (3-o) since deg vm (u) = 2. The case in which deg vm (u′ ) ≤ 2 and p(vm ) modulo 2 = 1 can be shown similarly. Roughly speaking, A and B execute Case 2.2.2 in this case, and vm and u satisfy (4-3-o) and (3-e), respectively. Suppose that deg vm (u) = 2, deg vm (u′ ) ≥ 3 and deg u (u′ ) ≥ 3. Also, suppose that p(vm ) modulo 2 = 0. Both A and B execute Case 2.2.1 and A and B select u and vm , respectively, when vm is revealed. Thus, vm ∈ / DA (vm ), vm ∈ DB (vm ) and u ∈ DA (vm ). Since deg u (u′ ) ≥ 3, u ∈ / DB (vm−1 ) by (4-2) in the induction hypothesis, which directly implies that u ∈ / DB (vm ). Hence, vm satisfies (4-3-e) because deg vm (vm ) = 1. u satisfies (3-o) because deg vm (u) = 2. We can prove the case in which p(vm ) modulo 2 = 1, similarly, and hence we omit it. Suppose that deg vm (u) = 2, deg vm (u′ ) ≥ 3 and deg u (u′ ) ≤ 2. Then, A and B execute Case 2.2.1. Moreover, u ∈ / DB (vm−1 ) by (4-1-o) in the induction hypothesis if p(vm ) modulo 2 = 0. We omit the proof of this case because the situation in this case is quite the same as that in the case in which deg u (u′ ) ≥ 3 and p(vm ) modulo 2 = 0. In addition, the case in which p(vm ) modulo 2 = 1 can be proven in the same way as the case in which deg u (u′ ) ≥ 3 and p(vm ) modulo 2 = 1. Suppose that u = v1 . u ∈ DA (vm−1 ) and u ∈ DB (vm−1 ) by (1) in the induction hypothesis. Thus, u ∈ DA (vm ) and u ∈ DB (vm ), which means that u satisfies (1). We omit the proof with respect to vm because it can be shown in the same way as the case of u 6= vm . Finally, let us discuss u′′ . If deg vm (u) 6= 2, we can show the proof in the same way as that in the case in which u 6= vm . Then, we consider the case in which deg vm (u) = 2. That is, deg vm−1 (u) = 1. Since the degree of u′′ is one, both u′′ ∈ DA (vm−1 ) and u′′ ∈ / DB (vm−1 ) by (4-3-o) in the induction hypothesis. Also, A and B execute Case 2.2.2 when vm is revealed, and they do not select u′′ . Thus, u′′ ∈ DA (vm ) and u′′ ∈ / DB (vm ). Therefore, u′′ satisfies (4-3-o) immediately after the revelation of vm . Lemma 4.2 The expected cost of RA for v is as follows: (1) If v = v1 , it is one. Suppose that v 6= v1 . (2) If deg(v) ≥ 3, it is one. (3) If deg(v) = 2, it is 1/2. (4) Suppose that deg(v) = 1 and v is adjacent to a vertex u. (4-1) If deg(u) ≥ 3 and deg v (u) ≤ 2, it is 1/2. (4-2) If deg(u) ≥ 3 and deg v (u) ≥ 3, it is zero. (4-3) If deg(u) ≤ 2, it is 1/2. Proof. RA chooses A (B) with the probability 1/2 at the beginning. Thus, the expected cost of RA for a vertex v is 1/2 if either v ∈ / DA and v ∈ DB or v ∈ DA and v ∈ / DB . It is easy to see that the expected cost for v is one if both v ∈ DA and v ∈ DB . Also, the expected cost for v is zero if both v ∈ / DA and v ∈ / DB . The above argument with each property in Lemma 4.1 gives each cost in the statement of this lemma. This lemma shows that we only have to consider an input satisfying the properties from (P1) to (P7) to evaluate the competitive ratio of RA. It is easy to see that if (P7) holds, both (P2) and (P6) clearly hold. However, we must prove some lemmas including ones about the both properties before showing (P7). 12 To prove the above lemma and the following lemmas, we give a few definitions about transformations of an input. First, we “divide” an input into two inputs. For an input σ = (V, E, S) and a vertex v ∈ V , we define the input f1 (σ, v) = (V1 , E1 , S1 ) such that V1 = V \ U , in which U is the set of v and all the descendants of v, E1 = {{u, u′ } ∈ E | u, u′ ∈ V1 }. That is, (V1 , E1 ) is the subgraph of (V, E) induced by V1 , and S1 is the subsequence of S consisting of all the vertices of V1 (Fig. 3). Also, we define the input f2 (σ, v) = (U, E2 , S2 ) such that E2 = {{u, u′ } ∈ E | u, u′ ∈ U }, that is, (U, E2 ) is the subgraph of (V, E) induced by U , and S2 is the subsequence of S consisting of all the vertices of U . Moreover, we “connect” two inputs. For an input σ ′ = (V ′ , E ′ , S ′ ), a vertex v ′ ∈ V ′ and an input σ ′′ = (V ′′ , E ′′ , S ′′ ), we define f3 (σ ′ , v ′ , σ ′′ ) = (V3 , E3 , S3 ) such that V3 = V ′ ∪ V ′′ , E3 = E ′ ∪ E ′′ ∪ {{v ′ , u′′1 }}, in which u′′i is the i(∈ [1, n′′ ])-th vertex in S ′′ and n′′ is the number of vertices in S ′′ , and S3 = (u′1 , . . . , u′n′ , u′′1 , . . . , u′′n′′ ), in which n′ is the number of vertices in S ′ and u′i is the i(∈ [1, n′ ])-th vertex in S ′ . ƒÐ f3(ƒÐ,v,ƒ ' ' Ð'') 1 f1(ƒÐ,v) v1 ƒÐ' f2(ƒÐ,v) v ƒÐ'' v1 v' u Figure 3: “Dividing” and “connecting” inputs. The left figure shows that we construct the two inputs f1 (σ, v) and f2 (σ, v) in terms of a vertex v from an input σ. The right figure shows that we obtain the input f3 (σ ′ , v ′ , σ ′′ ) by adding an input σ ′′ to an input σ ′ in terms of a vertex v ′ in σ ′ . u was the first revealed vertex v1 in σ ′′ . Lemma 4.3 Suppose that the vertex set of an input σ contains two vertices v and u such that the edge (v, u) is free. Then, there exists OP T such that DOP T (f1 (σ, u)) ∪ DOP T (f2 (σ, u)) = DOP T (σ). Proof. Suppose that the vertex set of an input σ contains two vertices v and u such that the edge (v, u) is free. We consider an offline algorithm OF F for the input f1 (σ, u) and input f2 (σ, u) which selects the same vertices as those selected by OP T for σ. That is, DOF F (f1 (σ, u)) ∪ DOF F (f2 (σ, u)) = DOP T (σ), and hence, COF F (f1 (σ, u)) + COF F (f2 (σ, u)) = COP T (σ). (1) We prove that OF F is optimal by contradiction. We assume that OF F is not optimal, that is, there exists an offline algorithm OP T ′ such that COP T ′ (f1 (σ, u)) + COP T ′ (f2 (σ, u)) < COF F (f1 (σ, u)) + COF F (f2 (σ, u)). (2) By the definitions of f1 (σ, u) and f2 (σ, u), DOP T ′ (f1 (σ, u)) ∪ DOP T ′ (f2 (σ, u)) is a dominating set of the graph of σ. However, the size of this set is smaller than that of DOP T (σ) by Eqs. (1) and (2), which contradicts the optimality of OP T . Therefore, OF F is optimal. Lemma 4.4 Suppose that the graph in an input σ contains a vertex v and OP T selects v. Then, there exists OP T such that DOP T (f3 (σ, v, σ̂)) = DOP T (σ), in which σ̂ = ({u}, ∅, u) and u is a vertex not in the vertex set of the graph in σ. 13 Proof. We prove this lemma in a similar way to the proof of Lemma 4.3. Suppose that the graph in the vertex set of the graph in an input σ contains a vertex v and OP T selects v. Let σ̂ = ({u}, ∅, u), in which u is a vertex not in the graph in σ. We consider an offline algorithm OF F for the input f3 (σ, v, σ̂) which selects the same vertices as those selected by OP T . That is, DOF F (f3 (σ, v, σ̂)) = DOP T (σ), and hence, COF F (f3 (σ, v, σ̂)) = COP T (σ). (3) We prove that OF F is optimal by contradiction. We assume that OF F is not optimal, that is, there exists an offline algorithm OP T ′ such that COP T ′ (f3 (σ, v, σ̂)) < COF F (f3 (σ, v, σ̂)). (4) If OP T ′ does not select u for f3 (σ, v, σ̂), DOP T ′ (f3 (σ, v, σ̂)) is a dominating set of the graph in σ. The size of this set is smaller than that of DOP T (σ) by Eqs. (3) and (4), which contradicts the optimality of OP T . Next, we consider the case in which OP T ′ selects u. Suppose that OP T ′ selects v instead of u. Then, the vertex set is also a dominating set of the graph in f3 (σ, v, σ̂). Moreover, it is also a dominating set of the graph in σ. Hence, the size of this set is smaller than that of DOP T (σ) by Eqs. (3) and (4). This fact contradicts the optimality of OP T , and thus OF F is optimal. Lemma 4.5 Suppose that the graph of an input σ contains at least one free edge which is not fixed. Then, there exits an input σ ′ such that (a) any free edge in the graph of σ ′ is fixed, that is (P1) E[CRA (σ′ )] RA (σ)] holds, and (b) E[C COP T (σ) ≤ COP T (σ′ ) . Proof. Suppose that the graph in an input σ contains at least one free edge which is not fixed. To prove the lemma, we will prove that we can construct an input σ ′′ satisfying the following two properties from σ: (1) the number of free edges which are not fixed in the graph of σ ′′ is less than E[CRA (σ′′ )] RA (σ)] ′′ that in the graph of σ, and (2) E[C COP T (σ) ≤ COP T (σ′′ ) . Proving the existence of such σ means that we can construct an input satisfying the conditions (a) and (b) in the statement of this lemma recursively. Let (v, u) be a free edge which is not fixed of the graph in σ. Define σ1 = f1 (σ, u) and σ2 = f2 (σ, u). By Lemma 4.3, DOP T (σ1 ) ∪ DOP T (σ2 ) = DOP T (σ). (5) Thus, if an edge of the graph in σ1 is free (not free), then that in σ is also free (not free). Also, if a free edge of the graph in σ1 is fixed (not fixed), then that in σ is also fixed (not fixed). This fact is also true with edges in σ2 . We remove the edge (v, u) when constructing σ1 and σ2 , and hence the number of free edges which are not fixed in σ1 (σ2 ) is less than that in σ by at least one, which implies that σ1 and σ2 satisfy the property (1) described above. In what follows, we prove the property (2). By Eq. (5), with respect to the costs of OP T for σ1 and σ2 , COP T (σ1 ) + COP T (σ2 ) = COP T (σ). (6) Next, we evaluate the expected cost of RA using Lemma 4.2. The expected cost of RA for a vertex depends on its degree and the degree of an adjacent vertex, and thus vertices for which the difference between the expected costs in σ and σ1 (σ2 ) can arise are only v, u and their adjacent 14 vertices. First, we discuss the expected cost for a vertex v ′′ (6= u) adjacent to v. In σ, if deg(v) ≥ 3, deg(v ′′ ) = 1, deg v′ (v) = 3 and deg u (v) = 2, then the expected cost for v ′′ in σ is zero. Also, the expected cost for v ′′ in σ1 is 1/2 because deg u (v) = 2. Otherwise, the expected cost for v ′′ does not change. Thus, the expected cost for v ′′ does not decrease. In a similar way to the expected cost for v ′′ , that for a vertex adjacent to u in σ2 does not decrease. Next, we evaluate the cost for v. If v = v1 , the expected cost for v is one in either σ or σ1 . That is, it does not change. In the rest of the proof, we consider the case in which v 6= v1 . deg(v) ≥ 2 in σ holds, and then let v ′ (6= u) be the vertex adjacent to v. We consider the case in which deg(v) = 2 in σ, that is, the degree of v in σ1 turns one. The expected cost for v in σ is 1/2. In σ, if either deg(v ′ ) ≤ 2 or deg(v ′ ) ≥ 3 and deg v (v ′ ) ≤ 2, then the expected cost for v in σ1 remains 1/2. If deg(v ′ ) ≥ 3 and deg v (v ′ ) ≥ 3, then the expected cost in σ1 becomes zero, that is, it decreases by 1/2. In the case in which deg(v) = 3 in σ, the expected cost for v in σ is one. Since deg(v) = 2 in σ1 , the expected cost for v is 1/2 and decreases by 1/2. In the case in which deg(v) ≥ 4 in σ, the expected cost for v in σ is one. deg(v) ≥ 3 in σ1 as well, and the expected cost for v remains one. Next, we evaluate the cost for u. By definition, u is the first revealed vertex in σ2 , and thus the expected cost for u in σ2 is one. We discuss the cost for u in σ. If deg(u) ≤ 2 in σ, then the expected cost is at most 1/2, which means that the expected cost for u increases by at least 1/2 in σ2 . If deg(u) ≥ 3 in σ, then the expected cost is one, which means that the expected cost for u does not change. By the above argument, the case in which E[CRA (σ)] > E[CRA (σ1 )] + E[CRA (σ2 )] can hold is only the case in which the expected cost for v decreases by 1/2 and that for u does not change, that is, the case in which (v, u) is fixed. Thus, if (v, u) is not fixed, E[CRA (σ)] ≤ E[CRA (σ1 )] + E[CRA (σ2 )]. This inequality together with Eq. (6) shows E[CRA (σ)] COP T (σ) E[CRA (σ1 )] + E[CRA (σ2 )] COP T (σ1 ) + COP T (σ2 )   E[CRA (σ1 )] E[CRA (σ2 )] ≤ max , , COP T (σ1 ) COP T (σ2 ) ≤ which proves that either σ1 or σ2 satisfies the property (2) described above. Lemma 4.6 Suppose that an input σ satisfies the following conditions: (i) the graph in σ contains at least one vertex of degree at least four, and (ii) (P1) holds. Then, there exists an input σ ′ such that (a) the degree of any vertex of the graph in σ ′ is at E[CRA (σ′ )] RA (σ)] most three, that is, (P2) holds, and (b) E[C COP T (σ) ≤ COP T (σ′ ) . Proof. We prove this lemma in a similar way to the proof of Lemma 4.5. Suppose that an input σ satisfies the conditions (i) and (ii) in the statement. Let v and u be vertices in σ such that u arrives at v, deg(v) ≥ 4, deg u (v) = deg(v) and the degrees of all the descendants of u are at most 15 three. To prove the lemma, we will prove that we can construct an input σ ′′ satisfying the following two properties from σ: (1) all the vertices of the graph T ′′ in σ ′′ are in the vertices of the graph T in σ, the degree of each vertex except for v of T ′′ is equal to that of T , the degree of v in T ′′ is less E[CRA (σ′′ )] RA (σ)] than that of T , and (2) E[C COP T (σ) ≤ COP T (σ′′ ) . We can construct an input satisfying the properties (a) and (b) in the statement recursively by proving the existence of σ ′′ . In what follows, we discuss such input σ ′′ for each of the following three cases: (Case 1) OP T selects u and only u dominates v, (Case 2) OP T selects v and only v dominates u, and (Case 3) the other cases. (Case 1): OP T does not select v by the condition of this case. Since deg(v) ≥ 4, there exists another vertex u′ (6= u) arriving at v. u′ does not dominate v by the condition of this case, and OP T selects a descendant of u′ to dominate u′ . Thus, the edge (v, u′ ) is free. deg(v) ≥ 4 by the definition of v, and hence (v, u′ ) is not fixed, which contradicts that σ satisfies the property (P1) by the condition (ii) in the statement of the lemma. Therefore, this case does not happen. (Case 2): Let U be the set of vertices consisting of u and all the descendants of u, and let U ′ be the set of vertices of all the descendants of v except for U . We consider the following two cases: (Case 2-1) the degree of any vertex selected by OP T in U ′ is three, and (Case 2-2) the other case, that is, there exists at least one vertex selected by OP T in U ′ whose degree is at most two. Define σ1 = f1 (σ, u) and σ2 = f2 (σ, u). (Case 2-1): There exist vertices v ′ , u′ ∈ U ′ by the conditions of Cases 2 and 2-1 such that deg(v ′ ) = 3, u′ arrives at v ′ , deg u′ (v ′ ) = 3, deg(u′ ) = 1 and OP T selects v ′ . Here, we construct the input σ1′ by removing u′ from σ1 , and obtain the input σ3 by adding σ2 to σ1′ in terms of v ′ . Formally, define σ1′ = f1 (σ1 , u′ ), σ2 = f2 (σ, u), and σ3 = f3 (σ1′ , v ′ , σ2 ) (see Fig. 4). Then, σ3 satisfies the above property (1). To show that the property (2) is satisfied, we first evaluate the cost of OP T for σ3 . Let OF F be an offline algorithm for σ3 which selects the same vertices as those selected by OP T for σ, that is, DOF F (σ3 ) = DOP T (σ). Then, DOP T (σ) is a dominating set of the graph in σ3 by the definition of σ3 . Thus, COF F (σ3 ) = COP T (σ). (7) We next consider the expected cost of RA using Lemma 4.2. The degree of each vertex except for v in σ3 is equal to that in σ. The above input transformations do not affect the expected costs for vertices except for v, v ′ and their adjacent vertices. The expected cost for v does not change because deg(v) ≥ 3 before and after the transformations. Also, deg u (v) = deg(v) ≥ 3 in σ and deg u (v ′ ) = deg(v ′ ) = 3 in σ3 . Thus, the expected cost for u does not change, either. The expected cost for u′ is zero because deg u′ (v ′ ) = 3 in σ. Moreover, the transformations do not affect the expected costs of all the vertices adjacent to either v or v ′ except for u and u′ . Hence, E[CRA (σ3 )] = E[CRA (σ)]. By this equality and Eq. (7), E[CRA (σ)] E[CRA (σ3 )] E[CRA (σ3 )] = ≤ , COP T (σ) COF F (σ3 ) COP T (σ3 ) which implies that σ3 satisfies the property (2). (Case 2-2): Let v ′′ ∈ U ′ be a vertex selected by OP T of degree at most two. Then, define σ3′ = f3 (σ1 , v ′′ , σ2 ), which satisfies the property (1). Let us consider the cost of OP T for σ3′ . In the same way as Case 2-1, let OF F be an offline algorithm which selects all the vertices in DOP T (σ). DOP T (σ) is a dominating set of the graph in 16 σ3 by the definition of σ3′ . Thus, COF F (σ3′ ) = COP T (σ). (8) We consider the expected cost of RA. The degrees of all the vertices except for v and v ′′ do not change. The expected costs for all the vertices except for v ′′ do not change by the same argument in Case 2-1. Since the degree of v ′′ is at least two, the expected cost for v ′′ does not decrease. Hence, E[CRA (σ3′ )] ≥ E[CRA (σ3 )]. By this inequality and Eq. (8), E[CRA (σ3′ )] E[CRA (σ3′ )] E[CRA (σ)] ≤ ≤ . COP T (σ) COF F (σ3′ ) COP T (σ3′ ) Thus, σ3′ satisfies the property (2). (Case 3): (v, u) is free because v (u) is dominated by a vertex which is not u (v). deg(v) ≥ 4, and thus (v, u) is not fixed, which contradicts that σ satisfies (P1) by the condition (ii). ƒÐ ƒÐ2 ƒÐ3 ƒÐ1 v u ƒÐ'1 ƒÐ2 v v' u' v' u Figure 4: Input transformation from σ to σ3 . Lemma 4.7 Suppose that an input σ satisfies the following conditions: (i) the graph in σ contains at least one free edge which is not fixed, and (ii) (P2) holds. Then, there exists an input σ ′ such that (a) (P1) and (P2) hold, and (b) E[CRA (σ)] COP T (σ) ≤ E[CRA (σ′ )] COP T (σ′ ) . Proof. In the same way as the proof of Lemma 4.5, we can obtain an input satisfying the property (b) and (P1) in the property (a) in the statement by constructing the two inputs recursively from an input satisfying the conditions (i) and (ii). The degree of any vertex in a newly constructed input does not increase by the definitions of f1 and f2 . Thus, the degree is at most three by (P2) in the condition (ii), which means that this input also satisfies (P2) in (a). Lemma 4.8 Suppose that an input σ satisfies the following conditions: (i) OP T selects at least one vertex of degree at most two, and (ii) (P1) and (P2) hold. Then, there exists an input σ ′ such that (a) the degree of any vertex selected by OP T is three, E[CRA (σ′ )] RA (σ)] that is, (P3) holds, (b) (P1) and (P2) hold, and (c) E[C COP T (σ) ≤ COP T (σ′ ) . Proof. We prove this lemma in a similar way to the proofs of the last three lemmas. Suppose that an input σ satisfies the conditions (i) and (ii) in the statement of this lemma. To prove the lemma, we will prove that we can construct an input σ3 satisfying the following three properties from σ: (1) the number of vertices selected by OP T of degree at most two of the graph in σ3 is less E[CRA (σ3 )] RA (σ)] than that in σ, (2) (P1) and (P2) hold, and (3) E[C COP T (σ) ≤ COP T (σ3 ) . We can construct an input 17 satisfying the properties (a), (b) and (c) in the statement recursively by proving the existence of σ3 . Let v be a vertex of the graph given in σ such that deg(v) ≤ 2 and OP T selects v. Roughly speaking, we obtain σ3 by connecting v with a couple of vertices of degree one so that the degree of v is three. Formally, if deg(v) = 2, we define σ3 = f3 (σ, v, σ̂), in which σ̂ = ({u}, ∅, u). If deg(v) = 1, we define σ3 = f3 (f3 (σ, v, σ̂), v, σ̂ ′ ), in which σ̂ ′ = ({u′ }, ∅, u′ ). (P2) holds in σ by the condition (ii) in the statement. Also, the input transformation by f3 does not change the degrees of the vertices except for v, and the degree of v is three in σ3 . Hence, (P2) also holds in σ3 . By Lemma 4.4, DOP T (σ3 ) = DOP T (σ). (9) The above facts shows that σ3 satisfies the property (1) described above. Also, COP T (σ3 ) = COP T (σ) by Eq. (9). Since OP T selects neither u nor u′ , neither (v, u) nor (v, u′ ) is free. That is, (P1) also holds in σ3 by the condition (ii). Hence, we have shown that σ3 satisfies the property (2). Moreover, even if a new vertex arrives, the cost of RA does not decrease, and hence E[CRA (σ3 )] ≥ E[CRA (σ)]. σ3 satisfies the property (3) by this inequality and Eq. (9). Lemma 4.9 Suppose that an input σ satisfies the following conditions: (i) there exists at least one free edge (v, u) such that OP T selects v, and (ii) (P1), (P2) and (P3) hold. Then, there exists an input σ ′ such that (a) for any free edge (v, u), OP T does not select v, E[CRA (σ′ )] RA (σ)] that is, (P4) holds, (b) (P1), (P2) and (P3) hold, and (c) E[C COP T (σ) ≤ COP T (σ′ ) . Proof. We prove this lemma similarly to the proofs of the above lemmas. Suppose that an input σ satisfies the conditions (i) and (ii) in the statement. Let (v, u) be a free edge of the graph in σ. Suppose that OP T selects v. To prove the lemma, we will prove that we can construct an input σ ′′ satisfying the following three properties from σ: (1) the number of such free edges (v, u) E[CRA (σ′′ )] RA (σ)] in σ ′′ is less than that in σ, (2) (P1), (P2) and (P3) hold, and (3) E[C COP T (σ) ≤ COP T (σ′′ ) . We can construct an input satisfying the properties (a), (b) and (c) in the statement recursively by proving the existence of σ ′′ . Define σ1 = f1 (σ, u) and σ2 = f2 (σ, u). Furthermore, we add a few vertices to these inputs in the same way as the proof of Lemma 4.8. Since σ satisfies (P3) by the condition (ii), the degree of v is three in σ. Then, define σ1′ = f3 (σ1 , v, σ̂1 ), in which σ̂1 = ({u1 }, ∅, u1 ). If OP T selects u, define σ2′ = f3 (σ2 , u, σ̂2 ), in which σ̂2 = ({u2 }, ∅, u2 ). Otherwise, define σ2′ = σ2 . After the input transformation, the degrees of v and u are at most three and the degrees of the other vertices do not change. Also, σ satisfies (P2) by the condition (ii). Thus, σ1′ (σ2′ ) also satisfies (P2). DOP T (σ1 ) ∪ DOP T (σ2 ) = DOP T (σ) by Lemma 4.3. Both DOP T (σ1′ ) = DOP T (σ1 ) and DOP T (σ2′ ) = DOP T (σ2 ) by Lemma 4.4. By the above equalities, DOP T (σ1′ ) + DOP T (σ2′ ) = DOP T (σ). (10) By this equality, each of the free edges except (v, u) is contained in either σ1′ or σ2′ . Whether these edges are fixed does not change. Also, neither (v, u1 ) nor (u, u2 ) (if any) is free. Thus, σ1′ (σ2′ ) satisfies the above property (1). These facts indicate that σ1′ (σ2′ ) satisfies (P1) because σ satisfies (P1) by the condition (ii). The degree of v in σ1′ is three. The degree of u in σ2′ is also three if 18 OP T selects u in σ. The degrees of the other vertices selected by OP T do not change. Hence, σ1′ (σ2′ ) satisfies (P3) because σ satisfies (P3) by the condition (ii). By the above argument, σ1′ (σ2′ ) satisfies the property (2). In what follows, we show E[CRA (σ)] ≤ E[CRA (σ1′ )] + E[CRA (σ2′ )]. (11) This inequality together with COP T (σ1′ ) + COP T (σ2′ ) = COP T (σ) from Eq. (10) shows that the property (3) is satisfied. We evaluate the cost of RA using Lemma 4.2. The input transformations by f1 and f2 do not affect the vertices except for v, u and adjacent vertices to either v or u. The degree of v does not change. u becomes v1 in σ2′ , for which the expected cost is one. Thus, the expected cost for u does not decrease. The expected cost for an adjacent vertex to v does not decrease by the same argument as v ′ in the proof of Lemma 4.5. The expected cost for an adjacent vertex to u does not decrease, either. Now we have shown Eq. (11). Lemma 4.10 Suppose that an input σ satisfies the following conditions: (i) the graph in σ contains at least one good vertex triplet, and (ii) the properties from (P1) to (P4) inclusive hold. Then, there exists an input σ ′ such that (a) the graph in σ ′ contains no good vertex triplets, that E[CRA (σ′ )] RA (σ)] is, (P5) holds, (b) the properties from (P1) to (P4) inclusive hold, and (c) E[C COP T (σ) ≤ COP T (σ′ ) . Proof. We prove this lemma similarly to the proofs of the above lemmas. Suppose that an input σ satisfies the conditions (i) and (ii) in the statement. To prove the lemma, we will prove that we can construct an input σ ′′ satisfying the following three properties from σ: (1) the number of good vertex triplets in the graph given in σ ′′ is less than that in σ. (2) (P1), (P2), (P3) and (P4) hold, E[CRA (σ′′ )] RA (σ)] and (3) E[C COP T (σ) ≤ COP T (σ′′ ) . We can construct an input satisfying the properties (a), (b) and (c) in the statement recursively by proving the existence of σ ′′ . The graph in σ contains a good vertex triplet of (u1 , u2 , u3 ). That is, both u1 and u3 are adjacent to u2 , and OP T selects u1 and u3 . Without loss of generality, suppose that u1 is revealed before u3 . If u2 is revealed after u1 , then the edge (u1 , u2 ) is free, which contradicts that σ satisfies (P4) by the condition (ii) because OP T selects u1 . Thus, u2 is revealed before u1 . Now, define σ1 = f1 (σ, u2 ), σ2 = f2 (σ, u2 ), σ2′ = f1 (σ2 , u3 ), and σ2′′ = f1 (σ2 , u1 ) (see Fig. 5). Let u(6= u1 , u3 ) be the vertex adjacent to u2 . Since u is dominated by a vertex except for u1 and u3 , either (u2 , u) or (u, u2 ) is free. Thus, DOP T (σ1 ) ∪ DOP T (σ2 ) = DOP T (σ) (12) by Lemma 4.3. Furthermore, (u2 , u1 ) and (u2 , u3 ) are free because OP T selects both u1 and u3 . Hence, DOP T (σ2′ ) ∪ DOP T (f2 (σ2 , u3 )) = DOP T (σ2 ) and DOP T (σ2′′ ) ∪ DOP T (f2 (σ2 , u1 )) = DOP T (σ2 ) by Lemma 4.3. Since OP T does not select u2 in σ by definition, DOP T (σ2′ )∩ DOP T (σ2′′ ) = ∅. Thus, DOP T (f2 (σ2 , u3 )) = DOP T (σ2′′ ). By these equalities, DOP T (σ2′ ) ∪ DOP T (σ2′′ ) = DOP T (σ2 ). By this equality and Eq. (12), DOP T (σ1 ) ∪ DOP T (σ2′ ) ∪ DOP T (σ2′′ ) = DOP T (σ), (13) which indicates that the above input transformations do not affect free edges except for (u2 , u1 ), (u2 , u3 ) and (u2 , u) (or (u, u2 )). Also, the number of good vertex triplets in σ1 (σ2′ , σ2′′ ) is less than 19 that in σ, and hence these inputs satisfy the property (1). Since σ satisfies the properties from (P1) through (P4) by the condition (ii), σ1 , σ2′ and σ2′′ also satisfy these properties, that is, the property (2). Finally, we show that at least one input of σ1 , σ2′ and σ2′′ satisfies the property (3). By Eq. (13), COP T (σ1 ) + COP T (σ2′ ) + COP T (σ2′′ ) = COP T (σ). (14) We evaluate the expected costs for σ1 , σ2′ and σ2′′ using Lemma 4.2. For i = 1 and 3, let Ui be the set of vertices consisting of ui and all the descendants of ui . Let U2 be the set of all the vertices except for U1 ∪ U3 in σ. For each j ∈ {1, 2, 3}, let cj be the expected cost of RA for Uj in σ. By definition, E[CRA (σ)] = c1 + c2 + c3 . (15) Note that the set of all the vertices of the graph given in σ1 is U2 \ {u2 }. The degrees of these vertices except for u do not change before and after the input transformation. Also, the expected cost for u2 (u) in σ is one (at most one). Thus, E[CRA (σ1 )] ≥ c2 − 2. (16) The degrees of all the vertices except for u2 in σ2′ are equal to those in σ, and hence their expected costs do not change. Since u2 is the first revealed vertex in σ2 , its expected cost does not decrease. Since U1 does not contain u2 , E[CRA (σ2′ )] ≥ c1 + 1. (17) In the same way, E[CRA (σ2′′ )] ≥ c3 + 1. (18) By Eqs. (15), (16), (17) and (18), E[CRA (σ1 )] + E[CRA (σ2′ )] + E[CRA (σ2′′ )] ≥ c1 + c2 + c3 = E[CRA (σ)]. The property (3) holds by this inequality and Eq. (14). u ƒÐ1 ƒÐ1 u u ƒÐ2 u1 u2 u3 ƒÐ'2 u1 u3 u2 ƒÐ'' 2 u1 u2 u2 u3 Figure 5: Construction of σ1 , σ2′ and σ2′′ from σ. Note that both σ2′ and σ2′′ contain u2 . Lemma 4.11 Consider the graph in an input satisfying the properties from (P1) to (P6) inclusive. Then, the degree of any vertex is one or three. That is, (P7) holds. Proof. Consider an input satisfying the properties from (P1) to (P6) inclusive. It suffices to prove that the degree of a vertex v in the input is not two because the degree of v is at most three by (P2). Then, we prove it by contradiction, and assume that the degree of v is two. 20 Let u be a vertex arriving at v. The edge (v, u) is not free by (P6). OP T does not select v because the degree of any vertex selected by OP T is three by (P3). Let v ′ (6= u) be the other vertex adjacent to v. If OP T selects v ′ , then (v, u) is free. Thus, OP T does not select v ′ , which means that u dominates v. If v = v1 , then the edge (v, v ′ ) is free. This edge is not fixed, which contradicts that the input satisfies (P1). If v 6= v1 , then the edge (v ′ , v) is free. This edge is not fixed since deg(v) = 2 by definition, which contradicts (P1). By the above argument, we have shown that the degree of v is not two. Lemma 4.12 Suppose that an input σ satisfies the following conditions: (i) there exists at least one free edge (v, u) such that deg(v) = 2, and (ii) the properties from (P1) to (P5) inclusive hold. Then, there exists an input σ ′ such that (a) for any free edge (v, u), deg(v) = 3, (b) the properties E[CRA (σ′ )] RA (σ)] from (P1) to (P5) inclusive hold, and (c) E[C COP T (σ) ≤ COP T (σ′ ) . Proof. We prove this lemma similarly to the proofs of the above lemmas. Suppose that an input σ satisfies the conditions (i) and (ii) in the statement. Let (v, u1 ) be a free edge of the graph in σ such that the degree of v is two and there does not exist a descendant v ′ of v such that (v ′ , v ′′ ) is free, in which a vertex v ′′ arrives at v ′ and the degree of v ′ is two. To prove the lemma, we will prove that we can construct an input σ ′′ satisfying the following three properties from σ: (1) the number of such free edges (v, u1 ) of the graph given in σ ′′ is less than that in σ. (2) the properties from E[CRA (σ′′ )] RA (σ)] (P1) to (P5) inclusive hold, and (3) E[C COP T (σ) ≤ COP T (σ′′ ) . We can construct an input satisfying the properties (a), (b) and (c) in the statement recursively by proving the existence of σ ′′ . E[CRA (σ)] RA (σ1 )] Define σ1 = f1 (σ, u1 ). We fist consider the case in which E[C COP T (σ1 ) ≥ COP T (σ) . Clearly σ1 satisfies the above property (3). DOP T (σ1 ) can be a subset of DOP T (σ) by Lemma 4.3, and thus the number of such edges (v, u1 ) in σ1 is less than that in σ by one, which indicates that the property (1) is satisfied. Furthermore, σ1 satisfies the properties from (P1) through (P5) by the condition (ii), and hence satisfies the property (2). Next we consider the case in which E[CRA (σ)] E[CRA (σ1 )] < . COP T (σ1 ) COP T (σ) (19) Define σ2 = f2 (σ, u1 ), and let σ2′ be a copy of σ2 . Specifically, define σ2′ = (U ′ , F ′ , R′ ), in which σ2 = (U, F, R), k is the number of vertices in U , U = {ui | i ∈ [1, k]}, R = (u1 , . . . , uk ), U ′ = {u′i | i ∈ [1, k]}, R′ = (u′1 , . . . , u′k ) and F ′ = {{u′i , u′j } | {ui , uj } ∈ F }. Then, define σ3 = f3 (σ, v, σ2′ ). First, we discuss vertices selected by OP T of the graph in σ3 to prove that σ3 satisfies the properties (1) and (2). Suppose that for vertices u, u′ , u′′ ∈ U , u is adjacent to u′ , u′ is adjacent to u′′ , and OP T selects u in σ. Then, OP T does not select u′ in σ because σ satisfies (P4) by the condition (ii). Also, the degree of any vertex in U is one or three by the definition of v together with Lemma 4.11. Hence, OP T does not select u′′ in σ because σ satisfies (P5) by the condition (ii). The length of a path between two different vertices selected by OP T in U is at least three when dealing with σ by these facts. Thus, any vertex in U is dominated by only one vertex in σ. Moreover, a vertex selected by OP T dominates four vertices by (P3). Thus, the way for OP T to select vertices in U is unique. That is, the vertices selected by OP T in U in σ3 are the same as those in σ (called Fact (a)). There exists OP T such that OP T selects ui if and only if OP T selects u′i by the definition of U ′ , and we use such OP T (Fact (b)). Thus, v is not dominated by only u′1 in σ3 (Fact (c)). Let U ′′ be the set of vertices except for U of the graph in σ, that is, all the vertices in f1 (σ, u1 ). The set of vertices selected by OP T in U ∪ U ′′ for σ3 is a dominating set of the graph in σ by Fact (c), which 21 together with Fact (a) and the optimality of OP T for σ shows that the vertices selected by OP T in U ′′ for σ3 can be the same as those for σ (Fact (d)). Hence, σ3 satisfies the property (1) because the degree of v in σ3 is three. Also, σ3 satisfies the properties from (P1) through (P5) because σ satisfies the properties by the condition (ii) and σ3 satisfies the property (2). Finally, we discuss the property (3). Let a and b be the expected costs of RA for U ′′ \ {v} and U , respectively, in σ. Let a′ and b′ be the costs of OP T for U ′′ \ {v} and U , respectively, in σ. Since the degree of v in σ (σ3 ) is two (three), the expected cost for v in σ (σ3 ) is 1/2 (one) by Lemma 4.2. OP T does not select v in σ by (P3) because the degree of v is two, and hence by Fact (d), OP T does not select v in σ3 , either. By these costs, and E[CRA (σ)] a + 1/2 + b = , COP T (σ) a ′ + b′ (20) a + 1 + 2b E[CRA (σ3 )] = COP T (σ3 ) a′ + 2b′ (21) by Fact (b). The expected cost of RA for U ′′ \ {v} in σ1 is equal to that in σ by Lemma 4.2, and thus E[CRA (σ1 )] ≥ a. In addition, COP T (σ1 ) = a′ by Lemma 4.3 since (v, u1 ) is free. These costs 1/2+b a for σ1 and Eqs. (19) and (20) show that aa′ < a+1/2+b a′ +b′ , which is rearranged to a′ < b′ . This inequality together with Eqs. (20) and (21) yields E[CRA (σ3 )] E[CRA (σ)] < , COP T (σ) COP T (σ3 ) which means that σ3 satisfies the property (3). Now we can show Lemma ?? using Lemmas 4.11 and 4.12. In the next section, we analyze only inputs satisfying the properties from (P1) through (P7). 4.3 Analysis of RA We assign a positive integer to each vertex of a given tree according to the below routine. We call the set of all the vertices with the same assigned value a block. All the vertices in a block are on a path of at most length three. We obtain the competitive ratio of RA by evaluating the costs of RA and OP T for each block. For a vertex v, N (v) denotes the set of vertices adjacent to v. That is, N (v) = {u | {v, u} ∈ E}, in which E is the set of all the edges of a given graph. BlockRoutine Step 1: ℓ := 0 and U := {vi | i = 1, . . . , n}, in which n is the number of all the vertices of a given graph. Step 2: ℓ := ℓ + 1. If U = ∅, then finish. Otherwise, i1 := min{i | vi ∈ U }, U := U \ {vi1 } and assign ℓ to the vertex vi1 . Step 3: If U ∩ N (vi1 ) = ∅, then go to Step 2. Otherwise, i2 := min{i | vi ∈ U ∩ N (vi1 )}, U := U \ {vi2 } and assign ℓ to the vertex vi2 . Step 4: U ′ := U ∩ {N (vi1 ) ∪ N (vi2 )}. If U ′ = ∅, then go to Step 2. Otherwise, i3 := min{i | vi ∈ U ′ }, U := U \ {vi3 }, assign ℓ to the vertex vi3 and go to Step 2. Lemma 4.13 The number of all the vertices of a given tree is at least four. 22 Proof. Clearly OP T selects at least one vertex. The degree of a vertex selected by OP T is three by (P3), and thus the number of all the vertices of a given tree is at least four. By the definition of BlockRoutine, this lemma leads to the fact that at least one vertex in a block is adjacent to a vertex in another block. Also, by (P7) in the previous section, the degree of a vertex is one or three, and hence blocks which a given graph can contain are classified into the following four categories (Fig. 6): A B1 -block is a set consisting of one vertex u1 such that deg(u1 ) = 1. The following three blocks are sets consisting of three vertices u1 , u2 and u3 . Suppose that both u1 and u3 are adjacent to u2 . A B2 -block is a set such that deg(u1 ) = 3, deg(u2 ) = 3 and deg(u3 ) = 1, a B3 -block is a set such that deg(u1 ) = 1, deg(u2 ) = 3 and deg(u3 ) = 1, and a B4 -block is a set such that deg(u1 ) = 3, deg(u2 ) = 3 and deg(u3 ) = 3. B1 B2 u1 B3 u1 u1 u3 u2 B4 u1 u3 u2 u3 u2 Figure 6: Blocks For each block, we discuss vertices selected by OP T and classify B1 , B2 , B3 and B4 into the following eleven categories (Fig. 7). Then the next lemma shows that we only have to consider six categories. u1 , u2 and u3 to classify Bi are used in the same definitions as those of u1 , u2 and u3 to define Bi . B1 -blocks are classified into two categories: A B10 -block in which OP T does not select any vertex, and a B11 -block in which OP T selects only u1 . B2 -blocks are classified into two categories: A B2010 -block in which OP T selects only u2 , and a B2110 -block in which OP T selects only u1 and u2 . B3 -blocks are not classified. OP T selects only u2 in a B3 -block. B4 -blocks are classified into six categories: A B4000 -block in which OP T selects no vertices, a 100 B4 -block in which OP T selects only u1 , a B4010 -block in which OP T selects only u2 , a B4110 -block in which OP T selects only u1 and u2 , a B4101 -block in which OP T selects only u1 and u3 , and a B4111 -block in which OP T selects all the vertices. B1 B10 B11 B2 u1 u1 B2010 B2110 B4 B3 u1 u2 u3 u1 u2 u3 u1 u2 u3 B4000 B4100 B4010 u1 u2 u3 u1 u2 u3 u1 u2 u3 B4110 B4101 B4111 u1 u2 u3 u1 u2 u3 u1 u2 u3 Figure 7: Classified blocks. OP T selects black vertices. Lemma 4.14 An input can contain at most six kinds of blocks: B10 , B2 , B3 , B4000 , B4100 and B4010 . 23 Proof. A B11 -block does not satisfy (P3). A B2110 -block, a B4110 -block and a B4111 -block do not satisfy (P4). A B4101 -block composes a good vertex triplet, which does not satisfy (P5). A B1 -block consists of one vertex v of degree one, and (4) in Lemma 4.2 shows that the expected cost of RA for v depends on the adjacent vertex u. Then, we classify B1 -blocks into the following two categories in terms of RA: A B1,0 -block of v such that deg v (u) = 3 and a B1,1 -block of v such that deg v (u) ≤ 2. Lemma 4.15 Consider a block without v1 and then the expected costs of RA are as follows: (i) zero for a B1,0 -block, (ii) 1/2 for a B1,1 -block, (iii) at most 5/2 for a B2 -block, (iv) at most 3/2 for a B3 -block and (v) at most three for a B4 -block. Proof. Suppose that a B1 -block consists of a vertex u1 , and u1 is adjacent to a vertex u. By definition, for a B1,0 -block, deg u1 (u) = 3 holds while for a B1,1 -block, deg u1 (u) ≤ 2 holds. By (4) in Lemma 4.2, the expected costs for them are zero and 1/2, respectively (Fig. 8). B2 -block: Suppose that a B2 -block consists of vertices u1 , u2 and u3 , deg(u1 ) = deg(u2 ) = 3, deg(u3 ) = 1, and u2 is adjacent to both u1 and u3 . The expected cost for u1 (u2 ) is clearly at most one. Also, by (4) in Lemma 4.2, the expected cost for u3 is at most 1/2. Thus, the expected cost for a B2 -block is at most 5/2. B3 -block: Suppose that a B3 -block consists of vertices u1 , u2 and u3 , deg(u1 ) = deg(u3 ) = 1 and deg(u2 ) = 3. Without loss of generality, suppose that u1 is revealed before u3 . Since this block does not contain v1 by the assumption of the lemma, u2 is revealed before u1 . Hence, deg u1 (u2 ) = 2 and deg u3 (u2 ) = 3. By (4-1) and (4-2) in Lemma 4.2, the expected costs for u1 and u3 are 1/2 and zero, respectively. Also, the expected cost for u2 is clearly at most one. By the above argument, the expected cost for a B3 -block is at most 3/2. B4 -block: A B4 -block contains three vertices. The expected cost for each vertex is at most one and thus the expected cost for a B4 -block is at most three. B1,0 u1 B1,1 u1 B3 B2 u1 u2 u1 u3 B4 u2 u3 u1 u2 u3 Figure 8: Costs for blocks without the first revealed vertex. Neither A nor B selects white vertices, both A and B select black vertices, and only the one of A and B selects gray vertices. Next, we evaluate the expected cost of RA for each block with v1 . Since the number of all the vertices of a given graph is at least four, no B1 -block contains v1 by the definition of BlockRoutine. Lemma 4.16 Consider a block with v1 and then the expected costs of RA are as follows: (i) at most three for a B2 -block, (ii) at most 5/2 for a B3 -block and (iii) at most three for a B4 -block. Proof. B2 -block, B4 -block: B2 -blocks and B4 -blocks consist of three vertices each. The expected cost for any vertex is at most one. Hence, the expected costs for these blocks are at most three each (Fig. 9). 24 B3 -block: Suppose that a B3 -block consists of three vertices u1 , u2 and u3 , deg(u1 ) = deg(u3 ) = 1 and deg(u2 ) = 3. Without loss of generality, suppose that u1 is revealed before u3 . First, we consider the case in which u1 = v1 . Clearly, the expected costs for u1 and u2 are at most one each. Since deg u3 (u2 ) = 2 by the definition of BlockRoutine, the expected cost for u3 is 1/2 by (4-1) in Lemma 4.2. By the above argument, the expected cost for a B3 -block is at most 5/2 in this case. Next, we consider the case in which u2 = v1 . The expected cost for u2 is clearly at most one. The vertex adjacent to u2 which is neither u1 nor u3 is revealed after u3 by the definition of BlockRoutine. Thus, deg u1 (u2 ) = 1 and deg u3 (u2 ) = 2. Hence, the expected costs for u1 and u3 are 1/2 each by (4-1) in Lemma 4.2. By summing up the above costs, the expected cost for a B3 -block is two in this case. Therefore, the expected cost for a B3 -block is at most 5/2. B4 B3 B2 u1 u2 u3=v1 u1=v1 u2 u3 u1 u2=v1 u3 u1 u2 u3 Figure 9: Costs for blocks with v1 . Both A and B select black vertices and only the one of A and B selects gray vertices. 100 and b010 denote the numbers of B -blocks, B -blocks, B -blocks, Let b1,0 , b1,1 , b2 , b3 , b000 1,0 1,1 2 4 4 , b4 000 100 100 + b010 . B3 -blocks, B4 -blocks, B4 -blocks and B4010 -blocks, respectively. We define b4 = b000 + b 4 4 4 Lemma 4.17 If the number of all the vertices of a given graph is at least five, 010 b1,0 ≤ b2 + b100 4 + b4 (22) b1,1 ≤ b100 4 . (23) and Proof. We discuss whether vertices in each block are adjacent to the vertex in a B1 -block. If the vertex in a B3 -block is adjacent to the vertex in another B1 -block, the number of vertices of a given tree is at most four, which contradicts the assumption of this lemma. This discussion is also true with a B1 -block. In what follows, we consider B2010 -blocks, B4000 -blocks, B4100 -blocks and B4010 -blocks. Since these blocks consist of three vertices each, suppose that they are u1 , u2 and u3 , and both u1 and u3 are adjacent to u2 . B2010 -block: Suppose that deg(u1 ) = deg(u2 ) = 3 and deg(u3 ) = 1. OP T selects u2 by definition. Let u(6= u2 ) be a vertex adjacent to u1 . OP T must select u or a vertex adjacent to u to dominate u. If OP T selects u, the degree of u is three by (P3). Otherwise, it is at least two because there exists an adjacent vertex to dominate u (i.e., by the assumption of an input, it is exactly three). Since the degree of the vertex in a B1 -block is one, u is not contained in a B1 -block. Next, let u′ (6= u1 , u3 ) be the vertex adjacent to u2 . By the definition of BlockRoutine, u′ is revealed either before u2 or after both u1 and u3 . In the former case, u′ is contained in a block of three vertices, which is not a B1 -block. In the latter case, deg u′ (u2 ) = 3. Therefore, u′ can be contained only in a B1,0 -block. 25 B4000 -block: OP T does not select any vertex in this block by definition, and hence each vertex is adjacent to a vertex selected by OP T in another block. The degree of the dominating vertex is three by (P3). Both u1 and u3 can be adjacent to a vertex u′′ which is not selected by OP T . In a similar way to u in the case of a B2010 -block, the degree of u′′ is three. Thus, no vertices in a B4000 -block are adjacent to the vertex in a B1 -block. B4100 -block: Suppose that OP T selects u1 . The degree of a vertex adjacent to u3 in this block is three similarly to u3 in a B4000 -block. The degree of a vertex adjacent to u2 is also three similarly to u in the case of a B2010 -block. We consider the two vertices û and û′ which are adjacent to u1 , in which û is revealed before û′ . First, suppose that u1 is revealed before u2 . If u1 = v1 , then deg û (u1 ) = 2 and deg û′ (u1 ) = 3 by the definition of BlockRoutine. Hence, û and û′ can be the vertices in a B1,1 -block and a B1,0 -block, respectively, by the definitions of B1,0 -blocks and B1,1 -blocks. If u1 6= v1 , then û is revealed before u1 and deg û′ (u1 ) = 3. Next, suppose that u2 is revealed before u1 . Then, deg û (u1 ) = 2 and deg û′ (u1 ) = 3. By the above argument, at most one vertex in a B4100 -block can be adjacent to the vertex in a B1,0 -block (a B1,1 -block). B4010 -block: OP T selects u2 by definition. In a similar way to the above argument, the degree of a vertex adjacent to either u1 or u3 is three. Also, the vertex adjacent to u2 in another block can be contained in a B1,0 -block. Therefore, at most one vertex in a B2010 -block, a B4100 -block, or a B4010 -block can be adjacent to the vertex in a B1,0 -block. That is, Eq. (22) holds. At most one vertex in a B4100 -block can be adjacent to the vertex in a B1,1 -block. That is, Eq. (23) holds. Lemma 4.18 b1,0 + b1,1 + b3 = b2 + 3b4 + 2. Proof. Let i2 denote the number of edges each of which is an edge between a vertex in a B2 -block and a vertex in either another B2 -block or a B4 -block. Let o2 denote the number of edges each of which is an edge between a vertex in a B2 -block and a vertex in either a B1 -block or a B3 -block. Similarly, let i4 denote the number of edges each of which is an edge between a vertex in a B4 -block and a vertex in either another B4 -block or a B2 -block. Let o4 denote the number of edges each of which is an edge between a vertex in a B4 -block and a vertex in either a B1 -block or a B3 -block. By definition, b1,0 + b1,1 + b3 = o2 + o4 . (24) Since there exist three edges each of which is between a vertex in a B2 -block and one in another block, 3b2 = i2 + o2 . (25) Since there exist five edges each of which is between a vertex in a B4 -block and one in another block, 5b4 = i4 + o4 . (26) Let us call a vertex of degree at least two an internal vertex. For a tree, x = y + 1 holds, in which x is the number of internal vertices and y is the number of edges between internal vertices. If we regard a block as one vertex, then the number of internal vertices is b2 + b4 and the number of edges between internal vertices is (i2 + i4 )/2. Thus, b2 + b4 = (i2 + i4 )/2 + 1. (27) By summing up Eqs. (25) and (26), 3b2 + 5b4 = i2 + o2 + i4 + o4 = b1,0 + b1,1 + b3 + 2b2 + 2b4 − 2. 26 (by Eqs. (24) and (27)) We complete the proof by rearranging this equality. Theorem 4.19 The competitive ratio of RA is at most 5/2. Proof. First, we consider an input σ of which the number of vertices of a given tree is four. A combination of blocks composing a tree with four vertices consists of one B1 -block C1 and one B3 -block C3 by Lemma 4.14. Since C1 does not contain v1 by the definition of BlockRoutine, C3 contains v1 . Thus, the expected of RA for C3 is at most 5/2 by Lemma 4.16. Let v denote the vertex in C1 , and let u denote the vertex adjacent to v in C3 . deg v (u) = 3 by the definition of B3 -blocks, which means that C1 is a B1,0 -block. Thus, the expected cost for C1 is zero by Lemma 4.15. By the above argument, E[CRA (σ)] = 5/2. On the other hand, OP T clearly selects at least one vertex, that is, COP T (σ) ≥ 1. Therefore, we have shown the statement of the theorem in the case of a tree with four vertices. Next, we consider the case in which of a graph with at least five vertices. The expected costs of RA for a B2 -block and a B3 -block with v1 are greater than those for a B2 -block and a B3 -block without v1 by 1/2 and one, respectively, by Lemmas 4.15 and 4.16. Also, v1 does not affect the expected cost for B4 -blocks. Thus, let b′2 and b′3 denote the numbers of B2 -blocks and B3 -blocks with v1 , respectively. By definition, b′2 , b′3 ∈ {0, 1} and b′2 + b′3 ≤ 1. Then, using Lemma 4.15, we have E[CRA (σ)] ≤ b1,1 /2 + 5b2 /2 + 3b3 /2 + 3b4 + b′2 /2 + b′3 ≤ b1,1 /2 + 5b2 /2 + 3b3 /2 + 3b4 + 1. By the definitions of blocks, we have 010 COP T (σ) = b2 + b3 + b100 4 + b4 . By the inequality and the equality, we have = ≤ ≤ = b1,1 /2 + 5b2 /2 + 3b3 /2 + 3b4 + 1 E[CRA (σ)] ≤ 010 COP T (σ) b2 + b3 + b100 4 + b4 −3b1,0 /2 − b1,1 + 4b2 + 15b4 /2 + 4 (by the substitution for b3 by Lemma 4.18) 010 −b1,0 − b1,1 + 2b2 + 3b4 + b100 4 + b4 + 2 −3b1,0 /2 + 4b2 + 15b4 /2 − b100 4 +4 (by the substitution for b1,1 by Eq. (23)) −b1,0 + 2b2 + 3b4 + b010 + 2 4 −5b1,0 /2 + 5b2 + 15b4 /2 + b010 4 +4 (by the substitution for b100 by Eq. (22)) 4 010 −b1,0 + 2b2 + 3b4 + b4 + 2 5 5 −b1,0 + 2b2 + 3b4 + 2b010 4 /5 + 8/5 < . · 010 2 2 −b1,0 + 2b2 + 3b4 + b4 + 2 Our analysis of RA is exact by the following theorem. Theorem 4.20 The competitive ratio of RA is at least 5/2. Proof. Consider the following input σ. A vertex v1 is first revealed, and the second vertex v2 arrives at v1 . The third vertex v3 and the fourth vertex v4 arrive at v2 . Then, A selects v1 (Case 1) and v2 (Case 2.2.2). B selects v1 (Case 1), v2 (Case 2.1) and v3 (Case 2.2.1). OP T selects v2 . Therefore, E[CRA (σ)]/COP T (σ) = 5/2. 27 5 Randomized Lower Bound Lemma 5.1 Consider a randomized online algorithm RON . Suppose that a vertex v arrives at a vertex u. Let pu (pv ) denote the probability that u ∈ DRON (v)(v ∈ DRON (v)). Then, pu + pv ≥ 1. Proof. Let p′u be the probability that u ∈ DRON (u). Since RON ’s selection is irrevocable, the probability that u ∈ DRON (u) and u ∈ DRON (v) is greater than or equal to p′u (Fact (a)). Next, we consider the case in which u ∈ / DRON (u). RON must select u or v to construct a dominating set immediately after v is revealed. Thus, the probability that either u ∈ DRON (v) or v ∈ DRON (v) is / DRON (u) is 1 − p′u . Hence, the probability one. By the definition of p′u , the probability that u ∈ that both u ∈ / DRON (u) and either u ∈ DRON (v) or v ∈ DRON (v) is at least 1−p′u . This probability together with Fact (a) shows that pu + pv ≥ p′u + 1 − p′u = 1. Theorem 5.2 The competitive ratio of any randomized online algorithm is at least 4/3. Proof. Consider a randomized online algorithm RON for the following input σ. Let m be any positive integer. We sketch an adversary constructing σ. First, the adversary gives a line of 2m vertices to ON . Then, for every two consecutive vertices on the line, the adversary determines whether an additional vertex will arrive at one of the two vertices. Specifically, if the probability that RON selects at least one of the two vertices is low, the adversary makes a new vertex arrive at the vertex. For each i = 1, 2, . . . , 2m, the i-th vertex vi arrives at vi−1 . For each j = 1, 2, . . . , 2m, let pj be the probability that vj ∈ DRON (v2m ). Next, for each ℓ = 1, 2, . . . , m, vertices are revealed after the revelation of v2m in the following two cases. Case 1 (min{p2ℓ−1 , p2ℓ } ≥ 2/3): A new vertex does not arrive at either v2ℓ−1 or v2ℓ . Since RON ’s selection is irrevocable, the expected cost of RON for v2ℓ−1 and v2ℓ is at least 2 · 2/3 = 4/3. Case 2 (min{p2ℓ−1 , p2ℓ } < 2/3): If p2ℓ−1 ≤ p2ℓ , then define ℓ1 = 2ℓ − 1 and ℓ2 = 2ℓ. Otherwise, define ℓ2 = 2ℓ−1 and ℓ1 = 2ℓ. Then, a vertex uℓ1 arrives at vℓ1 . By Lemma 5.1, the probability that vℓ1 ∈ DRON (uℓ1 ) or uℓ1 ∈ DRON (uℓ1 ) is at least one (Fact (a)). Moreover, p2ℓ−1 +p2ℓ = pℓ1 +pℓ2 ≥ 1 also holds. Since pℓ1 < 2/3 by the condition of Case 2, pℓ2 ≥ 1/3. Hence, the expected cost for vℓ1 , vℓ2 and uℓ1 is at least 1 + 1/3 = 4/3. Let x be the number of such ℓ with applying Case 1. Thus, the number of such ℓ with applying Case 2 is m − x. E[CRON (σ)] ≥ 4x/3 + 4(m − x)/3 = 4m/3 by the above argument. Next, we consider an offline algorithm OF F to give an upper bound on the cost of OP T . For such ℓ with applying Case 1, OF F selects v2ℓ−1 and for such ℓ with applying Case 2, selects vℓ1 . Thus, OF F selects m vertices, and the set of the m selected vertices is clearly a dominating set. By the optimality of OP T , COP T (σ) ≤ COF F (σ) = m. Therefore, E[CRON (σ)]/COP T (σ) ≥ 4/3. 6 Conclusions In this paper, we have conducted research on algorithms for an online variant of the minimum dominating set problem on trees and obtained the following results: First, we have shown that the competitive ratio of any deterministic algorithm is at least 3, which matches the upper bound shown in [4, 2]. Then, we have designed an algorithm whose competitive ratio is exactly 5/2 using randomization. Furthermore, we have shown that the competitive ratio of any randomized algorithm is at least 4/3. 28 We conclude this paper by providing open questions: (i) Online algorithms for dominating sets on several graph classes have been discussed in [4, 2] and optimal online algorithms have not yet known on some classes. Then, it is interesting to consider online algorithms on other classes in addition to them. (ii) Our algorithm RA is the first randomized algorithm for the online dominating set problem on trees and can achieve a competitive ratio smaller than that of any deterministic algorithm. Can we also obtain a better ratio on other classes using randomization? (iii) The gap between the randomized bounds shown in this paper is still large and thus, it is an obvious open problem to close the gap. References [1] A. Borodin and R. El-Yaniv, “Online Computation and Competitive Analysis,” Cambridge University Press, Cambridge, 1998. [2] J. Boyar, S. J. Eidenbenz, L. M. Favrholdt, M. Kotrbčik and K. S. Larsen, “Online dominating set,” In Proc. of the 15th Scandinavian Symposium and Workshops on Algorithm Theory, pp. 21:1–21:15, 2016. [3] D.-Z. Du and P.-J. Wan, “Connected Dominating Set: Theory and Applications,” Springer, New York, 2013. [4] S. J. Eidenbenz, “Online dominating set and variations on restricted graph classes, ” Technical report, Institute of Theoretical Computer Science, ETH Zürich, 2002. [5] F. V. Fomin, D. Kratsch, and G. J. Woeginger, “Exact (Exponential) Algorithms for the Dominating Set Problem,” In Proc. of the 30th international conference on Graph-Theoretic Concepts in Computer Science, pp. 245–256, 2004. [6] F.V. Fomin, F. Grandoni, and D. Kratsch, “Some new techniques in design and analysis of exact (exponential) algorithms,” Bulletin of the EATCS, pp. 47–77, 2005. [7] M. Henning and A. Yao, “Total Domination in Graphs,” Springer, New York, 2013. [8] W. Goddard and M. A. Henning, “Independent domination in graphs: A survey and recent results, ” Discrete Mathematics, Vol. 313, No. 7, pp. 839–854, 2013. [9] F. Grandoni, “Independent domination in graphs: A survey and recent results, ” Journal of Discrete Algorithms, Vol. 4, No. 2, pp. 209–214, 2006. [10] Y. Iwata, “A Faster Algorithm for Dominating Set Analyzed by the Potential Method,” In Proc. of the 6th international conference on Parameterized and Exact Computation, pp. 41–54, 2011. [11] G. H. King and W. G. Tzeng, “On-line algorithms for the dominating set problem, ” Information Processing Letters, Vol. 61, pp. 11–14, 1997. [12] F. Plastria, “Static competitive facility location: An overview of optimisation approaches, ” European Journal of Operational Research, Vol. 129, No. 3, pp. 461–470, 2001. [13] J. M. M. van Rooij and H. L. Bodlaender, “Exact algorithms for dominating set, ” Discrete Applied Mathematics, Vol. 159, No. 17, pp. 2147–2164, 2011. 29 [14] I. Schiermeyer, “Exact algorithms for dominating set, ” Discrete Applied Mathematics, Vol. 156, No. 17, pp. 3291–3297, 2008. [15] D. D. Sleator and R. E. Tarjan, “Amortized efficiency of list update and paging rules,” Communications of the ACM, Vol. 28, No. 2, pp. 202–208, 1985. [16] J. Y. Yu and P. H. J. Chong, “A survey of clustering schemes for mobile ad hoc networks,” IEEE Communications Surveys and Tutorials, Vol. 7, No. 1, pp. 32–48, 2005. 30
8cs.DS
Theory and computation of electromagnetic fields and thermomechanical structure interaction for systems undergoing large deformations arXiv:1803.10551v1 [cs.CE] 28 Mar 2018 B. E. Abali ∗ A. F. Queiruga† Abstract The governing equations for electromagneto-thermomechanical systems are well established and thoroughly derived in the literature, but have been limited to small deformations. This assumption provides an “ease” in the formulation: electromagnetic fields are governed in a Eulerian frame, whereby the thermomechanics is solved in a Lagrangean frame. It is possible to map the Eulerian frame to the current placement of the matter and the Lagrangean frame to a reference placement. The assumption of small deformations eliminates the distinction between current and initial placement such that electromagnetism and thermomechanics are formulated in the same frame. We present a rigorous and thermodynamically consistent derivation of governing equations for fully coupled electromagneto-thermomechanical systems properly handling finite deformations. A clear separation of the different frames is necessary. There are various attempts to formulate electromagnetism in the Lagrangean frame, or even to compute all fields in the current placement. Both formulations are challenging and heavily discussed in the literature. In this work, we propose another solution scheme that exploits the capabilities of advanced computational tools. Instead of amending the formulation, we can solve thermomechanics in the Lagrangean frame and electromagnetism in the Eulerian frame and manage the interaction between the fields. The approach is similar to its analog in fluid structure interaction, but additionally challenging because the electromagnetic governing equations must also be solved within the solid body while following their own different set of transformation rules. We further present a mesh-morphing algorithm necessary to accommodate finite deformations to solve the electromagnetic fields outside of the material body. We illustrate the use of the new formulation by developing an open-source implementation using the FEniCS package and applying this implementation to several engineering problems in electromagnetic structure interaction undergoing large deformations. 1. Introduction The theory of electromagnetism started with [53] and is often explained by Maxwell’s equations. The theory has been continuously developed and amended, notably in the 1950s during the renaissance of thermodynamics. The inclusion of mechanics and thermodynamics into the theory of electromagnetism is governed by balance laws; however, there is no consensus among the scientific community. The lack of consensus owes to various challenges in the formulation and the lack of experimental verifications for proposed formulations. For example, there are different representations of Maxwell’s equations, cf. [67] and [19, Sect. II]. Another challenge occurs due to the different invariance properties of balance laws and Maxwell’s equations, raising questions about the proper forms of electromagnetic interaction equations in matter. The readers are directed to [87, §286] for some of these different formulations. In addition to agreeing upon the governing equations for electromagneto-thermomechanical fields, we must also define the constitutive responses, i.e., the equations dictating the material behavior. Typically, phenomenological equations are constructed relying on experiments, which limit their applicability to measurement conditions. In order to define generic relations, we want to follow a consistent theoretical derivation through thermodynamics. However, there is no consensus for deriving thermodynamically sound constitutive equations ∗ Corresponding † Lawrence author. Technische Universität Berlin; email: [email protected] Berkeley National Laboratory; email: [email protected] 1 for electromagnetically polarizable systems. The challenge again lies in the formulation of balance laws, especially on the balance of energy, which has been discussed by [22]. There exist a few complete theories for polarized deformable media, as those of [32, Chap. XIII], [60, Chap. 9], [23, Chap. 5], [43, Chap. 15], [14], and [1, Chap. 3]. Each of the mentioned formulations is different, and an experimental verification to determine the correctness is still missing. Computational methods help us to simulate and comprehend realistic applications in two ways. First, we can estimate response of a system before manufacturing. Secondly, we can design experiments for validating or even discovering an accurate representation of the physical world. Several computational strategies exist for solving coupled equations by means of finite element simulations. For detailed reviews, see [10], [34], and [90]. Different simplifications of the governing equations are employed in order to enable a numerical analysis. For example, restriction to the quasi-static case can be seen in [94], [3] and [72]. A case without free charges was presented by [84]. A magneto-elasto-static case has been suggested in [82]. In [55] the temperature distribution is added again for the static case. A complete dynamical description and transient computation of electromagneto-thermomechanical has been proposed recently in [73] and [2]. In most of these works, the formulations are established on the same configuration. If the electromagnetic fields interact with solid bodies, a Lagrangean frame is chosen, where each coordinate maps to a material particle. In the case of fluids, a Eulerian frame is chosen, wherein each coordinate indicates a fixed position in ordinary (physical) space. Solving electromagnetic fields in a Eulerian frame and thermomechanical fields in a Lagrangean frame is not a new idea. Among others, [40], [75], [83], [7], [91], and [71] have developed computational strategies to overcome different problems. In all aforementioned works, governing equations differ due to the different simplifications and assumptions used. Instead of a comparison of different works, we start from the beginning with a new derivation of the equations based on the continuum mechanics such that any assumptions and weaknesses in the methodology can be precisely identified and addressed. We begin by outlining the theory in Section 2, following [1, Chap. 3] most closely. The main objective is to compute the primitive variables for solids under finite deformation, namely the temperature T and displacement u, and to compute for the entirety of space encompassed by the computational domain the so-called electromagnetic potentials φ, A. In the formulation we will use different frames, where X denotes the reference position of a massive particle, and x indicates a position in the ordinary space. The close the theory by developing comprehensive thermodynamically consistent constitutive equations for solids in Section 3. We discuss the issues with solving these equations using the finite element method in Section 4. To address the large deformations of the solid mesh embedded in the mesh of the electromagnetic computational domain, we present a mesh morphing algorithm that enables the calculations by keeping a valid mesh in the space surrounding the body. The variational forms and new algorithms are implemented with aid of the novel collection of open-source packages provided by the FEniCS project [36, 48]. The library containing the presented mesh morphing algorithm and other helper routines is released at https://github.com/afqueiruga/afqsfenicsutil under the GNU Lesser General Public License [28]. In Section 5, we present three example simulations of example applications to electromagnetic devices whose implementations are published at https://github.com/afqueiruga/EMSI-2018 under the GNU General Public License. We conclude the discussion in Section 6. 2. Governing equations Consider a solid body b immersed in air. We will solve electromagnetic fields in the whole domain Ω including a body b and air, Ωair = Ω\b. The solid body undergoes a deformation. The mechanical fields will be computed within the body b. Although the surrounding air might be set in motion due to the deformation of the solid body and its own electromagnetic interactions, we will ignore the fluid motion. For certain applications, we might want to solve the temperature distribution within the air as well, but it is not of interest for now. We choose to compute the temperature distribution only within the solid body to save computational time. Therefore, we aim at determining governing equations for electromagnetic fields within Ω and for thermomechanical fields within b. At the interface I = Ω ∩ ∂b, we need to discuss the interaction and satisfy another set of governing equations. We motivate the theory in three subsections: • specifying the governing equations for electromagnetic fields in the whole domain; • specifying the governing equations for for thermomechanical fields in the solid body; • specifying the jump conditions on the interface between the solid body and its surroundings. 2 We will use Cartesian coordinates and the usual tensor index notation with the Einstein summation convention over repeated indices. 2.1. Electromagnetic fields The main objective in electromagnetism is to obtain the electric field, E, and the magnetic flux density, B (an area density). SI units are the most appropriate choice for thermomechanical couplings, where the electric field is measured in V(olt)/m(eter) and the magnetic flux density is measured in T(esla). We start off with Faraday’s law: Z • Z =− Bi dai S Ei d`i , (1) ∂S defined on arbitrarily moving surface S with the electric field measured on the co-moving frame, E , as well as the magnetic flux on the co-moving frame, B . In other words, the measurement device is installed on S and moves with it. Assume that the domain S defined in x moves with the velocity x• = w measured with respect to the laboratory frame that is set to be fixed (not moving). In order to define a velocity as a measurable quantity, we have to declare one frame without possessing a velocity. Of course a laboratory frame on Earth moves with respect to other planets and stars; however, we declare and maintain the laboratory frame as being fixed such that every motion detected in that frame acquires a velocity. Since B and E are detected on a moving frame, we need their transformations to the laboratory frame, Ei = Ei + (w × B)i , Bi = Bi , (2) for the non-relativistic case, where the magnitude of the domain velocity is small with respect to the speed of light in vacuum, |w|  c. By using Stokes’s theorem as well as the identity ( dai )• =  ∂w k ∂xk δji − ∂wj  daj , ∂xi (3) we acquire the local form of Faraday’s law:  ∂w ∂wj  = − curl(E + w × B)j , ∂xk ∂xi ∂Bj ∂Bj ∂wk ∂wj ∂El ∂wm Bn + wk + Bj − Bi + jkl + jkl lmn =0, ∂t ∂xk ∂xk ∂xi ∂xk ∂xk ∂Bj wk ∂wj ∂El ∂wj Bk ∂wk Bj ∂Bj + − Bi + jkl + − =0, ∂t ∂xk ∂xi ∂xk ∂xk ∂xk ∂Bj ∂El ∂Bk + jkl + wj =0, ∂t ∂xk ∂xk Bj• + Bi k δji − (4) using the identity jkl lmn = δjm δkn − δjn δkm . Moreover, we can consider the special case where the surface S is a closed hull, for example boundary of a continuum body, ∂b, without a line boundary such that the right-hand side in Eq. (1) vanishes and we obtain after an integration in time Z Bi dai = const.|t . (5) ∂b If we select the initial magnetic flux as zero, the integration constant drops. Since the selected boundary is a closed hull, we can apply Gauss’s law and acquire ∂Bi =0. ∂xi (6) We have obtained the so-called first set of Maxwell’s equations: ∂Bi =0, ∂xi ∂Bi ∂Ek + ijk =0. ∂t ∂xj (7) These equations are universal, i.e., they hold for any material and even in the case of no massive particles (vacuum). Hence, the coordinate x denotes a location or point in the (ordinary) space. We call it a spatial frame since the coordinates indicate a position in space. There might be a massive particle occupying the 3 location x, but the coordinate still indicates a location in space without any relation to that particle or its motion. The sought-after electromagnetic fields, E and B, have to satisfy the latter equations. Their solution is obtained by using the following ansatz functions: Ei = − ∂φ ∂Ai − , ∂xi ∂t Bi = ijk ∂Ak , ∂xj (8) such that now we search for the electric potential φ in V and magnetic potential A in T m for ∀xi ∈ Ω. If we can compute the electromagnetic potentials, we readily obtain the electromagnetic fields from the latter equations. Since we aim to describe the system using only four components {φ, A1 , A2 , A3 } instead of six components {E1 , E2 , E3 , B1 , B2 , B3 }, there are two scalar degrees of freedom that are not uniquely determined; namely ∂φ/∂t and ∂Ai /∂xi can be chosen freely. This so-called gauge freedom is used to eliminate many numerical problems, see [9], we will use Lorenz’s gauge: ∂Ai ∂φ = −c2 , ∂t ∂xi c2 = 1 , µ0 ε0 (9) with the speed of light in vacuum, c, and the precisely known universal constants: ε0 = 8.85 · 10−12 A s/(V m) , µ0 = 12.6 · 10−7 V s/(A m) . (10) In order to motivate the second set of Maxwell’s equations, we use the balance of electric charge in an open domain Ω where the domain moves with w Z • Z   q(wi − vi ) − Ji dai . (11) q dv = ∂Ω Ω The electric charge density q in C(oulomb)/m3 is searched for and electric current (area density) J in A(mpere)/m2 needs to be declared. If a massive particle conveying an electric charge of q enters the domain, the amount of charge within the domain increases. The particle moves with v and can enter the domain only across its boundary ∂Ω, if the relative velocity w − v is positive along the surface direction, dai = ni da, we refer to [59], [62] for a discussion of balance equations in open and moving domain. The surface direction n points outward the domain. We can again get the local form after using the rate of the volume element in the spatial frame moving with w, ∂wi (12) dv • = dv , ∂xi and apply Gauss’s law:  ∂wi ∂  = q(wi − vi ) − Ji , ∂xi ∂xi  ∂q ∂qwi ∂  + = q(wi − vi ) − Ji , ∂t ∂xi ∂xi ∂Ji ∂q + =0, ∂t ∂xi q• + q (13) where Ji = Ji + qvi represents the electric current measured in the laboratory frame. Since the domain Ω has a well-defined boundary, ∂Ω, we can introduce a charge potential D measured on the moving domain as follows Z Z q dv = Di dai , (14) ∂Ω Ω leading to the following Maxwell equation after applying Gauss’s law ∂Di . ∂xi q= (15) The charge potential D in C/m2 is quite general stemming from the total charge q in space. Now by using the charge potential, we rewrite the balance of charge in an open domain with a closed boundary, ∂∂Ω = {}, Z • Z   Di dai = q(wi − vi ) − Ji dai , (16) ∂Ω ∂Ω 4 as a balance equation on a surface with its boundary ∂S Z • Z Z   Di dai = Hi d`i + q(wi − vi ) − Ji dai , S ∂S (17) S where the flux on the surface boundary H is called the current potential measured on the moving surface. Transformations of the charge and current potentials from the moving frame to the laboratory (fixed) frame read Di = Di , Hi = Hi + (D × w)i , (18) for the non-relativistic case. Now we can insert the rate of the area element, apply Stokes’s theorem, and obtain the local form  ∂w ∂wj  k Dj• + Di δji − = curl(H + D × w)j + qwj − Jj , ∂xk ∂xi ∂Dj ∂wk ∂wj ∂Hl ∂Dm wn ∂Dj + wi + Dj − Di = jkl + jkl lmn + qwj − Jj , ∂t ∂xi ∂xk ∂xi ∂xk ∂xk (19) ∂Dj ∂Dj wi ∂wj ∂Hl ∂Dj wk ∂Dk wj ∂Di + − Di = jkl + − + wj − Jj , ∂t ∂xi ∂xi ∂xk ∂xk ∂xk ∂xi ∂Dj ∂Hl = jkl − Jj . ∂t ∂xk We have obtained the second set of Maxwell’s equations: q= ∂Di , ∂xi ∂Dj ∂Hl = jkl − Jj , ∂t ∂xk (20) they are universal and hold in the whole domain. The domain can be moving with w, the charge and current potentials on the laboratory frame—D and H respectively—do not change at all. Therefore, the domain velocity is arbitrary giving us a freedom to choose the domain velocity freely. We will generate the domain velocity in such a way that the mesh quality remains optimal. This fact will be discussed later. We have reached the following governing equations: ∂q ∂Ji ∂Di + = 0 , Ji = Ji + qvi , q = , ∂t ∂xi ∂xi ∂Dj ∂Hi − jki + Jj = 0 , ∂t ∂xk (21) in order to compute the electromagnetic potentials, φ and A. In order to close the equations, the total charge potential and the total current potential need to be expressed in terms of the electromagnetic potentials. The so-called Maxwell–Lorentz aether relations: Di = ε0 Ei , Hi = 1 Bi , µ0 (22) augmented by Eq. (8) presents the relation closing the coupled governing equations. These equations will be solved in the whole domain, Ω. 2.2. Thermomechanical fields Consider a continuum body, b, within the domain Ω. This body consists of massive particles with electric charge. Mass (volume) density ρ and specific charge (per mass) z are material dependent variables. Their initial values are known. The total charge z in a material is decomposed as free charge z fr. and bound charges z bo. as follows (23) z = z fr. + z bo. . Free charges are the valence electrons carrying the electric current effectively in a conductor, they can move large distances. Bound charges are held by the intra-molecular forces and they only move less than the molecular length. Their motion give rise to a decomposition of the charge and current potentials, Di = Di − Pi , Hi = Hi + Mi , 5 (24) where the bound charge potential Pi is called an electric polarization and the bound current potential Mi is called a magnetic polarization. Minus sign is a convention of the declaration of electric polarization in the atomistic scale. Since we already have introduced Maxwell–Lorentz aether relation, we need constitutive equations either for Di and Hi or for Pi and Mi . By using above definitions we achieve the analogous decomposition for the electric current ∂Mk ∂Pi + ijk , Ji = Jifr. + Jibo. , Jibo. = (25) ∂t ∂xj see Appendix A for its well-known derivation. The massive particles’ initial positions are known and denoted by X. Effected by mechanical, thermal, and electromagnetic forces, particles at X displace as much as u and move to x such that u = x − X in m. Moreover, the temperature T in K(elvin) and electromagnetic potentials of particles are necessary to compute. Since we know the initial positions of the (non-congruent) particles, we can use X in order to identify the material particles. We call it a material frame since the coordinates indicate material particles’ positions. In the material frame, we search for u, T , φ, and A as functions in space X and time t. Here the space is in a Lagrangean frame such that a coordinate value X indicates the same particle throughout the simulation. Initial conditions fail to depend on time, ∂Xi /∂t = 0. We start off with the general balance equation in a volume (with regular points) Z • Z Z Z Φj daj + ρk dv + p dv , ψ dv = (26) b b ∂b b where rate of the volume density ψ is balanced by the fluxes across the boundary Φj , volumetric supply terms k, and production terms p. This balance equation is in the current placement, where x denote the current positions of material particles. We start the simulation with particles at X and they move to x. The current positions of particles change in time such that x•i = vi in the material frame. Therefore, the rate of a volume element in the material frame reads ∂vi (27) dv , dv • = ∂xi leading to the following local form after applying Gauss’s law ∂ ∂ψ + (vj ψ − Φj ) − k = p . ∂t ∂xj (28) In the local form we write the production term on the right-hand side in order to emphasize the conserved quantities. If the production term vanishes, the variable in the balance equation is a conserved quantity. We axiomatically start with the balance equations for the mass, total momentum, and total energy as given in Table 1. It is important to emphasize that we assume that the mass, total momentum, and total energy are all Table 1: Volume densities in the balance equations and their supply terms, flux terms, and production terms. ψ Φj k p ρ 0 0 0 σji + mji ρfi 0 ζ i + Pi ρs 0 ρvi + Gi ρe m. +e f. conserved quantities. Now, the balance equations read ∂ρ ∂vj ρ + =0, ∂t ∂xj  ∂ ∂ (ρvi + Gi ) + vj ρvi − σji − mji − ρfi = 0 , ∂t ∂xj  ∂ ∂ (ρem. + ef. ) + vj ρem. − ζj − Pj − ρs = 0 ∂t ∂xj (29) Mass density, ρ, has a convective flux, vρ, because mass is conveyed by the moving material particles. Total momentum density, ρv + G , consists of a part due to matter, ρv, and another part due to the electromagnetic field, G . Matter and the electromagnetic field are coupled; however, we will be decomposing terms by splitting the fields along their interaction. Consider a massive object moving in an electromagnetic field in a way that the 6 electromagnetic field does not alter, i.e., matter and field are independent. Of course, as given in the balance of momentum, the existing field’s rate applies forces on the moving charges and a massive object has usually (bound) electric charges such that its acceleration leads to a change in the velocity, in other words, matter and field are coupled. Thus, it is intuitive to treat the electromagnetic field and matter separately (independently) in a coupled manner. We can always fix matter and vary the field, and vice versa. In the balance of momentum, convective flux is only on the part due to the matter. Non-convective flux of momentum, σ + m, is also decomposed into Cauchy’s stress, σ, and an electromagnetic stress, m. The specific supply term, f , is the body force because of gravity. Total energy density, ρem. + ef. , is decomposed into matter and field energies, as well as non-convective fluxes, ζi and Pi , respectively. Again only the energy due to matter is conveyed by moving massive particles, vρem. , as a convective flux. The specific supply term, s, is given. All the other terms will be defined in the following discussion. In the above formulation, the electromagnetic momentum, stress, energy, and flux are the key terms for the correct interaction. Hence it is customary to introduce the following relations: ∂mji ∂Gi = − Fi , ∂t ∂xj ∂ef. ∂Pj = −π , ∂t ∂xj (30) where the electromagnetic momentum G and electromagnetic stress m are related to the electromagnetic force (density), F , analogously, electromagnetic energy (density) ef. and electromagnetic flux P are related to an electromagnetic power (density), π. These mathematical identities might be called balance equations; however, we refrain ourselves from using this terminology, since there is an ongoing discussion in the literature about the correctness of this terminology. It is obvious that we can insert the latter identities and renew the table as in Table 2. Table 2: Volume densities in the balance equations and their supply terms, flux terms, and production terms. ψ Φj k p ρ 0 0 0 ρvi σji ρfi Fi ρem. ζi ρs π Now the momentum and energy balances read  ∂ ∂ρvi + vj ρvi − σji − ρfi = Fi , ∂t ∂xj m.  ∂ρe ∂ + vj ρem. − ζj − ρs = π . ∂t ∂xj (31) After using the balance of mass and the material derivative d ∂ ∂ = + vi , dt ∂t ∂xi (32) dvi ∂σji − − ρfi = Fi , dt ∂xj dem. ∂ζi ρ − − ρs = π , dt ∂xi (33) they are ρ furnishing the consequence that momentum and energy of matter are not conserved quantities in the case of electromagnetism. The production terms F and π need to be defined in such a way that they vanish if electromagnetic fields are zero. Unfortunately, their definitions are challenging and there exists no consensus between the scientific community, see for example [64, 52, 29, 11]. We will propose terms in accordance with 7 Eq. (30), which is the method of derivation used in [49, Eq. (15)], [38, Chap. 1], [32, Chap. XIV], [30, Chap. 8], [51, Sect. 3.3]. If the electromagnetic momentum, Gi , is defined, then, as a consequence of Eq. (30)1 , we can deduce the electromagnetic stress, mji , and the electromagnetic force density, Fi . By following [8] we emphasize that different choices are perfectly appropriate. The reasoning can be explained by: the manifestation of a force as a contact force leads a term into the electromagnetic stress, whereas as a body force leads to a term causing a momentum rate. In the atomistic scale we know that all electromagnetic forces are contact forces. However, in the macroscopic scale we can observe a momentum change due to the electromagnetic fields such that declaring a body force is also suitable. Any choice of G , m, and F is possible as long as the relations in Eq. (30) are fulfilled. Analogously, we can choose an electromagnetic flux, P , leading to the field energy and power. The choices cannot be justified or falsified by experiments, since we cannot detect contact forces and motion independently. Every sensor—used for detecting contact forces—depends on material properties coupling motion with electromagnetism. Now we introduce a specific (per mass) internal energy, u, by decomposing the energy of matter in kinetic and internal energy 1 (34) em. = vi vi + u . 2 By inserting the latter into the balance of energy and using the balance of momentum, dvi du ∂ζj vi + ρ − − ρs = π , dt dt ∂xj   ∂σ ∂ζj du ji − + ρfi + Fi vi + ρ − ρs = π , ∂xj dt ∂xj  du ∂ ∂vi ρ − ζj − σji vi − ρ(s − fi vi ) = σji + π − F i vi , dt ∂xj ∂xj ρ (35) we have obtained the balance of internal energy. Obviously, we need to define π and Fi before we proceed. Among many different possibilities, the following choice leads to a thermodynamically consistent formulation. Suppose that we simply choose the electromagnetic momentum as follows Gi = (D × B)i , (36) which is called Minkowski’s momentum. It leads to the following electromagnetic stress and force 1 mji = − δji (Hk Bk + Dk Ek ) + Hi Bj + Dj Ei , 2 ∂Pj ∂Bk Fi = ρzEi + ijk Jj Bk − ijk Bk − ijk Pj , ∂t ∂t (37) after using Maxwell’s equations, see Appendix B for its derivation. Suppose now that we choose the electromagnetic flux as Poynting’s vector  Pi = ijk Hj Ek = H × E i , (38) in this case, as shown in Appendix C, we obtain ef. = Pi Ei − Bi Mi + 1 Di Ei + Hi Bi ) , 2 π = Jifr. Ei − Pi ∂Ei ∂Mi + Bi , ∂t ∂t (39) The production term due to the field can be rewritten by using the above definition of the electromagnetic force     ∂  ∂ 1 1 F i vi = (−Pj Ei + Mi Bj )vi + H × E j + Bi Mi − Pj Ej − Dj Ej − Bi Hi − ∂xj ∂t 2 2   ∂vi dEi dMi ∂ −(−Pj Ei + Mi Bj ) − Ei Jifr. + Pi − Bi = (−Pj Ei + Mi Bj )vi + ∂xj dt dt ∂xj (40) f. ∂Pj ∂e ∂vi dEi dMi −(−Pj Ei + Mi Bj ) + − − Ei Jifr. + Pi − Bi . ∂xj ∂t ∂xj dt dt | {z } π We refer to [1, Sect. 3.5] for its derivation based only on subsequent use of Maxwell’s equations and Maxwell– 8 Lorentz aether relations. Now the balance of internal energy reads  du ∂  − ζj − (σji − Pj Ei + Mi Bj )vi − ρ(s − fi vi ) = dt ∂xj  ∂vi dMi dEi = σji − Pj Ei + Mi Bj + Ei Jifr. − Pi + Bi . ∂xj dt dt ρ (41) We emphasize that this derivation holds for every material, we have only used one assumption for choosing the electromagnetic momentum. Conventionally, the non-convective flux term of the internal energy is called the heat flux: −qj = ζj − (σji − Pj Ei + Mi Bj )vi , (42) with the minus sign appearing because heat pumped into the system (against the surface normal) is declared as a positive work. The supply of the internal energy is a given term and is called the radiant heat: r = s − f i vi . (43) The production term Γ = (σji − Pj Ei + Mi Bj ) dMi dEi ∂vi + Ei Jifr. − Pi + Bi , ∂xj dt dt (44) will be especially useful in the following section for deriving the constitutive equations. Now by using mass balance and Gauss’s law, we can obtain the global forms of mass, total momentum, and internal energy balance equations in the current placement: Z • Z Z • Z Z ρvi dv = σji daj + ρfi dv + Fi dv , ρ dv = 0 , ∂b b b b Z •b (45) Z Z Z qi dai + ρr dv + Γ dv ρu dv = − b b ∂b b These balance equations are in the current placement given in x, but we search for thermomechanical fields as functions in space X with the reference placement, in which the mass density, displacement, and temperature are known. As the initial conditions are known, for reference placement we choose the initial placement. The volume and area elements are transformed to the initial placement by dv = J dV , daj = dAk J(F −1 )kj , (46) with the deformation gradient and its determinant defined by Fij = ∂xi ∂ui = + δij , ∂Xj ∂Xj J = det(F ) . (47) Since the volume element in the initial placement is constant in time, after inserting the transformation and using Gauss’s law, we obtain the balance equations in a Lagrangean frame ρJ = const. t = ρ0 ,  ∂  ∂vi = J(F −1 )kj σji + ρ0 fi + JFi , ρ0 ∂t ∂Xk  ∂  ∂u =− J(F −1 )kj qj + ρ0 r + J Γ , ρ0 ∂t ∂Xk (48) where each coordinate in space X denotes a material particle. We need constitutive equations in order to close these equations such that we can solve the displacement and temperature by fulfilling them. 2.3. On the interface Formulation of partial differential equations generally makes the implicit assumption that all fields must be described as continuous in space and all conserved quantities are volume densities. However, this restriction is artificial, as it is perfectly valid to discuss an infinitely thin membrane with mass area density and velocity defined upon it, for example. Electromagnetism in particular has situations where this applies, where surface 9 charges and currents are prevalent due to material discontinuities, requiring us to develop descriptions for interfaces in addition to the partial differential equations that can only be applied to “smooth” space. Especially between different materials, we obtain “jump” conditions to be satisfied in order to obtain the correct solution. We name the boundary of the solid body as the interface in order to avoid a confusion to the domain boundary. The interface evolves due to the deformation. Thermomechanical fields are assumed to be computed such that the current placement of the interface is known. We will develop the equations for a generic singular surface and then restrict to the case that the singular surface is the interface. Regions are 3D objects and surfaces are 2D objects embedded in 3D space. Consider a surface S between two different regions Ω+ and Ω− such that S = Ω+ ∩ Ω− . On the plus side of the surface—toward which the normal n points—is the region Ω+ and on the minus side lies Ω− . We use Ω± = Ω+ ∪ Ω− \ S = Ω \ S to denote the whole domain without the surface. Moreover, the surface is within the domain and its boundary is on the domain’s boundary ∂S = ∂Ω ∩ S such that the whole boundary reads ∂Ω = ∂Ω± ∪ ∂S with ∂Ω = (∂Ω+ \ S) ∪ (∂Ω− \ S). Note that the boundary of the surface, ∂S, is a 1D loop embedded in 3D space. The surface and domain may be moving with a velocity w and we search for a balance equation in the open domain, i.e., we use a Eulerian frame. Now the general balance equation reads Z • Z Z  Z    (wj − vj )ψ V + ΦVj daj + ψ S (wj − vj ) + ΦSj d`j + ψ V dv + ψ S da = ± ∂S Ω± S (49) Z Z ∂Ω   V V V S S S ρ k + p dv + ρ k + p da , + Ω± S where all volume-related quantities are denoted with a superscript V and surface-related quantities with a superscript S. We are only interested in a special case where the surface is an interface. In other words, the surface itself is a fictitious separation without any mass area-density, ρS = 0. This restriction allows the following simplification after using the geometric transformations r g −1 (50) dA , dv = J dV , daj = dAk J(F )kj , d`j = Fjk dLk , da = G where g and G are the determinant of the surface metric tensor in the current and initial frame, respectively. After transforming to the initial placement, we obtain Z Z Z   V • V V −1 (ψ J) dV = (wj − vj )ψ + Φj J(F )kj dAk + ΦSj Fjk dLk + Ω± ∂Ω± ∂S r (51) Z Z  g V V V S + ρ k + p J dV + p dA . G Ω± S For an arbitrary field f , Gauss’s law in the initial placement reads Z Z Z Z Z ∂f ∂f ∂f dV = dV + dV = f dAk + f dAk = Ω± ∂Xk Ω+ ∂Xk Ω− ∂Xk ∂Ω+ ∂Ω− Z Z Z Z Z Z = f Nk dA + f + Nk+ dA + f Nk dA + f − Nk− dA = f Nk dA + Jf Nk K dA , ∂Ω+ \S S ∂Ω− \S S ∂Ω± (52) S with f + or f − as the limit value from the region Ω+ or Ω− on the interface and N + or N − showing outward the region Ω+ or Ω− , respectively. Moreover, we use Jf Nk K = f + Nk+ + f − Nk− . We assume that ∂S is closed (no singularities) such that we can use Stokes’s law with an arbitrary term fk as follows Z Z Z ∂fi fk dLk = curl(f )k dAk = kji dAk . (53) ∂Xj ∂S S S The general balance equation now reads  Z     ∂  V • V V −1 V V V (ψ J) − (wj − vj )ψ + Φj J(F )kj − ρ k + p J dV = ∂Xk Ω± r  Z  r  z ∂ΦSj Fji g = − (wj − vj )ψ V + ΦVj J(F −1 )kj Nk + kli Nk + pS dA . ∂X G l S 10 (54) Since we satisfy the left-hand side within the continuum body, we only need to assure to satisfy the right-hand side on the interface leading to the additional equation on the interface r r  z ∂ΦSj Fji g V V −1 S (55) (wj − vj )ψ + Φj J(F )kj Nk = kli Nk + p . ∂Xl G The volume density ψ V is mass, momentum, internal energy density, as in Table 2; its corresponding flux ΦVj is an area density. Analogously, the flux term ΦSj is a line density and pS is a production term; both of them exist only on the interface. For the mass, we know that neither flux nor production terms exist. Therefore, we assume that interface flux and production vanish such as r z (wj − vj )ρJ(F −1 )kj Nk = 0 , (56) has to be fulfilled. By setting wi = vi on the interface, we will satisfy the latter condition—in the implementation, this condition corresponds to forcing the computational mesh to follow the interface. There is, however, a flux term for the momentum. In mechanics the surface tension is the stress on the interface, see [17], [89], [54], [80]. In the case of electromagnetism, the production term on the interface needs to be calculated. As the volumetric production term is given in Eq. (37)2 , the area production term is due to the surface charges and currents. Surface charges and currents become important in mixtures with adhesion between particles. For a solid body, we simply neglect these effects and obtain the balance of momentum, r  z (wj − vj )ρvi + σji J(F −1 )kj Nk = 0 . (57) Since w = v on the interface, the first term drops out leaving r z σji J(F −1 )kj Nk = 0 . (58) Analogously, for the balance of internal energy on the interface, we use v = w and neglect the production as well as the line density flux term (surface heat) such that we obtain q y (59) qj Nk J(F −1 )kj = 0 . We may discuss the displacement field as a continuous variable, meaning that the continuum body fail to have any cracks. An analogous argument holds that all primitive variables are continuous and will be modeled as such. Moreover, the singular surface is an interface in which the surface normal in the current placement has to be continuous. These assertions of continuity yield the following jump conditions: JAi K = 0 , JφK = 0 , Jui K = 0 , JT K = 0 , Jnj K = JNk J(F −1 )kj K = 0 . (60) In the numerical implementation we need to guarantee that the latter equations apply on the interface. This condition is equivalent imposing that all primitive variables, A, φ, u, T , are continuous within the whole computational domain. As a consequence we have JEi K = 0 , JDi K = 0 , JBi K = 0 , JHi K = 0 . (61) Moreover, by deriving Maxwell’s equations from the balance equations, the following equations are obtained Jni Di K = 0 , Jijk nj Hk K = 0 , (62) under the assumption that no surface charges and currents exist. The jump terms emerge due to the difference of material parameters between the adjacent materials. Therefore, by using the latter, we can also deduce Jni Pi K = 0 , Jijk nj Mk K = 0 . (63) 3. Constitutive equations Various thermodynamical procedures exist in the literature. They all aim at deriving the constitutive equations for J fr. , σ, q, P , and M . We use a similar strategy as in [32] in which the main assumption is that the internal energy is recoverable, leading to an entropy with primary variables but not fluxes. For an extension of the 11 presented method, see [39]. We will compute the primitive variables in the whole domain: the temperature T , displacement u, electric potential φ, and magnetic potential A. In the end, every proposed constitutive equation has to depend only on the primitive variables (and their space and time derivatives). Since we have general relations in Eq. (8) between electromagnetic fields, E, B, and electromagnetic potentials, φ, A, we can also define dependencies with respect to E and B. The constitutive equations are necessary where a material occupies a region, they are also called material equations and are defined in the material frame. We start with Eq. (48)3 , i.e., the balance of internal energy in the material frame ∂Qi ∂u =− + ρ0 r + JΓ , Qi = J(F −1 )ij qj , ∂t ∂Xi dMi ∂vi dEi + Ei Jifr. − Pi + Bi , Ξji = σji − Pj Ei + Mi Bj . Γ = Ξji ∂xj dt dt ρ0 (64) The third and fourth terms in the production of internal energy, Γ, are crucial for deriving the constitutive equations for P and M . The second term in the production of internal energy is called Joule’s heat. We will see this term as a purely dissipative phenomenon. The first term can be rewritten JΞji ∂vi ∂vi ∂vi = JΞji (F −1 )kj = Nki , ∂xj ∂Xk ∂Xk (65) with the nominal stress Nji = J(F −1 )jk Ξki defined in the initial placement. Moreover, we observe in the material frame, d ∂xi ∂vi ∂ 2 xi ∂ 2 xi dFij (66) = = = = , dt dt ∂Xj ∂t∂Xj ∂Xj ∂t ∂Xj such that the balance of internal energy becomes ρ0 ∂Qi dEi dMi ∂u dFij =− + JEi Jifr. − JPi + JBi . + ρ0 r + Nji ∂t ∂Xi dt dt dt (67) Now we make several assumptions in order to deduce an equation for equilibrium. Since fields do not change in equilibrium, any external supply such as r or production such as Joule’s heat vanishes in equilibrium. In the most general case, we have to assume that the internal energy, heat flux, and electromagnetic polarization have reversible and irreversible parts. First, we assume that the internal energy is fully recoverable, neglecting the irreversible part of the internal energy. This is a conventional method that is appropriate for many engineering systems. We ignore effects of flux rates (the stress rate and heat flux rate) into the internal energy. For systems with high temperature rates or high velocity gradients, this method would be inaccurate and needs to be extended; see for example [39], [61]. The reversible part of the heat flux is given by a term called specific entropy, η, see ([32, Ch. XIV, §2])—this definition goes back to [18]—as follows − ∂Qi dη = ρ0 T , ∂Xi dt (68) where we need a constitutive equation for the entropy. We neglect any hysteresis in the electromagnetic response and assume that electric and magnetic polarizations are reversible. In equilibrium, the balance of internal energy reads ρ0 du = ρ0 T dη + Nji dFij − JPi dEi + JBi dMi , 1 1 1 du = T dη + Nji dFij − Pi dEi + Bi dMi , (69) ρ0 ρ ρ du = T dη + nji dFij − pi dEi + Bi dmi − Bi Mi dv , where pi = Pi /ρ is the specific electric polarization in the current placement, mi = Mi /ρ is the specific magnetic polarization in the current placement, p = Bi Mi is the electromagnetic pressure (owing to its unit), v = 1/ρ is the specific volume, and nji = Nji /ρ0 is the specific nominal stress in the initial placement. The last line can be called Gibbs’s equation. It is a perfect differential that allows us to determine the internal energy by integrating its differential form. This assumption is called the first law of thermodynamics, see [70]. From the differential form, we immediately realize that the internal energy depends on {η, Fij , Ei , mi , v}. Since we want to define η and mi , it is beneficial to have a dependence on their conjugate variables, namely T and Bi . This is 12 achieved by introducing a free energy: f = u − T η − B i mi , (70) and assuming that a perfect differential of this free energy exists such that df = du − dT η − T dη − dBi mi − Bi dmi , df = −η dT + nji dFij − pi dEi − mi dBi − p dv . (71) The free energy depends on {T, Fij , Ei , Bi , v}. They can be called primary or state variables. We have the following obvious relations ∂f = −η , ∂T ∂f = nji , ∂Fij ∂f = −pi , ∂Ei ∂f = −mi , ∂Bi ∂f = −p = −Bi Mi . ∂v (72) Additionally, because f depends on primary variables, each so-called dual variable, {η, nji , pi , mi , p}, depends on the same set of arguments—this is often named as equipresence principle, see [87, §293.η]—leading to 13 14 15 dη = c̃11 dT + c̃12 kl dFkl + c̃k dEk + c̃k dBk + c̃ dv , 22 23 24 25 dnji = c̃21 ji dT + c̃jikl dFkl + c̃jik dEk + c̃jik dBk + c̃ji dv , 32 33 34 35 dpi = c̃31 i dT + c̃ikl dFkl + c̃ik dEk + c̃ik dBk + c̃i dv , dmi = c̃41 i 51 dp = c̃ dT dT (73) 43 44 45 + c̃42 ikl dFkl + c̃ik dEk + c̃ik dBk + c̃i dv , 53 54 55 + c̃52 kl dFkl + c̃k dEk + c̃k dBk + c̃ dv . All material parameters, c̃11 , c̃12 , . . . , and c̃55 , need to be measured independently. There is a reduction of measurements due to the Maxwell symmetry relations (see Appendix D for their derivations). We can rewrite the above constitutive equations in the linear algebra fashion by using block matrices for the sake of clarity by     11  c̃ −c̃21 c̃31 c̃41 c̃51 dT dη lk k k 22 32 42 52     dnji  c̃21    ji c̃jikl −c̃kij −c̃kij −c̃ij   dFkl  33 43 53   dE  .  dpi  = c̃31 c̃32 (74) c̃ik c̃ki c̃i   k ikl    i 42 43 44 54   dB   dmi  c̃41 c̃ c̃ c̃ c̃ k i i ikl ik ik dp dv c̃55 c̃54 c̃53 c̃51 c̃52 k k kl The experiments to determine these coefficients are established by varying a primary variable while holding all other primary variables constant and measuring one dual variable. Consider the first dual variable: instead of measuring entropy, we observe the heat flux δQ = T dη and then measure temperature by holding the deformation gradient, electromagnetic fields, and mass density fixed at a specific value such that their variations are zero, i.e., dFkl = 0, dEi = 0, dBi = 0, dv = 0. The parameter c relating heat flux to temperature is called the specific heat capacity, δQ = c dT , so we obtain c̃11 = c/T . Heat capacity can depend on fields besides the temperature. The specific stiffness1 tensor, c̃22 jikl , is measured for a specifically chosen state of a held temperature, electromagnetic fields, and mass density and then applying a deformation and measuring stress. All 44 other coefficients can be measured in analogous settings. For example c̃33 ik and c̃ik are susceptibilities. Between 55 the electromagnetic pressure p and specific volume v, the coefficient c̃ can be measured by applying magnetic field and measuring the volume change. Such measurements are very challenging, but possible. Moreover, the 24 off-diagonal terms are different coupling terms between primary variables. For example, c̃23 jik and c̃jik are coupling stress with electromagnetic fields, called the specific piezoelectric and piezomagnetic material coefficients, respectively. Finding the suggested coefficients in the literature is challenging due to difficulties in making the described measurements. Hence, we will switch to quantities that are more regularly measured and thus appear more frequently in the literature. Coefficients of thermal expansion, αij , are measured by varying temperature and measuring length change dFij = αij dT , (75) 1 Note that this stiffness tensor is not the stiffness tensor which is normally discussed. In our derivation, we have a stiffness tensor to be the derivative of a non-symmetric tensor with respect to another non-symmetric tensor. Thus, the minor symmetries are not present. Further, since we never declared a quadratic strain energy function, the major symmetry is also not necessarily present. The symmetry relations are introduced as a consequence of any existing crystal symmetries. For example, in the case of an isotropic material, all aforementioned symmetries arise. 13 by holding every other variable fixed such that we acquire from Eq. (74)2,3,4,5 the following relations 22 21 22 0 = c̃21 ji dT + c̃jikl αkl dT ⇒ c̃ji = −c̃jikl αkl , 32 31 32 0 = c̃31 i dT + c̃ikl αkl dT ⇒ c̃i = −c̃ikl αkl , (76) 42 41 42 0 = c̃41 i dT + c̃ikl αkl dT ⇒ c̃i = −c̃ikl αkl , 51 0 = c̃51 dT + c̃52 = −c̃52 kl αkl dT ⇒ c̃ kl αkl . For simplicity we present the case, where material coefficients are constants in the corresponding variable of integration: c is constant in T and c̃22 jikl is constant in Fij and so on. In this case, we can easily integrate from a reference state T = Tref. , Fij = δij , Ei = 0, Bi = 0, and v = vref. to the current state. We define the reference state as the state in which all dual variables vanish. After integrating and multiplying by mass density, we obtain the relations  T  32 42 52 + c̃22 η = c ln lkij αij (Fkl − δkl ) − c̃kij αij Ek − c̃kij αij Bk − c̃ij αij (v − vref. ) , Tref. 22 32 42 52 Nji = −ρ0 c̃22 jikl αkl (T − Tref. ) + ρ0 c̃jikl (Fkl − δkl ) − ρ0 c̃kij Ek − ρ0 c̃kij Bk − ρ0 c̃ij (v − vref. ) , (77) P = −ρc̃32 α (T − T ) + ρc̃32 (F − δ ) + ρc̃33 E + ρc̃43 B + ρc̃53 (v − v ) , i Mi = p ref. kl kl ref. ikl kl ikl ik k ki k i 42 42 43 44 54 −ρc̃ikl αkl (T − Tref. ) + ρc̃ikl (Fkl − δkl ) + ρc̃ik Ek + ρc̃ik Bk + ρc̃i (v − vref. ) 52 53 54 55 = −c̃52 kl αkl (T − Tref. ) + c̃kl (Fkl − δkl ) + c̃k Ek + c̃k Bk + c̃ (v − vref. ) . , The reference temperature Tref. as well as the specific volume vref. need to be specified. Although these values are material specific, we assume that the initial mass density and temperature can be chosen as reference values. In other words, we start simulating from the ground state without entropy, stress, and polarization. Since the deformation gradient is the sum of identity and displacement gradient, we have ∂ui /∂Xj = Fij − δij . It is important to mention that we use ∂ui /∂Xj instead of strain, since the additional term in the nominal stress fail to be symmetric. The mechanical part of the nominal stress (transpose of the Piola stress) relates the current force to initial area and it is often called the engineering stress. In an experiment, the length change is recorded and often the so-called engineering strain is reported as current length (measured length change plus initial length) divided by the initial length, which is one component of Fij . Hence, we can use the reported stiffness values in c̃22 ijkl . For the thermodynamic analysis we have used specific variables; however, in reality the measurements are established utilizing stress and polarization, Nji , Pi , Mi , instead of their per mass values, nji , pi , mi . Therefore, we rename the material coefficients as follows ρ0 c̃22 jikl = Cjikl , el. ρc̃33 ik = ε0 χik , ρ0 c̃32 kij = T̃kij , ρc̃43 ki = R̃ki , ρ0 c̃42 kij = S̃kij , mag. −1 ρc̃44 ik = (µmag. )ij χjk . (78) As we have used the electromagnetic pressure (energy density) p = Mi Bi we obtain by multiplying Mi by Bi and matching the coefficients to p, 42 −1 c̃52 S̃ikl Bi , kl = ρc̃ikl Bi = J 43 c̃53 k = ρc̃ik Bi = R̃ik Bi , mag. 44 −1 c̃54 k = ρc̃ik Bi = (µmag. )ij χjk Bi , 54 c̃55 k = ρc̃i Bi . (79) Finally, we acquire the following constitutive equations  T  ∂uk + v0 Clkij αij − v0 T̃kij αij Ek − v0 (2 − J −1 )S̃kij αij Bk , Tref. ∂Xl  ∂uk  Nji = Cjikl − αkl (T − Tref. ) + − T̃kij Ek − (2 − J −1 )S̃kij Bk , ∂Xl  ∂uk  −1 Pi = J −1 T̃ikl − αkl (T − Tref. ) + + ε0 χel. )R̃ki Bk , ik Ek + (2 − J ∂Xl   ∂uk mag. Mi = J −1 S̃ikl − αkl (T − Tref. ) + + R̃ik Ek + (2 − J −1 )(µ−1 mag. )ij χjk Bk . ∂Xl η = c ln (80) mag. Especially, the stiffness tensor Cijkl , electric susceptibility χel. ij , magnetic susceptibility χij , permeability of the vacuum ε0 , permittivity of the material µij are available for many engineering materials. Piezoelectric and piezomagnetic coefficients, T̃ijk and S̃ijk , are also possible to find. Often, as stated in [56], the measurements 14 are undertaken by varying electric field and measuring displacement gradient, d∂ui /∂Xj = dkij dEk , and by determining dkij with the standard notation. In this case, we can readily find from Eq. (74)2 the relation (81) T̃mij = Cijkl dmkl . Also quite often, the piezomagnetic constants are given in T=N/(A ˆ m) as q̃ijk = µ0 S̃ijk . The magnetoelectric coupling R̃ij is rarely measured. For the case of nonlinear material equations, the functional form of the coefficients need to be known for the integration. In a slightly abusive notation we can include the nonlinear materials, for example for hyperelasticity Cjikl depends on Fij and by recalling ∂f = nji , ∂Fij ∂nji = c̃22 jikl , ∂Fkl we obtain Cjikl = ρ0 ρ0 c̃22 jikl = Cjikl , ∂2f , ∂Fij ∂Fkl ∂nji 42 = c̃24 jik = −c̃kij , ∂Bk S̃kij = −ρ0 ρ0 c̃42 kij = S̃kij , ∂2f . ∂Bk ∂Fij (82) (83) Especially for soft materials the measurement of the free energy is more feasible than the stiffness tensor, see [86]. For the case of an isotropic material, the free energy fail to depend on the material frame, thus, free energy’s dependency on the deformation gradient can be given by means of the invariants. From the thermodynamics point of view, any function can be suggested as a material equation. Yet there are some restrictions because of the approximative computation in a weak form, these are called ellipticity—in the special case of an isotropic material, invertibility—in order to assure a smooth deformation gradient, JF K = 0, within the computational domain, see [76]. For the isotropic case, the dependency is given by invariants instead of a single argument F . Then ellipticity holds in every single argument of the free energy, and this case is called quasiconvexity. The choice of the functional form and the material constants shall not violate the quasiconvexity in order to compute the primitive variables with sufficient smoothness. Since we have now defined all necessary constitutive equations, we insert Gibbs’s equation in the balance of internal energy to acquire ∂η ∂Qj ρ0 T =− + ρ0 r + JEi Jifr. , (84) ∂t ∂Xj emphasizing that we have assumed elasticity and no dissipation in polarization. With a slight rearrangement we obtain the balance of entropy: ρ0 ∂  Qj  Qj ∂T ∂η r J + − ρ0 = − 2 + Ei Jifr. ∂t ∂Xj T T T ∂Xj T (85) The entropy flux can differ from this formulation if the energy flux in Eq. (42) is defined differently. A well-known alternative includes the term E × H into the heat flux. In this formulation, the entropy flux and production would have an additional term in the heat flux similar to a Hall effect; for its elaborate discussion see [60, §9.9.4]. We continue by using the chosen definition leading to the usual definition as above and declare the thermodynamical fluxes −Qi and Jifr. to depend on the thermodynamical forces T −2 ∂T /∂Xi and JT −1 Ei . By using representation theorems, we can determine the following functional relationships −Qi = k̃ 11 T −2 ∂T + k̃ 12 JT −1 Ei , ∂Xi Jifr. = k̃ 21 T −2 ∂T + k̃ 22 JT −1 Ei . ∂Xi (86) According to the second law of thermodynamics, the entropy production has to be positive for any process, i.e., k̃ 11 T −4 ∂T ∂T ∂T + (k̃ 12 + k̃ 21 )JT −3 Ei + k̃ 22 JT −1 Ei Ei ≥ 0 ∂Xi ∂Xi ∂Xi (87) such that we obtain the restrictions k̃ 11 ≥ 0 , k̃ 12 + k̃ 21 = 0 , k̃ 22 ≥ 0 , (88) since the absolute temperature is positive, T > 0, and the determinant of the deformation gradient is positive, J > 0. The coefficients, k̃ ×× , are scalar functions depending on the invariants of temperature gradient and 15 electric field. For the simplified case of constant coefficients, the above linear relations can be derived by using statistical mechanics, where the second restriction k̃ 12 = −k̃ 21 is named after Onsager. For showing the relevance to well-established phenomenological equations, we rename the material parameters κ = k̃ 11 T −2 , ς = k̃ 22 JT −1 , ςπ = −k̃ 12 T −2 , (89) ∂T + ςEi . ∂Xi (90) and obtain the following constitutive equations: Qi = −κ ∂T + ςπT JEi , ∂Xi Jifr. = ςπ The heat conduction coefficient, κ, electrical conductivity, ς, and the thermoelectric coupling coefficient, π, are determined experimentally. The thermoelectric coupling is found to be constant for many engineering materials. Often it is called the Peltier constant. Although every conducting material possesses a Peltier constant, it might be small enough to be ignored. For the case of κ = const. and π = 0, the constitutive equation for the heat flux is called Fourier’s law. For the case of ς = const. and π = 0, the constitutive equation for the electric current is named after Ohm. 4. Computational approach A considerable amount of studies and efforts are undertaken for solving mechanics and electromagnetism. For thermomechanics, we may claim the finite element method (FEM) with Galerkin approach using standard (continuous piecewise polynomials called Pn elements) n-times differential elements is the gold standard. If it comes to electromagnetism, there are several methods among scientists—for example see [13], [20], [21, Sect. 17], [45], [25], [2], [27]—and a consensus is yet missing. If one aims at solving electromagnetic fields E and B by satisfying Maxwell’s equations, then FEM with standard elements cannot be used and there are various so-called mixed elements, see [5], whose techniques are based on works of [74] and [63]. Very roughly summarized, the mixed elements possess special forms for the functions fulfilling two of Maxwell’s equations. From a theoretical point of view, this method is correct since the ultimate goal is to compute the electromagnetic fields directly. As we have seen in the formulation, the introduction of electromagnetic potentials, φ and A, simplifies the procedure by solving two of Maxwell’s equations in a closed form. As a consequence, we can set the objective to compute the electromagnetic potentials by means of standard elements, as successfully applied in [1, Chap. 3]. After computing electromagnetic potentials, we can easily derive the electromagnetic fields by post-processing the solution with the equations ∂Ai ∂Ak ∂φ − , Bi = ijk , Ei = − (91) ∂xi ∂t ∂xj where x denotes the coordinate in the Eulerian frame; i.e., the derivatives ∂/∂t and ∂/∂xi are taken with respect to the spatial position in the laboratory frame. The space in this frame will be discretized for the computation by using standard triangulation/tetrahedralization methods. The nodes possess coordinates in the laboratory frame. However, the nodes can move with an arbitrary velocity w which we call the domain or mesh velocity and emphasize that it is arbitrary. In order to satisfy Eq. (58), we choose w based on the motion of the continuum body. All script values, D , H , E , and B are measured in the moving domain. We will use their counterparts D, H, E, and B in the laboratory frame (as a coincidence D = D and B = B). The electromagnetic potentials φ and A are calculated by fulfilling the governing Eqs. (21) with the total charge: Ji = Jifr. + q fr. vi + Di = ε0 Ei , ∂Pi ∂Mk + ijk , ∂t ∂xj 1 Hi = Bi , µ0 q fr. = Di = Di + Pi , 16 ∂Di , ∂xi Hi = Hi − Mi , (92) as well as the material specific relations: ∂T + ςEi , ∂Xi  ∂uk  −1 + ε0 χel. )R̃ki Bk , Pi = J −1 T̃ikl − αkl (T − Tref. ) + ik Ek + (2 − J ∂Xl   ∂uk mag. Mi = J −1 S̃ikl − αkl (T − Tref. ) + + R̃ik Ek + (2 − J −1 )(µ−1 mag. )ij χjk Bk , ∂Xl Jifr. = ςπ (93) where the differentiation in space occurs in the Lagrangean frame in coordinates X, which can be visualized as moving with the material velocity vi = ∂ui /∂t. The displacement, u, and temperature, T , as well as their gradients are computed in the Lagrangean frame. For example, ∂ui /∂Xj is computed in the Lagrangean frame and then mapped to the Eulerian frame by projecting this tensor to each coordinate x. Deformation is obtained by fulfilling the balance of momentum ρ0  ∂  ∂ 2 ui = J(F −1 )kj σji + ρ0 fi + JFi 2 ∂t ∂Xk (94) by using the displacement u as a function in the initial placement. Initial mass density, ρ0 , is a given constant for a homogeneous material and is a known function in X for a heterogeneous material, and so is the specific body force due to the gravitation, f . The electromagnetic force density in the Lagrangean frame reads JFi = JqEi + Jijk Jj Bk − Jijk ∂Pj ∂Bk Bk − Jijk Pj , ∂t ∂t (95) where this time q = ∂Di /∂xi , Bi and Ei from Eq. (91) are computed in the Eulerian frame and projected to the Lagrangean frame as scalar, vectors, respectively. The stress, σji = J −1 Fjk Nki + Pj Ei − Mi Bj ,  ∂uk  Nji = Cjikl − αkl (T − Tref. ) + − T̃kij Ek − (2 − J −1 )S̃kij Bk , ∂Xl (96) has been derived such that Eq. (94) is closed and can be solved. Temperature, T , can either be solved by using the balance of internal energy or the balance of entropy. We use the latter ρ0 ∂  Qj  Qj ∂T ∂η r J + − ρ0 = − 2 + Ei Jifr. , ∂t ∂Xj T T T ∂Xj T (97) by closing it with the following constitutive equations η = c ln  T  ∂uk + v0 Clkij αij − v0 T̃kij αij Ek − v0 (2 − J −1 )S̃kij αij Bk , Tref. ∂Xl ∂T Qi = −κ + ςπT JEi . ∂Xi (98) The governing equations will be rewritten as integral forms leading to a nonlinear and coupled weak form. This nonlinear and coupled weak form will be solved numerically. 4.1. Variational formulation The whole computational domain is divided into non-overlapping finite elements with compact support. This discrete representation of the domain allows us to fulfill governing equations in finite elements. The equations are written as residuals and multiplied by a suitable test function in order to obtain scalar functions, which are then integrated over a finite element. This procedure is often called the variational formulation.2 Within the finite element, the fields are n-times continuous and we will use standard Lagrange polynomial tetrahedral elements of order one such that their first derivative in space exists. All analytic fields are represented by discrete functions, and so we omit a notational indication for the discrete functions. For the discretization in time, we use the backward Euler method since it is an implicit L-stable method. For every partial time derivative, we 2 Actually, the variational formulation is a terminology to be used if one starts with action and obtains the same integral form by taking its first variation. Since the outcome is identical, we use the same wording. 17 apply ∂(·) (·) − (·)0 (99) = , ∂t ∆t where the superscript 0 denotes the value at the previous timestep. For second derivatives in time, we combine estimates of the first derivative at the current timestep and previous timestep to obtain (·) − 2(·)0 + (·)00 ∂ 2 (·) = , ∂t2 ∆t∆t (100) where the superscript 00 denotes the value two timesteps ago. Thus, in our scheme, we solve the systems of equations for the current field value at t while using the previous values at t − ∆t (“0”) and t − 2∆t (“00”). We begin formulating the variational form to solve the electromagnetic fields as computed in the current placement. The governing Eqs. (21) as residuals read ∂Ji ∂q + =0, ∂t ∂xi ∂Dj ∂Hi − jki + Jj = 0 . ∂t ∂xk (101) The first scalar equation will deliver the scalar potential, φ, and the second vector equations will serve for the vector potential, A. By utilizing the variational formulation, we acquire the integral form,  Z  ∂Ji q − q0 (102) + δφ dv = 0 . ∆t ∂xi Ω We multiply the form by ∆t in order to bring it to the unit of energy. Moreover, we observe the derivative of the electric current, which includes E depending on the derivative of φ. Therefore, the unknown φ has to be twice differentiable. Same holds for q including the derivative of D depending on E. This condition is weakened by integrating by parts, leading to the so-called weak form:  Z  Z ∂δφ 0 Fφ = − (Di − Di ) − ∆tJi dv + ni (Di − Di0 + ∆tJi )δφ da , (103) ∂xi Ω ∂Ω where n is the unit normal on the element surface. If we sum up over all elements, which is called assembly then the weak form becomes  XZ  XZ q y ∂δφ Fφ = − (Di − Di0 ) − ∆tJi dv + ni (Di − Di0 + ∆tJi )δφ da+ ∂xi sur. ∂Ω ele. Ω (104) XZ 0 + ni (Di − Di + ∆tJi )δφ da . outer ∂Ω Three distinct summations are applied: summation over the elements, summation over the inner surfaces with two adjacent elements, and summation over the outer surfaces being on the computational domain boundary. The computational domain is a sphere including the continuum body such that the computational domain boundary represents the far away boundaries, where electromagnetic potentials vanish. We set φ at the computational domain via Dirichlet boundary condition such that its test function on the outer ∂Ω vanishes. For the term in jump brackets we use Eqs. (61) as follows  q y r  ∂Mk  z r ∂Mk  z ni (Di − Di0 + ∆tJi )δφ = ni ∆tJifr. + Pi − Pi0 + ∆tijk δφ = ni ∆t Jifr. + ijk δφ . (105) ∂xj ∂xj Finally, we obtain the weak form for computing the electric potential in the Eulerian frame,   XZ r XZ  ∂Mk  z ∂δφ 0 dv + ni ∆t Jifr. + ijk δφ da . Fφ = − (Di − Di ) − ∆tJi ∂xi ∂xj Ω sur. ∂Ω (106) ele. To improve the numerical stability, we rewrite the second equation by inserting the Maxwell–Lorentz aether 18 relations and then the electromagnetic potentials from Eq. (8) as follows ∂ε0 Ej ∂ 1  − jki Bi + J j = 0 , ∂t ∂xk µ0 1 ∂2φ ∂ 2 Aj ∂ 2 Am − −ε0 − ε0   + Jj = 0 , jki ilm ∂t∂xj ∂t2 µ0 ∂xk ∂xl 1 ∂ 2 Aj 1 ∂Ak  ∂ 2 Aj ∂  ∂φ + ε0 + − ε0 + Jj = 0 , − 2 ∂xj ∂t µ0 ∂xk ∂t µ0 ∂xk ∂xk (107) since jki ilm = δjl δkm − δjm δkl . The first term in brackets vanishes as a consequence of Lorenz’s gauge in Eq. (9). Then the variational formulation delivers  Aj − 2A0j + A00 1 ∂ 2 Aj j + + Jj δAj dv = 0 , ∆t∆t µ0 ∂xk ∂xk Ω Z  0 00 Pj − Pj0 Aj − 2Aj + Aj 1 ∂Aj ∂δAj = − ε0 δAj − + Jjfr. δAj + δAj − ∆t∆t µ0 ∂xk ∂xk ∆t Ω   Z  ∂δAj 1 ∂Aj −jki Mi dv + + jki Mi δAj nk da , ∂xk µ 0 ∂xk ∂Ω Z  − ε0 FA (108) after an integration by parts on the terms already including a derivative. The integral form is in the unit of energy. The assembly generates a jump term, t |  1 ∂Aj + jki Mi δAj nk , (109) µ0 ∂xk which vanishes by using Eqs. (61), (63). Moreover, we set the magnetic potential zero at the computational domain boundary. Hence, the weak form for the magnetic potential reads in the Eulerian frame,  XZ  Pj − Pj0 Aj − 2A0j + A00 1 ∂Aj ∂δAj ∂δAj j δAj − + Jjfr. δAj + δAj − jki Mi FA = − ε0 dv . (110) ∆t∆t µ0 ∂xk ∂xk ∆t ∂xk Ω ele. In the case of thermomechanics, we solve T and ui in the Lagrangean frame. With the variational formulation discrete in time and after integrating by parts, the balance of linear momentum reads  Z  Z ui − 2u0i + u00 ∂δui i −1 Fu = ρ0 δui + J(F )kj σji δui − ρ0 fi δui − JFi δui dV − J(F −1 )kj σji δui Nk dA , ∆t∆t ∂Xk B0 ∂B0 (111) where we distinguish between the infinitesimal elements, plane normals, as well as domains in the Lagrangean and Eulerian frames for the sake of clarity. The latter integral form is in the unit of energy. The assembly results in a vanishing jump term in connection with Eq. (58). On the boundaries, where the boundary for the thermomechanics means the interface to the surrounding air, either we set the displacements by using Dirichlet condition or set the applied traction force per area t̂i = Nk J(F −1 )kj σji by using Neumann condition. The weak form for computing the displacement reads  XZ X Z  ui − 2u0 + u00 ∂δui i i δui + J(F −1 )kj σji − ρ0 fi δui − JFi δui dV + t̂i δui dA (112) Fu = ρ0 ∆t∆t ∂Xk B0 outer ∂B0 ele. Analogously, for computing the temperature we obtain the weak form by using the time discretization, applying the variational formulation, multiplying by ∆t in order to bring it to the unit of energy, and integrating by parts  Z  r Qj ∂T J Qj ∂δT 0 fr. FT = − ∆tρ0 δT + ∆t 2 δT − ∆t Ei Ji δT dV + ρ0 (η − η )δT − ∆t T ∂Xj T T ∂Xj T B0 Z (113) Qj + ∆t δT Nj dA . T ∂B0 The assembly results in a jump term, which vanishes between the elements by means of Eqs. (59), (64)2 . On 19 the interface to the surrounding air, we model this jump as follows r z Qj Nj = h(T − Tref. ) , (114) with the convective heat transfer coefficient h furnishing an exchange between the continuum body and environment depending on the velocity of the surrounding fluid. This approximation is necessary since we skip to compute the velocity of the surrounding air directly. Analogously, on the computational boundary we set T = Tref. as Dirichlet boundaries. The weak form to compute T in the Lagrangean frame reads  XZ  Qj ∂δT r Qj ∂T J FT = ρ0 (η − η 0 )δT − ∆t − ∆tρ0 δT + ∆t 2 δT − ∆t Ei Jifr. δT dV + T ∂Xj T T ∂Xj T ele. B0 (115) Z X h(T − Tref. ) δT dA . + ∆t T outer ∂B0 We recall that we solve for the same time instant Fφ + FA in the Eulerian frame and Fu + FT in the Lagrangean frame. 4.2. Mesh morphing The weak form Fφ + FA in Eqs. (106) and (110) is solved in the Eulerian frame for the whole computational domain, i.e., continuum body embedded in air (or vacuum). The whole computational domain includes the continuum body such that we need to move the continuum body to its current placement for solving the weak forms in the Eulerian frame. The idea is similar to the fluid-structure interaction; however, the electromagnetic fields are also described within the continuum body. The weak form Fu + FT in Eqs. (112), (115) needs to be solved in the Lagrangean frame only within the continuum body and not in the surrounding air. The motion of the continuum body within the computational domain connects these two frames such that we move the mesh by the displacement of the continuum body. This particular choice is justified by Eq. (56). For the surrounding air we spare solving the displacement such that we morph the surrounding domain in a particular way explained below in order to maintain the mesh quality. A Delaunay triangulation is constructed from nodes in the moving material and on the fixed boundary using the positions in the original configuration. The nodes in the surrounding air are “glued” to this new triangle mesh. The displacement from the current configuration in the material is interpolated at air node position to give it a new position using the Barycentric coordinates of the node in the triangle as the shape functions for the interpolations. The connectivity of the original mesh is preserved during this process. The Delaunay triangulation is computed using the Scipy module, which provides the Barycentric coordinate transform and fast point-in-triangle detection [65], [58]. The list of points of fix nodes should contain a convex hull enclosing the domain, otherwise the interpolation is ill-defined. 4.3. Coupled time stepping algorithm The thermomechanical fields u and T are defined on a submesh of the computational domain corresponding the material body. This submesh is defined as matmesh The electromagnetic potentials φ and A are defined on the mesh of the whole computational domain. They are coupled using a sequential time stepping scheme. At every time-step, the finite element coefficients from the electromagnetic finite element functions are mapped onto the equivalent coefficients on the submesh of the domain occupied by the continuum body. Then, the thermomechanical problem is solved for u and T at the next time-step. The displacement u is used to morph the mesh and then the thermomechanical fields are mapped onto the morphed mesh of the whole domain. The procedure of the time stepping algorithm is listed in Algorithm 2. 4.4. Implementation Details The entire algorithm is implemented in Python using the open-source packages developed under the FEniCS project [47, 36, 48]. The mesh morphing algorithm, as well as other utility functions, is included for use in different applications in the library afqsfenicsutils.3 The FEniCS implementation for the variational equations 3 The git repository is located at https://bitbucket.org/afqueiruga/afqsfenicsutil 20 Algorithm 1 Calculate Mesh morphing procedure. Note, the variable tris is a list of tetrahedra in 3D. Require: Nodes X, indices fixed nodes ng ← Geometric dimension (2 or 3) Xf ← X[fixed nodes] tris ← Delaunay(Xf ) Preallocate X 0 for y ∈ X and y ∈ / Xf do if y ∈ / Xf then Find t ∈ tris s.t. y ∈ t using search tree. B ← Barycentric transformation matrix of t s[0 : ng − 2] ← B · y s[n − 1] ← 1 − sum(s[0 : ng − 2]) y 0 [i] ← s[j] ∗ Xf [t[j]][i] for j = 0...ng for i = 0...ng − 1 X 0 [end] ← y 0 else X 0 [end] ← y end if end for return X 0 Algorithm 2 Main Simulation Procedure mesh ← File matmesh ←⊂ mesh where mesh is marked as material. f ix nodes ← vertex indices[matmesh ∪ ∂mesh] uEM , AEM ← Thermomechanical and electromagnetic functions on mesh uT M , AT M ← Thermomechanical and electromagnetic functions on matmesh while t < tmax do Pull solution coefficients onto matmesh: AT M .coeffs[:] ← AEM .coeffs[indices] Solve F T M (uT M ; AT M ) = 0 for uT M (t + ∆t) Push solution coefficients onto mesh: uEM .coeffs[indices] ← uT M .coeffs[:] mesh.X ← morph(mesh.X + uEM , f ix nodes) Solve F EM (AEM ; uEM ) = 0 for AEM (t + ∆t) t ← t + ∆t Advance history: A(t + ∆t) → A(t) → A(t − ∆t) end while and coupling system is available at the repository located at https://github.com/afqueiruga/EMSI-2018. (This repository will automatically download the independent libraries as a git submodule.) All codes are released under the GNU Public license as in [28]. 5. Examples We illustrate the functionality and versatility of the framework based upon the presented theoretical formulation and numerical algorithm by applying it to three engineering applications. We have chosen the examples where the interaction of thermomechanics with electromagnetism generates new design opportunities necessitating robust and accurate computation of such coupled and nonlinear multiphysics problem by using the simulation strategy developed herein. Smart structure applications use materials with integrated sensor and actuator functionalities. There are only a few known natural materials presenting electromagnetic and mechanical coupling inherently. Therefore, functionalized materials are synthesized by combining materials with different abilities. In various branches of industry, these types of functionalized materials are applied in applications such health monitoring; shape, temperature, or vibration control; or energy harvesting. For examples by using a piezoelectric material, we refer to [92], [50], [69], [81], [41], [42], [44], [16], [93], [68], [88], [85], [66]. In [26], [24], [6], [12], [31], [46], [33], a magnetoelastic material is used for different applications. Thermoelectric coupling is demonstrated in [77], [96], [35]. We present three examples that are representative of new industry applications: a piezoelectric fan, 21 Figure 1: CAD model of the piezoelectric fan: on the epoxy beam (green), four piezoelectric patches (red) are attached comprising the continuum body B0 embedded in air (gray, transparent). a magnetorheological elastomer, and a thermoelectric cooler. 5.1. Piezoelectric fan A thin beam of 100 mm × 15 mm × 1 mm is modeled out of epoxy with four piezoelectric patches. Each patch is of two layers connected in parallel. In practice, many layers are used to increase the effect, herein we present a simplified computation with the geometry shown in Fig. 1. The continuum body, B0 , is embedded in a cylindrical domain, modeling surrounding air, with far-away boundaries where the electromagnetic potentials vanish. Piezoelectric patches are made of 2 layers each of 0.5 mm thickness. They are poled along z-direction. For the piezoceramic and epoxy, we use the stiffness matrix CIJ in Voigt’s notation   C1111 C1122 C1133 C1123 C1113 C1112 C2211 C2222 C2233 C2223 C2213 C2212    C3311 C3322 C3333 C3323 C3313 C3312   CIJ =  (116) C2311 C2322 C2333 C2323 C2313 C2312  .   C1311 C1322 C1333 C1323 C1313 C1312  C1211 C1222 C1233 C1223 C1213 C1212 Epoxy is an amorph material having translational isotropic,  λ + 2µ λ λ  λ λ + 2µ λ   λ λ λ + 2µ CIJ =   0 0 0   0 0 0 0 0 0 and rotational symmetry such that the stiffness matrix is  0 0 0 0 0 0  0 0 0  , µ 0 0  0 µ 0 0 0 µ λ= (E − 2G)G , 3G − E µ=G, (117) with Young’s modulus E and shear modulus G. As piezoceramic we use PZT-5H poled along z = x3 . For this anisotropic PZT-5H, the compliance matrix   S11 −νS11 −νS11 0 0 0 −νS11  S11 −νS11 0 0 0   −νS11 −νS11  S33 0 0 0  , SIJ =  (118)  0  0 0 (1 + ν)S11 0 0    0  0 0 0 (1 + ν)S11 0 0 0 0 0 0 (1 + ν)S11 22 is used to obtain the stiffness matrix CIJ = (SJI )−1 .  d˜111 d˜122 d˜133 d˜123 d˜131 ˜ diJ = d˜211 d˜222 d˜233 d˜223 d˜231 d˜311 d˜322 d˜333 d˜323 d˜331 The piezoelectric constants, d˜iJ , read   d˜112 0 0 0 0 d˜15 ˜ ˜ d212  =  0 0 0 d15 0 d˜312 d˜31 d˜31 d˜33 0 0  0 0 , 0 (119) where Voigt’s notation is applied on the last two indices (mapping to multiplication by the displacement gradient in Voigt’s notation). The susceptibility is given by the relative permittivity values by  el.  ε̄11 0 0  0 ε̄el. 0  − δij . χel. (120) 11 ij = 0 0 ε̄el. 33 We assume that the material has no piezomagnetic and magnetoelectric coupling, i.e., S̃ijk = 0 and R̃ij = 0, respectively. We compile all necessary material parameters in Table 3. Thermoelectric constant and electric conductivity is set to zero for the beam and patches. We apply a sinusoidal electric potential difference on the Table 3: Material constants used in the simulation for the epoxy material, PZT-5H as the piezoceramic, and the surrounding air. Mass density Compliance Young’s modulus ρ in kg/m3 S11 S12 S13 S33 S44 S66 in in in in in in Dielectric constants Specific heat capacity Coefficients of thermal expansion Thermal conductivity PZT-5H 2500 7500 Air 16.5 · 10−12 −4.78 · 10−12 −8.45 · 10−12 20.7 · 10−12 43.5 · 10−12 42.6 · 10−12 m2 /N m2 /N m2 /N m2 /N m2 /N m2 /N E in N/m2 30 · 109 ν 0.4 d˜33 in m/V d˜31 in m/V d˜15 in m/V 0 0 0 585 · 10−12 −265 · 10−12 730 · 10−12 ε̄el. 33 ε̄el. 11 1 1 3400 3130 c in J/(kg K) 800 350 α33 in K−1 α11 in K−1 15 · 10−6 15 · 10−6 −4 · 10−6 6 · 10−6 κ in W/(m K) 1.3 1.1 Poisson’s ratio Piezoelectric constants Epoxy 1 1 middle layer of 2 layers piezoelectric patch by grounding the bottom and upper faces. Along z-axis an electric field emerge that leads to a contraction along x as well as y-axis because of d˜31 . Since the potential difference from the middle to the top layer and from the middle to the bottom layer produces in electric fields that are opposed to each other in the each layer, one layer stretches when the other layer contracts. The bending in each patch bends the entire beam as shown in Fig. 2. We have applied a relatively big potential difference (amplitude) of 50 kV in order to generate a big deformation by using only 2 layers of patches. The displacement of the tip and the maximum temperature in the device over the course of the simulation is plotted in Fig. 3. Owing to the exaggerated potential difference, a significant temperature change occurs because of the electric field jump on the middle layer is generated as presented. Further engineering on this type of device would be needed to reduce the required potential difference and resultant heat production, which is possible due to the fully coupled simulation demonstrated. 23 Figure 2: Configuration of the beam bend by the piezoelectric patches. The continuum body is colored by the magnitude of the displacement as well as morphed by the displacement without scaling. The air mesh is not colored by any field and has a crinkle cut to reveal the fan and illustrate the morphing of the elements. Figure 3: Displacement of the tip of the device (left) and the maximum temperature in the device (right) over the course of the simulation. 24 Figure 4: CAD model of the magnetorheological elastomer (orange) embedded in air (gray, transparent). 5.2. Magnetorheological elastomer The deformation and magnetic field coupling is often called magnetostriction; but it is insignificant in natural materials. By designing a functionalized material, this behavior is used extensively for smart structures. Consider an elastomer filled with iron spherical particles with sizes on the order of micrometers. To model this material at the macroscopic scale, we homogenize the material into a magnetorheological elastomer. The thermomechanical behavior of the composite will be primarily representative of the elastomer matrix, with additional electromagnetic properties due to the iron additives. Because the iron particles are spherical, an elastomer with an amorph structure will remain isotropic if no external magnetic field was applied during the curing[46]. This crystalline structure with inversion symmetry prohibits any piezoelectric effects, T̃ijk = 0. We assume that the magnetoelectric coupling vanishes, R̃ij = 0. A piezoelectric effect is possible depending on the crosslinking of the polymer chains in the elastomer. A magnetoelectric coupling is also expected to arise as a consequence of this effect. The computational framework could include this effect with the necessary material constants, but it was neglected for this simulation. The functionalized material considered is taken to be a silicone gel TSE2062 filled with carbonyl-iron particles. By assuming an equal and distinct distribution and successful curing, the elastomer has the thermomechanical properties of the silicon. This approximation depends on the relative amount of the iron particles used in the manufacturing. Increasing the amount leads to agglomerated particles building “bridges” between the distinct iron particles such that the thermomechanical characteristics of the composite material change dramatically. For an accurate treatment we refer to [98] and [97]. The material properties of the composite material—the particles embedded within the gel—are challenging to quantify, see the measurements in [37], [4], and [95]. Accurate material modeling of these measurements is also discussed heavily in the literature [15], [40], [78], [82], [57], [79], [55]. The following free energy density is the basis of the response:   I   µ 4 ρ0 f = 1 + α̃ tanh (1 + n)(I1 − 3) + (1 − n)(I2 − 3) + qI4 + rI6 , 4 Bs  1 2 Cij = Fji Fjk , I1 = Cii , I2 = I1 − Cij Cji , I4 = Bi Bi , I6 = Cij Bj Cik Bk . 2 (121) We have assumed an isochoric material as well as a neo-Hookean mechanical response. The parameters used for composite material are µ = 260 · 103 Pa , Bs = 1 T2 , α̃ = 0.3 , n = 0.3 , q=r= 1 . µ0 (122) A simple plate of 10 mm×10 mm×1 mm is embedded in air as shown in Fig. 4. The plate is clamped on one side and a tangential traction is applied to opposite end oriented in the z-axis. We first apply the load with no 25 Figure 5: Configuration of the magnetorheological elastomer before and after the mechanical load is applied. The plate is colored by the magnitude of the displacement as well as morphed by the displacement without scaling. The air or vacuum mesh is not colored by any field and has a crinkle cut to present the morphing of the elements. Figure 6: Configuration of the magnetorheological elastomer as the magnetic field is increased as 3 s (left) and 6 s (right). The arrows indicated the magnitude and orientation of the magnetic flux density B. The plate is colored by the magnitude of the displacement as well as morphed by the displacement without scaling. The air or vacuum mesh is not colored by any field and has a crinkle cut to present the morphing of the elements. electromagnetic fields present, deforming it from its reference state into to an initial, deformed state shown in Fig. 5. This step is a performed as a nonlinear static solution of only the mechanical fields. We emphasize that no scaling is used such that the presented deformation is the actual computed deformation. The mechanical load is held constant throughout the rest of simulation. At the outer boundaries, ∂Ω, the following magnetic potential is applied leading to a time-varying spatially-constant magnetic flux,     0 0 ∂A k Ai = xBo sin(2πνt) , Bi = ijk =  0  , ∀x ∈ ∂Ω . (123) ∂xj 0 Bo The boundary conditions are φ = 0 and the above form for A using a 10 s period, ν = 0.1. The deformation change at 3 s and 6 s is presented in Fig. 6. As the magnetic field increases, the body effectively stiffens leading to a smaller deformation under the same applied force. The stiffening of the structure is controlled by the material parameters in Eq. (121), mainly by α̃ until the saturation is achieved at Bs . As seen in Fig. 6, increasing B increases the stiffening effect, decreasing the magnitude of the deformation. This contactless stiffening mechanism could be used as either a sensor or actuator in a power transmission application where a winding (not included in the simulation) would be used to generate/sense the magnetic field. 5.3. Thermoelectric heat recovery We demonstrate the applicability of the frame to typical component-based electronic devices by simulating a thermoelectric heat recovery strategy. The device is modeled as an assembly of two integrated circuits joined by copper traces, and a thermoelectric ceramic mounted on top of a substrate. The whole assembly is over molded in a silicon gel in order to reduce the environment effects such as corrosion (shown in the right side 26 Figure 7: A simplified circuit board. Left: On the board (blue) two microchips (gray) are attached that are connected by traces (yellow). On top of the chips a thermoelectric ceramic (transparent, orange) is placed. Right: The whole assembly out of the board, chips, traces overmolded by a silicon gel (green) is embedded in air (transparent, gray). Figure 8: Output of the thermoelectric device, electric potential difference, ∆φ in mV, as a result of AC put over the traces. of Fig 7. Because of the environmental large temperature changes, thermal stresses appear and the chosen gel affects the reliability of the assembly as well. An alternating current (AC) is used with an electric potential difference of 12 V on the trace endings in front as seen in Fig. 7. During operation of the device, Joule heating causes a temperature change that effects energy recovery through the thermoelectric material. This produces an increase in the temperature leading to an electric current across the piezoceramic sheet measured as a potential difference. This sheet includes an assembly of conductive materials with a thermoelectric constant π generating an electric current in Eq. (93) because of a temperature difference. The simplified geometry is shown in Fig. 7. The board is out of a composite material, mostly glass reinforced epoxy resin. The microchips are represented as ceramic materials without the detailed internal assembly. As an electric current passes the chip, due to the resistance, it heats up. Communication traces between the two integrated circuits are simplified to a sole copper element (instead of discretizing each of the dozens independent traces that would normally be present.) The endpoints at the traces in frontside of the device (apparent on the left side of Fig. 7, a given electric potential difference creates an electric current through the chips leading to Joule’s heating. A temperature difference causes a heat flux and in addition to that an electric current. The chips heat up the thermoelectric ceramic sheet from below, at the same time, on top of the sheet a cooling agent (like water in a closed system) reduces the temperature by a mixed boundary condition, h(T −Tref. ), with a high convection constant h = 105 J/(s m2 K). We record this difference over time and present in Fig. 8. The thermoelectric energy harvesting shown in this simulation is not effective enough for this type of device. However, it can be used in clusters or in environments, where receiving energy is challenging. It is important to notice that this coupling is inherent in the material and no degradation is expected to occur. 27 6. Conclusion We have developed a complete theory of continuum mechanics with electromagnetic interaction in solid bodies under large deformations. Balance equations for mechanical, thermal, and electromagnetic fields have been discussed and all necessary constitutive equations have been derived by exploiting thermodynamical principles. The constitutive equations are the simplest possible, where linear relations are used neglecting viscous response and electromagnetic hysteresis have been ignored. Despite the linearized form of the responses, the resulting variational form is nonlinear with complete coupling of all of the mechanical and electromagnetic fields. In order to reduce the computational cost, we have proposed a novel method and solve electromagnetic fields in the whole domain, whereas the deformation and temperature are solved only within the continuum body. Separation of field and matter is possible; however, their equations are defined in different placements. Therefore, from the very beginning of the development of the theory, we have emphasized different placements by using an explicit notation. Numerical solution in two different placements is possible by using a staggered time integration scheme as the mesh morphing algorithm presented. The nonlinear variational forms were implemented using the finite element method using FEniCS. In order to encourage further achievements, the mesh morphing algorithm implementation is released under the GNU LGPL https://github.com/afqueiruga/afqsfenicsutil and the scripts and geometry files that performed the simulations are released under the GNU GPL at the repository https://github.com/afqueiruga/EMSI-2018. References [1] B. E. Abali. Computational Reality, Solving Nonlinear and Coupled Problems in Continuum Mechanics. Advanced Structured Materials. Springer, 2016. ISBN 978-981-10-2443-6. [2] B. E. Abali and F. A. Reich. Thermodynamically consistent derivation and computation of electro-thermo-mechanical systems for solid bodies. Computer Methods in Applied Mechanics and Engineering, 2017. [3] Sheikh N Ahmad, CS Upadhyay, and C Venkatesan. Electro-thermo-elastic formulation for the analysis of smart structures. Smart materials and structures, 15(2):401, 2006. [4] Haining An, Stephen J Picken, and Eduardo Mendes. Nonlinear rheological study of magneto responsive soft gels. Polymer, 53(19):4164–4170, 2012. [5] Douglas N Arnold and Anders Logg. Periodic table of the finite elements. SIAM News, 47(9), 2014. [6] G Ausanio, AC Barone, C Hison, V Iannotti, G Mannara, and L Lanotte. Magnetoelastic sensor application in civil buildings monitoring. Sensors and Actuators A: Physical, 123:290–295, 2005. [7] Matthew I Barham, Daniel A White, and David J Steigmann. Finite element modeling of the deformation of magnetoelastic film. Journal of Computational Physics, 229(18):6193–6207, 2010. [8] Stephen M Barnett. Resolution of the Abraham–Minkowski dilemma. Physical Review Letters, 104(7):070401, 2010. [9] Sascha Baumanns, Markus Clemens, and Sebastian Schops. Structural aspects of regularized full maxwell electrodynamic potential formulations using fit. In Electromagnetic Theory (EMTS), Proceedings of 2013 URSI International Symposium on, pages 1007– 1010. IEEE, 2013. 28 [10] A Benjeddou. Advances in piezoelectric finite element modeling of adaptive structural elements: a survey. Computers & Structures, 76(1):347–363, 2000. [11] Max Bethune-Waddell and Kenneth J Chau. Simulations of radiation pressure experiments narrow down the energy and momentum of light in matter. Reports on Progress in Physics, 78(12):122401, 2015. [12] A Bieńkowski, R Szewczyk, and J Salach. Industrial application of magnetoelastic force and torque sensors. Acta Physica Polonica A, 118(5):1008–1009, 2010. [13] Alain Bossavit. Whitney forms: A class of finite elements for three-dimensional computations in electromagnetism. IEE Proceedings A (Physical Science, Measurement and Instrumentation, Management and Education, Reviews), 135(8):493–500, 1988. [14] Sylvain D Brechet and Jean-Philippe Ansermet. Thermodynamics of continuous media with intrinsic rotation and magnetoelectric coupling. Continuum Mechanics and Thermodynamics, 26(2):115–142, 2014. [15] IA Brigadnov and A Dorfmann. Mathematical modeling of magneto-sensitive elastomers. International Journal of Solids and Structures, 40(18):4659–4674, 2003. [16] Andreas J Brunner, Marcel Birchmeier, Mark M Melnykowycz, and Michel Barbezat. Piezoelectric fiber composites as sensor elements for structural health monitoring and adaptive material systems. Journal of Intelligent Material Systems and Structures, 20(9):1045–1055, 2009. [17] Robert C Cammarata. Surface and interface stress effects in thin films. Progress in surface science, 46(1):1–38, 1994. [18] C. Caratheodory. Untersuchungen über die Grundlagen der Thermodynamik. Mathematische Annalen, 67(3):355–386, 1909. URL http://dx.doi.org/10.1007/BF01450409. [19] Lan Jen Chu, Hermann A Haus, and P Penfield Jr. The force density in polarizable and magnetizable fluids. Proceedings of the IEEE, 54(7):920–935, 1966. [20] Patrick Ciarlet Jr and Jun Zou. Fully discrete finite element approaches for time-dependent maxwell’s equations. Numerische Mathematik, 82(2):193–219, 1999. [21] Leszek Demkowicz. Computing with hp-adaptive finite elements: volume 1 one and two dimensional elliptic and Maxwell problems. CRC Press, 2006. [22] JL Ericksen. On formulating and assessing continuum theories of electromagnetic fields in elastic materials. Journal of Elasticity, 87(2-3):95–108, 2007. [23] A Cemal Eringen and Gérard A Maugin. Electrodynamics of Continua I: Foundations and Solid Media. Springer, 1990. [24] M Frommberger, Ch Zanke, A Ludwig, M Tewes, and E Quandt. Processing and application of magnetoelastic thin films in high-frequency devices. Microelectronic engineering, 67:588–594, 2003. 29 [25] Andrew Gillette, Alexander Rand, and Chandrajit Bajaj. Construction of scalar and vector finite element families on polygonal and polyhedral meshes. Computational Methods in Applied Mathematics, 16(4):667–683, 2016. [26] John M Ginder, Mark E Nichols, Larry D Elie, and Janice L Tardiff. Magnetorheological elastomers: properties and applications. In Smart Structures and Materials 1999: Smart Materials Technologies, volume 3675, pages 131–139. International Society for Optics and Photonics, 1999. [27] Sebastian Glane, Felix A Reich, and Wolfgang H Müller. Modeling of non-ideal hard permanent magnets with an affine-linear model, illustrated for a bar and a horseshoe magnet. Continuum Mechanics and Thermodynamics, pages 1–21, 2017. [28] GNU Public. Gnu general public license. http://www.gnu.org/copyleft/gpl.html, June 2007. [29] David J Griffiths. Resource letter em-1: Electromagnetic momentum. American Journal of Physics, 80(1):7–18, 2012. [30] David Jeffrey Griffiths and Reed College. Introduction to electrodynamics, volume 3. prentice Hall Upper Saddle River, NJ, 1999. [31] Craig A Grimes, Somnath C Roy, Sanju Rani, and Qingyun Cai. Theory, instrumentation and applications of magnetoelastic resonance sensors: a review. Sensors, 11(3):2809–2844, 2011. [32] S.R. Groot and P. Mazur. Non-equilibrium thermodynamics, 1984. [33] Xing Guo, Shengbo Sang, Jinyu Guo, Aoqun Jian, Qianqian Duan, Jianlong Ji, Qiang Zhang, and Wendong Zhang. A magnetoelastic biosensor based on e2 glycoprotein for wireless detection of classical swine fever virus e2 antibody. Scientific reports, 7(1):15626, 2017. [34] O. R. Hachkevych and R. F. Terlets’kyi. Models of thermomechanics of magnetizable and polarizable conducting deformable solids. Materials Science, 40(3):320–336, 2004. [35] Wei He, Gan Zhang, Xingxing Zhang, Jie Ji, Guiqiang Li, and Xudong Zhao. Recent development and application of thermoelectric generator and cooler. Applied Energy, 143:1–25, 2015. [36] J. Hoffman, J. Jansson, C. Johnson, M. Knepley, RC Kirby, A. Logg, L. R. Scott, and G. N. Wells. FEniCS. http://www.fenicsproject.org/, 2005. [37] Mark R Jolly, J David Carlson, Beth C Muñoz, and Todd A Bullions. The magnetoviscoelastic response of elastomer composites consisting of ferrous particles embedded in a polymer matrix. Journal of Intelligent Material Systems and Structures, 7(6):613–622, 1996. [38] D. S. Jones. The Theory of Electromagnetism. Pergamon, 1964. ISBN 978-0-08-013686-8. doi: http://dx.doi.org/10.1016/B978-0-08-013686-8.50006-X. URL http://www.sciencedirect.com/science/article/pii/B978008013686850006X. 30 [39] David Jou, Jose Casas-Vazquez, and Georgy Lebon. Extended irreversible thermodynamics revisited (1988-98). Reports on Progress in Physics, 62(7):1035, 1999. [40] SV Kankanala and N Triantafyllidis. On finitely strained magnetorheological elastomers. Journal of the Mechanics and Physics of Solids, 52(12):2869–2908, 2004. [41] Dae-Kwan Kim and Jae-Hung Han. Smart flapping wing using macrofiber composite actuators. In Smart Structures and Materials, pages 61730F–61730F. International Society for Optics and Photonics, 2006. [42] A Kovalovs, E Barkanov, and S Gluhihs. Active control of structures using macro-fiber composite (mfc). In Journal of Physics: Conference Series, volume 93, page 012034. IOP Publishing, 2007. [43] Attay Kovetz. Electromagnetic theory. 2000. [44] Francesco Lanza Discalea, Howard Matt, Ivan Bartoli, Stefano Coccia, Gyuhae Park, and Charles Farrar. Health monitoring of uav wing skin-to-spar joints using guided waves and macro fiber composite transducers. Journal of intelligent material systems and structures, 18(4):373–388, 2007. [45] Jichun Li. Numerical convergence and physical fidelity analysis for Maxwell’s equations in metamaterials. Computer Methods in Applied Mechanics and Engineering, 198(37):3161–3172, 2009. [46] WH Li, XZ Zhang, and H Du. Magnetorheological elastomers and their applications. In Advances in Elastomers I, pages 357–374. Springer, 2013. [47] A. Logg and G. N. Wells. Dolfin: Automated finite element computing. ACM Transactions on Mathematical Software, 37(2), 2010. URL http://www.dspace.cam.ac.uk/handle/1810/221918/. [48] A. Logg, K. A. Mardal, and G. N. Wells. Automated Solution of Differential Equations by the Finite Element Method, The FEniCS Book, volume 84 of Lecture Notes in Computational Science and Engineering. Springer, 2011. [49] HA Lorentz. Zittungsverlagen akad. van wettenschappen 1, 74 (nov. 26, 1892); versuch einer theorie der elektrischen und optischen erscheinungen in bewegten körpern, brill, leiden, 1895. Proc. Acad. Sci.(Amsterdam)(Engl. version), 6:809, 1904. [50] Armand Losinski. Low-profile axial-flow single-blade piezoelectric fan, January 19 1999. US Patent 5,861,703. [51] Francis E Low. Classical field theory: electromagnetism and gravitation. Wiley-VCH Verlag, 2004. [52] Masud Mansuripur. Resolution of the abraham–minkowski controversy. Optics Communications, 283(10):1997–2005, 2010. [53] James Clerk Maxwell. A Treatise on Electricity and Magnetism. Oxford at the Clarendon Press, 1892. 31 [54] CW Mays, JS Vermaak, and D Kuhlmann-Wilsdorf. On surface stress and surface tension: Ii. determination of the surface stress of gold. Surface science, 12(2):134–140, 1968. [55] Markus Mehnert, Mokarram Hossain, and Paul Steinmann. Towards a thermo-magneto-mechanical coupling framework for magneto-rheological elastomers. International Journal of Solids and Structures, 2017. [56] A Meitzler, HF Tiersten, AW Warner, D Berlincourt, GA Couqin, and FS Welsh III. Ieee standard on piezoelectricity, 1988. [57] Philipp Metsch, Karl A Kalina, Christian Spieler, and Markus Kästner. A numerical study on magnetostrictive phenomena in magnetorheological elastomers. Computational Materials Science, 124:364–374, 2016. [58] K Jarrod Millman and Michael Aivazis. Python for scientists and engineers. Computing in Science & Engineering, 13(2):9–12, 2011. [59] Wolfgang H. Mueller and Muschik W. Bilanzgleichungen offener mehrkomponentiger Systeme I. Massen- und Impulsbilanzen. J. Non-Equilib. Thermodyn., 8:29–46, 1983. [60] I. Müller. Thermodynamics. Pitman Publishing, London, 1985. [61] Ingo Müller and Tommaso Ruggeri. Rational extended thermodynamics, volume 37. Springer Science & Business Media, 2013. [62] Muschik W. and Wolfgang H. Mueller. Bilanzgleichungen offener mehrkomponentiger Systeme II. Energie- und Entropiebilanz. J. Non-Equilib. Thermodyn., 8:47–66, 1983. [63] Jean-Claude Nédélec. Mixed finite elements in R3. Numerische Mathematik, 35(3):315–341, 1980. [64] Yuri N Obukhov. Electromagnetic energy and momentum in moving media. Annalen der Physik, 17(9-10):830–851, 2008. [65] Travis E Oliphant. Python for scientific computing. Computing in Science & Engineering, 9(3), 2007. [66] Kenny Pagel, Welf-Guntram Drossel, and Wolfgang Zorn. Multi-functional shape-memory-actuator with guidance function. Production Engineering, 7(5):491–496, 2013. [67] Yih-Hsing Pao and Kolumban Hutter. Electrodynamics for moving elastic solids and viscous fluids. Proceedings of the IEEE, 63(7):1011–1021, 1975. [68] Rolf Paradies and Paolo Ciresa. Active wing design with integrated flight control using piezoelectric macro fiber composites. Smart Materials and Structures, 18(3):035010, 2009. [69] Gyuhae Park, Hoon Sohn, Charles R Farrar, and Daniel J Inman. Overview of piezoelectric impedance-based health monitoring and path forward. Shock and Vibration Digest, 35(6):451–463, 2003. 32 [70] W. Pauli. Thermodynamics and the Kinetic Theory of Gases: Volume 3 of Pauli Lectures on Physics, volume 3. Dover Publications (2010) repub. of MIT Press, 1973. [71] Jean-Paul Pelteret, Denis Davydov, Andrew McBride, Duc Khoi Vu, and Paul Steinmann. Computational electro-elasticity and magneto-elasticity for quasi-incompressible media immersed in free space. International Journal for Numerical Methods in Engineering, 108(11):1307–1342, 2016. [72] Alejandro Queiruga and Tarek Zohdi. Microscale modeling of effective mechanical and electrical properties of textiles. International Journal for Numerical Methods in Engineering, 108(13):1603–1625, 2016. [73] Alejandro Francisco Queiruga and Tarek I Zohdi. Formulation and numerical analysis of a fully-coupled dynamically deforming electromagnetic wire. Computer Methods in Applied Mechanics and Engineering, 305:292–315, 2016. [74] Pierre-Arnaud Raviart and Jean-Marie Thomas. A mixed finite element method for 2-nd order elliptic problems. In Mathematical aspects of finite element methods, pages 292–315. Springer, 1977. [75] Robert N Rieben, Daniel A White, Brad K Wallin, and JM Solberg. An arbitrary lagrangian–eulerian discretization of mhd on 3d unstructured grids. Journal of Computational Physics, 226(1):534–570, 2007. [76] Phoebus Rosakis. Ellipticity and deformations with discontinuous gradients in finite elastostatics. Archive for Rational Mechanics and Analysis, 109(1):1–37, 1990. [77] Ioan Sauciuc and Gregory M Chrysler. Electronic thermal management, April 18 2006. US Patent 7,031,155. [78] Prashant Saxena, Mokarram Hossain, and Paul Steinmann. Nonlinear magneto-viscoelasticity of transversally isotropic magneto-active polymers. In Proc. R. Soc. A, volume 470, page 20140082. The Royal Society, 2014. [79] Gerlind Schubert and Philip Harrison. Magnetic induction measurements and identification of the permeability of magneto-rheological elastomers using finite element simulations. Journal of Magnetism and Magnetic Materials, 404:205–214, 2016. [80] Ro Shuttleworth. The surface tension of solids. Proceedings of the Physical Society. Section A, 63(5):444, 1950. [81] Henry A Sodano, Daniel J Inman, and Gyuhae Park. Comparison of piezoelectric energy harvesting devices for recharging batteries. Journal of Intelligent Material Systems and Structures, 16(10):799–807, 2005. [82] C Spieler, P Metsch, M Kästner, and V Ulbricht. Microscale modeling of magnetoactive composites undergoing large deformations. Technische Mechanik, 34(1):39–50, 2014. [83] M Stiemer, J Unger, B Svendsen, and H Blum. An arbitrary lagrangian eulerian approach to the three-dimensional simulation of electromagnetic forming. Computer Methods in Applied Mechanics and Engineering, 198(17):1535–1547, 2009. [84] B Svendsen and T Chanda. Continuum thermodynamic formulation of models for electromagnetic thermoinelastic solids with application in electromagnetic metal forming. Continuum Mechanics and Thermodynamics, 17(1):1–16, 2005. 33 [85] Masayoshi Tanida, Midori Sunaga, and Hiroaki Wada. Piezoelectric fan and air cooling apparatus using the piezoelectric fan, February 14 2013. US Patent App. 13/370,341. [86] Leslie Ronald George Treloar. The physics of rubber elasticity. Oxford University Press, USA, 1975. [87] C. Truesdell and R. A. Toupin. Encyclopedia of physics, volume III/1, principles of classical mechanics and field theory, chapter The classical field theories, pages 226–790. Springer-Verlag, Berlin/Göttingen/Heidelberg, 1960. [88] Jan-Willem Van Wingerden, Anton Hulskamp, Thanasis Barlas, Ivo Houtzager, Harald Bersee, Gijs van Kuik, and Michel Verhaegen. Two-degree-of-freedom active vibration control of a prototyped ”smart” rotor. IEEE transactions on control systems technology, 19(2):284–296, 2011. [89] JS Vermaak, CW Mays, and D Kuhlmann-Wilsdorf. On surface stress and surface tension: I. theoretical considerations. Surface Science, 12(2):128–133, 1968. [90] Philippe Vidal, Michele D’Ottavio, Mehdi Ben Thaı̈er, and Olivier Polit. An efficient finite shell element for the static response of piezoelectric laminates. Journal of Intelligent Material Systems and Structures, 22(7):671–690, 2011. [91] Franziska Vogel, Roger Bustamante, and Paul Steinmann. On some mixed variational principles in magneto-elastostatics. International Journal of Non-Linear Mechanics, 51:157–169, 2013. [92] Yasuo Yamada, Katsumi Fujimoto, and Jiro Inoue. Piezoelectric fan, October 25 1988. US Patent 4,780,062. [93] Yaowen Yang, Lihua Tang, and Hongyun Li. Vibration energy harvesting using macro-fiber composites. Smart materials and structures, 18(11):115025, 2009. [94] Sung Yi, Shih Fu Ling, Ming Ying, Harry H Hilton, and Jack R Vinson. Finite element formulation for anisotropic coupled piezoelectro-hygro-thermo-viscoelasto-dynamic problems. International journal for numerical methods in engineering, 45(11):1531–1546, 1999. [95] Miao Yu, Song Qi, Jie Fu, Mi Zhu, and Dong Chen. Understanding the reinforcing behaviors of polyaniline-modified carbonyl iron particles in magnetorheological elastomer based on polyurethane/epoxy resin ipns matrix. Composites Science and Technology, 139:36–46, 2017. [96] Dongliang Zhao and Gang Tan. A review of thermoelectric cooling: materials, modeling and applications. Applied Thermal Engineering, 66(1):15–24, 2014. [97] Tarek I Zohdi. Electromagnetic properties of multiphase dielectrics: a primer on modeling, theory and computation, volume 64. Springer Science & Business Media, 2012. [98] Tarek I Zohdi and Peter Wriggers. An introduction to computational micromechanics. Springer Science & Business Media, 2008. 34 A. Electric current due to the bound charges By using Di = Di − Pi , in Maxwell’s equations we realize Hi = Hi + Mi (124) ∂Pi ∂Di − = ρz fr. + ρz bo. , ∂xi ∂xi ∂Di ∂Pi ∂Hk ∂Mk − + + ijk + ijk = Ji , ∂t ∂t ∂xj ∂xj (125) ∂Pi ∂Di = ρz fr. , − = ρz bo. , ∂xi ∂xi ∂Di ∂Hk ∂Pi ∂Mk − + ijk = Ji − − ijk = Jifr. . ∂t ∂xj ∂t ∂xj (126) B. Balance of electromagnetic momentum We start by obtaining the time rate of the chosen electromagnetic momentum ∂ijk Dj Bk ∂Dj Bk ∂Pj Bk ∂Gi = = ijk + ijk . ∂t ∂t ∂t ∂t (127) The first term can be rewritten, by using ijk = −ikj , ijk klm = δil δjm − δim δjl , (128) as well as Maxwell’s equations   ∂Dj Bk ∂Hm ∂Em = ijk jlm − Jj Bk − ijk Dj klm = ∂t ∂xl ∂xl ∂Hk ∂Hi ∂Ej ∂Ei =− Bk + Bk − (J × B)i − Dj + Dj . ∂xi ∂xk ∂xi ∂xj ijk (129) Moreover, by using Maxwell–Lorentz aether relations we observe  1 ∂H B 1 ∂Bk 1 ∂ 1 ∂Hk k k Bk = Bk = Bk Bk = , ∂xi µ0 ∂xi µ0 ∂xi 2 2 ∂xi  1 ∂D E ∂Ej ∂Ej ∂ 1 j j Dj = ε0 E j = ε0 Ej Ej = . ∂xi ∂xi ∂xi 2 2 ∂xi (130) Finally, by utilizing Maxwell’s equations we achieve ∂Hi Bk ∂Hi Bk = , ∂xk ∂xk ∂Ei ∂Dj Ei Dj = − ρzEi . ∂xj ∂xj (131) By combining all above, we obtain    ∂Gi ∂  1 ∂(P × B)i  = − δij Dk Ek + Hk Bk + Hi Bj + Dj Ei − ρzEi + (J × B)i − , ∂t ∂xj | 2 ∂t {z } | {z } Fi mji after comparing to the the balance of electromagnetic momentum. 35 (132) C. Balance of electromagnetic energy By starting with the divergence of the chosen electromagnetic flux ∂Hj Ek ∂Hj Ek ∂Mj Ek ∂Pi , = ijk = ijk − ijk ∂xi ∂xi ∂xi ∂x {z i } | M × E)i ∂(M ∂xi (133) we can rewrite the first term by using ijk = jki = kij and ijk = −jik , as well as inserting Maxwell’s equations,  ∂D  ∂Hj Ek ∂Hj ∂Ek ∂Bj k ijk = kij Ek − Hj jik = + Jk Ek + Hj = ∂xi ∂xi ∂xi ∂t ∂t (134)  ∂ 1 1 = Dk Ek + Hj Bj + Jk Ek . ∂t 2 2 Since we have  ∂Pi ∂Mk  ∂Ei ∂Mk Ei ∂Ei ∂Pi Ei Ji Ei = Jifr. + + ijk Ei = Jifr. Ei + − Pi + ijk − Mk ijk = ∂t ∂xj ∂t ∂t ∂xj ∂xj M × E)j ∂Pi Ei ∂Ei ∂Mk Ei ∂Ei ∂Pi Ei ∂Ei ∂(M ∂Bk − Pi + jki − Pi + = = Jifr. Ei + + Mk kji = Jifr. Ei + − Mk ∂t ∂t ∂xj ∂xj ∂t ∂t ∂xj ∂t M × E)j ∂ ∂(M ∂Ei ∂Mk = Jifr. Ei + (Pi Ei − Mi Bi ) − Pi + , + Bk ∂t ∂t ∂xj ∂t (135) we obtain  ∂Pi ∂ 1 ∂Ei ∂Mk + Bk , = Pi Ei − Mi Bi + (Dk Ek + Hj Bj ) + Jifr. Ei − Pi ∂xi ∂t 2 ∂t ∂t  ∂P  ∂  1 ∂Mk  ∂Ei (136) i Pi Ei − Mi Bi + (Dk Ek + Hj Bj ) = + Bk − Jifr. Ei − Pi , ∂t | 2 ∂x ∂t ∂t i | {z } {z } π ef. D. Maxwell symmetry The Maxwell symmetry relations can be seen by using simple relations, c̃21 ji = ∂2f ∂2f ∂η ∂nji = = =− = −c̃12 ij , ∂T ∂T ∂Fij ∂Fij ∂T ∂Fij ∂2f ∂2f ∂pi ∂η =− =− = = c̃13 i , ∂T ∂T ∂Ei ∂Ei ∂T ∂Ei ∂2f ∂2f ∂η ∂mi = − = − = = c̃14 c̃41 = i i , ∂T ∂T ∂Bi ∂Bi ∂T ∂Bi ∂p ∂2f ∂2f ∂η c̃51 = =− =− = = c̃15 , ∂T ∂T ∂v ∂v∂T ∂v c̃31 i = (137) furthermore, ∂2f ∂2f ∂nlk ∂pi =− =− =− = −c̃23 lki , ∂Fkl ∂Fkl ∂Ei ∂Ei ∂Fkl ∂Ei ∂2f ∂2f ∂mi ∂nlk c̃42 =− =− =− = −c̃24 ikl = lki , ∂Fkl ∂Fkl ∂Bi ∂Bi ∂Fkl ∂Bi ∂p ∂2f ∂2f ∂nlk c̃52 =− =− =− = −c̃25 kl = lk , ∂Fkl ∂Fkl ∂v ∂v∂Fkl ∂v c̃32 ikl = as well as ∂2f ∂2f ∂mi ∂pk =− =− = = c̃34 ki , ∂Ek ∂Ek ∂Bi ∂Bi ∂Ek ∂Bi ∂p ∂2f ∂2f ∂pk = =− =− = = c̃35 k , ∂Ek ∂Ek ∂v ∂v∂Ek ∂v (138) c̃43 ik = c̃53 k 36 (139) and c̃54 k = ∂p ∂2f ∂2f ∂mk =− =− = = c̃45 k . ∂Bk ∂Bk ∂v ∂v∂Bk ∂v 37 (140)
5cs.CE
PlDoc: Wiki style Literate Programming for Prolog Jan Wielemaker1 and Anjo Anjewierden2 arXiv:0711.0618v1 [cs.PL] 5 Nov 2007 1 2 Human-Computer Studies Laboratory, University of Amsterdam, Kruislaan 419, 1098 VA Amsterdam, The Netherlands, [email protected] Department of Instructional Technology, Faculty of Behavourial Sciences, University of Twente, PO Box 217, 7500 AE Enschede, The Netherlands [email protected] Abstract. This document introduces PlDoc, a literate programming system for Prolog. Starting point for PlDoc was minimal distraction from the programming task and maximal immediate reward, attempting to seduce the programmer to use the system. Minimal distraction is achieved using structured comments that are as closely as possible related to common Prolog documentation practices. Immediate reward is provided by a web interface powered from the Prolog development environment that integrates searching and browsing application and system documentation. When accessed from localhost, it is possible to go from documentation shown in a browser to the source code displayed in the user’s editor of choice. 1 Introduction Combining source and documentation in the same file, generally named literate programming, is an old idea. Classical examples are the TEX source [7] and the self documenting editor GNU-Emacs [15]. Where the aim of the TEX source is first of all documenting the program, for GNU-Emacs the aim is to support primarily the end user. A more recent success story is JavaDoc3 . There is an overwhelming amount of articles on literate programming, most of which describe an implementation or qualitative experience using a literate programming system [12]. Shum and Cook [14] describe a controlled experiment on the effect of literate programming in education. Using literate programming produces more comments in general. More convincingly, it produced ‘how documentation’ and examples where, without literate programming, no examples were produced at all. Nevertheless, subjects using literate programming (in this case AOPS, [13]) was considered confusing and harmed debugging the program. Recent developments in programming environments and methodologies make a case for re-introducing literate programming [11]. The success of systems such 3 http://java.sun.com/j2se/javadoc/ 2 Wielemaker and Anjewierden as Doxygen [16] based on some form of structured comments in the source code, making the literate programming document a valid document for the programming language is evident. Using a source document that is valid for the programming language ensures smooth integration with tools designed for the language. Note that these developments are different from what Knuth intended: “The literate programmer can be regarded as an essayist that explains the solution to a human by crisply defining the components and delicately weaving them together into a complete artistic creation” [7]. Embedding documentation source code comments merely produces an API Reference Manual. In the Prolog world we see lpdoc [5], documentation support in the Logtalk [9] language and the ECLiPSe Document Generation Tools4 system. All these approaches use Prolog directives making additional statements about the code that feed the documentation system. In 2006 a commercial user in the UK whose products are developed using a range of technologies (including C++ using Doxygen for documentation) approached us to come up with an alternative literate programming system for Prolog, aiming at a documentation system as non-intrusive as possible to their programmers’ current practice. This document is structured as follows. First we outline the different options available to a literate programming environment and motivate our choices. Next we introduce PlDoc using and example, followed by a more detailed overview of the system. Section 5 tells the story of introducing PlDoc in a large open source program, while we compare our work to related projects in Sect. 6. 2 An attractive literate programming environment Most programmers do not like documenting code and Prolog programmers are definitely no exception to this rule. Most can only be ‘persuaded’ by the organisation they work for, using a documentation biased grading system in education [14] or by the desire to produce code that is accepted in the Open Source community. In our view we must seduce the programmer to produce API documentation and internal documentation by creating a rewarding environment. In this section we present the available choicepoints and motivate our primary choices from these starting points. For the design of a literate programming system we must make decisions on the input: the language in which we write the documentation and how this language is merged with the programming language (Prolog) into a single source file. Traditionally the documentation language was TEX based (including Texinfo). Recent systems (e.g. JavaDoc) also use HTML. In Prolog, we have two options for merging documentation in the Prolog text such that the combined text is a valid Prolog document. The first is using Prolog comments and the second is to write the documentation in directives and define (possibly dummy) predicates that handle these directives. In addition we have to make a decision on the output format. In backend systems we see a shift from TEX (paper) and plain-text (online) formats to4 http://eclipse.crosscoreop.com/doc/userman/umsroot088.html PlDoc 3 Fig. 1. Documentation of library base64.pl. Accessed from ‘localhost’, PlDoc provides edit and reload buttons. wards HTML, XML+XSLT and (X)HTML+CSS which are widely supported in todays development environments. Web documents provide both comfortable online browsing and reasonable quality printing. In this search space we aim at a system with little overhead for the programer and a short learning curve that immediately rewards the programmer with a better overview and integrated web-based search over both the application documentation and the Prolog manual. Minimal impact Minimising the impact on the task of the programmer is very important. Programming itself is a demanding task and it is important to reduce the mental load to the minimum, only keeping that what is essential for the result. Whereas object oriented languages can extract some basics from the class hierarchy and type system, there is little API information that can be extracted automatically from a Prolog program, especially if it does not use modules. Most 4 Wielemaker and Anjewierden Fig. 2. Searching for “base64” information for an API reference must be provided explicitly and additionally to the program. Minimising impact as well as maximising portability made us decide against the approach of lpdoc, ECLiPSe and Logtalk which provide the documentation in language extensions by means of directives and in favour of using structured comments based on layout and structuring conventions around in the Prolog community. Structured comments start with %% (similar to PostScript document structuring comments) and use Wiki [8] structuring conventions extended with Prolog conventions such as referencing a predicate using hnamei/harityi. Wiki is a simple plain-text format designed for collaborative interactive management of web pages. Wikis differ in the details on the text format. We are particularly interested in wiki formats based on common practice simulating font and structuring conventions in plain text such as traditional email, usenet and comments in source code. Maximal reward to the programmer A system is more easily accepted if it not only provides reward for the users of the software module, but also to the programmer him/herself. We achieve this by merging the documentation of the loaded Prolog code with the Prolog manuals in a consistent view presented from a web server embedded in the development environment. This relieves the programmer from making separate searches in the manuals and other parts of system under development. Immediate reward to the programmer Humans love to be rewarded immediately. This implies the results must be accessible directly. This has been achieved by PlDoc 5 adding the documentation system as an optional library to the Prolog development environment. With PlDoc loaded into Prolog, the compiler processes the structured comments, maintaining a Prolog database as described in Sect. 4.2. This database is made available to the developer through a web server running in a separate thread (Sect. 4.3). The SWI-Prolog make/0 comment updates the running Prolog system to the latest version of the loaded sources and updates the web site at the same time. 3 An example Before going into detail we show the documentation process and access for the SWI-Prolog library base64.pl, providing a DCG rule for base64 encoding and decoding as well as a conversion predicate for atoms. Part of the library code relevant for the documentation is in Fig. 3. We see a number of special constructs: – The /** <module> Title comment introduces overall documentation of the module. Inside, the == delimited lines start a source code block. The @keyword section provides JavaDoc inspired keywords from a fixed and well defined set (see end of Sect. 4.1). – The %% comments start with one or more %% lines that contain the predicate name, argument names with optional mode, type and determinism information. Multiple modes and predicates can be covered by the same comment block. This is followed by wiki text, processed using the same rules that apply to the module comment. Like JavaDoc, the first sentence of the comment body is considered a summary. Keyword search processes both the formal description and the summary. Keyword search on format aspects and a summary line have a long history, for example in the Unix man command. 4 4.1 Description of PlDoc The PlDoc syntax PlDoc processes structured comments. Structured comments are Prolog comments starting with %% or /**. The former is more in line with the Prolog tradition for commenting predicates while the second is typically used for commenting the overall module structure. The system does not enforce this. Java programmers may prefer using the second form for predicate comments as well. Comments consist of a formal header, a wiki body and JavaDoc inspired keywords. When using %% style comments, the formal header ends with the first line with a single %. Using /** style comments the header is ended by a blank line. The header is either “hmodulei Title” or one or more predicate head declarations. The hmodulei syntax can be extended easily. The type and mode declaration header consists of one or more Prolog terms. Each term describes a mode of a predicate. The syntax is described in Fig. 4. The optional //-postfix indicate hheadi is a DCG rule. The determinism values originate from Mercury [6]. Predicates marked as det must succeed exactly 6 Wielemaker and Anjewierden /** <module> Base64 encoding and decoding Prolog-based base64 encoding using rfc2045. For example: DCG rules. Encoding according to == 1 ?- base64(’Hello World’, X). X = ’SGVsbG8gV29ybGQ=’ 2 ?- base64(H, ’SGVsbG8gV29ybGQ=’). H = ’Hello World’ == @tbd Stream I/O @tbd White-space introduction and parsing @author Jan Wielemaker */ %% %% % % % base64(+Plain, -Encoded) is det. base64(-Plain, +Encoded) is det. Translates between plaintext and base64 See also base64//1. encoded atom or string. base64(Plain, Encoded) :- ... %% %% % % % base64(+PlainText)// is det. base64(-PlainText)// is det. Encode/decode list of character codes using _base64_. base64/2. base64(Input) --> ... Fig. 3. Commented source code of library base64.pl hmodedefi ::= hheadi[’//’] [’is’ hdeterminismi] hdeterminismi ::= ’det’ | ’semidet’ | ’nondet’ | ’multi’ hheadi ::= hfunctori’(’hargspeci {’,’ hargspeci}’)’ | hatomi hargspeci ::= [hmodei]hargnamei[’:’htypei] hmodei ::= ’+’ | ’-’ | ’ ?’ | ’:’ | ’@’ | ’ !’ htypei ::= htermi Fig. 4. BNF for predicate header See also PlDoc 7 once and not leave any choice points. The semidet indicator is used for predicates that either fail or succeed deterministically. The nondet indicator is the most general one and implies there are no constraints on the number of times the predicate succeeds and whether or not it leaves choice points on the last success. Finally, multi is as nondet, but demands the predicate to succeed at least one time. Informally, det is used for deterministic transformations (e.g. arithmetic), semidet for tests, nondet and multi for generators. The mode patterns are given in Fig. 5. Originating from DEC-10 Prolog were the mode indicators (+,-,?) had a formal meaning. The ISO standard [4] adds ‘@’, meaning “the argument shall remain unaltered”. Quintus added ‘:’, meaning the argument is module sensitive. Richard O’Keefe proposes5 ‘=’ for “remains unaltered” and adds ‘*’ (ground) and ‘>’ “thought of as output but might be nonvar”. + Argument must be fully instantiated to a term that satisfies the type. - Argument must be unbound on entry. ? Argument must be bound to a partial term of the indicated type. Note that a variable is a partial term for any type. : Argument is a meta argument. Implies +. @ Argument is not further instantiated. ! Argument contains a mutable structure that may be modified using setarg/3 or nb setarg/3. Fig. 5. Defined modes The body of a description is given to a Prolog defined wiki parser based on Twiki6 using extensions from the Prolog community. In addition we made the following changes. – List indentation is not fixed, the only requirement is that all items are indented to the same column. – Font changing commands such as *bold* only work if the content is a single word. In other cases we demand *|bold text|*. This proved necessary due to frequent use of punctuation characters in comments that make single font switching punctuation characters too ambiguous. – We added == around code blocks (see Fig. 3) as such blocks are frequent and not easily supported by Twiki. – We added automatic links for hnamei/harityi, hnamei//harityi, hfilei.pl, hfilei.txt (interpreted as wiki text) and image files using image extensions. Using [[file.png]], inline images can be produced. 5 6 http://gollem.science.uva.nl/SWI-Prolog/mailinglist/archive/2006/q1/ 0267.html http://www.twiki.org 8 Wielemaker and Anjewierden – Capitalised words appearing in the running text that match exactly one of the arguments are typeset in italics. – We do not process embedded HTML. One of the reasons is that we want the option for other target languages. Opening up the path to unlimited use of HTML complicates this. In addition, passing <, > and & unmodified to the target HTML easily produces invalid HTML. The ‘@’ keyword section of a comment block is heavily based on JavaDoc. We give a summary of the changes and additions below. – – – – – – @return is dropped for obvious reasons. @error is added as a shorthand for @throws error(Error, Context) @since and @serial are not (yet) supported @compat is added to describe compatibility of libraries @copyright and @license are added @bug and @tbd are added for issue tracking A full definition of the Wiki notation and keywords is in the PlDoc manual.7 . 4.2 Processing the comments We claimed immediate reward as an important asset. This implies the documentation must be an integral part of the development environment. SWI-Prolog aims at providing IDE modules while allowing the user to use an editor or IDE of choice. An obvious choice is to make the compiler collect comments and present these to the user through a web interface. This is achieved using a hook in the compiler called as: prolog:comment hook(+Comments, +TermPos, +Term). Here, Comments is a list of Pos-Comment terms representing comments encountered from where read term/3 started reading upto the end of Term that started at TermPos. The calling pattern allows for processing any comment and distinguishes comments outside Prolog terms from comments inside the term. The hook installed by the documentation server extracts structured comments by checking for %% or /**. For structured comments it extracts the formal comment header and the first line of the comment body which serves, like JavaDoc, as a summary. The formal part is processed and the entire structured comment is stored unparsed, but is associated with the parsed formal header and summary which are used for linking the comment with a predicate as well as keyword search. The stored information is available through the public Prolog API of PlDoc and can be used, together with the cross referencer Prolog API, as the basis for additional development tools. 7 http://www.swi-prolog.org/packages/pldoc.html PlDoc 4.3 9 Publishing the documentation PlDoc realises a web application using the SWI-Prolog HTTP infrastructure [17]. Running in a separate thread, the normal interactive Prolog toplevel is not affected. The documentation server can also be used from an embedded Prolog system. By default access is granted to ‘localhost’ only. Using additional options to doc server(+Port, +Options), access can be granted to a wider public. A scenario for exploiting this is to have a central Prolog process with all resources available to a team loaded. Regularly running update from a central repository and make/0 inside Prolog, it can serve as an up-to-date and searchable central documentation source. Since September 15 2006, we host such a server running the latest SWI-Prolog release with all standard libraries and packages loaded from http://gollem.science.uva.nl/SWI-Prolog/pldoc/. Currently (June 2007), the server handles approximately 100 search requests (1,000 page views) per day. Fig. 6. PlDoc displaying a directory index with files and their public predicates accessed from ‘localhost’. Each predicate has an ‘edit’ button and each file a pretty print button (blue circle, see Sect. 4.5) 10 Wielemaker and Anjewierden 4.4 IDE integration and documentation maintenance cycle When accessed from ‘localhost’, PlDoc by default provides an option to edit a documented predicate. Clicking this option activates an HTTP request through Javascript similar to AJAX [10], calling edit(+PredicateIndicator) on the development system. This hookable predicate locates the predicate and runs the user’s editor of choice on the given location. In addition the browser interface shows a ‘reload’ button to run make/0 and refreshes the current page, reflecting the edited documentation. Initially, PlDoc is targeted to the working directory. In the directory view it displays the README file (if any) and all Prolog files with a summary listing of the public predicates as illustrated in Fig. 6. As a simple quality control measure PlDoc lists predicates that are exported from a module but not documented in red at the bottom of the page. See Fig. 7. We used the above to provide elementary support through PlDoc for most of the SWI-Prolog library and package sources (approx. 80,000 lines). First we used a simple sed script to change the first line of a % comment that comments a predicate to use the %% notation. Next we fixed syntax errors in the formal part of the documentation header. Some of these where caused by comments that should not have been turned into structured comments. PlDoc’s enforcement that argument names are proper variable names and types are proper Prolog terms formed the biggest source of errors. Finally, directory indices and part of the individual files were reviewed, documentation was completed and fixed at some points. The enterprise is certainly not complete, but an effort of three days made a big difference in the accessibility of the libraries. 4.5 Presentation options By default, PlDoc only shows public predicates when displaying a file or directory index. This can be changed using the ‘zoom’ button displayed with every page. Showing documentation on internal predicates proves helpful for better understanding of a module and helps finding opportunities for code reuse. Searching shows hits from both public and private predicates, where private predicates are presented in grey using a yellowish background. Every file entry has a ‘source’ button that shows the source file. Structured comments are converted into HTML using the Wiki parser. The actual code is coloured based on information from the SWI-Prolog cross referencer using code shared with PceEmacs8 . The colouring engine uses read term/3 with options ‘subterm positions’ to get the term layout compatible to Quintus Prolog [1] and ‘comments’ to get comments and their positions in the source file. 5 User experiences tOKo [2] is an open source tool for text analysis, ontology development and social science research (e.g. analysis of Web 2.0 documents). tOKo is written 8 http://www.swi-prolog.org/emacs.html PlDoc 11 Fig. 7. Undocumented public predicates are added at the bottom. When accessed from ‘localhost’, the developer can click the edit icon, add or fix documentation and click the reload icon at the top of the page to view the updated documentation. in SWI-Prolog. The user base is very diverse and ranges from semantic web researchers who need direct access to the underlying code for their experiments, system developers who use an HTTP interface to integrate a specific set of tOKo functionality into their systems, to social scientists who only use the interactive user interface. The source code of tOKo, 135,000 lines (excluding dictionaries) distributed over 321 modules provides access to dictionaries, the internal representation of the text corpus, natural language processing and statistical NLP algorithms, (pattern) search algorithms, conversion predicates and the XPCE9 code for the user interface. Before the introduction of the PlDoc package only part of the user interface was documented on the tOKo homepage. Researchers and system developers who needed access to the predicates had to rely on the source code proper which, given 9 http://www.swi-prolog.org/packages/xpce/ 12 Wielemaker and Anjewierden the sheer size, is far from trivial. In practice, most researchers simply contacted the development team to get a handle on “where to start”. This example shows that when open source software has non-trivial or very large interfaces it is necessary to complement the source code with proper documentation of at least the primary API predicates. After the introduction of PlDoc all new tOKo functionality is being documented using the PlDoc style of literate programming. The main advantages have already been mentioned, in particular the immediate reward for the programmer. The intuitive notation of PlDoc also makes it relatively easy to add the documentation. The Emacs Prolog mode developed for SWI-Prolog10 automatically reformats the documentation, such that mixing code and documentation becomes natural after a very short learning curve. One of the biggest advantages of writing documentation at all is that it reinforces a programmer to think about the names and arguments of predicates. For many of the predicates in tOKo the form is operation(Output, Options) or operation(Input, Output, Options). Using an option list, also common in the ISO standard predicates and the SWI-Prolog libraries, avoids an explosion of predicates. For example, misspellings corpus/2, which finds misspellings in a corpus of documents, has options for the algorithm to use, the minimum word length and so forth: misspellings corpus(Output, [minimum length(5), edit distance(1), dictionary(known)]). Without documentation, once the right predicate is found, the programmer still has to check and understand the source code to determine which options are to be used. Writing documentation forces the developer to think about determining a consistent set of names of predicates and names of option type arguments. A problem that the PlDoc approach only solves indirectly is when complex data types are used. In tOKo this for example happens for the representation of the corpus as a list of tokens. In a predicate one can state that its first argument is a list of tokens, but a list of tokens itself has no predicate and the documentation of what a token list looks like is non-trivial to create a link to. Partial solutions are to point to a predicate where the type is defined, possibly from a @see keyword or point to a txt file where the type is defined. Completing the PlDoc style documentation for tOKo is still a daunting task. The benefits for the developer are, however, too attractive not to do it. 6 Related work The lpdoc system [5] is the most widely known literate programming system in the Logic Programming world. It uses a rich annotation format represented as Prolog directives and converts these into Texinfo [3]. Texinfo has a long history, but in our view it is less equipped for supporting interactive literate programming for Logic Programming in a portable environment. The language lacks the primitives and notational conventions in the Logic Programming domain and is 10 http://turing.ubishops.ca/home/bruda/emacs-prolog PlDoc 13 not easily expanded. The required TEX based infrastructure and way of thinking no longer is a given. In Logtalk [9], documentation supporting declarations are part of the language. The intermediate format is XML, relying on XML translation tools and style sheets for rendering in browsers and on paper. At the same time the structure information embedded in the XML can be used by other tools to reason about Logtalk programs. The ECLiPSe11 documentation tools use a single comment/1 directive containing an attribute-value list of information for the documentation system. The Prolog based tools render this as HTML or plain text. PrologDoc12 is a Prolog version of JavaDoc. It stays close to JavaDoc, heavily relying on ‘@’-keywords and using HTML for additional markup. Figure 8 gives an example. /** @form member(Value,List) @constraints @ground Value @unrestricted List @constraints @unrestricted Value @ground List @descr True if Value is a member of List */ Fig. 8. An example using PrologDoc Outside the Logic Programming domain there is a large set of literate programming tools. A good example, the website of which contains a lot of information on related systems, is Doxygen [16]. Most of the referenced systems use structured comments. 7 Extending and porting PlDoc Although to us the embedded HTTP server backend is the primary target, PlDoc will be extended with backends for static HTML files (partially realised). PlDoc is primarily an API documentation system. It is currently not very suitable for generating a book. Such functionality is highly desirable for dealing with the SWI-Prolog system documentation, maintained in LATEX. We will investigate the possibility to introduce a LATEX macro that will extract the documentation of a file or single predicate and insert it into the LATEX text. For example: 11 12 http://eclipse.crosscoreop.com/doc/userman/umsroot088.html http://prologdoc.sourceforge.net/ 14 Wielemaker and Anjewierden \begin{description} \pldoc{member}{2} \pldoc{length}{2} \end{description} PlDoc is Open Source and can be used as the basis for other Prolog implementations. The required comment processing hooks can be implemented easily in any Prolog system. The comment gathering and processing code requires a Quintus style module system. The current implementation uses SWI-Prolog’s nonstandard (but not uncommon) packed string datatype for representing comments. Avoiding packed strings is possible, but increases memory usage on most systems. The web server relies on the SWI-Prolog HTTP package, which in turn relies on the socket library and multi-threading support. Given the standardisation effort on thread support in Prolog13 , portability may become feasible. In many situations it may be acceptable and feasible to use the SWI-Prolog hosted PlDoc system while actual development is done in another Prolog implementation. 8 Conclusions In literate programming systems there are choices on the integration between documentation and language, the language used for the documentation and the backend format(s). Getting programmers to document their code is already hard enough, which provided us with the motivation to go for minimal work and maximal and immediate reward for the programmer. PlDoc uses structured comments using Wiki-style documentation syntax extended with plain-text conventions from the Prolog community. The primary backend is HTML+CSS, served from an HTTP server embedded in Prolog. The web application provides a unified search and view for the application code, Prolog libraries and Prolog reference manual. Acknowledgements Although the development of PlDoc was on our radar for a long time, financial help from a commercial user in the UK finally made it happen. Comments from the SWI-Prolog user community have helped fixing bugs and identifying omissions in the functionality. References 1. AI International ltd., Berkhamsted, UK. Quintus Prolog, User Guide and Reference Manual, 1997. 13 http://www.sju.edu/∼jhodgson/wg17/projects.html PlDoc 15 2. Anjo Anjewierden, Bob Wielinga, and Robert de Hoog. Task and domain ontologies for knowledge mapping in operational processes. Metis Deliverable 4.2/2003, University of Amsterdam, 2004. tOKo home: http://www.toko-sigmund.org/. 3. Robert J. Chassell and Richard M. Stallman. Texinfo: The GNU Documentation Format. Reiters.com, 1999. 4. P. Deransart, A. Ed-Dbali, and L. Cervoni. Prolog: The Standard. Springer-Verlag, New York, 1996. 5. Manuel V. Hermenegildo. A documentation generator for (c)lp systems. In John W. Lloyd, Verónica Dahl, Ulrich Furbach, Manfred Kerber, Kung-Kiu Lau, Catuscia Palamidessi, Luı́s Moniz Pereira, Yehoshua Sagiv, and Peter J. Stuckey, editors, Computational Logic, volume 1861 of Lecture Notes in Computer Science, pages 1345–1361. Springer, 2000. 6. David Jeffery, Fergus Henderson, and Zoltan Somogyi. Type classes in mercury. In ACSC, pages 128–135. IEEE Computer Society, 2000. 7. Donald E. Knuth. Literate programming. Comput. J., 27(2):97–111, 1984. 8. B. Leuf and W. Cunningham. The Wiki Way: Collaboration and Sharing on the Internet. Addison-Wesley, 2001. 9. Paulo Moura. Logtalk - Design of an Object-Oriented Logic Programming Language. PhD thesis, Department of Informatics, University of Beira Interior, Portugal, September 2003. 10. Linda Dailey Paulson. Building Rich Web Applications with Ajax. IEEE Computer, 38(10):14–17, 2005. 11. Vreda Pieterse, Derrick G. Kourie, and Andrew Boake. A case for contemporary literate programming. In SAICSIT ’04: Proceedings of the 2004 annual research conference of the South African institute of computer scientists and information technologists on IT research in developing countries, pages 2–9, , Republic of South Africa, 2004. South African Institute for Computer Scientists and Information Technologists. 12. Norman Ramsey and Carla Marceau. Literate programming on a team project. Software - Practice and Experience, 21(7):677–683, 1991. 13. A. Shum and C. Cook. Aops: an abstraction-oriented programming system for literateprogramming. Software Engineering Journal, 8(3):113–120, 1993. 14. Stephen Shum and Curtis Cook. Using literate programming to teach good programming practices. In SIGCSE ’94: Proceedings of the twenty-fifth SIGCSE symposium on Computer science education, pages 66–70, New York, NY, USA, 1994. ACM Press. 15. Richard M. Stallman. Emacs the extensible, customizable self-documenting display editor. SIGPLAN Not., 16(6):147–156, 1981. 16. D van Heesch. Doxygen, a documentation system for C++, 2007. http://www.stack.nl/ dimitri/doxygen/. 17. Jan Wielemaker, Zhisheng Huang, and Lourens van der Mey. SWI-Prolog and the Web. Accepted for publication in tplp, HCS, University of Amsterdam, 2006.
6cs.PL
Exponential Natural Particle Filter Ghazal Zand, Mojtaba Taherkhani and Reza Safabakhsh Robotics Research Institute, AmirKabir University of Technology, Tehran, Iran Computer Engineering and Information Technology Dep., AmirKabir University of Technology, Tehran, Iran { ghazal.zand, taherkhani.mojtaba, safa }@aut.ac.ir Abstract Particle Filter (PF) is the most widely used Bayesian sequential estimation method for obtaining hidden states of nonlinear dynamic systems. However, it still suffers from certain problems such as the loss of particle diversity, the need for large number of particles, and the costly selection of the importance density functions. In this paper, a novel PF called Exponential Natural Particle Filter (xNPF) is introduced to solve the above problems. In this approach, a state transitional probability with the use of natural gradient learning is proposed which balances exploration and exploitation more robustly. PF with the proposed density function does not need a large number of particles and it retains particles’ diversity in a course of run. The proposed system is evaluated in a time-varying parameter estimation problem on a dynamic model of HIV virus immune response. This model is used to show the performance of the xNPF in comparison with several state of the art particle filter variants such as Annealed PF, Bootstrap PF, iterative PF, equivalent weight PF, and intelligent PF. The results show that xNPF converges much closer to the true target states than the other methods. Introduction The states of a system provide a complete representation of the system’s internal condition and status (Yin and Zhu 2015); hence obtaining the system states is very important for many problems such as process monitoring (Gao and Ding 2007; Gao and Ho 2006), localization (Lu 2014; Yang 2014), robot navigation (Atia et al. 2010; Hiremath et al. 2014), single or multi object tracking (Bae and Yoon 2014; Fan, Ji, and Zhang 2015; Mihaylova 2014; Nannuru and Coates 2013; Zhang 2015; Zhao 2013), lane detection (Shin, Tao, and Klette 2014) and so on. These problems require estimation of the state of a dynamical system by using a sequence of noisy measurements made on the system. Solving these problems is the goal of state estimation algorithms. Bayesian sequential estimation is the basis for the most of the state estimation methods. In a Bayesian framework, the aim is thus to compute the posterior distribution p(Xt|Z1:t), where Z1:t is the noisy observation set from time 1 to t and Xt is the global state vector at time t. The Particle Filter algorithm (PF) is a Bayesian sequential estimation method whose fundamental idea is to approximate p(Xt|Z1:t) with a set of particles with associated weights. The PF is designed for a hidden Markov Model, in which the observation processes are related to the state processes, as shown in Figure 1. Figure 1: Particle Filter’s hidden Markov Model. This model shows how the observation processes are related to the state processes. p(Xt|Xt-1) is the state transition probability and p(Zt|Xt) is the observation probability by given state. To briefly review generic PFs, let’s consider the General form of discrete-time nonlinear dynamical systems as Xt+1 =f(Xt ,Qt ) (1) Zt =h(Xt ,Et ) where, Qt and Et denote process noise and observation noise at time t, f and h are nonlinear functions of the system. The noise signals are assumed to be independent and with known Probability Density Function (PDF). The posterior density is calculated as (2) p (Xt |Z1:t )=k.p (Zt |Xt ) ∫ p (Xt |Xt-1 ).p (Xt-1 |Z1:t-1 )dXk-1 The integral in (2) can be approximated with N independent weighted particles by using Monte-Carlo sampling. It starts with assuming that there is a weighted sample representation for the posterior p(Xt-1|Z1:t-1) at the previous time (3) step. (i) (i) St-1 ={(xt-1 , wt-1 );1,…,N} (i) (i) where, wt-1 and xt-1 denote the weight and the state of particle i at time t-1. By using this set to carry out Monte-Carlo integration, the integral in (2) is approximated as: (i) (i) ∫ p (Xt |Xt-1 ).p (Xt-1 |Z1:t-1 )dXk-1 ≈ ∑ wt-1 p (Xt |xt-1 ) (4) i Then, the posterior density is calculated by re-weighting the particles as: (i) (i) (i) (i) p (zt |xt )p (xt |xt-1 ) (i) (5) wt ∝ wt-1 (i) (i) q (xt |xt-1 ,Z1:t ) Where q(xt i | xt-1i ,Zt ) is a proposal density function to estimate the particles’ positions. The algorithms mostly use () () p (xt i |xt-1i ) as the proposal density function. After computing the weights, particles need to be resampled independently N times, with replacement, from the obtained distribution. Resampling is performed to avoid degeneracy in the particle filter. In the resampling phase, particles with low importance are removed and replaced with more probable new particles. The diagram of Figure 2 (Smith et al. 2013) shows the mentioned iteration of the PF. () () Figure 2: Resampling phase in PF algorithm. In this phase, particles with low weight are replaced with more important particles.(Smith et al. 2013) The PF algorithm performs relatively better than other nonlinear filtering methods; but it still face some problems: (a) the importance density functions selection (Fan et al. 2015; Zuo et al. 2013). (b) the loss of particle diversity (Fan et al. 2015). (c) the need for large number of particles (Ades and Van Leeuwen 2013). The objective of this paper is to design a new PF which tries to solve the above mentioned problems. In the proposed method, called Exponential Natural Particle Filter (xNPF), particles are classified into two classes. The particles of the first class aim to retain the diversity (as the Exploration stage) by using original state transition probability; whereas the particles of the second class try to search locally (as the Exploitation stage) by using the proposed state transition probability. In addition, the proposed PF does not need a large number of particles. The reason is that unlike the standard PF, in which a few of particles have a significant weight and the rest of them have a negligible weigh, in the proposed method the majority of particles contribute significant information to the posterior probability. The rest of this paper is organized as follows. The second section provides a review of different PFs. In this section, PF algorithms are classified based on addressing the mentioned problems. In the third section, a novel particle filter is proposed and explained in detail. The experimental results are discussed in the fourth section, and the last section concludes the paper. Related Works Since the introduction of PF(N. J. Gordon, Salmond, and Smith 1993), many intelligent search and optimization methods have been incorporated into PF to enhance the performance of the classic PF. For example, Bin et al. (Bin 2013) proposed a localization algorithm called PSO-PF algorithm based on particle swarm optimization. By propagating the particles using the PSO method, their algorithm eliminates the phenomenon of loss of particles’ diversity. In (Szczuko 2014), a Hybrid genetic-APF method is presented in which a genetic algorithm is combined with annealed PF for human body pose estimation. In these algorithms, particles share more information that causes locating in the most probable areas. In (Park et al. 2009; Yin and Zhu 2015), the genetic operators are designed to further improve the particle diversity while avoiding the premature convergence, since the misleading state estimating problem in general PF is mainly caused by the poverty of particle diversity. Kalami and Khaloozadeh tried to solve the misleading state estimating problem by converting the nonlinear state estimation problem to a multi-objective optimization problem and proposed non-dominated Genetic Filter based on the genetic algorithm and PF (Kalami Heris and Khaloozadeh 2014). Recently, Fan et al. proposed an Iterative PF (IPF) which converges to true target state more closely by sampling the particles iteratively with the search scope contracted (Fan et al. 2015). IPF is motivated by the success of both increasing the sampling density and simulated annealing. As mentioned before, the limitation of the number of particles that can be used, is one of the most serious issues in the particle filtering problem. To overcome this problem, BoxPF (Gning, Ristic, and Mihaylova 2012; Gning et al. 2013) addresses the concept of box particle that can make sampling from coarse to fine, improving the sampling efficiency. The purpose of this method is to reduce the number of random samples required by the standard particle filter. Ades et al. proposed a PF which uses the proposal density to ensure that all particles end up in the high-probability region of the posterior pdf (Ades and Van Leeuwen 2013). This gives rise to the possibility of nonlinear data assimilation in large-dimensional systems. Also, in (Ades and Van Leeuwen 2015), a fully nonlinear equivalent weights PF is presented to avoid the need for a large numbers of particles by replacing the standard model transition density with two different proposal transition densities. The first one is used to relax all particles towards the high-probability regions of the state space as defined by the observations. The second one is then used to ensure that the majority of particles have equivalent weights at the observation time. Yoon et al. describe a vision-based system for tracking objects based on fuzzy PF algorithm in which the states are estimated using a fuzzy expected value operator (Yoon, Cheon, and Park 2013). This fuzzy PF algorithm is proposed to overcome problems from the occurrence of the unexpected improper variances due to several causes (e.g. process noises, or observation noises). Finally, in the last decades many famous modifications have been introduced in the PF, such as the Bootstrap Particle Filter (BPF), the Auxiliary Particle Filter (APF), the Regularized Particle Filter (RPF), the Unscented Particle Filter (UPF), and the Gaussian Particle Filter (GPF)(Arulampalam et al. 2002; N. Gordon, Ristic, and Arulampalam 2004; N. J. Gordon et al. 1993; Kotecha and Djurić 2003). Exponential Natural Particle Filter The PF algorithm proposed in this paper, which is called the Exponential Natural Particle Filter (xNPF), is inspired by the following idea. The appropriate selection of the proposal density function can increase the sampling density to close to the true state, so that the particles can be used sufficiently. Thus, it can meet the same precision requirements with fewer particles. On the other hand, increasing the sampling density in a small region leads to the loss of diversity. So, the particles cannot search the environment properly. In the xNPF, particles are classified into two classes A and B. The particles of class A try to retain the diversity (exploration) by using original state transition probability, and the particles of class B try to search locally (exploitation) by using the proposed state transition probability. To classify particles, a partitioning parameter (πpartition) ϵ [0,1] is considered. This parameter randomly partitions all particles into class A and class B, in which the cardinalities are defined with (6) |A|=⌈πpartition *N⌉ |B|=N-|A| where ⌈x⌉ indicates the smallest integer which is greater than or equal to x (ceiling of x ). The idea of using natural gradient learning has been proposed in Exponential Natural Evolution Strategy (xNES). To propose the state transition probability for class B, xNES is used which iteratively updates the probability distribution by using an estimated gradient on its distribution parameters (Glasmachers et al. 2010). These updates continue until T iteration. This estimation of distribution algorithm presents an exponential parametrization of the search distribution. It guarantees invariance, while at the same time provides an elegant and efficient way of computing the natural gradient without the need for the explicit Fisher information. In this paper by selecting a large value for the step size which is used in the original transitional probability, diversity of the particles of class A is retained while the exploration is improved. On the other hand, by using an estimated gradient, the proposed transitional probability for class B improves local search ability of the particles. Thus, the balance between global and local search is gained. Using the above idea, the proposal density function for estimating the particles’ positions is defined as (i) (i) p(xt |xt-1 ) (I) q(xt )= { (i) (i) qxNES (xt |xt-1 , iϵA mt-1 , 𝝈2t-1 , 𝑪t-1 ) (7) iϵB where qxNES(.|.) is the proposed state transition probability which is computed by xNES; mt-1, σt-1 and Ct-1 are the mean value, step size, and covariance matrix returned by xNES at the end of the Tth iteration. According to the (6), the primary probabilites of classes A and B are calculated as Pr{iϵA} =1-πpartition (8) Pr{iϵB} =πpartition Hence, (7) can be written in compact form as () () (i) (i) q(xt i | xt-1i ,Zt ) = πpartition qxNES (xt |xt-1 ,mt-1 ,σ2t-1 Ct-1 ) (9) (i) (i) + (1-πpartition)p(xt |xt-1 ) According to (5) and (7), the rule of updating weights in xNPF is given by (i) wt ∝ (i) (i) (10) (i) p(zt |xt ) p(xt |xt-1 ) (i) (i) (i) (i) (i) πpartitionqxNES (xt |xt-1 ,mt-1 ,σ2t-1 Ct-1 )+(1-πpartition)p(xt |xt-1 ) wt-1 The resampling method in the standard PF is known as the Roulette Wheel Selection (RW) rule in the field of evolutionary computation. Methods like RW may have a bad performance when a particle has a high weight in comparison with other particles. In RW, the most highly weighted particle may saturate the candidate space, and this leads to more loss of particles’ diversity. For the resampling step of xNPF, the Stochastic Universal Sampling (SUS) (De Falco et al. 2012) algorithm is used. This algorithm does not have the mentioned problem. SUS uses a single random value to sample all of the particles by choosing them at evenly spaced intervals. This gives weaker particles a chance to be chosen and thus reduces the unfair nature of fitness-proportional selection methods. The other parts of xNPF are the same as these in the standard particle filter. The overall structure of the xNPF algorithm is shown in Figure3. In a nutshell, (11) can be interpreted as follows. Healthy CD4+ T cells, which have an average life span of 1/d days, are produced at a constant rate s. These cells can get infected by free virus particles. The infection is modeled using a simple mass-action type term, with a time-varying parameter β. Infected cells may have a different life span (1/ξ) than healthy cells, which means in general ξ ≠d. Finally, free virus particles are produced in infected cells, and released at a rate k, having an average life span of 1/c. Figure 4 presents the mentioned HIV infection model. Figure 4: The dynamic model of HIV infection. Healthy T cells are infected by virus with rate β. Target T cells are assumed to be produced at rate s and to die at rate d per cell. Infected cells T*, which produce new virions at rate k, and die at rate ξ per cell (Perelson 2002). Figure 3: Overall structure of the xNPF algorithm. In each step, the concept of the process is schematically shown. The size of the circles represents the associated weight. Zt = [ Experiments The efficiency of the xNPF is demonstrated by applying it to the problem of state estimation of the HIV infection model (Hartmann, Vinga, and Lemos 2012) assuming parametric uncertainty. To mathematically model the Human Immunodeficiency Virus (HIV), the three-dimensional basic infection model is considered. The model is given as Ṫ =s - dT - β(t)Tv * Ṫ = β(t)Tv - ξT* In this paper, the numerical values for the parameters of model (11) are selected as follows (Hartmann et al. 2012): θ=(368.94, 0.46, 7.26e-06, 2.16, 1317.4, 3.6). Simulation time is set to 190 days and a 25 days periodic input is applied to the system which results in the parameter β=3.63e-04. The measurement equation related to system is given by (11) * v̇ = kT - cv where T is the concentration of healthy CD4+ T-cells, T* is the concentration of HIV-infected CD4+ T-cells, and v is the free virus particles. The six parameters can be written in a vector form as θ=(s, d, β, ξ, k, c), where all components have biological significance. 1 0 1 0 Tt e1,t 0 ] [T*t ] + [e ] 2,t 1 vt (12) where e1,t ~ N(0, σ21 ) and e2,t ~ N(0, σ22 ) are independent zeromean Gaussian noises. In this paper, it is assumed that σ21 =0.05 and σ22 =1. In the first subsection, the effect of varying the number of particles and the partitioning parameter will be analyzed. In the second subsection, the performance of the xNPF is compared with some particle filter variants. The performance measure used to investigate the effectiveness of strategies is the RMSE. The default parameters for xNPF, such as the simulation time, the maximum number of xNES iterations, the number of particles, partitioning parameter and the step size of the original transitional probability are given in Table 1. The results of all experiments are averaged over 30 independent runs. Table 1: The default values for parameters of the xNPF. Symbol Description Range Default Value iter Maximum xNES iterations Step size of p(xt|xt-1) The number of particles Partitioning parameter [1,∞) 5 (0,∞) [1,∞) [0,1] 10 10 0.2 σ0 N πpartition same way as in the standard PF. These particles search globally (as the exploration stage) proportional to the value of the step size of p(Xt|Xt-1). The number of particles and partitioning parameter To investigate the effect of increasing the number of particles on the performance of the proposed method, various values of N are applied to the HIV infection model. For this experiment xNPF is run for different values of N and the default values of other parameters as in Table 1. Figure 5(a) shows the occurrence probability of the normalized weight versus the number of particles. Figure 5(b) and Figure 5(c) show the RMSE versus the number of particles. The problem in the standard PF is that the majority of the particles are far from observation; thus only a few of them have a significant weight and the rest have negligible weights. Then to achieve a satisfactory performance, the PF algorithm turns out to require a massive number of particles, which induces high computational complexity. Figure 5(a) shows that with the proposed density function, the particles are more likely to get closer to the true states and get better weights. Thus the method avoids blind sampling, by which the majority of the particles contribute significant information to the probability of the system state given the observation. By avoiding blind sampling, increasing the number of particles has no significant effect on bringing the approximation error down. Figure 5(b) and 5(c) show the mentioned result. Observing the graph closely, the obtained RMSE values of xNPF with the number of particles within the range of [25, 200] are similar. However, for comparing with other PF variants, N is considered equal to 25. Changes of the error value within the range of [5, 25] is quite natural since there is a small number of particles and xNPF cannot search the environment properly. To study the effect of the partitioning parameter on the performance of xNPF, various configurations of the partitioning parameter are used. For this reason, xNPF is run for different values of πpartition and the default values for other parameters as in Table 1. Performances of different configurations are summarized in Figure 6. If the πpartition assumes a small value, the number of particles in class B are increased. Thus the position of most of the particles is adjusted by gradient learning. To put it another way, these particles search locally (as the exploitation stage). Conversely, if the parameter assumes a large value, the number of particles in class A are increased. Thus the positions of the majority of the particles are adjusted in the Figure 5: the effect of different number of particles on performance of xNPF on HIV infection model (a) occurrence probability of normalized weight versus number of particles, (b) RMSE value for T+T* state versus number of particles and (c) RMSE value for v state versus number of particles. To have a successful search, an optimal balance between the exploration and exploitation must be found. If the particles only exploit, they will not be able to cover the drastic changes in the sequent system states. As a result, it will be more likely to predict the system state unsuccessfully. In addition, when the observation model causes many local optima, the error of the system state prediction gradually increases. Gradient learning causes the particles get stuck in these local optima. If the particles only explore, they can follow the system state, but their prediction of the system state will not be very accurate. Thus the error values increase. Hence, some of the particles should be searching globally, so that they can follow the system states even in drastic changes. Furthermore, there should be other particles searching locally, so that they can predict the system state more accurately. Figure 6(a) indicates that by increasing the value of πpartition, the changes in the prediction of state T+T* is slight. In other words, state T+T* is easily predictable during the simulation, but state v is not. The graph in Figure 6(b) shows that by increasing the value of πpartition, although the particles are able to follow the system state, the error increases because the particles are not able to predict the system state very accurately. In addition, since the sequent state v does not have drastic change, the small values for the πpartition are good results. With the πpartition within the range of [0.05, 0.3], error values are almost the same. However, to bring about a balance between the local and global search, πpartition equal to 0.3 is considered. In such a situation, some of the particles search globally, whilst the rest of them make the prediction of the system states more accurately by gradient learning. Table 2: State estimation comparison on HIV infection model RMSE BPF APF IPF Figure 6: partitioning parameter effect on performance of the xNPF the on HIV infection model (a) RMSE value for T+T* state versus partitioning parameter (b) RMSE value for v state versus partitioning parameter Comparison with other algorithms From all strategies introduced in the previous sections, five strategies are adopted in this study for comparisons: Annealed PF (APF)(Szczuko 2014), Bootstrap PF (BPF) (N. J. Gordon et al. 1993), iterative PF (IPF) (Fan et al. 2015), equivalent weight PF (Ades and Van Leeuwen 2015), and intelligent PF (Yin and Zhu 2015). Based on our previous experiments, xNPF is run with N=25, πpartition=0.3 and the default values for other parameters as in Table 1. The other algorithms are run with N equal to 100 and their other parameters are set based on the recommended values in their corresponding references. For a better comparison of the results, Table 2 lists the mean and standard deviation of the RMSE and the number of particles’ re-weighting found by each method. The bold number indicates the best solution according to a t-test with a significance level of 5%. Considering the same number of particles for all of the selected methods is not good for comparing the results properly. The methods may have some heuristic operators themselves, by which p(Xt|Xt-1) is calculated during several evaluations (going through reweighting step). Thus, the number of re-weighing is used for comparing RMSE values. Results indicate that all of the methods have the same RMSE in prediction of the state T+T*. The RMSE values of IPF, Equivalent weight PF and xNPF were better than the other methods in the prediction of state v. But the re-weighing number of xNPF is much lesser than IPF and Equivalent weight PF. Thus, xNPF is generally more successful. This method uses two classes of particles for exploration and exploitation. As a result, it can follow the system states even in sequentially drastic changes and can converge to the system states more accurately. equivalent weight PF intelligent PF xNPF T+T* 38.221 (0.489) 37.752 (1.026) 37.100 (1.172) 38.094 (1.129) 38.491 (0.632) 37.128 (1.072) V 1.4379E+03 (20.587) 807.800 (70.658) 654.870 (48.255) 659.12 (51.801) 1.3140E+03 (18.910) 674.725 (50.620) Number of re-weighing 190*100 ~190*500 ~190*500 ~190*500 ~190*164 ~190*100 Conclusions In this paper, the exponential natural particle filter has been introduced. With the proposed density function, this modification of the PF algorithm is able to efficiently converge to the true state. In this approach, a state transitional probability with the use of natural gradient learning is proposed which balances exploration and exploitation more robustly. PF with the proposed density function does not need a large number of particles and it retains particles’ diversity in a course of run. Experiments were designed in terms of comparing the solution accuracy and investigating the effect of increasing the number of particles and partitioning parameter on the performance of xNPF. The results clearly show the superiority of the xNPF over other novel methods. This method shows good experimental results due to using the proposed density function. It is possible to use an asymmetrical distribution as the proposal density function to consider the direction of the system states changes in the next states predictions. References Ades, M.; and Van Leeuwen, P. 2013. An exploration of the equivalent weights particle filter. Quarterly Journal of the Royal Meteorological Society 139(672): 820-840. Ades, M.; and Van Leeuwen, P. 2015. The equivalent-weights particle filter in a high-dimensional system. Quarterly Journal of the Royal Meteorological Society 141(687): 484-503. Arulampalam, M. S.; Maskell, S.; Gordon, N.; and Clapp, T. 2002. A tutorial on particle filters for online nonlinear/non-Gaussian Bayesian tracking. IEEE Transactions on Signal Processing 50(2): 174-188. Atia, M. M.; Georgy, J.; Korenberg, M.; and Noureldin, A. 2010. Real-time implementation of mixture particle filter for 3D RISS/GPS integrated navigation solution. Electronics letters 46(15): 1083-1084. Bae, S.-H.; and Yoon, K. 2014. Robust online multiobject tracking with data association and track management. IEEE Transactions on Image Processing 23(7): 2820-2833. Bin, L., N. Wu, H. Wang, D. Shi, W. Yuan, and J. Kuang 2013. Particle swarm optimization-based particle filter for cooperative localization in wireless networks, 1-6. In International Conference on Wireless Communications & Signal Processing (WCSP), Hangzhou. De Falco, I.; Della Cioppa, A.; Maisto, D.; Scafuri, U.; and Tarantino, E. 2012. Biological invasion–inspired migration in distributed evolutionary algorithms. Information Sciences 207: 5065. Fan, Z.; Ji, H.; and Zhang, Y. 2015. Iterative particle filter for Visual tracking. Signal Processing: Image Communication 36: 140-153. Gao, Z.; and Ding, S. X. 2007. Actuator fault robust estimation and fault-tolerant control for a class of nonlinear descriptor systems. Automatica 43(5): 912-920. Gao, Z.; and Ho, D. W. 2006. State/noise estimator for descriptor systems with application to sensor fault diagnosis. IEEE Transactions on Signal Processing 54(4): 1316-1326. Glasmachers, T.; Schaul, T.; Yi, S.; Wierstra, D.; and Schmidhuber, r. 2010. Exponential natural evolution strategies, 393-400. In The 12th annual conference on Genetic and evolutionary computation, Portland, Oregon, USA. Gning, A.; Ristic, B.; and Mihaylova, L. 2012. Bernoulli particle/box-particle filters for detection and tracking in the presence of triple measurement uncertainty. IEEE Transactions on Signal Processing 60(5): 2138-2151. Gning, A.; Ristic, B.; Mihaylova, L.; and Abdallah, F. (2013). An introduction to box particle filtering. IEEE Signal Processing, 30(4): 166-171. Gordon, N.; Ristic, B.; and Arulampalam, S. 2004. Beyond the kalman filter: Particle filters for tracking applications. Artech House, London. Gordon, N. J.; Salmond, D. J.; and Smith, A. F. 1993. Novel approach to nonlinear/non-Gaussian Bayesian state estimation, 107-113. In IEE Proceedings F (Radar and Signal Processing). Hartmann, A.; Vinga, S.; and Lemos, J. M. 2012. Online bayesian time-varying parameter estimation of hiv-1 time-series, 12941299. In 16th IFAC Symposium on System Identification, Belgium. Hiremath, S. A.; Van Der Heijden, G. W.; Van Evert, F. K.; Stein, A.; and Ter Braak, C. J. 2014. Laser range finder model for autonomous navigation of a robot in a maize field using a particle filter. Computers and Electronics in Agriculture 100: 41-50. Kalami Heris, S. M.; and Khaloozadeh, H. 2014. Non-dominated sorting genetic filter a multi-objective evolutionary particle filter, 1-6. In Iranian Conference on Intelligent Systems (ICIS), Bam. Kotecha, J. H.; and Djurić, P. M. 2003. Gaussian particle filtering. IEEE Transactions on Signal Processing 51(10): 2592-2601. Lu, W., E. Seignez, F. S. Rodriguez, and R. Reynaud. 2014. Lane marking based vehicle localization using particle filter and multikernel estimation, 601-606. In 13th International Conference on Control Automation Robotics & Vision (ICARCV), Singapore. Mihaylova, L., A. Y Carmi, F. Septier, and Amadou Gning. 2014. Overview of Bayesian sequential Monte Carlo methods for group and extended object tracking. Digital Signal Processing 25: 1-16. Nannuru, S.; and Coates, M. 2013. Particle filter implementation of the multi-Bernoulli filter for superpositional sensors, 368-371. In IEEE 5th International Workshop on Computational Advances in Multi-Sensor Adaptive Processing (CAMSAP), St. Martin Park, S.; Hwang, J. P.; Kim, E.; and Kang, H.-J. 2009. A new evolutionary particle filter for the prevention of sample impoverishment. IEEE Transactions on Evolutionary Computation 13(4): 801-809. Perelson, A. S. 2002. Modelling viral and immune system dynamics. Nat Rev Immunol 2(1): 28-36. Shin, B.-S.; Tao, J.; and Klette, R. 2014. A superparticle filter for lane detection. Pattern Recognition 48(11): 3333–3345. Smith, A.; Doucet, A.; de Freitas, N.; and Gordon, N. (2013). Sequential Monte Carlo methods in practice: Springer Science & Business Media. Szczuko, P. 2014. Genetic programming extension to APF-based monocular human body pose estimation. Multimedia Tools and Applications 68(1): 177-192. Yang, P., and W. Wu. 2014. Efficient Particle Filter Localization Algorithm in Dense Passive RFID Tag Environment. IEEE Transactions on Industrial Electronics 61(10): 5641-5651. Yin, S.; and Zhu, X. 2015. Intelligent particle filter and its application on fault detection of nonlinear system. IEEE Transactions on Industrial Electronics 62(6): 3852 - 3861. Yoon, C.; Cheon, M.; and Park, M. 2013. Object tracking from image sequences using adaptive models in fuzzy particle filter. Information Sciences 253: 74-99. Zhang, S., J. A Wang, Z. A Wang, Y. A Gong, and Y. Liu. 2015. Multi-target tracking by learning local-to-global trajectory models. Pattern Recognition 48(2): 580-590. Zhao, Y., and H. A Pei. 2013. Object tracking based on particle filter with discriminative features. Journal of Control Theory and Applications 11(1): 42-53. Zuo, J.; Liang, Y.; Zhang, Y.; and Pan, Q. 2013. Particle filter with multimode sampling strategy. Signal Processing 93(11): 31923201.
9cs.NE
Sketching and Embedding are Equivalent for Norms∗ Alexandr Andoni† Robert Krauthgamer‡ Ilya Razenshteyn§ arXiv:1411.2577v3 [cs.DS] 15 Feb 2017 February 16, 2017 Abstract An outstanding open question posed by Guha and Indyk in 2006 asks to characterize metric spaces in which distances can be estimated using efficient sketches. Specifically, we say that a sketching algorithm is efficient if it achieves constant approximation using constant sketch size. A well-known result of Indyk (J. ACM, 2006) implies that a metric that admits a constantdistortion embedding into ℓp for p ∈ (0, 2] also admits an efficient sketching scheme. But is the converse true, i.e., is embedding into ℓp the only way to achieve efficient sketching? We address these questions for the important special case of normed spaces, by providing an almost complete characterization of sketching in terms of embeddings. In particular, we prove that a finite-dimensional normed space allows efficient sketches if and only if it embeds (linearly) into ℓ1−ε with constant distortion. We further prove that for norms that are closed under sum-product, efficient sketching is equivalent to embedding into ℓ1 with constant distortion. Examples of such norms include the Earth Mover’s Distance (specifically its norm variant, called Kantorovich–Rubinstein norm), and the trace norm (a.k.a. Schatten 1-norm or the nuclear norm). Using known non-embeddability theorems for these norms by Naor and Schechtman (SICOMP, 2007) and by Pisier (Compositio. Math., 1978), we then conclude that these spaces do not admit efficient sketches either, making progress towards answering another open question posed by Indyk in 2006. Finally, we observe that resolving whether “sketching is equivalent to embedding into ℓ1 for general norms” (i.e., without the above restriction) is equivalent to resolving a well-known open problem in Functional Analysis posed by Kwapien in 1969. 1 Introduction One of the most exciting notions in the modern algorithm design is that of sketching, where an input is summarized into a small data structure. Perhaps the most prominent use of sketching is to estimate distances between points, one of the workhorses of similarity search. For example, some early uses of sketches have been designed for detecting duplicates and estimating resemblance between documents [Bro97, BGMZ97, Cha02]. Another example is Nearest Neighbor Search, where many algorithms rely heavily on sketches, under the labels of dimension reduction (like ∗ An extended abstract appeared in proceedings of the 47th ACM Symposium on the Theory of Computing (STOC ’2015). This work was done in part while all authors were at Microsoft Research Silicon Valley, as well as when the first author was at the Simons Institute for the Theory of Computing at UC Berkeley. † Columbia University, [email protected] ‡ Weizmann Institute of Science, [email protected]. Work supported in part by a US-Israel BSF grant #2010418 and an Israel Science Foundation grant #897/13. § MIT CSAIL, [email protected] 1 the Johnson-Lindenstrauss Lemma [JL84]) or Locality-Sensitive Hashing (see e.g. [IM98, KOR00, AI08]). Sketches see widespread use in streaming algorithms, for instance when the input implicitly defines a high-dimensional vector (via say frequencies of items in the stream), and a sketch is used to estimate the vector’s ℓp norm. The situation is similar in compressive sensing, where acquisition of a signal can be viewed as sketching. Sketching—especially of distances such as ℓp norms—was even used to achieve improvements for classical computational tasks: see e.g. recent progress on numerical linear algebra algorithms [Woo14], or dynamic graph algorithms [AGM12, KKM13]. Since sketching is a crucial primitive that can lead to many algorithmic advances, it is important to understand its power and limitations. A primary use of sketches is for distance estimation between points in a metric space (X, dX ), such as the Hamming space. The basic setup here asks to design a sketching function sk : X → {0, 1}s , so that the distance dX (x, y) can be estimated given only the sketches sk(x), sk(y). In the decision version of this problem, the goal is to determine whether the inputs x and y are “close” or “far”, as formalized by the Distance Threshold Estimation Problem [SS02], denoted DTEPr (X, D), where, for a threshold r > 0 and approximation D ≥ 1 given as parameters in advance, the goal is to decide whether dX (x, y) ≤ r or dX (x, y) > Dr. Throughout, it will be convenient to omit r from the subscript.1 Efficient sketches sk almost always need to be randomized, and hence we allow randomization, requiring (say) 90% success probability. The diversity of applications gives rise to a variety of natural and important metrics M for which we want to solve DTEP: Hamming space, Euclidean space, other ℓp norms, the Earth Mover’s Distance, edit distance, and so forth. Sketches for Hamming and Euclidean distances are now classic and well-understood [IM98, KOR00]. In particular, both are “efficiently sketchable”: one can achieve approximation D = O(1) using sketch size s = O(1) (most importantly, independent of the dimension of X). Indyk [Ind06] extended these results to efficient sketches for every ℓp norm for p ∈ (0, 2]. In contrast, for ℓp -spaces with p > 2, efficient sketching (constant D and s) was proved impossible using information-theoretic arguments [SS02, BJKS04]. Extensive subsequent work investigated sketching of other important metric spaces,2 or refined bounds (like a trade-off between D and s) for “known” spaces.3 These efforts provided beautiful results and techniques for many specific settings. Seeking a broader perspective, a foundational question has emerged [McG06, Question #5]: Question 1.1. Characterize metric spaces which admit efficient sketching. To focus the question, efficient sketching will mean constant D and s for us. Since its formulation circa 2006, progress on this question has been limited. The only known characterization is by [GIM08] for distances that are decomposable by coordinates, i.e., dX (x, y) = 1 Pn i=1 ϕ(xi , yi ) for When X is a normed space it suffices to consider r = 1 by simply scaling the inputs x, y. Other metric spaces include edit distance [BJKK04, BES06, OR07, AK10] and its variants [CPSV00, MS00, CMS01, CM07, CK06, AIK09], the Earth Mover’s Distance in the plane or in hypercubes [Cha02, IT03, CLL04, KN06, AIK08, ADIW09], cascaded norms of matrices [JW09], and the trace norm of matrices [LNW14a]. 3 These refinements include the Gap-Hamming-Distance problem [Woo04, JKS08, BC09, BCR+ 10, CR12, She12, Vid12], and LSH in ℓ1 and ℓ2 spaces [MNP06, OWZ14]. 2 2 some ϕ. In particular, they show a number of general conditions on ϕ which imply an Ω(n) sketching complexity for dX . 1.1 The embedding approach To address DTEP in various metric spaces more systematically, researchers have undertaken the approach of metric embeddings. A metric embedding of X is a map f : X → Y into another metric space (Y, dY ). The distortion of f is the smallest D′ ≥ 1 for which there exists a scaling factor t > 0 such that ∀x, y ∈ X, dY (f (x), f (y)) ≤ t · dX (x, y) ≤ D ′ · dY (f (x), f (y)). If the target metric Y admits sketching with parameters D and s, then X admits sketching with parameters D · D ′ and s, by the simple composition sk′ : x 7→ sk(f (x)). This approach of “reducing” sketching to embedding has been very successful, including for variants of the Earth Mover’s Distance [Cha02, IT03, CLL04, NS07, AIK08], and for variants of edit distance [BES06, OR07, CK06, AIK09, CPSV00, MS00, CMS01, CM07]. The approach is obviously most useful when Y itself is efficiently sketchable, which holds for all Y = ℓp , p ∈ (0, 2] [Ind06] (we note that ℓp for 0 < p < 1 is not a metric space, but rather a quasimetric space; the above definitions of embedding and distortion make sense even when Y is a quasimetric, and we will use this extended definition liberally). In fact, the embeddings mentioned above are all into ℓ1 , except for [AIK09] which employs a more complicated target space. We remark that in many cases the distortion D ′ achieved in the current literature is not constant and depends on the “dimension” of X. Extensive research on embeddability into ℓ1 has resulted in several important distortion lower bounds. Some address the aforementioned metrics [KN06, NS07, KR09, AK10], while others deal with metric spaces arising in rather different contexts such as Functional Analysis [Pis78, CK10, CKN11], or Approximation Algorithms [LLR94, AR98, KV05, KS09]. Nevertheless, obtaining (optimal) distortion bounds for ℓ1 -embeddability of several metric spaces of interest, are still wellknown open questions [MN11]. Yet sketching is a more general notion, and one may hope to achieve better approximation by bypassing embeddings into ℓ1 . As mentioned above, some limited success in bypassing an ℓ1 -embedding has been obtained for a variant of edit distance [AIK09], albeit with a sketch size depending mildly on the dimension of X. Our results disparage these hopes, at least for the case of normed spaces. 1.2 Our results Our main contribution is to show that efficient sketchability of norms is equivalent to embeddability into ℓ1−ε with constant distortion. Below we only assert the “sketching =⇒ embedding” direction, as the reverse direction follows from [Ind06], as discussed above. 3 Theorem 1.2. Let X be a finite-dimensional normed space, and suppose that 0 < ε < 1/3. If X admits a sketching algorithm for DTEP(X, D) for approximation D > 1 with sketch size s, then X linearly embeds into ℓ1−ε with distortion D ′ = O(sD/ε). One can ask whether it is possible to improve Theorem 1.2 by showing that X, in fact, embeds into ℓ1 . Since many non-embeddability theorems are proved for ℓ1 , such a statement would “upgrade” such results to lower bounds for sketches. Indeed, we show results in this direction too. First of all, the above theorem also yields the following statement. Theorem 1.3. Under the conditions of Theorem 1.2, X linearly embeds into ℓ1 with distortion O(sD · log(dim X)). Ideally, we would like an even stronger statement: efficient sketchability for norms is equivalent to embeddability into ℓ1 with constant distortion (i.e., independent of the dimension of X as above). Such a stronger statement in fact requires the resolution of an open problem posed by Kwapien in 1969 (see [Kal85, BL00]). To be precise, Kwapien asks whether every finite-dimensional normed space X that embeds into ℓ1−ε for 0 < ε < 1 with distortion D0 ≥ 1 must also embed into ℓ1 with distortion D1 that depends only on D0 and ε but not on the dimension of X (this is a reformulation of the finite-dimensional version of the original Kwapien’s question). In fact, by Theorem 1.2, the “efficient sketching =⇒ embedding into ℓ1 with constant distortion” statement is equivalent to a positive resolution of the Kwapien’s problem. Indeed, for the other direction, consider a potential counter-example to the Kwapien’s problem, i.e., a normed space X that embeds into ℓ1−ε with a constant distortion D0 ≥ 1, but every embedding of X into ℓ1 incurs a distortion D1 = ω(1), where the asymptotics is with the dimension of X (it is really a sequence of normed spaces). Hence, X admits an efficient sketch obtained by combining the embedding into ℓ1−ε with the sketch of [Ind06], but does not embed into ℓ1 with constant distortion. Thus, if the answer to Kwapien’s question is negative, then our desired stronger statement is false. To bypass the resolution of the Kwapien’s problem, we prove the following variant of the theorem using a result of Kalton [Kal85]: efficient sketchability is equivalent to ℓ1 -embeddability with constant distortion for norms that are “closed” under sum-products. A sum-product of two normed spaces X and Y , denoted X ⊕ℓ1 Y , is the normed space X × Y endowed with k(x, y)k = kxk + kyk. It is easy to verify that ℓ1 , the Earth Mover’s Distance, and the trace norm are all closed under taking sum-products (potentially with an increase in the dimension). Again, we only need to show the “sketching =⇒ embedding” direction, as the reverse direction follows from the arguments above — if a normed space X embed into ℓ1 with constant distortion, we can combine it with the ℓ1 sketch of [Ind06] and obtain an efficient sketch for X. We discuss the application of this theorem to the Earth Mover’s Distance in Section 1.3. Theorem 1.4. Let (Xn )∞ n=1 be a sequence of finite-dimensional normed spaces. Suppose that for every i1 , i2 ≥ 1 there exists m = m(i1 , i2 ) ≥ 1 such that Xi1 ⊕ℓ1 Xi2 embeds isometrically into Xm . Assume that every Xn admits a sketching algorithm for DTEP(Xn , D) for fixed approximation 4 D > 1 with fixed sketch size s (both independent of n). Then, every Xn linearly embeds into ℓ1 with bounded distortion (independent of n). Overall, we almost completely characterize the norms that are efficiently sketchable, thereby making a significant progress on Question 1.1. In particular, our results suggest that the embedding approach (embed into ℓp for some p ∈ (0, 2], and use the sketch from [Ind06]) is essentially unavoidable for norms. It is interesting to note that for general metrics (not norms) the implication “efficient sketching =⇒ embedding into ℓ1 with constant distortion” is false: for example the Heisenberg group embeds into ℓ2 -squared (with bounded distortion) and hence is efficiently sketchable, but it is not embeddable into ℓ1 [LN06, CK10, CKN11] (another example of this sort is provided by Khot and Vishnoi [KV05]). At the same time, we are not aware of any counter-example to the generalization of Theorem 1.2 to general metrics. 1.3 Applications To demonstrate the applicability of our results to concrete questions of interest, we consider two well-known families of normed spaces, for which we obtain the first non-trivial lower bounds on the sketching complexity. Trace norm. Let Tn be the vector space Rn×n (all real square n × n matrices) equipped with the trace norm (also known as the nuclear norm and Schatten 1-norm), which is defined to be the sum of singular values. It is well-known that Tn embeds into ℓ2 (and thus also into ℓ1 ) with √ √ distortion n (observe that the trace norm is within n from the Frobenius norm, which embeds √ isometrically into ℓ2 ). Pisier [Pis78] proved a matching lower bound of Ω( n) for the distortion of any embedding of Tn into ℓ1 . This non-embeddability result, combined with our Theorem 1.3, implies a sketching lower bound for the trace norm. Before, only lower bounds for specific types of sketches (linear and bilinear) were known [LNW14a]. Corollary 1.5. For any sketching algorithm for DTEP(Tn , D) with sketch size s the following bound must hold: √ ! n sD = Ω . log n Earth Mover’s Distance. The (planar) Earth Mover’s Distance (also known as the transportation distance, Wasserstein-1 distance, and Monge-Kantorovich distance) is the vector space EMDn = 2 {p ∈ R[n] : P i pi = 0} endowed with the norm kpkEMD defined as the minimum cost needed to transport the “positive part” of p to the “negative part” of p, where the transportation cost per unit between two points in the grid [n]2 is their ℓ1 -distance (for a formal definition see [NS07]). It is known that this norm embeds into ℓ1 with distortion O(log n) [IT03, Cha02, NS07], and that any √ ℓ1 -embedding requires distortion Ω( log n) [NS07]. We obtain the first sketching lower bound for EMDn , which in particular addresses a well-known open question [McG06, Question #7]. Its proof is a direct application of Theorem 1.4 (which we 5 can apply, since EMDn is obviously closed under taking sum-products), to essentially “upgrade” the known non-embeddability into ℓ1 [NS07] to non-sketchability. Corollary 1.6. No sketching algorithm for DTEP(EMDn , D) can achieve approximation D and sketch size s that are constant (independent of n). The reason we can not apply Theorem 1.3 and get a clean quantitative lower bound for sketches of EMDn is the factor log(dim X) in Theorem 1.3. Indeed, the lower bound on the distortion of √ an embedding of EMDn into ℓ1 proved in [NS07] is Ω( log n), which is smaller than log(dim X) = Θ(log n). We note that EMDn is a (slight) generalization of the EMD metric version commonly used in computer science applications. In the latter, given two weighted sets A, B ⊂ [n]2 of the same total weight, one has to solve, using only their sketches sk(A), sk(B), the DTEP(EMD, D) problem where the EMD distance is the min-cost matching between A and B. Observe that the weights used in the sets A, B ⊂ [n]2 are all positive. The slight difference is that in DT EP (EMDn , D), which 2 asks analogously to estimate kp − qkEMD , each of p, q ∈ R[n] has both “positive” and “negative” parts. Nevertheless, we show in Appendix A that efficient sketching of EMD on weighted sets implies efficient sketching of the EMDn norm. Hence, the non-sketchability of EMDn norm applies to EMD on weighted sets as well. 1.4 Other related work Another direction for “characterizing tractable metrics” is in the context of streaming algorithms, where the input is an implicit vector x ∈ Rn given in the form of updates (i, δ), with the semantics that coordinate i has to be increased by δ ∈ R. There are two known results in this vein. First, [BO10] characterized the streaming complexity of computing the sum P i ϕ(xi ), for some fixed ϕ (e.g., ϕ(x) = x2 for ℓ2 norm), when the updates are positive. They gave a precise property of ϕ that determines whether the complexity of the problem is small. Second, [LNW14b] showed that, in certain settings, streaming algorithms may as well be linear, i.e., maintain a sketch f (x) = Ax for a matrix A, and the size of the sketch is increased by a factor logarithmic in the dimension of x. Furthermore, after the appearance of the conference version of the current article, there has been another characterization result that significantly generalizes and extends [BO10]. Specifically, for every symmetric norm k · kX , it is proved in [BBC+ 17] that the sketching (and streaming) complexity of computing kxkX is characterized by the norm’s (maximum) modulus of concentration, up to polylogarithmic factors in the dimension of X. Finally, we mention a related work [ANRW17], where an efficient data structure for the Approximate Nearest Neighbor search (ANN) is constructed for every symmetric norm. It is known [IM98, KOR00] that efficient sketches imply good data structures for ANN, however, the result of [ANRW17] shows that having efficient ANN data structure is a way more general property of an underlying norm. 6 1.5 Proof overview Following common practice, we think of sketching as a communication protocol. In fact, our results hold for protocols with an arbitrary number of rounds (and access to public randomness). Our proof of Theorem 1.2 can be divided into two parts: information-theoretic and analytic. First, we use information-theoretic tools to convert an efficient protocol for DTEP(X, D) into a socalled threshold map from X to a Hilbert space. Our notion of a threshold map can be viewed as a very weak definition of embeddability (see Definition 4.5 for details). Second, we use techniques from nonlinear functional analysis to convert a threshold map to a linear map into ℓ1−ε . Information-theoretic part. To get a threshold map from a protocol for DTEP(X, D), we proceed in three steps. First, using the fact that X is a normed space, we are able to give a good protocol for DTEP(ℓk∞ (X), Dk) (Lemma 4.3). The space ℓk∞ (X) is a product of k copies of X equipped with the norm k(x1 , . . . , xk )k = maxi kxi k. Then, invoking the main result from [AJP10], we conclude non-existence of certain Poincaré-type inequalities for X (Theorem 4.4, in the contrapositive). Finally, we use convex duality together with a compactness argument to conclude the existence of a desired threshold map from X to a Hilbert space (Lemma 4.6, again in the contrapositive). Analytic part. We proceed from a threshold map by upgrading it to a uniform embedding (see Definition 2.1) of X into a Hilbert space (Theorem 4.12). For this we adapt arguments from [JR06, Ran06]. We use two tools from nonlinear functional analysis: an extension theorem for 1/2-Hölder maps from a (general) metric space to a Hilbert space [Min70] (Theorem 4.16), and a symmetrization lemma for maps from metric abelian groups to Hilbert spaces [AMM85] (Lemma 4.14). Then we convert a uniform embedding of X into a Hilbert space to a linear embedding into ℓ1−ε by applying the result of Aharoni, Maurey and Mityagin [AMM85] together with the result of Nikishin [Nik72]. A similar argument has been used in [NS07]. To prove a quantitative version of this step, we examine the proofs from [AMM85] and [Nik72], and obtain explicit bounds on the distortion of the resulting map. We accomplish this in Section 5. Embeddings into ℓ1 . To prove Theorem 1.3 (which has dependence on the dimension of X), we note that it is a simple corollary of Theorem 1.2 and a result of Zvavitch [Zva00], which gives a dimension reduction for subspaces of ℓ1−ε . Norms closed under sum-product. Finally, we prove Theorem 1.4 — embeddability into ℓ1 for norms closed under sum-product — by proving and using a finitary version of the theorem of Kalton [Kal85] (Lemma 6.1), instead of invoking Nikishin’s theorem as above. We prove the finitary version by reducing it to the original statement of Kalton’s theorem via a compactness argument. Let us point out that Naor and Schechtman [NS07] showed how to use (the original) Kalton’s theorem to upgrade a uniform embedding of EMDn into a Hilbert space to a linear embedding into ℓ1 (they used this reduction to exclude uniform embeddability of EMDn ). Their proof used certain specifics of EMD. In contrast, to get Theorem 1.4 for general norms, we seem to need a finitary version of Kalton’s theorem. 7 We also note that in Theorems 1.2, 1.3 and 1.4, we can conclude embeddability into ℓd1−ε and ℓd1 respectively, where d is near-linear in the dimension of the original space. This conclusion uses the known dimension reduction theorems for subspaces from [Tal90, Zva00]. 2 Preliminaries on functional analysis We remind a few definitions and standard facts from functional analysis that will be useful for our proofs. A central notion in our proofs is the notion of uniform embeddings, which is a weaker version of embeddability. Definition 2.1. For two metric spaces X and Y , we say that a map f : X → Y is a uniform embedding, if there exist two non-decreasing functions L, U : R+ → R+ such that for every x1 , x2 ∈ X one has L(dX (x1 , x2 )) ≤ dY (f (x1 ), f (x2 )) ≤ U (dX (x1 , x2 )), U (t) → 0 as t → 0 and L(t) > 0 for every t > 0. The functions L(·) and U (·) are called moduli of the embedding. Definition 2.2. An inner-product space is a real vector space X together with an inner product h·, ·i : X × X → R, which is a symmetric positive-definite bilinear form. A Hilbert space is an inner-product space X that is complete as a metric space. Every inner-product space is a normed space: we can set kxk = p hx, xi. For a normed space X we denote by BX its closed unit ball. The main example of a Hilbert space is ℓ2 , the space of all real sequences {xn } with P 2 i xi < ∞, where the inner product is defined as hx, yi = X xi yi . i Definition 2.3. For a set S, a function K : S × S → R is called a kernel if K(s1 , s2 ) = K(s2 , s1 ) for every s1 , s2 ∈ S. We say that the kernel K is positive-definite if for every α1 , α2 , . . . , αn ∈ R and s1 , s2 , . . . , sn ∈ S, one has n X i,j=1 αi αj K(si , sj ) ≥ 0. We say that K is negative-definite if for every α1 , . . . , αn ∈ R with α1 + α2 + . . . + αn = 0 and s1 , s2 , . . . , sn ∈ S, one has n X i,j=1 αi αj K(si , sj ) ≤ 0. The following are standard facts about positive- and negative-definite kernels. Fact 2.4 ([Sch35]). For a kernel K : S × S → R, there exists an embedding f : S → H, where H is a Hilbert space, such that K(s1 , s2 ) = hf (s1 ), f (s2 )iH for every s1 , s2 ∈ S, iff K is positive-definite. Fact 2.5 ([Sch38]). For a kernel K : S × S → R, there exists an embedding f : S → H, where H is a Hilbert space, such that K(s1 , s2 ) = kf (s1 ) − f (s2 )k2H for every s1 , s2 ∈ S, iff K(s, s) = 0 for every s ∈ S and K is negative-definite. 8 Definition 2.6. For an abelian group G, we say that a function f : G → R is positive-definite if a kernel K(g1 , g2 ) = f (g1 − g2 ) is positive-definite. Similarly, f is said to be negative-definite if K(g1 , g2 ) = f (g1 − g2 ) is negative-definite. The following lemma essentially says that an embedding of an abelian group G into a Hilbert space can be made translation-invariant. Lemma 2.7 (see the proof of Lemma 3.5 in [AMM85]). Suppose that f is a map from an abelian group G to a Hilbert space such that for every g ∈ G we have supg1 −g2 =g hf (g1 ), f (g2 )i < +∞. Then, there exists a map f ′ from G to a Hilbert space such that hf ′ (g1 ), f ′ (g2 )i depends only on g1 − g2 and for every g1 , g2 ∈ G we have inf g1′ −g2′ =g1 −g2 hf (g1′ ), f (g2′ )i ≤ hf ′ (g1 ), f ′ (g2 )i ≤ sup g1′ −g2′ =g1 −g2 hf (g1′ ), f (g2′ )i. Finally, let dim X denote the dimension of a finite-dimensional vector space X. 3 Preliminaries on communication complexity Let X be a metric space, on which we would like to solve DTEPr (X, D) defined as follows for some r > 0 and D ≥ 1. Alice has a point x ∈ X, Bob has a point y ∈ X, and they would like to decide between the two cases: dX (x, y) ≤ r and dX (x, y) > Dr. To accomplish this goal, Alice and Bob exchange at most s bits of communication. There are several types of communication protocols that we consider, depending on the randomness used, which we present below in the order of their power. Our main result applies to the most powerful type. We will later show some connections between the protocols of different types. • Deterministic protocols. This is a simple two-way communication protocol with no randomness. First, Alice sends a bit to Bob that depends only on x. Then, Bob sends a bit to Alice that depends on Alice’s first communication bit and on y. Then, Alice sends a bit to Bob that depends on x and the two previous communication bits, etc. Finally, whoever sends the s-th bit must decide the answer to the DTEP problem. We define a transcript Πx,y to be the sequence of s bits sent by the two parties for a given pair of inputs x and y. • Private-coin protocols with bounded number of coins. This is a randomized version of the previous definition. Alice and Bob each have access to an independent random string, denoted a ∈ {0, 1}R and b ∈ {0, 1}R , respectively. Communication bits sent by Alice are allowed to depend on a, and those sent by Bob may depend on b. We require that for every pair of inputs, the probability (over the random coins a, b) of the answer being correct is at least, say, 2/3. Whenever we allow randomness, the transcript Πx,y becomes a random variable (depending on x and y). For fixed a, b ∈ {0, 1}R , we denote by Πx,y (a, b) the (deterministic) transcript for inputs x and y when the random strings are set to be a and b, respectively. 9 • Public-coin protocols with finitely many coins. This is a variant of the previous definition, where Alice and Bob have access to a common random string sampled uniformly from {0, 1}R , and the bits sent by both Alice and Bob can depend on this random string. Again, we require the probability (over the public coins) of the answer being correct to be at least, say, 2/3 for every pair of inputs. Also, we denote by Πx,y (u) the deterministic transcript for fixed inputs and public coins u. Clearly, a public-coin protocol with 2R public coins can emulate a private-coin protocol with R random bits for each of Alice and Bob. • Public-coin protocols with countably many coins. The protocols defined above are standard in the communication complexity literature. However, we need a definition that is stronger: we allow countably many public coins. The reason to consider the stronger notion is that the known protocols for DTEP based on [Ind06] fall into this category. Since we allow infinitely many coins, we need to be careful when defining a class of allowed protocols. A sequence of coin tosses u can be identified with a point in the Cantor space Ω = {0, 1}ω equipped with the standard Lebesgue measure. We require that for every pair of inputs x, y ∈ X, the function u 7→ Πx,y (u) is measurable. This restriction allows us to consider probabilities of the form Pr[Πx,y ∈ A], where A ⊆ {0, 1}s is an arbitrary set of possible transcripts. In particular, the probability of success is well-defined, and we require it, as before, to be at least 2/3. The results in this paper apply to the most general protocols: public-coin protocols with countably many coins. We now show some connections between these notions. A crucial tool in our result is a theorem of [AJP10], which is itself based on the tools from [BJKS02]. The latter shows a lower bound for private-coin protocols with finitely many coins. We show next how the lower bounds from [AJP10, BJKS02] extend to the most general type, public-coin protocols with countably many coins. 3.1 Information complexity: private-coins vs public-coins In general, a lower bound for private-coins protocols does not imply a lower bound for publiccoins protocols (without a loss in the parameters). However, such an implication does hold for the particular lower bound technique that we are employing. In particular, we use and exploit the notion of information complexity from [BJKS02], defined as follows. Let (x, y, λ) be distributed according to a distribution D over X × X × Λ, where Λ is an auxiliary set. We will assume that the support of D is finite. Then, we can define the information complexity with respect to D, denoted ICD (DTEPr (X, D)), to be the infimum of I(x, y : Πx,y | λ) over all private-coin protocols for DTEPr (X, D), which succeed on every valid input with probability at least 2/3, where I(· : · | ·) is the (conditional) mutual information. 10 It is a standard fact that ICD (DTEPr (X, D)) is a lower bound on the communication complexity of DTEPr (X, D) with private-coin protocols since I(x, y : Πx,y | λ) ≤ sup |Πx,y (a, b)|. x,y,a,b However, we are interested in using the information complexity (as defined above) to lower bound the communication complexity of DTEPr (X, D) for public-coin protocols with finite number of coins. It turns out that ICD (DTEPr (X, D)) is a valid lower bound for this case as well, as argued in the claim below. Lemma 3.1. The communication complexity of DTEPr (X, D) for public-coin protocols with finite number of coins is at least ICD (DTEPr (X, D)). Proof. Consider any protocol with public randomness, denoted Πx,y (u), where x, y are the two inputs and u is the public random string. Then sup |Πx,y (u))| ≥ H(Πx,y (u) | λ, u) ≥ I(x, y : Πx,y (u) | λ, u). x,y,u Now consider the following private-coins protocol Π′x,y (a, b), where a, b are the two private random strings of Alice and Bob, respectively. In the first round, Alice sends a to Bob to be used as public randomness u = a. Then they run Πx,y (u). In other words, the transcript of Π′x,y (a, b) is ha, Πx,y (a)i. We claim that I(x, y : Π′x,y (a, b) | λ) = I(x, y : Πx,y (u) | λ, u). Indeed, by definition of Π′ , I(x, y : Π′x,y (a, b) | λ) = I(x, y : a, Πx,y (a) | λ), and using the chain rule for mutual information, I(x, y : a, Πx,y (a) | λ) = I(x, y : a | λ) + I(x, y : Πx,y (a) | λ, a). The first term is exactly zero since x, y and a are independent (conditioned on λ). The remaining term gives the equality we are looking for, and proves the lemma. In particular, we see that the length of a public-coin protocol is at least the information complexity I(x, y : Π′x,y (a, b) | λ) of any private-coin protocol Π′ . 3.2 From countable to finite number of coins We now observe that if we focus only on a finite number of possible inputs to our DTEP problem, then the existence of a protocol with countably-many coins implies the existence of a protocol with bounded number of coins. This claim will be sufficient to generalize our theorem to the most 11 general type of protocols—public-coin protocols with countably many coins: see the remark after Theorem 4.4. Claim 3.2. Fix a public-coin protocol with countably many coins and s bits of communication. Let (x(1) , y (1) ), (x(2) , y (2) ), . . . , (x(N ) , y (N ) ) be N fixed pairs of inputs for the DTEP problem, and let ε > 0 be a positive parameter. Then there exists a public-coin protocol with R = R(s, N, ε) < ∞ coins and s bits of communication, such that for every 1 ≤ i ≤ N , the success probabilities of the original and the new protocols on (x(i) , y (i) ) differ by at most ε. Proof. Since we care about the correctness of the protocol only on the inputs (x(i) , y (i) ), we can think of the protocol as a distribution over a bounded (as a function of s and N ) number of deterministic protocols (there’s only a finite number of distinct protocol transcripts). Then, we can approximate this distribution within a statistical distance ε using a bounded number of public coins. 4 From sketches to uniform embeddings Our main technical result shows that, for a finite-dimensional normed space X, good sketches for DTEP(X, D) imply a good uniform embedding of X into a Hilbert space (Definition 2.1). Below is the formal statement. Theorem 4.1. Suppose a finite-dimensional normed space X admits a public-coin randomized communication protocol for DTEP(X, D) of size s for approximation D > 1. Then, there exists a map f : X → H to a Hilbert space such that for all x1 , x2 ∈ X,  min 1, kx1 − x2 kX s·D  1/2 ≤ kf (x1 ) − f (x2 )kH ≤ K · kx1 − x2 kX , where K > 1 is an absolute constant. Theorem 4.1 implies a qualitative version of Theorem 1.2 using the results of Aharoni, Maurey, and Mityagin [AMM85] and Nikishin [Nik72] (see Theorem 4.2). Theorem 4.2 ([AMM85, Nik72]). For every fixed 0 < ε < 1, any finite-dimensional normed space X that is uniformly embeddable into a Hilbert space is linearly embeddable into ℓ1−ε with a distortion that depends only on ε and the moduli of the assumed uniform embedding. To prove the full (quantitative) versions of Theorems 1.2 and 1.3, we adapt the proofs from [AMM85, Nik72] in Section 5 to get an explicit bound on the distortion. In the rest of this section, we prove Theorem 4.1 according to the outline in Section 1.5, putting the pieces together in Section 4.4. 4.1 Sketching implies the absence of Poincaré inequalities Sketching is often viewed from the perspective of a two-party communication complexity. Alice receives input x, Bob receives y, and they need to communicate to solve the DTEP problem. In 12 particular, a sketch of size s implies a communication protocol that transmits s bits: Alice just sends her sketch sk(x) to Bob, who computes the output of DTEP (based on that message and his sketch sk(y)). We assume here a public-coins model, i.e., Alice and Bob have access to a common (public) random string that determines the sketch function sk. To characterize sketching protocols, we build on results of Andoni, Jayram and Pǎtraşcu [AJP10, Sections 3 and 4]. This works in two steps: first, we show that a protocol for DTEP(X, D) implies a sketching algorithm for DTEP(ℓk∞ (X), kD), with a loss of factor k in approximation (Lemma 4.3, see the proof in the end of the section). As usual, ℓk∞ (X) is a normed space derived from X by taking the vector space X k and letting the norm of a vector (x1 , . . . xk ) ∈ X k be the maximum of the norms of its k components. The second step is to apply a result from [AJP10] (Theorem 4.4), which asserts that sketching for ℓk∞ (X) precludes certain Poincaré inequalities for the space X. Lemma 4.3. Let X be a finite-dimensional normed space that for some D ≥ 1 admits a commu- nication protocol for DTEP(X, D) of size s. Then for every integer k, the space ℓk∞ (X) admits sketching with approximation kD and sketch size s′ = O(s). Proof. Fix a threshold t > 0, and recall that we defined the success probability of sketching to be 0.9. By our assumption, there is a sketching function sk for X that achieves approximation D and sketch size s for threshold kt. Now define a “sketching” function sk′ for ℓk∞ (X) by choosing random Pk signs ε1 , . . . , εk ∈ {±1}, letting sk′ : x 7→ sk( used by sk (for X). i=1 εi xi ), and using the same decision procedure Now to examine the performance of sk′ , consider x, y ∈ ℓk∞ (X). If their distance is at most t, Pk then we always have that k i=1 εi xi − Pk i=1 εi yi k ≤ Pk i=1 kxi − yi k ≤ kt (i.e., for every realization of the random signs). Thus with probability at least 0.9 the sketch will declare that x, y are “close”. If the distance between x, y is greater than kD · t, then for some coordinate, say i = 1, we have kx1 −y1 k > kD·t. Letting z = P i≥2 εi (xi −yi ), Pk we can write k i=1 εi xi − Pk i=1 εi yi k = kε1 (x1 −y1 )+ zk = k(x1 −y1 )+ε1 zk. The last term must be at least kx1 −y1 k under at least one of the two possible realizations of ε1 , because by the triangle inequality 2kx1 − y1 k ≤ k(x1 − y1 ) + zk + k(x1 − y1 ) − zk. Pk We see that with probability 1/2 we have k i=1 εi xi − Pk i=1 εi yi k ≥ kx1 −y1 k > D·kt, and thus with probability at least 1/2 · 0.9 = 0.45 the sketch will declare that x, y are “far”. This last guarantee is not sufficient for sk′ to be called a sketch, but it can easily be amplified. The final sketch sk′′ for ℓk∞ (X) is obtained by O(1) independent repetitions of sk′ , and returning “far” if at least 0.3-fraction of the repetitions come up with this decision. These repetitions amplify the success probability to 0.9, while increasing the sketch size to O(s). We now state a slight modification of the theorem from [AJP10]. We will actually use its contrapositive, to conclude the absence of Poincaré inequalities. Theorem 4.4 (modification of [AJP10]). Let X be a metric space, and fix r > 0, D ≥ 1. Suppose there are α > 0, β ≥ 0, and two symmetric probability measures µ1 , µ2 on X × X such that • The support of µ1 is finite and is only on pairs with distance at most r; 13 • The support of µ2 is finite and is only on pairs with distance greater than Dr; and • For every f : X → Bℓ2 (where Bℓ2 is the unit ball of ℓ2 ), E (x,y)∼µ1 kf (x) − f (y)k2 ≥ α · E (x,y)∼µ2 kf (x) − f (y)k2 − β. Then for every integer k, the communication complexity of DTEP(ℓk∞ (X), D) for protocols with countably many public coins (see Section 3 for precise definitions) and with probability of error √  δ0 > 0 is at least Ω(k) · α(1 − 2 δ0 ) − β . In [AJP10], almost the same theorem is proved with only one difference: the protocols for DTEP(ℓk∞ (X), D) are only allowed to use finitely many private coins. Here we use Claims 3.1 and 3.2 to generalize their theorem to Theorem 4.4. Indeed, because the “hard distributions” µ1 and µ2 are finitely-supported, an inspection of the proofs from [AJP10] shows that there is a finite set of inputs I such that any private-coin protocol for DTEP(ℓk∞ (X), D) that is correct on I with probability at least 1 − δ0 must have √  information complexity at least Ω(k) · α(1 − 2 δ0 ) − β . But by Claim 3.1, we get that any protocol with bounded number of public coins correct on I must have communication complexity √  at least Ω(k)· α(1 − 2 δ0 ) − β . Finally, Claim 3.2 implies that the same is true for protocols with countably many public coins that are correct on all valid inputs with probability at least 1 − δ0 . 4.2 The absence of Poincaré inequalities implies threshold maps We proceed to prove that non-existence of Poincaré inequalities implies the existence a “threshold map”, as formalized in Lemma 4.6 below. The proof is similar to duality arguments that one often encounters in embedding theory: for instance, see Proposition 15.5.2 in [Mat02]. First we define the notion of threshold maps. Definition 4.5. A map f : X → Y between metric spaces (X, dX ) and (Y, dY ) is called an (s1 , s2 , τ1 , τ2 , τ3 )-threshold map for 0 < s1 < s2 , 0 < τ1 < τ2 < τ3 , if for all x1 , x2 ∈ X: • if dX (x1 , x2 ) ≤ s1 , then dY (f (x1 ), f (x2 )) ≤ τ1 ; • if dX (x1 , x2 ) ≥ s2 , then dY (f (x1 ), f (x2 )) ≥ τ2 ; and • dY (f (x1 ), f (x2 )) ≤ τ3 . We now provide the main lemma of this section, stated in the contrapositive: the non-existence of threshold maps implies a Poincaré inequality. Lemma 4.6. Suppose X is a metric space that does not allow an (s1 , s2 , τ1 , τ2 , +∞)-threshold map to a Hilbert space. Then, for every δ > 0 there exist two symmetric probability measures µ1 , µ2 on X × X such that • The support of µ1 is finite and is only on pairs with distance at most s1 ; 14 • The support of µ2 is finite and is only on pairs with distance at least s2 ; and • For every f : X → Bℓ2 , E (x,y)∼µ1 2 kf (x) − f (y)k ≥  τ1 τ2 2 · E (x,y)∼µ2 kf (x) − f (y)k2 − δ. (1) We prove Lemma 4.6 via the following three claims. The first one uses standard arguments about embeddability of finite subsets (see, e.g., Proposition 8.12 in [BL00], or Lemma 1.1 from [Bal92]). We note that this claim requires a finite value for τ3 , as opposed to τ3 = +∞, which is the only reason the definition of a threshold embedding (Definition 4.5) needs the parameter τ3 . In the following claims, we denote by X 2 the set of all unordered pairs {x, y} with x, y ∈ X, x 6= y. Claim 4.7. For every metric space X and every 0 < s1 < s2 , 0 < τ1 < τ2 < τ3 there exists an (s1 , s2 , τ1 , τ2 , τ3 )-threshold map of X to a Hilbert space iff the same is true for every finite subset of X. The proof of Claim 4.7 uses standard definitions and facts from general topology: product topology, Tychonoff’s theorem, as well as convergence and accumulation points along nets. These definitions can be found in a general topology textbook (see, e.g., [Mun00]). Proof. The “only if” direction is obvious, so let us turn to the “if” part. Consider the topological space U= Y [−τ32 , τ32 ]. {x,y}∈(X 2) By Tychonoff’s theorem U is compact. For every finite X ′ ⊂ X there exists an (s1 , s2 , τ1 , τ2 , τ3 )- threshold map fX ′ from X ′ to a Hilbert space. It gives rise to a point uX ′ ∈ U whose coordinates are given by (uX ′ )x,y =  kfX ′ (x) − fX ′ (y)k2 , 0, if x, y ∈ X ′ ; otherwise. Since U is compact, uX ′ has an accumulation point u∗ ∈ U along the net of finite subsets of X. Let us reformulate what it means. Claim 4.8. For every {x1 , y1 }, {x2 , y2 }, . . . , {xk , yk } ∈ X 2 and every ε > 0, there exists a finite set A ⊂ X such that for all 1 ≤ i ≤ k, both xi , yi ∈ A and (u∗ )xi ,yi − kfA (xi ) − fA (yi )k2 < ε . Now we define a kernel K : X × X → R, given by (recall Definition 2.3): K(x, y) =  0, if x = y; (u∗ ) x,y , Claim 4.9. The kernel K(·, ·) is negative-definite. 15 otherwise. Proof. Suppose that K is not negative-definite. It means that there exist α1 , α2 , . . . , αn ∈ R with P i αi = 0, and t1 , t2 , . . . , tn ∈ X such that n X αi αj K(ti , tj ) = γ > 0. i,j=1 There exists ε > 0 such that for every (aij )ni,j=1 with |aij − K(ti , tj )| < ε one has n X i,j=1 αi αj aij ≥ γ/2 > 0. (2) Now apply Claim 4.8 to get a finite set A ⊂ X that contains all si ’s such that kfA (ti ) − fA (tj )k2 is within ε from K(ti , tj ) for every i, j. But by (2), it means that n X i,j=1 αi αj kfA (ti ) − fA (tj )k2 ≥ γ/2 > 0, which contradicts Fact 2.5. This proves Claim 4.9. Thus, by Fact 2.5, there exists a map f : X → H to a Hilbert space H such that for every x, y ∈ X one has kf (x) − f (y)k2 = K(x, y). The final step is to verify that f is indeed a required (s1 , s2 , τ1 , τ2 , τ3 )-map (according to Definition 4.5). This can be done exactly the same way as in the proof of Claim 4.9. This completes the proof of Claim 4.7. Claim 4.10. Suppose that (X, dX ) is a finite metric space and 0 < s1 < s2 , 0 < τ1 < τ2 < τ3 . Assume that there is no (s1 , s2 , τ1 , τ2 , τ3 )-threshold map of X to ℓ2 . Then, there exist two symmetric probability measures µ1 , µ2 on X × X such that • µ1 is supported only on pairs with distance at most s1 , while µ2 is supported only on pairs with distance at least s2 ; and • for every f : X → ℓ2 , E (x,y)∼µ1 2 kf (x) − f (y)k ≥  τ1 τ2 2 · E (x,y)∼µ2 2 kf (x) − f (y)k −  2τ1 τ3 2 · sup kf (x)k2 . (3) x∈X X Proof. Let L2 ⊂ R( 2 ) be the cone of squared Euclidean metrics (also known as negative-type X  distances) on X. Let K ⊂ R( 2 ) be the polytope of non-negative functions l : X → R such that 2 for every x, y ∈ X we have • l({x, y}) ≤ τ32 ; • if dX (x, y) ≤ s1 , then l({x, y}) ≤ τ12 ; • if dX (x, y) ≥ s2 , then l({x, y}) ≥ τ22 . 16 + Notice that L2 ∩ K = ∅, as otherwise X allows an (s1 , s2 , τ1 , τ2 , τ3 )-threshold map to ℓ2 . We will need the following claim, which is just a variant of the Hyperplane Separation Theorem. X Claim 4.11. There exists a ∈ R( 2 ) such that ∀l ∈ L2 , ha, li ≤ 0; (4) ∀l ∈ K, ha, li > 0. (5) Proof. Since both L2 and K are convex and closed, and, in addition, K is compact, there exists a separating (affine) hyperplane between L2 and K. Specifically, there is a non-zero a such that for every l ∈ L2 one has ha, li ≤ η, and for every l ∈ K one has ha, li > η. Since L2 is a cone, one can assume without loss of generality that η = 0. Indeed, the case η < 0 is impossible because 0 ∈ L2 , so suppose that η > 0. If for all l ∈ L2 we have ha, li ≤ 0, then we are done. Otherwise, take any l ∈ L2 such that ha, li > 0, and scale it by sufficiently large C > 0 to get a point Cl ∈ L2 so that ha, Cli = Cha, li > η, arriving to a contradiction. We now continue the proof of Claim 4.10. We may assume without loss of generality that ∀ {x, y} ∈ X 2 , if dX (x, y) < s2 then a{x,y} ≤ 0. (6) To see this, let us zero every such a{x,y} > 0, and denote the resulting point â. Then for every l ∈ L2 (which clearly has non-negative coordinates), hâ, li ≤ ha, li ≤ 0. And for every l ∈ K, let ˆl be equal to l except that we zero the same coordinates where we zero a (which in particular satisfy dX (x, y) < s2 ); observe that also ˆl ∈ K, and thus hâ, li = ha, ˆli > 0. We get that â separates K and L2 and also satisfies (6). e1 , µ e2 , µ e3 : Now we define non-negative functions µ X 2 → R+ as follows: e1 ({x, y}) = −a({x, y}) 1{dX (x,y)≤s1 } ; µ e2 ({x, y}) = a({x, y}) 1{dX (x,y)≥s2 µ and ax,y ≥0} ; e3 ({x, y}) = −a({x, y}) 1{dX (x,y)>s1 µ and ax,y <0} . ei “cover” all cases, i.e., By (6), these µ ∀ {x, y} ∈ X 2 , For i ∈ {1, 2, 3} define λi = P e1 ({x, y}) + µ e 2 ({x, y}) − µ e 3 ({x, y}). a({x, y}) = −µ ei ({x, y}) {x,y} µ ei ({x, y})/λi . We argue that µ1 and and µi ({x, y}) = µ µ2 are as required by Claim 4.10, and indeed the only non-trivial property to check is the second 17 item. From the condition that ha, li ≤ 0 for every l ∈ L2 we get that for every map f : X → ℓ2 , 0≥ X {x,y} a({x, y}) · kf (x) − f (y)k2 = X h {x,y} i e1 ({x, y}) + µ e2 ({x, y}) − µ e 3 ({x, y}) · kf (x) − f (y)k2 , −µ which, in turn, implies λ1 · E (x,y)∼µ1 kf (x) − f (y)k2 ≥ λ2 · E (x,y)∼µ2 kf (x) − f (y)k2 − 4λ3 · sup kf (x)k2 . x (7) Consider the point l ∈ K with value τ12 on supp(µ1 ), value τ22 on supp(µ2 ), value τ32 on supp(µ3 ), and 0 otherwise; the condition ha, li > 0 gives −λ1 τ12 + λ2 τ22 − λ3 τ32 > 0, which implies λ1 < λ2 · τ22 /τ12 and λ3 < λ2 · τ22 /τ32 (in particular, λ2 > 0). Plugging into (7), we get the inequality required for Claim 4.10. We are now ready to prove Lemma 4.6. Proof of Lemma 4.6. We start with a metric space X that does not admit a (s1 , s2 , τ1 , τ2 , +∞)threshold map, and prove that this implies the Poincaré inequality (1). Indeed, X has no (s1 , s2 , τ1 , τ2 , τ3 )-threshold map to a Hilbert space for any finite value τ3 . We set τ3 > τ2 be sufficiently large so that (2τ1 /τ3 )2 < δ. Then, by Claim 4.7 there exists a finite subset X ′ ⊂ X that has no (s1 , s2 , τ1 , τ2 , τ3 )-threshold map to a Hilbert space (which without loss of generality can be chosen to be ℓ2 , since X ′ is finite). Now, using Claim 4.10, we obtain finitely-supported probability measures µ1 and µ2 , which satisfy (3). This concludes the proof of Lemma 4.6, since its statement only considers f such that the image of f is the unit ball of ℓ2 , and, thus, supx∈X kf (x)k2 ≤ 1. Note that the measures µ1 , µ2 depend on the value of τ3 (and, as a result, on δ). 4.3 Threshold maps imply uniform embeddings We now prove that threshold embeddings imply uniform embeddings, formalized as follows. Theorem 4.12. Suppose that X is a finite-dimensional normed space such that there exists a (1, D, τ1 , τ2 , +∞)-threshold map to a Hilbert space for some D > 1 and for some 0 < τ1 < τ2 with τ2 > 8τ1 . Then there exists a map h of X into a Hilbert space such that for every x1 , x2 ∈ X, 1/2 (τ2  − (8τ1 )1/2 ) · min 1, kx1 − x2 k 2D + 4  ≤ kh(x1 ) − h(x2 )k ≤ (2τ1 kx1 − x2 k)1/2 . 18 (8) In particular, h is a uniform embedding of X into a Hilbert space with moduli that depend only on τ1 , τ2 and D. Let us point out that in [JR06, Ran06], Johnson and Randrianarivony prove that for a Banach space coarse embeddability into a Hilbert space is equivalent to uniform embeddability. Our definition of a threshold map is weaker than that of a coarse embedding (for the latter see [JR06] say), but we show that we can adapt the proof of [JR06, Ran06] to our setting as well (at least whenever the gap between τ1 and τ2 is large enough). Since we only need one direction of the equivalence, we present a part of the argument from [JR06] with one (seemingly new) addition: Claim 4.19. The resulting proof is arguably simpler than the combination of [JR06] and [Ran06], and yields a clean quantitative bound (8). Intuition. Let us provide some very high-level intuition of the proof of Theorem 4.12. We start with a threshold map f from X to a Hilbert space. First, we show that f is Lipschitz on pairs of points that are sufficiently far. In particular, f , restricted on a sufficiently crude net N of X, is Lipschitz. This allows us to use a certain extension theorem to extend the restriction of f on N to a Lipschitz function on the whole X, while preserving the property that f does not contract too much distances that are sufficiently large. Then, we get a required uniform embedding by performing a certain symmetrization step. The actual proof is different in a number of details; in particular, instead of being Lipschitz the actual property we will be trying to preserve is different. Useful facts. To prove Theorem 4.12, we need the following three results. Lemma 4.13 ([Sch37]). For a set S and a map f from S to a Hilbert space, there exists a map g from S to a Hilbert space such that kg(x1 ) − g(x2 )k = kf (x1 ) − f (x2 )k1/2 for every x1 , x2 ∈ S. Lemma 4.14 (essentially Lemma 3.5 from [AMM85], see also Lemma 2.7 from the present paper). Suppose that f is a map from an abelian group G to a Hilbert space such that for every g ∈ G we have supg1 −g2 =g kf (g1 ) − f (g2 )k < +∞. Then, there exists a map f ′ from G to a Hilbert space such that kf ′ (g1 ) − f ′ (g2 )k depends only on g1 − g2 and for every g1 , g2 ∈ G we have inf g1′ −g2′ =g1 −g2 kf (g1′ ) − f (g2′ )k ≤ kf ′ (g1 ) − f ′ (g2 )k ≤ sup g1′ −g2′ =g1 −g2 kf (g1′ ) − f (g2′ )k. (9) Proof. This lemma is similar to Lemma 2.7 with one twist: in the statement, we now have distances instead of dot products. The proof of Lemma 2.7 relies on the characterization from Fact 2.4. If instead we use Fact 2.5, we can reuse the proof of Lemma 3.5 from [AMM85] verbatim to prove the present lemma. Let us sketch here the symmetrization procedure. Let B(G) be the vector space of bounded functions h : G → R. Then, one can show that there exists a finitely additive invariant mean M : B(G) → R: a linear functional such that • for every h ∈ B(G) such that h ≥ 0 one has M h ≥ 0; 19 • for every h ∈ B(G) and g ∈ G one has M h = M (x 7→ h(x + g)); • M (x 7→ 1) = 1. The existence of such M is non-trivial and requires the axiom of choice (see Theorem 17.5 from [HR94]). Let us now consider a map f from the statement of the lemma and consider the kernel K(g1 , g2 ) = kf (g1 ) − f (g2 )k2 . Let us define a new function K ′ (g1 , g2 ) as follows: K ′ (g1 , g2 ) = M (x 7→ K(x + g1 − g2 , x)). Now we need to check that: • K ′ is a kernel (that is, it is non-negative and symmetric) and K ′ (g, g) = 0 for every g ∈ G; • K ′ is negative-definite (see Definition 2.3), assuming that K is negative-definite (which is true by Fact 2.5); • for every g1 , g2 ∈ G one has inf g1′ −g2′ =g1 −g2 kf (g1′ ) − f (g2′ )k2 ≤ K ′ (g1 , g2 ) ≤ sup g1′ −g2′ =g1 −g2 kf (g1′ ) − f (g2′ )k2 assuming (9). This can be done exactly the same way as in the proof of Lemma 3.5 from [AMM85]. Finally, we observe that K ′ (g1 , g2 ) depends only on g1 − g2 and via Fact 2.5 gives a map f ′ from G to a Hilbert space with the required properties. Definition 4.15. We say that a map f : X → Y between metric spaces is 1/2-Hölder with constant C, if for every x1 , x2 ∈ X one has dY (f (x1 ), f (x2 )) ≤ C · dX (x1 , x2 )1/2 . Theorem 4.16 ([Min70], see also Theorem 19.1 in [WW75]).). Let (X, dX ) be a metric space and let H be a Hilbert space. Suppose that f : S → H, where S ⊂ X, is a 1/2-Hölder map with a constant C > 0. Then there exists a map g : X → H that coincides with f on S and is 1/2-Hölder with the constant C. We are now ready to prove Theorem 4.12. Proof of Theorem 4.12. We prove the theorem via the following sequence of claims. Suppose that X is a finite-dimensional normed space. Let f be a (1, D, τ1 , τ2 , +∞)-threshold map to a Hilbert space. The first claim is well-known and is a variant of Proposition 1.11 from [BL00]. Claim 4.17. For every x1 , x2 ∈ X we have kf (x1 ) − f (x2 )k ≤ max {1, 2 · kx1 − x2 k} · τ1 . 20 Proof. If kx1 − x2 k ≤ 1, then kf (x1 ) − f (x2 )k ≤ τ1 , and we are done. Otherwise, let us take y0 , y1 , . . . , yl ∈ X such that y0 = x1 , yl = x2 , kyi − yi+1 k ≤ 1 for every i, and l = ⌈kx1 − x2 k⌉. In particular, we can take yi = x1 + i · kf (x1 ) − f (x2 )k ≤ l−1 X i=0 x1 −x2 kx1 −x2 k for i = 0, 1, . . . l − 1, and yl = x2 . We have kf (yi ) − f (yi+1 )k ≤ lτ1 = ⌈kx1 − x2 k⌉ · τ1 ≤ 2kx1 − x2 k · τ1 , where the first step is by the triangle inequality, the second step follows from kyi − yi+1 k ≤ 1, and the last step follows from kx1 − x2 k ≥ 1. The proof of the next claim essentially appears in [JR06]. Claim 4.18. There exists a map g from X to a Hilbert space such that for every x1 , x2 ∈ X, • kg(x1 ) − g(x2 )k ≤ (2τ1 · kx1 − x2 k)1/2 ; 1/2 • if kx1 − x2 k ≥ D + 2, then kg(x1 ) − g(x2 )k ≥ τ2 − (8τ1 )1/2 ; Proof. From Claim 4.17 and Lemma 4.13 we can get a map g′ from X to a Hilbert space such that for every x1 , x2 ∈ X n o 1/2 • kg′ (x1 ) − g′ (x2 )k ≤ max 1, (2kx1 − x2 k)1/2 · τ1 ; 1/2 • if kx1 − x2 k ≥ D, then kg′ (x1 ) − g′ (x2 )k ≥ τ2 . Let N ⊂ X be a 1-net of X such that all the pairwise distances between points in N are more than 1. The map g′ is 1/2-Hölder on N with a constant (2τ1 )1/2 , so we can apply Theorem 4.16 and get a map g that coincides with g′ on N and is 1/2-Hölder on the whole X with a constant (2τ1 )1/2 . That is, for every x1 , x2 ∈ X we have • kg(x1 ) − g(x2 )k ≤ (2τ1 · kx1 − x2 k)1/2 ; 1/2 • if x1 ∈ N , x2 ∈ N and kx1 − x2 k ≥ D, then kg(x1 ) − g(x2 )k ≥ τ2 . To conclude that g is as required, let us lower bound kg(x1 )−g(x2 )k whenever kx1 −x2 k ≥ D+2. Suppose that x1 , x2 ∈ X are such that kx1 − x2 k ≥ D + 2. Let u1 ∈ N be the closest net point to x1 and, similarly, let u2 ∈ N be the closest net point to x2 . Observe that ku1 − u2 k ≥ kx1 − x2 k − kx1 − u1 k − kx2 − u2 k ≥ (D + 2) − 1 − 1 = D. We have 1/2 kg(x1 ) − g(x2 )k ≥ kg(u1 ) − g(u2 )k − kg(u1 ) − g(x1 )k − kg(u2 ) − g(x2 )k ≥ τ2 − 2(2τ1 )1/2 , 1/2 as required, where the second step follows from the inequality kg(u1 ) − g(u2 )k ≥ τ2 , which is true, since u1 , u2 ∈ N , and that g is 1/2-Hölder with a constant (2τ1 )1/2 . 21 The following claim completes the proof of Theorem 4.12. Claim 4.19. There exists a map h from X to a Hilbert space such that for every x1 , x2 ∈ X: • kh(x1 ) − h(x2 )k ≤ (2τ1 · kx1 − x2 k)1/2 ; 1/2 • kh(x1 ) − h(x2 )k ≥ (τ2 − (8τ1 )1/2 ) · min {1, kx1 − x2 k/(2D + 4)}. Proof. We take the map g from Claim 4.18 and apply Lemma 4.14 to it. Let us call the resulting map h. The first desired condition for h follows from a similar condition for g and Lemma 4.14. Let us prove the second one. If x1 = x2 , then there is nothing to prove. If kx1 − x2 k ≥ D + 2, then by Claim 4.18 and 1/2 − (8τ1 )1/2 , and we are done. Otherwise, let us consider points l m D+2 y0 , y1 , . . . , yl ∈ X such that y0 = 0, yi − yi−1 = x1 − x2 for every i, and l = kx1 −x2 k . Since Lemma 4.14, kh(x1 ) − h(x2 )k ≥ τ2 kyl − y0 k = kl(x1 − x2 )k = lkx1 − x2 k ≥ D + 2, we have 1/2 τ2 − (8τ1 )1/2 ≤ kh(yl ) − h(y0 )k ≤ l X i=1 kh(yi ) − h(yi−1 )k = l · kh(x1 ) − h(x2 )k ≤ 2D + 4 · kh(x1 ) − h(x2 )k, kx1 − x2 k where the equality follows from the conclusion of Lemma 4.14. Finally, observe that Theorem 4.12 is merely a reformulation of Claim 4.19. 4.4 Putting it all together We now show that Theorem 4.1 follows by applying Lemma 4.3, Theorem 4.4, Lemma 4.6, and Theorem 4.12, in this order, with an appropriate choice of parameters. Proof of Theorem 4.1. Suppose DTEP(X, D) admits a protocol of size s. By setting k = Cs in Lemma 4.3 (C is a large absolute constant, to be chosen later), we conclude that DTEP(ℓCs ∞ (X), CsD) admits a protocol of size s′ = O(s). Now choosing C large enough and applying Theorem 4.4 (in contrapositive), we conclude that X has no Poincaré inequalities for distance scales 1 and CsD, with α = 0.01 and β = 0.001. Applying Lemma 4.6 (in contrapositive) we conclude that X allows a (1, CsD, 1, 10, +∞)threshold map to a Hilbert space. Using Theorem 4.12 it follows that there is a map h from X to a Hilbert space, such that for all x1 , x2 ∈ X,  kx1 − x2 k min 1, s·D  ≤ kh(x1 ) − h(x2 )k ≤ K · kx1 − x2 k1/2 , where K > 1 is an absolute constant, and this proves the theorem. 22 Remark: Instead of applying Lemma 4.3 and Theorem 4.4, we could have attempted to apply the reduction from [AK10] to get a threshold map from X to a Hilbert space directly. That approach is much simpler technically, but has two fatal drawbacks. First, we end up with a threshold map with a gap between τ1 and τ2 being arbitrarily close to 1, and thus, we are unable to invoke Theorem 4.12, which requires the gap to be more than 8. Second, the parameters of the resulting threshold map are exponential in the number of bits in the communication protocol, which is bad for the quantitative bounds from Section 5. 5 Quantitative bounds In this section we prove the quantitative version of our results, namely Theorem 1.2 and Theorem 1.3, for which we will reuse Theorem 4.1. In particular, we prove the following theorem. Theorem 5.1. For a finite-dimensional normed space X and ∆ > 1, assume we have a map f : X → H to a Hilbert space H, such that, for an absolute constant K > 0 and for every x1 , x2 ∈ X: 1/2 • kf (x1 ) − f (x2 )kH ≤ K · kx1 − x2 kX ; and • if kx1 − x2 kX ≥ ∆, then kf (x1 ) − f (x2 )kH ≥ 1. Then, for any ε ∈ (0, 1/3), the space X linearly embeds into ℓ1−ε with distortion O(∆/ǫ). Note that Theorem 1.2 now follows from applying Theorem 4.1 together with Theorem 5.1 for ∆ = sD. We can further prove Theorem 1.3 by using the following result of Zvavitch from [Zva00]. d·poly(log d) Lemma 5.2 ([Zva00]). Every d-dimensional subspace of L1−ε embeds linearly into ℓ1−ε with distortion O(1). Indeed, applying Lemma 5.2 together with Theorem 5.1, we get that for every 0 < ε < 1/3 the poly(dim X) space X linearly embeds into ℓ1−ε with distortion with distortion O(∆/ε). Thus, X is embeddable into ℓ1  O ∆ · (dim X)O(ε) /ε . Setting ε = Θ(1/ log(dim X)), we obtain Theorem 1.3. It remains to prove Theorem 5.1. Its proof proceeds by adjusting the arguments from [AMM85] and [Nik72]. Proof of Theorem 5.1. Fix X, ∆ > 0, and the corresponding map f : X → H. We first prove the following lemma. Lemma 5.3. There exists a probability measure µ on Rdim X symmetric around the origin such that its (real-valued) characteristic function ϕ : X → R has the following properties for every x ∈ X: e X ; and • ϕ(x) ≥ e−K·kxk • if kxkX ≥ ∆, then ϕ(x) ≤ 1/e. 23 f > 0 is an absolute constant. Here K 2 Proof. It is known from [Sch38] that for a Hilbert space H the function g : h 7→ e−khkH is positivee to a Hilbert space H e such that for every h1 , h2 ∈ H definite. Thus, there exists a function ge : H → H 2 e to a Hilbert one has ge(h1 ), ge(h2 ) He = e−kh1 −h2 kH . Setting fe = ge ◦ f , we get a function fe: X → H f > 0 for every x1 , x2 ∈ X, we have: space such that for an absolute constant K • fe(x1 ) • D e H = 1; E fe(x1 ), fe(x2 ) e H e 1 −x2 kX ; and ≥ e−K·kx D E • if kx1 − x2 kX ≥ ∆, then fe(x1 ), fe(x2 ) e H ≤ 1/e. Applying Lemma 2.7 and Lemma 2.4, we obtain a positive-definite function ϕ : X → R such that: • ϕ(0) = 1; e X ; and • for every x ∈ X one has ϕ(x) ≥ e−K·kxk • if kxkX ≥ ∆, then ϕ(x) ≤ 1/e. We can now use Bochner’s theorem, which is the following characterization of continuous positive-definite functions, via the Fourier transform. Theorem 5.4 (Bochner’s theorem, see [Fel71]). If a function f : Rd → R is positive-definite, continuous at zero, and f (0) = 1, then there exists a probability measure µ on Rd such that f is the µ’s characteristic function. That is, for every x ∈ Rd , Z f (x) = Rd eihx,vi µ(dv). In particular, note that we have that ϕ(0) = 1, ϕ is positive-definite and is continuous at zero. Hence, by Bochner’s theorem, we get a probability measure µ over Rdim X whose characteristic function equals to ϕ. That is, for every x ∈ X we get ϕ(x) = Z Rdim X eihx,vi µ(dv), where h·, ·i is the standard dot product in Rdim X . Clearly, µ is symmetric around the origin, since ϕ is real-valued. This completes the proof of Lemma 5.3. Our next goal is to show that µ gives rise to a one-measurement linear sketch for X with approximation O(∆) and a certain additional property that will be useful to us. The following lemma contains two standard facts about one-dimensional characteristic functions (see, e.g., [Pan08]). We include the proof for completeness. 24 Lemma 5.5. Let ν be a symmetric probability measure over the real line, and let ψ(t) = Z eivt ν(dv) R be its characteristic function (which is real-valued due to the symmetry of ν). Then, • if for some R > 0 and 0 < ε < 1 we have |ψ(R)| ≤ 1 − ε, then ν  v ∈ R : |v| ≥ Ωε (1/R)  ≥ Ωε (1); (10) • for every δ > 0 one has ν  v ∈ R : |v| ≥ 1/δ  ≤ O(1/δ) · Z δ −δ  1 − ψ(t) dt. (11) Proof. Let us start with proving the first claim. We have for every α > 0 1 − ε ≥ |ψ(R)| ≥ Z R     cos(vR) ν(dv) ≥ cos α · ν {v ∈ R : |vR| ≤ α} − ν {v ∈ R : |vR| > α}   = (1 + cos α) · ν {v ∈ R : |vR| ≤ α} − 1, where the second step uses the fact that ψ is real-valued. Thus, we have   2−ε . 1 + cos α ν {v ∈ R : |vR| ≤ α} ≤ √  Setting α = Θ ε , we get the desired bound. Now let us prove the second claim. We have, for every δ > 0, Z δ −δ  1 − ψ(t) dt = Z δ −δ Z R  1 − eivt ν(dv) dt = 2δ · Z  R 1− sin(δv) δv  ν(dv)   ≥ 2(1 − sin 1) · δ · ν {v ∈ R : |δv| ≥ 1} , where we use that (1 − sin y/y) > (1 − sin 1) for every y such that |y| > 1. Now we will show that the probability measure µ from Lemma 5.3 gives a good linear sketch for X. To see this we use the conditioning on the characteristic function of µ, namely, we exploit them using the above Lemma 5.5. In order to do this, we look at the one-dimensional projections of µ as follows. Let x ∈ X be a fixed vector. For a measurable subset A ⊆ R we define ν(A) = µ  v ∈ Rdim X : hx, vi ∈ A  . It is immediate to check that the characteristic function ψ of ν is as follows: ψ(t) = ϕ(t · x) (recall that ϕ is the characteristic function of µ). Next we apply Lemma 5.5 to ψ and use the properties 25 of ϕ from the conclusion of Lemma 5.3. Namely, we get for every x ∈ X: µ  and for every t > 0, µ v ∈ Rdim X : |hx, vi| ≥ Ω(kxkX /∆)  v ∈ Rdim X : |hx, vi| ≥ t · kxkX   = Ω(1); (12) ≤ O(1/t). (13) Indeed, (12) follows from the bound ϕ(x) ≤ 1/e whenever kxkX ≥ ∆ and (10). The inequal- e X and (11) (for 1/δ = tkxk ) that together ity (13) follows from the estimate ϕ(x) ≥ e−K·kxk X give µ  v ∈ Rdim X : |hx, vi| ≥ t · kxkX  = ν({r ∈ R : |r| ≥ tkxkX }) ≤ O(tkxkX ) Z 1/tkxkX −1/tkxkX (1 − e−K̃skxkX ) ds, as well as from the inequality t Z 1/t −1/t  1 − e−Cs ds ≤ t Z 1/t −1/t  1 − (1 − Cs) ds = C/t. Hence, µ gives rise to a one-measurement linear sketch of X with approximation O(∆), whose “upper tail” is not too heavy. Finally, we are ready to describe a desired linear embedding of X into L1−ε ; we map X into L1−ε (µ) as follows: x 7→ (v 7→ hx, vi). The following Lemma states that the distortion of this embedding is O(∆/ε), as required. Lemma 5.6. For 0 < ε < 1/3 and every x ∈ X,   Ω kxkX /∆ ≤ kv 7→ hx, vikL1−ε (µ) ≤ O kxkX /ε . Proof. The lower bound is straightforward: kv 7→ 1−ε hx, vikL 1−ε (µ) = Z Rdim X hx, vi 1−ε µ(dv) ≥ Ω(1) · Ω(kxkX /∆)1−ε , where the last step follows from (12). For the upper bound, we have for every α > 0, kv 7→ hx, vik1−ε L1−ε (µ) = Z Rdim X hx, vi 1−ε µ(dv) = Z ∞ 0 ≤ α + O(1) · kxkX · 26   µ {v ∈ Rdim X : |hx, vi|1−ε ≥ s} ds Z ∞ α 1 s− 1−ε ds ≤ α + O(1) · ε kxkX · α− 1−ε , ε 1−ε , we get where the third step follows from (13). Choosing α = kxk1−ε X /ε 1 kv 7→ hx, vikL1−ε (µ) ≤ O(1) · 2 1−ε · kxkX . ε This concludes the proof of Theorem 5.1. 6 Embedding into ℓ1 via sum-products Finally, we prove Theorem 1.4: good sketches for norms closed under the sum-product imply embeddings into ℓ1 with constant distortion. First we invoke Theorem 4.1 and get a sequence of good uniform embeddings into a Hilbert space, whose moduli depend only on the sketch size and the approximation. Then, we use the main result of this section: Lemma 6.1. Before stating the lemma, let us remind a few notions. For a metric space X, recall that the metric space ℓk1 (X) = Lk ℓ1 Xn is the direct sum of k copies of X, with the associated distance defined as a sum-product (ℓ1 -product) over the k copies. We define ℓ1 (X) similarly. We also denote X ⊕ℓ1 Y the sum-product of X and Y. Lemma 6.1. Let (Xn )∞ n=1 be a sequence of finite-dimensional normed spaces. Suppose that for every i1 , i2 ≥ 1 there exists m = m(i1 , i2 ) ≥ 1 such that Xi1 ⊕ℓ1 Xi2 is isometrically embeddable into Xm . If every Xn admits a uniform embedding into a Hilbert space with moduli independent of n, then every Xn is linearly embeddable into ℓ1 with distortion independent of n. Note that Theorem 1.4 just follows from combining Lemma 6.1 with Theorem 4.1. Before proving Lemma 6.1, we state the following two useful theorems. The first one (Theorem 6.2) follows from the fact that uniform embeddability into a Hilbert space is determined by embeddability of finite subsets [BL00]. The second one (Theorem 6.3) follows by composing results of Aharoni, Maurey, and Mityagin [AMM85] and Kalton [Kal85]. Theorem 6.2 (Proposition 8.12 from [BL00]). Let A1 ⊂ A2 ⊂ . . . be metric spaces and let A = S Ai . If every An is uniformly embeddable into a Hilbert space with moduli independent of n, then the whole A is uniformly embeddable into a Hilbert space. i Theorem 6.3 ([AMM85, Kal85]). A Banach space X is linearly embeddable into L1 iff ℓ1 (X) is uniformly embeddable into a Hilbert space. We are now ready to proceed with the proof of Lemma 6.1. Proof of Lemma 6.1. Let X = X1 ⊕ℓ1 X2 ⊕ℓ1 . . .. More formally, n X = (x1 , x2 , . . .) : xi ∈ Xi , 27 X i o kxi k < ∞ , where the norm is defined as follows: (x1 , x2 , . . .) = X i kxi k. We claim that the space ℓ1 (X) embeds uniformly into a Hilbert space. To see this, consider Up = ℓp1 (X1 ⊕ℓ1 X2 ⊕ℓ1 . . . ⊕ℓ1 Xp ), which can be naturally seen as a subspace of ℓ1 (X). Then, U1 ⊂ U2 ⊂ . . . ⊂ Up ⊂ . . . ⊂ ℓ1 (X) and S p Up is dense in ℓ1 (X). By the assumption of the lemma, Up is isometrically embeddable into Xm for some m, thus, Up is uniformly embeddable into a Hilbert space with moduli independent of p. Now, by Theorem 6.2, Hilbert space. Since S p Up S p Up is uniformly embeddable into a is dense in ℓ1 (X), the same holds also for the whole ℓ1 (X), as claimed. Finally, since ℓ1 (X) embeds uniformly into a Hilbert space, we can apply Theorem 6.3 and conclude that X is linearly embeddable into L1 . The lemma follows since X contains every Xi as a subspace. 7 Acknowledgments We are grateful to Assaf Naor for pointing us to [AMM85, Kal85], as well as for numerous very enlightening discussions throughout this project. We also thank Gideon Schechtman for useful discussions and explaining some of the literature. We thank Piotr Indyk for fruitful discussions and for encouraging us to work on this project. References [ADIW09] A. Andoni, K. Do Ba, P. Indyk, and D. Woodruff. Efficient sketches for Earth-Mover Distance, with applications. In Proceedings of the Symposium on Foundations of Computer Science (FOCS), 2009. [AGM12] K. Ahn, S. Guha, and A. McGregor. Analyzing graph structure via linear measurements. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 459–467, 2012. [AI08] A. Andoni and P. Indyk. Near-optimal hashing algorithms for approximate nearest neighbor in high dimensions. Communications of the ACM, 51(1):117–122, 2008. [AIK08] A. Andoni, P. Indyk, and R. Krauthgamer. Earth mover distance over high-dimensional spaces. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 343–352, 2008. [AIK09] A. Andoni, P. Indyk, and R. Krauthgamer. Overcoming the ℓ1 non-embeddability barrier: Algorithms for product metrics. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 865–874, 2009. [AJP10] A. Andoni, T. Jayram, and M. Pǎtraşcu. Lower bounds for edit distance and product metrics via Poincaré-type inequalities. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA), 2010. [AK10] A. Andoni and R. Krauthgamer. The computational hardness of estimating edit distance. SIAM Journal on Computing, 39(6):2398–2429, 2010. Previously appeared in FOCS’07. [AMM85] I. Aharoni, B. Maurey, and B. S. Mityagin. Uniform embeddings of metric spaces and of Banach spaces into Hilbert spaces. Israel J. Math., 52(3):251–265, 1985. doi:10.1007/BF02786521. 28 [ANRW17] A. Andoni, A. Nikolov, I. Razenshteyn, and E. Waingarten. Approximate near neighbors for general symmetric norms. In Symposium on Theory of Computing, 2017. STOC’17. 49th ACM Symposium on, 2017. To appear, Available as arXiv:1611.06222. arXiv:1611.06222. [AR98] Y. Aumann and Y. Rabani. An O(log k) approximate min-cut max-flow theorem and approximation algorithm. SIAM J. Comput., 27(1):291–301 (electronic), 1998. [Bal92] K. Ball. Markov chains, Riesz transforms and Lipschitz maps. Geometric and Functional Analysis, 2(2):137–172, 1992. [BBC+ 17] J. Błasiok, V. Braverman, S. R. Chestnut, R. Krauthgamer, and L. F. Yang. Streaming symmetric norms via measure concentration. In Symposium on Theory of Computing, 2017. STOC’17. 49th ACM Symposium on, 2017. To Appear, Available as arXiv:1511.01111. arXiv:1511.01111. [BC09] J. Brody and A. Chakrabarti. A multi-round communication lower bound for gap Hamming and some consequences. In Proceedings of the IEEE Conference on Computational Complexity, 2009. [BCR+ 10] J. Brody, A. Chakrabarti, O. Regev, T. Vidick, and R. De Wolf. Better gap-hamming lower bounds via better round elimination. In Proceedings of the 13th International Conference on Approximation, and 14 the International Conference on Randomization, and Combinatorial Optimization: Algorithms and Techniques, APPROX/RANDOM’10, pages 476–489. Springer-Verlag, 2010. doi:10.1007/978-3-642-15369-3_36. [BES06] T. Batu, F. Ergün, and C. Sahinalp. Oblivious string embeddings and edit distance approximations. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 792–801, 2006. [BGMZ97] A. Broder, S. Glassman, M. Manasse, and G. Zweig. Syntactic clustering of the web. Proceedings of the Sixth International World Wide Web Conference, pages 391–404, 1997. doi:10.1016/S0169-7552(97)00031-7. [BJKK04] Z. Bar-Yossef, T. S. Jayram, R. Krauthgamer, and R. Kumar. Approximating edit distance efficiently. In Proceedings of the Symposium on Foundations of Computer Science (FOCS), pages 550–559, 2004. [BJKS02] Z. Bar-Yossef, T. S. Jayram, R. Kumar, and D. Sivakumar. Information theory methods in communication complexity. In CCC ’02: Proceedings of the 17th IEEE Annual Conference on Computational Complexity, page 93, Washington, DC, USA, 2002. IEEE Computer Society. [BJKS04] Z. Bar-Yossef, T. S. Jayram, R. Kumar, and D. Sivakumar. An information statistics approach to data stream and communication complexity. J. Comput. Syst. Sci., 68(4):702–732, 2004. Previously in FOCS’02. [BL00] Y. Benyamini and J. Lindenstrauss. Geometric nonlinear functional analysis. Vol. 1, volume 48 of American Mathematical Society Colloquium Publications. American Mathematical Society, Providence, RI, 2000. [BO10] V. Braverman and R. Ostrovsky. Zero-one frequency laws. In Proceedings of the Symposium on Theory of Computing (STOC), 2010. [Bro97] A. Broder. On the resemblance and containment of documents. Proceedings of Compression and Complexity of Sequences, pages 21–29, 1997. doi:10.1109/SEQUEN.1997.666900. [Cha02] M. Charikar. Similarity estimation techniques from rounding. In Proceedings of the Symposium on Theory of Computing (STOC), pages 380–388, 2002. [CK06] M. Charikar and R. Krauthgamer. Embedding the Ulam metric into ℓ1 . Theory of Computing, 2(11):207–224, 2006. Available from: http://www.theoryofcomputing.org/articles/main/v002/a011, arXiv:toc:v002/a011. [CK10] J. Cheeger and B. Kleiner. Differentiating maps into L1 , and the geometry of BV functions. Ann. of Math. (2), 171(2):1347–1385, 2010. doi:10.4007/annals.2010.171.1347. 29 [CKN11] J. Cheeger, B. Kleiner, and A. Naor. Compression bounds for Lipschitz maps from the Heisenberg group to L1 . Acta mathematica, 207(2):291–373, 2011. doi:10.1007/s11511-012-0071-9. [CLL04] M. Charikar, Q. Lv, and K. Li. Image similarity search with compact data structures. In Proceedings of the ACM Conference on Information and Knowledge Management (CIKM), 2004. [CM07] G. Cormode and S. Muthukrishnan. The string edit distance matching problem with moves. ACM Transactions on Algorithms, 3(1), 2007. Previously in SODA’02. [CMS01] G. Cormode, S. Muthukrishnan, and S. C. Sahinalp. Permutation editing and matching via embeddings. In 28th International Colloquium on Automata, Languages and Programming, volume 2076 of Lecture Notes in Computer Science, pages 481–492. Springer, 2001. [CPSV00] G. Cormode, M. Paterson, S. C. Sahinalp, and U. Vishkin. Communication complexity of document exchange. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 197–206, 2000. [CR12] A. Chakrabarti and O. Regev. An optimal lower bound on the communication complexity of gap-hamming-distance. SIAM J. Comput., 41(5):1299–1317, 2012. Previously in STOC’11. [Fel71] W. Feller. An introduction to probability theory and its applications, vol. 2. Wiley, New York, 1971. [GIM08] S. Guha, P. Indyk, and A. McGregor. Sketching information divergences. Journal of Machine Learning, 72(1–2):5–19, 2008. Previously appeared in COLT’07. [HR94] E. Hewitt and K. A. Ross. Abstract Harmonic Analysis: Volume I. Grundlehren der mathematischen Wissenschaften. Springer New York, 1994. [IM98] P. Indyk and R. Motwani. Approximate nearest neighbor: towards removing the curse of dimensionality. Proceedings of the Symposium on Theory of Computing (STOC), pages 604–613, 1998. [Ind06] P. Indyk. Stable distributions, pseudorandom generators, embeddings and data stream computation. J. ACM, 53(3):307–323, 2006. Previously appeared in FOCS’00. [IT03] P. Indyk and N. Thaper. Fast color image retrieval via embeddings. Workshop on Statistical and Computational Theories of Vision (at ICCV), 2003. [JKS08] T. Jayram, R. Kumar, and D. Sivakumar. The one-way communication complexity of hamming distance. Theory of Computing, 4(1):129–135, 2008. [JL84] W. B. Johnson and J. Lindenstrauss. Extensions of Lipschitz mappings into a Hilbert space. In Conference in modern analysis and probability (New Haven, Connecticut, 1982), volume 26 of Contemporary Mathematics, pages 189–206. Amer. Math. Soc., 1984. doi:10.1090/conm/026/737400. [JR06] W. B. Johnson and N. L. Randrianarivony. lp (p > 2) does not coarsely embed into a Hilbert space. Proc. Amer. Math. Soc., 134(4):1045–1050 (electronic), 2006. [JW09] T. Jayram and D. Woodruff. The data stream space complexity of cascaded norms. In Proceedings of the Symposium on Foundations of Computer Science (FOCS), 2009. [Kal85] N. J. Kalton. Banach spaces embedding into L0 . doi:10.1007/BF02774083. [KKM13] B. Kapron, V. King, and B. Mountjoy. Dynamic graph connectivity in polylogarithmic worst case time. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1131–1142, 2013. [KN06] S. Khot and A. Naor. Nonembeddability theorems via Fourier analysis. Math. Ann., 334(4):821– 852, 2006. Preliminary version appeared in FOCS’05. 30 Israel J. Math., 52(4):305–319, 1985. [KOR00] E. Kushilevitz, R. Ostrovsky, and Y. Rabani. Efficient search for approximate nearest neighbor in high dimensional spaces. SIAM J. Comput., 30(2):457–474, 2000. Preliminary version appeared in STOC’98. [KR09] R. Krauthgamer and Y. Rabani. Improved lower bounds for embeddings into L1 . SIAM J. Comput., 38(6):2487–2498, 2009. doi:10.1137/060660126. [KS09] S. Khot and R. Saket. Sdp integrality gaps with local ℓ1 -embeddability. In Proceedings of the Symposium on Foundations of Computer Science (FOCS), pages 565–574. IEEE Computer Society, 2009. doi:10.1109/FOCS.2009.37. [KV05] S. A. Khot and N. K. Vishnoi. The unique games conjecture, integrality gap for cut problems and embeddability of negative type metrics into ℓ1 . In Proceedings of the Symposium on Foundations of Computer Science (FOCS), pages 53–62, 2005. [LLR94] N. Linial, E. London, and Y. Rabinovich. The geometry of graphs and some of its algorithmic applications. In Proceedings of the Symposium on Foundations of Computer Science (FOCS), pages 577–591, 1994. [LN06] J. R. Lee and A. Naor. Lp metrics on the Heisenberg group and the Goemans-Linial conjecture. In Foundations of Computer Science, 2006. FOCS’06. 47th Annual IEEE Symposium on, pages 99–108. IEEE, 2006. [LNW14a] Y. Li, H. L. Nguyên, and D. P. Woodruff. On sketching matrix norms and the top singular vector. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA), 2014. [LNW14b] Y. Li, H. L. Nguyên, and D. P. Woodruff. Turnstile streaming algorithms might as well be linear sketches. In Proceedings of the Symposium on Theory of Computing (STOC), 2014. [Mat02] J. Matoušek. Lectures on Discrete Geometry. Springer, 2002. [McG06] A. McGregor. Open problems in data streams and related topics. IITK Workshop on Algorithms For Data Streams, 2006. Available at http://sublinear.info. [Min70] G. J. Minty. On the extension of Lipschitz, Lipschitz–Hölder continuous, and monotone functions. Bull. Amer. Math. Soc., 76(2):334–339, 1970. [MN11] J. Matoušek and A. Naor. Open problems on embeddings of finite metric spaces. August 2011. Available online at http://kam.mff.cuni.cz/~matousek/metrop.ps.gz. Last accessed in November, 2014. [MNP06] R. Motwani, A. Naor, and R. Panigrahy. Lower bounds on locality sensitive hashing. In Proceedings of the ACM Symposium on Computational Geometry (SoCG), pages 253–262, 2006. [MS00] S. Muthukrishnan and S. C. Sahinalp. Approximate nearest neighbors and sequence comparisons with block operations. In Proceedings of the 32nd Annual ACM Symposium on Theory of Computing, pages 416–424, 2000. [Mun00] J. R. Munkres. Topology. Prentice Hall, Incorporated, 2000. [Nik72] E. Nikišin. A resonance theorem and series in eigenfunctions of the laplacian. Mathematics of the USSR-Izvestiya, 6(4):788–806, 1972. [NS07] A. Naor and G. Schechtman. Planar earthmover is not in L1 . SIAM Journal on Computing, 37(3):804–826, 2007. An extended abstract appeared in FOCS’06. [OR07] R. Ostrovsky and Y. Rabani. Low distortion embedding for edit distance. J. ACM, 54(5), 2007. Preliminary version appeared in STOC’05. [OWZ14] R. O’Donnell, Y. Wu, and Y. Zhou. Optimal lower bounds for locality-sensitive hashing (except when q is tiny). ACM Trans. Comput. Theory, 6(1):5:1–5:13, March 2014. doi:10.1145/2578221. 31 [Pan08] D. Panchenko. Lecture notes in probability theory, 2008. Available https://sites.google.com/site/panchenkomath/Home/math606-spring2013. [Pis78] G. Pisier. Some results on Banach spaces without tional structure. Compositio Math., 37(1):3–19, 1978. http://www.numdam.org/item?id=CM_1978__37_1_3_0. [Ran06] N. L. Randrianarivony. Characterization of quasi-Banach spaces which coarsely embed into a Hilbert space. Proc. Amer. Math. Soc., 134(5):1315–1317 (electronic), 2006. [Sch35] I. Schoenberg. Remarks to Maurice Fréchet’s article “Sur la définition axiomatique d’une classe d’espace distanciés vectoriellement applicable sur l’espace de Hilbert”. Annals of Mathematics, 36(3):724–732, 1935. [Sch37] I. J. Schoenberg. On certain metric spaces arising from Euclidean spaces by a change of metric and their imbedding in Hilbert space. Ann. of Math. (2), 38(4):787–793, 1937. doi:10.2307/1968835. [Sch38] I. Schoenberg. Metric spaces and positive definite functions. Transactions of the American Mathematical Society, 44(3):522–536, November 1938. [She12] A. A. Sherstov. The communication complexity of gap hamming distance. Theory of Computing, 8(8):197–208, 2012. Availhttp://www.theoryofcomputing.org/articles/v008a008, able from: doi:10.4086/toc.2012.v008a008. [SS02] M. Saks and X. Sun. Space lower bounds for distance approximation in the data stream model. In Proceedings of the Symposium on Theory of Computing (STOC), pages 360–369, 2002. doi:http://doi.acm.org/10.1145/509907.509963. [Tal90] M. Talagrand. Embedding subspaces of L1 into l1N . Proc. Amer. Math. Soc., 108(2):363–369, 1990. doi:10.1090/S0002-9939-1990-0994792-4. [Vid12] T. Vidick. A concentration inequality for the overlap of a vector on a large set, with application to the communication complexity of the gap-Hamming-Distance problem. Chicago Journal of Theoretical Computer Science, 2012(1), July 2012. doi:10.4086/cjtcs.2012.001. [Woo04] D. Woodruff. Optimal space lower bounds for all frequency moments. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 167–175, 2004. [Woo14] D. P. Woodruff. Sketching as a tool for numerical linear algebra. Foundations and Trends in Theoretical Computer Science, 10:1–157, 2014. doi:10.1561/0400000060. [WW75] J. H. Wells and L. R. Williams. Embeddings and extensions in analysis. Springer-Verlag, New York-Heidelberg, 1975. [Zva00] A. Zvavitch. More on embedding subspaces of Lp into lpN , 0 < p < 1. In Geometric aspects of functional analysis, volume 1745 of Lecture Notes in Math., pages 269–280. Springer, Berlin, 2000. A from: local uncondiAvailable from: EMD Reduction Recall that EMDn is a normed space on all signed measures on [n]2 (that sum up to zero). We also take the view that a weighted set in [n]2 is in fact a measure on [n]2 . Lemma A.1. Suppose the EMD metric between non-negative measures (of the same total measure) admits a sketching algorithm sk with approximation D > 1 and sketch size s. Then the normed space EMDn admits a sketching algorithm sk′ with approximation D and sketch size O(s). 32 Proof. The main idea is that if x, y are signed measures and we add a sufficiently large term M > 0 to all of their coordinates, then the resulting vectors x′ = x + M · ~1 and y ′ = y + M · ~1 are measures (all their coordinates are non-negative) of the same total mass, and kx − ykEMD is equal to the EMD distance between measures x′ , y ′ . The trouble is in identifying a large enough M . We use the values of x and y themselves to agree on M . Details follow. Without loss of generality we can fix the DTEP threshold to be r = 1. We design the sketch sk′ as follows. First choose a hash function h : N → {0, 1}9 (using public 2 randomness). Fix an input x ∈ Rn of total measure zero, i.e., P i xi = 0. Let m(x) = mini xi , and let b(x) be the largest multiple of 2 that is smaller than m(x). Since x has total measure zero, b(x) < m(x) ≤ 0. Now let b(1) (x) = b(x) and b(2) (x) = b(x) − 2, and then x(q) = x − b(q) (x) · ~1 for q = 1, 2. Notice that in both cases x(q) > x ≥ 0 (component-wise). Now let the sketch sk′ (x) be the concatenation of sk(x(q) ), h(b(q) (x)) for q = 1, 2. The distinguisher works as follows, given two sketches sk′ (x) = (sk(x(q) ), h(b(q) (x)))q=1,2 and sk′ (y) = (sk(y (q) ), h(b(q) (x)))q=1,2 . If there are qx , qy ∈ {1, 2} whose hashes agree h(b(q) (x)) = h(b(q) (y)) (breaking ties arbitrarily if there are multiple possible agreements), then output whatever the EMD metric distinguisher would output on sk(x(qx ) ), sk(y (qy ) ). Otherwise output “far” (i.e., that kx − ykEMD > D). To analyze correctness, consider the case when kx − ykEMD ≤ 1. Without loss of generality, suppose m(x) ≥ m(y). Then m(x) − m(y) ≤ 1 (otherwise x, y are further away in EMD norm than 1). Hence either b(x) = b(y) or b(x) = b(y) + 2. Then there exists a corresponding q ∈ {1, 2} for which the hashes agree h(b(1) (x)) = h(b(q) (y)). By properties of the hash function, with sufficiently large constant probability the hashes match only when the b’s match, in which case the values qx , qy used by the distinguisher satisfy b(qx ) (x) = b(qy ) (y). In this case, kx − ykEMD = dEMD (x(qx ) , y (qy ) ), and the correctness now depends on sk, and the distinguisher for the EMD metric. Otherwise, if kx − ykEMD > D, either the b-values coincide for some qx , qy and then the above argument applies again, or with sufficiently large constant probability the hashes will not agree and the distinguisher outputs (correctly) “far”. There is a small loss in success probability due to use of the hash function, but that can be amplified back by independent repetitions. Notice that the above lemma assumes a sketching algorithm for the EMD metric between any non-negative measures of the same total measure, and not only in the case where the total measure is 1. The proof can be easily modified so that any non-negative measure being used always has a fixed total measure (say 1, by simply scaling the inputs), which translates to scaling the threshold r of the DTEP problem. This is acceptable because, under standard definitions, a metric space is called sketchable if it admits a sketching scheme for every threshold r > 0. 33
8cs.DS
Fairness Testing: Testing Software for Discrimination Sainyam Galhotra Yuriy Brun Alexandra Meliou arXiv:1709.03221v1 [cs.SE] 11 Sep 2017 University of Massachusetts, Amherst Amherst, Massachusetts 01003-9264, USA {sainyam, brun, ameli}@cs.umass.edu ABSTRACT 1 This paper defines software fairness and discrimination and develops a testing-based method for measuring if and how much software discriminates, focusing on causality in discriminatory behavior. Evidence of software discrimination has been found in modern software systems that recommend criminal sentences, grant access to financial products, and determine who is allowed to participate in promotions. Our approach, Themis, generates efficient test suites to measure discrimination. Given a schema describing valid system inputs, Themis generates discrimination tests automatically and does not require an oracle. We evaluate Themis on 20 software systems, 12 of which come from prior work with explicit focus on avoiding discrimination. We find that (1) Themis is effective at discovering software discrimination, (2) state-of-the-art techniques for removing discrimination from algorithms fail in many situations, at times discriminating against as much as 98% of an input subdomain, (3) Themis optimizations are effective at producing efficient test suites for measuring discrimination, and (4) Themis is more efficient on systems that exhibit more discrimination. We thus demonstrate that fairness testing is a critical aspect of the software development cycle in domains with possible discrimination and provide initial tools for measuring software discrimination. Software has become ubiquitous in our society and the importance of its quality has increased. Today, automation, advances in machine learning, and the availability of vast amounts of data are leading to a shift in how software is used, enabling the software to make more autonomous decisions. Already, software makes decisions in what products we are led to buy [53], who gets a loan [62], self-driving car actions that may lead to property damage or human injury [32], medical diagnosis and treatment [74], and every stage of the criminal justice system including arraignment and sentencing that determine who goes to jail and who is set free [5, 28]. The importance of these decisions makes fairness and nondiscrimination in software as important as software quality. Unfortunately, software fairness is undervalued and little attention is paid to it during the development lifecycle. Countless examples of unfair software have emerged. In 2016, Amazon.com, Inc. used software to determine the parts of the United States to which it would offer free same-day delivery. The software made decisions that prevented minority neighborhoods from participating in the program, often when every surrounding neighborhood was allowed to participate [36, 52]. Similarly, software is being used to compute risk-assessment scores for suspected criminals. These scores — an estimated probability that the person arrested for a crime is likely to commit another crime — are used to inform decisions about who can be set free at every stage of the criminal justice system process, from assigning bond amounts, to deciding guilt, to sentencing. Today, the U.S. Justice Department’s National Institute of Corrections encourages the use of such assessment scores. In Arizona, Colorado, Delaware, Kentucky, Louisiana, Oklahoma, Virginia, Washington, and Wisconsin, these scores are given to judges during criminal sentencing. The Wisconsin Supreme Court recently ruled unanimously that the COMPAS computer program, which uses attributes including gender, can assist in sentencing defendants [28]. Despite the importance of these scores, the software is known to make mistakes. In forecasting who would reoffend, the software is “particularly likely to falsely flag black defendants as future criminals, wrongly labeling them this way at almost twice the rate as white defendants; white defendants were mislabeled as low risk more often than black defendants” [5]. Prior criminal history does not explain this difference: Controlling for criminal history, recidivism, age, and gender shows that the software predicts black defendants to be 77% more likely to be pegged as at higher risk of committing a future violent crime than white defendants [5]. Going forward, the importance of ensuring fairness in software will only increase. For example, “it’s likely, and some say inevitable, that future AI-powered weapons will eventually be able to operate with complete autonomy, leading to a watershed moment in the CCS CONCEPTS • Software and its engineering → Software testing and debugging KEYWORDS Discrimination testing, fairness testing, software bias, testing ACM Reference format: Sainyam Galhotra, Yuriy Brun, and Alexandra Meliou. 2017. Fairness Testing: Testing Software for Discrimination. In Proceedings of 2017 11th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, Paderborn, Germany, September 4–8, 2017 (ESEC/FSE’17), 13 pages. https://doi.org/10.1145/3106237.3106277 Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]. ESEC/FSE’17, September 4–8, 2017, Paderborn, Germany © 2017 Copyright held by the owner/author(s). Publication rights licensed to Association for Computing Machinery. ACM ISBN 978-1-4503-5105-8/17/09. . . $15.00 https://doi.org/10.1145/3106237.3106277 498 INTRODUCTION ESEC/FSE’17, September 4–8, 2017, Paderborn, Germany Sainyam Galhotra, Yuriy Brun, and Alexandra Meliou history of warfare: For the first time, a collection of microchips and software will decide whether a human being lives or dies” [34]. In fact, in 2016, the U.S. Executive Office of the President identified bias in software as a major concern for civil rights [27]. And one of the ten principles and goals Satya Nadella, the CEO of Microsoft Co., has laid out for artificial intelligence is “AI must guard against bias, ensuring proper, and representative research so that the wrong heuristics cannot be used to discriminate” [61]. This paper defines causal software discrimination and proposes Themis, a software testing method for evaluating the fairness of software. Our definition captures causal relationships between inputs and outputs, and can, for example, detect when sentencing software behaves such that “changing only the applicant’s race affects the software’s sentence recommendations for 13% of possible applicants.” Prior work on detecting discrimination has focused on measuring correlation or mutual information between inputs and outputs [79], discrepancies in the fractions of inputs that produce a given output [18, 19, 39–42, 87–89, 91], or discrepancies in output probability distributions [51]. These approaches do not capture causality and can miss discrimination that our causal approach detects, e.g., when the software discriminates negatively with respect to a group in one settings, but positively in another. Restricting the input space to real-world inputs [1] may similarly hide software discrimination that causal testing can reveal. Unlike prior work that requires manually written tests [79], Themis automatically generates test suites that measure discrimination. To the best of our knowledge, this work is the first to automatically generate test suites to measure causal discrimination in software. Themis would be useful for companies and government agencies relying on software decisions. For example, Amazon.com, Inc. received strong negative publicity after its same-day delivery algorithm made racially biased decisions. Politicians and citizens in Massachusetts, New York, and Illinois demanded that the company offer same-day delivery service to minority neighborhoods in Boston, New York City, and Chicago, and the company was forced to reverse course within mere days [72, 73]. Surely, the company would have preferred to test its software for racial bias and to develop a strategy (e.g., fixing the software, manually reviewing and modifying racist decisions, or not using the software) prior to deploying it. Themis could have analyzed the software and detected the discrimination prior to deployment. Similarly, a government may need to set nondiscrimination requirements on software, and be able to evaluate if software satisfies those requirements before mandating it to be used in the justice system. In 2014, the U.S. Attorney General Eric Holder warned that steps need to be taken to prevent the risk-assessment scores injecting bias into the courts: “Although these measures were crafted with the best of intentions, I am concerned that they inadvertently undermine our efforts to ensure individualized and equal justice [and] they may exacerbate unwarranted and unjust disparities that are already far too common in our criminal justice system and in our society.” [5]. As with software quality, testing is likely to be the best way to evaluate software fairness properties. Unlike prior work, this paper defines discrimination as a causal relationship between an input and an output. As defined here, discrimination is not necessarily bad. For example, a software system designed to identify if a picture is of a cat should discriminate between cats and dogs. It is not our goal to eliminate all discrimination in software. Instead, it is our goal to empower the developers and stakeholders to identify and reason about discrimination in software. As described above, there are plenty of real-world examples in which companies would prefer to have discovered discrimination earlier, prior to release. Specifically, our technique’s job is to identify if software discriminates with respect to a specific set of characteristics. If the stakeholder expects cat vs. dog discrimination, she would exclude it from the list of input characteristics to test. However, learning that the software frequently misclassifies black cats can help the stakeholder improve the software. Knowing if there is discrimination can lead to better-informed decision making. There are two main challenges to measuring discrimination via testing. First, generating a practical set of test inputs sufficient for measuring discrimination, and second, processing those test inputs’ executions to compute discrimination. This paper tackles both challenges, but the main contribution is computing discrimination from a set of executions. We are aware of no prior testing technique, neither automated nor manual, that produces a measure of a software system’s causal discrimination. The paper also contributes within the space of efficient test input generation for the specific purpose of discrimination testing (see Section 4), but some prior work, specifically in combinatorial testing, e.g., [6, 44, 47, 80], may further help the efficiency of test generation, though these techniques have not been previously applied to discrimination testing. We leave a detailed examination of how combinatorial testing and other automated test generation can help further improve Themis to future work. This paper’s main contributions are: (1) Formal definitions of software fairness and discrimination, including a causality-based improvement on the state-of-the-art definition of algorithmic fairness. (2) Themis, a technique and open-source implementation — https://github.com/LASER-UMASS/Themis — for measuring discrimination in software. (3) A formal analysis of the theoretical foundation of Themis, including proofs of monotonicity of discrimination that lead to provably sound two-to-three orders of magnitude improvements in test suite size, a proof of the relationship between fairness definitions, and a proof that Themis is more efficient on systems that exhibit more discrimination. (4) An evaluation of the fairness of 20 real-world software instances (based on 8 software systems), 12 of which were designed with fairness in mind, demonstrating that (i) even when fairness is a design goal, developers can easily introduce discrimination in software, and (ii) Themis is an effective fairness testing tool. Themis requires a schema for generating inputs, but does not require an oracle. Our causal fairness definition is designed specifically to be testable, unlike definitions that require probabilistic estimation or knowledge of the future [38]. Software testing offers a unique opportunity to conduct causal experiments to determine statistical causality [67]: One can run the software on an input (e.g., a defendant’s criminal record), modify a specific input characteristic (e.g., the defendant’s race), and observe if that modification causes a change in the output. We define software to be causally 499 Fairness Testing: Testing Software for Discrimination ESEC/FSE’17, September 4–8, 2017, Paderborn, Germany fair with respect to input characteristic χ if for all inputs, varying the value of χ does not alter the output. For example, a sentencerecommendation system is fair with respect to race if there are no two individuals who differ only in race but for whom the system’s sentence recommendations differs. In addition to capturing causality, this definition requires no oracle — the equivalence of the output for the two inputs is itself the oracle — which helps fully automate test generation. The rest of this paper is structured as follows. Section 2 provides an intuition to fairness measures and Section 3 formally defines software fairness. Section 4 describes Themis, our approach to fairness testing. Section 5 evaluates Themis. Finally, Section 6 places our work in the context of related research and Section 7 summarizes our contributions. 2 software must produce the same output for every two individuals who differ only in those characteristics. For example, the loan software is fair with respect to age and race if for all pairs of individuals with identical name, income, savings, employment status, and requested loan amount but different race or age characteristics, loan either gives all of them or none of them the loan. The fraction of inputs for which software causally discriminates is a measure of causal discrimination. Thus far, we have discussed software operating on the full input domain, e.g., every possible loan application. However, applying software to partial input domains may mask or effect discrimination. For example, while software may discriminate on some loan applications, a bank may care about whether that software discriminates only with respect to applications representative of their customers, as opposed to all possible human beings. In this case, a partial input domain may mask discrimination. If a partial input domain exhibits correlation between input characteristics, it can effect discrimination. For example, suppose older individuals have, on average, higher incomes and larger savings. If loan only considers income and savings in making its decision, even though it does not consider age, for this population, loan gives loans to a higher fraction of older individuals than younger ones. We call the measurement of group or causal discrimination on a partial input domain apparent discrimination. Apparent discrimination depends on the operational profile of the system system’s use [7, 58]. Apparent discrimination is important to measure. For example, Amazon.com, Inc. software that determined where to offer free same-day delivery did not explicitly consider race but made racecorrelated decisions because of correlations between race and other input characteristics [36, 52]. Despite the algorithm not looking at race explicitly, Amazon.com, Inc. would have preferred to have tested for this kind of discrimination. SOFTWARE FAIRNESS MEASURES Suppose a bank employs loan software to decide if loan applicants should be given loans. loan inputs are each applicant’s name, age, race, income, savings, employment status, and requested loan amount, and the output is a binary “give loan” or “do not give loan”. For simplicity, suppose age and race are binary, with age either <40 or >40, and race either green or purple. Some prior work on measuring and removing discrimination from algorithms [18, 19, 39–42, 88, 89, 91] has focused on what we call group discrimination, which says that to be fair with respect to an input characteristic, the distribution of outputs for each group should be similar. For example, the loan software is fair with respect to age if it gives loans to the same fractions of applicants <40 and >40. To be fair with respect to multiple characteristics, for example, age and race, all groups with respect to those characteristics — purple <40, purple >40, green <40, and green >40 — should have the same outcome fractions. The Calders-Verwer (CV) score [19] measures the strength of group discrimination as the difference between the largest and the smallest outcome fractions; if 30% of people <40 get the loan, and 40% of people >40 get the loan, then loan is 40% − 30% = 10% group discriminating. While group discrimination is easy to reason about and measure, it has two inherent limitations. First, group discrimination may fail to observe some discrimination. For example, suppose that loan produces different outputs for two loan applications that differ in race, but are otherwise identical. While loan clearly discriminates with respect to race, the group discrimination score will be 0 if loan discriminates in the opposite way for another pair of applications. Second, software may circumvent discrimination detection. For example, suppose loan recommends loans for a random 30% of the purple applicants, and the 30% of the green applicants who have the most savings. Then the group discrimination score with respect to race will deem loan perfectly fair, despite a clear discrepancy in how the applications are processed based on race. To address these issues, we define a new measure of discrimination. Software testing enables a unique opportunity to conduct causal experiments to determine statistical causation [67] between inputs and outputs. For example, it is possible to execute loan on two individuals identical in every way except race, and verify if changing the race causes a change in the output. Causal discrimination says that to be fair with respect to a set of characteristics, the 3 FORMAL FAIRNESS DEFINITIONS We make two simplifying assumptions. First, we define software as a black box that maps input characteristics to an output characteristic. While software is, in general, more complex, for the purposes of fairness testing, without loss of generality, this definition is sufficient: All user actions and environmental variables are modeled as input characteristics, and each software effect is modeled as an output characteristic. When software has multiple output characteristics, we define fairness with respect to each output characteristic separately. The definitions can be extended to include multiple output characteristics without significant conceptual reformulation. Second, we assume that the input characteristics and the output characteristic are categorical variables, each having a set of possible values (e.g., race, gender, eye color, age ranges, income ranges). This assumption simplifies our measure of causality. While our definitions do not apply directly to non-categorical input and output characteristics (such as continuous variables, e.g., int and double), they, and our techniques, can be applied to software with non-categorical input and output characteristics by using binning (e.g., age<40 and age>40). The output domain distance function (Definition 3.3) illustrates one way our definitions can be extended to continuous variables. Future work will extend our discrimination measures directly to a broader class of data types. 500 ESEC/FSE’17, September 4–8, 2017, Paderborn, Germany Sainyam Galhotra, Yuriy Brun, and Alexandra Meliou A characteristic is a categorical variable. An input type is a set of characteristics, an input is a valuation of an input type (assignment of a value to each characteristic), and an output is a single characteristic. purple individuals who are given a loan). This definition is based on the CV score [19], which is limited to a binary input type or a binary partitioning of the input space. Our definition extends to the more broad categorical input types, reflecting the relative complexity of arbitrary decision software. The group discrimination score with respect to a set of input characteristics is the maximum frequency with which the software outputs true minus the minimum such frequency for the groups that only differ in those input characteristics. Because the CV score is limited to a single binary partitioning, that difference represents all the encoded discrimination information in that setting. In our more general setting with multiple non-binary characteristics, the score focuses on the range — difference between the maximum and minimum — as opposed to the distribution. One could consider measuring, say, the standard deviation of the distribution of frequencies instead, which would better measure deviation from a completely fair algorithm, as opposed to the maximal deviation for two extreme groups. Definition 3.1 (Characteristic). Let L be a set of value labels. A characteristic χ over L is a variable that can take on the values in L. Definition 3.2 (Input type and input). For all n ∈ N, let L 1 , L 2 , . . . , Ln be sets of value labels. Then an input type X over those value labels is a sequence of characteristics X = ⟨χ1 , χ 2 , . . . , χn ⟩, where for all i ≤ n, χi is a characteristic over Li . An input of type X is k = ⟨l 1 ∈ L 1 , l 2 ∈ L 2 , . . . , ln ∈ Ln ⟩, a valuation of an input type. We say the sizes of input k and of input type X are n. Discrimination can be measured in software that makes decisions. When the output characteristic is binary (e.g., “give loan” vs. “do not give loan”) the significance of the two different output values is clear. When outputs are not binary, identifying potential discrimination requires understanding the significance of differences in the output. For example, if the software outputs an ordering of hotel listings (that may be influenced by the computer you are using, as was the case when software used by Orbitz led Apple users to higher-priced hotels [53]), domain expertise is needed to compare two outputs and decide the degree to which their difference is significant. The output domain distance function encodes this expertise, mapping pairs of output values to a distance measure. ˜ Let K be Definition 3.5 (Univariate group discrimination score d). the set of all possible inputs of size n ∈ N of type X = ⟨χ1 , χ2 , . . . , χn ⟩ over label values L 1 , L 2 , . . . , Ln . Let software S : K → {true, false}. For all i ≤ n, fix one characteristic χi . That is, let m = |Li | and for all m̂ ≤ m, let Km̂ be the set of all inputs with χi = lm̂ . (Km̂ is the set of all inputs with the χi th characteristic fixed to be lm̂ .) Let pm̂ be the fraction of inputs k ∈ Km̂ such that S(k ) = true. And let P = ⟨p1 , p2 , . . . , pm ⟩. Then the univariate group discrimination score with respect to χi , denoted d˜χi (S), is max(P ) − min(P ). Definition 3.3 (Output domain distance function). Let Lo be a set of value labels. Then for all lo1 , lo2 ∈ Lo , the output distance function is δ : Lo × Lo → [0..1] such that lo1 = lo2 =⇒ δ (lo1 , lo2 ) = 0. For example, consider loan software that decided to give loan to 23% of green individuals, and to 65% of purple individuals. When computing loan’s group discrimination score with respect to race, d˜race (loan) = 0.65 − 0.23 = 0.42. The multivariate group discrimination score generalizes the univariate version to multiple input characteristics. The output domain distance function generalizes our work beyond binary outputs. For simplicity of exposition, for the remainder of this paper, we assume software outputs binary decisions — a natural domain for fairness testing. While true or false outputs (corresponding to decisions such as “give loan” vs. “do not give loan”) are easier to understand, the output domain distance function enables comparing non-binary outputs in two ways. First, a threshold output domain distance function can determine when two outputs are dissimilar enough to warrant potential discrimination. Second, a relational output domain distance function can describe how different two inputs are and how much they contribute to potential discrimination. Definitions 3.5, 3.6, 3.8, and 3.7, could be extended to handle non-binary outputs by changing their exact output comparisons to fractional similarity comparisons using an output domain distance function, similar to the way inputs have been handled in prior work [24]. ˜ For all Definition 3.6 (Multivariate group discrimination score d). α, β, . . . , γ ≤ n, fix the characteristics χ α , χ β , . . . , χγ . That is, let m α = |L α |, m β = |L β |, . . ., mγ = |Lγ |, let m̂ α ≤ m α , m̂ β ≤ m β , . . . , m̂γ ≤ mγ , and m = m α × m β × · · · × mγ , let Km̂ α , m̂ β , ..., m̂γ be the set of all inputs with χα = lm̂ α , χ β = lm̂ β , . . ., χγ = lm̂γ . (Km̂ α , m̂ β , ..., m̂γ is the set of all inputs with the χα characteristic fixed to be lm̂ α , χ β characteristic fixed to be lm̂ β , and so on.) Let pm̂ α , m̂ β , ..., m̂γ be the fraction of inputs k ∈ Km̂ α , m̂ β , ..., m̂γ such that S(k ) = true. And let P be an unordered sequence of all pm̂ α , m̂ β , ..., m̂γ . Then the multivariate group discrimination score with respect to χα , χ β , . . . , χγ , denoted d˜χ α , χ β , ..., χγ (S) is max(P ) − min(P ). Definition 3.4 (Decision software). Let n ∈ N be an input size, let L 1 , L 2 , . . . , Ln be sets of value labels, let X = ⟨χ1 , χ 2 , . . . , χn ⟩ be an input type, and let K be the set of all possible inputs of type X . Decision software is a function S : K → {true, false}. That is, when software S is applied to an input ⟨l 1 ∈ L 1 , l 2 ∈ L 2 , . . . , ln ∈ Ln ⟩, it produces true or false. Our causal discrimination score is a stronger measure of discrimination, as it seeks out causality in software, measuring the fraction of inputs for which changing specific input characteristics causes the output to change [67]. The causal discrimination score identifies changing which characteristics directly affects the output. As a result, for example, while the group and apparent discrimination scores penalize software that gives loans to different fractions of The group discrimination score varies from 0 to 1 and measures the difference between fractions of input groups that lead to the same output (e.g., the difference between the fraction of green and 501 Fairness Testing: Testing Software for Discrimination ESEC/FSE’17, September 4–8, 2017, Paderborn, Germany individuals of different races, the causal discrimination score penalizes software that gives loans to individuals of one race but not to otherwise identical individuals of another race. Algorithm 1: Computing group discrimination. Given a software S and a subset of its input characteristics X ′ , GroupDiscrimination returns d˜X ′ (S), the group discrimination score with respect to X ′ , with confidence conf and error margin ϵ. ⃗ Let Definition 3.7 (Multivariate causal discrimination score d). K be the set of all possible inputs of size n ∈ N of type X = ⟨χ1 , χ 2 , . . . , χn ⟩ over label values L 1 , L 2 , . . . , Ln . Let software S : K → {true, false}. For all α, β, . . . , γ ≤ n, let χα , χ β , . . . , χγ be input characteristics. Then the causal discrimination score with respect to χα , χ β , . . . , χγ , denoted d⃗χ , χ , ..., χ (S) is the fraction of inputs k ∈ K such α β 1 2 3 4 5 γ 6 that there exists an input k ′ ∈ K such that k and k ′ differ only in the input characteristics χ α , χ β , . . . , χγ , and S(k ) , S(k ′ ). That is, the causal discrimination score with respect to χα , χ β , . . . , χγ is the fraction of inputs for which changing at least one of those characteristics causes the output to change. 7 8 9 10 Thus far, we have measured discrimination of the full input domain, considering every possible input with every value of every characteristic. In practice, input domains may be partial. A company may, for example, care about whether software discriminates only with respect to their customers (recall Section 2). Apparent discrimination captures this notion, applying group or causal discrimination score measurement to a subset of the input domain, which can be described by an operational profile [7, 58]. 11 else 12 if S(k ) then count ← count + 1 14 15 if r > sampling_threshold then ▷After sufficient samples, check error margin ▷Current proportion of positive outputs p ← count r q p (1−p ) if conf .zValue < ϵ then r break ▷Achieved error < ϵ , with confidence conf 16 17 18 19 20 21 Having defined discrimination, we now define the problem of checking software for discrimination. 22 ▷Retrieve cached result S(k ) ← RetrieveCached (k ) 13 Definition 3.8 (Multivariate apparent discrimination score). Let K̈ ⊆ K be a subset of the input domain to S. Then the apparent group discrimination score is the group discrimination score applied to K̈, and the apparent causal discrimination score is the causal discrimination score applied to K̈ (as opposed to applied to the full K). maxGroup ← max(maxGroup, p ) minGroup ← min(minGroup, p ) return testSuite, d˜X ′ (S) ← maxGroup − minGroup system will be used. This method does not compute the score’s confidence as it is only as strong as the developers’ confidence that test suite or operational profile is representative of realworld executions. Definition 3.9 (Discrimination checking problem). Given an input type X , decision software S with input type X , and a threshold 0 ≤ θ ≤ 1, compute all X ′ ⊆ X such that d˜X ′ (S) ≥ θ or d⃗X ′ (S) ≥ θ . 4 GroupDiscrimination(S, X ′ , conf , ϵ ) minGroup ← ∞, maxGroup ← 0, testSuite ← ∅ ▷Initialization foreach A, where A is a value assignment for X ′ do r ←0 ▷Initialize number of samples count ← 0 ▷Initialize number of positive outputs while r < max_samples do r ←r +1 k ← NewRandomInput (X ′ ← A) ▷New input k with k .X ′ = A testSuite ← testSuite ∪ {k } ▷Add input to the test suite if notCached (k ) then ▷No cached executions of k exist Compute(S(k )) ▷Evaluate software on input k CacheResult (k, S(k )) ▷Cache the result Measuring group and causal discrimination exactly requires exhaustive testing, which is infeasible for nontrivial software. Solving the discrimination checking problem (Definition 3.9) further requires measuring discrimination over all possible subsets of characteristics to find those that exceed a certain discrimination threshold. Themis addresses these challenges by employing three optimizations: (1) test caching, (2) adaptive, confidence-driven sampling, and (3) sound pruning. All three techniques reduce the number of test cases needed to compute both group and causal discrimination. Section 4.1 describes how Themis employs caching and sampling, and Section 4.2 describes how Themis prunes the test suite search space. THE THEMIS SOLUTION This section describes Themis, our approach to efficient fairness testing. To use Themis, the user provides a software executable, a desired confidence level, an acceptable error bound, and an input schema describing the format of valid inputs. Themis can then be used in three ways: (1) Themis generates a test suite to compute the software group or causal discrimination score for a particular set of characteristics. For example, one can use Themis to check if, and how much, a software system discriminates against race and age. (2) Given a discrimination threshold, Themis generates a test suite to compute all sets of characteristics against which a software group or causally discriminates more than that threshold. (3) Given a manually-written or automatically-generated test suite, or an operational profile describing an input distribution [7, 58], Themis computes the apparent group or causal discrimination score for a particular set of characteristics. For example, one can use Themis to check if a system discriminates against race on a specific population of inputs representative of the way the 4.1 Caching and Approximation GroupDiscrimination (Algorithm 1) and CausalDiscrimination (Algorithm 2) present the Themis computation of multivariate group and causal discrimination scores with respect to a set of characteristics. These algorithms implement Definitions 3.6 and 3.7, respectively, and rely on two optimizations. We first describe these optimizations and then the algorithms. 502 ESEC/FSE’17, September 4–8, 2017, Paderborn, Germany Sainyam Galhotra, Yuriy Brun, and Alexandra Meliou Test caching. Precisely computing the group and causal discrimination scores requires executing a large set of tests. However, a lot of this computation is repetitive: tests relevant to group discrimination are also relevant to causal discrimination, and tests relevant to one set of characteristics can also be relevant to another set. This redundancy in fairness testing allows Themis to exploit caching to reuse test results without re-executing tests. Test caching has low storage overhead and offers significant runtime gains. Algorithm 2: Computing causal discrimination. Given a software S and a subset of its input characteristics X ′ , CausalDiscrimination returns d⃗X ′ (S), the causal discrimination score with respect to X ′ , with confidence conf and error margin ϵ. 1 2 3 Adaptive, confidence-driven sampling. Since exhaustive testing is infeasible, Themis computes approximate group and causal discrimination scores through sampling. Sampling in Themis is adaptive, using the ongoing score computation to determine if a specified margin of error ϵ with a desired confidence level conf has been reached. Themis generates inputs uniformly at random using an input schema, and maintains the proportion of samples (p) for which the software outputs true (in GroupDiscrimination) or for which the software changes its output (in CausalDiscrimination). The margin of error for p is then computed as: r p(1 − p) error = z ∗ r where r is the number of samples so far and z ∗ is the normal distribution z ∗ score for the desired confidence level. Themis returns if error < ϵ, or generates another test otherwise. 4 5 6 7 8 9 10 11 13 14 15 16 17 18 GroupDiscrimination (Algorithm 1) measures the group discrimination score with respect to a subset of its input characteristics X ′ . As per Definition 3.6, GroupDiscrimination fixes X ′ to particular values (line 2) to compute what portion of all tests with X ′ values fixed produce a true output. The while loop (line 5) generates random input assignments for the remaining input characteristics (line 7), stores them in the test suite, and measures the count of positive outputs. The algorithm executes the test, if that execution is not already cached (line 9); otherwise, the algorithm retrieves the software output from the cache (line 12). After passing the minimum sampling threshold (line 16), it checks if ϵ error margin is achieved with the desired confidence (line 18). If it is, GroupDiscrimination terminates the computation for the current group and updates the max and min values (lines 20–21). 19 20 21 22 23 24 25 CausalDiscrimination(S, X ′ , conf , ϵ ) count ← 0; r ← 0, testSuite ← ∅ ▷Initialization while r < max_samples do r ←r +1 k 0 ← NewRandomInput ▷New input without value restrictions testSuite ← testSuite ∪ {k 0 } ▷Add input to the test suite if notCached (k 0 ) then ▷No cached executions of k 0 exist Compute(S(k 0 )) ▷Evaluate software on input k 0 CacheResult (k 0, S(k 0 )) ▷Cache the result else ▷Retrieve cached result S(k 0 ) ← RetrieveCached (k 0 ) foreach k ∈ {k | k , k 0 ; ∀χ < X ′, k . χ = k 0 . χ } do ▷All inputs that match k 0 in every characteristic χ < X ′ testSuite ← testSuite ∪ {k } ▷Add input to the test suite if notCached (k ) then ▷No cached executions of k exist Compute(S(k )) ▷Evaluate software on input k CacheResult (k, S(k )) ▷Cache the result else ▷Retrieve cached result S(k ) ← RetrieveCached (k ) if S(k ) , S(k 0 ) then count = count + 1 break ▷Causal discrimination if r > sampling_threshold then ▷Once we have sufficient samples, check error margin ▷Current proportion of positive outputs p ← count r q p (1−p ) if conf .zValue < ϵ then r break ▷Achieved error < ϵ , with confidence conf return testSuite, d⃗X ′ (S) ← p number of evaluated characteristics subsets. Pruning is based on a fundamental monotonicity property of group and causal discrimination: if a software S discriminates over threshold θ with respect to a set of characteristics X ′ , then S also discriminates over threshold θ with respect to all superset of X ′ . Once Themis discovers that S discriminates against X ′ , it can prune testing all supersets of X ′ . Next, we formally prove group (Theorem 4.1) and causal (Theorem 4.2) discrimination monotonicity. These results guarantee that Themis pruning strategy is sound. DiscriminationSearch (Algorithm 3) uses pruning in solving the discrimination checking problem. As Section 5.4 will evaluate empirically, pruning leads to, on average, a two-to-three order of magnitude reduction in test suite size. CausalDiscrimination (Algorithm 2) similarly applies test caching and adaptive sampling. It takes a random test k 0 (line 4) and tests if changing any of its X ′ characteristics changes the output. If k 0 result is not cached (line 6), the algorithm executes it and caches the result. It then iterates through tests k that differ from k 0 in one or more characteristics in X ′ (line 11). All generated inputs are stored in the test suite. The algorithm typically only needs to examine a small number of tests before discovering causal discrimination for the particular input (line 18). In the end, CausalDiscrimination returns the proportion of tests for which the algorithm found causal discrimination (line 25). Theorem 4.1 (Group discrimination monotonicity). Let X be an input type and let S be a decision software with input type X . Then for all sets of characteristics X ′, X ′′ ⊆ X , X ′′ ⊇ X ′ =⇒ d˜X ′′ (S) ≥ d˜X ′ (S). 4.2 Sound Pruning Measuring software discrimination (Definition 3.9) involves executing GroupDiscrimination and CausalDiscrimination over each subset of the input characteristics. The number of these executions grows exponentially with the number of characteristics. Themis relies on a powerful pruning optimization to dramatically reduce the Proof. Let d˜X ′ (S) = θ ′ . Recall (Definition 3.6) that to compute d˜X ′ (S), we partition the space of all inputs into equivalence classes 503 Fairness Testing: Testing Software for Discrimination ESEC/FSE’17, September 4–8, 2017, Paderborn, Germany the value of at least one characteristic in X ′ changes the output. Consider K ′ , the entire set of such inputs for X ′ , and similarly K ′′ , the entire set of such inputs for X ′′ . Since X ′′ ⊇ X ′ , every input in K ′ must also be in K ′′ because if changing at least one characteristic in X ′ changes the output and those characteristics are also in X ′′ . Therefore, the fraction of such inputs must be no smaller for X ′′ than for X ′ , and therefore, X ′′ ⊇ X ′ =⇒ d⃗X ′′ (S) ≥ d⃗X ′ (S). □ Algorithm 3: Discrimination search. Given a software S with input type X and a discrimination threshold θ , DiscriminationSearch identifies all minimal subsets of characteristics X ′ ⊆ X such that the (group or causal) discrimination score of S with respect to X ′ is greater than θ with confidence conf and error margin ϵ. 1 2 3 4 5 6 7 8 9 10 11 12 13 DiscriminationSearch(S, θ , conf , ϵ ) D←∅ ▷Initialize discriminating subsets of characteristics for i = 1 . . . |X | do foreach X ′ ⊆ X , |X ′ | = i do ▷Check subsets of size i discriminates ← false for X ′′ ∈ D do if X ′′ ⊆ X ′ then ▷Supersets of a discriminating set discriminate (Theorems 4.1 and 4.2) discriminates ← true break A further opportunity for pruning comes from the relationship between group and causal discrimination. As Theorem 4.3 shows, if software group discriminates against a set of characteristics, it must causally discriminate against that set at least as much. Theorem 4.3. Let X be an input type and let S be a decision software with input type X . Then for all sets of characteristics X ′ ⊆ X , d˜X ′ (S) ≤ d⃗X ′ (S). Proof. Let d˜X ′ (S) = θ . Recall (Definition 3.6) that to compute d˜X ′ (S), we partition the space of all inputs into equivalence classes such that all elements in each equivalence class have identical value labels assigned to each characteristic in X ′ . It is evident that same equivalence class inputs have same values for characteristics in X ′ and the ones in different equivalence classes differ in at least one of the characteristics in X ′ . Now, d˜X ′ (S) = θ means that for θ fraction of inputs, the output is true, and after changing just some values of X ′ (producing an input in another equivalence class), the output is false. This is because if there were θ ′ < θ fraction of inputs with a different output when changing the equivalence classes, then d˜X ′ (S) would have been θ ′ . Hence d⃗X ′ (S) > θ . □ if discriminates then continue ▷Do not store X ′ ; D already contains a subset {testSuite, d } = Discrimination(S, X ′, conf , ϵ ) ▷Test S for (group or causal) discrimination with respect to X ′ if d > θ then ▷X ′ is a minimal discriminating set D.append (X ′ ) such that all elements in each equivalence class have identical value labels assigned to each characteristic in X ′ , then, compute the frequencies with which inputs in each equivalence class lead S to a true output, and finally compute the difference between the minimum and maximum of these frequencies. Let p̂ ′ and p̌ ′ be those maximum and minimum frequencies, and K̂ ′ and Ǩ ′ be the corresponding equivalence classes of inputs. Now consider the computation of θ ′′ = d˜X ′′ (S). Note that the equivalence classes of inputs for this computations will be strict subsets of the equivalence classes in the θ ′ computation. In particular, the equivalence subset K̂ ′ will be split into several equivalence classes, which we call K̂ 1′′, K̂ 2′′, . . . There are two possibilities: (1) either the frequency with which the inputs in each of these subclasses lead S to a true output equal the frequency of K̂ ′ , or (2) some subclasses have lower frequencies and some have higher than K̂ ′ (since when combined, they must equal that of K̂ ′ ). Either way, the maximum frequency of the K̂ 1′′, K̂ 2′′, . . . , K̂ j′′ 5 EVALUATION In evaluating Themis, we focused on two research questions: RQ1: Does research on discrimination-aware algorithm design (e.g., [18, 40, 88, 91]) produce fair algorithms? RQ2: How effective do the optimizations from Section 4 make Themis at identifying discrimination in software? To answer these research questions, we carried out three experiments on twenty instances of eight software systems that make financial decisions.1 Seven of the eight systems (seventeen out of the twenty instances) are written by original system developers; we reimplemented one of the systems (three instances) because original source code was not available. Eight of these software instances use standard machine learning algorithms to infer models from datasets of financial and demographic data. These systems make no attempt to avoid discrimination. The other twelve instances are taken from related work on devising discrimination-aware algorithms [18, 40, 88, 91]. These software instances use the same datasets and attempt to infer discrimination-free solutions. Four of them focus on not discriminating against race, and eight against gender. Section 5.1 describes our subject systems and the two datasets they use. subclasses is ≥ K̂ ′ . And therefore, the maximum overall frequency p̂ ′′ for all the equivalence classes in the computation of θ ′′ is ≥ p̂ ′ . By the same argument, the minimum overall frequency p̌ ′′ for all the equivalence classes in the computation of θ ′′ is ≤ p̌ ′ . Therefore, θ ′′ = (p̂ ′′ − p̌ ′′ ) ≥ (p̂ ′ − p̌ ′ ) ≤= θ ′ , and therefore, X ′′ ⊇ X ′ =⇒ d˜X ′′ (S) ≥ d˜X ′ (S). □ Theorem 4.2 (Causal discrimination monotonicity). Let X be an input type and let S be a decision software with input type X . Then for all sets of characteristics X ′, X ′′ ⊆ X , X ′′ ⊇ X ′ =⇒ d⃗X ′′ (S) ≥ d⃗X ′ (S). 1 We use the term system instance to mean instantiation of a software system with a configuration, using a specific dataset. Two instances of the same system using different configurations and different data are likely to differ significantly in their behavior and in their discrimination profile. Proof. Recall (Definition 3.7) that the causal discrimination score with respect to X ′ is the fraction of inputs for which changing 504 ESEC/FSE’17, September 4–8, 2017, Paderborn, Germany Sainyam Galhotra, Yuriy Brun, and Alexandra Meliou 5.1 Subject Software Systems inputs that lead to each output value, and then tweaks the dataset by introducing noise of flipping outputs for some inputs, and by introducing weights for each datapoint [18]. D is a modified decision tree approach that balances the training dataset to equate the number of inputs that lead to each output value, removes and repeats some inputs, and flips output values of inputs close to the decision tree’s decision boundaries, introducing noise around the critical boundaries [91]. Our twenty subject instances use two financial datasets. The Adult dataset (also known as the Census Income dataset)2 contains financial and demographic data for 45K individuals; each individual is described by 14 attributes, such as occupation, number of work hours, capital gains and losses, education level, gender, race, marital status, age, country of birth, income, etc. This dataset is well vetted: it has been used by others to devise discriminationfree algorithms [18, 88, 89], as well as for non-discrimination purposes [3, 43, 86]. The Statlog German Credit dataset3 contains credit data for 1,000 individuals, classifying each individual as having “good” or “bad” credit, and including 20 other pieces of data for each individual, such as gender, housing arrangement, credit history, years employed, credit amount, etc. This dataset is also well vetted: it has been used by others to devise discrimination-free algorithms [18, 89], as well as for non-discrimination purposes [25, 31]. We use a three-parameter naming scheme to refer to our software instances. An example of an instance name is A census race . The “A” refers to the system used to generate the instance (described next). The “census” refers to the dataset used for the system instance. This value can be “census” for the Adult Census Income dataset or “credit” for the Statlog German Credit dataset. Finally, the “race” refers to a characteristic the software instance attempts to not discriminate against. In our evaluation, this value can be “race” or “gender” for the census dataset and can only be “gender” for the credit dataset.4 Some of the systems make no attempt to avoid discrimination and their names leave this part of the label blank. Prior research has attempted to build discrimination-free systems using these two datasets [18, 40, 88, 91]. We contacted the authors and obtained the source code for three of these four systems, A [88], C [18], and D [91], and reimplemented the other, B [40], ourselves. We verified that our reimplementation produced results consistent with the the evaluation of the original system [40]. We additionally used standard machine learning libraries as four more discrimination-unaware software systems E , F , G , and H , on these datasets. We used scikit-learn [68] for E (naive Bayes), G (logistic regression), and H (support vector machines), and a publicly available decision tree implementation [90] for F and for our reimplementation of B . The four discrimination-free software systems use different methods to attempt to reduce or eliminate discrimination: A is a modified logistic regression approach that constrains the regression’s loss function with the covariance of the characteristics’ distributions that the algorithm is asked to be fair with respect to [88]. B is a modified decision tree approach that constrains the splitting criteria by the output characteristic (as the standard decision tree approach does) and also the characteristics that the algorithm is asked to be fair with respect to [40]. C manipulates the training dataset for a naive Bayes classifier. The approach balances the dataset to equate the number of Configuring the subject systems. The income characteristic of the census dataset is binary, representing the income being above or below $50,000. Most prior research developed systems that use the other characteristics to predict the income; we did the same. For the credit dataset, the systems predict if the individual’s credit is “good” or “bad”. We trained each system, separately on the census and credit datasets. Thus, for example, the G credit instance is the logistic-regression-based system trained on the credit dataset. For the census dataset, we randomly sampled 15.5K individuals to balance the number who make more than and less than $50,000, and trained each system on the sampled subset using 13 characteristics to classify each individual as either having above or below $50,000 income. For the credit dataset, we similarly randomly sampled 600 individuals to balance the number with “good” and “bad” credit, and trained each system on the sampled subset using the 20 characteristics to classify each individual’s credit as “good” or “bad”. Each discrimination-aware system can be trained to avoid discrimination against sensitive characteristics. In accord with the prior work on building these systems [18, 40, 88, 91], we chose gender and race as sensitive characteristics. Using all configurations exactly as described in the prior work, we created 3 instances of each discrimination-aware system. For example, for system A , we have A census and A census race , two instances trained on the census gender data to avoid discrimination on gender and race, respectively, and A credit , an instance trained on the credit data to avoid discriminagender tion on gender. The left column of Figure 1 lists the twenty system instances we use as subjects. 5.2 Race and Gender Discrimination We used Themis to measure the group and causal discrimination scores for our twenty software instances with respect to race and, separately, with respect to gender. Figure 1 presents the results. We make the following observations: • • • 2 https://archive.ics.uci.edu/ml/datasets/Adult 3 https://archive.ics.uci.edu/ml/datasets/Statlog+(German+Credit+Data) 4 The credit dataset combines marital status and gender into a single characteristic; we refer to it simply as gender in this paper for exposition. The credit dataset does not include race. 505 Themis is effective. Themis is able to (1) verify that many of the software instances do not discriminate against race and gender, and (2) identify the software that does. Discrimination is present even in instances designed to avoid discrimination. For example, a discrimination-aware decision tree approach trained not to discriminate against gender, B census , had a causal discrimination score over 11%: more gender than 11% of the individuals had the output flipped just by altering the individual’s gender. The causal discrimination score detected critical evidence of discrimination missed by the group score. Often, the group and causal discrimination scores conveyed the same information, but there were cases in which Themis detected causal discrimination even though the group discrimination score was Fairness Testing: Testing Software for Discrimination System Instance A credit gender A census gender A census race B credit gender B census gender B census race C credit gender C census gender C census race D credit gender D census gender D census race E credit E census F credit F census G credit G census H credit H census Race group causal — 3.98% 2.25% 3.80% 3.80% 2.10% 1.13% — 8.90% 0.80% 7.20% 2.30% 38.40% 0.52% 11.27% 2.28% 1.78% — 5.84% 0.35% 5.80% 0.18% 2.91% < 0.01% < 0.01% 0.08% 0.08% — 35.20% 0.23% 34.50% 0.29% 36.55% 2.43% 0.21% 0.26% < 0.01% < 0.01% 0.12% — 0.74% — 0.11% — 0.02% — < 0.01% 0.13% 4.64% 0.32% 0.26% 0.05% < 0.01% 3.94% < 0.01% < 0.01% < 0.01% 4.94% 0.37% 0.32% 0.06% < 0.01% 2.41% < 0.01% < 0.01% < 0.01% 0.85% 0.05% 2.80% 0.01% A census race Gender group causal 3.78% 2.10% ESEC/FSE’17, September 4–8, 2017, Paderborn, Germany B B census race C credit gender C census race d⃗{д,r } = 13.7% d⃗{д,m,r } d⃗{д,r } d⃗{д } d⃗{m } d⃗{r } d⃗{д } d⃗{a } = 77.2% = 52.5% = 11.2% = 36.1% = 36.6% = 5.8% = 7.6% d⃗{a } = 25.9% d⃗{д } = 35.2% d⃗{д,r } = 41.5% C census gender D census gender D census race E census F census G census d⃗{m } = 35.2% d⃗{m } = 12.9% d⃗{c } = 7.6% ⃗ d {m } = 16.2% d⃗{m,r } d⃗{m } d⃗{c,r } d⃗{r,e } = 52.3% = 7.9% = 98.1% = 76.3% d⃗{e } = 14.8% Figure 2: Sets of sensitive characteristics that the subject instances discriminate against causally at least 5% and that contribute to subsets of characteristics that are discriminated against at least 75%. We abbreviate sensitive characteristics as: (a)ge, (c)ountry, (g)ender, (m)arital status, (r)ace, and r(e)lation. Figure 1: The group and causal discrimination scores with respect to race and gender. Some numbers are missing because the credit dataset does not contain information on race. low. For example, for B census , the causal score was more than gender 21× higher than the group score (11.27% vs. 0.52%). • Today’s discrimination-aware approaches are insufficient. The B approach was designed to avoid a variant of group discrimination (as are other discrimination-aware approaches), but this design is, at least in some conditions, insufficient to prevent causal discrimination. Further, focusing on avoiding discriminating against one characteristic may create discrimination against another, e.g., B census limits discrimination against gengender der but discriminates against race with a causal score of 38.40%. • There is no clear evidence that discrimination-aware methods outperform discrimination-unaware ones. In fact, the discrimination-unaware approaches typically discriminated less than their discrimination-aware counterparts, with the exception of logistic regression. 5.3 census gender Computing Discriminated-Against Characteristics To evaluate how effective Themis is at computing the discrimination checking problem (Definition 3.9), we used Themis to compute the sets of characteristics each of the twenty software instances discriminates against causally. For each instance, we first used a threshold of 75% to find all subsets of characteristics against which the instance discriminated. We next examined the discrimination with respect to each of the characterists in those sets individually. Finally, we checked the causal discrimination scores for pairs of those characteristics that are sensitive, as defined by prior work [18, 40, 88, 91] (e.g., race, age, marital status, etc.). For example, if Themis found that an instance discriminated causally against {capital gains, race, marital status}, we checked the causal discrimination score for {capital gains}, {race}, {marital status}, and then {race, marital status}. Figure 2 reports which sensitive characteristics each instance discriminates against by at least 5%. Themis was able to discover significant discrimination. For example, B census discriminates against gender, marital status, and gender race with a causal score of 77.2%. That means for 77.2% of the individuals, changing only the gender, marital status, or race causes the output of the algorithm to flip. Even worse, F census discriminates against country and race with a causal score of 98.1%. It is possible to build an algorithm that appears to be fair with respect to a characteristic in general, but discriminates heavily against that characteristic when the input space is partitioned by another characteristic. For example, an algorithm may give the same fraction of white and black individuals loans, but discriminate against black Canadian individuals as compared to white Canadian individuals. This is the case with B census , for example, as its gender causal discrimination score against gender is 11.2%, but against gender, marital status, and race is 77.2%. Prior work on fairness has not considered this phenomenon, and these findings suggest that the software designed to produce fair results sometimes achieved fairness at the global scale by creating severe discrimination for certain groups of inputs. This experiment demonstrates that Themis effectively discovers discrimination and can test software for unexpected software discrimination effects across a wide variety of input partitions. 5.4 Themis Efficiency and the Pruning Effect Themis uses pruning to minimize test suites (Section 4.2). We evaluated the efficiency improvement due to pruning by comparing the number of test cases needed to achieve the same confidence 506 ESEC/FSE’17, September 4–8, 2017, Paderborn, Germany Group A credit gender A census race B credit gender B census race C credit gender C census race D credit gender D census race E credit E census F credit F census G credit G census H credit H census 934,230 5.6× 167,420 = 7,033,150 = 10, 466 × 672 934,230 274 × 3,413 = 6,230,000 = 78 × 80,100 934,230 113 = 8, 268 × 7,730,120 103 × 75,140 = 934,230 720 = 1, 298 × 7,730,120 1.2× 6,600,462 = 934,230 = 6, 443 × 145 7,730,120 = 92 × 84,040 934,230 = 274 × 3,410 6,123,000 = 13, 282 × 461 934,230 187 = 4, 996 × 7,730,120 1.5× 5,160,125 = 934,230 = 2.3× 412,020 1,530,000 1.3× 1,213,500 = arithmetic mean geometric mean 2, 849 × 151 × Sainyam Galhotra, Yuriy Brun, and Alexandra Meliou DiscriminationSearch(S, θ , conf ), Themis can also prune X ′′ . The same argument holds for group discrimination d.˜ □ Causal 29,623 15,764 215,000 457 29,623 1,636 20,500 6,300 29,623 72 235,625 6,600 29,623 472 235,625 200,528 29,623 82 235,625 7,900 29,623 2,647 205,000 279 29,623 152 235,625 190,725 29,623 10,140 510,000 324,582 = 1.9× We measured this effect by measuring pruning while decreasing the discrimination threshold θ ; decreasing θ effectively simulates increasing system discrimination. We verified that pruning increased when θ decreased (or equivalently, when discrimination increased). For example, Themis needed 3,413 tests to find sets of characteristics that B credit discriminated with a score of more than θ = 0.7, gender but only 10 tests when we reduced θ to 0.6. Similarly, the number of tests for F credit dropped from 920 to 10 when lowering θ from 0.6 to 0.5. This confirms that Themis is more efficient when the benefits of fairness testing increase because the software discriminates more. = 470 × = 18 × = 33 × = 411 × = 36 × = 63 × = 1.2× = 361 × = 30 × = 11 × = 735 × = 195 × = 1.2× = 2.9× = 1.6× 5.5 Discussion In answering our two research questions, we found that (1) Stateof-the-art approaches for designing fair systems often miss discrimination and Themis can detect such discrimination via fairness testing. (2) Themis is effective at finding both group and causal discrimination. While we did not evaluate this directly, Themis can also measure apparent discrimination (Definition 3.8) via a developer-provided test suite or operational profile. (3) Themis employs provably sound pruning to reduce test suite size and becomes more effective for systems that discriminate more. Overall, pruning reduced test suite sizes, on average, two to three orders of magnitude. 148 × 26.4× Figure 3: Pruning greatly reduces the number of tests needed to compute both group and causal discrimination. We present here the computation that is needed for the experiment of Figure 2: finding all subsets of characteristics for which the software instances discriminate with a score of at least 75%, for a 99% confidence and error margin 0.05. For each technique, we show the number of tests needed without pruning divided by the number of tests needed with pruning, and the resulting factor reduction in the number of tests. For example, reducing the number of tests needed to compute the group discrimination score from 7,033,150 to 672 (2nd row) is an improvement of a factor of 10,466. 6 and error bound with and without pruning. Figure 3 shows the number of test cases needed for each of the twenty software instances to achieve a confidence level of 99% and 0.05 error bound, with and without pruning. Pruning reduces the number of test cases by, on average, a factor of 2, 849 for group and 148 for causal discrimination. The more a system discriminates, the more effective pruning is, making Themis more efficient because pruning happens when small sets of characteristics discriminate above the chosen threshold. Such sets enable pruning away larger supersets of characteristics. Theorem 5.1 formalizes this statement. Theorem 5.1 (Pruning monotonicity). Let X be an input type and S and S ′ be decision software with input types X . If for all X ′ ⊆ X , d⃗X ′ (S) ≥ d⃗X ′ (S ′ ) (respectively, d˜X ′ (S) ≥ d˜X ′ (S ′ )), then for all X ′′ ⊆ X , if Themis can prune X ′′ when computing DiscriminationSearch(S ′ , θ, conf , ϵ), then it can also prune X ′′ when computing DiscriminationSearch(S, θ, conf , ϵ). Proof. For Themis to prune X ′′ when computing DiscriminationSearch(S ′ , θ , conf , ϵ), there must exist a set X̂ ′′ ⊊ X ′′ such that d⃗X̂ ′′ (S ′ ) ≥ θ . Since d⃗X̂ ′′ (S) ≥ d⃗X̂ ′′ (S ′ ) ≥ θ , when computing 507 RELATED WORK Software discrimination is a growing concern. Discrimination shows up in many software applications, e.g., advertisements [75], hotel bookings [53], and image search [45]. Yet software is entering domains in which discrimination could result in serious negative consequences, including criminal justice [5, 28], finance [62], and hiring [71]. Software discrimination may occur unintentionally, e.g., as a result of implementation bugs, as an unintended property of self-organizing systems [11, 13, 15, 16], as an emergent property of component interaction [12, 14, 17, 49], or as an automatically learned property from biased data [18, 19, 39–42, 88, 89, 91]. Some prior work on measuring fairness in machine learning classifiers has focused on the Calders-Verwer (CV) score [19] to measure discrimination [18, 19, 39–42, 87–89, 91]. Our group discrimination score generalizes the CV score to the software domain with more complex inputs. Our causal discrimination score goes beyond prior work by measuring causality [67]. An alternate definition of discrimination is that a “better” input is never deprived of the “better” output [24]. That definition requires a domain expert to create a distance function for comparing inputs; by contrast, our definitions are simpler, more generally applicable, and amenable to optimization techniques, such as pruning. Reducing discrimination (CV score) in classifiers [18, 40, 88, 91], as our evaluation has shown, often fails to remove causal discrimination and discrimination against certain groups. By contrast, our work does not attempt to remove discrimination but offers developers a tool to identify and measure discrimination, a critical first step in removing it. Problem-specific discrimination measures, e.g., the contextual Fairness Testing: Testing Software for Discrimination ESEC/FSE’17, September 4–8, 2017, Paderborn, Germany bandits problem, have demonstrated that fairness may result in otherwise suboptimal behavior [38]. By contrast, our work is general and we believe that striving for fairness may be a principal requirement in a system’s design. Counterfactual fairness requires output probability distributions to match for input populations that differ only in the label value of a sensitive input characteristic [51]. Counterfactual fairness is related to causal fairness but can miss some instances of discrimination, e.g., if loan shows preferential treatment for some purple inputs, but at the same time against some other similar purple inputs. FairTest, an implementation of the unwarranted associations framework [79] uses manually written tests to measure four kinds of discrimination scores: the CV score and a related ratio, mutual information, Pearson correlation, and a regression between the output and sensitive inputs. By contrast, our approach generates tests automatically and measures causal discrimination. Causal testing computes pairs of similar inputs whose outputs differ. However, input characteristics may correlate, e.g., education correlates with age, so perturbing some characteristics without perturbing others may create inputs not representative of the real world. FairML [1] uses orthogonal projection to co-perturb characteristics, which can mask some discrimination, but find discrimination that is more likely to be observed in real-world scenarios, somewhat analogously to our apparent discrimination measure. Combinatorial testing minimizes the number of tests needed to explore certain combinations of input characteristics. For example, all-pairs testing generates tests that evaluate every possible value combination for every pair of input characteristics, which can be particularly helpful when testing software product lines [6, 44, 46, 47]. The number of tests needed to evaluate every possible value pair can be significantly smaller than the exhaustive testing alternative since each test can simultaneously contribute to multiple value pairs [22, 44, 80]. Such combinatorial testing optimizations are complementary to our work on discrimination testing. Our main goal is to develop a method to process test executions to measure software discrimination, whereas that is not a goal of combinatorial testing. Advances in combinatorial testing, e.g., using static or dynamic analyses for vacuity testing [8, 33] or to identify configuration options that cannot affect a test’s output [48], can directly improve efficiency of discrimination testing by identifying that changing a particular input characteristic cannot affect a particular test’s output, and thus no causal discrimination is possible with respect to that particular input. We leave such optimizations to future work. It is possible to test for discrimination software without explicit access to it. For example, AdFisher [23] collects information on how changes in Google ad settings and prior visited webpages affect the ads Google serves. AdFisher computes a variant of group discrimination, but it could be integrated with Themis and its algorithms to measure causal discrimination. Themis measures apparent discrimination by either executing a provided test suite, or by generating a test suite following a provided operational profile. Operational profiles [58] describe the input distributions likely to be observed in the field. Because developer-written test suites are often not as representative of field executions as developers would like [81], operational profiles can significantly improve the effectiveness of testing by more accurately representing real-world system use [7, 50] and the use of operational profiles has been shown to more accurately measure system properties, such as reliability [35]. The work on operational profiles is complementary to ours: Themis uses operational profiles and work on more efficient test generation from operational profiles can directly benefit discrimination testing. Meanwhile no prior work on operational profile testing has measured software discrimination. Causal relationships in data management systems [54, 55] can help explain query results [57] and debug errors [82–84] by tracking and using data provenance [56]. For software systems that use data management, such provenance-based reasoning may aid testing for causal relationships between input characteristics and outputs. Our prior work on testing software that relies on data management systems has focused on data errors [59, 60], whereas this work focuses on testing fairness. Automated testing research has produced tools to generate tests, including random testing, such as Randoop [63, 64], NightHawk [4], JCrasher [20], CarFast [65], and T3 [69]; search-based testing, such as EvoSuite [29], TestFul [9], and eToc [78]; dynamic symbolic execution tools, such as DSC [37], Symbolic PathFinder [66], jCUTE [70], Seeker [76], Symstra [85], and Pex [77], among others; and commercial tools, such as Agitar [2]. The goal of the generated tests is typically finding bugs [29] or generating specifications [21]. These tools deal with more complex input spaces than Themis, but none of them focus on testing fairness and they require oracles whereas Themis does not need oracles as it measures discrimination by comparing tests’ outputs. Future work could extend these tools to generate fairness tests, modifying test generation to produce pairs of inputs that differ only in the input characteristics being tested. While prior work has tackled the oracle problem [10, 26, 30] typically using inferred pre- and post-conditions or documentation, our oracle is more precise and easier to compute, but is only applicable to fairness testing. 7 CONTRIBUTIONS We have formally defined software fairness testing and introduced a causality-based measure of discrimination. We have further described Themis, an approach and its open-source implementation for measuring discrimination in software and for generating efficient test suites to perform these measurements. Our evaluation demonstrates that discrimination in software is common, even when fairness is an explicit design goal, and that fairness testing is critical to measuring discrimination. Further, we formally prove soundness of our approach and show that Themis effectively measures discriminations and produces efficient test suites to do so. With the current use of software in society-critical ways, fairness testing research is becoming paramount, and our work presents an important first step in merging testing techniques with software fairness requirements. ACKNOWLEDGMENT This work is supported by the National Science Foundation under grants no. CCF-1453474, IIS-1453543, and CNS-1744471. 508 ESEC/FSE’17, September 4–8, 2017, Paderborn, Germany Sainyam Galhotra, Yuriy Brun, and Alexandra Meliou REFERENCES [26] Michael D. Ernst, Alberto Goffi, Alessandra Gorla, and Mauro Pezzè. Automatic generation of oracles for exceptional behaviors. In International Symposium on Software Testing and Analysis (ISSTA), pages 213–224, Saarbrücken, Genmany, July 2016. [27] Executive Office of the President. Big data: A report on algorithmic systems, opportunity, and civil rights. https://www.whitehouse.gov/sites/default/files/ microsites/ostp/2016_0504_data_discrimination.pdf, May 2016. [28] Katelyn Ferral. Wisconsin supreme court allows state to continue using computer program to assist in sentencing. The Capital Times, July 13, 2016. http://host.madison.com/ct/news/local/govt-and-politics/ wisconsin-supreme-court-allows-state-to-continue-using-computer-program/ article_7eb67874-bf40-59e3-b62a-923d1626fa0f.html. [29] Gordon Fraser and Andrea Arcuri. Whole test suite generation. IEEE Transactions on Software Engineering (TSE), 39(2):276–291, February 2013. [30] Gordon Fraser and Andreas Zeller. Generating parameterized unit tests. In International Symposium on Software Testing and Analysis (ISSTA), pages 364–374, Toronto, ON, Canada, 2011. [31] Jesus A. Gonzalez, Lawrence B. Holder, and Diane J. Cook. Graph-based relational concept learning. In International Conference on Machine Learning (ICML), pages 219–226, Sydney, Australia, 2002. [32] Noah J. Goodall. Can you program ethics into a self-driving car? IEEE Spectrum, 53(6):28–58, June 2016. [33] Luigi Di Guglielmo, Franco Fummi, and Graziano Pravadelli. Vacuity analysis for property qualification by mutation of checkers. In Design, Automation Test in Europe Conference Exhibition (DATE), pages 478–483, March 2010. [34] Erico Guizzo and Evan Ackerman. When robots decide to kill. IEEE Spectrum, 53(6):38–43, June 2016. [35] Herman Hartmann. A statistical analysis of operational profile driven testing. In International Conference on Software Quality, Reliability, and Security Companion (QRS-C), pages 109–116, Viena, Austria, August 2016. [36] David Ingold and Spencer Soper. Amazon doesn’t consider the race of its customers. Should it? Bloomberg, April 21, 2016. http://www.bloomberg.com/ graphics/2016-amazon-same-day. [37] Mainul Islam and Christoph Csallner. Dsc+Mock: A test case + mock class generator in support of coding against interfaces. In International Workshop on Dynamic Analysis (WODA), pages 26–31, Trento, Italy, 2010. [38] Matthew Joseph, Michael Kearns, Jamie Morgenstern, and Aaron Roth. Fairness in learning: Classic and contextual bandits. CoRR, abs/1207.0016, 2012. https: //arxiv.org/abs/1605.07139. [39] Faisal Kamiran and Toon Calders. Classifying without discriminating. In International Conference on Computer, Control, and Communication (IC4), pages 1–6, Karachi, Pakistan, February 2009. [40] Faisal Kamiran, Toon Calders, and Mykola Pechenizkiy. Discrimination aware decision tree learning. In International Conference on Data Mining (ICDM), pages 869–874, Sydney, Australia, December 2010. [41] Faisal Kamiran, Asim Karim, and Xiangliang Zhang. Decision theory for discrimination-aware classification. In International Conference on Data Mining (ICDM), pages 924–929, Brussels, Belgium, December 2012. [42] Toshihiro Kamishima, Shotaro Akaho, Hideki Asoh, and Jun Sakuma. Fairnessaware classifier with prejudice remover regularizer. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases (ECML PKDD), pages 35–50, Bristol, England, UK, September 2012. [43] Wei-Chun Kao, Kai-Min Chung, Chia-Liang Sun, and Chih-Jen Lin. Decomposition methods for linear support vector machines. Neural Computation, 16(8):1689– 1704, August 2004. [44] Christian Kästner, Alexander von Rhein, Sebastian Erdweg, Jonas Pusch, Sven Apel, Tillmann Rendel, and Klaus Ostermann. Toward variability-aware testing. In International Workshop on Feature-Oriented Software Development (FOSD), pages 1–8, Dresden, Germany, 2012. [45] Matthew Kay, Cynthia Matuszek, and Sean A. Munson. Unequal representation and gender stereotypes in image search results for occupations. In Conference on Human Factors in Computing Systems (CHI), pages 3819–3828, Seoul, Republic of Korea, 2015. [46] Chang Hwan Peter Kim, Don S. Batory, and Sarfraz Khurshid. Reducing combinatorics in testing product lines. In International Conference on Aspect-Oriented Software Development (AOST), pages 57–68, Porto de Galinhas, Brazil, 2011. [47] Chang Hwan Peter Kim, Sarfraz Khurshid, and Don Batory. Shared execution for efficiently testing product lines. In International Symposium on Software Reliability Engineering (ISSRE), pages 221–230, November 2012. [48] Chang Hwan Peter Kim, Darko Marinov, Sarfraz Khurshid, Don Batory, Sabrina Souto, Paulo Barros, and Marcelo D’Amorim. SPLat: Lightweight dynamic analysis for reducing combinatorics in testing configurable systems. In European Software Engineering Conference and ACM SIGSOFT International Symposium on Foundations of Software Engineering (ESEC/FSE), pages 257–267, Saint Petersburg, Russia, 2013. [49] Ivo Krka, Yuriy Brun, George Edwards, and Nenad Medvidovic. Synthesizing partial component-level behavior models from system specifications. In European Software Engineering Conference and ACM SIGSOFT International Symposium on Foundations of Software Engineering (ESEC/FSE), pages 305–314, Amsterdam, The [1] Julius Adebayo and Lalana Kagal. Iterative orthogonal feature projection for diagnosing bias in black-box models. CoRR, abs/1611.04967, 2016. [2] Agitar Technologies. AgitarOne. http://www.agitar.com/solutions/products/ automated_junit_generation.html, 2016. [3] Rakesh Agrawal, Ramakrishnan Srikant, and Dilys Thomas. Privacy-preserving OLAP. In ACM SIGMOD International Conference on Management of Data (SIGMOD), pages 251–262, Baltimore, MD, USA, 2005. [4] James H. Andrews, Felix C. H. Li, and Tim Menzies. Nighthawk: A two-level genetic-random unit test data generator. In International Conference on Automated Software Engineering (ASE), pages 144–153, Atlanta, GA, USA, 2007. [5] Julia Angwin, Jeff Larson, Surya Mattu, and Lauren Kirchner. Machine bias. ProPublica, May 23, 2016. https://www.propublica.org/article/ machine-bias-risk-assessments-in-criminal-sentencing. [6] Sven Apel, Alexander von Rhein, Philipp Wendler, Armin Größlinger, and Dirk Beyer. Strategies for product-line verification: Case studies and experiments. In International Conference on Software Engineering (ICSE), pages 482–491, San Francisco, CA, USA, 2013. [7] Andrea Arcuri and Lionel Briand. A practical guide for using statistical tests to assess randomized algorithms in software engineering. In ACM/IEEE International Conference on Software Engineering (ICSE), pages 1–10, Honolulu, HI, USA, 2011. [8] Thomas Ball and Orna Kupferman. Vacuity in testing. In International Conference on Tests and Proofs (TAP), pages 4–17, Prato, Italy, April 2008. [9] Luciano Baresi, Pier Luca Lanzi, and Matteo Miraz. TestFul: An evolutionary test approach for Java. In International Conference on Software Testing, Verification, and Validation (ICST), pages 185–194, Paris, France, April 2010. [10] Earl T. Barr, Mark Harman, Phil McMinn, Muzammil Shahbaz, and Shin Yoo. The oracle problem in software testing: A survey. IEEE Transactions on Software Engineering (TSE), 41(5):507–525, May 2015. [11] Yuriy Brun, Ron Desmarais, Kurt Geihs, Marin Litoiu, Antonia Lopes, Mary Shaw, and Mike Smit. A design space for adaptive systems. In Rogério de Lemos, Holger Giese, Hausi A. Müller, and Mary Shaw, editors, Software Engineering for Self-Adaptive Systems II, volume 7475, pages 33–50. Springer-Verlag, 2013. [12] Yuriy Brun, George Edwards, Jae young Bang, and Nenad Medvidovic. Smart redundancy for distributed computation. In International Conference on Distributed Computing Systems (ICDCS), pages 665–676, Minneapolis, MN, USA, June 2011. [13] Yuriy Brun and Nenad Medvidovic. An architectural style for solving computationally intensive problems on large networks. In Software Engineering for Adaptive and Self-Managing Systems (SEAMS), Minneapolis, MN, USA, May 2007. [14] Yuriy Brun and Nenad Medvidovic. Fault and adversary tolerance as an emergent property of distributed systems’ software architectures. In International Workshop on Engineering Fault Tolerant Systems (EFTS), pages 38–43, Dubrovnik, Croatia, September 2007. [15] Yuriy Brun and Nenad Medvidovic. Keeping data private while computing in the cloud. In International Conference on Cloud Computing (CLOUD), pages 285–294, Honolulu, HI, USA, June 2012. [16] Yuriy Brun and Nenad Medvidovic. Entrusting private computation and data to untrusted networks. IEEE Transactions on Dependable and Secure Computing (TDSC), 10(4):225–238, July/August 2013. [17] Yuriy Brun, Jae young Bang, George Edwards, and Nenad Medvidovic. Selfadapting reliability in distributed software systems. IEEE Transactions on Software Engineering (TSE), 41(8):764–780, August 2015. [18] Toon Calders, Faisal Kamiran, and Mykola Pechenizkiy. Building classifiers with independency constraints. In Proceedings of the 2009 IEEE International Conference on Data Mining (ICDM) Workshops, pages 13–18, Miami, FL, USA, December 2009. [19] Toon Calders and Sicco Verwer. Three naive Bayes approaches for discriminationfree classification. Data Mining and Knowledge Discovery, 21(2):277–292, 2010. [20] Christoph Csallner and Yannis Smaragdakis. JCrasher: An automatic robustness tester for Java. Software Practice and Experience, 34(11):1025–1050, September 2004. [21] Valentin Dallmeier, Nikolai Knopp, Christoph Mallon, Gordon Fraser, Sebastian Hack, and Andreas Zeller. Automatically generating test cases for specification mining. IEEE Transactions on Software Engineering (TSE), 38(2):243–257, March 2012. [22] Marcelo d’Amorim, Steven Lauterburg, and Darko Marinov. Delta execution for efficient state-space exploration of object-oriented programs. In International Symposium on Software Testing and Analysis (ISSTA), pages 50–60, London, UK, 2007. [23] Amit Datta, Michael Carl Tschantz, and Anupam Datta. Automated experiments on ad privacy settings. Proceedings on Privacy Enhancing Technologies (PoPETs), 1:92–112, 2015. [24] Cynthia Dwork, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Richard Zemel. Fairness through awareness. In Innovations in Theoretical Computer Science Conference (ITCS), pages 214–226, Cambridge, MA, USA, August 2012. [25] Jeroen Eggermont, Joost N. Kok, and Walter A. Kosters. Genetic programming for data classification: Partitioning the search space. In ACM Symposium on Applied Computing (SAC), pages 1001–1005, Nicosia, Cyprus, 2004. 509 Fairness Testing: Testing Software for Discrimination ESEC/FSE’17, September 4–8, 2017, Paderborn, Germany Netherlands, August 2009. [50] K. Saravana Kumar and Ravindra Babu Misra. Software operational profile based test case allocation using fuzzy logic. International Journal of Automation and Computing, 4(4):388–395, 2007. [51] Matt J. Kusner, Joshua R. Loftus, Chris Russell, and Ricardo Silva. Counterfactual fairness. CoRR, abs/1703.06856, 2017. [52] Rafi Letzter. Amazon just showed us that ‘unbiased’ algorithms can be inadvertently racist. TECH Insider, April 21, 2016. http://www.techinsider.io/ how-algorithms-can-be-racist-2016-4. [53] Dana Mattioli. On Orbitz, Mac users steered to pricier hotels. The Wall Street Journal, August 23, 2012. http://www.wsj.com/articles/ SB10001424052702304458604577488822667325882. [54] Alexandra Meliou, Wolfgang Gatterbauer, Joseph Y. Halpern, Christoph Koch, Katherine F. Moore, and Dan Suciu. Causality in databases. IEEE Data Engineering Bulletin, 33(3):59–67, 2010. [55] Alexandra Meliou, Wolfgang Gatterbauer, Katherine F. Moore, and Dan Suciu. The complexity of causality and responsibility for query answers and nonanswers. Proceedings of the VLDB Endowment (PVLDB), 4(1):34–45, 2010. [56] Alexandra Meliou, Wolfgang Gatterbauer, and Dan Suciu. Bringing provenance to its full potential using causal reasoning. In 3rd USENIX Workshop on the Theory and Practice of Provenance (TaPP), Heraklion, Greece, June 2011. [57] Alexandra Meliou, Sudeepa Roy, and Dan Suciu. Causality and explanations in databases. Proceedings of the VLDB Endowment (PVLDB), 7(13):1715–1716, 2014. (tutorial presentation). [58] John D. Musa. Operational profiles in software-reliability engineering. IEEE Software, 10(2):14–32, March 1993. [59] Kıvanç Muşlu, Yuriy Brun, and Alexandra Meliou. Data debugging with continuous testing. In Proceedings of the New Ideas Track at the 9th Joint Meeting of the European Software Engineering Conference and ACM SIGSOFT Symposium on the Foundations of Software Engineering (ESEC/FSE), pages 631–634, Saint Petersburg, Russia, August 2013. [60] Kıvanç Muşlu, Yuriy Brun, and Alexandra Meliou. Preventing data errors with continuous testing. In Proceedings of the ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA), pages 373–384, Baltimore, MD, USA, July 2015. [61] Satya Nadella. The partnership of the future. Slate, June 28, 2016. http: //www.slate.com/articles/technology/future_tense/2016/06/microsoft_ceo_ satya_nadella_humans_and_a_i_can_work_together_to_solve_society.html. [62] Parmy Olson. The algorithm that beats your bank manager. CNN Money, March 15, 2011. http://www.forbes.com/sites/parmyolson/2011/03/15/ the-algorithm-that-beats-your-bank-manager/#cd84e4f77ca8. [63] Carlos Pacheco and Michael D. Ernst. Randoop: Feedback-directed random testing for Java. In Conference on Object-oriented Programming Systems and Applications (OOPSLA), pages 815–816, Montreal, QC, Canada, 2007. [64] Carlos Pacheco, Shuvendu K. Lahiri, Michael D. Ernst, and Thomas Ball. Feedbackdirected random test generation. In ACM/IEEE International Conference on Software Engineering (ICSE), pages 75–84, Minneapolis, MN, USA, May 2007. [65] Sangmin Park, B. M. Mainul Hossain, Ishtiaque Hussain, Christoph Csallner, Mark Grechanik, Kunal Taneja, Chen Fu, and Qing Xie. CarFast: Achieving higher statement coverage faster. In Symposium on the Foundations of Software Engineering (FSE), pages 35:1–35:11, Cary, NC, USA, 2012. [66] Corina S. Păsăreanu and Neha Rungta. Symbolic PathFinder: Symbolic execution of Java bytecode. In International Conference on Automated Software Engineering (ASE), pages 179–180, Antwerp, Belgium, 2010. [67] Judea Pearl. Causal inference in statistics: An overview. Statistics Surveys, 3:96–146, 2009. [68] Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, Jake Vanderplas, Alexandre Passos, David Cournapeau, Matthieu Brucher, Matthieu Perrot, and Édouard Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011. [69] I. S. Wishnu B. Prasetya. Budget-aware random testing with T3: Benchmarking at the SBST2016 testing tool contest. In International Workshop on Search-Based Software Testing (SBST), pages 29–32, Austin, TX, USA, 2016. [70] Koushik Sen and Gul Agha. CUTE and jCUTE: Concolic unit testing and explicit path model-checking tools. In International Conference on Computer Aided Verification (CAV), pages 419–423, Seattle, WA, USA, 2006. [71] Aarti Shahani. Now algorithms are deciding whom to hire, based on voice. NPR All Things Considered, March 2015. [72] Spencer Soper. Amazon to bring same-day delivery to Bronx, Chicago after outcry. Bloomberg, May 1, 2016. http://www.bloomberg.com/news/articles/2016-05-01/ amazon-pledges-to-bring-same-day-delivery-to-bronx-after-outcry. [73] Spencer Soper. Amazon to bring same-day delivery to Roxbury after outcry. Bloomberg, April 26, 2016. http://www.bloomberg.com/news/articles/2016-04-26/ amazon-to-bring-same-day-delivery-to-roxbury-after-outcry. [74] Eliza Strickland. Doc bot preps for the O.R. IEEE Spectrum, 53(6):32–60, June 2016. [75] Latanya Sweeney. Discrimination in online ad delivery. Communications of the ACM (CACM), 56(5):44–54, May 2013. [76] Suresh Thummalapenta, Tao Xie, Nikolai Tillmann, Jonathan de Halleux, and Zhendong Su. Synthesizing method sequences for high-coverage testing. In International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA), pages 189–206, Portland, OR, USA, 2011. [77] Nikolai Tillmann and Jonathan De Halleux. Pex: White box test generation for .NET. In International Conference on Tests and Proofs (TAP), pages 134–153, Prato, Italy, 2008. [78] Paolo Tonella. Evolutionary testing of classes. In International Symposium on Software Testing and Analysis (ISSTA), pages 119–128, Boston, MA, USA, 2004. [79] Florian Tramer, Vaggelis Atlidakis, Roxana Geambasu, Daniel Hsu, Jean-Pierre Hubaux, Mathias Humbert, Ari Juels, , and Huang Lin. FairTest: Discovering unwarranted associations in data-driven applications. In IEEE European Symposium on Security and Privacy (EuroS&P), Paris, France, April 2017. [80] Alexander von Rhein, Sven Apel, and Franco Raimondi. Introducing binary decision diagrams in the explicit-state verification of Java code. In The Java Pathfinder Workshop (JPF), Lawrence, KS, USA, November 2011. [81] Qianqian Wang, Yuriy Brun, and Alessandro Orso. Behavioral execution comparison: Are tests representative of field behavior? In International Conference on Software Testing, Verification, and Validation (ICST), Tokyo, Japan, March 2017. [82] Xiaolan Wang, Xin Luna Dong, and Alexandra Meliou. Data X-Ray: A diagnostic tool for data errors. In International Conference on Management of Data (SIGMOD), 2015. [83] Xiaolan Wang, Alexandra Meliou, and Eugene Wu. QFix: Demonstrating error diagnosis in query histories. In International Conference on Management of Data (SIGMOD), pages 2177–2180, 2016. (demonstration paper). [84] Xiaolan Wang, Alexandra Meliou, and Eugene Wu. QFix: Diagnosing errors through query histories. In International Conference on Management of Data (SIGMOD), 2017. [85] Tao Xie, Darko Marinov, Wolfram Schulte, and David Notkin. Symstra: A framework for generating object-oriented unit tests using symbolic execution. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS), pages 365–381, Edinburgh, Scotland, UK, 2005. [86] Bianca Zadrozny. Learning and evaluating classifiers under sample selection bias. In International Conference on Machine Learning (ICML), pages 114–121, Banff, AB, Canada, 2004. [87] Muhammad Bilal Zafar, Isabel Valera, Manuel Gomez Rodriguez, and Krishna P. Gummadi. Fairness constraints: A mechanism for fair classification. In Fairness, Accountability, and Transparency in Machine Learning (FAT ML), Lille, France, July 2015. [88] Muhammad Bilal Zafar, Isabel Valera, Manuel Gomez Rodriguez, and Krishna P Gummadi. Learning fair classifiers. CoRR, abs/1507.05259, 2015. [89] Richard Zemel, Yu (Ledell) Wu, Kevin Swersky, Toniann Pitassi, and Cynthia Dwork. Learning fair representations. In International Conference on Machine Learning (ICML), published in JMLR W&CP: 28(3):325–333), Atlanta, GA, USA, June 2013. [90] Farhang Zia. GitHub repository for the decision tree classifier project. https: //github.com/novaintel/csci4125/tree/master/Decision-Tree, 2014. [91] Indre Žliobaite, Faisal Kamiran, and Toon Calders. Handling conditional discrimination. In International Conference on Data Mining (ICDM), pages 992–1001, Vancouver, BC, Canada, December 2011. 510
2cs.AI
arXiv:1802.08115v1 [cs.CE] 11 Feb 2018 Novel differential quadrature element method for higher order strain gradient elasticity theory Md Ishaquddin∗, S.Gopalakrishnan† Department of Aerospace Engineering,Indian Institute of Science Bengaluru 560012, India Abstract In this paper, we propose a novel and efficient differential quadrature element based on Lagrange interpolation to solve a sixth order partial differential equations encountered in non-classical beam theories. These non-classical theories render displacement, slope and curvature as degrees of freedom for an Euler-Bernoulli beam. A generalize scheme is presented herein to implementation the multi-degrees degrees of freedom associated with these non-classical theories in a simplified and efficient way. The proposed element has displacement as the only degree of freedom in the domain, whereas, at the boundaries it has displacement, slope and curvature. Further, we extend this methodology and formulate two novel versions of plate element for gradient elasticity theory. In the first version, Lagrange interpolation is assumed in x and y directions and the second version is based on mixed interpolation, with Lagrange interpolation in x direction and Hermite interpolation in y direction. The procedure to compute the modified weighting coefficients by incorporating the classical and non-classical boundary conditions is explained. The efficiency of the proposed elements is demonstrated through numerical examples on static analysis of gradient elastic beams and plates for different boundary conditions. Keywords: Differential quadrature element, gradient elasticity, sixth order pde, weighting coefficients, non-classical, Lagrange interpolation, Lagrange-Hermite mixed interpolation ∗ † Corresponding author: E-mail address: [email protected] E-mail address: [email protected]; Phone: +91-80-22932048 1 1.0 INTRODUCTION The differential quadrature method (DQM) is an efficient numerical tool for the solution of initial and boundary value problems. This technique was first introduced by Bellman et al. [1]. The major challenge in the application of DQM to structural problems is the implementation of multiple boundary conditions. To resolve this issue, many efficient and improved DQ schemes were developed in recent years. A comprehensive survey on the DQM development and the recent contributions to this field can be found in [2–4]. Bert et al. proposed a δ - method to solve problems in structural mechanics [5, 6]. Subsequent developments in this technique led to the application of this methodology to variety of problems [7–12]. As this method could not be generalized and had limitations on accuracy, an alternative scheme was proposed which accounted boundary conditions during the formulation of weighting coefficients [13]. However, this method also could not be generalized and worked only for few specific types of boundary conditions and structures with constrained regular edges. Further improvement in these schemes were discussed in the articles by Du et al. [14, 15]. To address the difficulties in applying the DQ method for structures with discontinuous loading and geometry, Striz et al. [16, 17] developed a quadrature element method (QEM), however, due to the use of δ - technique the scope of this method was limited. Later, Wang et al. [18] and Chen et al. [12] proposed a differential quadrature element method (DQEM) which assumes the slope as an independent degree of freedom at the boundary. The main advantage of this method is only one grid point is required to represent the multiple degrees of freedom at the boundary. Further improvement in this field led to the development of a new method called the generalized differential quadrature rule (GDQR) [19–21]. Following this many researchers applied DEQM and GDQR techniques to variety of structural problems [22–29]. In the above DQEM and GDQR techniques, Hermit interpolation functions were used to determine the weighting coefficients. In contrast, Wang et al. [28] employed the weighting coefficients based on Lagrange interpolation functions. The research inclination in the aforesaid publications was towards the solution of fourth order partial differential equations which governs the problems related to classical beam and plate theories. The DQ solution for the sixth and eighth order differential equations using GDQR technique with Hermite interpolation function was reported by Wu et al. [30,31]. They have demonstrated the capability for structural and fluid mechanics problems. Recently, Wang et al. [32] proposed a new differential quadrature element based on Hermite interpolation to solve a sixth order partial differential equation governing the non-local Euler-Bernoulli beam. In their study, they have 2 computed the frequencies for various combination of boundary conditions. The classical continuum theories are effective for macro scale modelling of structural elements, neverthless, they lack efficiency to model the nano scale systems. These classical theories are governed by fourth order partial differential equations. To overcome this difficulty, several scale-dependent non-classical continuum theories are reported in the literature [33–37]. These non-classical continuum theories are enriched versions of classical continuum theories incorporating higher order terms in the constitutive relations. These higher order terms consists of stress and strain gradients accompanied with intrinsic length scale parameters which account for scale effects [38–41]. One such class of gradient elasticity theory is the simplified theory by Mindlin et al. [33], with one gradient elastic modulus and two classical constants for structural applications. This simplified theory was used by many researchers to study static, dynamic and buckling behaviour of gradient elastic beams [42–46] and plates [47–49], by deriving the analytical solutions. Recently, Pegios et.al [50] developed a finite element model for gradient elastic Euler-Bernoulli beam and conducted static and stability analysis. The numerical solution of 2-D and 3-D gradient elastic structural problems using finite element and boundary element methods can be found in [51]. In this paper, we propose for the first time a novel differential quadrature beam element based on Lagrange interpolation to solve a sixth order partial differential equation associated with gradient elastic Euler-Bernoulli beam theory. Further, we extend this methodology and formulate two novel versions of plate element for gradient elastic Kirchhoff plate theory. In the first version, the Lagrange interpolations are used in both x and y direction, and later, mixed-interpolations are used with Lagrange interpolations in x direction and C 2 continuous Hermite in y direction. A novel way to impose the classical and non-classical boundary conditions for gradient elastic beam and plate elements are presented. A new procedure to compute the higher order weighting coefficients for the proposed elements are explained in detail. The efficiency and the performance of the elements are established through numerical examples. 1 Strain gradient elasticity theory Mindlin’s [33] strain gradient micro-elasticity theory with two classical and one non-classical material constants is consider in the present study. The 0 two classical material constants are Lame constants and the non-classical one is related to intrinsic bulk length g. In what follows, the theoretical basis required to formulate the differential quadrature beam and plate ele3 ment for gradient elasticity theory are presented. Further, the classical and non-classical boundary conditions associated with the gradient elastic EulerBernoulli beam and Kirchhoff plate are discussed. 1.1 Gradient elastic Euler-Bernoulli beam The stress-strain relations for 1-D gradient elastic theory are defined as [44, 52] τ = 2 µ ε + λ trε I ς = g 2 [2 µ ∇ε + λ ∇(trε) I] (1) 0 ∂ ∂ where, λ, µ are Lame constants.∇ = ∂x + ∂y is the Laplacian operator and I is the unit tensor. τ , ς denotes Cauchy and higher order stress respectively, ε and (tr ε) are the classical strain and its trace which are expressed in terms of displacement vector w as: 1 ε = (∇w + w∇) , 2 trε = ∇w (2) It follows from the above equations the constitutive relations for an EulerBernoulli gradient beam can be stated as τx = Eεx , 0 ςx = g 2 εx , εx = −z ∂ 2 w(x, t) ∂x2 (3) For the above state of stress and strain the strain energy expression in terms of displacement can be written as Z  00  1 L 000 Ub = EI (w )2 + g 2 (w )2 dx (4) 2 0 The potential energy of the applied load is given by Z L  L   0 L 00 L Vb = qb (x)wdx + V w 0 − M w 0 − M̄ w 0 (5) 0 The total potential energy of the beam is given by Πb = Ub + Vb (6) where, E, A and I are the Young’s modulus, area, moment of inertia, respectively. qb and w(x, t) are the transverse load and displacement of the beam. V , M and M̄ are shear force, bending moment and higher order moment acting on the beam. 4 Using the principle of minimum potential energy [55]: δΠb = δ(Ub + Vb ) = 0 (7) and performing integration by parts, we get the governing equation for a gradient elastic Euler-Bernoulli beam as EI(w080 − g 2 w800 ) + qb = 0 (8) and the associated boundary conditions are: Classical : 000 V = EI[w − g 2 w80 ] = 0 00 or 080 2 M = EI[w − g w ] = 0 w = 0, 0 or w = 0, at x = (0, L) at x = (0, L) (9) Non-classical : 000 M̄ = [g 2 EIw ] = 0 or 00 w = 0, at x = (0, L) (10) The list of classical and non-classical boundary conditions employed in the present study for a gradient elastic Euler-Bernoulli beam are as follows Simply supported : 00 classical : w = M = 0 , non-classical : w = 0 at x = (0, L) Clamped : 0 00 classical : w = w = 0 , non-classical : w = 0 at x = (0, L) Next, the constitutive relations, governing equation and the associated classical and non-classical boundary conditions for a gradient Kirchhoff plate are presented. 1.2 Gradient elastic Kirchhoff plate The strain-displacement relations for a Kirchhoff’s plate theory can be defined as [56] εxx = −z w̄xx , εyy = −z w̄yy , γxy = 2εxy = −2z w̄xy (11) where, w̄(x, y, t) is transverse displacement of the plate. The stress-strain relations for a gradient elastic Kirchhoff plate is given by [37, 52]: 5 Classical: E (εxx + νεyy ) 1 − ν2 E = (εyy + νεxx ) 1 − ν2 E = εxy 1+ν (12) E ∇2 (εxx + νεyy ) 2 1−ν E =g 2 ∇2 (εyy + νεxx ) 1 − ν2 E ∇2 εxy =g 2 1+ν (13) τxx = τyy τxy Non-classical: ςxx =g 2 ςyy ςxy where, τxx , τyy ,τxy , are the classical Cauchy stresses and ςxx ,ςyy , ςxy denotes higher order stresses related to gradient elasticity. The strain energy for a gradient elastic Kirchhoff plate is given by [37,49]: Up = Ucl + Usg (14) where, Ucl and Usg are the classical and gradient elastic strain energy given by Z Z h i 1 2 2 2 2 w̄xx + w̄yy + 2w̄xy Ucl = D + 2 ν (w̄xx w̄yy − w̄xy ) dxdy (15) 2 A Usg 1 = g2D 2 here, D = Z Z h 2 2 2 2 w̄xxx + w̄yyy + 3(w̄xyy + w̄xxy ) + 2 ν (w̄xyy w̄xxx + A i 2 2 w̄xxy w̄yyy − w̄xyy − w̄xxy dxdy (16) Eh3 . 12(1−ν 2 ) The potential energy of the external load is defined as Z Z Z Z Z 0 00 Wp = q0 (x, y)w̄ dxdy + Vn w̄ ds − Mn w̄ (n) ds − M̄n w̄ (n) ds A s s s (17) 6 where q0 is the transverse load on the plate. n and s are the normal and tangential to the boundary point corresponding to x and y coordinates axis. Using the principle of minimum potential energy and performing integration by parts over the area, we obtain the governing equation for a gradient elastic Kirchhoff plate as D∇4 w̄ − g 2 D∇6 w̄ − q0 = 0 (18) where, ∂ 4 w̄ ∂ 4 w̄ ∂ 4 w̄ + + 2 , ∂x4 ∂y 4 ∂x2 ∂y 2 ∂ 6 w̄ ∂ 6 w̄ ∂ 6 w̄ ∂ 6 w̄ + + 3 + 3 ∇6 = ∂x6 ∂y 6 ∂x4 ∂y 2 ∂x2 ∂y 4 ∇4 = the associated boundary conditions for the plate with domain defined over (0 ≤ x ≤ lx ), (0 ≤ y ≤ ly ), are listed below. Classical boundary conditions :  3   5  ∂ w̄ ∂ 3 w̄ ∂ 5 w̄ ∂ 5 w̄ ∂ w̄ 2 Vx = −D + (2 − ν) + (3 − ν) +3 2 3 =0 +g D ∂x3 ∂x∂y 2 ∂x5 ∂x∂y 4 ∂y ∂x or w̄ = 0, at x = (0, lx ) ∂ 3 w̄ ∂ 3 w̄ Vy = −D + (2 − ν) ∂y 3 ∂y∂x2    ∂ 5 w̄ ∂ 5 w̄ ∂ 5 w̄ +g D + (3 − ν) +3 2 3 =0 ∂y 5 ∂y∂x4 ∂x ∂y or w̄ = 0, at y = (0, ly ) (19) 2 7  ∂ 2 w̄ ∂ 2 w̄ Mx = −D + ν ∂x2 ∂y 2  ∂ 4 w̄ ∂ 4 w̄ ∂ 4 w̄ +g D + ν 4 + (3 − ν) 2 2 = 0 ∂x4 ∂y ∂x ∂y or w̄x = 0, at x = (0, lx )   4   2 2 4 ∂ w̄ ∂ w̄ ∂ w̄ ∂ w̄ ∂ 4 w̄ 2 My = −D +ν 2 +g D + ν 4 + (3 − ν) 2 2 = 0 ∂y 2 ∂x ∂y 4 ∂x ∂x ∂y or w̄y = 0, at y = (0, ly ) (20)   2  Non-classical boundary conditions :  3  ∂ w̄ ∂ 3 w̄ 2 M̄x = −g D +ν = 0 or w̄xx = 0, at x = (0, lx ) ∂x3 ∂x∂y 2  3  ∂ w̄ ∂ 3 w̄ 2 M̄y = −g D +ν = 0 or w̄yy = 0, at y = (0, ly ) ∂y 3 ∂y∂x2 The concentrated force at the free corner is given by  4  ∂ w̄ ∂ 4 w̄ ∂ 2 w̄ 2 − 2g D(1 − ν) + R = 2D(1 − ν) ∂x∂y ∂x3 ∂y ∂y 3 ∂x (21) (22) where lx and ly are the length and width of the plate. Vx , Vy are the shear force, Mx , My are the bending moment and M̄x , M̄y are the higher order moment. R is the concentrated force at the free corner. The different boundary conditions employed in the present study for a gradient elastic Kirchhoff plate are: Simply supported edge : w̄ = Mx = w̄x = 0 or w̄xx = 0 at x = 0, lx w̄ = My = w̄y = 0 or w̄yy = 0 at y = 0, ly Clamped edge : w̄ = w̄x = w̄xx = 0 at x = 0, lx w̄ = w̄y = w̄yy = 0 at y = 0, ly Free edge : Vx = Mx = M̄x = 0 at x = 0, lx 8 Vy = My = M̄y = 0 at y = 0, ly Free corner : R = Mx = My = M̄x = M̄y = 0 2 Differential quadrature elements for gradient elasticity theory In this section, first, we formulate a differential quadrature element based on Lagrangian interpolation function for 1-D gradient elastic Euler-Bernoulli beam. Next, we develop two new versions of gradient plate element with different choice of interpolation functions. The grid employed in the present study is unequal Gauss–Lobatto–Chebyshev points given by " # 1 (i − 1)π zi = 1 − cos (23) 2 N −1 where N is the number of grid points and z are the coordinates of the grid. For the plate analysis N = Nx = Ny is employed. 2.1 Differential quadrature element for gradient EulerBernoulli beam The nth order derivative of the deflection w(x, t) at location xi for a N-node 1-D beam element is assumed as win (x, t) = N X Lnj (x)wj (24) j=1 Lj (x) are Lagrangian interpolation functions in x co-ordinate. The Lagrange interpolation functions can be defined as [3, 4], Lj (x) = N Y β(x) (x − xk ) = β(xj ) (xj − xk ) k=1 (k6=j) where β(x) = (x − x1 )(x − x2 ) · · · (x − xj−1 )(x − xj+1 ) · · · (x − xN ) β(xj ) = (xj − x1 )(xj − x2 ) · · · (xj − xj−1 )(xj − xj+1 ) · · · )(xj − xN ) 9 (25) The first order derivative of the above shape functions can be written as  N N Y Y    (xi − xk )/ = (xj − xk ) (i 6= j)     k=1 k=1   (k6=j) (k6=i,j) 0 (26) Aij = Lj (xi )   N  X   1   (xi −xk )    k=1 (k6=i) The conventional higher order weighting coefficients are computed as Bij = N X Aik Akj , k=1 Cij = N X Bik Akj , k=1 Dij = N X Bik Bkj , (i, j = 1, 2, ..., N ) k=1 (27) here, Bij , Cij and Dij are weighting coefficients for second, third, and fourth order derivative, respectively. Let us consider a N-node gradient Euler-Bernoulli beam element as shown in the Figure 1. 𝑤1′′ 𝑤𝑁′′ 𝑤1′ 𝑤1 𝑤2 𝑤3 𝑤4 𝑤𝑁′ 𝑤𝑁 𝐿 Figure 1: A typical differential quadrature element for an Euler-Bernoulli gradient beam. Each interior node has displacement w as the only degree of freedom, 0 00 and the boundary nodes has 3 degrees of freedom w, w , w . These extra boundary degrees of freedom related to slope and curvature are introduced in to the formulation through modifying the conventional weighting coefficients. The new displacement vector now includes the slope and 10 curvature as additional degrees of freedom at the element boundaries as: 0 0 00 00 wb = {w1 , · · · wN , w1 , wN , w1 , wN }. The modified weighting coefficient matrices accounting for slope and curvature degrees of freedom at the boundaries are derived as follows: First order derivative matrix :   Aij (i, j = 1, 2, · · · , N ) Āij =   0 (i = 1, 2, · · · , N ; j = N + 1, · · · , N + 4) Second order derivative matrix :   Bij (i = 2, 3, · · · , N − 1; j = 1, 2, · · · , N ) B̄ij =   0 (i = 2, 3, · · · , N − 1; j = N + 1, · · · , N + 4) B̄ij = N −1 X Aik Akj (i = 1, N ; j = 1, 2, · · · , N ) (28) (29) (30) k=2 B̄i(N +1) = Ai1 ; B̄i(N +2) = AiN (i = 1, N ) Third order derivative matrix :  N X N X    B̄ik Akj (i = 2, 3, ..., N − 1)   j=1 k=1 C̄ij =      0 (i = 2, 3, · · · , N − 1; j = N + 1, · · · , N + 4) C̄ij = N −1 X Bik Akj (i = 1, N ; j = 1, 2, · · · , N ) (31) (32) (33) k=2 C̄i(N +3) = Ai1 ; C̄i(N +4) = AiN (i = 1, N ) (34) Fourth order derivative matrix : D̄ij = N +4 X N X Bik B̄kj j=1 k=1 11 (i = 1, 2, ..., N ) (35) Fifth order derivative matrix : Vij =   D̄ij (i = 2, 3, · · · , N − 1; j = 1, 2, · · · , N )   (36) (i = 2, 3, · · · , N − 1; j = N + 1, · · · , N + 4) 0 Vij = N −1 X Bik Bkj (i = 1, N ; j = 1, 2, · · · , N ) k=2 Vi(N +3) = Bi1 ; Vi(N +4) = BiN (i = 1, N ) Ēij = N X Aik Vkj (i = 1, 2, ..., N ; j = 1, 2, ..., N + 4) (37) (38) k=1 Sixth order derivative matrix : F̄ij = N X Bik Vkj (i = 1, 2, ..., N ; j = 1, 2, ..., N + 4) (39) k=1 Here, Āij , B̄ij , C̄ij , D̄ij , Ēij and F̄ij are first to sixth order modified weighting coefficients matrices, respectively. Using the above Equations (28)-(39), the governing differential equation (8), in terms of the differential quadrature at inner grid points is written as EI N +4 X D̄ij wjb 2 − g EI j=1 N +4 X F̄ij wjb = qb (xi ) (i = 2, 3, ..., N − 1) (40) j=1 The boundary forces given by Equations (9)-(10), in terms of differential quadrature are expressed as Shear force: Vi = EI N +4 X C̄ij wjb − g 2 EI j=1 N +4 X Ēij wjb (i = 1, N ) (41) D̄ij wjb (i = 1, N ) (42) j=1 Bending moment: Mi = EI N +4 X B̄ij wjb 2 − g EI j=1 N +4 X j=1 12 Higher order moment: 2 M̄i = g EI N +4 X C̄ij wjb (i = 1, N ) (43) j=1 here i = 1 and i = N correspond to the left support x = 0 and right support x = L of the beam, respectively. Once the boundary conditions in Equations (9)-(10) are applied, we get the following system of equations in the matrix form as      kbb kbd   ∆b     fb          = (44)  kdb kdd   ∆d  fd           where the subscript b and d indicates the boundary and domain of the beam. fb , ∆b and fd , ∆d are the boundary and domain forces and displacements of the beam, respectively. Now expressing the system of equations in terms of domain dofs ∆d , we get o h in o n −1 −1 (45) kdd − kdb kbb fb kbd ∆d = fd − kdb kbb The solution of the above system of equations renders the displacements at the domain nodes of the beam element. The boundary displacements are computed from Equation (44), and forces are computed from the Equations (41)-(43). 2.2 Differential quadrature element for gradient elastic plates Here, we present two versions of novel differential quadrature element for a gradient elastic Kirchhoff plate. First, the differential quadrature element based on Lagrange interpolation in x and y direction is formulated. Next, the differential quadrature element based on Lagrange-Hermite mixed interpolation, with Lagrangian interpolation is x direction and Hermite interpolation assumed in y direction is presented. Similar to the beam elements discussed in the previous section, the plate element has only displacement w̄ as degrees of freedom in the domain and at the plate edges it has 3 degrees of freedom w̄, w̄x , w̄xx or w̄y , w̄yy depending upon the edge. At the corners the element has five degrees of freedom w̄, w̄x , w̄y , w̄xx and w̄yy . The new displacement vector now includes the slope and curvature 13 as additional degrees of freedom at the element boundaries given by: w̃ = j j {w̄i , · · · , w̄N ×N , w̄xj , · · · , w̄yj , · · · , w̄xx , · · · , w̄yy , · · · }, where (i = 1, 2, · · · , N × N ; j = 1, 2, · · · , 4N ). y 𝒘′′ 𝑵𝟏 𝒘′′ 𝑵𝟐 𝒘′′ 𝑵𝟑 𝒘′′ 𝑵𝟒 𝒘′′ 𝑵𝑵 𝑑𝑤 𝑑 2 𝑤 𝒘′′ 𝟏𝟏 𝒘′′ 𝟏𝟐 𝒘′′ 𝟏𝟑 𝒘′′ 𝟏𝟒 𝒘′′ 𝟏𝑵 𝒘′𝑵𝟏 𝒘′𝑵𝟐 𝒘′𝑵𝟑 𝒘′𝑵𝟒 𝒘′𝑵𝑵 Dofs related to 𝑑𝑦 , 𝑑𝑦2 on edges 𝑦 = 0 and 𝑦 = 𝑙𝑦 Dofs related to 𝑑𝑤 𝑑 2 𝑤 , 𝑑𝑥 𝑑𝑥 2 on edges 𝒘′𝟏𝟏 𝒘′𝟏𝟐 𝒘′𝟏𝟑 𝒘′𝟏𝟒 𝒘′𝟏𝑵 𝒘𝑵𝟏 𝒘𝑵𝟐 𝒘𝑵𝟑 𝒘𝑵𝟒 𝒘𝑵𝑵 𝒘′𝑵𝟏 𝒘′𝑵𝑵 𝒘′′ 𝑵𝟏 𝒘′′ 𝑵𝑵 𝒘𝟒𝟏 𝒘𝟒𝟐 𝒘𝟒𝟑 𝒘𝟒𝟒 𝒘𝟒𝑵 𝒘′𝟒𝟏 𝒘′𝟒𝑵 𝒘′′ 𝟒𝟏 𝒘′′ 𝟒𝑵 𝒍𝒚 𝒘𝟑𝟏 𝒘𝟑𝟐 𝒘𝟑𝟑 𝒘𝟑𝟒 𝒘𝟑𝑵 𝒘′𝟑𝟏 𝒘′𝟑𝑵 𝒘′′ 𝟑𝟏 𝒘′′ 𝟑𝑵 𝒘𝟐𝟏 𝒘𝟐𝟐 𝒘𝟐𝟑 𝒘𝟐𝟒 𝒘𝟐𝑵 𝒘′𝟐𝟏 𝒘′𝟐𝑵 𝒘′′ 𝟐𝟏 𝒘′′ 𝟐𝑵 𝒘𝟏𝑵 𝒘′𝟏𝟏 𝒘′𝟏𝑵 𝑥 = 0 and 𝑥 = 𝑙𝑥 x 𝒘𝟏𝟏 𝒘𝟏𝟐 𝒘𝟏𝟑 𝒘𝟏𝟒 𝒘′′ 𝟏𝟏 𝒘′′ 𝟏𝑵 𝒍𝒙 Figure 2: A typical differential quadrature element for a gradient elastic Kirchhoff plate with N = Nx = Ny = 5. A differential quadrature gradient plate element for a Nx × Ny grid is shown in the Figure 2. Here, Nx = Ny = 5 are the number of grid points in x and y directions, respectively. It can be seen that the element has three degrees of freedom on each edge and five degrees of freedom at the corners. 0 00 In the figure, the slope w̄ and curvature w̄ dofs with first subscript 1 and N , correspond to the edges y = 0 and y = ly , respectively. Similarly, the 0 00 slope w̄ and curvature w̄ dofs with second subscript 1 and N , correspond to the edges x = 0 and x = lx , respectively. 14 2.2.1 Lagrange interpolation based differential quadrature element for gradient elastic plates The deflection for a Nx × Ny node differential quadrature rectangular plate element is assumed as w(x, y, t) = Ny Nx X X Lp (x)Lq (y)w̃pq (t) (46) p=1 q=1 where w̃pq (t) is the nodal deflection vector and L̄p (x) and L̄q (y) are the Lagrange interpolation functions in x and y directions, respectively. The slope and curvature degrees of freedom at the element boundaries are accounted while computing the weighting coefficients of higher order derivatives as discussed in section 2.1. Using the 1-D Lagrange interpolation functions derived in the section 2.1, the governing differential equation (18) in the differential quadrature syntax at inner grid points can be expressed as # " N +4 Ny +4 y +4 N x +4 N x X X X X y x y x D̄sr w̃pr − B̄pq B̄sr w̃qr + D D̄pr w̃rs + 2 q=1 r=1 2 g D " N +4 x X x F̄pr w̃rs +3 r=1 q=1 x y D̄pq B̄sr w̃qr r=1 Ny +4 X r=1 r=1 y +4 N x +4 N X X +3 y +4 N x +4 N X X q=1 x y B̄pq D̄sr w̃qr + r=1 # y F̄sr w̃pr = q̄o (xp , ys ) r=1 (p = 2, 3, ..., Nx − 1; s = 2, 3, ..., Ny − 1) (47) The boundary forces, Equation (20)-(22), in terms of differential quadrature form are expressed as Shear force: ! y +4 N N x +4 x +4 N X X X y x Vx = − D C̄pr w̃rs + (2 − ν) Āxpq B̄sr w̃qr + r=1 g2D " N +4 x X r=1 q=1 r=1 Nx +4 Ny +4 x Ēpr w̃rs + (3 − ν) X X q=1 r=1 y Āxpq D̄sr w̃qr + 3 y +4 N x +4 N X X q=1 x y C̄pq B̄sr w̃qr r=1 (p = 1, Nx ; s = 2, 3, ..., Ny − 1) 15 # (48) Ny +4 Vy = − D X y w̃pr + (2 − ν) C̄sr y +4 N x +4 N X X r=1 g2D " Ny +4 X q=1 y Ēsr w̃pr + (3 − ν) r=1 x B̄pq Āysr w̃qr + r=1 y +4 N x +4 N X X q=1 ! x D̄pq Āysr w̃qr + 3 r=1 y +4 N x +4 N X X q=1 # x y B̄pq C̄sr w̃qr r=1 (p = 2, 3, ..., Nx − 1; s = 1, Ny ) (49) Bending moment: N x +4 X Mx = − D Ny +4 x B̄pr w̃rs + ν r=1 g2D " N +4 x X X ! y B̄sr w̃pr + r=1 Ny +4 x D̄pr w̃rs + ν X r=1 y D̄sr w̃pr + (3 − ν) r=1 y +4 N x +4 N X X q=1 # x y B̄pq B̄sr w̃qr r=1 (p = 1, Nx ; s = 2, 3, ..., Ny − 1) Ny +4 X My = − D y B̄sr w̃pr + ν r=1 g2D " Ny +4 X N x +4 X (50) ! x B̄pr w̃rs + r=1 y D̄sr w̃pr + ν r=1 N x +4 X x D̄pr w̃rs + (3 − ν) r=1 y +4 N x +4 N X X q=1 # x y B̄pq B̄sr w̃qr r=1 (p = 2, 3, ..., Nx − 1; s = 1, Ny ) (51) Higher order moment: M̄x = − g 2 D N x +4 X x C̄pr w̃rs + ν y +4 N x +4 N X X q=1 r=1 ! y Āxpq B̄sr w̃qr r=1 (p = 1, Nx ; s = 2, 3, ..., Ny − 1) Ny +4 2 M̄y = − g D X r=1 y C̄sr w̃pr +ν y +4 N x +4 N X X q=1 ! x B̄pq Āysr w̃qr r=1 (p = 2, 3, ..., Nx − 1; s = 1, Ny ) 16 (52) (53) Concentrated force at the free corner: R =2D(1 − ν) y +4 N x +4 N X X q=1 ! Āxpq Āysr w̃qr − r=1 " N +4 Ny +4 # y +4 N x x +4 N X X X X x y 2g 2 D(1 − ν) w̃qr C̄pq Āysr w̃qr + Āxpq C̄sr q=1 r=1 q=1 r=1 (p = 1, Nx ; s = 2, 3, ..., Ny − 1) (54) here p = 1 and p = Nx correspond to the two edges of the plate at x = 0 and x = lx , respectively. Similarly, s = 1 and s = Ny correspond to y = 0 and y = ly edges. Once the boundary conditions in Equation (20)-(22), are applied we get a similar system of equations in the matrix form as given by Equation (44). By condensing the boundary dofs, the sysem of equations are reduced to the form as given by Equation (45), and the solution leads to the unknown domain displacements of the plate. The boundary displacement are post-processed from Equation (44) and the stress resultants from Equation (50)-(53). In the above we have formulated the differential quadrature plate element based on Lagrange interpolation functions, next, we construct a second version of quadrature plate element based on mixed Lagrange-Hermite interpolation functions. 2.2.2 Mixed interpolation based differential quadrature element for gradient elastic plates The differential quadrature plate element presented here is based on mixed Lagrange-Hermite interpolation, with Lagrangian interpolation is assumed in x direction and Hermite in y direction. The advantage in the mixed interpolation based schemes is the mixed derivative dofs at the free corners of the plate are excluded from the formulation [4]. The deflection for a Nx × Ny grid mixed interpolation differential quadrature plate element is assumed as w(x, y, t) = N N +4 X X Lp (x)Γq (y)w̃pq (t) (55) p=1 q=1 where wpq (t) is the displacement vector at grid point (p, q), and L̄p (x), Γ̄q (y) are the Lagrange and Hermite interpolation functions in x and y directions, respectively. The Lagrange interpolation functions are derived in section 2.1. 17 The Hermite interpolation functions for a 1-D N-node differential quadrature element are presented next. The displacement within the 1-D gradient element based on C 2 continuous Hermite interpolation is assumed as v(x, y, t) = N X 00 00 0 0 φp (y)vp + ψ1 (y)v1 + ψN (y)vN + ϕ1 (y)v1 + ϕN (y)vN = N +4 X Γp (y)v̄p p=1 p=1 (56) where, v̄ is the nodal displacement vector, φ, ψ and ϕ are Hermite interpolation functions defined as [30, 32] ϕp (y) = 1 Lp (y)(y − yp )2 (y − yN −p+1 )2 (p = 1, N ) 2(yp − yN −p+1 )2 (57) 1 Lp (y)(y − yp )(y − yN −p+1 )2 (yp − yN −p+1 )2   4 1 − 2Lp (yp ) + ϕp (x) (p = 1, N ) yp − yN −p+1 ψp (y) = (58)   2 1 2 1 Lp (y)(y − yN −p+1 ) − Lp (yp ) + φp (y) = ψp (y) (yp − yN −p+1 )2 yp − yN −p+1   4L1p (yp ) 2 2 ϕp (y) (p = 1, N ) − Lp (yp ) + + yp − yN −p+1 (yp − yN −p+1 )2 (59) φp (y) = 1 (yp − y1 )2 (y 2 p − yN ) Lp (y)(y − y1 )2 (y − yN )2 (p = 2, 3, ..., N − 1) (60) The nth order derivative of v(y, t) with respect to y is obtained from Equation (56) as n v (x, y, t) = N X φnp (y)vp + 0 ψ1n (y)v1 + 0 n ψN (y)vN p=1 + 00 ϕn1 (y)v1 + 00 ϕnN (y)vN = N +4 X Γnp (y)v̄p p=1 (61) 18 Now expressing the Equation (18), at inner grid points using the Lagrange and Hermite interpolation, we get " N +4 # Ny +4 y +4 N x x +4 N X X X X x x 2(y) D w̃rs + 2 D̄pr B̄pq Γsr w̃qr + Γ4(y) sr w̃pr − r=1 2 g D q=1 " N +4 x X x F̄pr w̃rs +3 r=1 r=1 r=1 y +4 N x +4 N X X q=1 +3 r=1 Ny +4 X x 2(y) D̄pq Γsr w̃qr y +4 N x +4 N X X q=1 x 4(y) B̄pq Γsr w̃qr + r=1 # Γ6(y) sr w̃pr = q̄o (xp , ys ) r=1 (p = 2, 3, ..., Nx − 1; s = 2, 3, ..., Ny − 1) (62) The boundary forces in Equations (20)-(22), are written as Shear force: ! y +4 N N x +4 x +4 N X X X x Vx = − D C̄pr w̃rs + (2 − ν) Āxpq Γ2(y) sr w̃qr + r=1 g2D " N +4 x X q=1 x Ēpr w̃rs + (3 − ν) r=1 y +4 N x +4 N X X q=1 r=1 4(y) Āxpq Γsr w̃qr + 3 y +4 N x +4 N X X q=1 r=1 # x 2(y) C̄pq Γsr w̃qr r=1 (p = 1, Nx ; s = 2, 3, ..., Ny − 1) (63) Ny +4 Vy = − D X Γ3(y) sr w̃pr + (2 − ν) r=1 2 g D " Ny +4 X r=1 Γ5(y) sr w̃pr y +4 N x +4 N X X q=1 + (3 − ν) x 1(y) B̄pq Γsr w̃qr + r=1 y +4 N x +4 N X X q=1 ! r=1 x 1(y) D̄pq Γsr w̃qr +3 y +4 N x +4 N X X q=1 # x 3(y) B̄pq Γsr w̃qr r=1 (p = 2, 3, ..., Nx − 1; s = 1, Ny ) (64) 19 Bending moment: Mx = − D N x +4 X Ny +4 x B̄pr w̃rs + ν r=1 g2D " N +4 x X ! X Γ2(y) sr w̃pr + r=1 Ny +4 x D̄pr w̃rs + ν r=1 X 4(y) Γsr w̃pr + (3 − ν) r=1 y +4 N x +4 N X X q=1 # x 2(y) B̄pq Γsr w̃qr r=1 (p = 1, Nx ; s = 2, 3, ..., Ny − 1) Ny +4 My = − D X N x +4 X Γ2(y) sr w̃pr + ν g2D ! x w̃rs + B̄pr r=1 r=1 " Ny +4 X (65) Γ4(y) sr w̃pr + ν r=1 N x +4 X x D̄pr w̃rs + (3 − ν) r=1 y +4 N x +4 N X X q=1 # x 2(y) B̄pq Γsr w̃qr r=1 (p = 2, 3, ..., Nx − 1; s = 1, Ny ) (66) Higher order moment: M̄x = − g 2 D N x +4 X x C̄pr w̃rs + ν y +4 N x +4 N X X q=1 r=1 ! 2(y) Āxpq Γsr w̃qr r=1 (p = 1, Nx ; s = 2, 3, ..., Ny − 1) Ny +4 M̄y = − g 2 D X Γ3(y) sr w̃pr + ν y +4 N x +4 N X X r=1 q=1 (67) ! x 1(y) B̄pq Γsr w̃qr r=1 (p = 2, 3, ..., Nx − 1; s = 1, Ny ) (68) Concentrated force at the free corner: R =2D(1 − ν) y +4 N x +4 N X X q=1 ! 1(y) w̃qr Āxpq Γsr − r=1 " N +4 Ny +4 # y +4 N x x +4 N X X X X x 1(y) 3(y) 2g 2 D(1 − ν) C̄pq Γsr w̃qr + Āxpq Γsr w̃qr q=1 r=1 q=1 r=1 (p = 1, Nx ; s = 2, 3, ..., Ny − 1) 20 (69) here p = 1 and p = Nx correspond to the two edges of the plate at x = 0 and x = lx , respectively. Similarly, s = 1 and s = Ny correspond to y = 0 and y = ly edges. Once the boundary conditions are applied we get a similar system of equations in the matrix form as given in Equation (44), and the solution leads to the unknown displacements of the plate. The stress resultants are obtained by post-processing the Equations (65)-(69). 3 Numerical Results and Discussion The efficiency of the proposed differential quadrature beam and plate elements is demonstrated for static analysis. First, the performance of the beam element is verified, followed by the plate element. The results reported herein are generated using a single element for different boundary and loading conditions. The classical (deflection, slope and bending moment) and the non-classical (curvature and higher order moment) quantities related to gradient Euler-Bernoulli beam and Kirchhoff plate are compared with the literature results for four values of length scale parameter, g = 0.00001, 0.05, 0.1, and 0.5. For ease of comparison, the proposed (strain gradient) differential quadrature beam element based on Lagrange interpolation is designated as SgDQE-L, the plate element based on Lagrange interpolation in x and y directions as SgDQE-LL and the element based on mixed interpolation with Lagrange function in x direction and Hermite function in y direction as SgDQE-LH. 3.1 Differential quadrature element for gradient elastic Euler-Bernoulli beam The classical and non-classical boundary conditions used in this study for different end supports are listed in the section 1.1. The non-classical bound00 ary conditions employed for simply supported gradient beam is w = 0 at x = (0, L), the equations related to curvature degrees of freedom are eliminated. For the cantilever beam, results are compared for two different choice of non-classical boundary conditions. In the first choice, the non-classical 00 boundary conditions used are w = 0 at x = 0 and M̄ = 0 at x = L. The equation related to curvature degrees of freedom at x = 0 is eliminated and the equation related to higher order moment at x = L is retained. For the next choice of non-classical boundary conditions we assume, M̄ = 0 at 00 x = 0 and w = 0 at x = L. Similarly, for clamped and propped cantilever 21 00 beam the non-classical boundary conditions remains the same, w = 0 at x = (0, L). In what follows, the ability of the beam element is assessed through convergence study and numerical comparisons for various examples. In the first part, beams subjected to uniformly distributed load (udl) are considered for different support conditions, later, a simply supported and cantilever beam with concentrated load are examined. The numerical data used for the analysis of beams is as follows: Length L = 1, Young’s modulus E = 3 × 106 , Poission’s ratio ν = 0.3 and load qb = 1. 3.1.1 Static analysis of gradient elastic beams under uniformly distributed load The results reported here for beams with udl are nondimensional as, deflecb = M/qb L2 , curvature tion : wb = 100EIw/qb L4 , bending moment (BM): Bm 00 00 b = M̄ /qb L3 . Four support conditions :wb = w L and higher moment : Hm for the beam are considered in this study, simply supported, clamped, cantilever and propped cantilever. In Appendix-I, the procedure used to obtain the exact solutions for different boundary conditions for a gradient elastic Euler-Bernoulli beam under udl is explained. These exact solutions are used to compare the results obtained using SgDQE-L beam element. In Figure 3, the convergence of maximum nondimensional deflection obtained using SgDQE-L element for a simply supported gradient beam subjected to udl is shown. The results are compared with exact solutions for g/L = 0.1. It can be noticed that the convergence is faster for SgDQE-L element, with deflection approaching to exact value with 11 grid points. Similar trend is noticed in the the Figure 4, for a clamped beam. Hence, from the above findings, it can be inferred that the accurate solutions can be obtained using single SgDQE-L element with fewer number of nodes. In the following tables classical and non-classical quantities are compared for different boundary conditions and g/L values. The number of grid points employed to generate the tabulated results is N = 11. In Table 1, the classical and non-classical quantities are given for a simply supported beam and compared with exact solutions for various g/L. The deflection and curvature are computed at center of the beam x = L/2, the slope and higher order moment at x = 0. Hence, the classical and non-classical quantities obtained using SgDQE-L are highly accurate and this consistency is maintained for all the g/L values. 22 SgDQE−L Exact 1.23 1.22 Nondimensional deflection 1.21 1.2 1.19 1.18 1.17 1.16 1.15 1.14 1.13 4 6 8 10 12 14 16 18 20 22 Number of grid points N Figure 3: Convergence of maximum nondimensional deflection for a simply supported beam under a udl (g/L=0.1). 0.115 SgDQE−L Exact Nondimensional deflection 0.11 0.105 0.1 0.095 0.09 4 6 8 10 12 14 16 18 20 22 Number of grid points N Figure 4: Convergence of maximum nondimensional deflection for a clamped beam under udl (g/L=0.1). 23 Response g/lx 0.00001 0.05 0.1 0.5 wb (x=L/2) SgDQE-L 1.3021 1.2702 1.1868 0.3767 Exact 1.3021 1.2715 1.1869 0.3767 wb (x=0) SgDQE-L 0.1667 0.1620 0.1506 0.0476 ×10−5 Exact 0.1667 0.1622 0.1507 0.0475 wb (x=L/2) SgDQE-L 0.5000 0.4896 0.4605 0.1480 ×10−5 Exact 0.4999 0.4900 0.4605 0.1480 b Hm (x=0) SgDQE-L 0.0000 1.1188 3.9986 29.8007 ×10−3 Exact 0.0000 1.1250 4.0000 29.8007 0 00 Table 1: Comparison of deflection, slope, curvature and higher order moment for a simply supported beam under a udl. Response g/lx 0.00001 0.05 0.1 0.5 wb (x=L/2) SgDQE-L 0.2604 0.1675 0.1028 0.0083 Exact 0.2604 0.1678 0.1028 0.0083 wb (x=0.2061L) SgDQE-L 3.2059 2.1478 1.2859 0.1003 ×10−5 Exact 3.1759 2.0642 1.2113 0.0931 wb (x=L/2) SgDQE-L 16.6667 12.9666 8.8951 0.7918 ×10−5 Exact 16.6667 12.9663 8.8957 0.7919 b Bm(x=0) SgDQE-L 83.3333 90.0131 94.0388 99.5440 ×10−3 Exact 83.3324 90.0926 94.1643 99.5440 b Hm(x=0) SgDQE-L 0.0000 3.4210 5.4176 8.1053 ×10−3 Exact 0.0000 3.3796 5.4156 8.1054 0 00 Table 2: Comparison of deflection, slope, curvature, bending moment and higher order moment for a clamped beam under a udl. The Tables 2 contains the results for a clamped beam. For the clamped beam the deflection and curvature are obtained at x = L/2, were as the 24 bending moment and higher order moment is computed at x = 0 and the slope is evaluated at x = 0.2061L. From the above tabulated results it can be concluded that the solutions obtained using SgDQE-L element with 11 grid points are in excellent agreement with the exact solutions for all the boundary conditions and g/L values considered. In the above results the accuracy of the SgDQE-L element was verified at a particular location of the beam. Next, we demonstrate the accuracy along the length of the beam for g/L = 0.1 and 0.5. The results are obtained using 11 grid points. Figures 5-8, illustrate the variation of deflection, slope, curvature and higher order moment, respectively, along the length for a simply supported beam. The results obtained using SgDQE-L element show perfect fit with the exact solution for both g/L = 0.1 and g/L = 0.5. 0 0.2 g/L=0.5 Nondimensional deflection 0.4 0.6 g/L=0.1 0.8 SgDQE−L Exact 1 1.2 1.4 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Nondimensional length of the beam x/L Figure 5: Deflection variation along the length for a simply supported beam under udl. 25 −4 2 x 10 SgDQE−L Exact 1.5 g/L=0.1 1 Slope 0.5 0 g/L=0.5 −0.5 −1 −1.5 −2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Nondimensional length of the beam x/L Figure 6: Slope variation along the length for a simply supported beam under udl. −4 2 x 10 SgDQE−L Exact 1 Nondimensional curvature 0 g/L=0.5 −1 −2 −3 g/L=0.1 −4 −5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Nondimensional length of the beam x/L Figure 7: Curvature variation along the length for a simply supported beam under udl. 26 0.03 Nondimensional higher moment 0.02 0.01 0 g/L=0.1 g/L=0.5 −0.01 SgDQE−L Exact −0.02 −0.03 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Nondimensional length of the beam x/L Figure 8: Higher order moment variation along the length for a simply supported beam under udl. From the above observations it can be stated that SgDQE-L element can be efficiently applied to study the static behaviour of gradient elastic EulerBernoulli beam for any choice of intrinsic length and boundary condition. 3.1.2 Static analysis of gradient elastic beams under point load To establish the capability of the SgDQE-L element for beams under concentrated load, two examples are considered, a cantilever beam with tip load and a simply supported beam with mid point load. The results reported here for beams with point load are nondimensional as, deflection : 00 00 b wb = 100EIw/qb L3 , bending moment : Bm = M/qb L, curvature : wb = w L b and higher order moment : Hm = M̄ /qb L2 . In the Figure 9, the convergence of the nondimensional tip deflection for a cantilever beam is shown. The comparison is made with finite element results [50] and exact solutions [54]. The SgDQE-L element exhibit excellent and rapid convergence behaviour with 15 grid points. In Table 3, nondimensional deflection, slope and curvature at the tip for 15 grid points are given. The SgDQE-L element demonstrates good comparison with literature results for all the quantities. 27 26.5 SgDQE−L Exact [53] FEM [49] 26 Nondimensional deflection 25.5 25 24.5 24 23.5 23 22.5 4 6 8 10 12 14 16 18 20 22 Number of grid points "N" Figure 9: Deflection convergence for a cantilever beam under a tip point load (g/L=0.1). Response g/lx 0.00001 0.05 0.1 0.5 SgDQE-L 33.3337 28.5784 24.4330 8.8922 Exact [54] 33.3323 28.5958 24.4332 8.8922 FEM [50] 33.3323 28.5958 24.4331 8.8922 SgDQE-L 1.9994 1.8086 1.6400 0.8061 wb (x=L) Exact [54] 1.9994 1.8066 1.6266 0.8060 ×10−3 FEM [50] 1.9994 1.8099 1.6400 0.8061 SgDQE-L 0.0016 20.3508 40.1058 86.4905 wb (x=L) Exact [54] 0.0016 19.9999 39.9636 86.4846 ×10−5 FEM [50] 0.0016 19.9999 39.9636 86.4846 wb (x=L) 0 00 Table 3: Comparison of deflection, slope and curvature for a cantilever beam under a tip point load. 28 0 SgDQE−L Exact [53] 5 Nondimensional deflection g/L=0.1 10 g/L=0.05 15 20 25 30 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Nondimensional length of the beam x/L Figure 10: Deflection variation along the length for a cantilever beam under a tip load. To verify the accuracy of the SgDQE-L element along the length of the beam, tip displacement is plotted in Figure 10, and compared with exact solution [54] for g/L = 0.05 and 0.1. It is evident from the graph that the SgDQE-L element compares well with the exact solution for both g/L = 0.05 and 0.1. In the Figure 11, the convergence of the nondimensional center deflection for a simply supported beam under mid point load is plotted for g/L = 0.1. The literature results used to compare the solution are obtained using two finite elements [50]. The Dirac-delta technique is employed here to represent the concentrated load accurately [4,53] and similar grid is used as in Ref. [53] to produce the results. The observations indicate the SgDQE-L element display faster convergence with 13 grid points. In Table 4, nondimensional deflection, slope and curvature are tabulated for comparison. The SgDQE-L results agree well with the finite element solutions for all the quantities and g/L values. Hence, single SgDQE-L element with less number of grid points yield accurate results for beams with concentrated load. 29 0.019 SgDQE−L FEM 0.0189 0.0189 Nondiemsnional deflection 0.0188 0.0188 0.0187 0.0187 0.0186 0.0186 0.0186 0.0185 4 6 8 10 12 14 16 18 20 22 Number of grid points Figure 11: Non-dimensional deflection convergence for a simply supported beam under a mid point load. Response g/lx 0.00001 0.05 0.1 0.5 wb (x=L) SgDQE-L 0.0208 0.0267 0.01883 0.0059 Exact 0.0208 0.0267 0.01883 0.0059 wb (x=L) SgDQE-L 0.2499 0.2450 0.2303 0.0740 ×10−3 Exact 0.2500 0.2450 0.2303 0.0740 wb (x=L) SgDQE-L 0.9349 0.8854 0.7950 0.2382 ×10−3 Exact 0.9999 0.9000 0.8000 0.2384 0 00 Table 4: Comparison of deflection, slope and curvature for a simply supported beam under a mid point load. 3.2 Differential quadrature element for a gradient elastic Kirchhoff plate In this section, the performance of the two proposed differential quadrature plate elements SgDQE-LL and SgDQE-LH is validated. Three different example problems are considered here, a rectangular plate with udl, a square plate subjected to central point load and a plate under cylindrical bending. 30 Comparison is made with available literature results for different boundary conditions and g/lx values. For the example problems were gradient plate solutions are not available in the literature, comparison is made with the classical solutions. The boundary conditions used in the examples are described by a notation, for example, a cantilever plate is represented as CFFF, the first and second letter correspond to x = 0 and y = 0 edges, similarly, the third and fourth letter correspond to the edges x = lx and y = ly , respectively. Further, the letter S, C and F correspond to simply supported, clamped and free edges of the plate. The number of grid points in either direct are assumed to be equal, N = Nx = Ny . The numerical data used for the analysis of plates is: length lx = 1, width ly = 1, thickness h = 0.01, Young’s modulus E = 3 × 106 , Poission’s ratio ν = 0.3 and load q̄o = 1. The deflections reported herein are nondimensional as, w̄p = 100Dw̄/q̄0 lx4 for udl and w̄p = 100Dw/q̄0 lx2 for point load. Similarly, the bending mop = Mx /q̄0 lx2 and ment and higher order moment are nondimensional as, Bm p Hm = M̄x /q̄0 lx3 , respectively. The curvature is nondimensional as curvature : 00 00 wp = w lx The non-classical boundary conditions employed for SSSS gradient plate are wxx = 0 at x = (0, lx ) and wyy = 0 at y = (0, ly ), the equations related to curvature degrees of freedom are eliminated. The size of the resulting nonzero boundary degrees of freedom vector ∆b after eliminating the equations related zero classical and non-classical boundary degrees of freedom is 4N −8, which is similar to classical simply supported plate. For a CCCC plate the non-classical boundary conditions used are wxx = 0 at x = (0, lx ) and wyy = 0 at y = (0, ly ), as a result, the size of boundary degrees of freedom vector is zero. Similarly, for CFFF cantilever plate, conditions employed are wxx = 0 at x = 0, M̄x = 0 at x = lx and M̄y = 0 at y = (0, ly ), and this leads to the size of ∆b as 9N − 8. 3.2.1 Static analysis of gradient Kirchhoff plates under uniformly distributed load In this study, a SSSS, CCCC square plate and a rectangular cantilever plate CFFF (ly = 2 lx ) under udl are analysed. In Figure 12, the convergence of nondimensional deflection for a SSSS plate with g/lx = 0.1 is plotted for SgDQE-LL and SgDQE-LH elements and compared with analytical solutions [48]. The analytical solutions are obtained using 100 terms in the series. The SgDQE-LL and SgDQE-LH elements demonstrate faster convergence to exact solution with Nx = Ny = 11, grid points. In Figures 13 and 14, the convergence behaviour for CCCC and CFFF plates obtained using SgDQELL and SgDQE-LH are illustrated. As the analytical solutions for gradient 31 elastic CCCC and CFFF plates are not available in the literature, only the convergence trend for SgDQE-LL and SgDQE-LH elements are shown. Both the elements converge with 11 and 17 grid points for CCCC and CFFF plates respectively. The deflection for SSSS and CCCC plate is computed at centre (lx /2, ly /2) .and for CFFF plate at (lx , ly /2). −3 5 x 10 SgDQE−LL SgDQ−LH Analytical [49] Nondimensional deflection 4.5 4 3.5 3 2.5 2 4 6 8 10 12 14 16 18 20 22 Number of grid points "N" Figure 12: Deflection convergence for a SSSS gradient elastic plate under a udl (g/lx = 0.1) −4 x 10 8 SgDQE−LL SgDQE−LH Nondimensional deflection 7 6 5 4 3 2 4 6 8 10 12 14 16 18 20 22 Number of grid points N Figure 13: Deflection convergence for a CCCC gradient elastic plate under a udl (g/lx = 0.1). 32 0.1 SgDQE−LL SgDQE−LH 0.095 Nondimensional deflection 0.09 0.085 0.08 0.075 0.07 0.065 0.06 0.055 0.05 4 6 8 10 12 14 16 18 20 22 Number of grid points N Figure 14: Deflection convergence for a CFFF gradient elastic plate under a udl (g/lx = 0.1). In Table 5, the nondimensional deflection for a SSSS plate computed for different g/lx values is shown. The SgDQE-LL and SgDQE-LH elements demonstrate excellent agreement with the analytical solutions [48] for all g/lx values. For the CCCC and CFFF plate the classical solution is compared with SgDQE-LL and SgDQE-LH results for lower value of g/lx = 0.00001. However, for higher values of g/lx only solutions obtained using SgDQELL and SgDQE-LH are tabulated and they show good comparison. Similar accuracy is seen in Table 6-8, for slope, curvature and higher order moment, respectively, obtained for different boundary conditions of the plate. All the results presented here for SSSS and CCCC plates are obtained using Nx =Ny =15, and for CFFF plate Nx =Ny =17 is used. In the above, the classical and non-classical quantities are compared with the analytical solutions for SSSS plate and excellent match is verified. For the example problems were analytical solutions are not available, SgDQELL and SgDQE-LH elements produce identical results for CCCC and CFFF plates. From the above findings, it can be ascertain that the SgDQE-LL and SgDQE-LH elements with less number of grid points can be efficiently applied to study the static behaviour of gradient plates under udl. Next, we illustrate the applicability of the above elements for plates with concentrate loads. 33 Support g/lx 0.00001 0.05 0.1 0.5 SSSS SgDQE-LL 0.4062 0.3884 0.3423 0.0697 wp ( l2x , l2y ) SgDQE-LH 0.4062 0.3902 0.3481 0.0763 Ref. [49] 0.4062 0.3884 0.3423 0.0697 SgDQE-LL 0.1265 0.0803 0.0476 0.0036 wp ( l2x , l2y ) SgDQE-LH 0.1265 0.0803 0.0476 0.0036 Exact [4] 0.1265 —— —— —— CFFF SgDQE-LL 12.7770 10.3975 8.5059 2.6490 wp (lx , l2y ) SgDQE-LH 12.7742 10.3434 8.4848 2.6888 12.87 —— —— —— CCCC Ref. [28] Table 5: Comparison of nondimensional deflection for a gradient plate under a udl. support g/lx 0.00001 0.05 0.1 0.5 SSSS SgDQE-LL 4.9074 4.6455 4.0407 0.8067 SgDQE-LH 4.9075 4.7177 4.0426 0.8013 Ref. [49] 4.7579 4.5341 3.9735 0.8017 0 wp (lx , l2y ) CCCC SgDQE-LL 1.2424 0.6417 0.3276 0.0218 wp (0.188lx , l2y )SgDQE-LH 1.2424 0.6417 0.3276 0.0218 CFFF SgDQE-LL 61.9813 53.1975 46.2014 20.3113 SgDQE-LH 61.9832 52.7951 45.9788 20.6468 0 0 wp (lx , l2y ) Table 6: Comparison of slope for a gradient plate under a udl. 34 support g/lx 0.00001 0.05 0.1 0.5 SSSS SgDQE-LL 13.4080 12.9528 11.6342 2.4499 wp ( l2x , l2y ) SgDQE-LH 13.4090 12.9896 11.7773 2.6562 Ref. [49] 13.4082 12.9533 11.6342 2.4499 SgDQE-LL 6.4122 4.9539 3.3135 0.2766 wp ( l2x , l2y ) SgDQE-LH 6.4123 4.9628 3.3151 0.2766 CFFF SgDQE-LL 0.4740 1.2650 3.8418 18.6090 SgDQE-LH 0.5423 1.2650 2.8795 18.9998 00 CCCC 00 00 wp (lx , l2y ) Table 7: Comparison of nondimensional curvature for a gradient plate under a udl. support g/lx 0.00001 0.05 0.1 0.5 SSSS SgDQE-LL 0.0000 0.5194 1.6666 7.5376 SgDQE-LH 0.0000 0.5189 1.6662 7.5367 Ref. [49] 0.0000 0.3999 1.4006 7.0646 SgDQE-LL 0.0000 2.0802 3.3107 4.8114 p (0, l2y ) SgDQE-LH Hm 0.0000 2.0781 3.3133 4.8191 CFFF SgDQE-LL 0.0000 23.0985 41.6790 113.1579 p Hm (0, l2y ) SgDQE-LH 0.0000 22.9233 41.5215 114.2411 p (0, Hm CCCC ly ) 2 Table 8: Comparison of nondimensional higher order moment for a gradient plate under a udl. 3.2.2 Static analysis of gradient Kirchhoff plate under point load To represent the concentrate load accurately the Dirac-delta technique is employed [4, 53]. In Table 9, the nondimensional defection for CFCF, SFSF and SFCF plates subjected to central point load are presented. Simlar grid is used as in Ref. [4] to generate the results. The solutions obtained using SgDQE-LL and SgDQE-LH elements for g/lx = 0.00001 are compared with 35 classical solutions. Due to non-availability of gradient plate solutions, comparison is made between SgDQE-LL and SgDQE-LH elements for higher g/lx values. The results for g/lx = 0.00001 agree well with the classical solutions and close proximity is seen in results obtained by SgDQE-LL and SgDQE-LH elements for higher g/lx values. support g/lx CFCF SFSF SFCF 0.00001 0.05 0.1 0.5 SgDQE-LL 0.7668 0.5472 0.3458 0.02867 SgDQE-LH 0.7518 0.5452 0.34409 0.02845 DQM [4] 0.7601 —— —— —— FEM [4] 0.7648 —— —— —— SgDQE-LL 2.3373 2.2508 2.0459 0.6145 SgDQE-LH 2.3389 2.2527 2.0529 0.6158 DQM [4] 2.3172 —— —— —— FEM [4] 2.3217 —— —— —— SgDQE-LL 1.1591 0.8644 0.6266 0.0761 SgDQE-LH 1.1605 0.8596 0.5950 0.0664 DQM [4] 1.1519 —— —— —— FEM [4] 1.1566 —— —— —— Table 9: Comparison of nondimensional central deflection wp ( l2x , l2y ) for a gradient plate under a central point load. 3.2.3 Gradient Kirchhoff plate under cylindrical bending A gradient plate with two opposite sides clamped (x = 0, lx ) subjected to udl and under cylindrical bending is analysed. The maximum deflection obtained using SgDQE-LL and SgDQE-LH elements with 15 grid points are compared with analytical solutions [49] in Table 10. The results obtained using both elements are in excellent match with the analytical solutions for all g/lx values considered. 36 support g/lx 0.00001 0.05 0.1 0.5 Cylindrical SgDQE-LL 0.2604 0.1678 0.1028 0.0083 bending SgDQE-LH 0.2629 0.1692 0.1028 0.0083 Ref. [49] 0.2583 0.1678 0.1028 0.0083 Table 10: Comparison of maximum nondimensional deflection for a gradient plate under cylindrical bending. 4 Conclusion A novel differential quadrature beam element was proposed to solve a sixth order partial differential equation associated with non-classical beam theories. This methodology was extended to formulate two new and different versions of differential quadrature plate elements for non-classical gradient elasticity theory. A new way to account for the non-classical boundary conditions associated with the gradient elastic beam and plate theories was introduced. The efficiency of the proposed elements was established through application to flexural problems of beams and plates. Acknowledgement The authors would like to thank Professor Xinwei Wang, Nanjing University of Aeronautics and Astronautics, Peoples Republic of China, for the useful technical discussions. References [1] Bellman RE, Casti J., Differential quadrature and long-term integration. Journal of Mathematical Analysis and Applications 1971; 34:235–238. [2] Bert, C. W., and Malik, M., 1996, Differential Quadrature Method in Compu-tational Mechanics: A Review,. ASME Appl. Mech. Rev., 49(1), pp. 1–28. [3] C. Shu, Differential Quadrature and Its Application in Engineering,. Springer-Verlag, London, 2000. 37 [4] Xinwei Wang, Differential Quadrature and Differential Quadrature Based Element Methods Theory and Applications,.Elsevier, USA, 2015 [5] Wang X, Bert CW., A new approach in applying differential quadrature to static and free vibrational analyses of beams and plates. Journal of Sound and Vibration 1993; 162(3):566–572. [6] Bert CW, Jang SK, Striz AG., Two new approximate methods for analyzing free vibration of structural components.. AIAA Journal 1988; 26:612–618. [7] Jang SK, Bert CW, Striz AG., Application of differential quadrature to deflection and buckling of structural components. International Journal for Numerical Methods in Engineering 1989; 28:561–577. [8] Bert, C. W., Malik, M., 1996, The differential quadrature method for irregular domains and application to plate vibration.. International Journal of Mechanical Sciences 1996; 38:589–606. [9] C.W. Bert, X. Wang, A.G. Striz, Differential quadrature and free vibration analysis of anisotropic plates.Int. J. Solids Struct. 30 (1993) 737–1744. [10] C.W. Bert, X. Wang, A.G. Striz, Convergency of the DQ method in the analysis of anisotropic platesJ. Sound Vib. 170 (1994). [11] C.W. Bert, M. Malik, Free vibration analysis of tapered rectangular plates by differential; quadrature methods: A semi-analytical approach, J. Sound Vib. 190 (1996) 41–63. [12] W. Chen, A.G. Striz, C.W. Bert, A new approach to the differential quadrature method for fourth-order equations, Int. J. Num. Meth. Engrg. 40 (1997) 1941–1956. [13] Malik M, Bert CW, Implimentating multiple boundary conditions in the DQ solution of high-order PDEs: application to free vibration of plates. International Journal for Numerical Methods in Engineering 1996; 39:1237–1258. [14] H. Du, M.K. Lim, N.R. Lin, Application of generalized differential quadrature method to structural problems,. Int. J. Num. Meth.Engrg. 37 (1994) 1881–1896. [15] H. Du, M.K. Lim, N.R. Lin, Application of generalized differential quadrature to vibration analysis,. J. Sound Vib. 181 (1995) 279–293. 38 [16] A.G. Striz, W.L. Chen, C.W. Bert, Static analysis of structures by the quadrature element method (QEM),. Int. J. Solids Struct. 31 (1994) 2807–2818. [17] W.L. Chen, A.G. Striz, C.W. Bert, High-accuracy plane stress and plate elements in the quadrature element method, Int. J. Solids Struct. 37 (2000) 627–647. [18] X. Wang, H.Z. Gu, Static analysis of frame structures by the differential quadrature element method,. Int. J. Numer. Methods Eng. 40 (1997) 759–772. [19] Wu TY, Liu GR, The differential quadrature as a numerical method to solve the differential equation. Computational Mechanics 1999; 24:197–205. [20] Wu TY, Liu GR, The generalized differential quadrature rule for initial value differential equations, Journal of Sound and Vibration 2000; 233:195–213. [21] Wu TY, Liu GR, The generalized differential quadrature rule for fourthorder differential equations, International Journal for Numerical Methods in Engineering 2001; 50:1907–1929 [22] X. Wang, Y. Wang, Free vibration analysis of multiple-stepped beams by the differential quadrature element method, Appl. Math. Comput. 219 (11) (2013) 5802–5810. [23] Wang Y, Wang X, Zhou Y, Static and free vibration analyses of rectangular plates by the new version of differential quadrature element method, International Journal for Numerical Methods in Engineering 2004; 59:1207–1226. [24] Y. Xing, B. Liu, High-accuracy differential quadrature finite element method and its application to free vibrations of thin plate with curvilinear domain, Int. J. Numer. Methods Eng. 80 (2009) 1718–1742. [25] Malik M, Differential quadrature element method in computational mechanics: new developments and applications. Ph.D. Dissertation, University of Oklahoma, 1994. [26] Karami G, Malekzadeh P, A new differential quadrature methodology for beam analysis and the associated differential quadrature element method. Computer Methods in Applied Mechanics and Engineering 2002; 191:3509–3526. 39 [27] Karami G, Malekzadeh P, Application of a new differential quadrature methodology for free vibration analysis of plates. Int. J. Numer. Methods Eng. 2003; 56:847–868. [28] Yongliang Wang, Xinwei Wang and Yong Zhou, Static and free vibration analyses of rectangular plates by the new version of the differential quadrature element method, Int. J. Numer. Meth. Engng 2004; 59:1207–1226. [29] Xinwei Wang, Yongliang Wang, Zhangxian Yuan, Accurate vibration analysis of skew plates by the new version of the differential quadrature method, Applied Mathematical Modelling 38 (2014) 926–937. [30] T.Y. Wu, G.R. Liu, Application of the generalized differential quadrature rule to sixth-order differential equations, Comm. Numer. Methods Eng. 16 (2000) 777–784. [31] G.R. Liu a , T.Y. Wu b, Differential quadrature solutions of eighth-order boundary-value differential equations, Journal of Computational and Applied Mathematics 145 (2002) 223–235. [32] Xinwei Wang, Novel differential quadrature element method for vibration analysis of hybrid nonlocal EulerBernoulli beams, Applied Mathematics Letters 77 (2018) 94–100. [33] Mindlin, R.D., 1965.1964.Micro-structure in linear elasticity. Arch. Rat. Mech. Anal. 16, 52–78. [34] Fleck, N.A., Hutchinson, J.W., A phenomenological theory for strain gradient effects in plasticity. 1993. J. Mech. Phys. Solids 41 (12), 1825–1857. [35] Mindlin, R., Eshel, N., 1968.On first strain-gradient theories in linear elasticity. Int. J. Solids Struct. 4, 109–124. [36] Mindlin, R.D., 1965.1964.Micro-structure in linear elasticity. Arch. Rat. Mech. Anal. 16, 52–78. [37] Koiter, W.T., 1964.Couple-stresses in the theory of elasticity, I & II. Proc. K. Ned.Akad. Wet. (B) 67, 17–44. [38] F. Yang, A.C.M. Chong, D.C.C. Lam,P. Tong, Experiments and theory in strain gradient elasticity Journal of the Mechanics and Physics of Solids 51 (2003) 1477–1508. 40 [39] D.C.C. Lam, F. Yang, A.C.M. Chong, J. Wang, P. Tong, Couple stress based strain gradient theory for elasticity, International Journal of Solids and Structures 39 (2002) 2731–2743. [40] J.N. Reddy, , Nonlocal theories for bending, buckling, and vibration of beams, Int. J. Eng. Sci. 45 (2007) 288–307. [41] Harm Askes, Elias C. Aifantis, Gradient elasticity in statics and dynamics: An overview of formulations,length scale identification procedures, finite element implementations and new results Int. J. Solids Struct. 48 (2011) 1962–1990 [42] Aifantis, E.C., Update on a class of gradient theories. 2003.Mech. Mater. 35,259e280. [43] Altan, B.S., Aifantis, E.C., On some aspects in the special theory of gradient elasticity. 1997. J. Mech. Behav. Mater. 8 (3), 231e282. [44] Papargyri-Beskou, S., Tsepoura, K.G., Polyzos, D., Beskos, D.E., Bending and stability analysis of gradient elastic beams. 2003. Int. J. Solids Struct. 40, 385e400. [45] S. Papargyri - Beskou, D. Polyzos, D. E. Beskos, Dynamic analysis of gradient elastic flexural beams. Structural Engineering and Mechanics, Vol. 15, No. 6 (2003) 705–716. [46] A.K. Lazopoulos, Dynamic response of thin strain gradient elastic beams, International Journal of Mechanical Sciences 58 (2012) 27–33. [47] Papargyri-Beskou, S., Beskos, D., Static, stability and dynamic analysis of gradient elastic flexural Kirchhoff plates. 2008. Arch. Appl. Mech. 78, 625–635. [48] Lazopoulos, K.A., On the gradient strain elasticity theory of plates. 2004. Eur. J.Mech. A/Solids 23, 843–852. [49] Papargyri-Beskou, S., Giannakopoulos, A.E., Beskos, D.E., Variational analysis of gradient elastic flexural plates under static loading. 2010. International Journal of Solids and Structures 47, 2755–2766. [50] I. P. Pegios S. Papargyri-Beskou D. E. Beskos, Finite element static and stability analysis of gradient elastic beam structures, Acta Mech 226, 745768 (2015), DOI 10.1007/s00707–014–1216–z. 41 [51] Tsinopoulos, S.V., Polyzos, D., Beskos, D.E, Static and dynamic BEM analysis of strain gradient elastic solids and structures, Comput. Model. Eng. Sci. (CMES) 86, 113–144 (2012). [52] Vardoulakis, I., Sulem, J., Bifurcation Analysis in Geomechanics. 1995. Blackie/Chapman and Hall, London. [53] S.A. Eftekhari, A note on mathematical treatment of the Dirac-delta function in the differential quadrature bending and forced vibration analysis of beams and rectangular plates subjected to concentrated loads, Applied Mathematical Modelling 39 (2015) 6223–6242. [54] Shengli Kong, Shenjie Zhou , Zhifeng Nie, Kai Wang, Static and dynamic analysis of micro beams based on strain gradient elasticity theory, nternational Journal of Engineering Science 47 (2009) 487–498. [55] J.N. Reddy, Energy Principles and Variational Methods in Applied Mechanics, Second Edition, John Wiley, NY, 2002. [56] S.P. Timoshenko, D.H. Young, Vibration Problem in Engineering, Van Nostrand Co., Inc., Princeton, N.J., 1956. APPENDIX Analytical solutions for static analysis of gradient elastic Euler-Bernoulli beam To obtain the static deflections of the gradient elastic Euler-Bernoulli beam which is governed by Equation 8, we assume a solution of the form w(x) = c1 x3 + c2 x2 + c3 x + c4 + c5 g 4 sinh(x/g) + c6 g 4 cosh(x/g) − (qb /24EI)x4 (A1) The constants c1 − c6 are determined with the aid of boundary conditions listed in Equation (9) and (10). After applying the boundary conditions the system of equations are expressed as: [K]{δ} = {f } (A2) here K is the coefficient matrix, f is the vector corresponding to the load and {δ} = {c1 , c2 , c3 , c4 , c5 , c6 } is the unknown constant vector to be determined. Once the unknown constants are determined then the displacement 42 solution is obtained from the Equation (A1). The slope and curvature at any point along the length of the beam can be obtained by performing the first and second derivatives of the deflection. The shear force, bending moment and higher moment are obtained by substituting the Equation (A1) in Equations(9) and (10). The following are the expressions for support reactions: Shearf orce : V =6EIc1 − qb x EI Bendingmoment : M =2EI(c2 + 3c1 x) + qb  2 x 2  g − EI 2 Highermoment : M̄ =6EIg 2 c1 + EIg 3 cosh(x/g)c5 + EIg 3 sinh(x/g)c6 − qb g 2 x The following are the list of simultaneous equations to determine the unknown constants for different boundary conditions: (a) Simply supported beam  0 0     0 2      L3 L2    [K] =   6L 2      0 2     6L 2  : 0 1 0 0 L 1 0 0 0 0 0 0 0 g 4       0 0      4 4 g sinh(L/g) g cosh(L/g)       0 0      2 0 g      g 2 sinh(L/g) g 2 cosh(L/g)  43 f=                               0 g 2 qb /EI −qb L4 /24EI                                  g 2 qb /EI − qb L2 /2EI                        0                     2     −q L /2EI b         (c) clamped beam :  0  0     0  0      L3 L2    [K] =   2 3L 2L      2  0      6L 2  0 1 0 g 4       1 0 g3 0      4 4 L 1 g sinh(L/g) g cosh(L/g)      3 3 1 0 g cosh(L/g) g sinh(L/g)       2 0 0 0 g      0 0 g 2 sinh(L/g) g 2 cosh(L/g)  44 f=       0                       0                     4     −q L /24EI b           −qb L3 /6EI            0             −qb L2 /2EI     45                             
5cs.CE
A Multi-Class Dispatching and Charging Scheme for Autonomous Electric Mobility On-Demand Syrine Belakaria∗ , Mustafa Ammous∗ , Sameh Sorour∗ and Ahmed Abdel-Rahim†‡ ∗ Department of Electrical and Computer Engineering, University of Idaho, Moscow, ID, USA Department of Civil and Environmental Engineering, University of Idaho, Moscow, ID, USA ‡ National Institute for Advanced Transportation Technologies, University of Idaho, Moscow, ID, USA Email: {ammo1375, bela7898}@vandals.uidaho.edu, {samehsorour, ahmed}@uidaho.edu arXiv:1705.03070v2 [cs.SY] 20 May 2017 † Abstract—Despite the significant advances in vehicle automation and electrification, the next-decade aspirations for massive deployments of autonomous electric mobility on demand (AEMoD) services are still threatened by two major bottlenecks, namely the computational and charging delays. This paper proposes a solution for these two challenges by suggesting the use of fog computing for AEMoD systems, and developing an optimized multi-class charging and dispatching scheme for its vehicles. A queuing model representing the proposed multiclass charging and dispatching scheme is first introduced. The stability conditions of this model and the number of classes that fit the charging capabilities of any given city zone are then derived. Decisions on the proportions of each class vehicles to partially/fully charge, or directly serve customers are then optimized using a stochastic linear program that minimizes the maximum response time of the system. Results show the merits of our proposed model and optimized decision scheme compared to both the always-charge and the equal split schemes. Keywords—Autonomous Mobility On-Demand; Electric Vehicle; Fog-based Architecture; Dispatching; Charging; Queuing Systems. I. I NTRODUCTION Urban transportation systems are facing tremendous challenges nowadays due to the dominant dependency and massive increases on private vehicle ownership, which result in dramatic increases in road congestion, parking demand [1], increased travel times [2], and carbon footprint [3] [4]. These challenges have significantly can be mitigated with the significant advances and gradual maturity of vehicle electrification, automation, and wireless connectivity. With more than 10 million self-driving cars expected to be on the road by 2020 [5], it is strongly forecasted that vehicle ownership will significantly decline by 2025, as it will be replaced by the novel concept of Autonomous Electric Mobility on-Demand (AEMoD) services [6], [7]. In such system, customers will simply need to press some buttons on an app to promptly get an autonomous electric vehicle transporting them door-to-door, with no pick-up/dropoff and driving responsibilities, no dedicated parking needs, no carbon emission, no vehicle insurance and maintenance costs, and extra in-vehicle work/leisure times. With these qualities, AEMoD systems will significantly prevail in attracting millions of subscribers across the world and in providing on-demand and hassle-free private urban mobility. Despite the great aspirations for wide AEMoD service deployments by early-to-mid next decade, the timeliness (and thus success) of such service is threatened by two major bottlenecks. First, the expected massive demand of AEMoD services Autonomous Vehicle Customer Origin Customer Destination Serving a custumer Driving to a customer Fig. 1: Fog-based architecture for AEMoD system operation will result in excessive if not prohibitive computational and communication delays if cloud based approaches are employed for the micro-operation of such systems. Moreover, the typical full-battery charging rates of electric vehicles will not be able to cope with the gigantic numbers of vehicles involved in these systems, thus resulting in instabilities and unbounded customer delays. Several recent works [9], [10] have addressed other important problems in autonomous mobility on-demand systems but none of them considered the computational architecture for a massive demand on such services, and the vehicle electrification and charging limitations. In this paper, we suggest to solve the first problem by handling AEMoD system operations in a distributed fashion using fog computing [8]. Fog computing is a novel distributed edge computing architecture that pushes computational resources close to the end entities, to provide them with low latency analytics and optimization solutions. The use of fog computing is justified by the fact that many of the AEMoD operations (e.g., dispatching and charging) are localized. Indeed, vehicles located in any city zone are ones that can reach the customers in that zone within a limited time frame. They will also charge in near-by charging points within the zone. Fig.1 illustrates a candidate fog-based architecture that can support real-time micro-operational decisions (e.g, dispatching and charging) for AEMoD systems with extremely low computation and communications delays. The fog controller in each service zone is responsible of collecting information about customer requests, vehicle in-flow to the service zone, their state-ofcharge (SoC), and the available full-battery charging rates in the service zone. Given the collected information, it can promptly make dispatching, and charging decisions for these vehicles in a timely manner. One way to solve the second problem is to smartly cope with the available charging capabilities of each service zone, and efficiently manage the charging options of different SoC vehicles. This former solution can be achieved by introducing the option of partial vehicle charging instead of fully relying on full vehicle charging only when their batteries are depleted. To efficiently manage this partial charging scheme for different SoC vehicles, and motivated by the fact that different customers can be classified in ascending order of their required trip distances (and thus SoC of their allocated vehicles), this paper proposes a multi-class dispatching and charging system of AEMoD vehicles. Arriving vehicles in each service zone are subdivided into different classes in ascending order of their SoC corresponding to the different customer classes. Different proportions of each class vehicles will be then prompted by the fog controller to either wait (without charging) for dispatching to its corresponding customer class or partially charge to serve the subsequent customer class. Even vehicles arriving with depleted batteries will be allowed to either partially or fully charge to serve the first or last class customers, respectively. The question now is: What is the optimal proportion of vehicles from each class to dispatch or partially/fully charge, to both maintain charging stability and minimize the maximum response time of the system? To address this question, a queuing model representing the proposed multi-class charging and dispatching scheme is first introduced. The stability conditions of this model and the number of classes that fit the charging capabilities of the service zone are then derived. Decisions on the proportions of each class vehicles to partially/fully charge, or directly serve customers are then optimized using a stochastic linear program that minimizes the maximum response time of the system. Finally, the merits of our proposed optimized decision scheme are tested and compared to both the always-charge and the equal split schemes. II. S YSTEM M ODEL We consider one service zone controlled by a fog controller connected to: (1) the service request apps of cutomers in the zone; (2) the AEMoD vehicles; (3) C rapid charging points distributed in the service zone and designed for short-term partial charging; and (4) one spacious rapid charging station designed for long-term full charging. AEMoD vehicles enter the service in this zone after dropping off their latest customers in it. Their detection as free vehicles by the zone’s controller can thus be modeled as a Poisson process with rate λv . Customers request service from the system according to a Poisson process. Both customers and vehicles are classified into n classes based on an ascending order of their required trip distance and the corresponding SoC to cover this distance, respectively. From the thinning property of Poisson processes, the arrival process of Class i customers and vehicles, i ∈ {0, . . . , n}, are both (i) independent Poisson processes with rates λc and λv pi , where pi is the probability that the SoC of an arriving vehicle to the system belongs to Class i. Note that p0 is the probability that a vehicle arrive with a depleted battery, and is thus not able (0) to serve immediately. Consequently, λc = 0 as no customer will request a vehicle that cannot travel any distance. On the other hand, pn is also equal to 0, because no vehicle can arrive to the system fully charged as it has just finished a prior trip. Upon arrival, each vehicle of Class i, i ∈ {1, . . . , n − 1}, will park anywhere in the zone until it is called by the fog Fig. 2: Joint dispatching and partially/fully charging model, abstracting an AEMoD system in one service zone. controller to either: (1) serve a customer from Class i with probability qi ; or (2) partially charge up to the SoC of Class i + 1 at any of the C charging points (whenever any of them becomes free), with probability q i = 1 − qi , before parking again in waiting to serve a customer from Class i + 1. As for Class 0 vehicles that are incapable of serving before charging, they will be directed to either fully charge at the central charging station with probability q0 , or partially charge at one of C charging points with probability q 0 = 1 − q0 . In the former and latter cases, the vehicle after charging will wait to serve customers of Class n and 1, respectively. As widely used in the literature (e.g., [11], [12]), the full charging time of a vehicle with a depleted battery is assumed to be exponentially distributed with rate µc . Given uniform SoC quantization among the n vehicle classes, the partial charging time can then be modeled as an exponential random variable with rate nµc . Note that the larger rate of the partial charging process is not due to a speed-up in the charging process but rather due to the reduced time of partially charging. (i) The customers belonging to Class i, arriving at rate λc , will (i) be served at a rate of λv , which includes the arrival rate of vehicles that: (1) arrived to the zone with a SoC belonging to Class i and were directed to wait to serve Class i customers; or (2) arrived to the zone with a SoC belonging to Class i − 1 and were directed to partially charge to be able to serve Class i customers. Given the above description and modeling of variables, the entire zone dynamics can thus be modeled by the queuing system depicted in Fig.2. This system includes n M/M/1 queues for the n classes of customer service, one M/M/1 queue for the charging station, and one M/M/C queue representing the partial charging process at the C charging points. Assuming that the service zones will be designed to guarantee a maximum time for a vehicle to reach a customer, our goal in this paper is to minimize the maximum expected response time of the entire system. By response time, we mean the time elapsed between the instant when an arbitrary customer requests a vehicle, and the instant when a vehicle starts moving from its parking or charging spot towards this customer. III. S YSTEM STABILITY CONDITIONS In this section, we first deduce the stability conditions of our proposed joint dispatching and charging system, using the basic laws of queuing theory. We will also derive an expression for the lower bound on the number n of needed classes that fit the charging capabilities of any arbitrary service zone. Each of the n classes of customers are served by a separate queue of (i) vehicles, with λv being the arrival rate of the vehicles that are available to serve the customers of the ith class. Consequently, it is the service rate of the customers ith arrival queues. We can thus deduce from Fig. 2 and the system model in the previous section that : λ(i) v = λv (pi−1 q i−1 + pi qi ), i = 1, . . . , n − 1. λ(n) v = λv (pn−1 q n−1 + p0 q0 ) (1) Since we know that q i +qi = 1 Then we substitute q i by 1−qi in order to have a system with n variables λ(i) v = λv (pi−1 − pi−1 qi−1 + pi qi ), i = 1, . . . , n − 1 λ(n) v = λv (pn−1 − pn−1 qn−1 + p0 q0 ) (2) From the well-known stability condition of an M/M/1 queue, we have: (i) λ(i) v > λc , i = 1, . . . , n (3) Before reaching the customer service queues, the vehicles will go through a decision step of either to go to these queues immediately or partially charge. The stability of the charging queues should be guaranteed in order to ensure the global stability of the entire system at the steady state. From the model described in the previous section, and by the wellknown stability conditions of M/M/C and M/M/1 queues, we have the following stability constraints on the C charging points and central charging station queues, respectively: n−1 X λv (pi − pi qi ) < C(nµc ) i=0 (4) λv p0 q0 < µc The following lemma allows the estimation of the average needed in-flow rate of vehicles for a given service zone given its rate of customer demand on AEMoD services. Lemma 1: For the entire system stability, the total arrival rate of the customers belonging to all the classes should be strictly less than the total arrival rate of the vehicles n X λ(i) (5) c < λv i=1 Proof: The proof of Lemma 1 is in Appendix A. Furthermore, the following lemma establishes a lower bound on the number of classes n, given the arrival rate of the vehicles λv , the full charging rate µc , and the number C of partial charging points. Lemma 2: For stability of the charging queues, the number of classes n is the system must obey the following inequality: λv 1 n> − (6) Cµc C Proof: The proof of Lemma 2 is in Appendix B. IV. J OINT C HARGING AND D ISPATCHING OPTIMIZATION A. Problem Formulation The goal of this paper is to minimize the maximum expected response time of the system’s classes. The response time of any class is defined as the average of the duration between any customer putting a request until a vehicle is dispatched to serve him/her. The maximum expected response time of the system can be expressed as:   1 max (7) i∈{1,...,n} λ(i) − λ(i) v c It is obvious that the system’s class having the maximum expected response time is the one that have the minimum expected response rate. In other words, we have:   n o 1 (i) (i) arg max = arg min λ − λ v c i∈{1,...,n} λ(i) − λ(i) i∈{1,...,n} v c (8) . Consequently, minimizing the maximum expected response time is equivalent to maximizing the minimum expected response rate. Using the epigraph form [13] of the latter problem, we get the following stochastic optimization problem: maximize R q0 ,q1 ,...,qn−1 (9a) s.t λv (pi−1 − pi−1 qi−1 + pi qi ) − λ(i) c ≥ R, i = 1, . . . , n − 1 (9b) λv (pn−1 − pn−1 qn−1 + p0 q0 ) − λ(n) ≥R c n−1 X λv (pi − pi qi ) < C(nµc ) (9c) (9d) i=0 λv p0 q0 < µc n−1 X pi = 1, 0 ≤ pi ≤ 1, i = 0, . . . , n − 1 (9e) (9f) i=0 0 ≤ qi ≤ 1, i = 0, . . . , n − 1 R>0 (9g) (9h) The n constraints in (9b) and (9c) represent the epigraph form’s constraints on the original objective function in the right hand (i) side of (8), after separation [13] and substituting every λv by its expansion form in (2). The constraints in (9d) and (9e) represent the stability conditions on charging queues. The constraints in (9f) and (9g) are the axiomatic constraints on probabilities (i.e., values being between 0 and 1, and sum equal to 1). Finally, Constraint (9h) is a positivity constraint on the minimum expected response rate. Clearly, the above equation is a linear program with linear constraints, which can be solved analytically using convex optimization analysis. This will be the target of the next subsection. B. Optimal Dispatching and Charging Decisions The problem in (9) is a convex optimization problem with differentiable objective and constraint functions that satisfies Slater’s condition. Consequently, the KKT conditions provide necessary and sufficient conditions for optimality. Therefore, applying the KKT conditions to the constraints of the problem and the gradient of the Lagrangian function allows us to find the analytical solution of the decisions qi . The Lagrangian function associated with the optimization problem in (9) is given by the following expression: L(q, R, α, β, γ, ω) = −R + n−1 X αi (λv (pi−1 qi−1 − pi qi ) i=1 + R − λv pi−1 + λ(i) c ) + αn (λv (pn−1 qn−1 − p0 q0 ) n−1 X (n) + R − λv pn−1 + λc ) + β0 ( λv (pi − pi qi ) − C(nµc )) Theorem 2: The minimum expected response rate R∗ of the entire system can be expressed as: n  n−1  X X R∗ = λv pi−1 − λc(i) αi∗ + γi∗ (12) i=1 i=0 Proof: The proof of Theorem 2 is in Appendix D. V. S IMULATION R ESULTS In this section, we test the merits of our proposed scheme using extensive simulations. The simulation metrics used to evaluate these merits are the maximum and average expected + β1 (λv p0 q0 − µc ) + γi (qi − 1) − ωi qi + ωn R , response times of the different classes. For all the performed i=0 i=0 full-charging rate of a vehicle is set (10) simulation figures, the to µc = 0.033 mins−1 , and the number of charging points where q is the vector of dispatching decisions (i.e. q = C = 40. Pn (i) [q0 , . . . , qn−1 ]), and where: Fig. 3 illustrates both the interplay of λv and i=1 λc , established in Lemma 1, and effect of increasing the number of • α = [αi ], such that αi is the associated Lagrange classes n beyond its strict lower bound introduced in Lemma multiplier to the i-th customer queues inequality. 2.Fig. 3 depict the maximum and average expected response Pn (i) time for different values of i=1 λc , while fixing λv to 15 • β = [βi ], such that βi is the associated Lagrange −1 min . For this setting, n = 12 is the smallest number of multiplier to the i-th charging queues inequality. classes that satisfy the stability condition in Lemma 2. It is easy to notice that the response times for all values • γ = [γi ], such that γi is the associated Lagrange Pn (i) multiplier to the i-th upper bound inequality. of n increase dramatically when the approaches i=1 λc λv . Moreover, it shows clearly that increasing n beyond its • ω = [ωi ], such that ωi is the associated Lagrange stability lower bound increases both the maximum and average multiplier to the i-th lower bound inequality. response times. We thus conclude that the optimal number of classes is the smallest value satisfying Lemma 2: By applying the KKT conditions on the equality and inequal λ λv 1 1 v  ity constraints, the following theorem illustrates the optimal +1 integer − −  Cµ C Cµ C ∗ c c  solution of the problem in (9) (13) n =  λ 1 i=0 n−1 X n−1 X Theorem 1: The optimal charging/dispatching decisions of the optimization problem in (9) can be expressed as follows:  0 α1∗ > αn∗ q0∗ = 1 α1∗ < αn∗  ∗ 0 αi+1 > αi∗ qi∗ = , i = 1, . . . , n − 1. ∗ 1 αi+1 < αi∗  ∗ q ∗ = p0 q0∗ − λv p0 −λ(1) c −R 1 ∗ ∗ p1 λv p1 if α1 = αn 6= 0 ∗ (n) ∗ q ∗ = p0 q0 − λv p0 −λc −R n−1 pn−1 λv pn−1  ∗ λ p −λ(i) −R∗ q ∗ = pi−1 qi−1 − v i−1λv pic i ∗ ∗ pi if αi+1 = αi 6= 0 ∗ (i+1) ∗ q ∗ = pi qi − λv pi −λc −R i+1 pi+1 λv pi+1 i = 1, . . . , n − 1. (11) Proof: The proof of Theorem 1 is in Appendix C. C. Maximum Expected Response Time Again, since the problem in (9) is convex with convex with differentiable objective and constraint functions, then strong duality holds, which implies that the solution to the primal and dual problems are identical. By solving the dual problem, we can express the optimal value of the maximum expected response time as the reciprocal of the minimum expected response rate of the system, which is introduced in the following theorem.   v Cµc − C Otherwise Fig. 4 depicts the expected response time performances for different distributions of the vehicle SoC and customer trip distances. In this study, we fix λv = 8 and thus n = 7. We can infer from the figure that the response times for Gaussian distributions of trip distances and both Gaussian or decreasing ones for SoCs are the lowest and exhibit the least response time variance. Luckily, these are the most realistic distributions for both variables. This is justified by the fact that vehicles arrive to the system after trips of different distances, which makes their SoC either Gaussian or slightly decreasing. Likewise, customers requiring mid-size distances are usually more than those requiring very small and very long distances. Fig. 5 compares the expected response time performances Pn (i) against i=1 λc , for different decision approaches, namely our derived optimal decisions, always partially charge decisions (i.e. qi = 1 ∀ i) and equal split decisions (i.e. qi = 0.5 ∀ i), for λv = 8 and thus n = 7. These two schemes represent non-optimized policies, in which each vehicle takes its own fixed decision irrespective of the system parameters. The figure clearly shows superior maximum and average performances for our derived optimal policy compared to the other Pn (i) two policies, especially as i=1 λc gets closer to λv , which are the most properly engineerd sceanrios (as large differences between these two quantities results in very low utilization). Gains of 13.3% and 21.3% on the average and maximum performances can be noticed compared to the always charge policy. This shows the importance of our proposed scheme in achieving better customer satisfaction. Total Arrival Rate of the Vehicles λ = 15 Total Arrival Rate of the Vehicles λv = 8 v 25 60 Average, n=12 Optimal ,Average Average, n=14 22.5 55 Equal Split,Average 50 Always Charge,Average Max, n=12 20 Expected Response Time (min) Expected Response Time (min) Average, n=16 Max, n=12 Max, n=12 17.5 15 12.5 10 7.5 5 Optimal ,Max 45 Equal Split,Max 10 9.5 40 Always Charge,Max 8.5 35 7.5 6.5 30 5.5 25 4.5 20 3.5 2.5 5.5 15 5.75 6 10 2.5 5 0 2 3 4 5 6 7 8 9 10 11 n 12 i 13 0 14 2 -1 Total Arrival Rate of the Customers Σ1 λc (min ) Fig. 3: Expected response times for different Pn i=1 (i) λc Total Arrival Rate of the Vehicles λv = 8 Gaussian/Gaussian,Average Decreasing/Gaussian, Average 3.5 4 4.5 5 5.5 6 Fig. 5: Comparison to non-optimized policies. of our proposed optimal decision scheme compared to typical non-optimized schemes, and its performance for different distributions of vehicle SoC and customer trip distances. Decreasing/Uniform, Average 50 Expected Response Time (min) 3 Total Arrival Rate of the Customers Σn1 λic 60 55 2.5 R EFERENCES Gaussian/Gaussian,Max 45 Decreasing/Gaussian,Max 9.5 40 Decreasing/Uniform, Max [1] 7.5 35 30 25 5.5 [2] 3.5 [3] 20 1.5 4.5 15 5 5.5 5.9 3.5 4 [4] 10 5 [5] 0 2 2.5 3 4.5 5 5.5 Total Arrival Rate of the Customers Σn1 λic Fig. 4: Effect of different customer and SoC distributions. VI. C ONCLUSION In this paper, we proposed solutions to the computational and charging bottlenecks threatening the success of AEMoD systems. The computational bottleneck can be resolved by employing a fog-based architecture to distribute the optimization loads over different service zones, reduce communication delays, and matches the nature of dispatching and charging processes of AEMoD vehicles. We also proposed a multiclass dispatching and charging scheme and developed its queuing model and stability conditions. We then formulated the problem of optimizing the proportions of vehicles of each class that will partially/fully charge or directly serve customers as a stochastic linear program, in order to minimize the maximum expected system response time while respecting the system stability constraints. The optimal decisions and corresponding maximum response time were analytically derived. The optimal number of classes both minimizing the response time and matching the vehicle and charging statistics was also characterized. Simulation results demonstrated both the merits [6] [7] [8] [9] [10] [11] [12] [13] W. J. Mitchell, C. E. Borroni-Bird, and L. D. Burns, “Reinventing the Automobile: Personal Urban Mobility for the 21st Century”. Cambridge, MA: The MIT Press, 2010. D. Schrank, B. Eisele, and T. Lomax, “TTIs 2012 Urban Mobility Report,” Texas A&M Transportation Institute, Texas, USA.2012. U. N. E. Programme, “The Emissions Gap Report 2013 - UNEP,” Tech. Rep., 2013. U. E. P. Agency, “Greenhouse Gas Equivalencies Calculator,” Tech.Rep., 2014. [Online]: http://www.epa.gov/cleanenergy/energyresources/refs.html “IoT And Smart Cars: Changing The World For The Better,” Digitalist Magazine, August 30, 2016. [Online]: http://www.digitalistmag.com/iot/2016/08/30/iot-smart-connectedcars-willchange-world-04422640 “Transportation Outlook: 2025 to 2050,” Navigant Research, Q216, 2016. [Online]: http://www.navigantresearch.com/research/transportationoutlook-2025-to-2050. “The Future Is Now: Smart Cars And IoT In Cities,” Forbes, June 13, 2016. [Online]: http://www.forbes.com/sites/pikeresearch/2016/06/13/the-future-isnow-smartcars/63c0a25248c9 “Fog Computing and the Internet of Things: Extend the Cloud to Where the Things Are,” Cisco White Paper, 2015. [Online]:http://www.cisco.com/c/dam/en us/solutions/trends/iot/docs/computingoverview.pdf R. Zhang, K. Spieser, E. Frazzoli, and M. Pavone, “Models, Algorithms, and Evaluation for Autonomous Mobility-On-Demand Systems,” in Proc. of American Control Conf., Chicago, Illinois, 2015. R. Zhang, F. Rossi, and M. Pavone, “Model Predictive Control of Autonomous Mobility-on-Demand Systems,” in Proc. IEEE Conf. on Robotics and Automation, Stockholm, Sweden, 2016. H. Liang, I. Sharma, W. Zhuang, and K. Bhattacharya,“Plug-in Electric Vehicle Charging Demand Estimation based on Queueing Network Analysis,” IEEE Power and Energy Society General Meeting, 2014. K. Zhang, Y. Mao, S. Leng, Y. Zhang, S. Gjessing, and D.H.K. Tsang, “Platoon-based Electric Vehicles Charging with Renewable Energy Supply: A Queuing Analytical Model,” in Proc. of IEEE International Conference on Communications (ICC16), 2016. S. Boyd and L. Vandenberghe, “Convex Optimization”, 1st ed. Cambridge: Cambridge University Press, 2015. A PPENDIX C P ROOF OF T HEOREM 1 A PPENDIX A P ROOF OF L EMMA 1 Applying the KKT conditions to the inequalities constraints of (9), we get: From (2) and (3) we have : λ(i) c < λv (pi−1 q i−1 + pi qi ), i = 1, . . . , n − 1. λ(n) < λv (pn−1 q n−1 + p0 q0 ), i = n c (14) The summation of all the inequalities in (14) gives a new inequality n X n−1 X λ(i) c < λv [ i=1 n X (15) λ(i) c < λv [p0 q 0 + p1 q1 + p1 q 1 + ... + pn−1 q n−1 + p0 q0 ] i=1 (16) We have q i + qi so pi q i + pi qi = pi λ(i) c < λv (p0 + p1 + p2 + ... + pn−1 ) (17) i=1 We have Pn−1 i=0 ∗ αn∗ (λv (pn−1 qn−1 − p0 q0∗ ) + R∗ − λv pn−1 + λ(n) c ) = 0. n−1 X β0∗ ( λv (pi − pi qi∗ ) − C(nµc )) = 0. i=0 (pi−1 q i−1 + pi qi ) + (pn−1 q n−1 + p0 q0 )] i=1 n X ∗ αi∗ (λv (pi−1 qi−1 − pi qi∗ ) + R∗ − λv pi−1 + λ(i) c )=0 i = 1, . . . , n − 1. pi = 1 so Pn i=1 (i) λc < λv β1∗ (λv p0 q0∗ − µc ) = 0 γi∗ (qi∗ − 1) = 0, i = 0, . . . , n − 1. ωi∗ qi∗ = 0, i = 0, . . . , n − 1. ωn∗ R∗ = 0. (22) Likewise, applying the KKT conditions to the Lagrangian function in (10), and knowing that the gradient of the Lagrangian function goes to 0 at the optimal solution, we get the following set of equalities: ∗ λv pi (αi+1 − αi∗ ) = ωi∗ − γi∗ , i = 1, . . . , n − 1. λv p0 (α1∗ − αn∗ ) = ω0∗ − γ0∗ n−1 X αi∗ = 1 (23) i=1 From Burke’s theorem on the stability condition of the queues, the constraints on the charging queues are strict inequalities and the constraints on R should also be strictly larger than 0. Combining the Burke’s theorem and the equations on (22), we find that all the β0∗ = β1∗ = 0 and ωn∗ = 0. Knowing that the gradient of the Lagrangian goes to 0 at the optimal solutions, we get the system of equalities given by (23). The fact that βi∗ = 0 and ωn∗ = 0 explains the absence of βi∗ and ωn∗ in (11) The result given by multiplying the first equality in (23) by qi∗ and the second equality by q0∗ combined with the last three equalities given by (22) gives : A PPENDIX B P ROOF OF L EMMA 2 The summation of the inequalities given by (4) ∀ i = {0, . . . , n} gives the following inequality : λv n−1 X pi − λv i=0 n−1 X pi qi + λv p0 q0 < C(nµc ) + µc (18) (24) i=1 (24) Inserted in the fifth equality in (22) gives : i=0 Pn−1 Since i=0 pi = 1 (because pn = 0 as described in Section 2), we get: λv − λv ∗ λv pi (αi+1 − αi∗ )qi∗ = −γi∗ , i = 1, . . . , n − 1. λv p0 (α1∗ − αn∗ )q0∗ = −γ0∗ n−1 X αi∗ = 1 n−1 X pi qi < µc (Cn + 1) (19) i=1 In the worst case, all the vehicles will be directed to partially charge before serving, which means that always qi = 0. Therefore, we get: λv Cn > −1, (20) µc which can be re-arranged to be: λv 1 n> − (21) Cµc C ∗ λv pi (αi+1 − αi∗ )(qi∗ − 1)qi∗ = 0, i = 1, . . . , n − 1. ∗ λv p0 (α1 − αn∗ )(q0∗ − 1)q0∗ = 0 (25) n−1 X ∗ αi = 1 i=1 From (25) we have 0 < q0∗ < 1 only if α1∗ = αn∗ And 0 < qi∗ < ∗ 1 only if αi+1 = αi∗ Since 0 ≤ qi∗ ≤ 1 then these equalities may not always be true if α1∗ > αn∗ and we know that γ0∗ ≥ 0 then γ0∗ = 0 which gives q0∗ = 6 1 and q0∗ = 0. ∗ if αi+1 > αi∗ and we know that γi∗ ≥ 0 then γi∗ = 0 which ∗ gives qi 6= 1 and qi∗ = 0 if α1∗ < αn∗ then γ0∗ > 0 (it cannot be 0 because this will contradict with the value of qi ), which implies that q0∗ = 1. where:  ∗ αi+1 αi∗ γi∗ > 0 (it cannot be 0 because this then < if contradicts with the value of qi ), which implies that qi∗ = 1 x(n+1×1)   =  q q0 q1 .. . n−1          =   c(n+1×1) b(3n+4×1) ∗ Finally, if αi+1 = αi∗ 6= 0 (they cannot be equal to 0 at the same time, which means that qi = 1, and we know in advance that this cannot be the case here), we have qi∗ = ∗ pi−1 qi−1 pi qi∗ λ p −λ(i) −R∗ λ p −λ(i+1) −R∗ ∗ = pi+1 − v i−1λv pic and qi+1 − v i λv pc i+1 pi       −1 R (1) λc  Otherwise , if α1∗ = αn∗ 6= 0 (they cannot be equal to 0 at the same time, which means that q0 = 1, and we know in advance that this cannot be the case here), we have q1∗ = ∗ p0 q0∗ λv p0 −λ(1) λ p −λc(n) −R∗ p0 q0∗ ∗ c −R and qn−1 − v 0λv pn−1 = pn−1 p1 − λ v p1 0 0 0 .. .  λv p0 −   ..   .   (n)  λ p  v n−1 − λc   C(nµ ) − λ  c v     µc     1   =  ..   .     1     ∞   0     ..   . 0 (28) A(3n+4×n+1) = λ p −λ p v 0 A PPENDIX D P ROOF OF T HEOREM 2 To prove this theorem, we first start by putting the problem on the standard linear programming form as follows:  0  ..  .   0 −λ p  v 0 −λv p0   λ v p0      v 1 λv p1 .. . ... 0 −λv p1 0 0 −λv p2 .. . 0 ... ... ... ... ... .. . λv pn−2 ... ... ... 0 0 .. . −λv pn−1 λv pn−1 −λv pn−1 ... In+1 −In+1 minimize − R λv (pn−1 qn−1 − p0 q0 ) + R ≤ λv pn−1 − λ(n) c . Constraint on charging vehicles queues n−1 X − λv pi qi∗ < C(nµc ) − λv i=0 λv p0 q0 < µc Constraint on probabilities and decisions qi ≤ 1, i = 0, . . . , n − 1. − qi ≤ 0, i = 0, . . . , n − 1. − R < 0. n−1 X pi = 1, 0 < pi < 1, i = 0, . . . , n − 1. We will used this combined notation for ease and clarity of notation. The Lagrange dual function is expressed as: (26) X cT x subject to Ax  b L(x, ν) = cT x + ν T (Ax − b) = −bT + (AT ν + c)T x , (30) where ν is the vector of the dual variables or Lagrange multipliers vector associated with the problem 27. Each element νi of ν is the Lagrange multiplier associated with the i-th inequality constraint ai x − bi ≤ 0, where ai and bi are the the i-th row and and i-th element of matrix A and vector b, respectively. In fact ν is the vector that includes all the vectors α, β, γ, ω as follows: ν T(1×3n+4) = (α1 . . . αn β0 β1 γ0 . . . γn ω0 . . . ωn ) (31) Writing the problem on its matrix form, we get: minimize                The matrix form of the Lagrangian function can be thus expressed as: Lagrangian : λv (pi−1 qi−1 − pi qi ) + R ≤ λv pi−1 − λ(i) c , i = 1, . . . , n − 1. i=0  (29) q0 ,q1 ,...,qn−1 subject to Constraint on costumers arrivals queues 1 1 .. . 1 1 0 0 g(ν) = inf L(x, ν) = −bT ν + inf (AT ν + c)T x , x (27) x (32) The solution for this function is easily determined analytically, since a linear function is bounded below only when it is identically zero. Thus, g(ν) = −∞ except when AT ν+c = 0, where 0 is the all zero vector. Consequently, we have:  T −b ν AT ν + c = 0 g(ν) = −∞ ortherwise (33) For each ν  0 (i.e., νi ≥ 0 ∀ i), the Lagrange dual function gives us a lower bound on the optimal value of the original optimization problem. This leads to a new equivalent optimization problem, which is the dual problem: maximize ν g(ν) = −bT ν (34) subject to AT ν + c = 0 ν0 Applying Slater’s Theorem for duality qualification, and since strong duality holds for the considered optimization problem, then solving the dual problem gives the exact optimal solution for the primal problem. This is described by the equality : g(ν ∗ ) = −bT ν ∗ = cT x∗ = −R∗ (35) By expanding on the values of b and ν in the above equation, the optimal value of R∗ can be expressed as: ∗ R = n X i=1 (λv pi−1 − ∗ λ(i) c )αi + n−1 X i=0 γi∗ (36)
3cs.SY
Stochastic Global Optimization Algorithms: A Systematic Formal Approach arXiv:1706.02246v1 [cs.AI] 7 Jun 2017 Jonatan Gomez1 Abstract As we know, some global optimization problems cannot be solved using analytic methods, so numeric/algorithmic approaches are used to find near to the optimal solutions for them. A stochastic global optimization algorithm (SGoal) is an iterative algorithm that generates a new population (a set of candidate solutions) from a previous population using stochastic operations. Although some research works have formalized SGoals using Markov kernels, such formalization is not general and sometimes is blurred. In this paper, we propose a comprehensive and systematic formal approach for studying SGoals. First, we present the required theory of probability (σ-algebras, measurable functions, kernel, markov chain, products, convergence and so on) and prove that some algorithmic functions like swapping and projection can be represented by kernels. Then, we introduce the notion of join-kernel as a way of characterizing the combination of stochastic methods. Next, we define the optimization space, a formal structure (a set with a σ-algebra that contains strict ǫ-optimal states) for studying SGoals, and we develop kernels, like sort and permutation, on such structure. Finally, we present some popular SGoals in terms of the developed theory, we introduce sufficient conditions for convergence of a SGoal, and we prove convergence of some popular SGoals. Keywords: Stochastic Global Optimization; Markov model; Markov Kernel; σ-algebra; Optimization space; Convergence 1. Stochastic Global Optimization A global optimization problem is formulated in terms of finding a point x in a subset Ω ⊆ Φ where a certain function f : Φ → R, attains is best/optimal value (minimum or maximum) [1]. In the optimization field, Ω, Φ, and f are called the feasible region, the solution space, and the objective function, respectively. The optimal value for the objective function (denoted as f ∗ ∈ R) is suppose to exist and it is unique (R is a total order). In this paper, the global Email address: [email protected] (Jonatan Gomez) of Computer Science and Engineering, Universidad Nacional de Colombia, Bogotá, Colombia 1 Department Preprint submitted to Elsevier June 8, 2017 optimization problem will be considered as the minimization problem described by equation 1. min (f : Φ → R) = x ∈ Ω ⊆ Φ | (∀y ∈ Ω) (f (x) ≤ f (y)) (1) Since a global optimization problem cannot be solved, in general, using analytic methods, numeric methods are largely applied in this task [2, 3]. Some numeric methods are deterministic, like Cutting plane techniques [4], and Branch and Bound [5] approaches while others are stochastic like Hill Climbing and Simulated Annealing. Many stochastic methods, like Evolutionary Algorithms and Differential Evolution, are based on heuristics and metaheuristics [6, 7, 8, 9]. In this paper, we will concentrate on Stochastic Global Optimization Methods (algorithms). A Stochastic Global Optimization ALgorithm (SGoal) is an iterative algorithm that generates a new candidate set of solutions (called population) from a given population using a stochastic operation, see Algorithm 1. Algorithm 1 Stochastic Global Optimization Algorithm. SGoal(n) 1. t0 = 0 2. P = InitPop(n) 3. while ¬End(Pt , t) do 4. Pt+1 = NextPop( Pt ) 5. t = t + 1 6. return best(Pt ) In Algorithm 1, n is the number of individuals in the population (population’s size)2 , Pt ∈ Ω n is the population at iteration t ≥ 0, InitPop:N → Ω n is a function that generates the initial population (according to some distribution), NextPop:Ω n → Ω n is a stochastic method that generates the next population from the current one (the stochastic search), End:Ω n × N → Bool is a predicate that defines when the SGoal(n) process is stopped and Best:Ω n → Ω is a function that obtains the best candidate solution (individual) in the population according to the optimization problem under consideration, see equation 2. Best (x) = xi | ∀nk=1 f (xi ) ≤ f (xk ) ∧ f (xi ) < ∀i−1 k=1 f (xk ) (2) Although there are several different SGoal models, such models mainly vary on the definition of the NextPop function. Sections 1.1 to 1.3 present three popular SGoals reported in the literature. 2 Although, parameters that control the stochastic process, like the size of the population, can be adapted (adjusted) during the execution of a SGoal, in this paper we just consider any SGoal with fixed control parameters (including population’s size). 2 1.1. Hill Climbing (HC) The hill climbing algorithm (HC), see Algorithm 2, is a SGoal that uses a single individual as population (n = 1), generates a new individual from it (using the stochastic method Variate:Ω → Ω), and maintains the best individual among them (line 2). Notice that HC allows to introduce neutral mutations3 if the greather or equal operator (≥) is used in line 2. In order to maintain more than one individual in the population, the HC algorithm can be parallelized using Algorithm 3. Algorithm 2 Hill Climbing Algorithm - NextPop Method. NextPopHC ({x}) 1. x′ = Variate(x) 2. if f (x′ ) {>, ≥} f (x) then x′ = x 3. return {x′ } Algorithm 3 Parallel Hill Climbing Algorithm (PHC) - NextPop Method. NextPopPHC (P ) 1. {Qi } = NextPopHC ({Pi }) for all i = 1, 2, . . . , |P | 2. return Q 1.2. Genetic Algorithms ( Ga) Genetic algorithms (Ga)s are optimization techniques based on the principles of natural evolution [6]. Although there are several different versions of Gas, such as Generational Genetic (GGa) algorithms and Steady State Genetic (SSGa) algorithms, in general, all Gas have the same structure. Major differences between them are in the encoding scheme, in the evolution mechanism, and in the replacement mechanism. Algorithms 4 and 5 present the GGa and SSGa, respectively. There, PickParents:Ω n → N2 picks two individuals (indices) as parents, XOver:Ω 2 → Ω 2 combines both of them and produces two new individuals, Mutate:Ω 2 → Ω 2 produces two individuals (offspring) that are mutations of such two new individuals, Best2 :Ω 4 → Ω 2 picks the best two individuals between parents and offspring, and Bernoulli(r) generates a true value following a Bernoulli distribution with probability CR. 1.3. Differential Evolution ( DE) Differential Evolution (DE) algorithm is an optimization technique, for linear spaces, based on the idea of using vector differences for perturbing a candidate solution, see Algorithm 6. Here, Ω is a d-dimensional linear search space, PickDifParents:N × N → N3 gets three individuals (indices a, b, and c) that 3 A neutral mutation is a variation in the individual that does not change the value of the objective function [10]. 3 Algorithm 4 Generational Genetic Algorithm (GGa) - NextPop Method. NextPopGGa (P ) 1. for i = 1 to n2 2. {a, b} =PickParents(P ) 3. if Bernoulli(CR) then {Q2i−1 , Q2i } = Mutate(XOver(Pa , P b )) 4. else {Q2i−1 , Q2i } = {Pa , Pb } 5. return Q Algorithm 5 Steady State Genetic Algorithm (SSGa) - NextPop Method. NextPopSSGa (P ) 1. {a, b} = PickParents(P ) 2. Qk = Pk for all k = 1, 2, . . . |P |, k 6= a, b 3. if Bernoulli(CR) then {c1 , c2 } = Mutate(XOver(Pa , Pb )) 4. else {c1 , c2 } = Mutate(Pa , Pb ) 5. {Qa , Qb } = Best2 (c1 , c2 , Pa , Pb ) 6. return Q are different from each other and different from the individual under consideration (i), 0 ≤ CR ≤ 1 is a crossover rate, and 0 ≤ F ≤ 2 is the difference weight. Algorithm 6 Differential Evolution Algorithm (DE) - NextPop Method. NextIndDE (P , i) 1. {a, b, c} = PickDifParents(|P |, i) 2. R ∼ N [1, d] 3. for k = 1 to d 5. if Bernoulli(CR) or k = R then qk = Pa,k + F ∗ (Pb,k − Pc,k ) 6. else qk = Pi,k 7. return q NextPopDE (P ) 1. for i = 1 to n 2. Qi = NextIndDE (P, i) 3. return Q 2. Measure and Probability Theory In this section, we introduce the basic measure and probability theory concepts that are required for a formal treatment of SGoals. First, we will concentrate on the concept of family of sets, required for formalizing concepts like event and random observation (subsections 2.1 and 2.2). Next, we will cover the concepts of measurable, measure, and probability measure functions (subsection 2.3) that are required for defining and studying the notion of Kernel (subsection 4 2.4), notion that will be used as formal characterization of stochastic methods used by SGoals. Then, we will present the concept of Markov chains (subsection 2.5), concept that is used for a formal treatment of SGoals. Finally, we introduce two concepts of random sequence convergence (subsection 2.6) for studying the convergence properties of a SGoal. 2.1. Family of Sets Probability theory starts by defining the space of elementary events (a nonempty set Ω) and the system of observable events (a family of subsets of Ω). In the case of a formal treatment of a SGoal, the space of elementary events is the set of possible populations while the system of observable events is defined by any subset of populations that can be generated, starting from a single population, through the set of stochastic methods used by the SGoal. In the rest of this paper, let Ω 6= Ø be a non-empty set (if no other assumption is considered). Definition 1. (Power Set) Let Ω be a set, the power set of Ω, denoted as 2Ω , is the family of all subsets of Ω, i.e. 2Ω = {A | A ⊆ Ω}. Clearly, the system of observable events is a subset A of 2Ω that satisfies some properties. Here, we introduce families of sets with some properties that are required for that purpose. Then, we stablish a relation between two of them. Definition 2. Let A ⊆ 2Ω be a family of subsets of Ω. T df (disjoint family) A is a disjoint family if A B = ∅ for any pair of A 6= B ∈ A. cf (countable family) A is a countable family if A = {Ai }i∈I for some countable set I. cdf (countable disjoint family) A is a countable disjoint family if A is cf and . c (close under complements) A is close under complements if A ∈ A then Ac ≡ Ω \ A ∈ A. pd (close under proper differences) A is close under proper differences if A, B ∈ A and A ⊂ B then B \ A ∈ A. cdu (close under countable disjoint unions) A is close under countable S disjoint unions if i∈I Ai ∈ A for all {Ai ∈ A}i∈I cdf. cu (close under countable unions) A is close under countable disjoint S unions if i∈I Ai ∈ A for all {Ai ∈ A}i∈I cf. ci (close underTcountable intersections) A is close under countable intersections if i∈I Ai ∈ A for all {Ai ∈ A}i∈I cf. π (π-system) A is T a π-system if it is close under finite intersections, i.e. if A, B ∈ A then A B ∈ A. λ (λ-system) A is called λ-system iff (λ.1) Ø ∈ A, (λ.2) A is pd and (λ.3) A is cdu. Lemma 3. Let A ⊆ 2Ω 5 1. ( λ → pd) If A is λ-system then A is pd. 2. ( c → (cu ↔ ci)) If A is c then A is cu iff A is ci. T Proof. [1. λ → S pd] If A, B ∈ A then B c ∈ A (λ.2:A is c). Clearly, A B c = Ø S c (A T ⊂ B) and A B c ∈ A (λ.3:A is cdu). So, (A B c ) ∈ A (λ.2:A is c), i.e., Ac B ∈ A (Morgan’s law). Therefore, B \ A ∈ A (def. proper difference). [2. c → (cu ↔ ci)] If {Ai }i∈I is cf in A, then {Aci }i∈I is cf in A (A is c). Now, c S T if A is cu then i∈I Ai = Ac ∈ A (Morgan’s law andA is c), so A is ci.  S i∈I i T c c ∈ A (Morgan’s law and A is c), Finally, if A is ci then i∈I Ai = i∈I Ai so A is cu. 2.2. σ-algebras Although each family of sets, in definition 2, is very interesting on its own, none of them allows by itself to define, in a consistent manner, a notion of probability. As we will see, σ-algebras play this role in a natural way. Definition 4. (σ-algebra) A family of sets Σ ⊆ 2Ω is called a σ-algebra over Ω, iff (σ.1) Ω ∈ Σ, (σ.2) Σ is c, and (σ.3) Σ is cu. Now, we can stablish some relations between σ-algebras and some of the previously defined families of sets. These relations are very useful when dealing with notions like measure, measurable, and kernel. Lemma 5. Let Σ be a σ-algebra over Ω. 1. 2. 3. 4. Ø∈Σ Σ is ci. Σ is a λ-system. Σ is pd. Proof. [1] Ω ∈ Σ (σ.1) then Ø ∈ Σ (σ.2:Σ is c). [2] Follows from σ.2, σ.3 and lemma 3. [3] λ.1 follows from (1), λ.2 and λ.3 follow from σ.2 and σ.3, respectively. [4] Follows from (3) and lemma 3. Proposition 6. Let Ω be a set 1. 2Ω is a σ-algebra T 2. If {Σi }i∈I is a family of σ-algebras over Ω then i∈I Σi is a σ-algebra over Ω. 3. If A ⊆ 2Ω is an arbitrary family T of subsets of Ω then the minimum σalgebra generated by A is σ (A) = {Σ | A ⊆ Σ and Σ is σ-algebra}. T T Proof. T [1] Obvious. [2] Ω ∈ Σi for all i ∈ I (σ.1) then Ω ∈ i∈I Σi (def. ). If A ∈ i∈I Σi then A ∈ Σi for all i ∈ I, then Ac ∈ Σi for all i ∈ I (σ.2 : Σi is T T T c), therefore Ac ∈ i∈I Σi (def. ). If Aj ∈ i∈I Σi j∈J is cf then Aj ∈ Σi for all j ∈ J and i ∈ I, then {Aj ∈ Σi }j∈J is cf in Σi for all i ∈ I, therefore S T T S ). [3] j∈J Aj ∈ Σi for all i ∈ I (σ.3: Σi is cu). So, i∈I Σi (def. j∈J Aj ∈ Follows from (1) and (2). 6 Theorem 7. (Dynkin π-λ theorem) Let A be a λ-system and let E ⊆ A be a π-system then σ (E) ⊆ A. Proof. A proof of this theorem can be found on page 6 of Kenkle’s book [11] (Theorem 1.19). Now, notions of measure and probability measure are defined on the real numbers (R), usually equipped with the Euclidean distance, so we need to define an appropiated σ-algebra on it. Such appropiated σ-algebra can be defined as a special case of a σ-algebra for topological spaces. Definition 8. (Borel σ-algebra) Let (Ω, τ ) be a topological space. The σalgebra B (Ω) ≡ B (Ω, τ ) ≡ σ (τ ) is called the Borel σ-algebra on Ω and every A ∈ B (Ω, τ ) is called Borel (measurable) set. Proposition 9. If B (R) is the Borel σ-algebra where R is equipped with the Euclidean distance, then B (R) = σ (E7 ) with E7 = {(α, β] | α, β ∈ Q, α < β}. Proof. A proof of this proposition can be found on page 9 of Kenkle’s book [11] (Theorem 1.23). Now, we are ready to define the basic mathematical structure used by probability theory. Definition 10. (measurable space) If Σ is a σ-algebra over a set Ω then the pair (Ω, Σ) is called a measurable space. Sets in Σ are called measurable sets on Ω. 2.3. Functions Having the playground defined (space of elementary events and observable events), probability theory defines operations over them (functions). Such functions will allow us to characterize stochastic methods used by a SGoal. First, we introduce the concepts of set function and inverse function, that are used when working on σ-algebras. Definition 11. (set functions) Let f : Ω1 → Ω2 be a function, 1. The power set function of f is defined as 2Ω1 −→ 2Ω2 A 7−→ {f (x) | ∀ (x ∈ A)} 2. The inverse function of f is defined as f: f −1 : 2Ω2 B −→ 2Ω1 7−→ {x ∈ Ω1 | (∃y ∈ B) (y = f (x))} Next, we study the measurable functions, structure-preserving maps (homomorphisms between measurable spaces). A measurable function guarantees that observable events are obtained by applying the function to observable events. For SGoals, a measurable function (stochastic methods) basically means that any generated subset of populations must be obtained by applying the stochastic methods to some generated subset of populations. 7 Definition 12. (measurable function) Let (Ω1 , Σ1 ) and (Ω2 , Σ2 ) be measurable spaces and f : Ω1 → Ω2 be a function. Function f is called Σ1 − Σ2 measurable if for every measurable set B ∈ Σ2 , its inverse image is a measurable set in (Ω1 , Σ1 ), i.e., f −1 (B) ∈ Σ1 . Corollary 13. Let (Ω1 , Σ1 ), (Ω2 , Σ2 ) and (Ω3 , Σ3 ) be measurable spaces and f : Ω1 → Ω2 be Σ1 − Σ2 measurable and g : Ω2 → Ω3 be Σ2 − Σ3 measurable then g ◦ f : Ω1 → Ω3 is Σ1 − Σ3 measurable. Proof. If A ∈ Σ3 then g −1 (A) ∈ Σ2 (g is Σ2 − Σ3 measurable), therefore  f −1 g −1 (A) ∈ Σ1 (f −1 is Σ1 − Σ2 measurable). Clearly, f −1 g −1 (A) = −1 (g ◦ f ) (A) ∈ Σ1 (def inverse). In this way, g ◦ f is Σ1 − Σ3 measurable. Definition 14. (isomorphism of measurable spaces) Let (Ω1 , Σ1 ) and (Ω2 , Σ2 ) be measurable spaces and ϕ : Ω1 → Ω2 be a bijective function. ϕ is called (Ω1 , Σ1 )-(Ω2 , Σ2 ) isomorphism ((Ω1 , Σ1 ) and (Ω2 , Σ2 ) are called isomorphic) if ϕ is Σ1 − Σ2 measurable and ϕ−1 is Σ2 − Σ1 measurable. After that, we consider measure functions, functions that quantify, in some way, how much observable events are. This concept of measure fuction is the starting point on defining probability measure functions. In the following, we just write f is measurable instead of f is Σ1 − Σ2 measurable if the associated σ-algebras can be inferred from the context. Definition 15. (measure function) Let (Ω, Σ) be a measurable S space and µ : Σ → R be a function from Σ to the extended reals (R = R {−∞, ∞}). Function µ is called measure if it satisfies the following three conditions: µ.1 (nullity) µ (Ø) = 0. µ.2 (non-negativity) µ (A) ≥0 for all A ∈ Σ. P S µ.3 (σ-additivity) µ i∈I Ai = i∈I µ (Ai ) for all {Ai ∈ Σ}i∈I cdf. Then, we consider probability measure functions, functions that quantify, how probable observable events are. For SGoals, a probability function will quantify how probable a set of populations can be generated using stochastic methods. Definition 16. Let (Ω, Σ) be a measurable space and µ : Σ → R be a measure. 1. (finite measure) µ is a finite measure if µ (A) < ∞ for all A ∈ Σ. 2. (probability measure) µ is a probability measure if µ (Ω) = 1. Now, we are ready to define the mathematical structure used by probability theory. Definition 17. If (Ω, Σ) is a measurable space and µ : Σ → R is a measure function 1. (measure space) (Ω, Σ, µ) is called measure space. 2. (probability space) If µ is a probability measure, (Ω, Σ, µ) is called probability space. 8 Finally, we can define the concept of random variable, a function that preserves observable events and quantifies how probable an observable event is. Definition 18. (random variable) Let (Ω1 , Σ1 , P r) be a probability space and (Ω2 , Σ2 ) be a measurable space. If X : Ω1 → Ω2 is a measurable function then X is called a random variable with values in (Ω2 , Σ2 ).   For A ∈ Σ2 , we denote {X ∈ A} ≡ X −1 (A) and P r [X ∈ A] ≡ P r X −1 (A) . In particular, if (Ω2 , Σ2 ) = (R, B (R)), then X is called a real random variable and we let P r [X ≥ 0] ≡ X −1 ([0, ∞)). 2.4. Kernel As pointed by Breiman in Section 4.3 of [12], the kernel is a regular conditional probability K (x, A) = P (x, A) = P r [Xt ∈ A | Xt−1 = x]. For SGoals, a kernel will be used for characterizing the stochastic process carried on iteration by iteration (generating a population from a population). Definition 19. (Markov kernel) Let (Ω1 , Σ1 ) and (Ω2 , Σ2 ) be measurable spaces. A function K : Ω1 × Σ2 → [0, 1] is called a (Markov) kernel if the following two conditions hold: K.1 Function Kx,• : A 7→ K(x, A) is a probability measure for each fixed x ∈ Ω1 and K.2 Function K•,A : x 7→ K(x, A) is a measurable function for each fixed A ∈ Σ2 . Remark 20. As noticed by Kenkle in Remark 8.26, page 181 of [11], it is sufficient to check K.2 in definition 19 for sets A from a π-system E that generates Σ2 and that either contains o A or a sequence An ↑ A . Indeed, in this case, D = n −1 A ∈ Σ2 | K•,A ∈ Σ1 is a λ-system. Since E ⊂ D, by the Dynkin π−λ theorem (7), D = σ (E) = Σ2 . If the transition density K : Ω1 × Ω2 → [0, 1] exits, then the transition kernel can be defined using equation 3. In the rest of this paper, we will consider kernels having transition densities. ˆ K (x, y) dy (3) K (x, A) = A Kernels that will play a main role in a systematic development of a formal theory for SGoals are those associated to deterministic methods that are used by a particular Sgoal, like selecting any/the best individual in a population, or sorting a population. Theorem 21 provides a sufficient condition for characterizing deterministic methods as kernels. Theorem 21. (deterministic kernel) Let (Ω1 , Σ1 ) and (Ω2 , Σ2 ) be measurable spaces, and f : Ω1 → Ω2 be Σ1 − Σ2 measurable. The function 1f : Ω1 × Σ2 → [0, 1] defined as follow is a kernel.  1 if f (x) ∈ A 1f (x, A) = 0 otherwise 9 Proof. [well-defined] Obvious, it is defined using the membership predicate and takes only two values 0 and 1. [K.1] Let x ∈ Ω1 , clearly 1f x,• (A) ≥ 0 for all A ∈ Σ2 so 1f x,• is non-negative.U Now, 1f (x, Ø) =U 0 so it  satisfies µ.1. Let {Ai ∈ Σ2 }i∈I be a cdf. If x ∈ i∈I AiUthen 1f x, i∈I Ai = 1 (def 1f (x, A)), and ∃k ∈ I such that x ∈ Ak (def ). Therefore, x ∈ / Ai for all i 6= k ∈ I ({Ai ∈ Σ}i∈I is df) so 1f (x, Ak ) = 1 and 1f (x, Ai ) = 0 for all P U 1 (A ). A i 6= k ∈ I (def 1f (x, A)). Clearly, 1f x,• i∈I i∈I Ai = 1 = U f x,•  i U similar proof is carried on when x ∈ / i∈I Ai , in this case 1x,• i∈I Ai = 0 = P i∈I 1f x,• (Ai ). Then, 1f x,• is σ-additive, so it is a measure. 1f (x, Ω2 ) = 1 (obvious) then 1f x,• is a probability measure for a fixed x ∈ Ω1 . [K.2] Let A ∈ Σ2 and α ∈ Q+ . If α < 1 then 1−1 / f •,A ((0, α]) = Ø (1f (x, A) = {0, 1} ∈ −1 (0, α]), so 1−1 ((0, α]) ∈ Σ (lemma 5.1). Now, ifα ≥ 1 then 1 ((0, α]) = 1 f •,A f •,A {x ∈ Ω1 | 1f (x, A) = 1 ∈ (0, α]} (1f (x, A) = 1 is the only value in (0, α]), i.e., −1 1−1 (A) (def f −1 ), so 1−1 f •,A ((0, α]) = {x ∈ Ω1 | f (x) ∈ A} = f f •,A ((0, α]) ∈ Σ1 (f is measurable). Therefore, 1f •,A is measurable. Corollary 22. (Indicator kernel) Let (Ω, Σ) be a measurable space. The indicator function 1 : Ω × Σ → [0, 1] defined as 1 (x, A) = 1id(x) (A), with id (x) = x is a kernel. Proof. According to theorem 21, it is sufficient to prove that id is a measurable function. It is obvious, we have that A = id (A) = id−1 (A) (def id) then id−1 (A) ∈ Σ if A ∈ Σ. Transition probabilities (kernels) also represent linear operators over infinitedimensional vector spaces [13, 14]. Therefore, operations like kernels multiplication, and kernels convex combinations can be used in order to preserve the Markovness property of the resulting transition kernel (sometimes called update mechanism). 2.4.1. Random Scan (Mixing) The random scan (mixing) update mechanism follows the idea of picking one update mechanism (among a collection of predefined update mechanisms) and then applying it. Such update mechanism is picked according to some weigth associated to each one of the update mechanism. Following this idea, the mixing update mechanism is built using kernels addition and kernel multiplication by a scalar. In order to maintain the Markovness property (both operations, kernels addition and kernel multiplication by a scalar, in general, do not preserve such property), a convex combination of them is considered. Definition 23. (mixing) The mixing update mechanism of a set of n Markov transition kernels P K1 , ..., Kn , each of them with a probability of being picked p1 , p2 , . . . , pn ( pi = 1), is defined by equation 4. n X i=1 pi K 1 ! (x, A) = ˆ X n A i=1 10 pi Ki (x, y) dy (4) Since the integral in equation 4 is a linear operator, the mixing operation can be defined by equation 5. ! ˆ n n X X pi Ki (x, y) dy (5) pi K1 (x, A) = i=1 i=1 A 2.4.2. Composition The composition update mechanism follows the idea of applying an update mechanism (kernel) followed by other update mechanism and so on. Following this idea, the composition update mechanism is built using the kernel multiplication operator. Definition 24. (composition) The composition of two kernels K1 , K2 is defined by equation 6. (K2 ◦ K1 ) (x, A) = ˆ K2 (y, A) K1 (x, dy) (6) Since the kernel multiplication is an associative operation (using the conditional Fubini theorem, see Theorem 2 of Chapter 22, page 431 of the book of Fristedt and Gray [15]), the composition of update mechanisms that corresponds to a set of n transition kernels K1 , ..., Kn is defined as the product kernel Kn ◦ Kn−1 ◦ . . . ◦ K1 . 2.4.3. Transition’s Kernel Iteration The transition probability t-th iteration (application) of a Markovian kernel K, given by equation 7, describes the probability to transit to some set A ∈ Σ within t steps when starting at state x ∈ Ω.   ,t=1 K ˆ (x, A) (t) K (x, A) = (7) K (t−1) (y, A) K (x, dy) , t > 1   Ω If p : Σ → [0, 1] is the initial distribution of subsets, then the probability that the Markov process is in set A ∈ Σ at step t ≥ 0 is given by equation 8.   p (A) ,t=0 ˆ P r {Xt ∈ A} = (8) K (t) (x, A) p (dx) , t > 0   Ω 2.5. Markov Chains Definition 25. (Markov chain) A discrete-time stochastic process X0 , X1 , X2 , . . ., taking values in an arbitrary state space Ω is a Markov chain if it satisfies: 11 1. (Markov property) The conditional distribution of Xt given X0 , X1 ,. . ., Xt−1 is the same as the conditional distribution of Xt given only Xt−1 , 2. (stationarity property) The conditional distribution of Xt given Xt−1 does not depend on t. Clearly, transition probabilities of the chain are specified by the conditional distribution of Xt given Xt−1 (kernel), while the probability law of the chain is completely specified by the initial distribution X0 . Moreover, many SGoals may be characterized by Markov chains. 2.6. Convergence Definition 26. Let (Dt ) be a random sequence, i.e., a sequence of random variables defined on a probability space (Ω, Σ, P ). Then (Dt ) is said to c 1. Converge completely to zero, denoted as Dt → 0, if equation 9 holds for every ǫ > 0 lim t→∞ t X P r {|Dt | > ǫ} < ∞ (9) i=1 p 2. Converge in probability to zero, denoted as Dt → 0, if equation 10 holds for every ǫ > 0. lim P r {|Dt | > ǫ} = 0 t→∞ (10) Notice that convergence in probability to zero (equation 10) is a necessary condition for convergence completely to zero (equation 9). 3. Probability Theory on Cartesian Products Since we are working on populations (finite tuples of individuals in the search space), we need to consider probability theory on generalized cartesian products of the search space (subsection 3.1). By considering some mathematical properties of the generalized cartesian product (we will move from tuples of tuples to just a single tuple), some mathematical proofs can be simplified and an appropiated σ-algebra for populations can be defined (subsection 3.2). These accesory definitions, propositions and theorems will allow us to define a kernel by joining some simple kernels (section 3.3). Therefore, we will be able to work with stochastical methods in SGoals that are defined as joins of stochastic methods that produce subpopulations (sub-tuples) of the newly generated complete population (single tuple). 12 3.1. Generalized Cartesian Product Definition 27. (cartesian product) Let L = {Ω1 , Ω2 , ..., Ωn } be an ordered list Qn of n ∈ N sets. The Cartesian product of L is the set of ordered n-tuples: . . , an ) | ai ∈ Ωi for all i = 1, 2, . . . , n}. If Ω = Ωi for all i=1 Ωi = {(a1 , a2 , .Q i = 1, 2, . . . , n then ni=1 Ωi is noted Ω n and it is called the n-fold cartesian product of set Ω. Lemma 28. Let Ω1 , Ω2 and Ω3 be sets, then 1. (associativity) (Ω1 × Ω2 ) × Ω3 ≡ Ω1 × (Ω2 × Ω3 ) ≡ Ω1 × Ω2 × Ω3 . 2. (commutativity) Ω1 × Ω2 ≡ Ω2 × Ω1 Proof. [1] Functions hL : (Ω1 × Ω2 ) × Ω3 → Ω1 × Ω2 × Ω3 and hR : Ω1 × (Ω2 × Ω3 ) → Ω1 × Ω2 × Ω3 such that hL ((a, b) , c) = (a, b, c) and hR (a, (b, c)) = (a, b, c) are equivalence functions. [2] Function r : A × B → B × A for any A, B such that r (a, b) = (b, a) is a bijective function. Corollary 29. Let {ni ∈ N+ }i=1,2,...,m be an ordered list of m ∈ N positive natural numbers. Qm Qni 1. i=1 j=1 Ωi,j ≡ Ω1,1 × . . . × Ω1,n1 × . . . × Ωm,1 × . . . × Ωm,nm with Ωi,j a set for all i = 1, 2, . . . m and j = 1, 2, . . . , ni . P Q ni ≡ Ω n with n = m 2. m i=1 ni . i=1 Ω 3.2. Product σ-algebra Products σ-algebra allow us to define appropiated σ-algebra for generalized cartesian products. If we are provided with a σ-algebra associated to the feasible region of a SGoal, then we can define a σ-algebra for populations of it. Definition 30. Let L = {Σ1 , Σ2 , . . . , Σn } be a n ∈ N ordered list of Σi ⊆ 2Ωi family of sets. Qn 1. (generalized family product) The generalized product of L is i=1 Σi = Qn { i=1 Ai | ∀ni=1 Ai ∈ Σi } 2. (product σ-algebra) If Σi is a σ-algebraNfor all i = 1, 2, Q.n. . , n, then the n product σ-algebra of L is the σ-algebra Σ = σ ( i i=1 i=1 Σi ) defined Qn over the set i=1 Ωi . Lemma 31. If L = {(Σ1 , Ω1 ) , (Σ2 ,Q Ω2 ) , . . . , (Σn , Ωn )} is a finite (n ∈ N) n ordered list of measurable spaces then i=1 Σi is a π-system. Qn Proof. Ti , Vi ∈ Σi such that QnIf U, V ∈ i=1 Σ Qinthen for allQin= 1, 2, . . . , n exist U Vi ∈ Σi (lemma 5). U = i=1 UQ V (def. Σ ). Clearly, U i and V = i i i i=1 i=1 T Qn Qn n V ) ∈ Σ (def. Σ ). Let z = Therefore, (U i i i i i=1 i=1 i=1 T T (z1 , z2 , . . . , zn ) ∈ Qn V iff z ∈ U and z ∈ V T(def ) iff zi ∈ Ui and i=1 Ωi . Clearly, z ∈ U all i = 1, T 2, . . . , n zi ∈ V , n (def U and Q V ) iff zi ∈ Ui TVi for Q Ti for all i = Qn1, 2, . . .T n Vi ) ∈ V ) (def ). Therefore, U V = (U (def ) iff z ∈ (U i i i i=1 i=1 Qn i=1 Σi . 13 Proposition 32 will allow us to move from the product σ-algebra of products σ-algebras to a single product σ-algebra (as we move from tuples of tuples to just a single tuple). Proposition 32. (associativity of σ-algebra product) Let Σi be a σ-algebra defined over a set Ωi for all i = 1, 2, 3, then (Σ1 ⊗ Σ2 ) ⊗ Σ3 ≡ Σ1 ⊗ (Σ2 ⊗ Σ3 ) ≡ Σ1 ⊗ Σ2 ⊗ Σ3 . Proof. [(Σ1 ⊗ Σ2 )⊗Σ3 ≡ Σ1 ⊗Σ2 ⊗Σ3 ] [⊆] We will use the Dynkin π−λ theorem 7 here. So, we need to find a π-system that is contained by a λ system. Consider A3 ∈ Σ3 and define AA3 = {X ∈ Σ1 ⊗ Σ2 | X × A3 ∈ σ (Σ1 × Σ2 × Σ3 )}. [π-system] A1 × A2 × A3 ∈ Σ1 × Σ2 × Σ3 for all A1 ∈ Σ1 and A2 ∈ Σ2 (A3 ∈ Σ3 ) then Σ1 × Σ2 ⊂ AA3 .(Σ1 ⊗ Σ2 ) × Σ3 . [λ-system] [λ.1] Ωi ∈ Σi for i = 1, 2, 3 (Σi σ-algebra) then Ω1 × Ω2 × A3 ∈ Σ1 × Σ2 × Σ3 . Therefore, Ω1 × Ω2 ∈ AA3 (def AA3 ). [λ.2] Let X ∈ AA3 then X c × A3 = ((ΩT 1 × Ω2 ) \ X) × A3 c (def. complement). Clearly, X c × A3 = ((Ω1 × Ω2 ) × A3 ) (X × A3 ) (Distribution and Morgan’s law). Now, (X × A3 ) ∈ σ (Σ1 × Σ2 × Σ3 ) (def AA3 ), then (X × A3 )c ∈ σ (Σ1 × Σ2 × Σ3 ) (σ-algebra). Moreover, (Ω1 × Ω2 ) × A3 ∈ σ (Σ1 × Σ2 × Σ3 ) (part 1 and def AA3 ) therefore, X c × A3 ∈ σ (Σ1 × Σ2 × Σ3 ) (lemma 5.2). So, X c ∈ AA3 . [λ.3] Let {Xi }i∈I ⊆ AA3 be cdf of A  A3 . Clearly, S S S (sets algebra), and i∈I (Xi × A3 ) = i∈I Xi × A3 S i∈I Xi ∈ Σ1 ⊗ Σ2 (Xi ∈ Σ1 ⊗ Σ2 for all i ∈ I). then, i∈I (Xi × A3 ) ∈ AA3 . Therefore, AA3 is a λ-system. In this way, Σ1 ⊗ Σ2 = σ (Σ1 × Σ2 ) ⊆ AA3 (Dynkin π − λ theorem 7), and σ (Σ1 × Σ2 ) × A3 ⊆ σ (Σ1 × Σ2 × Σ3 ) (def AA3 ), i.e., (Σ1 ⊗ Σ2 ) × A3 ⊆ Σ1 ⊗ Σ2 ⊗ Σ3 . Because, (Σ1 ⊗ Σ2 ) × A3 ⊆ Σ1 ⊗ Σ2 ⊗ Σ3 for all A3 ∈ Σ3 then (Σ1 ⊗ Σ2 ) × Σ3 ⊆ Σ1 ⊗ Σ2 ⊗ Σ3 and σ ((Σ1 ⊗ Σ2 ) × Σ3 ) = (Σ1 ⊗ Σ2 ) ⊗ Σ3 ⊆ Σ1 ⊗ Σ2 ⊗ Σ3 (def σ (·)). [⊇] It is clear that Σ1 × Σ2 ⊆ Σ1 ⊗ Σ2 (def ⊗), so Σ1 × Σ2 × Σ3 ⊆ (Σ1 ⊗ Σ2 ) × Σ3 , therefore, σ (Σ1 × Σ2 × Σ3 ) ⊆ σ ((Σ1 ⊗ Σ2 ) × Σ3 ) (def σ (·)), i.e., (Σ1 ⊗ Σ2 ) ⊗ Σ3 ⊇ Σ1 ⊗ Σ2 ⊗ Σ3 . [Σ1 ⊗ (Σ2 ⊗ Σ3 ) ≡ Σ1 ⊗ Σ2 ⊗ Σ3 ] A similar proof to the (Σ1 ⊗ Σ2 ) ⊗ Σ3 ≡ Σ1 ⊗ Σ2 ⊗ Σ3 is carried on. Nni Corollary 33. If Σ is a σ-algebra defined over set Ω and { k=1 Σ}i=1,2,...,m + is an ordered lists ofNthe m ∈ N N given σ-algebras Pm(ni ∈ N for all Nnproduct m n i i = 1, 2, . . . , m) then i=1 Σ ≡ i=1 ( k=1 Σ) with n = i=1 ni . Qn In the rest of this paper, we will denote i=1 A ≡ An for any A ⊆ 2Ω , and N Σ⊗n ≡ ni=1 Σ for any σ-algebra Σ on Ω. 3.3. Kernels on product σ-algebras Now, we are in the position of defining a kernel that characterizes a deterministic method that is commonly used by SGoals (as part of individual’s selection methods based on fitness): the Swap method. Definition 34. (Swap) Let Ω1 and Ω2 be two sets. The swap function (← −) is defined as follows4 : 4 We will use the notation z ≡ (z) for any z ∈ Ω1 × Ω2 and A ≡ (A) for any ← − ← − ← − ← − A ⊆ Ω1 × Ω2 . 14 ← − : Ω1 × Ω2 (x, y) → Ω2 × Ω1 7→ (y, x) Lemma 35. Let Ω1 and Ω2 be two sets. 1. Ø = Ø and Ω1 × Ω2 = Ω2 × Ω1 ← − ←−−−−− 2. z ∈ ← A z ∈A − iff ← − 3. A = ← A − for all A ⊆ Ω1 × Ω2 ← − 4. B \ A = ← B A −S\ ← − for all A, B ⊆ Ω1 × Ω2 ←−−− S 5. i∈I Ai = i∈I Ai for any family{Ai ⊆ Ω1 × Ω2 }i∈I . ← − ←−−−−− Proof. [1, 2, 3]nAre obvious (just o applying def swap). [4]n Let A, B ⊆ Ω1 × Ω2o. Now, B \ A = z | ← z ∈ B \ A (def swap), so B \ A = z | ← z ∈B∧← z ∈ /A − − − ←−−− ←−−− o n (def proper diff). Clearly, B \ A = z | z ∈ ← B /← A B\A=← B\A −∧z ∈ − (2), i.e. ← − ←−−− −−− S − ← (def proper diff). [5] Let {Ai ⊆ Ω1 × Ω2 }i∈I a family of sets, z ∈ i∈I Ai iff ←−−−−− S ∃i ∈ I such that z ∈ Ai iff z ∈ i∈I Ai . ← − ← − Proposition 36. Let (Ω1 , Σ1 ) and (Ω2 , Σ2 ) be measurable spaces then A ∈ Σ1 ⊗ Σ2 iff ← A − ∈ Σ2 ⊗ Σ1 . Proof. [→] We will apply the o Dynkin π-λ theorem (theorem 7). Let A = n A ∈ Σ1 ⊗ Σ2 | A ∈ Σ2 ⊗ Σ1 . [λ.1] Obvious, Ø = Ø ∈ Σ2 ⊗ Σ1 (lemma 35.1 ← − ← − and lemma 5.1). [λ.2] Let A, B ∈ A such that A ⊂ B. Since B \ A = ← B A −\← − ←−−− (lemma 35.4), and A , B ∈ Σ2 ⊗ Σ1 (def A), then B \ A = B \ A ∈ Σ2 ⊗ Σ1 ← − ← − − ← − ←−−− S← S (lemma 5.2), i.e., A is pd. [λ.3] Let {Ai ⊆ Ω}i∈I a cdf, i∈I Ai = i∈I Ai ← − ←−−−−− S (lemma 35.5) and Ai ∈ Σ2 ⊗Σ1 (def A) then i∈I Ai ∈ Σ2 ⊗Σ1 (σ.3). Therefore, ← − ←−−−−− A is λ-system. Now, let A ∈ Σ1 × Σ2 , then there are A1 ∈ Σ1 andA2 ∈ Σ2 such that A = A1 × A2 (def Σ1 × Σ2 ). Clearly, A = A2 × A1 ∈ Σ2 × Σ1 (def swap ← − and Σ2 × Σ1 ), i.e., Σ1 × Σ2 ⊂ A (def A). Because Σ1 ⊗ Σ2 = σ (Σ1 × Σ2 ) and Σ1 × Σ2 ⊂ A then ← A A A ∈ Σ1 ⊗ Σ2 − ∈ Σ2 ⊗ Σ1 . [←] If ← − ∈ Σ2 ⊗ Σ1 , we have that ← − ← − (→), therefore, A ∈ Σ1 ⊗ Σ2 (A = ← A ). − ← − Corollary 37. Let (Ω1 , Σ1 ) and (Ω2 , Σ2 ) be measurable spaces. 1. (commutativity of σ-algebra product) Σ1 ⊗ Σ2 ≡ Σ2 ⊗ Σ1 . 2. (measurability of swap) The swap function is measurable. ← − 5 3. (swap kernel) The function 1 is a kernel . ← − 5 We will use the ambiguous notation 1 ← − ≡ ← − 15 in the rest of this paper. Proof. [1] The swap function is a bijective function. [2] Follows from (1) and proposition 36. [3] Follows from (2) and theorem 21. Moreover, we can define kernels for deterministic methods that select a group of individuals from the population (projections). Lemma 38. (projection) Let L = {(Σ1 , Ω1 ) , (Σ2 , Ω2 ) , . . . , (Σn , Ωn )} be a finite (n ∈ N) ordered list of measurable spaces and I = {k1 , k2 , . . . , km } ⊆ {1, . . . , n} be a set of i.e., Nm ki < ki+1 and m ≤ n. The function πI Nindices, n defined as follows is i=1 Σi − i=1 Σki measurable. Qn Qm πI : → i=1 Ωi i=1 Ωki (x1 , . . . , xn ) 7→ (xk1 , . . . , xkn ) Qn−m Qm Qn Proof. Because i=1 Ωi ≡ i=1 Ωki × i=1 Ωli with I c = {l1 , l2 , . . . , ln−m } the complement set of indices of I (by applying many times lemma Qn−m 28), we can “rewrite” (under equivalences) πI as πI (x,y) = x with y ∈ i=1 Ωli and N Nn−m Nm Nn Qm x ∈ i=1 Ωki . Now, i=1 Σi ≡ ( i=1 Σki ) i=1 Σli (by applying many Nm times proposition 32 and corollary 37). Thus, for any A ∈ i=1Σki we have  N Nn−m N Qn−m ) Σ Σ that πI−1 (A) = A × i=1 Ωli . Clearly, πI−1 (A) ∈ ( m l k i i i=1 i=1 (def. product σ-algebra), therefore, πI is measurable. Corollary 39. The function 1πI as defined in theorem 21 is a kernel6 . Proof. Follows from lemma 38 and theorem 21. Finally, we are able to define a kernel for a stochastic method that is the join of several stochastic methods (methods that generate a subpopulation of the next population). Theorem 40. (product probability measure) Let {(Ωi , Σi , µi ) | i = 1, . . . , n} an ordered list ThereQexist a unique probability N nof n ∈ N probability spaces. Qn n measure µ : i=1 Σi → R such that µ ( i=1 Ai ) = i=1 µ (Ai ) for all Ai ∈ Σi , i = 1, 2, . . . , n. In this case µ is called N the product probability measure of the µi n probability measures and is denotated i=1 µi . Proof. This theorem is the version of theorem 14.14 in page 277 of the book of Kenkle [11], when considering Σi not just a ring but a sigma algebra. In this case, any probability measure is a finite measure and any finite measure is σ-finite measure (Ωi ∈ Σi ). Theorem 41. (join-kernel) Let (Ω ′ , Σ′ ) be a measurable space and{(Ωi , Σi )} and {Ki : Ω ′ × Σi → [0, 1]} be ordered lists of n ∈ N measurable spaces and kernels, respectively. The following function is a kernel. Nn ⊛K : Ω ′ × ( i=1 Σi ) −→ [0, Nn1] (x, A) 7−→ i=1 Ki(x,•) (A) 6 We will use the ambiguous notation 1πI ≡ πI in the rest of this paper. 16 Proof. [well-defined and K.1] Let x ∈ Ω ′ , since Ki(x,•) is a probability meaNn K sure for all i = 1, 2, . . . , n (K.1 for K kernel) then ⊛K = x,• i(x,•) i=1 Nn i is a probability measure ⊛K : i=1 Σi → [0, 1] (theorem 40), thus its is Nx,• n well defined for any A ∈ just need i=1 Σi . [K.2] Using remark 20, we Q Ωi to prove that ⊛K•,A is measurable for any A ∈ E with E ⊆ 2 a πNn Qn Σ is a π-system (lemma 31) system that generates Σ . Because i i i=1 i=1 Nn Qn and Σ is the σ-algebra generated by Σ (def. 30), then we just i i i=1 i=1 Q need to prove that ⊛K•,A is measurable for A = Nni=1 Ai with Q Ai ∈ Σi Qany n n n for all i = 1, 2, . . . , n. By definition, ⊛K (x, A ) = K ( i i(x,•) i=1 Q i=1 i=1 Ai ) Qn n K (A ) (A ∈ Σi ). A ) = and according to theorem 40, K (x, i i i i(x,•) i=1 i=1 Q Clearly, ⊛K(•,Qn Ai ) (x) = ni=1 Ki(•,Ai ) (x). Now, ⊛Ki(•,Ai ) is a measurable i=1 function for all i = 1, 2, . . . , n (K.2 for Ki kernel) then their product is a measurable function (see Theorem 1.91, page 37 in Kenkle’s book [11]). Therefore, ⊛K(•,Qn Ai ) is a measurable function. i=1 Corollary 42. If (Ω, Σ) is a measurable space and {ni ∈ N+ }i=1,2,...,m such that Ωi = Ω ni and Σi = Σni for Pmall i = 1, 2, . . . , m in theorem 41, then ⊛K : Ω ′ × Σn → [0, 1] , with n = i=1 ni , is a kernel. Proposition 43. (permutation) Let (Σ, Ω) be a measurable space and I = [i1 , i2 , . . . , in ] be a fixed permutation of the set {1, 2, . . . , n} then the function KI : Ω n × Σn → [0, 1] defined as KI = ⊛nk=1 πik is a kernel. Proof. Follows from corollaries 42 and 39. Corollary 44. Let (Σ, Ω) be a measurable space and P be the set of pern n → [0, 1] defined as mutations of Xset {1, 2, . . . , n}. Function KP : Ω × Σ 1 KP = |P| πI is a kernel. I∈P Proof. KP is a mixing update mechanisms of |P| kernels (subsection 2.4.1 and proposition 44). 4. Characterization of a SGoal using Probability Theory Following the description of a SGoal (see Algorithm 1), the initial population P0 is chosen according to some initial distribution p (·) and the population Pt at step t > 0 is generated using a stochastic method (NextPop) on the previous population Pt−1 . If such NextPop method can be characterized by a Markov kernel, the stochastic sequence (Pt : t ≥ 0) becomes a Markov chain. In order to develop this characterization, first we define appropiated measurable spaces and Markov kernels of stochastic methods, and then we define some properties of stochastic methods that cover many popular SGoals reported in the literature. Since a SGoal consists of a population of n individuals on the feasible region Ω, it is clear that the state space is defined on Ω n . Moreover, the initial population P0 ∈ Ω n is chosen according to some initial distribution p (·). Now, 17 the σ-algebra must allow us to determine convergence properties on the kernel. In this paper, we will extend the convergence approach proposed by Günter Rudolph in [16] to SGoals. In the following, we call objective function to a function f : Φ → R if its has an optimal value (denoted as f ∗ ∈ R) in the feasible region. 4.1. ǫ-optimal states We define and study the set of strict ǫ-optimal states (the optimal elements according to Rudolph’s notation), i.e., a set that includes any candidate population which best individual has a value of the objective function close (less than ǫ ∈ R+ ) to the optimum objective function value. We also introduce two new natural definitions that we will use in some proofs (the ǫ-optimal states and ǫ-states) and study some properties of sets defined upon these concepts. Definition 45. Let Ω ⊆ Φ be a set, f : Φ → R be an objective function, ǫ > 0 be a real number and x ∈ Ω m . 1. (optimality) d (x) = f (Best (x)) − f ∗ (here f ∗ is the optimal value of f in Ω). 2. (strict ǫ-optimum state) x is an strict ǫ-optimum element if d (x) < ǫ, 3. (ǫ-optimum state) x is an ǫ-optimum element if d (x) ≤ ǫ, and 4. (ǫ-state) x is an ǫ-element if d (x) = ǫ. Sets Ωǫm = {x ∈ Ω m : d (x) < ǫ}, Ωǫm = {x ∈ Ω m : d (x) ≤ ǫ}, and Ωǫ̊m = {x ∈ Ω m : d (x) = ǫ} are called set of strict ǫ-optimal states, ǫ-optimal states, and ǫ-states, respectively. We will denotate Ωǫ = Ωǫ1 , Ωǫ = Ωǫ1 and Ωǫ̊ = Ωǫ̊1 . Remark 46. Notice that c 1. (Ωǫm ) = {x ∈ Ω m : ǫ ≤ d (x)} and c 2. (Ωǫm ) = {x ∈ Ω m : ǫ < d (x)}. Lemma 47. Ωǫm = ∞ \ + m Ωǫ+ 1 for all ǫ > 0 and m ∈ N . n=1 n Proof. [⊆] If x ∈ Ωǫm then d (x) ≤ ǫ (def Ωǫm ). Now, ǫ < ǫ + n1 for all n > 0, m clearly d (x) < ǫ + n1 for all n > 0. Therefore, x ∈ Ωǫ+ 1 for all n > 0 so n ∞ ∞ \ \ m m x ∈ Ωǫ+ [⊇] Let x ∈ / Ωǫm then d (x) > ǫ (def Ωǫm ), Ωǫ+ 1 . 1 , if x ∈ n=1 n n=1 n therefore, ∃δ > 0 such that d (x) = ǫ + δ. We have that ∃n ∈ N such that 0 < n1 < δ (Archims theorem and real numbers dense theorem). Clearly, ǫ+ n1 < ∞ \ m m ǫ + δ = d (x), so x ∈ / Ωǫ+ / Ωǫ+ Therefore, 1 , then x ∈ 1 (contradiction). n x∈ n=1 Ωǫm . 18 n 4.2. Optimization space We define the optimization σ-algebra property (a σ-algebra containing the family of sets of strict ǫ-optimal states) and show that such property is preserved by the product σ-algebra. Definition 48. (f −optimization σ-algebra) Let f : Φ → R be an objective function, and Ω ⊆ Φ. A σ-algebra Σ on Ω is called f −optimization σ-algebra iff {Ωǫ }ǫ>0 ⊆ Σ. Lemma 49. Let Σ be an f -optimization σ-algebra on Ω then {Ωǫ }ǫ>0 ⊆ Σ and {Ωǫ̊ }ǫ>0 ⊆ Σ . n o   Proof. {Ωǫ }ǫ>0 ⊆ Σ It follows from the facts that Ωǫ+ n1 ⊆ {Ωǫ } ⊆ n∈N+ ∞ \ Ωǫ+ n1 (lemma 47) and Σ close under   countable intersections (part 2, lemma 5). {Ωǫ̊ }ǫ>0 ⊆ Σ It follows from the fact that Ωǫ̊ = Ωǫ \ Ωǫ for all ǫ > 0 and Σ is close under proper differences (part 4, lemma 5). Σ (Σ optimization σ-algebra), Ωǫ = n=1 Proposition 50. Ωǫm m [  i−1  Ω × Ωǫ × Ω m−i for all ǫ > 0 and m ∈ N+ . = i=1 Proof. [⊆] Let x ∈ Ωǫm , then d (x) < ǫ (def Ωǫm ) and f (Best (x)) − f ∗ < ǫ i−1 m Y Y (def d (x)). It is clear that x = xk × xi × xk f (xi ) − f ∗ < ǫ for k=1 k=i+1 some i = 1, 2, . . . , m (def Best), so d (xi ) < ǫ (def d (x)). Therefore, xi ∈ Ωǫ m [  i−1  Ω × Ωǫ × Ω m−i . [⊇] (def Ωǫ ) so x ∈ Ω i−1 × Ωǫ × Ω m−i and x ∈ if x ∈ m [  i=1 Ω i−1 i=1 × Ωǫ × Ω m−i    then x ∈ Ω i−1 × Ωǫ × Ω m−i for some i = 1, 2, . . . , m. Clearly, f (Best (x)) < f (xi ) (def Best) so d (x) ≤ d (xi ). Now, d (x) ≤ d (xi ) < ǫ (xi ∈ Ωǫ ) therefore x ∈ Ωǫm (def Ωǫm ). Corollary 51. Let Σ be an f -optimization σ-algebra on Ω then Σm is an f −optimization σ-algebra on Ω m for all m ∈ N+ . i Proof. Ωǫ ∈ Σ (optimization σ-algebra) ∈ Σ⊗i for all i = 1, 2, . . . , m  i−1 and Ω m−i (universality of σ-algebra) then Ω × Ωǫ × Ω ∈ Σ⊗m (def product σm [  i−1  Ω × Ωǫ × Ω m−i ∈ Σ⊗m (Σ⊗m is cdu). Therefore, Ωǫm ∈ algebra), so i=1 Σ⊗m for all ǫ > 0, i.e., Σ⊗m is an optimization σ-algebra. Now, we are ready to define the mathematical structure that we use for characterizing a SGoal. 19 Definition 52. (optimization space) If f : Φ → R is an objective function, n ∈ N and Σ is an f −optimization σ-algebra over a set Ω then the triple (Ω n , Σ⊗n , f ) is called optimization space. 4.3. Kernels on optimization spaces If we are provided with an optimization space (Ω n , Σ⊗n , f ), we can represent the population used by the SGoal, as an individual x ∈ Ω n , while we can characterize the NextPop (a f : Ωn → Ω n stochastic method), as a Markov kernel K : Ω n × Σ⊗n → [0, 1]. Because such NextPop can be defined in terms of more general f : Ωη → Ω υ stochastic methods, we study such general kernels. 4.3.1. Join Stochastic Methods Definition 53. (Join) A stochastic method f : Ωη → Ω υ is called join if it is defined as the join of m ∈ N stochastic methods (fi : Ω n → Ω υi ), each method m Y generating a subpopulation of the population, i.e. f = fi , (see Algorithm 7). i=1 Here, υi ∈ N+ is the size of the i-th sub-population i = 1, 2, . . . , m, and sm = υ. Algorithm 7 Joined Stochastic Method. f(P ) Pi−1 1. si = k=1 υk for all i = 1, 2, . . . , m 2. Q1+si−1 ,...,si =fi (P ) for all i = 1, 2, . . . , m 3. return Q Example 54. The NextPop method of a GGa (see Algorithm 4), is a joined stochastic method: a stochastic method NextSubPopGGa : Ω n → Ω 2 that generates two new candidate solutions (by selecting two parents from the population, recombining them and mutating the offspring), is applied n2 times in order to generate the next population, see equation 11. n NextPopGGa (P ) = 2 Y NextSubPopGGa (P ) (11) i=1 Example 55. The NextPop method of a DE (see Algorithm 6), is a joined stochastic method: n stochastic methods NextIndDE,i : Ω n → Ω each one generating the ith individual of the new population (by selecting three extra parents from the population and recombining each dimension using differences if required), are applied, see equation 11. NextPopDE (P ) = n Y NextIndDE,i (P ) i=1 20 (12) Example 56. The stochastic method: generating the ith NextPopHC (Pi )), NextPop method of a PHC (see Algorithm 3), is a joined n stochastic methods NextIndPHC,i : Ω n → Ω each one individual of the new population (NextIndPHC,i (P ) = see equation 13. NextPopDE (P ) = n Y NextPopHC (Pi ) (13) i=1 We are now in the position of providing a sufficient condition for characterizing PHC, GGa, and DE algorithms. Proposition 57. Let {fi : Ω n → Ω υi }i=1,2,...,m be a finite family of stochastic methods, each one characterized by a kernel Ki : Ω η × Σ⊗υi → [0, 1], then the m Y fi is characterized by the kernel ⊛K : Ω η ×Σ⊗υ → join stochastic method f = i=1 Pm [0, 1] with υ = k=1 υk . Proof. Follows from corollary 42 of theorem 41. Corollary 58. Each of the NextPopPHC , NextPopGGa and NextPopDE stochastic methods can be characterized by kernels if each of the stochastic methods NextPopHC , NextSubPopGGa , and NextIndDE can be characterized by a kernel. 4.3.2. Sorting Methods Although the result of sorting a population is, in general, a non stochastic method, we can model it as a kernel. We start by modeling the sorting of two elements according to their fitness value. Definition 59. (Sort-Two) Let d : Ω → R, the sort-two function s2 : Ω 2 → Ω 2 is defined as follows:  z if d (x) < d (y) s2 (z = (x, y)) = z = (y, x) otherwise ← − In order to model the S2 method as a kernel, we need to define sets that capture some notions of sorted couples. Definition 60. (sorted couples sets) Let x, y ∈ Ω. mM The set mM = {(x, y) | d (x) < d (y)} is called min-max sorted couples set. Mm The set Mm = {(x, y) | d (y) < d (x)} is called max-min sorted couples set. m The set m = {(x, y) | d (y) = d (x)} is called equivalent couples set. Lemma 61. The following set of equations holds. [ 1. mM = Ωr × Ωrc r∈Q 21 2. Mm = [ Ωrc × Ωr r∈Q 3. m = (mM U Mm) c Proof. [1] [⊆] Let (x, y) ∈ mM then d (x) < d (y) (def. mM), therefore ∃r ∈ Q such that d (x) < r < d (y) (Archims theorem and real numbers dense theorem). remark 46), then (x, y) ∈ Ωr × Ωrc , Clearly, x ∈[ Ωr and y ∈ Ωrc (def Ωǫ ,Ωǫ and [ so (x, y) ∈ Ωr × Ωrc . [⊇] Let (x, y) ∈ Ωr × Ωrc then ∃r ∈ Q such that r∈Q r∈Q (x, y) ∈ Ωr × Ωrc , therefore x ∈ Ωr and y ∈ Ωrc . Clearly, d (x) < r and r < d (y) (def Ωǫ ,Ωǫ and remark 46), then d (x) < d (y) so (x, y) ∈ mM (def mM). [2] It is a proof similar to the proof of part [1]. [3] Obvious, for any (x, y) ∈ Ω × Ω we have that d (x) < d (y) ∨ d (y) < d (x) ∨ d (x) = d (y) (R is total order). Clearly, U U mM, Mm, and m areUpairwise disjoint sets. Then (Ω × Ω)=mM Mm m, so U c m = (Ω × Ω) \ (mM Mm) = (mM Mm) . Lemma 62. mM, Mm, m, mMc , Mmc , mc ∈ Σ2 if Σ is an optimization σalgebra. Σ2 (Ωr , Ωrc ∈ Σ, def product σ-algebra), and Proof. [ (Ωr × Ωrc ) , (Ωrc × Ωr ) ∈[ mM= Ωr × Ωrc and Mm= Ωrc × Ωr (lemma 61), then mM, Mm ∈ Σ2 r∈Q Ur∈Q (Σ2 is cdu). Clearly, (mM Mm) m ∈ Σ2 (Σ2 is cdu ), so m ∈ Σ2 (Σ2 is c). Finally, mMc , Mmc , mc ∈ Σ2 (σ.2). Proposition 63. s2 : Ω 2 → Ω 2 is measurable. −1 2 i ∨ hProof. Let A ∈ Σ and iz = (x, y) ∈ Ω . z ∈ s2 (A) iffh[z ∈ A ∧ d (x) < d (y)] c z ∈ A ∧ d (y) ≤ d (x) (def s2 ) iff [z ∈ A ∧ z ∈ mM]∨ ← z ∈ A ∧ z ∈ mM (def ← − −  S T T U T c and ). Since A, Ω ∈ Σ then A mM) iff z ∈ (A mM) ← − mM (def c −1 ⊗2 ⊗2 A, ← A −, mM, mM ∈ Σ (corollary 36 and lemma 62). Therefore, s2 (A) ∈ Σ ⊗2 (Σ is c, cu, and ci). Clearly, s2 is measurable. Corollary 64. 1s2 : Ω 2 × Σ2 → [0, 1] as defined in theorem 21 is a kernel. Proof. Follows from proposition 63 and theorem 21. Having defined the kernel for s2 , we define a kernel sn,n−1 : Ω n ×Σn → [0, 1] for characterizing a n-tuple sorting method. Proposition 65. The following functions are kernels   1. wn,k : Ω n × Σn → [0, 1] defined as wn,k = π{1,...,k−1} ⊛ s2 ◦ π{k,k+1} ⊛ π{k+2,...,n} for k = 1, . . . , n − 1. 2. tn,k : Ω n × Σn → [0, 1] defined as tn,1 = wn,1 , and tn,k = wn,k ◦ tn,k−1 for k = 2, . . . , n − 1. 3. sn,k : Ω n × Σn → [0, 1] defined as sn,1 = tn,1 , and sn,k = tn,k ◦ sn,k−1 for k = 2, . . . , n − 1. 22 Proof. Obvious, all functions are defined in terms of composition and/or join of kernels. Corollary 66. The Best2 function used by the SSGa (line 5, algorihm 5) can be characterized by the kernel b2,4 : Ω 4 × Σ⊗2 → [0, 1] defined as b2,4 = π{1,2} ◦ sn,2 . Proposition 67. If lines 3-4 in the SSGa (see algorithm 5) can be modeled by a kernel v : Ω 2 × Σ⊗2 → [0, 1], The stochastic method NextPopSSGa can be characterized by  the following kernel.      KSSGa = b2,4 ◦ π{1,...,4}  π{5,...,n+2} ◦ v ◦ π{1,2}  1 ◦ KP 4.3.3. Variation-Replacement Stochastic Methods Many SGoals are defined as two-steps stochastic processes: First by applying a stochastic method that generates ̟ ∈ N new individuals, in order to “explore” the search space, and then by applying a stochastic method that selects candidate solutions among the current individuals and the new individuals, in order to “improve” the quality of candidate solutions. Definition 68. (Variation-Replacement) A stochastic method f : Ω η → Ω υ is called Variation-Replacement (VR) if there are two stochastic methods, v : Ω η → Ω ̟ and r : Ω η+̟ → Ω υ , (t) such that f (P ) = r (P, v (P )) or f (P ) = r (v (P ) , P ) for all P ∈ Ω η . Example 69. The NextPop method of HC with neutral mutations (see Algorithm 2) is a VR stochastic method, see equations 14 and 15. The HC algorithm will not consider neutral mutations just by changing the order of the arguments in the replacement stochastic method RHC , i.e., RHC (Variate (x) , x). NextPopHC (x) = RHC (x,Variate (x)) rHC (x, y) =  x y if f (x) < f (y) otherwise (14) (15) Proposition 70. If v : Ω η → Ω ̟ and r : Ω η+̟ → Ω υ are stochastic methods characterized by kernels Kv : Ω η × Σ⊗̟ → [0, 1] and Kr : Ω η+̟ × Σ⊗υ → [0, 1], respectively, then Kf = Kr ◦ [1Ω η  Kv ] and Kf = Kr ◦ [Kv  1Ω η ] are kernels that characterize the VR stochastic method f (P ) = r (P, v (P )) and f (P ) = r (v (P ) , P ) with P ∈ Ω η , respectively. Proof. Clearly, [1Ω η  Kv ] and [Kv  1Ω η ] are kernels (theorem 41 and lemma 21). Therefore, Kf = Kr ◦ [1Ω η  Kv ] and Kf = Kr ◦ [Kv  1Ω η ] are kernels by composition of kernels, see Section 2.4.2. We are now in the position of defining a kernel that characterizes the replacement method of a HC algorithm. Before doing that, notice that rHC (x, y) = π1 (s2 (x, y)). 23 Lemma 71. The function rHC = π1 ◦ s2 is measurable and KrHC ≡ 1rHC as defined in theorem 21 is a kernel. Proof. Follows from the fact rHC = π1 ◦ s2 is measurable (composition of measurable functions is measurable) and theorem 21. Corollary 72. The Hill Climbing algorithm shown in Algorithm 2 can be characterized by a kernel if its Variatehc stochastic method can be characterized by a kernel. Proof. Follows from example 69, proposition 70 and lemma 71. Corollary 73. The Parallel Hill Climbing algorithm shown in Algorithm 3 can be characterized by a kernel if the Variatehc stochastic method of the parallelized HC can be characterized by a kernel. Proof. Follows from example 56, corollary 72 and proposition 57. Lemma 74. The NextPop stochastic method of the SSGa shown in Algorithm 5 can be    characterized by the composition of  two kernels vSSGa = v ◦ π{1,2}  1 ◦ KP and rSSGa = b2,4 ◦ π{1,...,4}  π{5,...,n+2} if lines 3-4 can be characterized by a kernel v : Ω 2 × Σ⊗2 → [0, 1]. Proof. Follows from composition of kernels and proposition 67. 4.3.4. Elitist Stochastic Methods Some SGoals use elitist stochastic methods, i.e., if the best candidate solution obtained after applying the method is at least as good as the best candidate solution before applying it, in order to capture the notion of “improving” the solution. Definition 75. (elitist method) A stochastic method f : Ωη → Ω υ is called elitist if f (Best (f (P ))) ≤ f (Best (P )). Example 76. The NextPop methods of the following algorithms7 , are elitist stochastic methods. Here, we will denotate QA ≡ NextPopA (P ). 1. SSGa: Best (QSSGa (P )) = Best (c1 × c2 × P ), (see Algorithm 5). Then, f (Best (c1 × c2 × P )) ≤ f (Best (P )). 2. HC: Best (QHC (x)) = Best (VariateHC (x) × x) (see Algorithm 2). Then, f (Best (VariateHC (x) × x)) ≤ f (x) = f (Best (x)). 3. PHC: Let k ∈ [1, n] the index of the best individual in population P , then f (Best (P )) = f (Pk ). Since QPHC (P )i = QHC (Pi ) for all i = 1, 2, . . . , n (see Algorithm 3), it is clear that f (QPHC (P )k ) ≤ f (Best (P )) (QHC is elitist). Then, f (Best (QPHC (P ))) ≤ QPHC (P )i = f (Best (P )). 7 Here we just present the examples when such algorithms consider neutral mutations, but it is also valid when those do not consider neutral mutations (we just need to reverse the product order). 24 Definition 77. (elitist kernel) A kernel K : Ω η × Σ⊗υ → [0, 1] is called elitist if K (x, A) = 0 for each A ∈ Σ⊗υ such that d (x) < d (y) for all y ∈ A. Proposition 78. Kernels rhc and rSSGa are elitist kernels. Proof. Let (x, y) ∈ Σ⊗2 and A ∈ Σ such that d (z) < d (x, y) for all z ∈ A. Now, rHC (x, y) = π1 ◦ s2 (x, y) (def rHC ), clearly, d (rHC (x, y)) ≤ d (x, y) (def d ()), therefore d (rHC (x, y)) ∈ / A (def A). In this way, rHC (x, A) = 0 (def kernel rHC and theorem 21). Therefore, rhc is elitist (def elitist kernel). A similar proof is carried on for rSSGa . Lemma 79. If K : Ω η × Σ⊗υ → [0, 1] is elitist then c      v v = 0 and K x, Ωd(x) = 1. 1. K x, Ωd(x) c 2. Let x ∈ Ω η , if d (x) < α ∈ R then K (x, (Ωαv ) ) = 0 and K (x, Ωαv ) = 1  c v Proof. [1] Let y ∈ Ωd(x) then ¬ (d (y) ≤ d (x)) (def complement,Ωd(x) ), i.e., c      v v = 0 (K elitist) and K x, Ωd(x) =1 d (x) < d (y). Therefore, K x, Ωd(x) (Kx,• probability measure). [2] if d (x) < α then Ωd(x) ⊆ Ωα (def Ωǫ ) and    c c  c c v (Ωα ) ⊆ Ωd(x) (def c ). Clearly, K (x, (Ωαv ) ) ≤ K x, Ωd(x) = 0 and K (x, Ωαv ) = 1 (Kx,• measure). Definition 80. (optimal strictly bounded from zero) A kernel K : Ω η × Σ⊗υ → [0, 1] is called optimal strictly bounded from zero iff K (x, Ωǫ ) ≥ δ (ǫ) > 0 for all ǫ > 0. 5. Convergence of a SGoal We will follow the approach proposed by Günter Rudolph in [16], to determine the convergence properties of a SGoal. In the rest of this paper, Σ is an optimization σ-algebra. First, Rudolph defines a convergence property for a SGoal in terms of the objective function. Definition 81. (SGoal convergence). Let Pt ∈ Ω n be the population maintained by a SGoal A at iteration t. Then A converges to the global optimum if the random sequence (Dt = d (Pt ) : t ≥ 0) converges completely to zero. Then, Rudolph proposes a sufficient condition on the kernel when applied to the set of strict ǫ-optimal states in order to attain such convergence. Lemma 82. (Lemma 1 in [16]) If K (x, Ωǫ ) ≥ δ > 0 for all x ∈ Ωcǫ and K (x, Ωǫ ) = 1 for all x ∈ Ωǫ then, equation 16 holds for t ≥ 1. t K (t) (x, Ωǫ ) ≥ 1 − (1 − δ) 25 (16) Proof. In [16], Rudolph uses induction on t in order to demostrate lemma 82. For t = 1 we have that K (t) (x, Ωǫ ) = K (x, Ωǫ ) (equation 7), so K (t) (x, Ωǫ ) ≥ δ (condition lemma), therefore K (t) (x, Ωǫ ) ≥ 1 − (1 − δ)t (t = 1 and numeric operations). Here, we will use the notations K (t) (y, Ωǫ ) = Ky (t) (Ωǫ ) to reduce the visual length of the equations. (t+1) Kxˆ (Ωǫ ) (t) = = = (equation 7) Ky (Ωǫ ) K (x, dy) Ω ˆ Ω ˆǫ (t) Ky (Ωǫ ) K (x, dy) + K (x, dy) + ˆ ˆ (t) Ky (Ωǫ ) K (x, dy) Ωǫc (t) Ky (Ωǫ ) K (x, dy) (Ω = Ωǫ S Ωǫc ) (t) (If y ∈ Ωǫ , Ky (Ωǫ ) = 1) c ˆ Ωǫ (t) = K (x, Ωǫ ) + Ky (Ωǫ ) K (x, dy) Ωǫ (def kernel) Ωǫc iˆ h t ≥ K (x, Ωǫ ) + 1 − (1 − δ) K (x, dy) (Induction hypothesis) Acǫ i h t ≥ K (x, Ωǫ ) + 1 − (1 − δ) K (x, Ωǫc ) (x, Ωǫc ) t − (1 − δ) K ≥ K (x, Ωǫ ) + K t ≥ 1 − (1 − δ) (1 − K (x, Ωǫ )) ≥ 1 − (1 − δ)t (1 − δ) ≥ 1 − (1 − δ)t+1 (del kernel) (x, Ωǫc ) (Probability) (condition lemma) Using lemma 82, Rudolph is able to stay a theorem for convergence of evolutionary algorithms (we rewrite it in terms of SGoals). However, Rudolph’s proof is not wright, since P r {d (Pt ) < ǫ} = P r {Pt ∈ Ωǫ } for t ≥ 0 by definition of Ωǫ and Rudolph wrongly assumed that P r {d (Pt ) ≤ ǫ} = P r {Pt ∈ Ωǫ }. Here, we correct the proof proposed by Rudolph (see step 7 in our demostration). Theorem 83. (Theorem 1 in Rudolph [16]) A SGoal, whose stochastic kernel satisfies the precondition of lemma 82, will converge to the global optimum (f ∗ ) of a real valued function f : Φ → R with f > −∞, defined in an arbitrary space Ω ⊆ Φ, regardless of the initial distribution p (·). Proof. The idea is to show that the random sequence (d (Pt ) : t ≥ 0) converges completely to zero under the pre-condition of lemma 82 [16]. 26 P r {Pt ∈ Ωǫ } = ˆ K (t) (y, Ωǫ ) p (dx) Ω ≥ 1 − (1 − δ)t t ˆ p (dx) (Kernel definition) (Lemma 82) Ω ≥ 1 − (1 − δ) (p (·) probability) t −P r {Pt ∈ Ωǫ } ≤ (1 − δ) − 1 (Reversing order) t 1 − P r {Pt ∈ Ωǫ } ≤ (1 − δ) (Adding 1 to both sides) P r {d (Pt ) < ǫ} ≤ P r {d (Pt ) ≤ ǫ} (Probability) P r {Pt ∈ Ωǫ } ≤ P r {d (Pt ) ≤ ǫ} (Definition Ωǫ ) −P r {d (Pt ) ≤ ǫ} ≤ −P r {Pt ∈ Ωǫ } (Organizing) 1 − P r {d (Pt ) ≤ ǫ} ≤ 1 − P r {Pt ∈ Ωǫ } (Adding 1 to both sides) P r {d (Pt ) > ǫ} ≤ 1 − P r {Pt ∈ Ωǫ } (Probability) ≤ (1 − δ)t (Transitivity with line 5) p t Since (1 − δ) → 0 as t → ∞ then P r {d (Pt ) > ǫ} → 0 as t → ∞, so Dt → 0. Now, ∞ ∞ X X t (1 − δ) (line 11) P r {d (Pt ) > ǫ} ≤ i=1 i=1 ≤ (1−δ) (geometric serie) δ <∞ Therefore, (d (Pt ) : t ≥ 0) converges completely to zero. 5.1. Convergence of a VR-SGoal We follow the approach proposed by Günter Rudolph in [16], to determine the convergence properties of a VR-SGoals but we formalize it in terms of kernels (both variation and replacement). Theorem 84. A VR-SGoal with Kv an optimal strictly bounded from zero variation kernel and Kr an elitist replacement kernel, will converge to the global optimum of the objective function. Proof. If we prove that K = Kr ◦[Kv  1Ω η ] satisfies the precondition of lemma 82 then the VR-SGoal will converge to the global optimum of the objective function (theorem 83). ˆ we use the notation ω = η + υ in this proof. [1. K (x, A) = [Kv  1Ω η ] (x, dy) Kr (y, A)] Ω ω ×{x} 27 K (x, A) = (K ˆ r ◦ [Kv  1Ω η ]) (x, A) = (def K) [Kv  1Ω η ] (x, dy) Kr (y, A) (def ◦)   Kv x, π{1,...,υ} (dy) 1Ω η x, π{υ+1,...,ω} (dy) Kr (y, A) (def ) Ωω = = ˆ Ωω ˆ Ω ω ×{x} = ˆ   Kv x, π{1,...,υ} (dy) 1Ω η x, π{υ+1,...,ω} (dy) Kr (y, A) (def 1Ω η ) [Kv  1Ω η ] (x, dy) Kr (y, A) (def K) Ω ω ×{x} Notice, if y ∈ Ω υ × {x} then d (y) ≤ d (x) (def d ()) and if y ∈ Ωǫω then d (y) < ǫ (def Ωǫω ) therefore Kr (y, Ωǫη ) = 1 (lemma 79.2). [2. K (x, Ωǫη ) ≥ δ (ǫ) > 0 for all x ∈ Ω η ] ˆ η [Kv  1Ω η ] (x, dy) Kr (y, Ωǫη ) (obvious) K (x, Ωǫ ) = ≥ ≥ ≥ Ωˆǫω Ωˆǫω S [Kv  1Ω η ] (x, dy) ∗ Kr (y, Ωǫη ) (Kx,• measure) [Kv  1Ω η ] (x, dy) (lemma 79.2) Ωǫω ˆ ω (Ωǫw )c  Kv x, π{1,...,υ} (dy) Ω  ´ǫ ×{x} ≥ Ω ω Kv x, π{1,...,υ} (dy) ´ ǫ ≥ Ω υ Kv (x, dz) ǫ ≥ Kv (x, Ωǫω ) (line 3) (obvious) (notation) (def kernel) / Ωǫη (Kv optimal strictly bounded Clearly, K (x, Ωǫη ) ≥ δ (ǫ) > 0 for all x ∈ from zero). [3. K (x, Ωǫη ) = 1 if x ∈ Ωǫη ] If x ∈ Ωǫη then d (x) < ǫ (def Ωǫη ). c Clearly, d (y) < ǫ (transitivity), therefore K (x, (Ωǫη ) ) = 0 (lemma 79.2) and K (x, Ωǫη ) = 1 (Kx,• probability measure). Corollary 85. Algorithms HC, and SSGa will converge to the global optimum of the objective function if kernelsvhc , and vSSGa are optimal strictly bounded from zero kernels. Proof. Follows from theorem 84 and proposition 78. 28 6. Conclusions and Future Work Developing a comprehensive and formal approach to stochastic global optimization algoritms (SGoals) is not an easy task due to the large number of different SGoals reported in the literature (we just formalize and characterize three classic SGoals in this paper!). However, such SGoals are defined as joins, compositions and/or random scans of some common deterministic and stochastic methods that can be represented as kernels on an appropiated structure (measurable spaces with some special property and provided with additional structure). Such special structure is the optimization space (defined in this paper). On this structure, we are able to characterize several SGoals as special cases of variation/replacement strategies, join strategies, elitist strategies and we are able to inherit some properties of their associated kernels. Moreover, we are able to prove convergence properties (following Rudolph approach [16]) of SGoals. Since the optimization σ-algebra property of the structure is preserved by product σ-algebras, our formal approach can be applicable to both single point SGoals and population based SGoals. Although the theory developed in this paper is comprehensive for just studying SGoals with fixed parameters (like population size and variation rates), it is a good starting point for studying adapting SGoals (SGoals that adapt/vary some search parameters as they are iterating). The central concept for doing that will be the join of kernels (if we consider the space of the parameter values as part of the σ-algebra). However, such study is far from the scope of this paper. Our future work will concentrate on including in this formalization, as many as possible, selection mechanisms that are used in SGoals, and extending and developing the theory required for characterizing both adaptable and Mixing SGoals. References [1] L. Liberti, “Introduction to global optimization,” 2008. [2] G. P. Rangaiah and G. P. Rangaiah, Stochastic Global Optimization Techniques and Applications in Chemical Engineering: Techniques and Applications in Chemical Engineering. River Edge, NJ, USA: World Scientific Publishing Co., Inc., 2010. [3] A. Zhigljavsky and A. Zilinskas, Stochastic global optimization. Springer Optimization and Its Applications, Springer, 2010. [4] J. J. E. Kelley, “The cutting-plane method for solving convex programs,” Journal of the Society for Industrial and Applied Mathematics, vol. 8, no. 4, pp. 703–712, 1960. [5] D. R. Morrison, S. H. Jacobson, J. J. Sauppe, and E. C. Sewell, “Branchand-bound algorithms,” Discret. Optim., vol. 19, pp. 79–102, Feb. 2016. 29 [6] J. H. Holland, Adaptation in Natural and Artificial Systems. The University of Michigan Press, 1975. [7] K. De Jong, An analysis of the Behavior of a class of genetic adaptive systems. PhD thesis, University of Michigan, 1975. [8] A. E. Eiben, R. Hinterding, and Z. Michalewicz, “Parameter control in evolutionary algorithms,” IEEE Transactions in Evolutionary Computation, vol. 3(2), pp. 124–141, 1999. [9] K. Fleetwood, “An introduction to differential evolution,” [10] M. Kimura, The Neutral Theory of Molecular Evolution. Cambridge University Press, 1983. [11] A. Kenkle, Probability Theory: A Comprehensive Course. Springer Verlag, second ed., 2014. [12] L. Breiman, Probability. Addison-Wesley, 1968. [13] C. Geyer, Markov Chain Monte Carlo Lecture Notes. Unpublished, 2005. [14] C. Geyer, “Introduction to markov chain monte carlo,” in Handbook of Markov Chain Monte Carlo (S. Brooks, A. Gelman, G. Jones, and X.-L. Meng, eds.), ch. 1, pp. 3–47, Crc: CRC Press, 2011. [15] B. E. Fristedt and L. F. Gray, A Modern Approach to Probability Theory. Springer Science & Business Media, 1997. [16] G. Rudolph, “Convergence of evolutionary algorithms in general search spaces,” in In Proceedings of the Third IEEE Conference on Evolutionary Computation, pp. 50–54, IEEE Press, Piscataway (NJ, 1996. 30
2cs.AI
arXiv:1712.05594v1 [cs.CE] 15 Dec 2017 Influence of the SIPG penalisation on the numerical properties of linear systems for elastic wave propagation Uwe Köcher1 1 Helmut-Schmidt-University, University of the Federal Armed Forces Hamburg, Department of Mechanical Engineering, Germany, [email protected] December 18, 2017 Abstract Interior penalty discontinuous Galerkin discretisations (IPDG) and especially the symmetric variant (SIPG) for time-domain wave propagation problems are broadly accepted and widely used due to their advantageous properties. Linear systems with block structure arise by applying spacetime discretisations and reducing the global system to time-slab problems. The design of efficient and robust iterative solvers for linear systems from interior penalty discretisations for hyperbolic wave equations is still a challenging task and relies on understanding the properties of the systems. In this work the numerical properties such as the condition number and the distribution of eigenvalues of different representations of the linear systems coming from space-time discretisations for elastic wave propagation are numerically studied. These properties for interior penalty discretisations depend on the penalisation and on the time interval length. 1 Introduction The accurate and efficient simulation of time-domain first- and second-order hyperbolic elastic and acoustic wave propagation phenomena is of importance in many engineering fields with e.g. electromagnetic, acoustic and seismic applications as well as for non-destructive structural health monitoring of light-weighted fibre reinforced materials; cf. e.g. [1, 2] and references therein. Recently there is again an increased interest in the simulation of multi-physics systems including coupled elastic wave propagation together with fluid flow in porous media; cf. [3, 4]. Such models appear for instance in battery engineering and for biomedical applications. The ability of the efficient high-order approximation of the space-time wavefield is of fundamental importance for time-domain numerical simulations of wave phenomena. Especially discontinuous Galerkin methods (dG) as spatial discretisations exhibit as favourable over continuous finite element methods in 1 terms of lesser numerical dispersion at the same discretisation order such as polynomial degree and degrees of freedom per wavelength; cf. [5]. Reed and Hill introduced in 1973 the first discontinuous Galerkin method for first-order hyperbolic steady-state neutron transport. Meanwhile there exist many discontinuous Galerkin methods for the spatial discretisation of elliptic, parabolic and hyperbolic problems; cf. e.g. [8]. Interior penalty discontinuous Galerkin discretisations (IPDG) and especially the symmetric interior penalty variant (SIPG) for time-domain wave propagation problems are broadly accepted and widely used due to their advantageous properties and their ability for parallel numerical simulations. The SIPG discretisation of the second-order wave equations is convergent of optimal order in the energy- and L2 -norm for any polynomial approximation degree in space; cf. [7]. All interior penalty discontinuous Galerkin families include additional terms combined of trace operators on the interior and exterior boundaries between mesh elements. Interior penalty methods include a stabilisation term which penalises jumps of the trial and test function traces on the boundaries to ensure coercivity of the bilinear form corresponding to the Laplacian operator. The needed weighting depends on spatial mesh parameters such as the cell diameter, the cell anisotropy and the local polynomial degree as well as on material parameters but not on the time discretisation parameters; cf. [6, 7, 8]. The estimation of the local minimal choice of the penalisation is of fundamental importance but it turns out to be difficult in physically relevant problems. An over-penalisation should be avoided since such results in linear systems with higher condition numbers than necessary. The over-penalisation may result in inefficient iterative system solves or breakdowns if it is not take into account in the solver design. The common drawback of discontinuous Galerkin discretisations compared to their continuous Galerkin counterparts is that they need more degrees of freedom to obtain the same analytic convergence order. In physically relevant problems the drawback of the higher number of degrees of freedom is not that present compared to analytic test problems. To the contrary, physically relevant problems gain advantages, such as avoiding linear-elasticity locking phenomena and the ability to capture incompatible but relevant boundary and initial conditions, from the lesser grid stiffness of discontinuous approaches in space and time; cf. e.g. [1]. Linear systems with block structure arise by applying space-time discretisations and reducing the global system to time-slab or time-interval problems; cf. [1]. The design of efficient and robust iterative solvers for linear systems from interior penalty discretisations for hyperbolic wave equations is still a challenging task and relies on understanding the properties of the systems. This work presents the numerical properties such as the condition number and the distribution of eigenvalues and their dependency on the penalisation and on the time interval length of different representations of the linear systems coming from space-time discretisations for elastic wave propagation. To the best knowledge of the author such results are not present in the literature. The following structure of the paper is the brief introduction of the elastic wave equation and its space-time discretisation in Sec. 2, the presentation of different representations of the fully discrete systems which are further studied in Sec. 3, the numerical experiments section providing the results in Sec. 4 and summarising and concluding remarks in Sec. 5. 2 2 Elastic wave equation and space-time discretisation The elastic wave equation in its first-order in time, or displacement-velocity, representation reads as the following system. The primal variables are the displacement u and the velocity v. The volume is represented by the domain Ω Ă Rd , with dimension d “ 2, 3, and the time domain is given by I “ p0, T q for some finite final time T . Find the pair tu, vu from ρs pxqBt upx, tq ´ ρs pxqvpx, tq “0 in Ω ˆ I , ρs pxqBt vpx, tq ´ ∇ ¨ σpupx, tqq “ f px, tq in Ω ˆ I , (1) with boundary conditions upx, tq “ gpx, tq on ΓD ˆ I, σpupx, tqq n “ hpx, tq on ΓN ˆ I, and initial conditions upx, 0q “ u0 pxq in Ω ˆ t0u, vpx, 0q “ v 0 pxq in Ω ˆ t0u. The linearised stress tensor is given by σpuq “ C : ǫpuq and is composed of the action of the (possibly anisotropic) linear elasticity tensor C on the linearised strain ǫpuq “ p∇u ` ∇uT q{2. The solid mass densities inside the volume are denoted by ρs . Acting internal volume forces are denoted by f . A detailed derivation of the system can be found in [1]. Standard notation for function spaces, norms and inner products is used. Let H “ L2 pΩqd , V “ H01 pΓD ; Ωqd , V ˚ “ H ´1 pΓD ; Ωqd , H “ L2 pI; Hq, V “ tv P L2 pI; V q | Bt v P Hu and W “ L2 pI; V q. The initial-boundary value problem with purely homogeneous Dirichlet boundary condition g “ 0 admits an unique s V q, v P H X CpI; s Hq and Bt v P L2 pI; V ˚ q as given weak solution u P V X CpI; by the literature. A variational space-time discretisation is briefly presented in the sequel; for all details consider [1]. A piecewise polynomial continuous Galerkin approximation of polynomial degree r is used as semi-discretisation in time. Hereby a piecewise discontinuous space of polynomial degree r ´ 1 is used as test function space which allows the truncation of the global space-time system to time interval or time slab problems. Let 0 “ t0 ă ¨ ¨ ¨ ă tN “ T the partition of the temporal domain I “ p0, T q into N subintervals In “ ptn´1 , tn q, n “ 1, . . . , N . The length of the subinterval In is defined by τn “ tn ´ tn´1 and let τ “ max1ďnďN τn the global time discretisation parameter. Let Pr pIn ; Xq denote the space of polynomials of degree r or less on the interval In Ă I with s Rq, with ξ|In P Pr pIsn ; Rq, values in some Banach space X. Introducing ξ P CpI; 2 s and ζ P L pI; Rq, with ζ|In P Pr pIn ; Rq, as global piecewise polynomial trail and test basis functions. The semi-discrete system reads as: Find the pairs ι ι cG tucG τ |In , v τ |In u P Pr pIn ; V q ˆ Pr pIn ; V q, with coefficients U n , V n P V for ι “ 1, . . . , r, such that r ! ÿ ι“0 r ! ÿ ι“0 ) r q ´ βκ,ι pρs V ιn , ω rq “ 0 , ακ,ι pρs U ιn , ω ακ,ι pρs V ι pq ` n, ω ) pq βκ,ι apU ιn , ω 3 “ r ÿ ι“0 @r ωPV , pq , βκ,ι pF ιn , ω @p ωPV , (2) for all κ “ 1, . . . , r, and with 1 ακ,ι :“ pξn,ι ptq, ζn,κ ptqqIn “ βκ,ι :“ pξn,ι ptq, ζn,κ ptqqIn “ ż ż Ip Ip ξpι1 pp tq ζpκ pp tq dp t “ ξpι pp tq ζpκ pp tq τn dp t“ r ÿ µ“0 r ÿ µ“0 tµ q ζpκ pp tµ q , w pµ ξpι1 pp (3) tµ q ζpκ pp tµ q , τn w pµ ξpι pp pGL(r+1) such that using quadrature weights w pµ and quadrature points p tµ from Q the continuity conditions between neighbouring subintervals hold. For the discretisation in space, let the partition Th of the space domain Ω into some finite number of disjoint elements K. Denoting by hK the diameter of the element K and the global space discretisation parameter as h “ maxKPTh hK . The spatial mesh is allowed to be anisotropic but non-degenerated. Let the partition Fsh “ FshB Y FhI into disjoint parts FshB , FhI for the set of boundary faces and the set of interior faces. The set of boundary faces is divided as BpΓ q BpΓ q BpΓ q BpΓ q BpΓ q FshB :“ Fh D Y Fh N , FhB :“ Fh D , into disjoint parts Fh D , Fh N coinciding with the Dirichlet boundary ΓD and the Neumann boundary ΓN . BpΓ q We let Fh :“ Fh D Y FhI “ FhB Y FhI . The jump trace operators, which enforce weak Dirichlet boundary conditions, are defined by # # v|F ` ´ v|F ´ , F P FhI , v|F ` ´ v|F ´ , F P FhI , JvK0 :“ JvK :“ (4) v|F ` , F P FhB , v|F ` ´ v|ΓD , F P FhB . The average trace operator is defined by # ` ` ˘ ` ˘˘ 1 , F P FhI , 2 tF v|F ` ` tF v|F ´ tttF pvquu :“ ` ˘ tF v|F ` , F P FhB , (5) ` ˘ ` ˘ using the traction vector tF v|F ˘ :“ σ v|F ˘ n˘ . To be concise as possible, we give directly the bilinear form ah corresponding to the weak Laplacian as ÿ ż ÿ ż n,ι ah pun,ι , ω q “ σpu q : ǫpω q ´ tttF pun,ι h h h h h quu ¨ Jω h K0 K F KPTh F PFh ż ´ ¯ (6) ÿ ` Jun,ι h K ¨ γF Jω h K0 ´ S tttF pω h quu , F PFh F where S P t1, ´1, 0u denotes the consistency parameter. The choice S “ 1 leads to SIPG, S “ ´1 to NIPG and S “ 0 to IIPG. Note that the non-homogeneous Dirichlet boundary terms can be shifted efficiently to the right hand side and thus only a stiffness matrix for homogeneous Dirichlet boundaries has to be assembled. The value of the interior penalty parameter γF is determined by an inverse estimate to balance the terms involving numerical fluxes on the element boundaries F P Fh in Eq. (6) and to ensure coercivity of the bilinear form ah . We let γF “ γ0 γF,C γF,K , where γF,K denotes a parameter depending only the polynomial approximation degree p in space and the shape of the elements K ˘ , γF,C denotes a (scalar) parameter depending the material parameters in K ˘ and γ0 denotes an additional tuning parameter; cf. for details [1, 6]. 4 3 Fully discrete systems In this work only the linear systems of continuous piecewise linear approximations in time, that are SIPG(p)–cG(1) and FEM(p)–cG(1), are studied. The results can be used for higher order time discretisations, since their efficiency depends strongly on solving additional problems corresponding to the following systems; cf. for details [1]. To derive fully discrete systems from Eq. (2), the basis functions in time are specified as Lagrange polynomials, which are defined via the quadrature points pGL(2) on the p t0 “ 0 and p t1 “ 1 of the two-point Gauß-Lobatto quadrature rule Q time reference interval Ip “ r0, 1s. ξp0 pp tq “ 1 ´ p t , ξp01 pp tq “ ´1 , ξp1 pp tq “ p t, ξp11 pp tq “ 1 , ζp1 pp tq “ 1 , and, with that, the coefficients ακ,ι and βκ,ι from Eq. (3) are evaluated as β1,0 “ τ2n , β1,1 “ τ2n . α1,0 “ ´1 , α1,1 “ 1 , We recast the arising algebraic system by the following linear system with block structure: Find the coefficient vectors u1In , v 1In P RNDoF from L x “ b given by ff« 1 ff « ff« 0 ff « τn ff « τn 0 v In v In ´2M M M 2 M ` “ , (7) 0 1 τn τn τn 1 uIn u0In M 2A M´2A 2 pbIn ` bIn q and denoting by M the mass matrix and by A the stiffness matrix. The assemblies b0In and b1In include the contributions from the forcing terms and inhomogeneous Dirichlet boundary from Eq. (6) using Eq. (4). The flexible GMRES method with an inexact Krylov-preconditioner can be used for example to solve the linear system (7) efficiently. With some algebraic steps, the block system can be condensed to K u1In “ r b and a postprocessing as given by pM ` 2 τn 1 4 Aq uIn “ 2 τn 0 4 pbIn ` b1In q ` pM ´ v 1In “ τ2n pu1In ´ u0In q ´ v 0In . 2 τn 0 4 AquIn ` τn M v 0In , (8) The linear system Eq. (8) is comparable to a classical discretisation by employing a Crank-Nicolson scheme for the time discretisation. Hence, optimised solvers for linear systems with the matrix K can be re-used. 4 Numerical Experiments In this section we study some numerical properties of the linear systems as of Eq. (8) and Eq. (7). Therefore we approximate the analytic solution ff « sinppt ` x q ¨ 2πq 1 (9) uE prx1 , x2 sT , tq “ sinppt ` x2 q ¨ 2πq on Ω ˆ I “ p0, 1q2 ˆ p0, 1q with BΩ “ ΓD . The right hand side, initial and boundary values are derived by plugging uE into Eq. (1). The global mesh size 5 Figure 1: Visualisation of the solution Eq. (9) at t “ 1 for the magnitude of displacement (left) and the velocity (right) with SIPG(2)–cG(1) and τn “ 1.25 ¨ 10´2 . ? is h “ 10´1 {p2 2q and we use p “ 2 elements in space. The material is isotropic with Young’s E modulus E “ 70, Poisson’s ratio ν “ 0.34 and density ρs “ 2.8. The numerical simulations are done with the DTM++/ewave frontend solver of the author for the deal.II library; cf. [1]. The solutions of the displacement and velocity are illustrated by Fig. 1. cG(1) The convergence for the error eu “ uE ´ uτ,h and the dependency on the penalisation γ0 to obtain a certain accuracy is presented in Fig. 2. For a penalty value of γ0 “ 106 the experimental order of convergence in time is 2.00 in the L2 pI; L2 pΩqq-norm and the calculated errors of the SIPG and FEM discretisations are comparable. Fig. 3 presents the effects of the penalisation and the time step length τn on the condition numbers. Fig. 4 illustrates the distribution of the normalised eigenvalues of the matrix K for SIPG(2)–cG(1) with γ0 “ 106 for several values of τn and the normalised eigenvalues of the matrix K for FEM(2)–cG(1) for τn “ 10´6 . 5 Conclusions The influence of the penalisation of the SIPG discretisation is analysed numerically for fully discrete linear systems of different representations and compared with their standard finite element counterparts. It is shown that the condition number of the condensed SIPG system matrix scales with the penalisation and the time subinterval length τn with a challenging numerical experiment. The eigenvalues collects in small number of clusters for SIPG discretisations by choosing τn « 1{γ0 . The effect of clustering of the eigenvalues could not be reproduced for the comparable FEM system or for the block system with SIPG. A (much) faster convergence behaviour of the conjugate gradient method for the condensed SIPG system for small time step sizes was noticed but not analysed by the author in the past for several three dimensional problems with physically relevance; cf. [1]. With the results of this work, a faster convergence behaviour of the conjugate gradient method can be explained due to the clustering effect of the eigenvalues in such cases. The results of this work clearly help to design preconditioners for the block system or the condensed system for SIPG discretisations for the elastic wave equation, but we keep this as future work. 6 }eu }L2 pL2 q 10´1 10´2 SIPG(2)–cG(1), SIPG(2)–cG(1), SIPG(2)–cG(1), SIPG(2)–cG(1), FEM(2)–cG(1) 10´3 10´4 10´2 10´1 γ0 γ0 γ0 γ0 “ 1e+3 “ 1e+4 “ 1e+5 “ 1e+6 100 τn experimental condition number Figure 2: Interior penalty parameter γF influence on the experimental convergence behaviour in time for approximating uE from Eq. (9) for Sec. 4. SIPG(2)–cG(1), γ0 “ 1e+6 SIPG(2)–cG(1), γ0 “ 1e+5 FEM(2)–cG(1) 107 105 103 low accuracy 101 10´5 10´4 10´3 10´2 10´1 τn Figure 3: Influence of the interior penalty parameter γF and the global time discretisation parameter τn on the experimental condition number for Sec. 4. τn 10´2 10´4 10´6 0 0.2 0.4 0.6 0.8 1 Figure 4: Distribution of normalised eigenvalues of matrices Kpτn q for SIPG(2) with γ0 “ 106 (solid blue) and for FEM(2) with τn “ 10´6 (dotted red) for Sec. 4. 7 Acknowledgements The research contribution of the author was partially supported by E.ON Stipendienfonds (Germany) under the grant T0087 / 29890 / 17 while visiting University of Bergen. References [1] U. Köcher, Variational space-time methods for the elastic wave equation and the diffusion equation, Ph.D. thesis, Department of Mechanical Engineering of the Helmut-Schmidt-University, University of the German Federal Armed Forces Hamburg, urn:nbn:de:gbv:705-opus-31129, 1–188, 2015. [2] U. Köcher and M. Bause, Variational space-time discretisations for the wave equation, J. Sci. Comput. 61(2):424–453, doi:10.1007/s10915-0149831-3, 2014. [3] A. Mikelic and M.F. Wheeler, Theory of the dynamic Biot-Allard equations and their link to the quasi-static Biot system, J. Math. Phys. 53(123702):1–16, doi:10.1063/1.4764887, 2012. [4] M.A. Biot, The influence of initial stress on elastic waves, J. Appl. Phys. 11(8):522–530, doi:10.1063/1.1712807, 1940. [5] J.D. De Basabe and M.K. Sen and M.F. Wheeler, The interior penalty discontinuous Galerkin method for elastic wave propagation: grid dispersion, Geophys. J. Int. 175(1):83–93, doi:10.1111/j.1365246X.2008.03915.x, 2008. [6] R.H.W. Hoppe and G. Kanschat and T. Warburton, Convergence analysis of an adaptive interior penalty discontinuous Galerkin method, SIAM J. Numer. Anal. 47(1):534–550, doi:10.1137/070704599, 2008. [7] M.J. Grote and A. Schneebeli and D. Schötzau, Discontinuous Galerkin finite element method for the wave equation, SIAM J. Numer. Anal. 44(6):2408–2431, doi:10.1137/05063194X, 2006. [8] D.N. Arnold and F. Brezzi and B. Cockburn and L.D. Marini, Unified analysis of discontinuous Galerkin methods for elliptic problems, SIAM J. Numer. Anal. 39(5):1749–1779, doi:10.1137/S0036142901384162, 2002. 8
5cs.CE
On sampling SCJ rearrangement scenarios István Miklós1,2 and Sándor Z. Kiss2,3 and Eric Tannier4 arXiv:1304.2170v1 [cs.CE] 8 Apr 2013 1 3 Department of Stochastics, Rényi Institute, 1053 Budapest, Reáltanoda u. 13-15, Hungary 2 Data Mining and Search Research Group, Computer and Automation Institute, Hungarian Academy of Sciences, 1111 Budapest, Lágymányosi út 11, Hungary University of Technology and Economics, Department of Algebra, 1111 Budapest, Egry József utca 1, Hungary 4 INRIA Rhône-Alpes ; Université de Lyon ; Université Lyon 1 ; CNRS, UMR5558, Laboratoire de Biométrie et Biologie Évolutive, F-69622, Villeurbanne, France. Abstract The Single Cut or Join (SCJ) operation on genomes, generalizing chromosome evolution by fusions and fissions, is the computationally simplest known model of genome rearrangement. While most genome rearrangement problems are already hard when comparing three genomes, it is possible to compute in polynomial time a most parsimonious SCJ scenario for an arbitrary number of genomes related by a binary phylogenetic tree. Here we consider the problems of sampling and counting the most parsimonious SCJ scenarios. We show that both the sampling and counting problems are easy for two genomes, and we relate SCJ scenarios to alternating permutations. However, for an arbitrary number of genomes related by a binary phylogenetic tree, the counting and sampling problems become hard. We prove that if a Fully Polynomial Randomized Approximation Scheme or a Fully Polynomial Almost Uniform Sampler exist for the most parsimonious SCJ scenario, then RP = NP. The proof has a wider scope than genome rearrangements: the same result holds for parsimonious evolutionary scenarios on any set of discrete characters. Keywords: MSC codes: F.2.2: Computations on discrete structures, G.2.1: Counting problems, free keywords: Single cut and join, FPAUS, FPRAS, non-approximability Preprint submitted to Theoretical Computer Science April 9, 2013 1. Introduction The genome rearrangement problem is one of the oldest optimization problems in computational biology. It has been already formulated by Sturtevant and Novitski (1941). It consists in finding the minimum number of rearrangement events that can explain the gene order differences between two genomes. According to how genomes and rearrangements are defined, a number of variants have been studied (Fertin et al., 2009). In many cases, efficient algorithms running in polynomial time exist for finding one solution, but they do not scale up to three genomes: finding a median, i.e., a genome minimizing the sum of the number of rearrangements to the three others, is almost always NP − hard. Moreover, one solution is not representative of the whole optimal solution space. So another computational problem is to find all minimum solutions. But the number of minimum solutions is often so high that their explicit enumeration is not possible in polynomial running time. A small number of samples coming from (almost) the uniform distribution is usually sufficient for testing evolutionary hypotheses like the Random Breakpoint Model (Alekseyev and Pevzner, 2010; Bergeron et al., 2008) or the sizes and positions of inversions (Ajana et al., 2002; Darling et al., 2008). Drawing conclusions from one scenario or from a biased sample should be avoided as it might be very misleading (Bergeron et al., 2008; Miklós and Darling, 2009). Statistical methods, like Markov chain Monte Carlo methods, can sample genome rearrangement scenarios (Darling et al., 2008; Durrett et al., 2004; Larget et al., 2002, 2005; Miklós and Tannier, 2010), but often there are no available results for their mixing time. Only in the case of the Double Cutand-Join (DCJ) rearrangement model, a Fully Polynomial time Randomized Approximation Scheme (FPRAS) and a Fully Polynomial Almost Uniform Sampler (FPAUS) are available for counting and sampling most parsimonious rearrangement scenarios between two genomes (Miklós and Tannier, 2012). But this is hardly generalizable to more than two genomes because for DCJ the median problem is NP − hard (Tannier et al., 2009). Recently, a simpler rearrangement model has been published by Feijão and Meidanis (2011) under the name Single Cut or Join, or SCJ. It consists in a gain and loss process on gene adjacencies, and from a chromosomal point of view, allows fusions and fissions, linearization of circular chromosomes and vice versa. The computational simplicity of this model is highlighted by the existence of an easy polynomial running time algorithm for the median 2 problem. More generally, finding a most parsimonious SCJ scenario on an arbitrary evolutionary tree (the small parsimony problem) is also polynomial. Therefore, it is reasonable to assume that at least stochastic approximations are available for the number of most parsimonious SCJ scenarios. We show here that it is the case for two genomes. However, we report a negative result for the small parsimony problem: the number of most parsimonious SCJ scenarios cannot be approximated in polynomial time even in a stochastic manner unless RP = NP. This bounds the possibilities of using this model for genomic studies. The paper is organized as follows. The next Section formally introduces useful vocabulary in genome rearrangement and random algorithm complexity. In Section 3 we show that counting and sampling SCJ scenarios between two genomes is easy, and show the relation with the so-called André’s problem on alternating permutations. The hardness theorems for an arbitrary number of genomes are stated and proved in Section 4. The paper ends with a discussion on the impact of these results and the statements of some related open problems. 2. Genome rearrangement: finding, counting, sampling 2.1. Genome rearrangement by SCJ Definition 1. A genome is a directed, edge-labelled graph, in which each vertex has a total degree at most 2, and each label is unique. Each edge is called a gene. The beginning of an edge is called tail, the end of an edge is called head, the joint name of heads and tails is extremities. The vertices with degree 2 are called adjacencies, the vertices with degree 1 are called telomeres. By definition, a genome is a set of disjoint paths and cycles, and neither the paths nor the cycles are necessarily directed. The components of the genome are the chromosomes. An example for a couple of genomes is drawn on Figure 1. All adjacencies correspond to two gene extremities and telomeres to one. For example, (h1, t3) describes the vertex of genome G2 in Figure 1 in which the head of gene 1 and the tail of gene 3 meet, and similarly, (h7) is the telomere where gene 7 ends. A genome is fully described by a list of such descriptions of adjacencies and telomeres. We will study several genomes simultaneously. We always assume the genomes we compare have the same label set. It means they are required to have exactly the same gene content. 3 1 2 3 4 5 6 8 7 G1 9 2 1 3 4 5 6 8 9 7 G2 Figure 1: An example of two genomes with 9 genes. Definition 2. A Single Cut or Join (SCJ) operation transforms one genome into another by modifying the adjacencies and telomeres in one of the following 2 ways: • take an adjacency (a, b) and replace it by two telomeres, (a) and (b). • take two telomeres (a) and (b), and replace them by an adjacency (a, b). Given two genomes G1 and G2 , it is always possible to transform one into the other by a sequence of SCJ operations (Feijão and Meidanis, 2011). Such a sequence is called an SCJ scenario for G1 and G2 . Scenarios of minimum length are called most parsimonious, and their length is the SCJ distance and is denoted by dSCJ (G1 , G2 ). The adjacency graph was introduced by Bergeron et al. (2006) to compute the DCJ distance between two genomes. It can be used to study SCJ scenarios as well: Definition 3. The adjacency graph G(V1 ∪V2 , E) of two genomes G1 and G2 is a bipartite multigraph in which V1 is the set of adjacencies and telomeres of G1 and V2 is the set of adjacencies and telomeres of G2 . The number of edges between u ∈ V1 and v ∈ V2 is the number of extremities they share. Each vertex of the adjacency graph has either degree 1 or 2, and thus, the adjacency graph falls into disjoint cycles and paths. Each path has one of the following three types: • odd path, containing an odd number of edges and an even number of vertices, • W -shaped path, which is an even path with two endpoints in V1 4 t1 (h1,t2) (t3) (t1,t2) (h1,t3) (h2) (h2,h3) (h3,h4) (h4,h5) (h9,t8) (t6,t7) (h5) (h9,t7) (t4) (t6,t8) (t4,t5) (t5,h6) (h8,t9) (h7) (h6) (h8,t9) (h7) Figure 2: The adjacency graph of the two genomes on Fig. 1 • M -shaped path, which is an even path with two endpoints in V2 In addition we call trivial components the cycles with two edges and the paths with one edge. An adjacency graph example can be seen on Figure 2. 2.2. Counting and Sampling SCJ scenarios Definition 4. A decision problem is in NP if a non-deterministic Turing Machine can solve it in polynomial time. An equivalent definition is that a witness proving the “yes” answer to the question can be verified in polynomial time. A counting problem is in #P if it asks for the number of witnesses of a problem in NP. Definition 5. A decision problem is in RP if a random algorithm exists with the following properties: a) the running time is deterministic and grows polynomially with the size of the input, b) if the true answer is “no”, then the algorithm answers “no” with probability 1, c) if the true answer is “yes”, then it answers “yes” with probability at least 1/2. Definition 6. The Most Parsimonious SCJ scenario problem (MPSCJ) is to compute dSCJ (G1 , G2 ) for two genomes G1 and G2 given as input. The #MPSCJ problem asks for the number of scenarios of length dSCJ (G1 , G2 ), denoted by #MPSCJ(G1 , G2 ). For example, the SCJ distance between the two genomes of Figure 1 is  12 12 and there are 16 × 3 3 4 2 different scenarios. MPSCJ is an optimization problem, which has a natural corresponding decision problem asking if there is a scenario with a given number of SCJ operations. So we may write that #MPSCJ ∈ #P, which means that #MPSCJ asks for the number of witnesses of the decision problem “Is there a scenario for G1 and G2 of size dSCJ (G1 , G2 ) ?”. 5 Definition 7. Given a rooted binary tree T (V, E) with k leaves, and genomes G1 , G2 , . . . , Gk assigned to the leaves, the small parsimony SCJ problem (SPSCJ) asks for an assignment of genomes to the internal nodes of T and an SCJ scenario for each edge, which minimize the number of SCJ operations along the tree, i.e., X dSCJ (Gi , Gj ) (1) (vi ,vj )∈E where Gi (Gj ) is the genome which is assigned to vertex vi ∈ V (vj ∈ V ). The small parsimony term is borrowed from the well-known textbook problem (Jones and Pevzner, 2004), the small parsimony problem of discrete characters: Given a rooted binary tree T (V, E) with k leaves labelled by characters from a finite alphabet, label the internal nodes such that the number of edges labelled with different characters at their two ends is minimized. The solution space of the most parsimonious SCJ scenarios on a tree consists of all possible combinations of assignments to the internal nodes together with the possible SCJ scenarios on the edges of the phylogenetic tree. The #SPSCJ problem asks the size of this solution space. As the decision version of SPSCJ is trivially in NP, #SPSCJ is in #P. There are subclasses in #P containing counting problems which are approximable by polynomial deterministic or randomized algorithms. Definition 8. A counting problem in #P is in FP if there is a polynomial running time algorithm which gives the solution. It is #P − complete if any problem in #P can be reduced to it by a polynomial-time counting reduction. Definition 9. A counting problem in #P is in FPRAS ( Fully Polynomial Randomized Approximation Scheme) if there exists a randomized algorithm such that for any instance x, and , δ > 0, it generates an approximation fˆ for the solution f , satisfying   f ˆ ≤ f ≤ f (1 + ) ≥ 1 − δ (2) P 1+ and the algorithm has a time complexity bounded by a polynomial of |x|, 1/ and − log(δ). The total variational distance dT V (p, π) between two discrete distributions p and π over the set X is defined as 1X dT V (p, π) := |p(x) − π(x)| (3) 2 x∈X 6 Definition 10. A counting problem in #P is in FPAUS if there exists a randomized algorithm (a Fully Polynomial Almost Uniform Sampler that is also abbreviated as FPAUS) such that for any instance x, and  > 0, it generates a random element of the solution space following a distribution p satisfying dT V (p, U ) ≤  (4) where U is the uniform distribution over the solution space, and the algorithm has a time complexity bounded by a polynomial of |x|, and − log(). 3. Most parsimonious SCJ scenarios between two genomes 3.1. A dynamic programming solution The SCJ distance can be calculated in polynomial time, as stated in the following theorem. Theorem 11. (Feijão and Meidanis (2011)) Let Π1 denote the set of adjacencies in genome G1 and let Π2 denote the set of adjacencies in genome G2 . Then dSCJ (G1 , G2 ) = |Π1 ∆Π2 | (5) where ∆ denotes the symmetric difference of the two sets. Theorem 11 says that any shortest path transforming G1 into G2 has to cut all the adjacencies in G1 \ G2 and add all the adjacencies in G2 \ G1 , and there are no more SCJ operations. Drawing one solution is easy: first cut all adjacencies in G1 \ G2 , then join all adjacencies in G2 \ G1 . But if we want to explore the solution space, we have to observe that if an adjacency (a, b) exists in G1 \ G2 and an adjacency (a, c) exists in G2 \ G1 , then first adjacency (a, b) must be cut to create telomere (a), and then telomere (a) can be connected to telomere (c). Similarly, if extremity c belongs to an adjacency in G1 \ G2 , then it must be also cut before connecting the two telomeres. Therefore there are restrictions on the order of cuts and joins. The allowed order of cuts and joins can be read from the adjacency graph: When an SCJ operation acts on G1 and thus creates G01 , it also acts on the adjacency graph of G1 and G2 by transforming it into the adjacency graph of G01 and G2 . Therefore the transformation of G1 into G2 can be seen as a transformation of the adjacency graph into trivial components. We say that an SCJ scenario sorts the adjacency graph if it transforms it into trivial components. As any SCJ operation in a most parsimonious scenario acts on 7 a single component, we say that the set of SCJ operations acting on that component sort it if they transform it into trivial components. We first give the way of computing the number of scenarios for sorting one component. Then the number of scenarios for several components will be deduced by a combination of scenarios from each component. Let W (i) (respectively M (i), O(i) and C(i)) denote the number of most parsimonious SCJ scenarios sorting a W -shaped path (respectively M -shaped path, odd path, cycle) with i adjacencies in G1 . The following dynamic programming algorithm allows to compute all these numbers. For a trivial component, no SCJ operation is needed so there is only one solution: the empty sequence. This gives C(1) = 1 O(0) = 1 (6) (7) The smallest W -shaped path has 0 adjacency in G1 and one in G2 . There is a unique solution sorting it: add the adjacency. This gives W (0) = 1 (8) A scenario of any other component starts with cutting an adjacency in G1 . For a W -shaped path, this results in two W -shaped paths. For an M -shaped path, this results in two odd paths. For an odd path, this results in an odd path and a W -shaped path. For a cycle, this results in a W -shaped path. Each emerging component has fewer adjacencies in G1 , and hence, a dynamic programming recursion can be applied: the resulting components must be sorted and in case of two resulting components, the sorting steps on the components must be merged. Hence the dynamic programming recursions are C(i) = i × W (i − 1)  i  X 2i W (i) = W (j − 1)W (i − j) 2j − 1 j=1  i  X 2i − 2 M (i) = O(j − 1)O(i − j) 2j − 2 j=1  i  X 2i − 1 O(i) = O(j − 1)W (i − j) 2j − 2 j=1 8 (9) (10) (11) (12) These dynamic programming recursions can be used for counting and sampling by the classical Forward-Backward phases: in the Forward phase the number of solutions is calculated, and in the Backward phase one random solution is chosen based on the numbers in the sums. So it is possible to compute W (i), M (i), O(i) and C(i) in polynomial time and to sample one scenario from the uniform distribution. We can then count and sample for several components by adding a multinomial coefficient. Theorem 12. Let G1 and G2 be two genomes with adjacency graph AG. Assume AG contains i M -shaped paths, with respectively m1 , m2 , . . . , mi adjacencies in G1 ; AG contains j W -shaped paths, with respectively w1 , w2 , . . . , wj adjacencies in G1 ; AG contains k odd paths, with respectively v1 , v2 , . . . , vk adjacencies in G1 ; and AG contains l cycles, with respectively c1 , c2 , . . . , cl adjacencies in G1 . The number of most parsimonious SCJ scenarios from G1 to G2 is  P Pl Pk Pj i n=1 (2cn )) ! n=1 (2vn ) + n=1 (2wn + 1) + n=1 (2mn − 1) + × Ql Qk Qj Qi n=1 (2cn )! n=1 (2vn )! n=1 (2wn + 1)! n=1 (2mn − 1)! × i Y M (n) n=1 j Y n=1 W (n) k Y n=1 O(n) l Y C(n) (13) n=1 Sampling a scenario from the uniform distribution is then achieved by generating a random permutation with different colours and indices, one colour for each component, and then wipe down the indices so get a permutation with repeats. For each component, its sorting steps must be put into the joint scenario indicated by the colour of the component. We can then state the following theorem settling the complexity of the comparison of two genomes by SCJ. Theorem 13. #MPSCJ is in FP and there is a polynomial algorithm sampling from the exact uniform distribution of the solution space of an MPSCJ problem. 3.2. Alternating permutations The solutions to #MPSCJ for single components are also linked to the number of alternating permutations, for which finding a formula is an old open problem. An alternating permutation of size n is a permutation c1 , . . . , cn of {1, . . . , n} such that c2i−1 < c2i and c2i > c2i+1 for all i (André, 1881). For 9 example, if n = 4, the permutation 1, 3, 2, 4 is an alternating permutation but 1, 3, 4, 2 is not because 3 is less than 4. The number of alternating permutations of size n is denoted by An and finding these numbers is known as André’s problem. We show that computing SCJ scenarios is closely related: Theorem 14. M (k) = A2k−1 W (k) = A2k+1 O(k) = A2k C(k) = k × A2k−1 Proof. We prove only the first line, the second and the third lines can be proved the same way. The proof of the last line comes from the fact that a cycle with k adjacencies can be opened in k different ways into a W-shaped component with k − 1 adjacencies. Let the adjacencies in the G1 part of the M -shaped component be (x1 , x2 ), (x3 , x4 ), . . . (x2k−1 , x2k ). Any SCJ scenario sorting these must cut all these adjacencies and must create adjacencies (x2 , x3 ), (x4 , x5 ), . . . (x2k−2 , x2k−1 ). Let us index the SCJ operations in a scenario, and let π2i−1 be the index of the SCJ step which cuts the adjacency (x2i−1 , x2i ), and let π2i be the index of the SCJ step which joins x2i and x2i+1 . In any most parsimonious SCJ sorting the M -shaped component, π2i−1 < π2i and π2i+1 < π2i , so π is an alternating permutation. Hence the number of sorting scenarios is at most A2k−1 . On the other hand, for any alternating permutation of size 2k − 1, we can construct a sorting scenario in which the indexes come from the alternating permutation. Since the sorting scenarios for different alternating permutations are different, the number of SCJ scenarios is at least A2k−1 . 4. Counting and sampling SCJ small parsimony solutions The SPSCJ problem is in P, since one optimal assignment of genomes to the internal nodes can be drawn in polynomial running time, (Feijão and Meidanis, 2011). However, we show that estimating the size of the solution space, as well as uniformly sampling it, is hard. We show first that there is no polynomial running time algorithm which samples almost uniformly from the solutions unless RP = NP: 10 Theorem 15. #SPSCJ ∈ FPAUS ⇒ RP = NP. Then our conjecture is that #SPSCJ ∈ #P − complete, but we can prove only a slightly weaker result Theorem 16. #SPSCJ ∈ FP ⇒ P = NP. Stochastic counting (FPRAS) and sampling (FPAUS) are equivalent for self-reducible problems [(Jerrum et al., 1986), see the quite technical definition of self-reducibility there]. However the counting counterpart of Theorem 15 cannot be immediately deduced from it because we miss a proof of selfreducibility for #SPSCJ, which seems far from trivial, even not true in that case. So we have to prove this counting counterpart independently. The construction we use in the proof of Theorem 15 shows the hardness of a more specific problem and can be adapted to prove that: Theorem 17. #SPSCJ ∈ FPRAS ⇒ RP = NP. We first recall in the following subsection how to draw one particular solution and then how to build all possible solutions. Then we show how to generate an RP algorithm for 3SAT using an FPAUS algorithm for the #SPSCJ problem. Since 3SAT ∈ NP − complete, this construction proves Theorem 15. This section finishes with proving Theorems 16 and 17. 4.1. The Fitch and Sankoff solutions Let Π1 , Π2 , . . . , Πk denote the adjacency sets of genomes G1 , G2 , . . . Gk and let Π = ∪ki=1 Πi (14) Feijão and Meidanis (2011) proved that the parsimony score is equal to the sum of the scores for each particular adjacency α ∈ Π. This can be computed by solving the small parsimony problem for a discrete character. Although this is mainly textbook material, we recall the principles of the standard algorithms solving this problem for one adjacency because some stages will be referred to in the hardness proof. For one adjacency, the small parsimony problem is solved by Fitch’s algorithm (Fitch, 1971). Its principle is first to assign sets ({0}, {1} or {0, 1}) to every node of the tree, visiting the nodes of the tree in post-order traversal, ie. first the leaves of the tree and then the parents of each node. At the leaves of the tree, {0}s and {1}s are assigned according to the pattern of presence or absence of α in 11 the corresponding genomes. Let B(α, u) denote the set assigned to node u regarding adjacency α. Fitch’s algorithm applies the recursion ( B(α, v1 ) ∩ B(α, v2 ) if B(α, v1 ) ∩ B(α, v2 ) 6= ∅ B(α, u) = (15) B(α, v1 ) ∪ B(α, v2 ) otherwise where v1 and v2 are the children of u. Definition 18. We say that there is an ambiguity for an adjacency α at vertex u if B(α, u) = {0, 1}. Then starting from the root, the nodes are visited in a pre-order traversal, and {0} or {1} is assigned to each node according to the following rules: If B(α, root) contains only one element, then it is assigned to the root. If B(α, root) = {0, 1}, then any of them can be chosen for the root. Once the number assigned to the root is fixed, the values are propagated down. Let F (α, v) denote the singleton set assigned to the node v for adjacency α. Fitch’s algorithm applies the recursion: ( F (α, u) ∩ B(α, v) if F (α, u) ∩ B(α, v) 6= ∅ F (α, v) = (16) B(α, v) otherwise where v is a child of u. F (α, v) then always contains exactly one element. Doing this independently for all adjacencies does not guarantee that the collection of present adjacencies at each node is a genome: we call a subset Σ ⊆ Π a valid genome if there is no couple of adjacencies α1 , α2 ∈ Σ with a common extremity. Feijão and Meidanis (2011) showed that if the assignments of F (α, root) over all possible adjacencies α ∈ Π are chosen to be a valid genome, then all genomes at the internal nodes are also valid (deduced from Lemmas 6.1. and 6.2 in Feijão and Meidanis (2011)). They also proved that at least one valid assignment exists since the Fitch’s algorithm never gives non-ambiguous values for adjacencies sharing extremities. We call Fitch solutions the genome assignments constructed this way. However, they are not the only possible most parsimonious genome assignments. Some of them cannot be found by Fitch’s algorithm. All solutions can be found by a generalization of Fitch’s algorithm, Sankoff’s algorithm (Sankoff and Rousseau, 1975). It is a dynamic programming principle which 12 computes two values for each node of the phylogenetic tree: for a leaf vi assigned with genome Gi , ( 0 if α ∈ Πi s1(α, vi ) = (17) ∞ otherwise ( 0 if α ∈ / Πi s0(α, vi ) = ∞ otherwise (18) and for an internal node u with children v1 and v2 : s1(α, u) = min{s1(α, v1 ), s0(α, v1 ) + 1} + min{s1(α, v2 ), s0(α, v2 ) + 1} s0(α, u) = min{s0(α, v1 ), s1(α, v1 ) + 1} + min{s0(α, v2 ), s1(α, v2 ) + 1} (19) (20) The value of s0(α, u) (respectively s1(α, u)) represents the minimum number of edges under the subtree rooted at u which are labelled with different presence/absence of α at their two ends in a most parsimonious scenario, given that u is labelled with the absence (respectively presence) of α. Then min(s1(α, root), s0(α, root)) is the minimum small parsimony solution for adjacency α, and the assignments to internal nodes are obtained by propagating down the values based on which gave the minimum in Equations 19 and 20. Contrary to Fitch’s algorithm, this one explores all possible most parsimonious assignments for a given adjacency (Erdős and Székely, 1994). Unfortunately, in that case there is no guarantee that all of these assignments give valid genomes, as Feijao and Meidanis result holds only for Fitch’s solutions. It is an open question how to estimate the number of most parsimonious genome assignments (we can call them the Sankoff solutions), and is beyond the scope of this paper (note that it is a different problem from #SPSCJ where we aim at estimating the number of SCJ scenarios and not only genome assignments). 4.2. Sampling most parsimonious SPSCJ scenarios is hard In this section we construct a problem instance x ∈ SPSCJ for any 3CNF formula Φ with n variables, such that if there exists an FPAUS for x then it is an RP algorithm for deciding whether or not Φ is satisfiable. 13 Let Φ be a 3CNF with n logical variables and k clauses. We are going to construct a tree denoted by TΦ , and label its leaves with genomes. For each logical variable bi we create an adjacency αi . In this construction, all adjacencies are independent one from another, namely they never share common extremities. So there is no genome validity issue in this construction, any assignment of adjacency presence/absence is a valid genome. For each clause cj , we construct a subtree Tcj . The construction is done in three phases, see also Figure 3. First, we create a constant size subtree, called unit subtree using building blocks we call elementary subtrees. Then in the blowing up phase, this unit subtree is repeated several times, and in the third phase it is amended with another constant size subtree. The reason for this construction is the following: the unit subtree is constructed in such a way that if a clause is satisfied, the number of SCJ solutions is a greater number, and is always the same number not depending on how many literals provide satisfaction of the clause. When the clause is not satisfied, the number of SCJ solutions is a smaller number. The blowing up is necessary for sufficiently separating the number of solutions for satisfying and not satisfying assignments. Finally, the amending is necessary for having all adjacencies ambiguous in the Fitch solutions. We detail the construction of the subtree for the clause cj = b1 ∨ b2 ∨ b3 , denoted by Tcj . Subtrees for the other kinds of clauses are constructed similarly. The unit subtree is built from 76 smaller subtrees that we will call elementary subtrees. Only 14 different types of elementary subtrees are in a unit subtree, but several of them have given multiplicity, and the total count of them is 76, see also Table 1. Some of the elementary subtrees are cherry motives for which we arbitrarily identify a left and a right leaf. On some of these cherries, we add one or more adjacencies, called extra adjacencies, which are present exactly on one leaf of the cherry and absent everywhere else in TΦ . So the edges connecting these leaves to the rest of the entire tree TΦ will contain one or more additional SCJ operations in all most parsimonious solutions. A clause contains 3 logical variables, the unit subtree will be such that for the corresponding adjacencies, Fitch’s algorithm assigns an ambiguity at the root of the subtree Tcj , namely B(αi , root) = {0, 1} (21) for each bi ∈ cj . The entire tree, TΦ , will also be such that Sankoff solutions are all found by Fitch’s algorithm, namely, all solutions can be found by the 14 amending 6444447444448 blowing up ... 644444744444 8 unit subtrees 6444447444448 ... ... ... ... elementary subtrees ... Figure 3: Constructing a subtree Tcj for a clause cj . The subtree is built in three phases. First, elementary subtrees are connected with a comb to get a unit subtree. In the second phase the same unit subtree is repeated several times ’blowing up’ the tree. In the third phase, the blown up tree is amended with a constant size, depth 3 fully balanced tree. The smaller subtrees constructed in the previous phase are denoted with a triangle in the next phase. See also text for details. 15 Fitch’s algorithm, as we are going to state and prove in Lemma 20. Therefore there will be 8 possible genome assignments for the unit subtree, related to the 8 possible assignments of the three logical variables at the root. Let the presence of the adjacency at the root mean logical true value, and let absence mean logical false value. The constructed unit subtree will be such that if the clause is not satisfied, the number of possible SCJ scenarios for the corresponding assignment on this unit subtree is 2136 × 376 , and if the clause is satisfied, then the number of possible SCJ scenarios for each corresponding assignment is 2156 × 364 . The ratio of the two numbers is 220 /312 > 1. We will denote this number by γ. This ratio will be the basis for our proof: any FPAUS will sample the solutions corresponding to the satisfied clauses more often than the non-satisfied ones because the former are more numerous. This can be turned into an RP algorithm for 3SAT. Below we detail the construction of the elementary subtrees and also give the number of SCJ solutions on them since the number of solutions on the unit subtree is simply the product of these numbers. For the adjacencies α1 , α2 and α3 , the cherries are the following: • for the cherries on which the left leaf contain one extra adjacency, the presence/absence pattern on the left and right leaf is given by 011, 101, 110, 000, 100 010 001 111 The first column shows the presence/absence of the three adjacencies on the left leaf, the second column shows the presence/absence of the three adjacencies on the right leaf. Hence, for example, 000 means that none of the adjacencies is present, 100 means that only the first adjacency is present. The number of SCJ solutions on one cherry is 24 if the assignment of adjacencies at the root of the cherry is the same as on the right leaf. Indeed, in that case, 4 SCJ operations are necessary on the left edge, and they can be performed in any order. If the number of SCJ operations are 3 and 1 respectively on the left and right edges, or vica versa the number of solutions is 6. Finally, if both edges have 2 SCJ operations, then the number of solutions is 4. 16 • There is one cherry without any extra adjacency, and its presence/absence pattern is 000, 111 If the clause is not satisfied, the number of SCJ solutions on this cherry is 6; if all logical values are true, the number of SCJ solutions is still 6; in any other case, the number of SCJ solutions is 2. This elementary subtree is repeated 3 times. • Finally, there are cherries with one-one extra adjacency on both leaves. These are two different adjacencies, so both of them need one extra SCJ operation on their incoming edge. The presence/absence patterns are 011, 100 101, 010 110, 001 If all SCJ operations due to αi , i = 1, 2, 3 falls onto one edge, then the number of solutions is 24, otherwise the number of solutions is 12. Each of these elementary subtrees are repeated 15 times. The remaining elementary subtrees contain 3 cherries connected with a comb, that is, a completely unbalanced tree, see also Figure 4. For the cherry at the right end of this elementary subtree, we add one or more adjacencies that are present on one of the leaves and absent everywhere else in TΦ . When there is one extra adjacency on the left leaf, the adjacencies α1 , α2 and α3 are assigned with the following presences/absences on the three cherries at the top of the three combs: 011, 000 101, 000 110, 000 Again, the first column shows the assignment for the left leaf, the second column for the right leaf. The number of SCJ solutions is 6 on this cherry 17 c) a) b) 1 : 1 2 : 1 3 : 1 x: 0 1 : 1 2 : 0 3 : 1 x: 0 a1 : 1 a2 : 1 a3 : 0 ax : 0 1 : 1 2 : 0 3 : 0 x: 0 1 : 0 2 : 1 3 : 1 x: 1 1 : 0 2 : 0 3 : 0 x: 0 Figure 4: a) A cherry motif, ie., two leaves connected with an internal node. b) A comb, ie., a fully unbalanced tree with 8 leaves. c) A tree with 3 cherry motifs connected with a comb. The assignments for 4 adjacencies, α1 , α2 , α3 and αx are shown at the bottom for each leaf. αi , i = 1, 2, 3 are the adjacencies related to the logical variables bi , and αx is an extra adjacency. Note that Fitch’s algorithm gives ambiguity for all adjacencies αi at the root of this subtree. if the assignment at the root is 0 for both adjacencies which has assignment 1 on the left leaf. In any other cases, the number of solutions is 2. Two of the adjacencies are ambiguous on this cherry, and the third one is 0. On the remaining two cherries of this elementary subtree, this third adjacency is present on all leaves, while the other two are made ambiguous in such a way that any assignment has one SCJ scenario on the remaining of the tree. We show the solution for the first subtree on Figure 4. Each of these elementary subtrees are repeated 3 times. Finally, there are elementary subtrees when there is 1 extra adjacency on the left leaf and 2 extra adjacencies on the right leaf. The assignments are 011, 000 101, 000 110, 000 The number of SCJ solutions is 24 on this cherry if both necessary SCJ operations fall onto the edge having 2 additional SCJ operations due to the extra adjacencies, and 12 in all other cases. Each of these elementary subtrees are repeated 5 times. 18 # 000 100 010 110 001 101 011 111 011 1 6 24 4 6 4 6 6 4 101 1 6 4 24 6 4 6 6 4 110 1 6 4 4 6 24 6 6 4 000 1 6 4 4 6 4 6 6 24 011 3 63 63 23 23 23 23 23 23 101 3 63 23 63 23 23 23 23 23 110 3 63 23 23 23 63 23 23 23 000 3 63 23 23 23 23 23 23 63 011 5 125 125 125 125 125 125 245 245 101 5 125 125 125 125 125 245 125 245 110 5 125 125 125 245 125 125 125 245 011 15 1215 2415 1215 1215 1215 1215 2415 1215 101 15 1215 1215 2415 1215 1215 2415 1215 1215 110 15 1215 1215 1215 2415 2415 1215 1215 1215 Table 1: The number of SCJ scenarios on different elementary subtrees of the unit subtree of the subtree Tcj for clause cj = b1 ∨ b2 ∨ b3 . Columns represent the 14 different types of components, the topology of the elementary subtree is indicated on the top. The black dot means extra SCJ operations on the indicated edge, the numbers represent the presence/absence of adjacencies on the left leaf of a particular cherry, see text for details. The row starting with # indicates the number of repeats of the elementary subtrees. Further rows represent the logical true/false values of bi s, for example, 001 means b1 = f alse, b2 = f alse, b3 = true. The values in the table indicate the number of solutions, raised to the appropriate power due to multiplicity of the elementary subtrees. It is easy to check that the product of the numbers in the first line is 2136 × 376 and in any other lines is 2156 × 364 . In this way, the roots of all 76 elementary subtrees are ambiguous for the three adjacencies related to logical variables. We connect the 76 elementary subtrees with a comb, and thus, all three adjacencies are ambiguous at the root of the entire subtree, which is the unit subtree. If the clause is satisfied, the number of SCJ scenarios for the corresponding assignment is 2156 × 364 , if the clause is not satisfied, the number of SCJ solutions is 2136 × 376 , as can be checked on Table 1. The ratio of them is indeed 220 /312 = γ. The number of leaves on this unit subtree is 248, and 148 additional adjacencies are introduced. This was the construction of the constant size unit subtree. In the next step, we “blow up” the system. Similar blowing up can be found in Jerrum et al. (1986), in the proof of Theorem 5.1. We repeat the above described unit subtree d(k log((n − 3)!) + n log(2))/ log(γ)e + 1 times, and connect all of them with a comb (completely unbalanced tree). All three adjacencies representing the three logical variables in the clause are still ambiguous at the root of this blown up subtree, and thus, there are still 8 Fitch solutions. For a solution satisfying the clause, the number of SCJ scenarios on this blown up subtree is X = 2156 × 364 log(2) d k log((n−3)!)+n e+1 log(γ) 19 (22) and the number of scenarios if the clause is not satisfied is Y = 2136 × 376 log(2) d k log((n−3)!)+n e+1 log(γ) (23) Let all adjacencies not participating in the clause be 0 on this blown up subtree. We are close to the final subtree Tcj for one clause, cj . In the third phase, we amend the so far obtained tree with a constant size subtree. Construct a fully balanced depth 3 binary tree, on which all 3 adjacencies which are in the clause are ambiguous at the root without making more than 1 SCJ scenario on it, similarly to the left part of the tree on Figure 4. All other adjacencies not participating in the clause are present at all leaves of this tree. Here is how to construct Tcj for one clause, cj . Construct an additional vertex which will be its root. The left child of the root is the blown up tree, while its right child is the depth 3 balanced tree. Denote by Tcj this final tree for one clause cj . All adjacencies are ambiguous at the root of the subtree Tcj , therefore there are 2n Fitch solutions for the assignments of the internal nodes of Tcj . Lemma 19. For any assignment of the n adjacencies, if the clause ci is satisfied, then the number of SCJ scenarios for the corresponding assignment on Tcj is at least Y × ((n − 3)!)k × 2n × γ (24) and at most Y × ((n − 3)!)k+1 × 2n × γ (25) If the clause is not satisfied, then the number of SCJ scenarios is at most Y × (n − 3)!. Proof. The B values of Fitch’s algorithm for the n − 3 adjacencies not representing a logical value in the clause ci are all {0} at all the nodes of the left child of the root, and all {1} at all the nodes of the right child of the root. Therefore in all scenarios there are n − 3 cumulated SCJ operations on the two edges going out of the root. If they are all on one of the edges, the number of possible SCJ scenarios is (n − 3)!, and in all other cases they are less, but at least 1. (Actually, the minimum is (((n − 3)/2)!)2 , but the very loose lower bound 1 is sufficent for our calculations). Then if the clause is 20 satisfied, the number of SCJ scenarios is between X and X × (n − 3)!. Note that X/Y = ((n − 3)!)k × 2n × γ, which gives the stated result. If the clause is not satisfied, the number of SCJ scenarios is at most Y × (n − 3)!. For all k clauses, construct such a subtree and connect all of them with a comb. This is the final tree TΦ for the 3CNF Φ. All adjacencies corresponding to logical variables are ambiguous at the root of the TΦ , so there are 2n Fitch solutions. We prove that there is the same number of Sankoff solutions. Lemma 20. All adjacency assignments for the SPSCJ problem on tree TΦ are Fitch solutions. Proof. There are two types of adjacencies participating in TΦ . There are n of them related to the logical variables in Φ, the other adjacencies are introduced in the construction and are present on exactly one leaf, absent everywhere else in TΦ . If an adjacency αx is present only on one leaf, then in any SPSCJ solution it is created on the edge connecting the leaf to the remaining part of the tree. This solution is provided by Fitch’s algorithm. The tree is constructed in such way that for all αi representing variable bi ∈ Φ, B(αi , v) = {0, 1} ⇒ B(αi , u) = {0, 1} (26) where u is the parent of v. First observe that B(αi , v) = {0, 1} ⇒ s1(αi , u) = s0(αi , u) (27) this means that whenever the two children v1 and v2 of a node u are ambiguous in Fitch’s algorithm, s1(αi , u) = s1(αi , v1 ) + s1(αi , v2 ) s0(αi , u) = s0(αi , v1 ) + s0(αi , v2 ) (28) (29) namely, all Sankoff solutions are Fitch solutions. Moreover, at any node u where the B value is ambiguous for some adjacency αi , while it is not ambiguous in the children of u, we have s0(αi , u) = s1(αi , u) = 1 and here again the Fitch solutions are the same as the Sankoff solutions. 21 (30) Now we are ready to prove Theorem 15. Proof. (Theorem 15.) Let Φ be a 3CNF with k clauses. The number of Boolean variables in Φ is at most 3k, hence the tree TΦ contains at most      k log((3k − 3)!) + 3k log(2) 248 × +1 +8 ×k (31) log(γ) leaves, and  6k + 296k ×   k log((3k − 3)!) + 3k log(2) +1 log(γ) (32) extremities (twice the number of independent adjacencies appearing). To explain Equation 31, 248 is the l m number of leaves on the unit subtree, it k log((n−3)!)+3k log(2) is reapeted + 1 times, an upper bound for n is 3k, as log(γ) mentioned above, and there are 8 further leaves in the amending phase of the construction of a subtree Tcj for a clause cj . Finally, there are k clauses. To explain Equation 32, there is an adjacency for each boolean variable, there are at most 3k of them, each of them having 2 extremities, yielding 6k extremities at most. There are 148 extra adjacencies m l in each unit subtree, log(2) +1 having 296 extremities. Each unit subtree is repeated k log((n−3)!)+3k log(γ) l m log(2) times, upperly bounded by k log((3k−3)!)+3k +1, and this is done for each log(γ) k clauses. Hence the input size for the SPSCJ problem is a polynomial function of the size of Φ. If Φ is satisfiable, then there exists an assignment for which the number of SCJ scenarios is at least Y k × (((n − 3)!)k × 2n × γ)k (33) If at least one of the clauses is not satisfied, then the total number of SCJ scenarios is at most Y k × (((n − 3)!)k × 2n × γ)k−1 × ((n − 3)!)k (34) Therefore, if Φ is satisfiable, there are at most 2n − 1 assignments which do not satisfy the Φ, and the number of corresponding SCJ scenarios is at most Y k × (((n − 3)!)k × 2n × γ)k−1 × ((n − 3)!)k × (2n − 1). 22 (35) Hence if Φ is satisfiable, then the number of SCJ scenarios related to satisfying assignments are more than the number of other SCJ scenarios. If an FPAUS exists for all most parsimonious scenarios, then it would sample satisfying scenarios with more than 0.5 probability. Then this is an RP algorithm for 3SAT. An RP algorithm for 3SAT immediately implies that RP = NP (Papadimitriou, 1993). 4.3. Counting problems The same construction is sufficient to prove Theorem 16. Proof. (Theorem 16.) Assume that there is an FP algorithm for #SPSCJ. Then for any 3CNF Φ, construct the above introduced problem instance x ∈ #SPSCJ, and calculate the exact number of solutions. If Φ is not satisfiable, then the number of solutions is at most Y k × (((n − 3)!)k × 2n × γ)k−1 × ((n − 3)!)k × 2n (36) If Φ can be satisfied, then the number of solutions is more than Y k × (((n − 3)!)k × 2n × γ)k (37) Since the number in Equation 37 is greater than the number in Equation 36, and the number of digits of these numbers grows only polynomially with |Φ|, given an FP algorithm for #SPSCJ, it would be decidable in polynomial running time whether or not Φ is satisfiable. Since 3SAT ∈ NP − complete, it would imply that P = NP. Now we prove the counting counterpart of the same result, that is, #SPSCJ is not in FPRAS unless RP = NP. For this we need to define a more restricted problem. Definition 21. The #Fitch − SPSCJ problem asks for the number of Fitch solutions of an SPSCJ instance where pairs of adjacencies never share an extremity and the values of a set of ambiguous adjacencies are fixed. Although stricto sensu, the #Fitch − SPSCJ is still not a self reducible counting problem, we can prove that it has an FPAUS algorithm if it has an FPRAS algorithm. Before proving it, we discuss in a nutshell how to construct an FPAUS algorithm from an FPRAS algorithm for self-reducible counting problems. The description is not detailed, for a strict mathematical description, see Sinclair (1992). 23 The heart of the method that creates an FPAUS from a self-reducible counting problem in FPRAS is a rejection sampler (von Neumann, 1951). A random solution is drawn sequentially travelling down the counting tree of the self-reducible problem, using the FPRAS approximations for the children of the current node, and at each internal node the sampling probability is calculated. The sampling probabilities are used to calculate the so called rejection rate, the probability that the sample will be rejected. The central theorem of the rejection method states that the accepted samples come from sharp the uniform distribution. To transform this into an FPAUS, the rejection rate should be relatively small, so in a few (polynomial number of) trials, the probability that all trials are rejected becomes negligible. If all trials are rejected, then an arbitrary solution is drawn, but due to its extremely small probability, it causes a very small deviation from the uniform distribution (measured in variational distance). Lemma 22. #Fitch − SPSCJ ∈ FPRAS ⇒ #Fitch − SPSCJ ∈ FPAUS Proof. It is sufficient to show that the solutions can be put onto a counting tree such that the depth of the tree is O(poly(|x|)) where |x| is the size of the problem instance, and for any internal node, one of the following is true: • The number of descendants of the internal node is O(poly(|x|)) where |x| is the size of the problem instance, and for each descendant, a problem x0 ∈ #Fitch − SPSCJ exists whose number of solutions is the number of leaves of that tree, and |x0 | = O(poly(|x|)). • The number of descendants is O(cpoly(|x|) ) for some c > 1, but a perfect sampler exists that can sample sharp the uniform distribution of the descendants and the number of descendants can be calculated, both the sampler and the counter run in O(poly(|x|)) time. Furthermore, all descendants are leaves. The algorithms in the second case provide that the protocol constructing an FPAUS sampler using an FPRAS algorithm described briefly above can be done also for those nodes which have suprapolynomial number of descendants but counting their number as well as sharp uniform sampling them can be done in polynomial time. Indeed, both sampling and calculating the sampling probabilities can be done in polynomial running time, and it is easy to see that the strict uniform sampling does not increase the rejection rate. 24 Fix an arbitrary total ordering of adjacencies. Let u be an internal node, and z is the associated problem to it. If there are ambiguities at the root of the evolutionary tree, then take the smallest adjacency with ambiguity and without a constraint, let it be denoted by α. Then u will have two descendants, and they are associated with a problem instance where problem instance z is modified such that α has constraint 0 and constraint 1. If z does not have any ambiguity, then its assignment is unique. For this unique assignment, the number of SCJ scenarios along each edge can be counted and sharply uniformly sampled (Theorem 13), so these will be the descendants of u and also the leaves below u. The next lemma leads directly to the proof of Theorem 17. Lemma 23. #SPSCJ ∈ FPRAS ⇒ #Fitch − SPSCJ ∈ FPRAS Proof. Let x be a problem instance from #Fitch − SPSCJ. Let A denote the set of adjacencies which are ambiguous at the root, but there are constraints on them. Let T denote the evolutionary tree of the problem instance x. We construct another problem x0 , which has the same number of SCJ solutions but there are no ambiguities for those adjacencies which are in A. We remove each α ∈ A, and introduce new, independent adjacencies. For any α ∈ A, let E(α) denote the set of edges of T for which an SCJ operation is necessary with the prescribed assignment of α. We introduce |E(α)| new, independent adjacencies in the following way. For each e ∈ E(α), if α is generated on the edge, then let the corresponding adjacency αe be present at the leaves below edge e, and nowhere else. Otherwise, if α is cut along the edge e, let the corresponding adjacency αe be absent at the leaves below edge e, and be present at all other leaves. It is easy to see that the only most parsimonious solution for αe is to create or cut αe with an SCJ operation along edge e. Clearly, x ∈ #SPSCJ, as there are no constraints on its adjacencies, the number of solutions for x0 is the same as the number of solutions for x, moreover |x0 | = O(|x| + |A| × |T |). Therefore an FPRAS algorithm for x0 is also an FPRAS for x. We can now prove Theorem 17. 25 (38) Proof. (Theorem 17). From Lemma 23 #SPSCJ ∈ FPRAS ⇒ #Fitch − SPSCJ ∈ FPRAS (39) From Lemma 22, #Fitch − SPSCJ ∈ FPRAS ⇒ #Fitch − SPSCJ ∈ FPAUS (40) Putting these together, we get that #SPSCJ ∈ FPRAS ⇒ #Fitch − SPSCJ ∈ FPAUS (41) But from the proof of Theorem 15. It is clear that an FPAUS already for #Fitch − SPSCJ would imply that RP = NP. 5. Discussion/Conclusions We proved non-approximability for a counting problem motivated by computational biology, whose optimization/decision counterpart problem is in P. The problem is related to the evolution of discrete characters: imagine a set of n independent characters from a finite set (a nucleotide sequence where all nucleotides evolve independently for instance), and a set of species related by a binary phylogenetic tree. The values of the n characters are known at the leaves, and the small parsimony problem asks for assignments at the internal nodes of the tree. Here finding one most parsimonious assignment is easy, but it is also easy to count their number or sample them uniformly, when they are all independent, which is not the case for adjacencies in genomes. However, if the assignments are weighted by the number of most parsimonious evolutionary scenarios on the whole set of characters, then there is no possible efficient counting or sampling method. Indeed, in our proof all adjacencies are independent, so it applies to this more general problem. This study also highlights a counting bias in the parsimony SCJ model with independent adjacencies (or evolutionary scenarios on discrete characters). For example, take a cherry with ambiguous values at its root. The number of scenarios is higher if the assignment at the root of the cherry is equal to one of the leaves than if it is a mix between the two. In an unbiased model all assignments should be equiprobable. This observation leads to two possible directions for future work: 26 • Counting assignments. If all assignments should be equiprobable, then the problem is to count and sample in the assignment solution space. It is our unpublished result that counting the number of Fitch solutions to SPSCJ is in FP, but counting the Sankoff type assignments has an unknown computational complexity. • Probabilistic models. The bias of the parsimony model will drop in a probabilistic approach. Here mutations follow a continuous time Markov model. In that case, each potential SCJ operation has an exponential waiting time for the occurrence. The so-called trajectory likelihood can be calculated analytically, see Miklós et al. (2004). The sum of the trajectory likelihoods is the total likelihood of two genomes, i.e., what is the probability that genome G1 becomes genome G2 after time t, given a set of parameters for the exponential distributions put onto the potential SCJ operations. The total likelihood calculation has an unknown computational complexity. We can also consider the probabilistic approach on a tree. In case of independent events, it can be shown that the multinomial coefficients describing how many combinations exist to merge the independent SCJ operations are cancelled out in the likelihood calculations. If all edge lengths of the evolutionary tree are the same, and all adjacencies are independent, then the probabilistic #SPSCJ problem reduces to counting the assignments to the internal nodes of the evolutionary tree, which might have a simpler computational complexity. These are promising future directions of research, which can be important for comparative genomics. To close the mathematical aspects of the SPSCJ problem, two unsolved questions remain: • #P-completness of #SPSCJ. Our conjecture is that #SPSCJ ∈ #P − complete. Theorem 16 strengthens this conjecture. Although #3SAT ∈ #P − complete, the construction in the proof of Theorem 15 is not sufficient for counting the number of satisfying assignments of Φ. For each satisfying assignment, there is a multiplicative coefficient  n−3 2 that can vary between 2 ! and (n − 3)!, and this shadows the exact number of solutions. • Star tree problem. Given a set of genomes, G1 , G2 , . . . Gk related to a star tree, count and sample their most parsimonious SCJ scenarios. If k is odd, then the assignment for the centre of the star tree is 27 unique. It is proved for the median genome of 3 genomes by Feijão and Meidanis (2011), and their proof can be extended to any odd number of genomes. However, when k is even, then the median might not be unique, and there might be exponentially many solutions for the assignment. The computational complexity for this case is an open question. This generalizes to the small parsimony problem on non-binary trees. 6. Acknowledgments I.M. was supported by OTKA grant PD84297. S.Z.K. was supported by OTKA grants K77476 and NK 105645. References Ajana, Y., Lefebvre, J., Tillier, E., El-Mabrouk., N., 2002. Exploring the set of all minimal sequences of reversals - an application to test the replicationdirected reversal hypothesis. In: Algorithms in Bioinformatics (WABI’02). Vol. 2452 of LNCS. pp. 300–315. Alekseyev, M. A., Pevzner, P. A., 2010. Comparative genomics reveals birth and death of fragile regions in mammalian evolution. Genome Biol 11 (11), R117. André, D., 1881. Mémoire sur les permutations alternées. Journal de mathématiques pures et appliquées 7, 167–184. Bergeron, A., Mixtacki, J., Stoye, J., 2006. A unifying view of genome rearrangements. LNCS 4175, 163–173. Bergeron, A., Mixtacki, J., Stoye, J., 2008. On computing the breakpoint reuse rate in rearrangement scenarios (preview). In: Proceedings of RECOMB-CG 2008. Vol. 5267 of LNBI. pp. 226–240. Darling, A., Miklós, I., Ragan, M., 2008. Dynamics of genome rearrangement in bacterial populations. PLoS Genetics 4 (7), e1000128. Durrett, R., Nielsen, R., York, T., 2004. Bayesian estimation of genomic distance. Genetics 166, 621–629. Erdős, P. L., Székely, L. A., 1994. On weighted multiway cuts in trees. Mathematical Programming 65, 93–105. 28 Feijão, P., Meidanis, J., 2011. SCJ: A breakpoint-like distance that simplifies several rearrangement problems. IEEE/ACM Transactions on Computational Biology and Bioinformatics 8(5), 1318–1329. Fertin, G., Labarre, A., Rusu, I., Tannier, E., Vialette, S., 2009. Combinatorics of genome rearrangements. MIT press. Fitch, W. M., 1971. Toward defining the course of evolution: minimum change for a specified tree topology. Systematic Zoology 20, 406–416. Jerrum, M., Valiant, L., Vazirani, V., 1986. Random generation of combinatorial structures from a uniform distribution. Theoretical Computer Science 43, 169–188. Jones, N., Pevzner, P. A., 2004. An Introduction to Bioinformatics Algorithms. The MIT Press, Ch. 10.10. Larget, B., Simon, D., Kadane, B., 2002. Bayesian phylogenetic inference from animal mitochondrial genome arrangements. J. Roy. Stat. Soc. B. 64 (4), 681–695. Larget, B., Simon, D., Kadane, J., Sweet, D., 2005. A bayesian analysis of metazoan mitochondrial genome arrangements. Mol. Biol. Evol. 22 (3), 485–495. Miklós, I., Darling, A., 2009. Efficient sampling of parsimonious inversion histories with application to genome rearrangement in yersinia. Genome Biology and Evolution 1 (1), 153–164. Miklós, I., Lunter, G. A., Holmes, I., 2004. A ’long indel’ model for evolutionary sequence alignment. Mol. Biol. Evol. 21 (3), 529–540. Miklós, I., Tannier, E., 2010. Bayesian sampling of genome rearrangement scenarios via DCJ. Bioinformatics 26, 3012–3019. Miklós, I., Tannier, E., 2012. Approximating the number of double cut-andjoin scenarios. Theoretical Computer Science 439, 30–40. Papadimitriou, C., 1993. Computational Complexity. Addison Wesley. Sankoff, D., Rousseau, P., 1975. Locating the vertices of a steiner tree in an arbitrary metric space. Mathematical Programming 9, 240 – 246. 29 Sinclair, A., 1992. Improved bounds for mixing rates of markov chains and multicommodity flow. Combinatorics, Probability and Computing 1, 351– 370. Sturtevant, A., Novitski, E., 1941. The homologies of chromosome elements in the genus drosophila. Genetics 26, 517–541. Tannier, E., Zheng, C., Sankoff, D., 2009. Multichromosomal median and halving problems under different genomic distances. BMC Bioinformatics 10, 120. von Neumann, J., 1951. Monte Carlo Method. No. 12 in National Bureau of Standards Applied Mathematics Series. Washington, D.C.: U.S. Government Printing Office, Ch. Various techniques used in connection with random digits, pp. 36–38. 30
5cs.CE
Efficient Large-Scale Multi-Modal Classification Douwe Kiela, Edouard Grave, Armand Joulin and Tomas Mikolov arXiv:1802.02892v1 [cs.CL] 6 Feb 2018 Facebook AI Research {dkiela,egrave,ajoulin,tmikolov}@fb.com Abstract While the incipient internet was largely text-based, the modern digital world is becoming increasingly multi-modal. Here, we examine multi-modal classification where one modality is discrete, e.g. text, and the other is continuous, e.g. visual representations transferred from a convolutional neural network. In particular, we focus on scenarios where we have to be able to classify large quantities of data quickly. We investigate various methods for performing multi-modal fusion and analyze their trade-offs in terms of classification accuracy and computational efficiency. Our findings indicate that the inclusion of continuous information improves performance over text-only on a range of multi-modal classification tasks, even with simple fusion methods. In addition, we experiment with discretizing the continuous features in order to speed up and simplify the fusion process even further. Our results show that fusion with discretized features outperforms text-only classification, at a fraction of the computational cost of full multimodal fusion, with the additional benefit of improved interpretability. Text classification is one of the core problems in machine learning and natural language processing (Borko and Bernick 1963; Sebastiani 2002). It plays a crucial role in important tasks ranging from document retrieval and categorization to sentiment and topic classification (Deerwester et al. 1990; Joachims 1998; Pang and Lee 2008). However, while the incipient Web was largely text-based, the recent decade has seen a surge in multi-modal content: billions of images and videos are posted and shared online every single day. That is, text is either replaced as the dominant modality, as is the case with Instagram posts or YouTube videos, or it is augmented with non-textual content, as with most of today’s web pages. This makes multi-modal classification an important problem. Here, we examine the task of multi-modal classification using neural networks. We are primarily interested in two questions: what is the best way to combine (i.e., fuse) data from different modalities, and how can we do so in the most efficient manner? We examine various efficient multi-modal fusion methods and investigate ways to speed up the fusion process. In particular, we explore discretizing the continuous features, which leads to much faster training and requires Copyright c 2018, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. less storage, yet is still able to benefit from the inclusion of multi-modal information. To the best of our knowledge, this work constitutes the first attempt to examine the accuracy/speed trade-off in multi-modal classification; and the first to directly show the value of discretized features in this particular task. If current trends continue, the Web will become increasingly multi-modal, making the question of multi-modal classification ever more pertinent. At the same time, as the Web keeps growing, we have to be able to efficiently handle ever larger quantities of data, making it important to focus on machine learning methods that can be applied to large-scale scenarios. This work aims to examine these two questions together. Our contributions are as follows. First, we compare various multi-modal fusion methods, examine their trade-offs, and show that simpler models are often desirable. Second, we experiment with discretizing continuous features in order to speed up and simplify the fusion process even further. Third, we examine learned representations for discretized features and show that they yield interpretability as a beneficial side effect. The work reported here constitutes a solid and scalable baseline for other approaches to follow; our investigation of discretized features shows how multi-modal classification does not necessarily imply a large performance penalty and is feasible in large-scale scenarios. Related work Text classification. Neural network-based methods have become increasingly popular for text classification (Socher et al. 2011; Wang and Manning 2012). Recent work has used neural networks for text classification either at a sentence (Kim 2014; Hill, Cho, and Korhonen 2016) or full document (Le and Mikolov 2014; Baker, Kiela, and Korhonen 2016; Joulin et al. 2016) level. Many core NLP tasks are essentially text classification, from tweets (Sriram et al. 2010) to reviews to spam. Even though there has been extensive work on feature engineering for text classification (Chen et al. 2009), modern approaches often make use of word embeddings (Mikolov et al. 2013) or sentence representations (Kiros et al. 2015) learned from a large corpus in an unsupervised fashion. Fusion strategies. Multi-modal fusion, or the integration of input from various modalities, is an important topic in the field of multimedia analysis (Wu et al. 2004; Atrey et al. 2010). The question of fusion has been explored in a variety of tasks, from audio-visual speech recognition (Potamianos et al. 2003) to multi-sensor management (Zhao et al. 2003) and face recognition (Xiong and Svensson 2002). Much of this research has focused on the combination of two or more continuous modalities. Here, we are specifically interested in the fusion of discrete textual input with another, continuous, modality. Multi-modal NLP. The usage of non-textual information in natural language processing (Mooney 2008) has become increasingly popular. On the one hand, there has been a lot of interest in cross-modal applications, such as image annotation (Weston, Bengio, and Usunier 2011), image captioning (Bernardi et al. 2016), mapping images to text or vice versa (Frome et al. 2013; Socher et al. 2013; Lazaridou, Bruni, and Baroni 2014) and visual question answering (Antol et al. 2015; Fukui et al. 2016). On the other hand, multi-modal fusion has been extensively explored in the context of grounded representation learning for lexical semantics (Bruni, Tran, and Baroni 2014; Kiela and Bottou 2014; Lazaridou, Pham, and Baroni 2015). While much of this work has focused on vision (Baroni 2016), other perceptual modalities modalities (Lopopolo and van Miltenburg 2015; Kiela and Clark 2015; Kiela, Bulat, and Clark 2015) have also been explored, as well as robotics (Mei, Bansal, and Walter 2016), videos (Regneri et al. 2013) and games (Branavan, Silver, and Barzilay 2012; Narasimhan, Kulkarni, and Barzilay 2015). This work is similar in spirit to (Bruni, Tran, and Baroni 2014), in that we explore fusion techniques. However, similarly to (Lazaridou, Pham, and Baroni 2015), we learn how to integrate the multi-modal inputs, and use transferred representations as in (Kiela and Bottou 2014). Multi-modal deep learning. Our work relates to previous work on integrating information from multiple modalities in neural networks (Ngiam et al. 2011; Srivastava and Salakhutdinov 2012; Kiros, Salakhutdinov, and Zemel 2014). Here, we enhance a well-known neural network architecture for efficient text classification (Joulin et al. 2016) with the ability to include continuous information, and explore methods for combining multi-modal features. The works of (Arevalo et al. 2017) and (Fukui et al. 2016), explore complex gating mechanisms and compact bilinear pooling as multi-modal fusion methods. In order to obtain visual representations, we transfer continuous features from neural networks trained on other tasks (in this case ImageNet), as has been shown to work well for a wide variety of tasks (Oquab et al. 2014; Razavian et al. 2014). Evaluation Surprisingly, there are not many large-scale multi-modal classification datasets available. We evaluate on three datasets that are large enough to examine accuracy/speed trade-offs in a meaningful way. Two of our datasets (Food101 and MM-IMDB) are medium-sized; while the third dataset (FlickrTag) is very large by today’s standards. The quantitative properties of the respective datasets are shown in Table 1 and they are described in more detail in what follows. Food101 The UPMC Food101 dataset (Wang et al. 2015) contains web pages with textual recipe descriptions for 101 food labels automatically retrieved online. Each page was matched with a single image, where the images were obtained by querying Google Image Search for the given category. Examples of food labels are Filet Mignon, Pad Thai, Breakfast Burrito and Spaghetti Bolognese. The web pages were processed with html2text1 to obtain the raw text. MM-IMDB The recently introduced MM-IMDB dataset (Arevalo et al. 2017) contains movie plot outlines and movie posters. The objective is to classify the movie by genre. This is a multilabel prediction problem, i.e., one movie can have multiple genres. The dataset was specifically introduced to address the lack of multi-modal classification datasets. FlickrTag and FlickrTag-1 We use the FlickrTag dataset based on the massive YFCC100M Flickr dataset of (Thomee et al. 2016) that was used in (Joulin et al. 2016). The dataset consists of Flickr photographs together (in most, but not all cases) with short user-provided captions. The objective is to predict the user-provided tags that belong to the photograph. This is a very large-scale dataset, so we perform the multi-modal fusion operator and speed-versus-accuracy studies on a subset (specifically, the first shard, which corresponds to onetenth of the full dataset) for those studies, which we denote FlickrTag-1. We show that the inclusion of discretized features yields classification accuracy improvements with respect to text on the whole dataset. Approach As a starting point, we take the highly efficient text classification approach of FastText (Joulin et al. 2016). To ensure a fair comparison, we enhance that model with the capability to handle continuous or discretized features. Specifically, we use 2048-dimensional continuous features that were obtained by transferring the pre-softmax layer of a 152-layer ResNet (He et al. 2016) trained on the ImageNet classification task. In the case of the large-scale FlickrTag datasets, we use ResNet-34 features (of 512 dimensions). It has been shown that convolutional network features can be transferred successfully to a variety of tasks (Razavian et al. 2014) and we take the same approach here. We explore a variety of models and experiment with discretization. The scenario of multi-modal classification certainly admits, or even invites, highly sophisticated models. In our 1 https://pypi.python.org/pypi/html2text Dataset Food101 MM-IMDB FlickrTag FlickrTag-1 #Train #Words #Valid #Words #Test #Words 58,131 15,552 70,243,104 7,166,110 98,365,392 2,564,734 1,134,118,808 92,651,036 6,452 2608 656,687 48,048 10,893,597 425,863 10,100,945 682,663 21,519 7799 621,444 48,471 36,955,182 1,266,681 9,913,566 672,900 Table 1: Evaluation datasets with their quantitative properties. case, however, we also have to take into account efficiency, so we want to focus on models that are simple and efficient enough to handle large-scale datasets, while obtaining improved performance over our baselines. We experiment with a comprehensive set of models, listed below in increasing order of complexity. In all cases, given a set of N documents, the objective is to minimize the negative log likelihood over the classes: N 1 X log(sof tmax(o(xn ), yn )), − N n=1 (1) where o is the network’s output, xn is the multi-modal input and yn is the label. Baselines Text The first baseline consists of FastText (Joulin et al. 2016), a library for highly efficient word representation learning and sentence classification. FastText is trained asynchronously on multiple CPUs using stochastic gradient descent and a learning rate that linearly decays with the amount of words. It yields competitive performance with more sophisticated text classification approaches, while being much more efficient. That is, we ignore the visual signal altogether and only use textual information, i.e., o(xn ) = W U xtn , where W and U are weight matrices and xtn is the normalized bag of textual features representation. Continuous The second baseline consists of training a classifier only on top of the transferred ResNet features (He et al. 2016). That is, we ignore the textual information and only use the visual input, i.e., o(xn ) = W V xvn , where W and V are weight matrices and xvn consists of the ResNet features, normalized to unit length. Continuous Multi-Modal Models Additive We combine the information from both modalities using component-wise addition, i.e., o(xn ) = W (U xtn + V xvn ). Max-pooling We combine the information from both modalities using the component-wise maximum, i.e., o(xn ) = W max(U xtn , V xvn ). Gated We allow one modality to “gate” or “attend” over the other modality, via a sigmoid non-linearity, i.e., o(xn ) = W (σ(U xtn ) ∗ V xvn ), or alternatively, o(xn ) = W (U xtn ∗ σ(V xvn )). One can think of this approach as performing attention from one modality over the other. It is a conceptually similar simplification of multi-modal gated units, introduced in (Arevalo et al. 2017). The modality to be gated is a hyperparameter (see below). Bilinear Finally, to fully capture any associations between the two different modalities, we examine a bilinear model, i.e., o(xn ) = W (U xtn ⊗ V xvn ). This approach can be thought of as a simpler version of the more complex multi-modal bilinear pooling introduced by (Fukui et al. 2016). We also experiment with a method where we introduce a gating non-linearity into the bilinear model, which we call Bilinear-Gated. Discretized Multi-Modal Models A downside of continuous models is that they require an expensive matrix-vector multiplication V xvi and storing large matrices of floating point numbers requires a lot of space. While the ResNet features used in these experiments consist of a relatively small number of components, these can easily run into the tens of thousands: consider e.g. combinations of SIFT and Fisher vectors used in state-of-the-art computer vision applications (Perronnin and Larlus 2015). Hence, we experiment with discretizing the continuous features, where we convert the continuous features to a discrete sequence of tokens, which can be treated as if they are special tokens, which we normalize separately, and used in the standard FastText setup. This is a simple, computationally less intensive solution. Discretized features also obviously require less storage. In particular, we investigate product quantization (PQ) (Jegou, Douze, and Schmid 2011), where we divide the continuous vector into subvectors of equal size, and then perform k-means clustering on each of the subvectors. For each image, we subsequently determine the closest centroid for each of its subwords, which is combined with the subvector index in order to obtain a discretized vector. For example, a Model Food101 MM-IMDB FlickrTag-1 Previous work (Wang et al. 2015) (Arevalo et al. 2017)-GMU (Arevalo et al. 2017)-AVG 85.1 — — — 63.0 61.5 — — — Baselines FastText Continuous 88.0 ± 0.1 56.7 ± 0.2 58.8 ± 0.1 49.3 ± 0.0 23.0 ± 0.0 12.4 ± 0.0 Continuous Additive Max-pooling Gated Bilinear Bilinear-gated 90.4 ± 0.1 90.5 ± 0.1 90.1 ± 0.1 88.1 ± 0.3 90.8 ± 0.1 61.0 ± 0.0 62.2 ± 0.1 61.8 ± 0.1 61.5 ± 0.1 62.3 ± 0.2 26.8 ± 0.0 26.9 ± 0.0 27.7 ± 0.0 27.8 ± 0.0 28.6 ± 0.0 Discretized PQ (n=4, k=256) RSPQ (n=4, k=256, r=4) 89.5 ± 0.1 89.8 ± 0.0 60.5 ± 0.1 60.7 ± 0.1 25.6 ± 0.1 26.1 ± 0.1 Table 2: Accuracy (averaged over 5 runs) of continuous and discretized multi-modal models, compared to baselines. 100-dim continuous vector xvi may be divided into ten 10dimensional subvectors si . Let N (si ) denote the index of the nearest centroid for si . The discretized representation of v is then given as h(1, N (s1 )), (2, N (s2 )), .., (10, N (s10 ))i. We include these tokens in the text and treat them as if they were special tokens, in the standard fastText model, i.e., o(xn ) = W (U xtn + αU xdn ). where xdn are the discretized features and α is a reweighting hyperparameter. We normalize xtn and xdn independently. As we can see, the discretized models are closely related to the additive model, except that they use the same weight matrix U with the discretized features used as “words” in the text. While PQ is great for compressing information into a discretized sequence, it does impose hard boundaries on subvectors, which means that overlapping semantic content that is shared between subvectors may be lost. Hence, we introduce a novel quantization method, called random sample product quantization (RSPQ), in order to maintain (at least some) overlapping semantic information. In RSPQ, the process is the same as in PQ, except we perform PQ over r repetitions of random permutations of xvi . In both cases, we treat the discretized features as if they are reweighted special tokens included in the textual data and run standard fastText. Model complexity There are various trade-offs at stake between these models. The additive, max-pooling and gated models are simplest and result in a hidden layer of the same size as with the normal FastText. The computational complexity of the linear classifier is thus O(HK), where K is the number of classes and H is the size of U xt and V xv . The max-pooling and gating models are slightly more complicated than the additive one, requiring an extra operation. For the bilinear model the complexity amounts to O(H 2 K). Thus, the bilinear model is by far the most expensive to compute. The additive model has the benefit that it does not strictly require a continuous input at all times. Hyperparameters and training In all experiments, the model is tuned on the validation set. We tried the following hyperparameters: a learning rate in {0.1, 0.25, 0.5, 1.0, 2.0}, a number of epochs in {5, 10, 20}, a reweighting parameter in {0.01, 0.02, 0.05, 0.1, 0.2, 0.5} and an embedding dimensionality of either 20 or 100. These hyperparameters were sweeped using grid search and we used a softmax loss. For other hyperparameters, such as the number of threads in the parallel optimization and the minimum word count, we fixed their values to standard values in FastText (4 threads, minimum count of 1, respectively), since we found that these did not impact classification accuracy. In the case of the gated and bilinear-gated models, the modality used to serve as a gate over the other modality is treated as a hyperparameter as well. Results The results of the comparison may be found in Table 2. We compare the continuous and discretized multi-modal models against the text-only FastText model and to the continuous features-only model. We also include results from (Wang et al. 2015) on Food-101, where they used TF-IDF features for text and a deep convolutional neural network features for images, as well as results from (Arevalo et al. 2017) for Gated Multimodal Units (GMU) and their AVG Probs model. GMUs are a substantially more complicated model architecture than any of our relatively simple fusion methods, so this study is a good test of their capability. We note that in the case of Food101, our methods work considerably better than previously reported results. For MM-IMDB, the continuous multi-modal models perform very close to the GMU model and outperform the AVG Probs method, while being simpler and computationally more efficient. We observe that multi-modal models always outperform standard FastText and the continuous-only approach, disregarding the particular type of fusion. This shows that the inclusion of multi-modal information (at least in these types of classification tasks) always helps and that making use of Model Train time (FlickrTag-1) FastText 0h01m Additive Max-pooling Gated Bilinear Bilinear-Gated 0h39m 0h39m 0h40m 1h04m 1h06m PQ RSPQ 0h01m 0h02m Table 3: Training time on FlickrTag-1 Model FlickrTag FastText 36.7 PQ (n=4, k=256) RSPQ (n=4, k=256, r=4) 38.9 39.4 q 0 253 q 0 13 donuts 0.987 doughnuts 0.981 donut 0.980 doughnut 0.979 donuts? 0.939 crème 0.933 ramekins 0.928 brulee 0.925 brûlée 0.916 custards 0.916 q 1 253 oishii 0.905 shoga 0.885 tenkasu 0.884 octopus 0.883 aonori 0.881 Table 5: Examples of nearest neighbors for quantized features in Food101. one minute. If we scale up to the full FlickrTag dataset, Table 4 shows that the discretized models substantially outperform standard FastText. An increase of 2.7% in accuracy, as seen from FastText to RSPQ, represents having an additional 16778 test set documents correctly classified using that model, which is a non-negligible amount. Interpretability Table 4: Performance on full FlickrTag. multi-modal information, where available, will lead to increased performance. FastText outperforms the continuousonly method on all datasets, which indicates that text plays a big role in these tasks, and that it is relatively more important than the visual information. If we examine the continuous multi-modal models, we see that the bilinear-gated model is the clear winner: it outperforms all other methods on all three tasks. It is however also the most complicated model, and as a result is less efficient. We found that placing the gating non-linearity on the text led to the best performance on Food101 and MM-IMDB, while placing it on the visual modality led to the best performance on FlickrTag. It is interesting to observe that the more complicated gated model, as well as the non-gated bilinear model, do not necessarily outperform the simpler additive and max-pooling models. In fact, the performance of these much simpler models is not too far removed from the best scores. The take-away message appears to be: if you care more about accuracy, use the bilinear method with gating; if you care more about speed, use a simple model like the additive or max-pooling one, which have the additional potential benefit that they do not necessarily require the presence of continuous information if none is available. Speed We can draw inspiration from the fact that the additive model performed reasonably well: if speed is essential—if necessary at the expense of some accuracy—the discretized models are an obvious choice to further simplify and speed up the model. Even though they outperform standard FastText by a large margin, as shown in Table 2, they only come with a minor performance impact. Table 3 shows the training times for the various models on the FlickrTag-1 dataset: while the bilinear models take around one hour to train (recall that this constitutes only the first shard of the full dataset); the discretized methods, similarly to FastText, only take around An interesting side effect of the discretized multi-modal methods is that they allow us to examine the nearest neighbors of the quantized features: if a particular feature corresponds to something that looks like a donut, for example, then its embedding should be close to words related to donut. Indeed, as Table 5 shows, we can find clearly identifiable clusters, e.g. for donuts, crème brûlée and certain types of Japanese food. Interpretability is an important but often overlooked aspect of classification models: we show that a simple and efficient method, that outperforms textonly methods by a large margin, yields the additional benefit that it allows for the interpretation of the visual features that a classifier picks up on—something that is difficult to achieve with standard convolutional features. Conclusion & Outlook The internet is becoming increasingly multi-modal, which makes the task of multi-modal classification ever more pertinent. In order to be able to handle large quantities of data, we need efficient models for large-scale multi-modal classification. In this work, we examined these two questions together. First, we compared various multi-modal fusion methods and found a bilinear-gated model to achieve the highest accuracy, while the simpler additive and max-pooling models yielded reasonably high accuracy at higher speed. Second, we showed that the model can be speeded up even further by introducing discretized multi-modal features. Lastly, we showed that this method yields the additional benefit of interpretability, where we can examine what the multi-modal model picks up on when making its classification decision. We hope that this work can serve as a useful baseline for further work in multi-modal classification. Acknowledgments We thank the reviewers for their comments and our colleagues at FAIR for their feedback and support. References [Antol et al. 2015] Antol, S.; Agrawal, A.; Lu, J.; Mitchell, M.; Batra, D.; Lawrence Zitnick, C.; and Parikh, D. 2015. VQA: Visual question answering. In Proceedings of the IEEE International Conference on Computer Vision, 2425– 2433. [Arevalo et al. 2017] Arevalo, J.; Solorio, T.; Montes-y Gómez, M.; and González, F. A. 2017. Gated multimodal units for information fusion. [Atrey et al. 2010] Atrey, P. K.; Hossain, M. A.; El Saddik, A.; and Kankanhalli, M. S. 2010. Multimodal fusion for multimedia analysis: a survey. Multimedia systems 16(6):345–379. [Baker, Kiela, and Korhonen 2016] Baker, S.; Kiela, D.; and Korhonen, A. 2016. Robust text classification for sparsely labelled data using multi-level embeddings. In Proceedings of COLING, 2333–2343. [Baroni 2016] Baroni, M. 2016. Grounding distributional semantics in the visual world. Language and Linguistics Compass 10(1):3–13. [Bernardi et al. 2016] Bernardi, R.; Cakici, R.; Elliott, D.; Erdem, A.; Erdem, E.; Ikizler-Cinbis, N.; Keller, F.; Muscat, A.; and Plank, B. 2016. Automatic description generation from images: A survey of models, datasets, and evaluation measures. J. Artif. Intell. Res.(JAIR) 55:409–442. [Borko and Bernick 1963] Borko, H., and Bernick, M. 1963. Automatic document classification. Journal of the ACM 10(2):151–162. [Branavan, Silver, and Barzilay 2012] Branavan, S.; Silver, D.; and Barzilay, R. 2012. Learning to win by reading manuals in a monte-carlo framework. Journal of Artificial Intelligence Research 43:661–704. [Bruni, Tran, and Baroni 2014] Bruni, E.; Tran, N.-K.; and Baroni, M. 2014. Multimodal distributional semantics. J. Artif. Intell. Res.(JAIR) 49(2014):1–47. [Chen et al. 2009] Chen, J.; Huang, H.; Tian, S.; and Qu, Y. 2009. Feature selection for text classification with naı̈ve bayes. Expert Systems with Applications 36(3):5432–5435. [Deerwester et al. 1990] Deerwester, S.; Dumais, S. T.; Furnas, G. W.; Landauer, T. K.; and Harshman, R. 1990. Indexing by latent semantic analysis. Journal of the American society for information science 41(6):391. [Frome et al. 2013] Frome, A.; Corrado, G. S.; Shlens, J.; Bengio, S.; Dean, J.; Mikolov, T.; et al. 2013. Devise: A deep visual-semantic embedding model. In Advances in neural information processing systems, 2121–2129. [Fukui et al. 2016] Fukui, A.; Park, D. H.; Yang, D.; Rohrbach, A.; Darrell, T.; and Rohrbach, M. 2016. Multimodal compact bilinear pooling for visual question answering and visual grounding. CoRR abs/1606.01847. [He et al. 2016] He, K.; Zhang, X.; Ren, S.; and Sun, J. 2016. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 770–778. [Hill, Cho, and Korhonen 2016] Hill, F.; Cho, K.; and Korhonen, A. 2016. Learning distributed representations of sentences from unlabelled data. arXiv preprint arXiv:1602.03483. [Jegou, Douze, and Schmid 2011] Jegou, H.; Douze, M.; and Schmid, C. 2011. Product quantization for nearest neighbor search. IEEE Transactions on Pattern Analysis and Machine Intelligence 33(1):117–128. [Joachims 1998] Joachims, T. 1998. Text categorization with support vector machines: Learning with many relevant features. In European Conference on Machine Learning, 137– 142. [Joulin et al. 2016] Joulin, A.; Grave, E.; Bojanowski, P.; and Mikolov, T. 2016. Bag of tricks for efficient text classification. CoRR abs/1607.01759. [Kiela and Bottou 2014] Kiela, D., and Bottou, L. 2014. Learning image embeddings using convolutional neural networks for improved multi-modal semantics. In EMNLP, 36– 45. [Kiela and Clark 2015] Kiela, D., and Clark, S. 2015. Multiand cross-modal semantics beyond vision: Grounding in auditory perception. In EMNLP, 2461–2470. [Kiela, Bulat, and Clark 2015] Kiela, D.; Bulat, L.; and Clark, S. 2015. Grounding semantics in olfactory perception. In ACL (2), 231–236. [Kim 2014] Kim, Y. 2014. Convolutional neural networks for sentence classification. In Proceedings of EMNLP. [Kiros et al. 2015] Kiros, R.; Zhu, Y.; Salakhutdinov, R.; Zemel, R. S.; Torralba, A.; Urtasun, R.; and Fidler, S. 2015. Skip-thought vectors. In Proceedings of NIPS. [Kiros, Salakhutdinov, and Zemel 2014] Kiros, R.; Salakhutdinov, R.; and Zemel, R. S. 2014. Multimodal neural language models. In Proceedings of ICML, volume 14, 595–603. [Lazaridou, Bruni, and Baroni 2014] Lazaridou, A.; Bruni, E.; and Baroni, M. 2014. Is this a wampimuk? crossmodal mapping between distributional semantics and the visual world. In ACL (1), 1403–1414. [Lazaridou, Pham, and Baroni 2015] Lazaridou, A.; Pham, N. T.; and Baroni, M. 2015. Combining language and vision with a multimodal skip-gram model. arXiv preprint arXiv:1501.02598. [Le and Mikolov 2014] Le, Q. V., and Mikolov, T. 2014. Distributed representations of sentences and documents. In ICML, volume 14, 1188–1196. [Lopopolo and van Miltenburg 2015] Lopopolo, A., and van Miltenburg, E. 2015. Sound-based distributional models. IWCS 2015 70. [Mei, Bansal, and Walter 2016] Mei, H.; Bansal, M.; and Walter, M. R. 2016. Listen, attend, and walk: Neural mapping of navigational instructions to action sequences. In Proceedings of AAAI. [Mikolov et al. 2013] Mikolov, T.; Sutskever, I.; Chen, K.; Corrado, G. S.; and Dean, J. 2013. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems, 3111– 3119. [Mooney 2008] Mooney, R. J. 2008. Learning to connect language and perception. In Proceedings of AAAI. [Narasimhan, Kulkarni, and Barzilay 2015] Narasimhan, K.; Kulkarni, T.; and Barzilay, R. 2015. Language understanding for text-based games using deep reinforcement learning. In Proceedings of EMNLP. [Ngiam et al. 2011] Ngiam, J.; Khosla, A.; Kim, M.; Nam, J.; Lee, H.; and Ng, A. Y. 2011. Multimodal deep learning. In Proceedings of ICML, 689–696. [Oquab et al. 2014] Oquab, M.; Bottou, L.; Laptev, I.; and Sivic, J. 2014. Learning and transferring mid-level image representations using convolutional neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, 1717–1724. [Pang and Lee 2008] Pang, B., and Lee, L. 2008. Opinion mining and sentiment analysis. Foundations and trends in information retrieval 2(1-2):1–135. [Perronnin and Larlus 2015] Perronnin, F., and Larlus, D. 2015. Fisher vectors meet neural networks: A hybrid classification architecture. In Proceedings of the IEEE conference on computer vision and pattern recognition, 3743–3752. [Potamianos et al. 2003] Potamianos, G.; Neti, C.; Gravier, G.; Garg, A.; and Senior, A. W. 2003. Recent advances in the automatic recognition of audiovisual speech. Proceedings of the IEEE 91(9):1306–1326. [Razavian et al. 2014] Razavian, A. S.; Azizpour, H.; Sullivan, J.; and Carlsson, S. 2014. Cnn features off-the-shelf: an astounding baseline for recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, 806–813. [Regneri et al. 2013] Regneri, M.; Rohrbach, M.; Wetzel, D.; Thater, S.; Schiele, B.; and Pinkal, M. 2013. Grounding action descriptions in videos. Transactions of the Association for Computational Linguistics 1:25–36. [Sebastiani 2002] Sebastiani, F. 2002. Machine learning in automated text categorization. ACM Computing Surveys 34(1):1–47. [Socher et al. 2011] Socher, R.; Pennington, J.; Huang, E. H.; Ng, A. Y.; and Manning, C. D. 2011. Semisupervised recursive autoencoders for predicting sentiment distributions. In Proceedings of the conference on empirical methods in natural language processing, 151–161. Association for Computational Linguistics. [Socher et al. 2013] Socher, R.; Ganjoo, M.; Manning, C. D.; and Ng, A. 2013. Zero-shot learning through cross-modal transfer. In Advances in neural information processing systems, 935–943. [Sriram et al. 2010] Sriram, B.; Fuhry, D.; Demir, E.; Ferhatosmanoglu, H.; and Demirbas, M. 2010. Short text classification in twitter to improve information filtering. In Proceedings of the 33rd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR ’10, 841–842. New York, NY, USA: ACM. [Srivastava and Salakhutdinov 2012] Srivastava, N., and Salakhutdinov, R. R. 2012. Multimodal learning with deep boltzmann machines. In Advances in neural information processing systems, 2222–2230. [Thomee et al. 2016] Thomee, B.; Shamma, D.; Friedland, G.; Elizalde, B.; Ni, K.; Poland, D.; Borth, D.; and Li, L. 2016. YFCC100M: The New Data in Multimedia Research. Communications of the ACM 59(2):64–73. [Wang and Manning 2012] Wang, S., and Manning, C. D. 2012. Baselines and bigrams: Simple, good sentiment and topic classification. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics: Short Papers-Volume 2, 90–94. Association for Computational Linguistics. [Wang et al. 2015] Wang, X.; Kumar, D.; Thome, N.; Cord, M.; and Precioso, F. 2015. Recipe recognition with large multimodal food dataset. In Workshop CEA of the IEEE International Conference on Multimedia & Exposition (ICME), 1–6. IEEE. [Weston, Bengio, and Usunier 2011] Weston, J.; Bengio, S.; and Usunier, N. 2011. Wsabie: Scaling up to large vocabulary image annotation. In IJCAI, volume 11, 2764–2770. [Wu et al. 2004] Wu, Y.; Chang, E. Y.; Chang, K. C.-C.; and Smith, J. R. 2004. Optimal multimodal fusion for multimedia data analysis. In Proceedings of the 12th annual ACM international conference on Multimedia, 572–579. ACM. [Xiong and Svensson 2002] Xiong, N., and Svensson, P. 2002. Multi-sensor management for information fusion: issues and approaches. Information fusion 3(2):163–186. [Zhao et al. 2003] Zhao, W.; Chellappa, R.; Phillips, P. J.; and Rosenfeld, A. 2003. Face recognition: A literature survey. ACM computing surveys (CSUR) 35(4):399–458.
2cs.AI
07/25/2017 Data-Driven Analysis and Common Proper Orthogonal Decomposition (CPOD)-Based Spatio-Temporal Emulator for Design Exploration Shiang-Ting Yeha,*, Xingjian Wanga, **, Chih-Li Sungb, †, Simon Makb, †, Yu-Hung Changa, ‡, Liwei Zhang, a, ‡‡ C. F. Jeff Wub, §, Vigor Yanga, ¶ School of Aerospace Engineering, Georgia Institute of Technology, Atlanta, Georgia, USA School of Industrial and Systems Engineering, Georgia Institute of Technology, Atlanta, Georgia, USA a b Abstract The present study proposes a data-driven framework trained with high-fidelity simulation results to facilitate decision making for combustor designs. At its core is a surrogate model employing a machine-learning technique called kriging, which is combined with data-driven basis functions to extract and model the underlying coherent structures. This emulation framework encompasses key design parameter sensitivity analysis, physics-guided classification of design parameter sets, and flow evolution modeling for efficient design survey. To better inform the model of quantifiable physical knowledge, a sensitivity analysis using Sobol’ indices and a decision tree are incorporated into the framework. This information improves the surrogate model training process, which employs basis functions as regression functions over the design space for the kriging model. The novelty of the proposed approach is the construction of the model through Common Proper Orthogonal Decomposition, which allows for data-reduction and extraction of common coherent structures. The accuracy of prediction of mean flow features for new swirl injector designs is assessed and the dynamic flowfield is captured in the form of power spectrum densities. This data-driven framework also demonstrates the uncertainty quantification of predictions, providing a metric for model fit. The significantly reduced computation time required for evaluating new design points enables efficient survey of the design space. Keywords: high-fidelity simulation, kriging, machine learning, reduced basis modeling, swirl injector design study Co-first author, Graduate Student, School of Aerospace Engineering **Co-first author, Research Engineer, School of Aerospace Engineering † Graduate Student, School of Industrial and Systems Engineering ‡ Graduate Student, School of Aerospace Engineering * ‡‡ Research Engineer, School of Aerospace Engineering § Professor and Coca-Cola Chair in Engineering Statistics, School of Industrial and Systems Engineering ¶ Corresponding author, William R. T. Oakes Professor and Chair, School of Aerospace Engineering, [email protected] 2 Introduction For high-performance power generation and propulsion systems, such as those of airbreathing and rocket engines, physical experiments are extremely expensive due to the harsh requirements of operating conditions and high level of system complexities [1-3]. In addition, it is difficult to gain insight into the underlying mechanisms of the physiochemical processes involved because of the typical reliance upon optical diagnostics for experimental measurements [4-6]. High-fidelity simulations can be employed to capture more salient features of the flow and combustion dynamics in engines [7-9]. These computations, however, are often too expensive and time-consuming for design survey purposes. In the development stage for a propulsion engine, achieving an optimal design requires models capable of evaluating designs and identifying trade-offs in a timely manner. Furthermore, the formulation of such models requires an understanding of the key physics and incorporation of physics-guided decision-making to resolve multiple, potentially conflicting, requirements. The present study, for example, treats a simplex swirl injector, a central component of many airbreathing and rocket combustion devices containing rich flowfield physics. Each high-fidelity calculation of the three-dimensional flow evolution using the Large Eddy Simulation (LES) technique takes about 500,000 CPU hours to obtain statistically meaningful data for a grid of 4 million mesh points [9]. Given the number of geometric attributes and operating conditions to be surveyed, the design space exploration necessitates a prohibitive number of sample points. The situation can 3 be substantially improved by using Design of Experiments (DoE) [10], statistical methodologies to determine the ideal training dataset for surrogate modeling. By identifying sensitive injector parameters, the sample size can be further reduced based on semi-empirical approaches, such as the recommendation of ten simulations per parameter proposed by Loeppky et al. [11]. Kriging, a technique originating in the field of geostatistics [12], is a powerful machine-learning tool for interpolation and prediction. The key idea is to model unobserved responses using a Gaussian Process (GP) governed by a preset covariance function. The response surface of the trained kriging model can then be obtained by applying data-tuned weights to radial basis functions centered at observed points. For problems of modeling spatio-temporal flow evolution, the observed points over the entire design space are sparse because the daunting computational costs limit the number of affordable numerical cases. Conventional machine-learning techniques relying on “big data” over the design space would fail. Rather, the “big data” lies within the flowfield information, which encompasses a wide range of length and time scales. The proposed methodology combines machine-learning techniques with domain knowledge of the physical system to build an accurate emulator model. The inclusion of flow physics allows the data-driven model to be physically interpretable with enhanced emulation performance. 4 The objective of the present study is to develop a kriging model capable of treating different spatial grids while capturing dynamic information. The spatial and temporal resolution of all simulation cases is very fine, making direct use of the raw data for training a predictor computationally demanding. Not only is there a need to incorporate data generated from different spatial grids [13-15] and use data-reduction methods, but the kriging model must also be extended to multiple, functional outputs. A limited number of studies have been published on multiple-output kriging [16, 17] and functional outputs, including wavelet decomposition [18] and knot-based GP models [19]. For data with fine spatio-temporal resolution, unfortunately, these types of methods are inappropriate because of the substantially increased computation time required. Here, an emulation framework for a spatio-temporal surrogate model is presented using a simplex swirl injector for demonstration. A reduced basis model is developed and implemented to handle large scale spatio-temporal datasets with practical turnaround times for design iteration. The model is trained with datasets that have been classified based on established physics to reap the benefits of incorporating machine learning techniques into the framework. The model can accurately retain the rich set of physics from LES-based high-fidelity simulations and predict flow structures. The present work develops an integrated framework that incorporates state-of-theart statistical methods, machine learning algorithms, and a physics-driven data 5 reduction method to obtain a surrogate model over a broad range of design space. The emulation framework relies on Proper Orthogonal Decomposition (POD) [20] (also known as the Karhunen-Loeve decomposition in the theory of stochastic processes [21]) to extract the flow physics and reduce the data by representing the flowfield with basis functions. This technique can be combined with kriging to build an efficient and physicsdriven emulator. The basis Common POD (CPOD) analysis is conducted by means of a common grid generated from simulations of the geometries designated by a DoE. Such an approach is similar to that of Higdon et al. [22] for generalizing a POD expansion. In a complementary statistical paper [23], the statistical properties of a broader class of CPOD-based emulators are considered. The present paper applies new machine-learning techniques and investigates the practical performance of the emulator with respect to flow physics. The emulated flowfield is validated against an LES simulated flowfield to demonstrate how the flow structures and injector characteristics are captured by the model. In addition, the model allows for spatio-temporal uncertainty quantification (UQ). This metric can be used to verify the model and quantify the tolerance range for flow oscillations. The paper is structured as follows. Section 1 provides the physical model, describing the baseline configurations, the design points designated by the DoE, the high-fidelity simulation technique, and the simulation results. Section 2 discusses the data-driven emulation framework proposed for the design methodology and surrogate model. 6 Section 3 details the application of the framework, while assessing the surrogate model using performance metrics, root-mean-square errors, and power spectrum density (PSD) of simulated and predicted flowfields. Finally, Section 4 concludes with a summary and directions for future work. 1. Physical Model Description and Simulations 1.1. Swirl Injectors Figure 1 shows a schematic of a simplex swirl injector representative of those commonly used in applications like liquid-fueled propulsion engines [24]. The five parameters that define the geometry are injector length, 𝐿, injector radius, 𝑅𝑛 , inlet slot width, 𝛿 , tangential inlet angle, 𝜃, and the distance between the inlet and headend, Δ𝐿. These design parameters play an important role in determining the injector performance, including the thickness, ℎ, and spreading angle, 𝛼, of the liquid film at the injector exit. The selection of these design parameters is dependent upon engine requirements. Table 1 shows the design space and the ranges of each parameter in the present work. To generalize the emulator framework, a broad span of these parameters was chosen; the injector length range represents that of small upper-stage and large first-stage engines, or about 22.7 and 93 mm for the RD-0110 and RD-170 engine, respectively [25]. Liquid oxygen (LOX) at a temperature of 120 K is delivered tangentially into the injector through inlets. The operating pressure is 100 atm, typical of contemporary liquid rocket engines. The ambient gas is oxygen at 300 K. The flow dynamics of this class of 7 injectors have been systematically investigated in detail by Wang et al. [8] and Zong et al. [26]. Here we first conduct a set of high-fidelity simulations based on conditions in the prescribed design space described in Table 1, then extract the common flow structures for surrogate modeling. L Figure 1. Schematic of a swirl injector. Table 1 Design space for injector geometric parameters. 𝐿 (mm) 𝑅𝑛 (mm) 𝜃 𝛿 (mm) Δ𝐿 (mm) 20-100 2.0-5.0 45°-75° 0.5-2.0 1.0-4.0 1.2. Design of Experiments Given the design space in Table 1, if 10 variations are assigned for each design parameter, the total number of design points are 105 for a full factorial design. It is impractical to perform so many simulations, due to the extensive computing resource required to acquire usable data. A DoE methodology is therefore required to reduce the number of design points and still capture the prominent features in the design space. To this end, the maximum projection (MaxPro) design proposed by Joseph et al. [27] is implemented for good space-filling properties and GP modeling predictions. Thirty points in the expected range of 5-10p (p=5, the number of design parameters) points, as 8 suggested by Santner et al. [10], are simulated over the entire design space. Figure 2 shows the two-dimensional projection of the 30 design points (and thus 30 simulation runs). Good space-filling properties are observed for all parameters. 3 4 5 0.5 1.0 1.5 2.0 20 40 60 80 2 4 5 (mm) 45 55 65 75 2 3 (mm) 0.5 1.0 1.5 2.0 (degree) 3 4 (mm) 1 2 (mm) 20 40 60 80 45 55 65 75 1 2 3 4 Figure 2. Two-dimensional projections of design points: benchmark points (red), baseline and neighboring points (blue). 1.3. High-fidelity Simulation An integrated theoretical and numerical framework is established and adopted, to treat supercritical fluid flows and combustion over a broad range of fluid thermodynamic states [8, 28-30]. Turbulence closure is achieved using LES. 9 Thermodynamic properties are evaluated by fundamental thermodynamic theories in accordance with the modified Soave–Redlich–Kwong equation of state. Transport properties are estimated using extended corresponding-state principles [28]. The numerical scheme is a density-based, finite-volume methodology along with a dualtime-step integration technique. The overall algorithm is self-consistent and robust, with implementation of a preconditioning scheme and a detailed treatment of general fluid thermodynamics [31]. Owing to the demanding computational requirements of three-dimensional simulations, only a cylindrical sector with periodic boundary conditions in the azimuthal direction is simulated. The discrete orifices are converted into an axisymmetric slot through dynamic similarity. A multi-block domain decomposition technique, combined with a message passing interface for parallel computing, is applied to improve the computational efficiency. A typical simulation takes about 30,000 CPU hours on a single Intel Xeon processor to obtain statistically significant data, with a total time span of 30 ms, after reaching a fully developed state (~24 ms). The simulated data are subsampled every 30 time steps, with 1 μs time step intervals. According to the Nyquist criterion, a temporal resolution of 16.5 kHz is achieved. 1.4. High-Fidelity Simulation Results Thirty high-fidelity simulation runs at design points defined by MaxPro were conducted. To isolate the effect of injector parameters, the mass flow rate for all runs is 10 fixed at 0.15 kg/s. The first two design points designated by MaxPro are chosen as the baseline geometries, A and B in Table 2. The benchmark points used for assessing the accuracy of the emulator model are obtained by offsetting the design parameters of these two points. (Details are elaborated below, in the Results and Discussion section.) Figures 3 and 4 show the instantaneous distributions of temperature and density for two neighboring design points, C and D in Table 2, selected to indicate different flow features in the design space. The key flow structures include a hollow gas core formed from the attachment of the swirling liquid film to the wall through centrifugal force, liquid accumulation near the injector headend due to the recirculation of LOX, and a conical liquid sheet spreading outward at the injector exit propelled by azimuthal momentum [25]. Table 2 Injector geometrics at design points colored blue in Figure 2. L (mm) Rn (mm) Design A 20.0 3.22 Design B 41.9 3.05 Design C 43.1 5.00 Design D 37.7 2.82 𝜃 (°) 𝛿 (mm) Δ𝐿 (mm) 52.9 0.52 3.42 65.5 1.57 1.00 70.0 0.50 2.79 45.8 1.17 3.80 Different flow physics, however, are also observed. The film thickness for design C is much thinner than for design D, with a larger spreading angle at the injector exit (34.6° compared to 29.2° for design D). Among the 30 design points, some act like swirling flows, as in design C, while others behave like jet flows (jet-like) as in design D. For convenience, the critical value of the spreading angle that separates swirling from jetlike flows is chosen to be 30°; this angle is considered to be the empirical indicator of 11 whether the liquid stream has significant radial penetration in the downstream region. The 30 simulation runs are thus divided into two subgroups, swirl (spreading angle above 30°) and jet (spreading angle below 30°). In the next section, a machine-learning technique, decision tree, is introduced to identify the jet-swirl dichotomy. This is important because it directly influences the feature extraction and kriging processes described in the following sections. Figure 3. Instantaneous distributions of temperature and density for design C. Figure 4. Instantaneous distributions of temperature and density for design D. 12 2. Data-Driven Framework Design points may display similar or significantly different flow structures. In this section, the collected dataset from all 30 high-fidelity simulations is used to perform a data-driven analysis of the design space using machine-learning tools. The work consists of two components: (a) a sensitivity analysis for identifying important design parameters with respect to the quantities of interest, where the Sobol’ indices [32] are herein, and (b) a decision-tree learning process with respect to the jet-swirl dichotomy, and the incorporation of this information into the emulator model. After the sensitivity analysis and decision tree learning, a technique called common POD (CPOD) is then implemented to extract the flow characteristics over the design space. Lastly, the timecoefficients for the obtained basis functions are used as training data for the kriging model. Integrating the results of this methodology, one can make accurate flow predictions at any new design setting. A flowchart of the overall data-driven emulator framework is provided in Figure 5. 13 High-Fidelity Numerical Simulation • Flowfield simulation • Response extraction Sensitivity Analysis • Variable screening • Exploration of flow physics Decision Tree Construction • Supervised learning of jet-swirl boundary • Design space partition for GP Kriging CPOD Kriging • Extraction of common coherent structures • GP training using CPOD time-coefficients Figure 5. Flowchart for data-driven analysis and emulator construction. 2.1. Sensitivity Analysis The first component of this emulator framework is a sensitivity analysis using Sobol’ indices [32] to identify which design parameters contribute more to changes in response outputs of interest, such as liquid-film thickness or spreading angle. The analysis is also a valuable tool for parameter reduction. The idea is to decompose the variations of certain desired output variables into the partial variation attributable to each input parameter and effects of interactions between parameters. This method of analyzing sensitivity has close connections to the classical analysis-of-variance employed in linear regression models [33]. To put it in mathematical terms, let 𝑓(𝒙) be the desired response output at design setting 𝒙, where 𝒙 = (𝑥1 , 𝑥2 , … , 𝑥𝑝 ) corresponds to the input parameters over a unit hypercube [0,1]𝑝 . Specifically, for the current study, 𝑝 = 5 and 𝑥1 = 𝐿, 𝑥2 = 𝑅𝑛 , 𝑥3 = 14 𝜃, 𝑥4 = 𝛿, and 𝑥5 = 𝛥𝐿, with the design range for all parameters normalized to the interval [0,1]. Define the random variable 𝑿 as a uniform distribution over [0,1]𝑝 , and let 𝑓0 = 𝔼[𝑓(𝑿)] be the response mean and 𝐷 = Var[𝑓(𝑿)] be the response variance over the design range. The goal is to decompose the response variance 𝐷 into the contributions for each design parameter 𝑥1 , ⋯ , 𝑥𝑝 , as well as the effects of interactions between parameters. Consider the following decomposition: 𝑝 𝑓(𝑥) = 𝑓0 + ∑ 𝑓𝑖 (𝑥𝑖 ) + 𝑖=1 ∑ 𝑓𝑖,𝑗 (𝑥𝑖 , 𝑥𝑗 ) + ⋯ + 𝑓1,2,⋯,𝑝 (𝑥1 , ⋯ , 𝑥𝑝 ), (1) 1≤𝑖<𝑗≤𝑝 where each summand satisfies 1 ∫ 𝑓𝑖1 ,…,𝑖𝑡 (𝑥𝑖1 , ⋯ , 𝑥𝑖𝑡 ) 𝑑𝑥𝑘 = 0, (2) 0 for any 𝑘 = 𝑖1 , … , 𝑖𝑡 and has orthogonal components. In Eq. (1), the main effect index of input 𝑖 is 𝑓𝑖 (𝑥𝑖 ) = ∫(𝑓(𝑥) − 𝑓0 ) 𝑑𝑥−𝑖 , 𝑥−𝑖 = {𝑥1 , ⋯ , 𝑥𝑝 }\{𝑥𝑖 }, (3) and the two-way interaction index of input 𝑖 and 𝑗 is: 𝑓𝑖,𝑗 (𝑥𝑖 , 𝑥𝑗 ) = ∫{𝑓(𝑥) − 𝑓0 − 𝑓𝑖 (𝑥𝑖 ) − 𝑓𝑗 (𝑥𝑗 )} 𝑑𝑥−𝑖,𝑗 , (4) 𝑥−𝑖,𝑗 = {𝑥1 , ⋯ , 𝑥𝑝 }\{𝑥𝑖 , 𝑥𝑗 } Squaring both sides of Eq. (1) and taking the integral over [0,1]𝑝 , we get: 𝑝 𝐷 = ∑ 𝐷𝑖 + ∑ 𝐷𝑖𝑗 + 𝑖=1 1≤𝑖<𝑗≤𝑝 ∑ 𝐷𝑖𝑗𝑙 + ⋯ + 𝐷1,2,…,𝑝 , (5) 1≤𝑖<𝑗<𝑙≤𝑝 where 𝐷𝑢 is the partial variance corresponding to a subset of parameters 𝑢 ⊆ {1, ⋯ , 𝑝}: 15 𝐷𝑢 = ∫ 𝑓𝑢2 (𝑥𝑢 )𝑑𝑥𝑢 . (6) The Sobol’ sensitivity indices for parameter subset 𝑢 can be defined as [32]: 𝑆𝑢 = 𝐷𝑢 ∈ [0,1], 𝐷 (7) with larger values of 𝑆𝑢 indicating greater importance of the interaction effect for 𝑢. In practice, Sobol’ indices can be estimated as follows. First, a pseudo-random parameter sequence is generated using a low discrepancy Sobol’ point set [34]. Second, this sequence is used to approximate the above integrals, which can then provide estimates for the corresponding Sobol’ indices. The quantification of the response sensitivity for each parameter serves two purposes: (a) it provides a preliminary analysis of important effects in the system, which can guide further physical investigations, and (b) it allows for a reduction of the number of parameters that must be considered in the emulator, thereby providing a computationally efficient way to survey flow properties within the design space. A detailed discussion of this sensitivity analysis is presented in Section 3 for the current physical model. 2.2. Decision Tree As mentioned in Section 1.4, there exists a jet-like/swirling flow dichotomy within the design space. For simulated design points, it is easy to classify whether such a parameter combination results in a jet-like or swirling flow, because the flowfield data are readily available. For design settings that have not been simulated, a data-driven technique is 16 needed to make such a classification. There are two reasons why such a classification tool may be of interest. First, a boundary between jet-like and swirling cases can be established over the design space of interest, which can then be used to gain physical insight into the design space and to guide additional experiments. Second, the classification information can be used to train separate surrogate models within the jetlike and swirling domains. This partitioning of the emulator training dataset allows the model to extract different flow characteristics associated with jet-like and swirling behavior separately, and can thereby improve its predictive accuracy. A powerful machine-learning tool called ‘decision tree’ is employed for the classification process. A decision tree is a decision support tool that models decisions and their possible consequences. Decision trees are one of the most popular predictive models in data mining and machine learning [35, 36]. Such methods are a part of a larger class of learning methods called supervised learning [37], which aims to predict an objective function from labeled training data. A classification tree, a special type of decision tree, is used here. It specializes in predicting classification outcomes, such as whether a parameter set has a jet-like or swirling flow. The trained model can be summarized by a binary tree, separating the design space into two subgroups. Each node of this tree represents a parameter decision, and each leaf of the tree indicates the class of outcomes, following the chain of decisions made from the tree root. 17 A classification tree can be trained using the following algorithm (see [37] for details). First, the simulated flowfields of each sampled design point are examined and classified as either jet-like or swirling flow, depending on the radial penetration of the propellant in the downstream region. Next, a search is conducted over all the design parameters and possible split-points, finding the parameter constraints which minimize misclassification. A branch is then made in the classification tree corresponding to the parameter constraint. The same branching procedure is repeated for each of the resulting child nodes. For the analysis in Section 4, the Gini impurity index [38] is selected as the misclassification measure: 𝑝̂𝑗 (1 − 𝑝̂𝑗 ) + 𝑝̂𝑠 (1 − 𝑝̂𝑠 ), (8) where 𝑝̂𝑗 and 𝑝̂𝑠 are the proportions of jet-like and swirl cases in a split. The index measures how often a randomly chosen sample is incorrectly labeled when such a label is randomly assigned from the dataset. Notice that a Gini index of 0 indicates that (a) 𝑝̂𝑗 = 1 and 𝑝̂𝑠 = 0, or (b) 𝑝̂𝑗 = 0 and 𝑝̂𝑠 = 1, both of which suggest perfect classification. This decision tree learning technique not only provides a means for partitioning the training dataset for the model into jet-like and swirling flows, but also reveals physical insights on the important design parameter constraints causing this jet-swirl dichotomy. The interpretability of these constraints is elaborated in Section 3. 18 2.3. Kriging Surrogate Model (Emulator) The primary objective of this work is to develop an emulator model that uses the existing information of 30 simulation runs to predict the flowfield of a new design point within a practical turnaround time. With these tools in hand – the sensitivity analysis for parameter screening and the decision tree for partitioning the design space into jetswirl cases – a surrogate model for flowfield emulation is proposed. The kriging surrogate model, also known as an emulator, combines machine-learning techniques, statistical modeling, and a physics-driven data reduction method. A brief motivation for each part of this model is provided, before delving into the specific mathematical details. First, the proposed model is constructed through a POD analysis of the simulation dataset used for training. For a given flow property, the POD analysis determines a set of orthogonal basis functions, 𝜙𝑗 , such that the projection of the property onto these basis 2 functions has the smallest error, defined as 𝐸 (‖𝑓 − 𝑓̂‖ ) where 𝐸(∙) and ‖∙‖ denote the time average and norm in the 𝐿2 space, respectively [20]: 𝑛 𝑓̂(𝒙, 𝑡) = ∑ 𝛽𝑗 (𝑡)𝜙𝑗 (𝒙) (9) 𝑗=1 The basis functions, or mode shapes, are spatial distributions of the fluctuating fields of the flow properties, which can be closely linked to physical phenomena and coherent structures. The basis functions are ordered in such a way that the lowest modes have the 19 highest “energy,” as defined by the inner product of 𝑓. The flow properties for POD analysis include pressure, density, temperature, and velocity components. POD decomposition yields not only the eigenfunction modes, 𝜙𝑗 , and but also their corresponding time-varying coefficients, 𝛽𝑗 , which are referred to as POD coefficients. While the usage of POD simplifies the complex nature of a spatio-temporal model, a common set of basis functions is required for the emulator. Physically, this means a common set of coherent structures needs to be extracted over the design space. One option is to select a computational region of interest that is unaffected by any design changes [39]. Taking advantage of the basis functions generated by the POD analysis, an emulator can be obtained as long as a set of common basis functions exist. One of the challenges for the current study is the wide disparity of geometries in the design space, as shown in Figure 6. The present study utilizes a common grid for the 30 grid systems to find a set of common basis functions. To achieve this, the densest grid system among all cases is identified and split into four sections covering the effects of design parameters on the simulated grid. This partitioned grid is used for interpolation and rescaling of each simulated case to obtain a common grid. Then, an inverse distance weighting interpolation method with ten-nearest neighborhood points is used to map the original raw data onto the common grid [40]. Algorithmically, the CPOD expansion is obtained by first rescaling the different cases to the common grid, then computing the POD expansion, and finally rescaling the resulting modes back to the original grid. 20 Case 2 Case 1 Case 10 Case 9 Case 22 Case 24 Case 25 Figure 6. Schematics of different injector geometries in the design space. Because of the limited variation of the Reynolds number among the different injector geometries, the scaling of the data to the common grid is appropriate in the present study of nonreacting flows. The smallest injector diameter of concern is 4 mm, with a corresponding exit velocity of 27.5 m/s. With the liquid oxygen density being 1000 𝑘𝑔/𝑚3 and viscosity 0.114 cP, the Reynolds number based on the injector diameter is about 9.6x105. The largest injector diameter in the design space has a value of 10 mm, and the corresponding exit velocity is 11 m/s. At the same operating condition, the Reynolds number comes out to about 9x105. For some geometries where the liquid film does not produce a noticeable spreading angle, the Reynolds number is reduced to about 9x105. Despite this difference, the model is capable of avoiding excessive smoothing, provided the correlation function is bounded correctly. Such scaling of POD modes to establish common basis functions is vital to the emulator. It should be noted that this scaling is only appropriate for flow simulations that do not exhibit distinctively 21 different physical phenomena. Additional similarity parameters may be necessary when different physics and chemical reactions are incorporated, as reviewed by Dexter et al. [41]. The mathematical details for CPOD are provided below. Suppose 𝑛 simulations are conducted at various design geometries 𝒄1 , … , 𝒄𝑛 and let 𝑓(𝒙, 𝑡; 𝒄𝑖 ) be the simulated flowfield at design 𝒄𝑖 for a given time t and spatial coordinate 𝒙. The k-th CPOD mode is defined as 𝑛 2 𝜙𝑘 (𝒙) = argmax ∑ ∫ [∫ ℳ𝑖 [𝜓(𝒙)]𝑓(𝒙, 𝑡; 𝒄𝑖 )𝑑𝒙] 𝑑𝑡 , 𝜓:‖𝜓‖2 =1 𝑖=1 (10) 𝑠. 𝑡. ∫ 𝜓(𝒙)𝜙𝑙 (𝒙)𝑑𝒙 = 0, ∀ 𝑙 < 𝑘 Here, the map ℳ𝑖 : ℝ2 → ℝ2 is the transformation which linearly scales spatial features from the common geometry 𝒄 to the i-th geometry 𝒄𝑖 . The sequence of POD coefficients is defined as: 𝛽𝑘 (𝒄𝑖 , 𝑡) = ∫ ℳ𝑖 {𝜙𝑘 (𝒙)}𝑓(𝒙, 𝑡; 𝒄𝑖 )𝑑𝒙, (11) with the corresponding POD expansion using K modes given by: 𝐾 𝑓 (𝐾) (𝒙, 𝑡; 𝒄𝑖 ) = ∑ 𝛽𝑘 (𝒄𝑖 , 𝑡)ℳ𝑖 {𝜙𝑘 (𝒙)}. (12) 𝑘=1 The transformation allows for the extraction of common basis functions. In addition, the obtained modes can be used to identify key mechanisms of flow dynamics. It should be 22 noted that reacting-flow simulations are characterized by additional dimensionless parameters and linear mapping may not perform well when combustion is involved. Two computational challenges need to be addressed to implement this methodology. As previously mentioned, to calculate the inner product of the snapshots from different simulation cases, a common set of spatial grid points is needed. Not only does the inner product calculation become the computation bottle-neck, the number of modes required to capture a certain energy level is significantly increased relative to an individual simulation. The computation of CPOD modes and associated time-varying coefficients requires eigen-decomposition of a 𝑛𝑇 × 𝑛𝑇 matrix, where 𝑛 is the number of simulation cases and 𝑇 is the number of snapshots. This usually requires 𝑂(𝑛3 𝑇 3 ) computation work. An iterative method of eigen-decomposition based on periodic restarts of Arnoldi decompositions is then used to quickly calculate the first few eigenvectors with the largest eigenvalues. These eigenvalues can also be interpreted as the amount of the “energy” as defined by the inner product used to calculate the covariance matrix. For a particular reconstruction using a linear combination of POD modes and associated time-varying coefficients, there is reconstruction error, which decreases when more eigenvectors, the POD modes, are included. Next, a kriging model is applied to the CPOD time-varying coefficients 𝛽𝑘 (𝒄𝑖 , 𝑡). Kriging is a powerful machine-learning tool which, using function values sampled at a set of input parameters, can approximate well the entire function surface over its 23 domain. The driving force behind kriging is the usage of a GP governed by a preset covariance function. With appropriately chosen parameters, the kriging model provides the best linear unbiased estimator of the responses at designs that have not been simulated [10]. Furthermore, the resulting posterior distribution of this prediction will also be Gaussian. With the mean and variance computable in closed form, uncertainty quantification and confidence intervals can be calculated easily. Kriging (and more generally, GP-based learning) has been applied to great success in a variety of fields [42]. The mathematical approach of kriging is described here. For notational simplicity, let 𝛽(𝒄) denote 𝛽𝑘 (𝒄, 𝑡), the 𝑘-th CPOD coefficient at setting 𝒄 and time-step 𝑡. As the temporal resolution is fine, there is no practical need to estimate temporal correlations, especially because predictions will not be made in between time-steps. This timeindependent emulator uses independent kriging models at each instant of time, assuming the following GP model: 𝛽(𝒄) = 𝜇 + 𝑍(𝒄), 𝑍(𝒄)~𝑁{0, 𝜎 2 𝑅(⋅,⋅)} (13) Here, 𝜇 is the mean, 𝑍(𝒄) is a zero-mean GP with variance 𝜎 2 , and 𝑅(⋅,⋅) is a prespecified correlation function governed by unknown parameters 𝜂′𝑠. A typical choice for 𝑅(⋅,⋅) is the so-called Gaussian correlation function: 𝑝 2 𝑅(𝒄𝑖 , 𝒄𝑗 ) = exp [− ∑ 𝜂𝑘 (𝑐𝑖𝑘 − 𝑐𝑗𝑘 ) ] 𝑘=1 where 𝑝 is the number of input parameters. 24 (14) Now, suppose the function values 𝜷(𝑛) = [𝛽(𝒄𝑖 )]𝑛𝑖=1 are observed at input settings {𝒄𝑖 }𝑛𝑖=1, and let 𝒄𝑛𝑒𝑤 be a new setting for which prediction is desired. Conditional on the observed values 𝜷(𝑛) , the best linear unbiased estimator of 𝛽(𝒄𝑛𝑒𝑤 ) can be shown to be [10]: 𝛽̂ (𝒄𝑛𝑒𝑤 ) = 𝜇 + 𝒓𝑇𝑛𝑒𝑤 𝑹−1 (𝜷(𝑛) − 𝜇𝟏) (15) Here, 𝟏 is the 𝑛 x 1 vector of ones, 𝑟𝑛𝑒𝑤 = [𝑅(𝒄𝑖 , 𝒄𝑛𝑒𝑤 )]𝑛𝑖=1 is the 𝑛 x 1 vector of correlations between the new point and sampled points, and 𝑹 = [𝑅(𝒄𝑖 , 𝒄𝑗 )] 𝑛 𝑛 𝑖=1𝑗=1 is the covariance matrix for the sampled points. It can be shown that such a predictor minimizes the mean-squared prediction error (MSPE), a commonly-used criterion for prediction error. In the context of flowfield prediction, employing this kriging estimator allows us to obtain accurate flow predictions from the CPOD coefficients. It can also be shown [10] that this best MSPE predictor is unbiased, matching the expected and true function value. To close the formulations, the model parameters 𝜇, 𝜎 2 and 𝜂 need to be trained using data. A technique called maximum likelihood estimation (MLE), a ubiquitous estimation technique in statistical literature [43], is employed. The key idea in MLE is to search for the optimal parameter setting that minimizes the likelihood function of the GP model. In the present work, optimization is achieved by means of the L-BFGS algorithm [44], a method employed for many training algorithms. A more detailed explanation can be found in Santner et al. [10]. 25 The kriging models are trained independently over each time step, due to the inherent fine-scale temporal resolution of the simulation. This time-independence assumption is made for two reasons. First, the fully developed flow is treated as statistically stationary and has high frequency resolution, so there is no practical value for estimating temporal correlations. Second, as in the high-fidelity simulation procedure, the assumption of time-independence allows exploitation of parallel computation in training the emulator model. Once the model is trained, the predictor is used with the CPOD expansion to predict the flow evolution at a new design point, i.e., 𝐾 𝑓̂(𝒙, 𝑡; 𝒄𝑛𝑒𝑤 ) = ∑ 𝛽̂𝑘 (𝒄𝑛𝑒𝑤 , 𝑡)ℳ𝑖 {𝜙𝑘 (𝒙)} (16) 𝑘=1 It is worth noting that the computation time of the proposed model is orders of magnitude smaller than that of LES. Simulation data that typically takes a week, or around 30,000 CPU hours to simulate, can be predicted by the model with an associated uncertainty in a manner of tens of minutes. The full emulator model and algorithm are provided in the complementary statistical paper [23], which considers the statistical properties of a broader class of models. The current paper focuses on applying new machine-learning techniques and investigates the practical performance of the emulator with respect to flow physics. 26 3. Results and Discussion 3.1. Sensitivity of injector geometrical parameters Liquid-film thickness and spreading angle are two important injector characteristics. Inviscid, incompressible flow theory predicts the spreading angle as a function solely of the geometric constant [24, 45], and it increases with increasing geometric constant. For real fluids at supercritical conditions as treated in the present study, the density gradient represents the transition region [25, 26]. The spreading angle can be determined based on the slope of the maximum density gradient near the injector exit. The film thickness is measured by its radial position. To gauge the importance of each injector parameter on the liquid-film thickness and spreading angle, a sensitivity analysis using a Monte Carlo estimate of Sobol’ indices was performed [32]. Figure 7 shows the primary effects from this sensitivity analysis. The points indicate the Sobol’ index estimate for each design parameter, with lines indicating the Monte Carlo integration error for each index estimate. The lines were calculated based on a 95% confidence interval of the estimate. The slot width (𝛿) is found to be the parameter with the largest Sobol’ index and thus the strongest influence on the spreading angle. Physically, this can be explained by how geometric parameters govern the inlet flow properties. Assuming a constant mass flow rate, the incoming velocity is directly proportional to the slot width, and a decrease in slot width increases liquid-film momentum, which gives the liquid film increased momentum. 27 Similarly, the tangential inlet angle (𝜃) and the slot width significantly affect the liquid-film thickness, while the length (𝐿) and radius (𝑅𝑛 ) of the injector have minor effects. The tangential inlet angle controls the direction of momentum. As the angle increases, more azimuthal momentum is imparted to the liquid film, increasing the spreading angle as the propellant expands radially downstream. The length and radius can dictate how much viscous loss is experienced by the propellant, as it travels in both the axial and azimuthal directions. The present study, however, has shown viscous losses to be a minor effect. - Significant/minor effect Film Thickness Response Spreading Angle Response Sobol’ Index 1.0 0.8 1.0 main effect total effect 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0.0 0.0 main effect total effect Figure 7. Sensitivity analysis of liquid-film thickness and spreading angle. Figure 8 shows the two-factor interaction effects. It further demonstrates that the main design parameters are the slot width and the tangential inlet angle, which couple to affect the liquid-film response. This is hardly surprising, as slot width and inlet angle 28 govern flow area and direction of momentum, respectively. The mass and momentum conservation equations are inherently coupled to govern the flowfield. Interaction Effects for Spreading Angle Response Interaction Effects for Film Thickness Response Sobol’ Index 1.0 0.8 0.6 0.4 0.2 0.0 Figure 8. Two-factor interaction of liquid-film thickness and spreading angle. As previously mentioned, the empirical geometric constant for a swirl injector can be employed to estimate the film thickness and spreading angle, using the hydrodynamics theories described by Bazarov and Yang [24, 45]. These theories, however, are based on the assumption of incompressible, inviscid flows and can only be used as a preliminary guide. In real injectors, viscous and compressibility effects must be considered. The liquid viscosity results in boundary layer formation along the walls, causing spatially non-uniform velocity profiles. A primary effect of compressibility lies in the existence of acoustic waves [26, 46]. The supercritical conditions within high pressure systems make these effects even more pronounced. High-fidelity simulations taking into account realfluid effects are required to address these issues [26, 31, 46]. 29 3.2. Decision tree exploration of injector design space With further examination of the simulated design points, there is a clear distinction between two types of underlying physics. One type is the expected swirling film that noticeably spreads radially upon exiting the injector. The other type is a jet-like behavior of the liquid film where the radial spreading is weak. The DoE methodology utilizes space-filling properties such that design points in both regimes are simulated. This section explores how to efficiently incorporate this information into the CPOD methodology to refine prediction results. Design A and B (geometric parameters are listed in Table 2) are each chosen as baseline geometry for determining off-design points. By offsetting injector parameters, two benchmark design points are obtained (denoted as red points in Figure 2). Design A is classified with swirling behavior. Although design B is classified with jet-like behavior in its developing stage, the flowfield transitions to a swirling flow in its stationary state. This trend may be an indicator of Design B being near the jet-swirl regime boundary. A full design trade-off study requires quantifying how every parameter affects key performance metrics. Hence, all injector variables are retained for the first benchmark, Benchmark E. The second benchmark, Benchmark F, only varies design parameters with significant effects on the liquid-film response. The corresponding geometries are shown in Table 3. For Benchmark E, each design parameter has a +10% deviation away from 30 those of Design A. With normalized parameters, the distance traversed in the design space is estimated to be about 18.1%, as calculated in the 𝐿2 linear sense. Table 3. Injector geometries for benchmark cases. Benchmark E Benchmark F 𝐿 22.0 mm 37.7 mm 𝑅𝑛 3.22 mm 3.06 mm 𝜃 58.2° 59.0° 𝛿 0.576 mm 1.417 mm Δ𝐿 3.42 mm 1.00 mm The sensitivity study showed that the injector radius and the injection location have less of an effect than the slot width and tangential inlet angle on the film thickness and spreading angle. They are thus fixed, and the other three parameters are offset from Design B by -10% to explore the design space at Benchmark F. The closest two simulation points are Designs C and D. The neighboring points are provided because Design B seems to be near the jet-swirl dichotomy. The second component of the data-driven framework for the design survey is a decision tree [37]. Figure 9 shows the decision-tree splitting process, indicating how the algorithm decides the way an injector parameter dictates whether the flow is jet-like or swirling. The initial decision between the two behaviors is achieved by assessing the extent to which the liquid film spreads radially from the injector exit. The numeric outputs are essentially binary flags between the two subgroup classifications. Intuitively, when the tangential inlet angle, 𝜃, is smaller, there is less azimuthal momentum in the liquid film to cause radial spreading. When the injector inlet, 𝛿, becomes large, the decreased momentum results in jet-like behavior. The decision tree quantifies these 31 effects and predicts a jet-like injector with 𝜃 < 60.02° and 𝛿 > 1.40 mm. Following the previous two criteria, if the tangential inlet angle is large enough, that is, 𝜃 > 49.24°, the injector retains swirling behavior. The two benchmark cases are used to verify the decision tree. With such an algorithm, simulation results can be predicted using the model with proper training data. As the next section will further detail, the emulator relies upon the set of common basis functions extracted from the dataset. With two types of underlying coherent structures, the two datasets should be trained separately to predict design parameter sets that lead to their corresponding flow behavior. swirl mm mm jet jet jet swirl swirl swirl jet Figure 9. Decision tree splitting process with numeric classifiers. 3.3. Surrogate Model In order to train an emulator and make predictions, a set of common basis functions must be utilized as previously mentioned. Figure 10 shows the process of the common grid generation. The red lines partition the axisymmetric domain for each case into five regions: injector headend region, injector interior, and three subregions downstream of 32 the injector. The densest grid system among the 30 training cases is selected as the common grid, upon which the partitioned regions for all other cases are then scaled to the corresponding regions in the common grid. Moreover, the original data is interpolated with an inverse distance weighting interpolation method using the ten nearest neighborhood points. The results on the common grid are used for POD analysis. design point 2 design point 1 design point 30 common grid Figure 10. Schematic of common grid generation process. Figure 11 shows the energy spectrum of the azimuthal velocity captured by the CPOD analysis. 45 CPOD modes are required to retain 99% of the energy and limit the corresponding truncation error for the reconstruction. The leading two modes are presented in Figure 12, both indicating swirling flow structures with dominant fluctuations near the injector wall. The flow evolution within the injector and subsequent liquid-film development downstream of the exit are clearly observed. 33 Figure 11. Energy spectrum of CPOD modes for azimuthal velocity component. Figure 12. First two CPOD modes of azimuthal velocity. The kriging of time-varying coefficients combined with the CPOD modes allows for emulation of the spatio-temporal evolving flow at a new design point. The CPOD modes represent the common physics extracted from the training dataset and we assume that the new injector geometry contains similar physics, and thus a similar POD deconstruction. Figure 13 shows a comparison of the simulation and emulation results, an instantaneous temperature distribution snapshot, of Benchmark E (𝐿 = 22.0 𝑚𝑚, 34 𝑅𝑛 = 3.22 𝑚𝑚 , 𝜃 = 58.2° , 𝛿 = 0.576 𝑚𝑚 , and Δ𝐿 = 3.42 𝑚𝑚 ). Good agreement is obtained, illustrating the same qualitative trends for the flow structures, with liquid film along the injector wall and a center recirculating flow downstream of injector. The POD analysis can be interpreted as a spatial averaging technique using the covariance matrix of the flow variable of interest. Some flow details, such as the surface wave propagation of the liquid film, may be smoothed out due to averaging. This concern, however, can be addressed effectively using the aforementioned statistical and optimization algorithms to tune GP model parameters. The resultant emulator model thus mitigates the smoothing effects and captures the flow structures well. Figure 13. Comparison of instantaneous temperature distributions for Benchmark E. 3.4. Response Performance Metrics As a preliminary comparison, a kriging surrogate model was applied to the extracted liquid-film thickness and spreading angle at the injector exit. The training process was implemented for the 30-case dataset. The following discussion is based on benchmark E: a swirl case. The liquid-film thickness is estimated, based on hydrodynamics theories, to 35 be 0.618 mm, and the spreading angle 91.8°. The point-wise scalar emulator predicts a liquid-film thickness of 0.520 mm and a spreading angle of 99.0°. The data are compared with the simulation results of 0.430 mm and 103°, respectively. Figure 14 shows the variation of the film thickness along the injector wall. Figure 14. Comparison of mean liquid-film thickness along axial distance. The average error is 6.74%. At the injector exit, the extracted scalar prediction results achieve a 20.9% error for the liquid-film thickness and a 3.88% error for the spreading angle. The time-average predicted film thickness and spreading angle obtained were 0.420 mm and 107 ° , corresponding to percentage errors of 2.38% and 3.88% respectively. The spreading angle prediction improved by a percentage for this geometry. The model matches the simulation in terms of key features such as the liquidfilm location/thickness and spreading angle, performance measures needed for an injector design trade-off study. In addition, this reduced basis model is able to capture the flow evolution. For Benchmark F, the baseline case (Design B) develops from a jet-like behavior into a swirling behavior, as shown in Figure 15. The implication is that its design parameters are near a critical hyperplane separating jet-like and swirling flow. 36 Figure 15. Baseline case for benchmark F. a) Swirl-like case b) Jet-like case Figure 16. Mean temperature distributions for benchmark cases a) swirl-like case and b) jet-like case. 37 Figure 16 shows the mean temperature distributions for the two benchmark cases. The figure a) shows emulation (top) and simulation (bottom) for benchmark E, which produces a swirling flow. The accumulation of liquid propellant at the injector headend is observed in both results, although the prediction worsens in the upstream section relative to the downstream. The downstream liquid-film thickness and spreading angle match well. Figure b) shows Benchmark F, which produces a jet-like flow. A standing wave appears in the upstream portion of the injector for this case. The emulation result captures the wavy structure only to some extent, but the downstream flow structures, for liquid-film thickness and spreading angle, are better predicted. In the region where the film breaks apart, less propellant appears in the simulation result. 3.5. Root Mean Square Relative Error The root mean square relative error (RMSRE) as defined by 𝑅𝑀𝑆𝑅𝐸(𝑡; 𝑆) = 2 [∫𝑆 {𝑓(𝒙, 𝑡; 𝒄𝑛𝑒𝑤 ) − 𝑓̂(𝒙, 𝑡; 𝒄𝑛𝑒𝑤 )} 𝑑𝒙/|𝑆| ]1/2 max(𝑓(𝒙, 𝑡; 𝒄𝑛𝑒𝑤 )) − min(𝑓(𝒙, 𝑡; 𝒄𝑛𝑒𝑤 )) × 100%, (17) where 𝑆 is the desired region, |𝑆| is the number of gridpoints under 𝑆, 𝑓(𝒙, 𝑡; 𝒄𝑛𝑒𝑤 ) is the simulated flowfield at geometry 𝒄𝑛𝑒𝑤 , 𝑓̂(𝒙, 𝑡; 𝒄𝑛𝑒𝑤 ) is the emulated flowfield, and max(𝑓(𝒙, 𝑡; 𝒄𝑛𝑒𝑤 )) and min(𝑓(𝒙, 𝑡; 𝒄𝑛𝑒𝑤 )) are the maximum and minimum values of 𝑓(𝒙, 𝑡; 𝒄𝑛𝑒𝑤 ) over 𝒙, respectively. 38 The numeric comparisons are tabulated in Table 4 as the RMSRE results. There are minor discrepancies near the injector wall, and the error is reduced with prediction results cut off at the injector exit. Table 4. RMSRE temperature distribution results. Benchmark Case E (swirl) F (jet) Overall 5.18% 8.65% Upstream 6.62% 8.30% Downstream 3.10% 9.03% Figure 17 shows the axial variation of the temperature distribution in the radial direction for Benchmark E. The mean flow development in the axial direction is captured as the transition region is matched. There is a deviation near the injector wall and the sharp temperature gradient experienced by the simulation result is smoothed by the emulator. Similar results are obtained for the Benchmark F, which are not shown here. 39 Figure 17. Axial variation of temperature distribution in radial direction. To reiterate the importance of the decision tree, a comparison is made with predictions from the emulator without dataset classification [23]. Although Benchmark E experiences marginal improvement, Benchmark F’s prediction is visibly enhanced. Table 5. RMSRE temperature distribution results (without dataset classification). Benchmark Case E (swirl) F (jet) Overall 5.93% 13.2% Upstream 6.70% 7.43% Downstream 5.09% 17.7% To demonstrate that the emulator is also capable of modeling other flowfield variables, predictions of the axial velocity are made. Figure 18 shows a contour plot comparison for Benchmark E. The recirculating gas core is observed, and the convection speeds 40 within the injector match. Both the gaseous core and the swirling film are predicted well, as axial velocity RMSRE results in Table 6 outperform temperature results. Figure 18. Mean axial velocity distribution for benchmark E. Table 6. RMSRE velocity distribution results. Benchmark Case E (swirl) F (jet) Overall 4.12% 3.97% Upstream 4.58% 4.71% Downstream 3.64% 2.85% Figure 19 shows the variation of the axial velocity distribution in the radial direction through the injector for Benchmark E. The mean flow development in the axial direction is captured as the transition region is matched. There is a deviation near the injector centerline and the sharp axial gradient experienced by the simulation result is smoothed by the emulator. Similar results are obtained for Benchmark F, which are not shown here. 41 Figure 19. Axial variation of velocity distribution in the radial direction. 3.6. Injector Dynamics The injector dynamics involved in this example problem cover a wide range of time and length scales. The rich set of physics can be quantified using a power spectral density (PSD) analysis. Figure 20 shows the position of the pressure probes within the fluid transition region used for the analysis. The probes are located near the film surface to capture the flow oscillations as the swirling fluid exits the injector. 42 Figure 20. Probe positions along liquid film surface. Injector dynamics involves downstream pressure fluctuations causing pressure drop oscillations across the liquid film, which in turn triggers mass flow rate variations. A spectral analysis can quantify these oscillations and capture the periodicity of the flow structures. Mathematically, the PSD can be interpreted as the Fourier transform of the autocorrelation function for a signal. The pressure PSDs were calculated for both the simulation and surrogate model results. Figure 21 shows the PSD results of probes 1, 3, 5 and 7; the frequency content is observed to be well quantified. 43 Figure 21. PSD results of pressure fluctuations for probes 1, 3, 5, and 7. The high-frequency modes with small wavelengths that are typically present in swirl injectors having a vortex chamber are not prominent. Most of the signal is comprised of low-frequency modes with long wavelengths that transmit through the liquid film and exit the injector. This is usually in the form of surface wave propagation of the film, a longitudinal hydrodynamic instability. Disturbances in the chamber can propagate back into the injector through this mechanism and induce pressure drop changes across the tangential inlets, which in turn produce a mass flow rate fluctuation [24, 45]. Downstream of the injector exit, the dynamics become more broadband and no 44 dominant oscillations can be found, due to the strong interactions between the shear layer and the recirculation zone generated from vortex breakdown. In addition, acoustic waves propagate, couple and interact with hydrodynamic waves, appearing as several different frequencies within the spectral content. The probes show similar dynamics in both the simulation and emulation results. This analysis is an indicator that the emulator is capable of modeling the periodic oscillations of the simulation results, properly demonstrating the flow dynamics. 3.7. Uncertainty Quantification The emulator model also allows for the quantification of predictive uncertainty. These uncertainties can then further be linked to a physical interpretation. As an example, the spatial UQ is shown in Figure 22, displaying the one-sided width of the 80% confidence interval (CI) of pressure and temperature (a derivation of this interval is found in [23]). The more uncertain areas in the temperature distribution correspond to the most dynamic sections of the transition region of the flowfield, where surface wave propagation is dominant. The downstream uncertainty is due to the recirculation caused by vortex breakdown. The pressure oscillations are more pronounced upstream, as shown through the UQ of the pressure distribution. 45 Figure 22. One-sided width of the 80% confidence interval for benchmark E: temperature and pressure predictions. 3.8. Computation Time Figure 23 presents the simulation and emulation timeline. The computation times are calculated based on performance on a parallelized system of 200 Intel Xeon E5-2603 1.80 GHz processors. A total of 900,000 CPU hours is required for the 30 GB dataset. CPOD extraction and parameter estimation for the model takes about 45 minutes. Design of Experiments Simulation of 30 base cases MaxPro design (Joseph et al., 2015) 10 mins ~ 6 weeks (6 days for 5 cases each on 200 CPUs) Proposed kriging model Simulation of a new case 6 days Surrogate model 45.22 mins Prediction of a new case 20.19 mins Figure 23. Simulation and emulation timeline. The parallelized flowfield predictions from the proposed model require around 30 CPU hours, significantly reducing the turn-around time as compared with LES 46 simulations requiring 30,000 CPU hours. This improved computational efficiency is crucial, as it enables quick turn-around times for design iterations. In comparison, the existing spatio-temporal emulators mentioned in the introduction require much more computation time to fit the underlying statistical model, because the training dataset of each simulation is too large to directly manipulate [17]. By carefully combining physical knowledge of the system with state-of-the-art machine learning techniques to make informed model assumptions, the proposed methodology offers an efficient strategy to survey the design space without the need for more expensive high-fidelity simulations. 4. Conclusion The present work develops an integrated framework that incorporates state-of-theart statistical methods, machine learning algorithms, and a physics-driven data reduction method to obtain a surrogate model over a broad range of design space. Taking a swirl injector as an example, the CPOD-based emulation framework is used to extract the flow physics, reduce the data, and build an efficient, physics-driven emulator. The key contributions are two-fold: the use of statistical and machine learning techniques to quantify the impact of design parameters on important flow physics, and the incorporation of such methods with physics-guided model assumptions to build an efficient surrogate model for flowfield prediction. A vital model assumption is that the CPOD, the common basis, accurately retains the rich set of physics over varying geometries. This model successfully captured the simulation results and fared better 47 than analytical estimations of the performance measures. The emulated flowfield is validated against the LES-simulated flowfield to demonstrate how the flow structures and injector characteristics are captured by the model. Moreover, this methodology significantly reduces the computational time required for surveying the design space for flow predictions. While the focus of the present paper is on a data-driven analysis and emulation of a swirl injector, the principle of applying machine learning techniques with physics-guided assumptions can be applied to any type of system model. For future work, additional investigation should be carried out in dynamic regions of the flowfield, where the surrogate model had higher predictive uncertainties. One potential cause is the extreme range of the design points; this can be addressed by setting a smaller range. The uncertainty quantification and propagation of underlying flow couplings [47] are also important research directions, and can perhaps be tackled using techniques such as support points [48]. Another interesting path would be to improve the MaxPro methodology with minimax coverage [49]. Although the smoothing effect from CPOD-based emulation appears to be mitigated with proper parameter tuning, the extension of the decision tree to automatically determine the optimal basis functions for a prediction, such as hierarchical clustering [50], could significantly improve the methodology’s capability of surveying large design spaces. From an implementation point of view, another hurdle is computational efficiency, where the use of local Gaussian Process models [51] appear to be an attractive option. 48 Acknowledgement This work was sponsored partly by the William R. T. Oakes Endowment and partly by the Coca-Cola Endowment of the Georgia Institute of Technology. References [1] T.C. Lieuwen, V. Yang, Combustion Instabilities in Gas Turbine Engines: Operational Experience, Fundamental Mechanisms and Modeling, Progress in Astronautics and Aeronautics, Vol. 210 (2005). [2] T.C. Lieuwen, V. Yang, Gas Turbine Emissions, Cambridge University Press, Cambridge, England, U.K. (2013) [3] V. Yang, T.B. Brill, W.-Z. Ren, Solid Propellant Chemistry Combustion and Motor Interior Ballistics, Progress in Astronautics and Aeronautics, Vol. 185, (2000). [4] V. Yang, M. Habiballah, J. Hulka, M. Popp, Liquid Rocket Thrust Chambers: Aspects of Modeling, Analysis, and Design, Progress in Astronautics and Aeronautics, Vol. 200, (2004). [5] J. O’Connor, V. Acharya, and T.C. Lieuwen. Transverse Combustion Instabilities: Acoustic, Fluid Mechanic, and Flame Processes. Progress in Energy and Combustion Science 49 (2015) 1–39. [6] S. Gröning, J.S. Hardi, D. Suslov, M. Oschwald, Injector-Driven Combustion Instabilities in a Hydrogen/Oxygen Rocket Combustor, Journal of Propulsion and Power, 32 (2016) 560-573. [7] Y. Huang, V. Yang, Dynamics and Stability of Lean-premixed Swirl-stabilized Combustion, Progress in Energy and Combustion Science, 35 (2009) 293-364. [8] X. Wang, V. Yang, Supercritical Mixing and Combustion of Liquid-Oxygen/ Kerosene Bi-Swirl Injectors, Journal of Propulsion and Power, 33 (2017) 316-322. [9] T. Poinsot, D. Veynante, Theoretical and Numerical Combustion. RT Edwards, Inc., (2005). [10] T.J. Santner, B.J. Williams, W.I. Notz, The Design and Analysis of Computer Experiments, Springer Science & Business Media, New York, U.S.A. (2013). [11] J.L. Loeppky, J. Sacks, W.J. Welch, Choosing the Sample Size of a Computer Experiment: A Practical Guide, Technometrics, 51 (2009) 366-376. [12] G. Matheron, Principles of Geostatistics, Economic Geology, 58 (1963) 1246-1266. [13] B. Williams, D. Higdon, J. Gattiker, L. Moore, M. McKay, S. Keller-McNulty, Combining Experimental Data and Computer Simulations, with an Application to Flyer Plate Experiments, Bayesian Analysis, 1 (2006) 765-792. 49 [14] J. Rougier, Efficient Emulators for Multivariate Deterministic Functions, Journal of Computational and Graphical Statistics, 17 (2008) 827-843. [15] Y. Hung, V.R. Joseph, S.N. Melkote, Analysis of Computer Experiments with Functional Response, Technometrics, 57 (2015) 35-44. [16] P.Z.G. Qian, H. Wu, C.J. Wu, Gaussian Process Models for Computer Experiments with Qualitative and Quantitative Factors, Technometrics, 50 (2008) 383-396. [17] Q. Zhou, P.Z. Qian, S. Zhou, A Simple Approach to Emulation for Computer Models with Qualitative and Quantitative Factors, Technometrics, 53 (2011) 266-273. [18] M. Bayarri, J. Berger, J. Cafeo, G. Garcia-Donato, F. Liu, J. Palomo, R. Parthasarathy, R. Paulo, J. Sacks, D. Walsh, Computer Model Validation with Functional Output, The Annals of Statistics, (2007) 1874-1906. [19] S. Banerjee, A.E. Gelfand, A.O. Finley, H. Sang, Gaussian Predictive Process Models for Large Spatial Data Sets, Journal of the Royal Statistical Society: Series B (Statistical Methodology), 70 (2008) 825-848. [20] J.L. Lumley, The Structure of Inhomogeneous Turbulent Flows, Atmospheric Turbulence and Radio Wave Propagation, 790 (1967) 166-178. [21] M. Loève, Probability Theory: Foundations, Random Sequences, van Nostrand Princeton, NJ, 1955. [22] D. Higdon, J. Gattiker, B. Williams, M. Rightley, Computer Model Calibration using High-dimensional Output, Journal of the American Statistical Association, 103 (2008) 570-583. [23] S. Mak, C.-L. Sung, X. Wang, S.-T. Yeh, Y.-H. Chang, V.R. Joseph, V. Yang, C. F.J. Wu, An Efficient Surrogate Model for Emulation and Physics Extraction of Large Eddy Simulations, Journal of American Statistical Association, (2017). [24] V.G. Bazarov, V. Yang, Liquid-propellant Rocket Engine Injector Dynamics, Journal of Propulsion and Power, 14 (1998) 797-806. [25] X. Wang, Y. Wang, V. Yang, Geometric Effects on Liquid Oxygen/Kerosene Bi-Swirl Injector Flow Dynamics at Supercritical Conditions, AIAA Journal, Accepted (2017). [26] N. Zong, V. Yang, Cryogenic Fluid Dynamics of Pressure Swirl Injectors at Supercritical Conditions, Physics of Fluids, 20 (2008) 056103. [27] V.R. Joseph, E. Gul, S. Ba, Maximum Projection Designs for Computer Experiments, Biometrika, 102 (2015) 371-380. [28] J.C. Oefelein, V. Yang, Modeling High-pressure Mixing and Combustion Processes in Liquid Rocket Engines, Journal of Propulsion and Power, 14 (1998) 843-857. [29] V. Yang, Modeling of Supercritical Vaporization, Mixing, and Combustion Processes in Liquid-fueled Propulsion Systems, Proceedings of the Combustion Institute, 28 (2000) 925-942. [30] H. Huo, X. Wang, V. Yang, A General Study of Counterflow Diffusion Flames at Subcritical and Supercritical Conditions: Oxygen/hydrogen Mixtures, Combustion and Flame, (2014). 50 [31] H. Meng, V. Yang, A Unified Treatment of General Fluid Thermodynamics and its Application to a Preconditioning Scheme, Journal of Computational Physics, 189 (2003) 277-304. [32] I.M. Sobol', Global Sensitivity Indices for Nonlinear Mathematical Models and their Monte Carlo estimates, Mathematics and Computers in Simulation, 55 (2001) 271-280. [33] C.J. Wu, M.S. Hamada, Experiments: Planning, Analysis, and Optimization, John Wiley & Sons, New York, U.S.A. (2011). [34] I.y.M. Sobol', Distribution of Points in a Cube and Integration Nets, Uspekhi Matematicheskikh Nauk, 21 (1966) 271-272. [35] P. Geurts, A. Irrthum, L. Wehenkel, Supervised Learning with Decision tree-based Methods in Computational and Systems Biology, Molecular Biosystems, 5 (2009) 15931605. [36] H. Blockeel, L. Schietgat, J. Struyf, S. Džeroski, A. Clare, Decision Trees for Hierarchical Multilabel Classification: A Case Study in Functional Genomics, in: European Conference on Principles of Data Mining and Knowledge Discovery, Springer, Berlin, Germany (2006) pp. 18-29. [37] J. Friedman, T. Hastie, R. Tibshirani, The Elements of Statistical Learning, Springer Series in Statistics Springer, Berlin, (2001). [38] L. Breiman, J. Friedman, C.J. Stone, R.A. Olshen, Classification and Regression Trees, CRC Press, London, England, U.K. (1984). [39] M. Xiao, P. Breitkopf, R. Filomeno Coelho, C. Knopf-Lenoir, M. Sidorkiewicz, P. Villon, Model Reduction by CPOD and Kriging, Structural and Multidisciplinary Optimization, 41 (2010) 555-574. [40] V.R. Joseph, L. Kang, Regression-based Inverse Distance Weighting with Applications to Computer Experiments, Technometrics, 53 (2011) 254-265. [41] C. E. Dexter, M. F. Fisher, J. Hulka, K. P. Denisov, A. A. Shibanov, and A. F. Agarkov, Scaling Techniques for Design, Development, and Test, Progress in Astronautics and Aeronautics, Vol. 200, (2004), Chapter 16, pp. 553-600. [42] C.E. Rasmussen, Gaussian Processes for Machine Learning, (2006). [43] G. Casella, R.L. Berger, Statistical Inference, Duxbury, Pacific Grove, CA, (2002). [44] D.C. Liu, J. Nocedal, On the Limited Memory BFGS Method for Large Scale Optimization, Mathematical Programming, 45 (1989) 503-528. [45] V. Bazarov, V. Yang, P. Puri, Design and Dynamics of Jet and Swirl injectors, Progress in Astronautics and Aeronautics, Vol. 200 (2004), Chapter 2, pp. 19-103. [46] X. Wang, H. Huo, Y. Wang, V. Yang, Comprehensive Study of Cryogenic Fluid Dynamics of Swirl Injectors at Supercritical Conditions, AIAA Journal (2017). [47] S. Mak, D. Bingham, Y. Lu. A Regional Compound Poisson Process for Hurricane and Tropical Storm Damage, Journal of the Royal Statistical Society: Series C, 65 (2016) pp. 677-703. [48] S. Mak, V.R. Joseph, Support Points, arXiv preprint arXiv:1609.01811, (2016). 51 [49] S. Mak, V.R. Joseph, Minimax and Minimax Projection Designs using Clustering, Journal of Computational and Graphical Statistics, (2017). [50] Z. Zhang, K. Duraisamy, N.A. Gumerov, Efficient Multiscale Gaussian Process Regression using Hierarchical Clustering, arXiv preprint arXiv:1511.02258, (2015). [51] C.-L. Sung, R.B. Gramacy, B. Haaland, Potentially Predictive Variance Reducing Subsample Locations in Local Gaussian Process Regression, arXiv preprint arXiv:1604.04980, (2016). 52
5cs.CE
1 Analog to Digital Cognitive Radio: Sampling, Detection and Hardware arXiv:1708.05201v1 [cs.CE] 17 Aug 2017 Deborah Cohen, Shahar Tsiper, Yonina C. Eldar Technion – Israel Institute of Technology, Haifa, Israel {debby@tx, tsiper@tx, yonina@ee}.technion.ac.il I. I NTRODUCTION The radio spectrum is the radio frequency (RF) portion of the electromagnetic spectrum. These spectral resources are traditionally allocated to licensed or primary users (PUs) by governmental organizations. As can be observed in “RF Spectral Resources”, most of the frequency bands are already allocated to one or more PUs. Consequently, new users can hardly find free frequency bands. Following the ever-increasing demand from new wireless communication applications, this issue has become critical over the past few years. Various studies [1]–[3] have shown that this over-crowded spectrum is usually significantly underutilized in frequency, time and space. A 2002 FCC report shows large temporal and geographic variations in terms of the spectrum usage, from 15% to 85% utilization. Figure 1 presents the spectrum occupancy measurements conducted by the Shared Spectrum Company (SSC) in two major metropolitans, New York and Chicago. We observe that the occupancy of most frequency bands does not exceed 50%, and half of them are even below 10% [4]. This shows that spectrum shortage is often due to the inflexibility of the frequency allocation, resulting in low utilization efficiency. In order to bridge between spectrum scarcity and sparsity and make better use of spectral resources, the cognitive radio (CR) [6]–[8] paradigm has been proposed. The idea of adaptive learning for spectrum sensing can be traced back to Shannon [9]. This technology, which is under development, allows the spectrum to be used more efficiently by granting secondary users opportunistic access to licensed spectral bands when the corresponding PU is not active. A CR transceiver scans for unused bands and changes its transmission and reception parameters to different frequencies depending on the spectrum utilization. CR faces many issues at various levels, and challenges traditional analog, digital and network processing techniques to meet its specific radio sensitivity requirements and wideband frequency agility [10]. The CR cycle includes two major functionalities: spectrum sensing and spectrum access. Through spectrum sensing, CRs collect information about the status of the surrounding spectrum’s occupancy, that is the PUs’ activity, allowing for adapted exploitation of the vacant spectral bands. In order to minimize the interference caused to This work was funded by the European Union’s Horizon 2020 research and innovation program under grant no. 646804-ERC-COG-BNYQ, and by the Israel Science Foundation under grant no. 335/14. Fig. 1. Spectrum occupancy measurements in New York City, New York from Aug. 30th.-Sept. 3rd 2004 and Chicago, Illinois from Nov. 16th-18th 2005 (figure courtesy of SSC [5]). PUs, the spectrum sensing task performed by a CR should be reliable and fast [11]–[13] and obey the requirements of the IEEE 802.22 protocol, described in “IEEE 802.22 Standard for WRAN”. For the past ten years, CR and its challenges have been thoroughly reviewed in the literature. Several works [14]– [19] focus on spectrum sensing and survey sensing techniques, along with their performance and limitations. These techniques are essentially energy detection, matched filter and cyclostationary detection. Collaborative CR networks, where different users share their sensing results and cooperatively decide on the licensed spectrum occupancy, have also been proposed to overcome practical propagation issues such as path loss, channel fading and shadowing. Other works [17], [20] deal with spectrum access, which uses the information gathered from spectrum sensing to plan the spectrum exploitation by unlicensed users. This functionality includes spectrum analysis, spectrum access, and spectrum mobility [21]. It ensures coexistence with PUs and other CRs, by minimizing interference to the former and sharing spectrum with the latter. 2 In this article, we focus on the issue of spectrum sensing from the analog to digital interface point of view, which has received little attention so far. Our motivation stems from one of the main challenges of spectrum sensing in the context of CR, which is the sampling rate bottleneck. This issue arises since CRs typically deal with wideband signals with prohibitively high Nyquist rates. Sampling at this rate requires very sophisticated and expensive analog to digital converters (ADCs), leading to a torrent of samples. Therefore, the classic spectrum sensing methods described above, which are traditionally performed on Nyquist rate samples, are difficult to implement in practice on wideband signals. Our main goal is to provide an analog to digital CR framework including an analog preprocessing and sub-Nyquist sampling front-end, and subsequent low rate digital processing. We first survey recent methods for spectrum sensing at sub-Nyquist rates, paving the way to efficient sensing with low computational and power requirements. We then review spectrum sensing strategies that aim at overcoming other diverse challenges in the context of CR, such as coping with low signal to noise ratio (SNR) regimes, channel fading and shadowing effects. Throughout the paper, we consider both theoretical and practical aspects and present hardware implementation of theoretical concepts, demonstrating real-time wideband spectrum sensing for CR from low rate samples. II. CR CHALLENGES In this article, we focus on CR spectrum sensing. In practice, the information gathered from spectrum sensing is used to plan spectrum access by the unlicensed users. For completeness, we first quickly review the main components and challenges of spectrum access. Spectrum analysis or management, which directly follows spectrum sensing, ensures coexistence with PUs and other CRs. The ambient RF environment is analyzed in order to characterize the behavior of PUs and the properties of the detected spectrum holes in terms of interference, duration of availability and more. Then, spectrum access can be optimized to maximize the CR throughput while maintaining interference caused to the licensed users below a target threshold [20]. Several techniques have been proposed to minimize interference to PUs as well as ensure proper reception of secondary signals, such as waveform design and multi-carrier approaches [17], [20]. These are regrouped under the term of spectrum sculpting [17]. Besides minimizing interference to the PUs, spectrum sharing needs to be coordinated within the CR network. Various power control and resource allocation schemes that deal with this issue are reviewed in [16], [20]. Spectrum access further requires synchronization between the CR transmitter and receiver [20]. The function of spectrum mobility ensures adaptation to changes in the spectrum occupancy. When a licensed user starts accessing the channel currently being used by a CR, the latter has to vacate the band and switch to another free spectral band. This operation is referred to as hand-off [16], [20]. The multi-carrier transmission approach evoked above allows to maintain uninterrupted communication in such scenarios [17]. Additional issues of security against malicious users and various attacks to the network are discussed in [16], [19], [20]. We now focus on spectrum sensing, which is the fundamental enabler to spectrum access. In order to increase the chance of finding an unoccupied spectral band, CRs have to sense a wide band of spectrum. Nyquist rates of wideband signals are high and can even exceed today’s best ADCs frontend bandwidths. Besides, such high sampling rates generate a large number of samples to process, affecting speed and power consumption. To overcome the rate bottleneck, several sampling methods have been proposed that leverage the a priori known received signal’s structure, enabling sampling reduction. These include the random demodulator [22], [23], multi-rate sampling [24], multicoset sampling and the modulated wideband converter (MWC) [13], [25]–[27]. The CR then performs spectrum sensing on the acquired samples to detect the present of PUs’ transmissions. The simplest and most common spectrum sensing approach is energy detection [28], which does not require any a priori knowledge on the input signal. Unfortunately, energy detection is very sensitive to noise and performs poorly in low SNRs. This becomes even more critical in sub-Nyquist regimes since the sensitivity of energy detection is amplified due to aliasing of the noise [29]. Therefore, this scheme fails to meet CR performance requirements in low SNRs. In contrast, matched filter (MF) detection [30], [31], which correlates a known waveform with the input signal to detect the presence of a transmission, is the optimal linear filter for maximizing SNR in the presence of additive stochastic noise. However, this technique requires perfect knowledge of the potential received transmission. When no a priori knowledge can be assumed on the received signals’ waveform, MF is difficult to implement. A compromise between both methods is cyclostationary detection [32], [33]. This strategy is more robust to noise than energy detection but at the same time only assumes that the signal of interest exhibits cyclostationarity, which is a typical characteristic of communication signals. Consequently, cyclostationary detection is a natural candidate for spectrum sensing from sub-Nyquist samples in low SNRs. Besides noise, the task of spectrum sensing for CRs is further complicated as a result of path loss, fading and shadowing [34]–[36]. These phenomena are due to the signal’s propagation, that can be affected by obstacles and multipath, and result in the attenuation of the signal’s power. To overcome these practical issues, collaborative CR networks have been considered, where different users share their sensing results and cooperatively decide on the licensed spectrum occupancy. Cooperative spectrum sensing may be classified into three catagories based on the way the data is shared by the CRs in the network: centralized, distributed and relay-assisted. In each of these settings, two options of data fusion arise: decision fusion, or hard decision, where the CRs only report their binary local decisions, and measurement fusion, or soft decision, where they share their samples [34]. Cooperation has been shown to improve detection performance and relax sensitivity requirements by exploiting spatial diversity [36], [37]. At the medium access control (MAC) level, cooperation introduces the need for a tailored communication protocol and a control AD MINISTRATIO N NA OM TIONAL TELEC N U.S . E RC M UN IC RM ATIO NS & INF O TIO ENT OF CO MM RTM PA E DE A SERVICE EXAMPLE DESCRIPTION Primary ALLOCATION USAGE DESIGNATION FIXED Capital Letters Secondary This chart is a graphic single-point-in-time portrayal of the Table of Frequency Allocations used by the FCC and NTIA. As such, it does not completely reflect all aspects, i.e., footnotes and recent changes made to the Table of Frequency Allocations. Therefore, for complete information, users should consult the Table to determine the current status of U.S. allocations. Mobile 1st Capital with lower case letters U.S. DEPARTMENT OF COMMERCE ** EXCEPT AERO MOBILE 39.5 38.6 38.0 37.6 37.0 BAND DESIGNATIONS WAVELENGTH FREQUENCY 0 ACTIVITIES Infra-sonics 3 x 107m 10 Hz AMATEUR 3 x 106m 100 Hz 1 kHz National Telecommunications and Information Administration Office of Spectrum Management 3 kHz 3 x 105m VERY LOW FREQUENCY (VLF) Audible Range Sonics 30,000 m 10 kHz 30 GHz LF 100 kHz 3,000 m SPACE FIXED AM Broadcast Ultra-sonics MF 1 MHz 300 m channel [14], [15], which can be implemented as a dedicated frequency channel or as an underlay ultra-wideband (UWB) channel [10]. These CR communication challenges are outside the scope of this paper. Finally, CRs may require, or at least benefit from joint spectrum sensing and direction of arrival (DOA) estimation. DOA recovery enhances CR performance by allowing exploitation of vacant bands in space in addition to the frequency domain. For example, a spectral band occupied by a PU situated in a certain direction with respect to the CR, may be used by the latter for transmission to the opposite direction, where receivers do not sense the PU’s signal. In order to estimate jointly the carrier frequencies and DOAs of the received transmissions, arrays of sensors have been considered and DOA HF 10 MHz RADIOLOCATION 30 m FM Broadcast VHF 100 MHz 3m P MAGNIFIED ABOVE L 1 GHz UHF 30 cm S C MOBILE SATELLITE (E-S) FIXED SATELLITE (E-S) SHF X 10 GHz 3 cm Microwaves EHF Radar Radar Bands 100 GHz 0.3 cm 0.03 cm 1 THz 1013Hz Sub-Millimeter Infrared INFRARED 3 x 105Å RADIO ASTRONOMY 1014Hz RADIONAVIGATION SATELLITE RADIONAVIGATION 3 x 104Å MOBILE SATELLITE MOBILE VISIBLE Visible 3 x 103Å 1015Hz SPACE RESEARCH (Passive) FIXED SATELLITE (S-E) Radiolocation EARTH EXPL. SATELLITE (Passive) FIXED SATELLITE (E-S) 1016Hz 3 x 102Å ULTRAVIOLET 3 x 10Å 1017Hz EARTH EXPLORATION SATELLITE (Passive) SPACE RESEARCH (Passive) ISM – 61.25 ± .250 GHz 59-64 GHz IS DESIGNATED FOR UNLICENSED DEVICES RADIO ASTRONOMY 1018Hz 3Å Ultraviolet X-RAY 3 x 10 -1Å 1019Hz FIXED 3 x 10 -2Å 1020Hz MOBILE SATELLITE MOBILE Gamma-ray GAMMA-RAY X-ray 3 x 10 -3Å 3 x 10 -4Å 1021Hz 1022Hz 3 x 10 -5Å 1023Hz FIXED 3 x 10 -6Å 1024Hz ISM – 122.5 ± .500 GHz COSMIC-RAY 3 x 10 -7Å MOBILE FIXED SPACE RESEARCH (Passive) RADIO ASTRONOMY FIXED SATELLITE (S-E) Radiolocation RADIONAVIGATION MOBILE SATELLITE MOBILE ISM – 245.0 ± 1GHz MOBILE FIXED FIXED FIXED RADIORADIONAVIGATION ASTRONOMY SATELLITE ISM – 24.125 ± 0.125 GHz MOBILE FIXED SAT (E-S) INTERSATELLITE 30.0 ISM – 2450.0 ± 50 MHz MARITIME RADIONAVIGATION FIXED MOBILE SATELLITE (S-E) FX-SAT (S - E) Radiolocation AERONAUTICAL METEOROLOGICAL Radiolocation AIDS RADIONAVIGATION MOB** B- SAT. FX FX-SAT RADIO ASTRON. SPACE RESEARCH EARTH EXPL SAT E-Expl Sat Radio Ast Space res. BCST - SAT. MOBILE** RADIODETERMINATION SAT. (S-E) 3000 2900 2483.5 2500 2655 2690 2700 Mobile FIXED Radiolocation MOBILE Amateur Radiolocation Radiolocation FIXED 300 235.0 220.0 222.0 225.0 216.0 MARITIME MOBILE FIXED AMATEUR FIXED LAND MOBILE FIXED MOBILE AMATEUR SATELLITE Space Research STANDARD FREQ. LAND MOBILE MARITIME MOBILE LAND MOBILE FIXED MOBILE** RADIO ASTRONOMY BROADCASTING MARITIME MOBILE LAND MOBILE MOBILE** FIXED FIXED MOBILE** FIXED MOBILE** LAND MOBILE FIXED FIXED MOBILE AMATEUR STANDARD FREQ. AND TIME SIGNAL (25,000 kHz) AMATEUR SATELLITE MOBILE** FIXED Mobile* FIXED AERONAUTICAL MOBILE (OR) FIXED 29.7 29.8 29.89 29.91 30.0 25.01 25.07 25.21 25.33 25.55 25.67 26.1 26.175 26.48 26.95 26.96 27.23 27.41 27.54 28.0 24.89 24.99 25.005 22.855 23.0 23.2 23.35 TRAVELERS INFORMATION STATIONS (G) AT 1610 kHz 29.9 29.5 27.5 25.25 25.5 27.0 Radiolocation 2417 2450 2385 2390 2400 2360 Fixed LAND MOBILE AMATEUR FIXED MOBILE LAND MOBILE MARITIME MOBILE MARITIME MOBILE MARITIME MOBILE (TELEPHONY) MOBILE (DISTRESS AND CALLING) MARITIME MOBILE (TELEPHONY) Space Research STANDARD FREQ. AND TIME SIGNAL STANDARD FREQ. STANDARD FREQ. AND TIME SIGNAL (2500kHz) AERONAUTICAL MOBILE (R) MOBILE MOBILE SATELLITE (E-S) MOBILE Fixed R- LOC. B-SAT Amateur FIXED 2345 2290 2300 2305 2310 2320 2200 FIXED MARITIME MOBILE (TELEPHONY) 3000 2850 2502 2505 2501 2495 2170 2173.5 2190.5 2194 2107 2065 2000 3 kHz MOBILE FIXED FIXED AMATEUR AMATEUR FX BCST-SATELLITE RADIOLOCATION Radiolocation MOBILE MOBILE MOB Fixed Radiolocation Mobile Fixed Radiolocation MOBILE MARITIME RADIONAVIGATION (RADIO BEACONS) AERONAUTICAL RADIONAVIGATION Aeronautical Mobile AERONAUTICAL RADIONAVIGATION Aeronautical Radionavigation (Radio Beacons) Maritime Radionavigation (Radio Beacons) Aeronautical Mobile FIXED SATELLITE (E-S) MOBILE** SPACE EARTH OPERATION EXPLORATION (s-E)(s-s) SAT. (s-E)(s-s) FIXED Amateur SPACE RESEARCH (s-E)(s-s) MOBILE SATELLITE (S-E) MOBILE (LOS) 21.45 21.85 21.924 22.0 21.0 1900 1800 1705 1605 1615 AERONAUTICAL RADIONAVIGATION FIXED SATELLITE (E-S) MOBILE SATELLITE (E-S) 25.05 24.75 24.65 24.25 24.45 Mobile ISM – 40.68 ± .02 MHz FIXED Earth Exploration Satellite (S-S) Earth std Exploration freq e-e-sat (S-S) (s-s) &Satellite time e-e-sat F I XRADIOLOCATION E D (E-S) SATELLITE SATELLITE (E-S) MOBILE FIXED FIXED SATELLITE (E-S) INTER-SAT. MOBILE INTER-SAT. MOBILE MOBILE SATELLITE (E-S) INTER-SATELLITE RADIOLOCATION FIXED RADIONAVIGATION Earth Standard Exploration Frequency and Satellite Time Signal (S-S) F I X ESatellite (E-S) D INTER-SATELLITE Earth Expl. INTER-SATELLITE Satellite (Active) FIXED (LOS) SPACE RES..(S-E) Amateur RADIOLOCATION MOBILE** FIXED Radiolocation Mobile Fixed MOB FX R- LOC. B-SAT ISM – 13.560 ± .007 MHz 300.0 275.0 265.0 252.0 250.0 248.0 241.0 238.0 ISM – 5.8 ± .075 GHz Amateur 24.05 24.0 23.6 Mobile AMATEUR SATELLITE BROADCASTING FIXED AERONAUTICAL MOBILE (R) FIXED AMATEUR FIXED AMATEUR Radiolocation 2160 2180 2155 2110 2025 AMATEUR BROADCASTING RADIOLOCATION MOBILE EARTH EXPLORATION SATELLITE (Passive) EARTH EXPL. SAT. (Passive) MOBILE Amateur AMATEUR SATELLITE SPACE RES. (Passive) RADIOLOCATION ISM – 915.0 ± 13 MHz Amateur Satellite FIXED S) MOBILE 19.68 19.80 19.990 19.995 20.005 20.010 BROADCASTING LAND MOBILE AMATEUR SATELLITE Earth Expl. Satellite (Active) AMATEUR RADIO ASTRONOMY MOB. FX. MOBILE SPACE OP. (E-S)(s-s) FIXED Space Research MOBILE MARITIME MOBILE SPACE RES. (Passive) 235.0 231.0 217.0 FIXED FIXED SPACE RES. EARTH EXPL. (E-S)(s-s) SAT. (E-S)(s-s) STANDARD FREQ. STAND. FREQ. & TIME SIG. Space Research STANDARD FREQUENCY & TIME SIGNAL (20,000 KHZ) FIXED MARITIME MOBILE FIXED AERONAUTICAL MOBILE (R) AERONAUTICAL MOBILE (OR) FIXED AMATEUR AMATEUR SATELLITE Mobile FIXED MARITIME MOBILE BROADCASTING FIXED 17.9 17.97 18.03 18.068 18.168 18.78 18.9 19.02 17.41 17.48 17.55 16.36 FIXED MOBILE Radiolocation 23.55 22.55 BROADCASTING MARITIME MOBILE FIXED MOBILE EARTH EXPLORATION SATELLITE (Passive) EARTH EXPL. SAT. (Passive) INTER-SATELLITE FIXED 173.2 173.4 174.0 FIXED MARITIME MOBILE BROADCASTING 15.6 15.8 STANDARD FREQ. AND TIME SIGNAL (60 kHz) FIXED RADIOLOCATION RADIONAVIGATION FIXED SATELLITE (E-S) FIXED SATELLITE (S-E) MOBILE BROADCASTING (TV CHANNELS 7-13) FIXED SPACE RES. SATELLITE(S-E) (Passive) MOBILE FIXED Land Mobile MOBILE FIXED BROADCASTING BROADCASTING FIXED 14.990 15.005 15.010 15.10 RADIOLOCATION FIXED RES. 2020 2000 1850 1755 1710 FIXED 156.2475 157.0375 157.1875 157.45 161.575 161.625 161.775 162.0125 154.0 150.8 152.855 Mobile* FIXED MOBILE 202.0 200.0 MOBILE LAND MOBILE MARITIME MOBILE FIXED LAND MOBILE MARITIME MOBILE LAND MOBILE MARITIME MOBILE LAND MOBILE LAND MOBILE LAND MOBILE FIXED STANDARD FREQ. AND TIME SIGNAL (15,000 kHz) Space Research STANDARD FREQ. AERONAUTICAL MOBILE (OR) 13.2 13.26 13.36 13.41 13.57 13.6 13.8 13.87 14.0 14.25 14.35 RADIONAVIGATION Radiolocation MARITIME MOBILE MOBILE EARTH EXPLORATION SAT. (Passive) MOBILE MOBILE MOBILE 1700 1675 1670 1660 1660.5 1668.4 MARITIME MOBILE MARITIME MOBILE LAND MOBILE 144.0 146.0 148.0 149.9 150.05 BROADCASTING BROADCASTING Mobile* FIXED AMATEUR AMATEUR SATELLITE AMATEUR FIXED MARITIME MOBILE FIXED MOBILE SATELLITE FIXED MOBILE SATELLITE (E-S) FIXED FIXED FIXED FIXED METEOROLOGICAL AIDS (Radiosonde) FIXED FIXED FIXED MOBILE AMATEUR SATELLITE AMATEUR MOBILE FIXED MOBILE SATELLITE (E-S) MOBILE 137.0 137.025 137.175 137.825 138.0 FIXED FIXED RADIONAVIGATION SATELLITE SPACE RES. (Passive) 21.4 22.0 22.21 22.5 20.1 20.2 21.2 19.3 19.7 MOBILE SAT. (E-S) METEOROLOGICAL AIDS (RADIOSONDE) SPACE RESEARCH (Passive) FIXED MOBILE FIXED SATELLITE (S-E) FIXED FIXED SATELLITE (S-E) MOBILE SAT. (S-E) FIXED SATELLITE (S-E) FX SAT (S-E) MOBILE SATELLITE (S-E) FXFIXED SAT (S-E) MOBILE SAT (S-E) F I X E D MOBILE EARTH EXPL. SAT. FIXED MOBILE MOBILE** FIXED S P A C E R A D . A S T MOBILE** F I X E D EARTH EXPL. SAT. MOBILE** METEOROLOGICAL SATELLITE (s-E) FIXED AMATEUR RADIONAV-SATELLITE MOBILE SATELLITE (E-S) MET. SAT. (S-E) MET. SAT. (S-E) MET. SAT. (S-E) MET. SAT. (S-E) 12.23 MOBILE SPACE RES. STD FREQ. & TIME RADIO ASTRONOMY RADIO ASTRONOMY RADIO ASTRONOMY 1558.5 1559 1610 1610.6 1613.8 1626.5 1549.5 1545 1544 1535 1530 SPACE OPN. (S-E) SPACE OPN. (S-E) SPACE OPN. (S-E) SPACE OPN. (S-E) Mobile* 12.10 12.05 MARITIME MOBILE FIXED 190.0 17.2 17.3 17.7 17.8 18.3 18.6 18.8 17.1 15.63 15.7 16.6 MET. SAT. (s-E) 185.0 Radioloc. Radiolocation FIXED FIXED SATELLITE (S-E) FIXED FIXED SATELLITE (S-E) FX SAT (S-E) EARTH EXPL. SAT. SPACE RES. Fixed INTERSATELLITE Radiolocation Radiolocation Radiolocation RADIOLOC. FX SAT (E-S) Space Res. FIXED SATELLITE (E-S) MOBILE SATELLITE (E-S) AERONAUTICAL RADIONAVIGATION RADIONAV. SATELLITE (Space to Earth) AERO. RADIONAVIGATION RADIO DET. SAT. (E-S) M O B I L E S A T ( E - S ) AERO. RADIONAV. RADIO DET. SAT. (E-S) MOBILE SAT. (E-S) RADIO ASTRONOMY Mobile Sat. (S-E) AERO. RADIONAV. RADIO DET. SAT. (E-S) MOBILE SAT. (E-S) AERONAUTICAL MOBILE SATELLITE (R) (space to Earth) MOBILE SATELLITE (Space to Earth) Mobile Satellite (S- E) SPACE RES. (S-E) SPACE RES. (S-E) SPACE RES. (S-E) SPACE RES. (S-E) FIXED MARITIME MOBILE AERONAUTICAL MOBILE (R) RADIOASTRONOMY FIXED BROADCASTING FIXED AERONAUTICAL MOBILE (OR) FIXED MOBILE EARTH SPACE RESEARCH EXPLORATION (Passive) SATELLITE (Passive) FIXED SAT (E-S) AERONAUTICAL RADIONAVIGATION AERO RADIONAV BCST SAT. Earth Expl Sat RADIOLOCATION RADIOLOCATION Space Res.(act.) RADIOLOCATION 15.4 15.43 15.35 15.1365 AERONAUTICAL MOBILE SATELLITE (R) (space to Earth) AERONAUTICAL MOBILE SATELLITE (R) (space to Earth) MOBILE SATELLITE (S-E) MOBILE SAT. MARITIME MOBILE SAT. (Space to Earth) (Space to Earth) MARITIME MOBILE SATELLITE MOBILE SATELLITE (S-E) (space to Earth) MOB. SAT. (S-E) Mob. Sat. (S-E) MOB. SAT. (S-E) Mob. Sat. (S-E) 136.0 132.0125 128.8125 11.175 11.275 11.4 11.6 11.65 FIXED FIXED 182.0 Space Research Space Research Space Research EARTH EXPL. SAT. (Passive) Mobile Fixed Mobile AERONAUTICAL RADIONAVIGATION SPACE RESEARCH (Passive) FIXED RADIO ASTRONOMY 14.47 14.5 14.7145 14.4 14.2 MOBILE SAT. (Space to Earth) Mobile (Aero. TLM) FIXED RADIO ASTRONOMY INTERSATELLITE MOBILE 176.5 174.5 170.0 168.0 164.0 Land Mobile Satellite (E-S) FIXED Land Mobile SAT. (E-S) Satellite (E-S) FX SAT.(E-S) L M Sat(E-S) Mobile FIXED SATELLITE (E-S) Mobile Mobile ** AERONAUTICAL MOBILE (R) AERONAUTICAL MOBILE (R) AERONAUTICAL MOBILE (R) AERONAUTICAL MOBILE (R) MOBILE FIXED EARTH INTERSATELLITE EXPLORATION SAT. (Passive) SPACE RESEARCH (Passive) INTERSATELLITE MOBILE SPACE RES. (Passive) FIXED SATELLITE (S-E) MOBILE RADIO ASTRONOMY 151.0 150.0 Mobile** Fixed Fixed FIXED MOBILE LAND MOBILE (TLM) MOBILE 1430 1432 1435 1525 1390 1392 1395 1400 1427 1429.5 BROADCASTING BROADCASTING (AM RADIO) MOBILE EARTH EXPL. SAT. SPACE RES. (Passive) (Passive) 149.0 142.0 144.0 FIXED (TLM) (E-S) FIXED BROADCASTING AERONAUTICAL MOBILE (OR) AERONAUTICAL MOBILE (R) FIXED BROADCASTING FIXED FIXED FIXED MOBILE Amateur Satellite FIXED SATELLITE (S-E) (S-E) FIXED** Fixed (TLM) FIXED (TLM) MOBILE (AERONAUTICAL TELEMETERING) FIXED-SAT FIXED-SAT FIXED SPA CE RESEARCH ( Passive) 121.9375 123.0875 123.5875 117.975 9.9 9.995 10.003 10.005 10.1 10.15 Radiolocation FIXED Amateur MOBILE ** MOBILE EARTH EXPL SAT (Passive) LAND MOBILE MOBILE ** ASTRONOMY FIXED RADIO LAND MOBILE LAND MOBILE (TLM) AERONAUTICAL MOBILE (R) AERONAUTICAL MOBILE AERONAUTICAL MOBILE FIXED STANDARD FREQ. AND TIME SIGNAL (10,000 kHz) Space Research STANDARD FREQ. AERONAUTICAL MOBILE (R) AMATEUR 9.5 9.4 8.965 9.040 8.815 300 kHz EARTH EXPLORATION SATELLITE (Passive) RADIONAVIGATION AMATEUR SATELLITE RADIONAVIGATION SATELLITE MOBILE 13.25 12.75 12.7 Space Research (E-S) AERONAUTICAL RADIONAV. 13.4 RADIOStandard RadioLOCATION Freq. and location Time Signal 13.75 FIXED RADIORadioSatellite (E-S) SAT.(E-S) location LOCATION 14.0 RADIO Land Mobile FIXED Space NAVIGATION SAT. (E-S) Satellite (E-S) Research FIXED FIXED 1350 1300 1240 BROADCASTING 8.1 8.195 STANDARD FREQ. AND TIME SIGNAL (20 kHz) MARITIME MOBILE FIXED MOBILE FIXED SATELLITE (S-E) RADIOLOCATION Radiolocation FIXED INTERSATELLITE Space Research AMATEUR MOBILE FIXED SATELLITE MOBILE (E-S) RADIOLOCATION FIXED BROADCASTING FIXED AERONAUTICAL MOBILE (OR) AERONAUTICAL MOBILE (R) MARITIME MARITIMEMOBILE MOBILE 535 525 505 510 495 FIXED RADIOLOCATION 134.0 FIXED SATELLITE (E-S) FIXED ISM – 6.78 ± .015 MHz SPACE RESEARCH (S-E) (Deep Space) FIXED Mobile ** BROADCASTING SATELLITE FIXED 126.0 12.2 1215 108.0 88.0 FIXED FIXED 7.3 7.35 7.1 7.0 AERONAUTICAL RADIONAVIGATION (RADIO BEACONS) MARITIME MOBILE FIXED 119.98 FIXED SATELLITE (S-E) FIXED (Passive) FIXED SATELLITE (S-E) SPACE EARTH Amatuer RES. EXPL .SAT 120.02 EARTH SPACE INTERMOBILE SATELLITE RESEARCH EXPL SAT. (Passive) (Passive) Amateur Radiolocation AERONAUTICAL RADIONAVIGATION 928 929 930 931 932 935 940 941 944 960 AERONAUTICAL RADIONAVIGATION INTERSAT. RADIOLOCATION RADIOLOCATION AERONAUTICAL RADIONAVIGATION RADIONAVIGATION SATELLITE (S-E) FIXED FIXED FIXED FIXED FIXED Amateur BROADCASTING (FM RADIO) MOBILE 11.7 10.7 10.68 10.5 10.55 10.6 10.45 FIXED FIXED FIXED FIXED FIXED 74.6 74.8 75.2 75.4 76.0 FIXED BROADCASTING BROADCASTING AMATEUR SATELLITE FIXED FIXED AMATEUR Mobile AMATEUR Mobile Mobile FIXED FIXED 116.0 FIXED Amateur Satellite Amateur EARTH EXPL. SATELLITE (Passive) RADIO ASTRONOMY FIXED SPACE RESEARCH (Passive) LAND MOBILE LAND MOBILE FIXED AERONAUTICAL MOBILE MOBILE LAND MOBILE LAND MOBILE MOBILE LAND MOBILE RADIOLOCATION MOBILE FIXED AERONAUTICAL RADIONAVIGATION FIXED MOBILE FIXED MOBILE 73.0 72.0 Mobile* EARTH Amateur Radiolocation RADIOLOCATION EARTH EXPL. SAT. (Passive) 10.0 9.5 9.3 9.2 9.0 8.5 8.45 MOBILE RADIO ASTRONOMY FIXED MOBILE AERONAUTICAL RADIONAVIGATION (RADIO BEACONS) MARITIME MOBILE MOBILE (DISTRESS AND CALLING) MARITIME MOBILE (SHIPS ONLY) FIXED SPACE RADIOLOCATION Radiolocation RADIO ASTRONOMY SPACE RESEARCH (Passive) Radiolocation Radiolocation 821 824 849 851 866 869 894 896 901901 902 806 794 776 764 746 6.685 6.765 6.525 6.2 5.95 5.68 5.73 5.90 5.45 4.995 5.003 5.005 5.060 4.85 4.75 MARITIME MOBILE INTERF I X E D MOBILE SATELLITE RESEARCH EXPL SAT. (Passive) 105.0 102.0 100.0 95.0 Meteorological Aids RADIOLOCATION RADIONAVIGATION 8.4 8.215 LAND MOBILE FIXED LAND MOBILE FIXED LAND MOBILE AERONAUTICAL MOBILE LAND MOBILE LAND MOBILE FIXED LAND MOBILE FIXED MOBILE BROADCAST BROADCASTING (TV CHANNELS 5-6) FIXED RADIOLOCATION SPACE RESEARCH (Passive) MOBILE EARTH EXPLORATION SATELLITE (Passive) FIXED FIXED 8.175 8.025 FIXED BROADCAST AERONAUTICAL MOBILE (OR) AERONAUTICAL MOBILE (R) MARITIME MOBILE MARITIME MOBILE Radiolocation Radiolocation Radiolocation SPACE RESEARCH (S-E) (deep space only) FIXED AERONAUTICAL RADIONAVIGATION MARITIME RADIONAVIGATION RADIOLOCATION SPACE RESEARCH (S-E) EARTH EXPL. SAT. (S-E) FIXED Mobile MET. SATELLITE FIXED SATELLITE Satellite (E-S) (E-S) (E-S) (no airborne) FIXED Mobile Satellite EARTH EXPL. SATELLITE FIXED SATELLITE (S-E) (E-S)(no airborne) (E-S) Mobile Satellite (E-S) Fixed 7.90 7.75 300 MHz 92.0 FIXED FIXED MOBILE SATELLITE (E-S) SATELLITE (E-S) FIXED EARTH EXPL. FIXED SATELLITE (E-S) SATELLITE(S-E) BROADCAST MOBILE MOBILE MOBILE MOBILE BROADCASTING BROADCASTING FIXED FIXED AERONAUTICAL MOBILE (OR) MOBILE* MOBILE* FIXED FIXED 76.0 Amateur 77.0 Amateur Amateur Sat. 77.5 AMATEUR AMATEUR SAT 78.0 Amateur Amateur Satellite 81.0 FIXED MOBILE MOBILE SATELLITE SATELLITE (S-E) (S-E) 84.0 BROADBROADMOBILE CASTING CASTING SATELLITE 86.0 FIXED AMATEUR SATELLITE FIXED FIXED FIXED AERONAUTICAL MOBILE (R) Mobile FIXED MOBILE AMATEUR FIXED FIXED FIXED 435 415 405 MARITIME MOBILE 7.55 7.45 7.30 7.19 7.235 7.25 7.125 FIXED MOBILE MOBILE* STANDARD FREQ. AND TIME SIGNAL (5000 KHZ) Space Research STANDARD FREQ. MARITIME MOBILE Fixed RADIOLOC. RADIOLOC. RADIOLOC. RADIOLOCATION Mobile Satellite (S-E) Mobile Satellite (S-E) Fixed Mobile Satellite (S-E) FIXED 698 608.0 614.0 54.0 50.0 49.6 46.6 47.0 RADIONAVIGATION Aeronautical Mobile 335 325 300 FIXED 75.5 FIXED SPACE RESEARCH (E-S) FIXED MOBILE SATELLITE (S-E) RADIO ASTRONOMY BROADCASTING (TV CHANNELS 2-4) FIXED MET. FIXED SATELLITE (S-E) SATELLITE (S-E) FIXED FIXED SATELLITE (S-E) FIXED SATELLITE (S-E) FIXED SATELLITE (S-E) 7.025 7.075 6.70 6.875 6.525 6.425 LAND MOBILE TV BROADCASTING FIXED FIXED FIXED FIXED FIXED MOBILE MOBILE FIXED SAT (E-S) FIXED SATELLITE (S-E)(E-S) FIXED SATELLITE (E-S) FIXED MOBILE MOBILE FIXED SATELLITE (E-S) 5.85 5.925 5.83 5.65 5.6 MOBILE MOBILE 3 MHz 74.0 Radiolocation Amateur FIXED SATELLITE (E-S) FIXED FIXED AERONAUTICAL RADIONAVIGATION (RADIO BEACONS) AERONAUTICAL RADIONAVIGATION Aeronautical Mobile RADIONAVIGATION MOBILE METEOROLOGICAL AIDS FIXED SATELLITE (E-S) FIXED RADIOAmateur- sat (s-e) Amateur LOCATION Amateur MOBILE FIXED SAT(E-S) RADIOLOCATION MARITIME RADIONAVIGATION 512.0 4.65 4.7 Maritime Radionavigation (Radio Beacons) 300 285 275 200 190 160 130 110 90 70 61 59 30 30 20.05 19.95 14 9 3 Spectral resources are managed by governmental organizations that allocate them to fixed users. In the United States, regulatory responsibility for the radio spectrum is divided between the Federal Communications Commission (FCC), which administers spectrum for non-Federal use, and the National Telecommunications and Information Administration (NTIA), responsible for the Federal use. FIXED 71.0 66.0 65.0 64.0 59.3 BROADCASTING (TV CHANNELS 14 - 20) FIXED AERONAUTICAL MOBILE (OR) AERONAUTICAL MOBILE (R) MOBILE* 4.438 4.063 4.0 3.5 3.4 3.230 3.155 3.0 3.025 RF S PECTRAL R ESOURCES FIXED SATELLITE (E-S) MOBILE INTERSATELLITE INTERSATELLITE INTERSATELLITE INTERSATELLITE FIXED RADIORADIO MOBILE NAVIGATION SATELLITE NAVIGATION SATELLITE MOBILE EARTH SPACE EXPLORATION RESEARCH F I X E D M O B I L E * * SATELLITE MOBILE** EARTH-ES INTER- SAT 5.46 5.47 5.35 5.15 5.25 FIXED AMATEUR FIXED RES. EARTH EXPLORATION SAT. (Passive) 58.2 EARTH EXPLORATION SAT. (Passive) 59.0 SPACE RADIO- INTERRES.. LOC. SAT EARTH-ES SPACE INTER - SAT MOBILE SPACE RESEARCH (Passive) FIXED RES. INTER- SAT MOBILE MOBILE MOBILE AERONAUTICAL RADIONAV. RADIORadioLOCATION location Radiolocation RADIONAVIGATION MARITIME Radiolocation RADIONAVIGATION FIXED SAT (S-E) Radiolocation LAND MOBILE BROADCASTING (TV CHANNELS 21-36) EARTH EXPLORATION F I X E D SAT. (Passive) 3 GHz MOBILE SPACE RES. FIXED FIXED 54.25 55.78 56.9 57.0 52.6 AERO. RADIONAV. RADIOLOCATION 4.99 4.94 4.8 5.0 43.69 MARITIME MOBILE FIXED INTER- SAT EARTH EXPL-SAT (Passive) SPACE RESEARCH (Passive) 51.4 FIXED LAND MOBILE LAND MOBILE FIXED MOBILE** RES. EARTH EXPLORATION SATELLITE (Passive) MOBILE MOBILE MOBILE** FIXED RADIO ASTRONOMY Space Research (Passive) AERONAUTICAL RADIONAVIGATION 460.0 462.5375 462.7375 467.5375 467.7375 470.0 LAND MOBILE FIXED 50.4 50.2 48.2 47.2 47.0 FIXED LAND MOBILE FIXED LAND MOBILE LAND MOBILE FIXED LAND MOBILE LAND MOBILE FIXED 42.0 40.0 39.0 37.0 37.5 38.0 38.25 36.0 AERONAUTICAL MOBILE (R) FIXED NOT ALLOCATED SPACE FX SAT(E-S) EARTH EXPLORATION SATELLITE FI XED MOBILE SATELLITE (E-S) SATELLITE (E-S) FX SAT(E-S) AMATEUR SATELLITE MOBILE MOBILE MOBILE MOBILE FIXED SATELLITE (S-E) FIXED FIXED SPACE RESEARCH 4.5 Meteorological Satellite (S-E) FIXED MOBILE 450.0 454.0 455.0 456.0 MOBILE MOBILE LAND MOBILE FIXED 35.0 34.0 AERONAUTICAL MOBILE (OR) AERONAUTICAL MOBILE (R) MOBILE* MARITIME MOBILE FIXED FIXED Amateur LAND MOBILE FIXED LAND MOBILE LAND MOBILE FIXED LAND MOBILE RADIOLOCATION 420.0 MOBILE FIXED FIXED RADIO ASTRONOMY LAND MOBILE Radio Astronomy LAND MOBILE LAND MOBILE FIXED FIXED 33.0 32.0 30.56 Aeronautical Radionavigation RADIONAV.SAT. 46.9 45.5 43.5 FIXED MOBILE SATELLITE (E-S) 403.0 402.0 401.0 30 MHz 4.4 4.2 MET. SAT. (S-E) Earth Expl. Met-Satellite Earth Expl Sat (E-S)Satellite(E-S) (E-S) Space Opn. (S-E) Met-Satellite Earth Expl Sat (E-S) (E-S) (S-E) SPACE RES. MET-SAT. EARTH EXPL (E-S) SAT. (E-S) MET-SAT. EARTH EXPL SAT. (E-S) (E-S) MOBILE. SAT. (S-E) MET. AIDS (Radiosonde) MET. AIDS (Radiosonde) METEOROLOGICAL AIDS (RADIOSONDE) 406.0 MOBILE SATELLITE (E-S) 406.1 RADIO FIXED MOBILE ASTRONOMY 410.0 SPACE RESEARCH FIXED MOBILE (S-S) MET. AIDS SPACE OPN. (Radio(S-E) sonde) LAND MOBILE MOBILE FIXED FIXED MOBILE MOBILE SAT (E-S). MOB. SAT(E-S) MOBILE FIXED FIXED SATELLITE (S-E) AERONAUTICAL RADIONAVIGATION 3.7 400.05 400.15 399.9 335.4 MOBILE FIXED SATELLITE (E-S) FIXED MOBILE SATELLITE (E-S) STD. FREQ. & TIME SIGNAL SAT. (400.1 MHz) RADIONAVIGATION SATELLITE FIXED 30.0 Radiolocation MARITIME MOBILE RADIONAV. SATELLITE FIXED SAT. (S-E) 3.65 3.6 3.5 MOBILE FIXED Aeronautical Mobile ASTRONOMY MOBILE** Radiolocation Radiolocation 328.6 MOBILE LAND MOBILE FIXED AERONAUTICAL RADIONAVIGATION (RADIO BEACONS) MOBILE 40.0 Earth EARTH SPACE F I X E D MOBILE Expl. EXPL SAT SAT. RES. (E-S) Sat (s - e) SAT (E-S) 40.5 BROAD- FX-SAT Fixed Mobile BCST CASTING (S-E) SAT. 41.0 BROADBCST MOBILE FIXED CASTING SAT. 42.5 RADIO FIXED F I X E D M O B I L E * * SATELLITE (E-S) MOBILE FIXED SAT. (S-E) FIXED SATELLITE (S-E) SPACE RESEARCH (space-to-Earth) FIXED SAT. (S-E) MOBILE AERONAUTICAL RADIONAVIGATION 322.0 AMATEUR FIXED FIXED RADIOLOCATION RADIOLOCATION 3.3 300.0 FIXED F I X E D MOBILE SATELLITE SAT. FIXED SPACE RES. MOBILE FIXED F I X E D MOBILE AERO. RADIONAV.(Ground) AERONAUTICAL RADIONAVIGATION (Ground) RADIOLOCATION 36.0 Radiolocation RADIOLOCATION 33.0 33.4 STANDARD FREQUENCY AND TIME SIGNAL SATELLITE Radiolocation STANDARD FREQUENCY AND TIME SIGNAL MOBILE SATELLITE INTER-SATELLITE MOBILE FIXED SATELLITE Amateur SPACE RE. EARTH EXPL. .(Passive) SAT. (Passive) FIXED Radiolocation FIXED MOBILE SPACE RESEARCH RADIONAVIGATION SPACE OPERATION METEOROLOGICAL SATELLITE INTER- SAT METEOROLOGICAL AIDS EARTH EXPLORATION SATELLITE MOBILE SATELLITE FIXED BROADCASTING SATELLITE RADIOLOCATION FIXED RADIONAVIGATION MOBILE SATELLITE RADIONAVIGATION SATELLITE FIXED RADIONAVIGATION MARITIME RADIONAVIGATION MOBILE MOBILE NON-GOVERNMENT EXCLUSIVE MOBILE** FIXED-SATELLITE GOVERNMENT/ NON-GOVERNMENT SHARED MARITIME RADIONAVIGATION (RADIO BEACONS) SPACE RES. GOVERNMENT EXCLUSIVE Aeronautical Radionavigation (Radio Beacons) 32.0 RADIONAVIGATION 32.3 MARITIME MOBILE SATELLITE BROADCASTING 31.8 AMATEUR SATELLITE 3.1 MOBILE RADIONAVIGATION 3.0 RADIOLOCATION SATELLITE Radiolocation MARITIME MOBILE MARITIME RADIONAVIGATION AMATEUR 31.3 RADIOLOCATION 31.0 LAND MOBILE SATELLITE SPACE RESEARCH (deep space) ACTIVITY CODE 30.0 AERONAUTICAL RADIONAVIGATION MOBILE RADIODETERMINATION SATELLITE MOBILE SATELLITE (E-S) RADIO ASTRONOMY LAND MOBILE EARTH EXPLORATION SAT. (Passive) INTER-SATELLITE AERONAUTICAL MOBILE SATELLITE FIXED AERONAUTICAL MOBILE FIXED SATELLITE (E-S) RADIO SERVICES COLOR LEGEND SPACE RESEARCH (Passive) THE RADIO SPECTRUM RADIO ASTRONOMY FREQUENCY ALLOCATIONS Standard Frequency and Time Signal Satellite (S-E) UNITED STATES Stand. Frequency and Time Signal Satellite (S-E) 3 In Europe, the European Telecommunications Standards Institute (ETSI) and the Electronic Communications Committee (ECC) cooperate on aspects related to the regulatory environment for radio spectrum. Figure 2 shows the US frequency allocation chart. As can be seen, all of the bands spanning the VHF, UHF and SHF frequency ranges (0.003–30GHz) are pre-allocated to one or even several licensed PUs. This poses inherent difficulties in introducing new technologies that require occasional usage of this spectral range. MARITIME MOBILE 300 kHz LAND MOBILE FIXED 3 MHz MOBILE ISM – 27.12 ± .163 MHz 30 MHz MOBILE FIXED MOBILE SATELLITE FIXED 300 MHz 3 GHz 30 GHz FIXED RADIONAVIGATION SATELLITE (E-S) MOBILE 300 GHz FIXED * EXCEPT AERO MOBILE (R) Cosmic-ray 1025Hz PLEASE NOTE: THE SPACING ALLOTTED THE SERVICES IN THE SPECTRUM SEGMENTS SHOWN IS NOT PROPORTIONAL TO THE ACTUAL AMOUNT OF SPECTRUM OCCUPIED. October 2003 THE RADIO SPECTRUM 300 GHz Fig. 2. United States frequency allocation chart (courtesy of the U.S. Department of Commerce, National Telecommunications and Information Administration, Office of Spectrum Management - January 2016). recovery techniques such as MUSIC [38], [39], ESPRIT [40] or compressed sensing (CS) [41] based approaches, may then be adapted to the joint carrier and DOA estimation problem. We review several algorithms that jointly estimate the carrier frequencies and DOAs of the received transmissions, from the same low rate samples obtained from an array of sensors. This article focuses on the spectrum sensing challenges for CR outlined above. We first review sub-Nyquist sampling methods for multiband signals and then consider different aspects of spectrum sensing performed on low rate samples, including cyclostationary detection, collaborative spectrum sensing and joint carrier frequency and DOA estimation. Our emphasis is on practical low rate acquisition schemes and tailored recovery that can be implemented in real CR settings. 4 In particular, we examine the analog to digital interface of CRs, as opposed to the review in [42], which is concerned with the digital implications of compressive spectrum sensing. This allows to demonstrate the realization of the theoretical concepts on hardware prototypes. We focus in particular on the implementation of one sampling scheme reviewed here, the MWC, and show how the same low rate samples can be used in the different extensions of spectrum sensing described above. We note that CRs are faced with additional fundamental difficulties, such as the hidden-node problem and potential interference from secondary users to existing primary communication links. These are beyond the scope of this review but need to be addressed as well for CRs to become practical. sub-Nyquist methods, that theoretically achieve the minimal sampling rate. Two main limitations of sub-Nyquist sampling are noise enhancement [29], which is discussed later on and may be partially overcome by techniques reviewed below such as cyclostationary detection and collaborative spectrum sensing, and the inherent assumption that the channel is sparse and contains spectral holes. A. Multitone Model and the Random Demodulator Tropp et al. [22], [23] consider a discrete multitone model and suggest sampling using the random demodulator, depicted in Fig. 5. Multitone functions are composed of K active tones spread over a bandwidth W , such that f (t) = ∑ bω e−2πiωt , t ∈ [0, 1). (6) ω∈Ω III. S UB -N YQUIST S AMPLING FOR CR CR receivers sense signals composed of several transmissions with unknown support, spread over a wide spectrum. Such sparse wideband signals belong to the so-called multiband model [25], [26], [43]. An example of a multiband signal x(t) with K bands is illustrated in Fig. 4, with individual bandwidths not greater than B, centered around unknown carrier frequencies ∣fi ∣ ≤ fNyq /2, where fNyq denotes the signals’ Nyquist rate and i indexes the transmissions. Note that, for real-valued signals, K is an even integer due to spectral conjugate symmetry and the number of transmissions is Nsig = K/2. Here, Ω is composed of K normalized frequencies, or tones, that are a subset of the integers in the interval [−W /2, W /2], and bω , for ω ∈ Ω, are a set of complex-valued amplitudes. The number of active tones K is assumed to be much smaller than the bandwidth W . The goal is to recover both the tones ω and the corresponding amplitudes bω . 𝐵 -𝑓3 -𝑓2 ~ ~ −𝑓Nyq 2 −𝑓1 0 𝑓1 𝑓2 𝑓3 𝑓Nyq 2 Fig. 4. Multiband model with K = 6 bands. Each band does not exceed the bandwidth B and is modulated by an unknown carrier frequency ∣fi ∣ ≤ fNyq /2, for i = 1, 2, 3. When the frequency support of x(t) is known, classic sampling methods such as demodulation, undersampling ADCs and interleaved ADCs (see [43], [46] and references therein) reduce the sampling rate below Nyquist. Here, since the frequency location of the transmissions are unknown, classic processing first samples x(t) at its Nyquist rate fNyq , which may be prohibitively high. Sensing such wideband signals may be performed by splitting them into several frequency bands and processing each band separately. This can be done either in series or in parallel. However, this increases the latency in the first case and the hardware complexity in the second. To overcome the sampling rate bottleneck, several blind subNyquist sampling and recovery schemes have been proposed that exploit the signal’s structure and in particular its sparsity in the frequency domain, but do not require knowledge of the carrier frequencies. It has been shown in [25] that the minimal sampling rate for perfect blind recovery in multiband settings is twice the Landau rate [47], that is twice the occupied bandwidth. This rate can be orders of magnitude lower than Nyquist. In the remainder of this section, we survey several Fig. 5. Block diagram for the random demodulator, including a random number generator, a mixer, an accumulator and a sampler [23]. To sample the signal f (t), it is first modulated by a high-rate sequence pc (t) created by a pseudo-random number generator. It is then integrated and sampled at a low rate, as shown in Fig. 5. The random sequence used for demodulation is a square wave, which alternates between the levels ±1 with equal probability. The K tones present in f (t) are thus aliased by the pseudorandom sequence. The resulting demodulated signal y(t) = f (t)pc (t) is then integrated over a period 1/R and sampled at the low rate R. This integrate-and-dump approach results in the following samples ym = R ∫ (m+1)/R m/R y(t)dt, m = 0, 1, . . . , R − 1. (7) The samples ym acquired by the random demodulator can be written as a linear combination of the W × 1 sparse amplitude vector b that contains the coefficients bω at the corresponding locations ω [22], [23]. In matrix form, we write y = Φb, (8) where y is the vector of size R that contains the samples ym and Φ is the known sampling matrix that describes the overall action of the system on the vector of amplitudes b, 5 IEEE 802.22 S TANDARD FOR WRAN During the past decade, the use of analog TV radio bands has been slowly decaying, mainly due to the introduction of digital TV broadcasts based on new transmitting media such as cable and satellite. The once crowded VHF and UHF frequency range (between 54 and 860 MHz) is less occupied today, particularly in remote rural areas. Concurrently, a new need has emerged in these areas for fast wireless data networks with long range capabilities, up to 30 km. For these operating range requirements, the VHF/UHF radio spectrum, able to traverse these distances with relatively low transmitting power, is a natural choice. Combining the need for available frequencies in this range with the fact that it is mostly underutilized today, has laid the foundation for designing efficient spectrum sharing techniques, including CR. IEEE 802.22 is the first international standard especially designed to achieve this goal. It describes a wireless regional area network (WRAN) relying on new CR technologies, that exploits the vacant white space in the VHF/UHF range, while still reserved to licensed TV bands. Managing the spectrum and transmitting broadband communications only in vacant frequency slots enables fast internet access in hard-to-reach areas with low population density, and therefore has high potential for extensive worldwide usage To exploit analog TV bands’ white spaces, an opportunistic approach is selected. Both base stations (BS) and clients, referred to as customer-premises equipment (CPE), are spread apart geographically, as seen in Fig. 3. In order to enable a true CR network, the standard defines necessary capabilities from both the BSs and CPEs to enable cognitive sensing and adapt to possibly rapid changes incurred by incumbent users. The physical (PHY) layer is the lowest network layer. It contains the circuitry used to transmit and receive analog communication signals. For implementing CR technologies, the PHY has to rapidly adapt to spectral changes, and be both agile and flexible enough to jump between carrier frequencies without losing information. It is required to constantly listen namely demodulation and filtering (see [23] for more details). Capitalizing on the sparsity of the vector b, the amplitudes bω and their respective locations ω can be recovered from the low rate samples y using CS [41] techniques such as those discussed in “Compressed Sensing Recovery”, in turn allowing for the recovery of f (t). The minimal required number of samples R for perfect recovery of f (t) in noiseless settings is 2K [41]. The random demodulator is one of the pioneer and innovative attempts to extend the inherently discrete and finite CS theory to analog signals. However, truly analog signals, as those we consider here, require a prohibitively large number of harmonics to approximate them well within the discrete model. When attempting to approximate signals such as those from the multiband model, the number of tones W is of the order of the Nyquist rate and the number of samples R is a multiple of KB. This in turn renders the reconstruction computationally to the operating band during designated quiet times, in order to make sure the incumbent user does not wake up and require its use. The media access control (MAC), situated above the PHY layer in the network hierarchy, is responsible for CR communication management. Its specifications include fast and dynamic adaptation to changes in the environment by constantly sensing the spectrum. The requirements for each of the different network layers are particularly demanding when compared to other RF standards from the 802.xx family. To conclude, the 802.22 WRAN standard holds great promise in delivering fast broadband connections to remote rural areas, with broadcast ranges of up to 30 km, by smartly sharing the already allocated VHF and UHF spectrum. Spectrum coexistence is made possible by CR tools, which require advanced technologies. These introduce tremendous challenges in terms of the necessary hardware to meet such harsh demands, while preserving small form factors and low power levels. SubNyquist methods for spectral sensing and reconstruction offer a way to alleviate part of this burden by exploiting the signals’ spectral structure, effectively making CR technology more accessible. Backbone Network ~ 30 km ~ 100 km CPE CPE BS CPE BS CPE CPE CPE Fig. 3. CR network illustration, including BSs and CPEs. prohibitive and very sensitive to the grid choice (see [46] for a detailed analysis). Furthermore, the time-domain approach precludes processing at a low rate, even for multitone inputs since interpolation to the Nyquist rate is an essential ingredient of signal reconstruction. In terms of hardware and practical implementation, the random demodulator requires accurate modulation by a periodic square mixing sequence and accurate integration, which may be challenging when using analog signal generators, mixers and filters. In contrast to the random demodulator, which adopts a discrete multitone model, the rest of the approaches we focus on treat the analog multiband model, illustrated in Fig. 4, which is of interest in the context of CR. B. Multi-Rate Sampling An alternative sampling approach is based on the synchronous multi-rate sampling (SMRS) [24] scheme, which 6 C OMPRESSED S ENSING R ECOVERY Compressed sensing (CS) [41], [43] is a framework for simultaneous sensing and compression of finite-dimensional vectors, which relies on linear dimensionality reduction. In particular, the field of CS focuses on the following recovery problem z = Ax, (1) where x is a N × 1 sparse vector, namely with few non zero entries, and z is a vector of measurements of size M < N . CS provides recovery conditions and algorithms to reconstruct x from the low-dimensional vector z. The different spectrum sensing applications described in this paper deal primarily with analog signals and sampling techniques, while CS inherently defines a digital framework. We will discuss how the analog approaches of low rate sampling use CS as a tool for recovery and adapt it to the analog setting. To that end, we describe here two CS greedy recovery algorithms, that solve the optimization problem x̂ = arg min ∣∣x∣∣0 x s.t. z = Ax, (2) where ∣∣ ⋅ ∣∣0 denotes the `0 -norm. The first algorithm we consider belongs to the family of matching pursuit (MP) methods [44]. The orthogonal matching pursuit (OMP) algorithm iteratively proceeds by finding the column of A most correlated to the signal residual r, i = arg max ∣AH r∣, (3) has been proposed in the context of electro-optical systems to undersample multiband signals. The SMRS samples the input signal at P different sampling rates Fi , each of which is an integer multiple of a basic sampling rate ∆f . This procedure aliases the signal with different aliasing intervals, as illustrated in Fig. 6. The Fourier transform of the undersampled signals is then related to the original signal through an underdetermined system of linear equations, z(f ) = Qx(f ). (9) Here, x(f ) contains frequency slices of size ∆f of the original signal x(t) and z(f ) is composed of the Fourier transform of the sampled signal. Each channel contributes Mi = Fi /∆f equations to the system (9), which concatenates the observation vector of all the channels. The measurement matrix Q has exactly P non-zero elements in each column, that correspond to the locations of the spectral replica in each channel baseband [0, Fi ]. This approach assumes that either the signal or the sampling time window are finite. The continuous variable f is then discretized to a frequency resolution of ∆f . Since x(t) is sparse in the frequency domain, the vector x(f ) is sparse and can be recovered from (9) using CS techniques, for each discrete frequency f . An alternative recovery method, referred to as the reduction procedure and illustrating in Fig. 6, consists of detecting baseband frequencies in which there is no signal, by observing the samples. These frequencies are assumed to where the absolute value is computed element-wise. The residual is obtained by subtracting the contribution of a partial estimate x̂` of the signal at the `th iteration, from z, as follows r = z − Ax̂` . (4) Once the support set is updated by adding the index i, the coefficients of x̂` over the support set are updated, so as to minimize the residual error. Other greedy techniques include thresholding algorithms. We focus here on the iterative hard thresholding (IHT) method proposed in [45]. Starting from an initial estimate x̂0 = 0, the algorithm iterates a gradient descent step with step size µ followed by hard thresholding, i.e. x̂` = T (x̂`−1 + µAH (z − Ax̂`−1 ), k) (5) until a convergence criterion is met. Here T (x, k) denotes a thresholding operator on x that sets all but the k entries of x with the largest magnitudes to zero, and k is the sparsity level of x, assumed to be known. These two greedy algorithms and other CS recovery techniques can be adapted to further settings, such as multiple measurement vectors (MMV), where the measurements z and sparse objective x become matrices, infinite measurement vectors (IMV), block sparsity and more, as we will partially discuss in the paper. Further details on CS recovery conditions and techniques can be found in [41], [43]. account for the absence of signals of interest in all the frequencies that are down-converted to that baseband frequency, which allows to reduce the number of sampling channels. This assumption does not hold in the case where two or more frequency components cancel each other due to aliasing, which happens with probability zero. Once the corresponding components are eliminated from (9), the reduced system is inverted using the Moore-Penrose pseudo-inverse to recover x(f ). There are several drawbacks to the SMRS that limit its performance and potential implementation. First, the discretization process affects the SNR since some of the samples are thrown out. Furthermore, spectral components down-converted to off the grid frequencies are missed. In addition, the first recovery approach requires a large number of sampling channels, proportional to the number of active bands K, whereas the reduction procedure does not ensure a unique solution and the inversion problem is ill-posed in many cases. Another difficulty is that, in practice, synchronization between channels sampling at different rates is challenging. Finally, this scheme samples wideband signals using low rate samplers. Practical ADCs introduce an inherent bandwidth limitation, modeled by an anti-aliasing low pass filter (LPF) with cut-off frequency determined by the sampling rate, which distorts the samples. Thus, the SMRS implementation requires low rate samplers with large analog bandwidth. 7 where the cosets ci are ordered integers so that 0 ≤ c1 < c2 < ⋯ < cM < N . A possible implementation of the sampling sequences (10) is depicted in Fig. 8. The building blocks are M uniform samplers at rate 1/N TNyq , where the ith sampler is shifted by ci TNyq from the origin. When sampling at the Nyquist rate, M = N and ci = (i − 1). Original signals (a) Signals sampled at rate 𝑓1 (b) Time Shifts 𝑓1 2𝑓1 𝑡 = 𝑛𝑁𝑇Nyq 𝑧1 𝑛 Δ𝑡 = 𝑐1 𝑇Nyq 3𝑓1 𝑥 𝑡 (c) ⋅⋅⋅ Signals sampled at rate 𝑓2 𝑡 = 𝑛𝑁𝑇Nyq 𝑓2 Possible occupied support Fig. 8. Schematic implementation of multicoset sampling. The input signal x(t) is inserted into the multicoset sampler that splits the signal into M branches, and delays each one by a fixed coefficient ci TNyq . Every branch is then sampled at the low rate 1/(N TNyq ), and then digitally processed to perform spectrum sensing and signal reconstruction. (d) Fig. 6. Action of the SMRS on a multiband signal: (a) The input signal with K = 2 bands, (b) signals sampled at rate F1 in channel 1, (c) signals sampled at rate F2 in channel 2, and (d) possible support which is the intersection of the supports in channel 1 and 2 [24]. The samples in the Fourier domain can then be written as linear combinations of spectrum slices of x(t), such that [25] z(f ) = Ax(f ), A popular sampling scheme for sampling wideband signals at the Nyquist rate is multicoset or interleaved ADCs [25], [46], [48] in which several channels are used, each operating at a lower rate. We now discuss how such systems can be used in the sub-Nyquist regime. Multicoset sampling may be described as the selection of certain samples from the uniform Nyquist grid, as shown in Fig. 7, where TNyq = 1/fNyq denotes the Nyquist period. More precisely, the uniform grid is divided into blocks of 𝑓 𝑡 𝑁𝑇Nyq 𝑐1 𝑐3 𝑐2 𝑐𝑀 𝑀 out of 𝑁 active cosets 𝑡 Fig. 7. Illustration of multicoset sampling. N consecutive samples, from which only M < N are kept. Mathematically, the ith sampling sequence is defined as xci [n] = { f ∈ Fs . (11) Here, x(f ) denotes the spectrum slices of x(t), fs = ≥ B is the sampling rate of each channel and Fs = [−fs /2, fs /2]. This relation is illustrated in Fig. 9. The M × N sampling matrix A is determined by the selected cosets ci . The recovery processing described below is performed in the time domain, where we can write 1 N TNyq C. Multicoset sampling 𝑇Nyq 𝑧𝑀 𝑛 Δ𝑡 = 𝑐𝑀 𝑇Nyq 2𝑓2 x(nTNyq ), n = mN + ci , m ∈ Z 0, otherwise, (10) z[n] = Ax[n], n ∈ Z, (12) The vector z[n] collects the measurements at t = n/fs and x[n] contains the samples sequences corresponding to the spectrum slices of x(t). The goal can then be stated as the recovery of x[n] from the samples z[n]. The system (12) is underdetermined due to the sub-Nyquist setup and known as infinite measurement vectors (IMV) in the CS literature [41], [43]. With respect to these two properties, the digital reconstruction algorithm encompasses the following three stages [25] that we explain in more detail below: 1) The continuous-to-finite (CTF) block constructs a finite frame (or basis) from the samples. 2) The support recovery formulates an optimization problem whose solution’s support is identical to the support S of x[n], that is the active slices. 3) The signal is digitally recovered by reducing (12) to the support of x[n]. The recovery of x[n] for every n independently is inefficient and not robust to noise. Instead, the CTF method, developed in [25], exploits the fact that the bands occupy continuous spectral intervals so that x[n] are jointly sparse, that is they have the same spectral support S over time. The 8 Although this sampling scheme seems relatively simple and straightforward, it suffers from several practical drawbacks [46]. First, as in the SMRS approach, multicoset sampling requires low rate ADCs with large analog bandwidth. Another issue arises from the time shift elements, since maintaining accurate time delays between the ADCs on the order of the Nyquist interval TNyq is difficult. Finally, the number of channels M required for recovery of the active bands can be prohibitively high. The MWC, presented in the next section, uses similar recovery techniques while overcoming these practical sampling issues. 𝑋(𝑓) – Spectrum of 𝑥(𝑡) 𝑖1 Channel ×𝑎 𝑖 1 𝑙2 ×𝑎 𝑖 1 𝑙3 ~ 𝑖 1 𝑙1 𝑙2 𝑓𝑝 ~ ×𝑎 ~ ~ 𝑙1 𝑓𝑝 0 𝑙3 𝑓𝑝 ×𝑎 𝑖 2 𝑙1 + ×𝑎 𝑖 2 𝑙2 + 𝑓Nyq 2 ×𝑎 𝑖 2 𝑙3 𝑖2 Channel D. MWC sampling 𝑓𝑝 − 2 𝑓𝑝 − 2 𝑓𝑝 2 𝑓𝑝 2 Fig. 9. The spectrum slices of the input signal x(f ) are shown here to be multiplied by the coefficients ail of the sensing matrix A, resulting in the measurements zi for the ith channel. Note that in multicoset sampling, only the slices’ complex phase is modified by the coefficients ail . In the MWC sampling described below, both the phases and amplitudes are affected. CTF produces a finite system of equations, called multiple measurement vectors (MMV) [41], [43] from the infinite number of linear systems described by (12). The samples are first summed as (13) Q = ∑ z[n]zH [n], n H and then decomposed to a frame V such that Q = VV . Clearly, there are many possible ways to select V. One option is to construct it by performing an eigendecomposition of Q and choosing V as the matrix of eigenvectors corresponding to the non zero eigenvalues. The finite dimensional MMV system V = AU, (14) is then solved for the sparsest matrix U with minimal number of non-identically zero rows using CS techniques [41], [43]. The key observation of this recovery strategy is that the indices of the non zero rows of U coincide with the active spectrum slices of z[n] [25]. These indices are referred to as the support of z[n] and are denoted by S. Once the support S is known, x[n] is recovered by reducing the system of equations (12) to S. The resulting matrix AS , that contains the columns of A corresponding to S, is then inverted as follows xS [n] = A†S z[n]. (15) Here, xS [n] denotes the vector x[n] reduced to its support. The remaining entries of x[n] are equal to zero. The overall sampling rate of the multicoset system is M fNyq . (16) N The minimal number of channels is dictated by CS results [41] such that M ≥ 2K with fs ≥ B per channel. The sampling rate can thus be as low as 2KB, which is twice the Landau rate [47]. ftot = M fs = The MWC [26] exploits the blind recovery ideas developed in [25] and combines them with the advantages of analog RF demodulation. To circumvent the analog bandwidth issue in the ADCs, an RF front-end mixes the input signal x(t) with periodic waveforms. This operation imitates the effect of delayed undersampling used in the multicoset scheme and results in folding the spectrum to baseband with different weights for each frequency interval. These characteristics of the MWC enable practical hardware implementation, which will be described later on. More specifically, the MWC is composed of M parallel channels. In each channel, x(t) is multiplied by a periodic mixing function pi (t) with period Tp = 1/fp and Fourier expansion ∞ pi (t) = ∑ ail e 2π lt jT p . (17) l=−∞ The mixing process aliases the spectrum, such that each band appears in baseband. The signal then goes through a LPF with cut-off frequency fs /2 and is sampled at rate fs ≥ fp . The analog mixture boils down to the same mathematical relation between the samples and the N = fNyq /fs frequency slices of x(t) as in multicoset sampling, namely (11) in frequency and (12) in time, as shown in Fig. 9. Here, the M × N sampling matrix A contains the Fourier coefficients ail of the periodic mixing functions. The recovery conditions and algorithm are identical to those described for multicoset sampling. Choosing the channels’ sampling rate fs to be equal to the mixing rate fp results in a similar configuration as the multicoset scheme in terms of the number of channels. In this case, the minimal number of channels required for the recovery of K bands is 2K. The number of branches dictates the total number of hardware devices and thus governs the implementation complexity. Reducing the number of channels is a crucial challenge for practical implementation of a CR receiver. The MWC architecture presents an interesting flexibility that permits trading channels for sampling rate, allowing to drastically reduce the number of channels, even down to a single channel. Consider a configuration where fs = qfp , with odd q. In this case, the ith physical channel provides q equations over Fp = [−fp /2, fp /2], as illustrated in Fig. 10. Conceptually, M physical channels sampling at rate fs = qfp are then equivalent to M q channels sampling at fs = fp . The number of channels is thus reduced at the expense of higher sampling 9 − 5𝑓𝑝 2 − 3𝑓𝑝 2 − 𝑓𝑝 2 0 𝑓𝑝 2 3𝑓𝑝 2 5𝑓𝑝 2 (a) Spectrum of 𝑧ǁ𝑖 𝑛 for 𝑓𝑠 = 5𝑓𝑝 . − 𝑓𝑝 2 0 𝑓𝑝 2 − 𝑓𝑝 2 0 𝑓𝑝 2 − 𝑓𝑝 2 0 𝑓𝑝 2 − 𝑓𝑝 2 0 𝑓𝑝 2 − 𝑓𝑝 2 0 𝑓𝑝 2 (b) Spectrum of 𝑧𝑖,𝑗 𝑛 after expansion. Fig. 10. Illustration of the expander configuration for q = 5. (a) Spectrum of the output z̃i [n] of the physical ith channel, (b) spectrum of the samples zi,j [n] of the q = 5 equivalent virtual channels, for j = 1, . . . , 5, after digital expansion. rate fs in each channel and additional digital processing. The output of each of the M physical channels is digitally demodulated and filtered to produce samples that would result from M q equivalent virtual branches. This happens in the socalled expander module, directly after the sampling stage and before the digital processing described above, in the context of multicoset sampling. At its brink, this strategy allows to collapse a system with M channels to a single branch with sampling rate fs = M fp (further details can be found in [26], [49], [50]). The MWC sampling and recovery processes are illustrated in Fig. 11. This approach results in a hardware-efficient subNyquist sampling method that does not suffer from the practical limitations described in previous sections, in particular, the analog bandwidth limitation of low rate ADCs. In addition, the number of MWC channels can be drastically reduced below 2K to as few as one, using higher sampling rate fs in each channel and additional digital processing. This tremendously reduces the burden on hardware implementation. However, the choice of appropriate periodic functions pi (t) to ensure correct recovery is challenging. Some guidelines are provided in [43], [51], [52]. E. Uniform Linear Array based MWC An alternative sensing configuration, composed of a uniform linear array (ULA) and relying on the sampling paradigm of the MWC, is presented in [53]. The sensing system consists of a ULA composed of M sensors, with two adjacent sensors separated by a distance d, such that d < c/(∣ cos(θ)∣fNyq ), where c is the speed of light and θ is the angle of arrival (AOA) of the signal x(t). This system, illustrated in Fig. 12, capitalizes on the different accumulated phases of the input signal between sensors, given by ej2πfi τm , where dm τm = cos(θ) (18) c is the delay at the mth sensor with respect to the first one. Each sensor implements one channel of the MWC, that is the input signal is mixed with a periodic function, low-pass filtered and then sampled at a low rate. This configuration has three main advantages over the standard MWC. First, it allows for a simpler design of the mixing functions which can be identical in all sensors. The only requirement on p(t), besides being periodic with period Tp , is that none of its Fourier series coefficients within the signal’s Nyquist bandwidth is zero. Second, the ULA based system outperforms the MWC in terms of recovery performance in low SNR regimes. Since all the MWC channels belong to the same sensor, they are all affected by the same additive sensor noise. In the ULA architecture, each channel belongs to a different sensor with uncorrelated sensor noise between channels. This alternative architecture benefits from the same flexibility as the standard MWC in terms of collapsing the channels, which translates here into reducing the antennas. This leads to a trade-off between hardware complexity, governed by the number of antennas, and SNR. Finally, as will be shown later on, the modified system can be easily extended to enable joint spectrum sensing and DOA estimation. Similarly to the previous sampling schemes, the samples z(f ) can be expressed as a linear transformation of the unknown vector of slices x(f ), such that z(f ) = Ax(f ), f ∈ Fs . (19) Here, x(f ) is a non sparse vector that contains cyclic shifted, scaled and sampled versions of the active bands, as shown in Fig. 13. In contrast to the previous schemes, in this configuration, the matrix A, defined by j2πf1 τ1 ⎛e ⋮ ⎜ A=⎜ ⎜ ⎝ej2πf1 τM ⋯ ⋯ ej2πfN τ1 ⎞ ⋮ ⎟ ⎟, ⎟ j2πfN τM ⎠ e (20) depends on the unknown carrier frequencies. Two approaches are presented in [53] to recover the carrier frequencies of the transmissions composing the input signal. The first is based on CS algorithms and assumes that the carriers lie on a predefined grid. In this case, the resulting sensing matrix, which extends A with respect to the grid, is known and the expanded vector x(f ) is sparse. This leads to a similar system as (11) or (12) which can be solved using the recovery paradigm from [25], described in the context of multicoset sampling. In the second technique, the grid assumption is dropped and ESPRIT [40] is used to estimate the carrier frequencies. This approach first computes the sample covariance of the measurements z[n] as R = ∑ z[n]zH [n], (21) n and performs a singular value decomposition (SVD). The non zero singular values correspond to the signal’s subspace and the carrier frequencies are then estimated from these. Once the carriers are recovered, the signal itself is reconstructed by inverting the sampling matrix A in (19). The minimal number of sensors required by both reconstruction methods in noiseless settings is M = 2K, with each sensor sampling at the minimal rate of fs = B to allow for perfect signal recovery [53]. The proposed system thus achieves the minimal sampling rate 2KB derived in [25]. We note that the 10 𝑋(𝑓) 𝑝1 (𝑡) 𝐻(𝑓) −𝑓𝑠 𝑥(𝑡) 𝑝𝑀/𝑞 (𝑡) −𝑓𝑝 𝑓𝑠 Expander −𝑓𝑠 Support Recovery 𝑀 𝑞 𝑛𝑇𝑠 Low Rate A/D −𝑓𝑝 𝑓𝑝 −𝑓𝑝 𝑓𝑝 −𝑓𝑝 𝑓𝑝 Signal Reconstruction 𝐳 𝑛 = 𝐀𝐱 𝑛 𝐱 𝑛 = 𝐀†𝑠 𝐳[𝑛] 𝑧𝑚 (𝑓) 𝑓𝑠 Analog Front End - MWC 𝑓𝑝 Carrier Detection 𝐻(𝑓) 𝐱 (𝑓) 𝑧1 (𝑓) 𝑛𝑇𝑠 𝑀/𝑞 LNA + Filters 𝑓Nyq /2 ~ ~ 𝑓Nyq /2 −𝑓𝑝 𝑓𝑝 Digital Fig. 11. Schematic implementation of the MWC analog sampling front-end and digital signal recovery from low rate samples. expander strategy proposed in the context of the MWC can be applied in this configuration as well. 𝑥 𝑡 source 𝜃 𝑥(𝑡 − 𝜏1 ) 𝐻(𝑓) −𝑓𝑠 𝑛𝑇𝑠 𝑀 channels A. MWC Prototype 𝑥(𝑡 − 𝜏𝑀 ) 𝐻(𝑓) −𝑓𝑠 𝑛𝑇𝑠 𝑓𝑠 𝑝(𝑡) Fig. 12. ULA configuration with M sensors, with distance d between two adjacent sensors. Each sensor includes an analog front-end composed of a mixer with the same periodic function p(t), a LPF and a sampler, at rate fs . 0 0 0 0 0 0 (a) (b) IV. MWC H ARDWARE 𝑓𝑠 Fig. 13. The left pane shows the original source signals at baseband (before modulation). The right pane presents the output signals at baseband x(f ) after modulation, mixing, filtering and sampling. One of the main aspects that distinguish the sub-Nyquist MWC from other sampling schemes is its practical implementation [49], proving the feasibility of sub-Nyquist sampling even under distorting effects of analog components and physical phenomena. A hardware prototype, shown in Fig.14, was developed and built according to the block diagram in Fig. 11. In particular, the system receives an input signal with Nyquist rate of 6 GHz and spectral occupancy of up to 200 MHz, and samples at an effective rate of 480 MHz, that is only 8% of the Nyquist rate and 2.4 times the Landau rate. This rate constitutes a relatively small oversampling factor of 20% with respect to the theoretical lower sampling bound. This section describes the different elements of the hardware prototype, shown in Fig. 14, explaining the various considerations that were taken into account when implementing the theoretical concepts on actual analog components. At the heart of the system lies the proprietary MWC board [49] that implements the sub-Nyquist analog frontend. The card uses a high speed 1-to-4 analog splitter that duplicates the wideband signal to M = 4 channels, with an expansion factor of q = 5, yielding M q = 20 virtual channels after digital expansion. Then, an analog preprocessing step, composed of preliminary equalization, impedance corrections and gain adjustments, aims at maintaining the dynamic range and fidelity of the input in each channel. Indeed, the signal and mixing sequences must be amplified to specific levels before entering the analog mixers to ensure proper behavior emulating mathematical multiplication with the mixing sequences. The entire analog path of the multiband input signal can be seen in Fig. 15. 11 Fig. 14. MWC CR system prototype: (a) vector signal Generators, (b) FPGA mixing sequences generator, (c) MWC analog front-end board, (d) RF combiner, (e) spectrum analyzer, (f) ADC and DSP. Notes Value (q + 1) fp - Sampling rate 1/Tp Expansion factor # Hardware Channels fmax = fNyq /2 Bandwidth on each carrier Number of ±1 intervals in each Mp 305 period of pi (t) TABLE I T HE MWC PARAMETERS USED IN THE SETUP OF F IG . 14. fs fp q M /q fmax B 120 MHz 20 MHz 5 4 3 GHz 18.5 MHz Non-Uniform Freq. Response Splitter + Pre-Processing 𝑥(𝑡) Unknown Phase Noise & Harmonics Mixer AMP Splitter Noise LPF – Noise & Phase Shift LPF Quantization Noise + Phase Noise 𝑛𝑇𝑠 AMP ATT 𝑝𝑖 (𝑡) Digital Expander 𝑧𝑖 [𝑛] Sync Trigger + CLK 𝑛𝑇𝑠 Clock Delta Fig. 15. Hardware RF chain detailed schematics, including amplifiers, attenuators, filters, mixers, samplers and synchronization signals required for precise and accurate operation. The distortions induced by each component are indicated as well. The modulated signal next passes through an analog antialiasing LPF. The anti-aliasing filter must be characterized by both an almost linear phase response in the pass band between 0 to 50 MHz and an attenuation of more than 20 dB at fs /2 = 60 MHz. A Chebyshev LPF of 7th order with cut-off frequency (−3 dB) of 50 MHz was chosen for the implementation. After impedance and gain corrections, the signal now has a spectral content limited to 50 MHz, that contains a linear combination of the occupied bands with different amplitudes and phases, as seen in Fig. 9. Finally the low rate analog signal is sampled by a National Instruments© ADC operating at 120 MHz, leading to a total sampling rate of 480 MHz. The mixing sequences that modulate the signal play an essential part in signal recovery. They must have low crosscorrelations with each other, while spanning a large bandwidth determined by the Nyquist rate of the input signal, and yet be easy enough to generate with relatively cheap, off-the-shelf hardware. The sequences pi (t), for i = 1, . . . , 4, are chosen as truncated versions of Gold Codes [54], which are commonly used in telecommunication (CDMA) and satellite navigation (GPS). Mixing sequences based on Gold codes were found to give good results in the MWC system [55], primarily due to their small cross-correlations. Since Gold codes are binary, the mixing sequences are restricted to alternating ±1 values. This fact allows to digitally generate the sequences on a dedicated FPGA. Alternatively, they can be implemented on a small chip with very low power and complexity. The added benefit of producing the mixing sequences on such a platform is that the entire sampling scheme may be synchronized and triggered using the same FPGA with minimally added phase noise and jitter, keeping a closed synchronization loop with the samplers and mixers. A XiLinX VC707 FPGA acts as the central timing unit of the entire subNyquist CR setup by generating the mixing sequences and the synchronization signals required for successful operation. It is crucial that both the mixing period Tp and the low rate samplers operating at (q+1)fp (due to intended oversampling) are fully synchronized, in order to ensure correct modeling of the entire system, and consequently guarantee accurate support detection and signal reconstruction. The digital back-end is implemented using a National Instruments PXIe-1065 computer with DC coupled ADC. Since the digital processing is performed at the low rate fs , very low computational load is required in order to achieve real time recovery. MATLAB® and LabVIEW® environments are used for implementing the various digital operations and provide an easy and flexible research platform for further experimentations, as discussed in the next sections. The sampling matrix A is computed once off-line, using the calibration process 12 outlined in [50] and described in “Hardware Calibration of the MWC”. B. Support Recovery The prototype is fed with RF signals composed of up to 5 carrier transmissions with an unknown total bandwidth occupancy of up to 200 MHz, and Nyquist rate of 6 GHz. An RF input x(t) is generated using vector signal generators (VSG), each producing one modulated data channel with individual bandwidth of up to 20 MHz. The input transmissions then go through an RF combiner, resulting in a dynamic multiband input signal. This allows to test the system’s ability to rapidly sense the input spectrum and adapt to changes, as required by modern CR standards (see “IEEE 802.22 Standard for WRAN” for details). In addition, the described setup can simulate more complex scenarios, including collaborative spectrum sensing [56], [57], joint DOA estimation [53], cyclostationary based detection [58] and various modulation schemes such as PSK, OFDM and more, for verifying sub-Nyquist data reconstruction capabilities. Support recovery is digitally performed on the low rate samples, as presented above in the context of multicoset sampling. The prototype successfully recovers the support of the transmitted bands, when SNR levels are above 15 dB, as demonstrated in Fig. 16. More sophisticated detection schemes, such as cyclostationary detection, allow to achieve perfect support recovery from the same sub-Nyquist samples in lower SNR regimes of 0 − 10 dB, as seen in Fig. 27, and will be further discussed below. The main advantage of the MWC is that sensing is performed in real-time for the entire spectral range, even though the operation is performed solely on sub-Nyquist samples, which results in substantial savings in both computational and memory complexity. In additional tests, it is shown that the bandwidth occupied in each band can also be very small without impeding the performance, as shown in Fig. 17, where the support of signals with very low bandwidth (just 10% occupancy within the 20 MHz band) is correctly detected. C. Signal Reconstruction Once the support is recovered, the data is reconstructed from the sub-Nyquist samples, by applying (15). This step is performed in real-time, reconstructing the signal bands z[n] one sample at a time, with low complexity due to the small dimensions of the matrix-vector multiplication. We note that reconstruction does not require interpolation to the Nyquist grid. The active transmissions are recovered at the low rate of 20 MHz, corresponding to the bandwidth of the slices z(f ). The prototype’s digital recovery stage is further expanded to support decoding of common communication modulations, including BPSK, QPSK, QAM and OFDM. An example for the decoding of three QPSK modulated bands is presented in Fig. 18, where the I/Q constellations are shown after reconstructing the original transmitted signals xS using (15), from their low-rate and aliased sampled signals zn . The I/Q constellations of the baseband signals is displayed, each individually decoded using a general QPSK decoder. In this example, Fig. 16. Screen shot from the MWC recovery software: low rate samples acquired from one MWC channel at rate 120 MHz (top), digital reconstruction of the entire spectrum, performed from sub-Nyquist samples (middle), true input signal x(t) showed using a fast spectrum analyzer (bottom). Fig. 17. The setup is identical to Fig. 16. In this case, the individual transmissions have low bandwidth, highlighting the structure of the signal when folding to baseband. the user broadcasts text strings, that are then deciphered and displayed on screen. There are no restrictions regarding the modulation type, bandwidth or other parameters, since the baseband information is exactly reconstructed regardless of its respective content. Therefore, any digital modulation method, as well as analog broadcasts, can be transmitted and deciphered without loss of information, by applying any desirable decoding scheme directly on the sub-Nyquist samples. By combining both spectrum sensing and signal reconstruction, the MWC prototype serves as two separate communication devices. The first is a state-of-the-art CR that performs real time spectrum sensing at sub-Nyquist rates, and the second is a receiver able to decode multiple data transmissions simultaneously, regardless of their carrier frequencies, while adapting to spectral changes in real time. In cases where the 13 twice the Landau rate may exceed the Nyquist rate. Second, robustness to noise is increased due to the averaging performed to estimate statistics. This is drastically improved in the case of cyclostationary signals in the presence of stationary noise. Indeed, exploiting cyclostationarity properties exhibited by communication signals allows to separate them from stationary noise, leading to better detection in low SNR regimes [72]. In this section, we first review power spectrum detection techniques in stationary settings and then extend these to cyclic spectrum detection of cyclostationary signals. A. Power Spectrum Based Detection Fig. 18. Demodulation, reconstruction and detection of Nsig = 3 inputs from sub-Nyquist samples using the MWC CR prototype: I/Q phase diagrams, showing the modulation pattern of the transmitted bands after reconstruction from the low rate samples (top left), sub-Nyquist samples from an MWC channel zi [n] in the Fourier domain (middle), signal sampled by an external spectrum analyzer showing the entire bandwidth of 3 GHz (bottom), information sent on each carrier, proving successful reconstruction (top right). support of the potential active transmissions is a priori known (e.g. potential cellular carriers), the MWC may be used as an RF demodulator that efficiently acquires several frequency bands simultaneously. Other schemes would require a dedicated demodulation channel for each potentially active band. In this case, the mixing sequences should be designed so that their Fourier coefficients are non zero only in the bands of interest, increasing SNR, and the support recovery stage is not needed [59]. V. S TATISTICS D ETECTION In the previous section, we reviewed recent sub-Nyquist sampling methods that reconstruct a multiband signal, such as a CR signal, from low rate samples. However, the final goal of CRs often only requires detection and not necessarily perfect reconstruction of the PUs’ transmissions. In this regard, several works have proposed performing detection on secondorder signal statistics, which share the same frequency support as the original signal. In particular, power and cyclic spectra have been considered for stationary and cyclostationary [32] (see “Cyclostationarity”) signals, respectively. Instead of recovering the signal from the low rate samples, its statistics are reconstructed and its support is estimated [58], [60]–[71]. Recovering second-order statistics rather than the signal itself benefits from two main advantages. First, it allows to further reduce the sampling rate, as we will discuss below. Intuitively, statistics have less degrees of freedom than the signal itself, requiring less samples for their reconstruction. This follows from the assumption that the signal of interest is either stationary or cyclostationary. Going one step further, the sparsity constraint can even be removed in this case and the power/cyclic spectrum of non sparse signals can be recovered from samples obtained below the Nyquist rate [58], [60], [61], [65], [66], [70]. This is useful for CRs operating in less sparse environments, in which the lower bound of In the statistical setting, the signal x(t) is modeled as the sum of uncorrelated wide-sense stationary transmissions. The stationarity assumption is key to further reducing the sampling rate. In frequency, stationarity is expressed by the absence of correlation between distinct frequency components. Specifically, as shown in [73], the Fourier transform of a widesense stationary signal is a nonstationary white process, such that E[X(f1 )X ∗ (f2 )] = Sx (f1 )δ(f1 − f2 ). (24) Here, the power spectrum Sx (f ) of x(t) is the Fourier transform of its autocorrelation rx (τ ). Thus, obviously, the support of Sx (f ) is identical to that of X(f ). In this case, we will see that the autocorrelation matrix of the N spectrum frequency slices of x(t) contained in x(f ) is diagonal and presents only N degrees of freedom, which is key to sampling rate reduction. Another intuitive interpretation can be given in the time domain. The autocorrelation of stationary signals rx (τ ) = E [x(t)x(t − τ )] is a function only of the time lags τ and not of the sampling times t. Therefore, the autocorrelation recovery capabilities of a sampling set is determined by the density of the associated difference set, namely the set that contains the time lags. The cardinality of the difference set, which depends on the choice of sampling times, is, in the worst case, equal to twice that of the original set. This corresponds for example to a uniform sampling set. As a consequence, when the sampling scheme is not tailored to power spectrum recovery, the minimal required sampling rate in the blind setting is the Landau rate [66]. However, for an appropriate choice of sampling times [62], [74], the cardinality of the difference set can be on the order of the square of that of the original sampling set. In this case, under certain conditions, the density of the different set can be arbitrarily high even if the density of the sampling set goes to zero. With appropriate design, the autocorrelation or power spectrum may thus be estimated from samples with arbitrarily low average sampling rate [60]–[62], [74]–[76] at the expense of increased latency. We first review power spectrum recovery techniques that do not exploit any specific design. We then present methods that further reduce the sampling rate by adapting the sampling scheme to the purpose of autocorrelation or power spectrum estimation. 1) Power Spectrum Recovery: In this section, we first focus on sampling with generic MWC or multicoset schemes without specific design of the mixing sequences or cosets, respectively. 14 In the sampling system described above, the system matrix A is theoretically known and contains the Fourier series coefficients of the mixing sequences, such that Tp 2π 1 lt −j T Ail = cil = ∫ pi (t) e p dt . Tp (22) 0 When calculating the matrix coefficients using (22), perfect support recovery and signal reconstruction is guaranteed both theoretically and by numerical verification performed in software simulations. However, in practice, analog and physical distortions and imperfections affect the mixing and sampling process, and some modeling assumptions, that describe the system matrix in theory, no longer hold. The main effects that distort the transfer function are: ● The mixing procedure introduces nonlinearities. In general, mixers are intended to modulate narrowband signals with one sine carrier, as opposed to our mixing sequences that effectively contain over a hundred different harmonics. ● The analog filters have a non-flat frequency response, both in amplitude and phase. ● The actual design uses amplifiers and attenuators. These components exhibit non-linear frequency response. ● The phase noise and jitter, due to variations in components, cables and clock deltas lead to unknown and varying time shifts between the mixing and sampling stages. An accurate method for estimating the effective A is crucial for successful support recovery and signal reconstruction. An adaptive calibration scheme is proposed in [50]. The calibration procedure estimates the elements of A with no To recover Sx (f ) from the low rates samples z(f ) obtained via multicoset sampling or the MWC [66], consider the correlation matrix of the latter Rz (f ) = E[z(f )zH (f )]. From (11), Rz (f ) can be related to correlations between the slices x(f ), that is Rx (f ) = E[x(f )xH (f )], as follows Rz (f ) = ARx (f )AH , f ∈ Fs . (25) From (24), the correlation matrix Rx (f ) is diagonal and contains the power spectrum Sx (f ) at the corresponding frequencies, as fNyq ), f ∈ Fs . (26) 2 Recovering the power spectrum Sx (f ) is thus equivalent to recovering the matrix Rx (f ). Exploiting the fact that Rx (f ) is diagonal and denoting by rx (f ) its diagonal, (25) can be reduced to rz (f ) = (Ā ⊙ A)rx (f ), (27) Rx(i,i) (f ) = Sx (f + ifs − where rz (f ) = vec(Rz (f )) concatenates the columns of Rz (f ). The matrix Ā is the conjugate of A and ⊙ denotes the Khatri-Rao product [77]. prior knowledge on the mixing series pi (t) except for their period length Tp . Since our system is not time invariant (e.g. samplers), nor linear (e.g. mixers), one cannot find the entries of the system matrix by simply measuring its response to an impulse. To circumvent this difficulty, the system’s response is investigated for every frequency band of the spectrum by injecting known sinusoidal inputs sequentially. In each iteration, the following input xl (t) = αl sin [2π (lfp + f0 ) t] , l ∈ [0, 1, . . . , L0 ] , (23) is fed to the system. Here, f0 = 0.1fp was heuristically chosen and the amplitudes αl increase with l to compensate for the attenuation of the Fourier coefficients of the mixing sequences at high frequencies. Every sine wave corresponds to a specific spectral band and translates to a relevant column of the matrix A. The sub-Nyquist samples are then digitally processed to estimate the system matrix coefficients, column by column. Performance of the calibrated system is illustrated in Fig. 19. 1 Support Recovery Rate H ARDWARE C ALIBRATION OF THE MWC 0.8 0.6 Calibrated Matrix Theoretical Matrix 0.4 0.2 0 -10 0 10 20 30 40 50 SNR [dB] Fig. 19. Hardware reconstruction success rate of the calibrated matrix versus the theoretical matrix. Generic choices of the sampling parameters, either mixing sequences or cosets, which are only required to ensure that A is full spark, are investigated in [66]. The Khatri-Rao product (Ā ⊙ A) is full spark as well if M > N /2, that is the number of rows of A is at least half the number of slices N . The minimal sampling rate to recover rx (f ), and consequently Sx (f ), from rz (f ) in (27) is thus equal to the Landau rate KB, namely half the rate required for signal recovery [66]. The recovery of rx (f ) is performed using the procedure presented in the context of signal recovery on (27), that is CTF, support recovery and power spectrum reconstruction (rather than signal reconstruction). The same result for the minimal sampling rate is valid for non sparse signals, for which KB is on the order of fNyq [66]. The power spectrum of such signals can be recovered at half their Nyquist rate. This means that even without any sparsity constraints on the signal in crowded environments, a CR can retrieve its power spectrum by exploiting stationarity. In this case, the system (27) is overdetermined and rx (f ) is obtained by a simple pseudo-inverse operation. Obviously, in practice, we do not have access to Rz (f ), 15 which thus needs to be estimated. The overall sensing time is divided into Nf frames or windows of length Ns samples. In [66], different choices of Nf and Ns are examined for a fixed sensing time. In order to estimate the autocorrelation matrix Rz (f ) in the frequency domain, estimates of zi (f ), 1 ≤ i ≤ M , denoted by ẑi (f ), are first computed using the fast Fourier transform (FFT) on the samples zi [n] over a finite time window. The elements of Rz (f ) are then obtained by averaging the correlations between ẑi (f ) over the frames. In practice, the number of samples dictates the number of discrete Fourier transform (DFT) coefficients in the frequency domain and therefore the resolution of the reconstructed power spectrum. Once r̂x (f ) is reconstructed, several detection statistics can be computed such as power or eigenvalue based test statistics [78]. 2) Sampling Scheme Design: Sampling approaches specifically designed for estimating the autocorrelation of stationary signals at much finer lags than the sample spacings have been studied recently in detail [62], [74], [75], [79]. These rely on the observation that the autocorrelation is a function of the lags only, namely the differences between pairs of sampling times. Thus, the correlation may be estimated at time lags contained in the difference set, also referred to as the difference co-array, which is the set composed of all differences between pairs of sampling times. Since the size of the difference set may be greater than that of the original sampling set, depending on the choice of sampling times, we may need less sampling times for autocorrelation recovery than for signal recovery. Therefore, the sampling times should be carefully chosen so as to maximize the cardinality of the difference set. The first approach we present, for autocorrelation recovery at sub-Nyquist rates, adopts multicoset sampling and designs the cosets in (10) to obtain a maximal number of differences. In the previous section, the results were derived for any coset selection. Here, we show that the sampling rate may be lower if the cosets are carefully chosen. When using multicoset sampling, the sampling matrix A in (25) or (27), is a partial 2π Fourier matrix with (i, k)th element ej N ci k . A typical element j 2π (c −c )k i j of (Ā ⊙ A) is then e N . If all cosets are distinct, then the size of the difference set over one period is greater than or equal to 2M − 1. This bound corresponds to a worst case scenario, as discussed in the previous section and leads to a sampling rate of at least half Nyquist in the non sparse setting and at least Landau for a sparse signal with unknown support. This happens for example is we select the first or last M cosets or if we keep only the even or odd cosets. To maximize the size of the difference set and increase the rank of (Ā ⊙ A), the cosets can be chosen [62], [79] using minimal linear and circular sparse rulers [80]. A linear sparse ruler is a set of integers from the interval [0, N ], such that the associated difference sets contains all integers in [0, N ]. Intuitively, it may be viewed as a ruler with some marks erased but still able to measure all integer distances between 0 and its length. For example, consider the minimal sparse ruler of length N = 10. This ruler requires M = 6 marks, as shown in Fig. 20. Obviously, all the lags 0 ≤ τ ≤ 10 on the integer grid are identifiable. There is no closed form expression for the maximum compression ratio M /N that is achievable using a Fig. 20. Minimal sparse ruler of order M = 6 and length N = 10. sparse ruler; however, the following bounds hold √ τ (N − 1) M ≤ ≤ N N √ 3(N − 1) , N (28) where τ ≈ 2.4345 [79]. A circular or modular sparse ruler extends this idea to include periodicity. Such designs that seek minimal sparse rulers, that is rulers with minimal number of marks M√ , allow to achieve compression ratios M /N on the order of N . As N increases, the compression ratio may be arbitrarily low. Two additional sampling techniques specifically designed for autocorrelation recovery are nested arrays [74] and coprime sampling [75], presented in the context of autocorrelation estimation as well as beamforming and DOA estimation applications. In nested and co-prime structures, similarly to multicoset, the corresponding co-arrays have more degrees of freedom than those of the original arrays, leading to a finer grid for the time lags with respect to the sampling times. We now quickly review both sampling structures and their corresponding difference co-arrays and show how the autocorrelation of an arbitrary stationary signal can be recovered on the Nyquist grid from low rate samples. In its simplest form, the nested array [74] structure has two levels of sampling density. The first level samples are at the N1 locations {`TNyq }1≤`≤N1 and the second level samples are at the N2 locations {(N1 + 1)kTNyq }1≤k≤N2 . This nonuniform sampling is then repeated with period (N1 + 1)N2 TNyq . Since there are N1 + N2 samples in intervals of length (N1 + 1)N2 TNyq , the average sampling rate of a nested array sampling set is given by fs = N1 + N2 1 1 ≡ + . (N1 + 1)N2 TNyq N1 TNyq N2 TNyq (29) This rate can be arbitrarily low since N1 and N2 may be as large as we choose, at the expense of latency. Now, consider the difference co-array which has contribution from the cross-differences and the self-differences. The non negative cross-differences, normalized by TNyq for clarity, are given by n = (N1 + 1)k − `, 1 ≤ k ≤ N2 , 1 ≤ ` ≤ N1 . (30) All differences in the range 1 ≤ n ≤ (N1 + 1)N2 − 1 are covered, except for multiples of N1 +1. These are are precisely the self differences among the second array. As a result, the difference co-array is a filled array composed of all integers −[(N1 + 1)N2 − 1] ≤ n ≤ [(N1 + 1)N2 − 1]. Going back to our autocorrelation estimation problem, this result shows that by proper averaging, we can estimate R(τ ) at any lag τ on the 16 Nyquist grid from nested array samples with arbitrarily low sampling rate, as ⎧ Q−1 ⎪ 1 ⎪ ⎪ n = Ñ k − `, ∑ x(Ñ (k + q))x∗ (` + Ñ q), ⎪ Q ⎪ q=0 ⎪ R̂[n] = ⎨ Q−1 ⎪ 1 ⎪ ⎪ x(Ñ (k + q))x∗ (Ñ (` + q)), n = Ñ (k − `) , ⎪ Q ∑ ⎪ ⎪ ⎩ q=0 (31) where Q is the number of snapshots used for averaging, and Ñ = N1 + 1. Here k and ` are such that (30) holds. Another sampling technique designed for autocorrelation recovery is co-prime sampling. It involves two uniform sampling sets with spacing N1 TNyq and N2 TNyq respectively, where N1 and N2 are co-prime integers. The average sampling rate of such a sampling set, given by fs = 1 1 + , N1 TNyq N2 TNyq (32) can again be made arbitrarily small compared to the Nyquist rate 1/TNyq by choosing arbitrarily large co-prime numbers N1 and N2 . The associated difference set, normalized by TNyq , is composed of elements of the form n = N1 k − N2 `. Since N1 and N2 are co-prime, there exist integers k and ` such that the above difference achieves any integer value n. Therefore, the autocorrelation may be estimated by proper averaging, as 1 Q−1 ∗ R̂[n] = ∑ x(N1 (k + N2 q))x (N2 (` + N1 q)), Q q=0 general background on cyclostationarity and then review subNyquist cyclostationary detection approaches. 1) Cyclic Spectrum Recovery: In the previous section, we showed how the power spectrum Sx (f ) can be reconstructed from correlations Rz (f ) between the samples obtained using the MWC or multicoset sampling. To that end, we first related Sx (f ) to the slices’ correlation matrix Rx (f ) and then recovered the latter from Rz (f ). Here, this approach is extended to the cyclic spectrum Sxα (f ). We first show how it is related to shifted correlations between the slices, namely Rax (f˜) = E [x(f˜)xH (f˜ + a)], for a ∈ [0, fs ] and f˜ ∈ [0, fs − a]. Next, similarly to power spectrum recovery, Rax (f˜) is reconstructed from shifted correlations of the samples Raz (f˜) = E [z(f˜)zH (f˜ + a)]. Once the cyclic spectrum Sxα (f ) is recovered, the transmissions’ carriers and bandwidth may be estimated by locating its peaks. Since the cyclic spectrum of stationary noise n(t) is zero for α ≠ 0, cyclostationary detection is more robust to noise than stationary detection. The alternative definition of the cyclic spectrum (38), presented in the cyclostationary box, implies that the elements in the matrix Rax (f˜) are equal to Sxα (f ) at the corresponding α and f . Indeed, it can easily be shown [58] that Rax (f˜)(i,j) = Sxα (f ), for (33) α where k and ` are such that n = N1 k − N2 `. The main drawback of both techniques, besides the practical issue of analog bandwidth similarly to multicoset sampling, is the added latency required for averaging. Furthermore, in practice, synchronizing ADCs with different sampling rates can be challenging. Finally, nested array sampling still requires one sampler operating at the Nyquist rate. Thus, there is no saving in terms of hardware, but only in memory and computation. f B. Cyclostationary Detection Communication signals often exhibit statistical periodicity, due to modulation schemes such as carrier modulation or periodic keying [81]. Therefore, such signals are cyclostationary processes [72]. A characteristic function of these processes, the cyclic spectrum Sxα (f ), exhibits spectral peaks at the cyclic frequencies, which are determined by the signal’s parameters of periodicity, such as the carrier frequency and symbol rate [72]. The formal definition of the cyclic spectrum is presented in “Cyclostationarity”. Cyclostationary based detection distinguishes between the signals of interest, assumed to be cyclostationary, and stationary noise and interference by measuring spectral correlation [72]. Since stationary noise and interference exhibit no spectral correlation, as shown in (24), such detectors are highly robust to noise. With noise enhancement being one of the main limitations of subNyquist sampling based techniques, cyclostationary detection performed on the reconstructed cyclic spectrum from compressive measurements is a natural candidate for improving sub-Nyquist detection. In this section, we first provide some (39) = (j − i)fs + a fNyq ˜ fs (j + i)fs a +f − + + . = − 2 2 2 2 (40) Here Rax (f˜)(i,j) denotes the (i, j)th element of Rax (f˜). This means that each entry of the cyclic spectrum Sxα (f ) can be mapped to an element from one of the correlation matrices Rax (f˜), and vice versa. From (11) and similarly to (25) in the context of power spectrum recovery, we relate the shifted correlation matrices of x(f ) and z(f ) as Raz (f˜) = ARax (f˜)AH , f˜ ∈ [0, fs − a] , (41) for all a ∈ [0, fs ]. Recall that, in the context of stationary signals, Rx (f ) is diagonal. Here, understanding the structure of Rax (f˜) is more involved. In [58], it is shown that Rax (f˜) contains non zero elements on its 0, 1 and −1 diagonals and antidiagonals. Besides the non zero entries being contained only in the three main and anti-diagonals, additional structure is exhibited, limiting to two the number of non zero elements per row and column of the matrix Rax (f˜). The above pattern follows from two main considerations. First, each frequency component, namely each entry of x(f ), is correlated to at most two frequencies from the shifted vector of slices x(f˜+a), one from the same frequency band and one from the symmetric band. Second, the correlated component can be either in the same/symmetric slice or in one of the adjacent slices. Figures 24 and 25 illustrate these correlations for a = 0 and a = fs /2, respectively. First, in Fig. 23, a sketch of the spectrum of x(t), namely X(f ), is presented for the case of a sparse signal buried in stationary noise. It can be seen that frequency bands of X(f ) may either appear in one fp slice or split between two slices at most since fp ≥ B. The 17 C YCLOSTATIONARITY Then, from [73], it holds that Cyclostationary processes have statistical characteristics that vary periodically with time. Examples of periodic phenomena that give rise to random data abound in engineering and science. In particular, in communications, periodicity arises from the underlying data modulation mechanisms, such as carrier modulation, periodic keying or pulse modulation [81]. A characteristic function of such processes, referred to as the cyclic spectrum, extends the traditional power spectrum to a two dimensional map, with respect to two frequency variables, angular and cyclic. The cyclic spectrum exhibits spectral peaks at certain frequency locations, the cyclic frequencies, which are determined by the signal’s parameters, particularly the carrier frequency and symbol rate [72]. A process x(t) is said to be wide-sense cyclostationary with period T0 if its mean µx (t) = E[x(t)] and autocorrelation Rs (t, τ ) = E[x(t)x(t + τ )] are both periodic with period T0 [32], that is µx (t + T0 ) = µx (t), Rx (t + T0 , τ ) = Rx (t, τ ), (34) Sxα (f ) = Suv (f ) = E [X (f + (35) α where the sum is over integer multiples of the fundamental frequency 1/T0 and the Fourier coefficients Rxα (τ ) are referred to as cyclic autocorrelation functions. The cyclic spectrum is obtained by taking the Fourier transform of the cyclic autocorrelation functions with respect to τ , namely Sxα (f ) = ∫ ∞ −∞ Rxα (τ )e−j2πf τ dτ, (36) where α is referred to as the cyclic frequency and f is the angular frequency [32]. If there is more than one fundamental frequency 1/T0 , then the process x(t) is said to be polycyclostationary in the wide sense. In this case, the cyclic spectrum contains harmonics (integer multiples) of each of the fundamental cyclic frequencies [72]. These cyclic frequencies are governed by the transmissions’ carrier frequencies and symbol rates as well as modulation types. An alternative and more intuitive interpretation of the cyclic spectrum expresses it as the cross-spectral density Sxα (f ) = Suv (f ) of two frequency-shifted versions of x(t), u(t) and v(t), such that u(t) ≜ x(t)e−jπαt , v(t) ≜ x(t)e+jπαt . (37) resulting vector of spectrum slices x(f ) and the correlations between these slices without any shift, namely R0x (f˜), are shown in Fig. 24(a) and (b), respectively. In Fig. 24(b), we observe that self-correlations appear only on the main diagonal since every frequency component is correlated with itself. In particular, the main diagonal contains the noise’s power spectrum (in green). Cross-correlations between the yellow symmetric triangles appear in the 0-anti diagonal, whereas (38) As expressed in (38), the cyclic spectrum Sxα (f ) measures correlations between different spectral components of x(t). Stationary signals, which do not exhibit spectral correlation between distinct frequency components, appear only at α = 0. This property is the key to robust detection of cyclostationary signals in the presence of stationary noise, in low SNR regimes. The support region in the (f, α) plane of the cyclic spectrum of a bandpass cyclostationary signal is composed of four diamonds, as shown in Fig. 21. Thus, the cyclic spectrum Sxα (f ) of a multiband signal with K uncorrelated transmissions is supported over 4K diamond-shaped areas. Figure 22 illustrates the cyclic spectrum of two modulation types, AM and BPSK. 𝛼 for all t ∈ R. Given a wide-sense cyclostationary random process, its autocorrelation Rx (t, τ ) can be expanded in a Fourier series Rx (t, τ ) = ∑ Rxα (τ )ej2παt , α α ) X ∗ (f − )] . 2 2 2𝑓𝑐 −𝑓𝑐 𝑓𝑐 𝑓 2𝐵 −2𝑓𝑐 𝐵 Fig. 21. Support region of the cyclic spectrum of a bandpass cyclostationary signal with carrier frequency fc and bandwidth B. Fig. 22. Cyclic spectrum magnitude of bandpass signals with (a) AM modulation and (b) BPSK modulation. those of the blue trapezes are contained in the −1 and +1 anti diagonals. The red rectangles do not contribute any crosscorrelations for a = 0. Figures 25(a) and (b) show the vector x(f˜) and its shifted version x(f˜ + a) for a = fs /2, respectively. The resulting correlation matrix Rax (f˜) appears in Figure 25(c). Here, the self correlations of the yellow triangle appear in the main diagonal and that of the blue trapeze in the −1 diagonal. The 18 Fig. 23. Original spectrum X(f ). The cyclostationary transmissions are shown in yellow, blue and red, buried in stationary noise in green. Fig. 26. Carrier frequency and bandwidth estimation from the cyclic spectrum: preprocessing (left), thresholding and clustering (middle), parameter estimation (right). Fig. 24. (a) Spectrum slices vector x(f˜), (b) correlated slices of x(f˜) in the matrix R0x (f˜). cross-correlations all appear in the anti-diagonal, for the shift a = fs /2. Note that since the noise is assumed to be widesense stationary, from (24), a noise frequency component is correlated only with itself. Thus, n(t) only contributes nonzero elements on the diagonal of R0x (f˜). To recover Rax (f˜) from Raz (f˜), structured CS techniques are used in [58] that aim at reconstructing a sparse matrix while taking into account its specific structure, as described above. Once the cyclic spectrum is reconstructed, the number of transmissions and their respective carrier frequencies and bandwidths are estimated, as discussed in the next section. The detection performed on the cyclic spectrum is more robust to stationary noise than power spectrum based detection, at the expense of a slightly higher sampling rate, as shown in [58]. More precisely, in the presence of stationary noise, the cyclic spectrum may be reconstructed from samples obtained at 4/5 of the Nyquist rate, without any sparsity assumption on the signal. If the signal of interest is sparse, then the minimal sampling rate is further reduced to 8/5 of the Landau rate [58]. Fig. 25. (a) Spectrum slices vector x(f˜), (b) spectrum slices shifted vector x(f˜ + a), for a = fs /2, (c) correlated slices of x(f˜) and x(f˜ + a) in the ˜ matrix Ra x (f ), with a = fs /2. 2) Carrier frequency and bandwidth estimation: Many detection and classification algorithms based on cyclostationarity have been proposed (see reviews [32], [33]). We first survey several detection and classification approaches and then explain why they do not adhere to CR requirements. To assess the presence or absence of a signal, a first group of techniques requires a priori knowledge of its parameters and particularly of the carrier frequency [82]–[87], which is the information that CRs needs to determine in the first place. A second strategy focuses on a single transmission [84], [88], which does not fit the multiband model. Alternative approaches apply machine learning tools to the modulation classification of a single signal with unknown carrier frequency and symbol rate [89]–[92]. Besides being only suitable for a single transmission, these methods require a training phase. Thus, these techniques can only cope with PUs whose modulation type and parameters were part of the training set. For CR purposes, we seek a detector designed to comply with the following requirements: (1) carrier frequency and bandwidth estimation rather than simple detection of the presence or absence of a signal; (2) blind detection, namely without knowledge of the carrier frequencies, bandwidths and symbol rates of the transmissions; (3) simultaneous detection of several transmissions; (4) preferably a non-learning approach, i.e. with no training phase. The parameter estimation algorithm, presented in [93], is a simple parameter extraction method from the cyclic spectrum of multiband signals, that satisfies these requirements. It allows the estimation of several carriers and bandwidths simultaneously, as well as the number of transmissions, namely half the number of occupied bands K/2 for real-valued signals. The proposed parameter estimation algorithm can be decomposed into four main steps: preprocessing, thresholding, clustering and parameter estimation, as illustrated in Fig. 26. The preprocessing simply aims at compensating for the presence of stationary noise in the cyclic spectrum at the cyclic frequency α = 0, by attenuating the energy of the cyclic spectrum at this frequency. Thresholding is then applied to the resulting cyclic spectrum in order to find its peaks. The locations and values of the selected peaks are then clustered using k-means to find the corresponding cyclic feature, after estimating the number of clusters by applying the elbow method [94]. It follows that, apart from the cluster present in DC, the number of real signals, namely Nsig = K/2, is equal to half the number of clusters. Next, the carrier frequency fi , which corresponds to the highest peak [72], is estimated for 19 each transmission. The bandwidth Bi is found by locating the edge of the support of the angular frequencies at the corresponding cyclic frequency αi = 2fi . Results presented in [58] demonstrate that cyclostationary based detection as described in this section outperforms energy detection carried on the signal’s spectrum or power spectrum, at the expense of increased complexity. We now show similar results obtained from hardware simulations, performed using the prototype from Fig. 14. C. Hardware Simulations: Robustness to Noise Cyclostationary detection has been implemented in the MWC CR prototype. The analog front-end is identical to that of the original prototype and only the digital recovery part is modified since the cyclic spectrum is recovered directly from the MWC low rate samples. Preliminary testing suggests that sensing success is still achievable at SNRs lower by 10 dB than those allowed by energy detection performed on the recovered spectrum or power spectrum. Representative results shown in Fig. 27 demonstrate the advantage of cyclostationary detection over energy detection in the presence of noise. The figure presents the reconstructed cyclic spectrum from samples of the MWC prototype, as well as cross-sections at f = 0 and α = 0, which corresponds to the power spectrum. This increased robustness to noise comes at the expense of more involved digital processing on the low rate samples. The additional complexity stems from the higher dimensionality involved, since we reconstruct the 2-dimensional cyclic spectrum rather than the 1-dimensional (power) spectrum. VI. C OLLABORATIVE S PECTRUM S ENSING A. Collaborative Model Until now, we assumed direct observation of the spectrum. In practice, the task of spectrum sensing for CR is further complicated due to physical channel effects such as path loss, fading and shadowing [34]–[36], as described in the channel box. To overcome these practical issues, collaborative CR networks have been considered, where different users share their sensing results and cooperatively decide on the licensed spectrum occupancy. The different collaborative approaches can be distinguished according to several criteria [34]. First, cooperation can be either centralized or distributed. In centralized settings, the data is sent to a fusion center which combines the shared data to jointly estimate the spectrum or determine its occupancy. In the distributed approach, the CRs communicate among themselves and iteratively converge to a common estimate or decision. While centralized cooperation does not require iterations and can reach the optimal estimate based on the shared data, convergence to this estimate is not always guaranteed in its distributed counterpart. On the other hand, the latter is less power hungry and more robust to node and link failure, increasing the network survivability. An additional criterion concerns the shared data type; the CRs may share local binary decisions on the spectrum occupation (hard decision) or a portion of their samples (soft decision). We consider the following collaborative model. A network of Nrec CRs receives the Nsig transmissions, such that the received signal at the jth CR is given by Nsig Nsig i=1 i=1 x(j) (t) = ∑ rij (t) = ∑ si (t) ∗ hij (t). (46) The channel response hij (t) is determined by fading and shadowing effects. Typical models are Rayleigh fading, or small-scale fading, and log-normal shadowing, or large-scale fading [35], [36], [95], as described in “Channel Fading and Shadowing”. In the frequency domain, the Fourier transform of the jth received signal is given by Nsig X (j) (f ) = ∑ Si (f )Hij (f ). (47) i=1 Therefore, the support of x(j) (t) is included in the support of the original signal x(t). Since the transmissions are affected differently by fading and shadowing from each transmitter to each CR, we can assume that the union of their respective supports is equivalent to the frequency support of x(t). The goal here is to assess the support of the transmitted signal x(t) from sub-Nyquist samples of the received x(j) (t), 1 ≤ j ≤ Nrec , by exploiting their joint frequency sparsity. A simple and naive approach is to perform support recovery at each CR from its low rate samples and combine the local binary decisions, either in a fusion center for centralized collaboration or in a distributed manner. In this hard decision strategy, the combination can be performed using several fusion rules such as AND, OR or majority rule. Although this method is attractive due to its simplicity and low communication overhead, it typically achieves lower performance than its soft decision counterpart. To mitigate the communication overhead, soft decision based methods may rely on sharing observations based on the low rate samples, rather than the samples themselves. In the next section, we review such techniques both in centralized and distributed contexts. B. Centralized Collaborative Support Recovery One approach [97], [98] to centralized spectrum sensing considers a digital model based upon a linear relation between the M sub-Nyquist samples z(j) at CR j and N Nyquist samples x(j) obtained for a given sensing time frame, namely z(j) = Ax(j) , (48) where A is the sampling matrix. This model has been extensively studied by Leus et al. [97]–[99]. In all these works, the channel state information (CSI) is assumed to be known and the joint power spectrum of x is reconstructed, where x denotes the N × 1 vector of Nyquist samples. CSI is traditionally unknown by the CRs and should be estimated prior to detection to enable the use of this method. The autocorrelation of the Nyquist samples is first related to that of the sub-Nyquist samples. Then, in [97], the common sparsity of rx (j) is exploited in the frequency domain across all CRs to jointly reconstruct them at the fusion center, using a modified 20 Fig. 27. Screen shot from the MWC with cyclostationary detection. The input signal is composed of Nsig = 3 transmissions (or K = 6 bands) with carriers f1 = 320MHz, f2 = 600MHz and f3 = 860MHz. Recovered cyclic spectrum from low rate samples (left), cyclic spectrum profile at the angular frequency f = 0, where the cyclic peaks are clearly visible at twice the carrier frequencies (middle), power spectrum recovery failing in the presence of noise (right). C HANNEL FADING AND S HADOWING Analog signals transmitted over physical channels are affected by two main phenomena: Rayleigh fading, or small-scale fading, and log-normal shadowing, or large-scale fading [35], [36], [95]. The received signal is generally described in terms of the transmitted signal si (t) convolved with the impulse response of the channel hij (t), namely rij (t) = si (t) ∗ hij (t), (42) where rij (t) is the received signal corresponding to the ith transmission at the jth CR and ∗ denotes convolution. Fading and shadowing affect the channel response hij (t). Rayleigh fading: For most practical channels, the free-space propagation model, which only accounts for path loss, is inadequate to describe the channel. A signal typically travels from transmitter to receiver over multiple reflective paths, which is traditionally modeled as Rayleigh fading. This implies that the amplitude and phase of the channel response hij (t) = R(t)ejφ(t) are stochastically independent and identically distributed processes. The amplitude R(t), for t ∈ R, follows the Rayleigh distribution, given by pR (r) = { r −r 2 /2σ 2 e σ2 0 r≥0 otherwise, (43) where 2σ 2 is the mean power [95]. The phase φ(t), for t ∈ R, is uniformly distributed over the interval [0, 2π). simultaneous orthogonal matching pursuit (SOMP) [41] algorithm. In [98], [99], besides exploiting joint sparsity, crosscorrelations between measurements from different CRs are used, namely Rzj zk , where j and k are the indices of two CRs. These cross-correlations are related to the common power spectrum sx = Frx . It is shown that if the total number of samples Nrec M is greater than N and these are suitably chosen to account for enough measurement diversity, then the power spectrum sx of a non sparse signal can be recovered from compressed samples from a sufficient number of CRs. This shows that the number of receivers may be traded for the number of samples per CR. However, increasing the number of samples per CR does not increase spatial diversity, as does Log-normal shadowing: Large-scale fading represents the average signal power attenuation or path loss due to motion over large areas. The resulting channel frequency response is therefore a constant. This phenomenon is affected by prominent terrain contours between the transmitter and receiver. Empirical measurements suggest that this type of fading, or shadowing, follows a normal distribution in dB units [96], or alternatively, the linear channel gain may be modeled as a log-normal random variable [36]. Therefore, the path loss (PL) measured in dB is expressed as P L = P L0 + 10γ log d + Xσ . d0 (44) Here, the reference distance d0 corresponds to a point located in the far field of the antenna (typically 1 km for large cells). The path loss to the reference point P L0 is usually found through field measurements or calculated using free-space path loss. The value of the path loss exponent γ depends on the frequency, antenna heights, and propagation environment. Finally, Xσ denotes a Gaussian random variable (in dB) with variance σ 2 determined heuristically as well [95]. The shadowed received signal is thus given by rij (t) = 10−P Lij /20 ⋅ si (t), (45) where P Lij denotes the path loss between the ith transmitter and the jth receiver and the channel response hij (t) = 10−P Lij /20 δ(t). increasing the number of receivers. An alternative approach [57] relies on the analog model from (11) and does not assume any a priori knowledge on the CSI. This method considers collaborative spectrum sensing from samples acquired via multicoset sampling or the MWC at each CR. In this approach, the jth CR shares its observation matrix V(j) , as defined in (14), rather than the sub-Nyquist samples themselves, and its measurement matrix A(j) , with a fusion center. The sampling matrices are considered to be different from one another in order to allow for more measurement diversity. However, the same known matrix can be used to reduce the communication overhead. The underlying matrices U(j) are jointly sparse since fading (42), (43) and 21 shadowing (45) do not affect the original signal’s support. Capitalizing on the joint support of U(j) , the support of the transmitted signal x(t) is recovered at the fusion center by solving arg min U(j) s.t. N ⋃i=1rec ∣∣U(j) ∣∣0 (49) V(j) = A(j) U(j) , for all 1 ≤ j ≤ Nrec . To recover the joint support of U(j) from the observation matrices V(j) , both OMP and IHT, described in “Compressed Sensing Recovery”, are extended to the collaborative setting [57]. Previously we considered support recovery from an individual CR, which boils down to an MMV system of equations (14). CS algorithms have been extended to this case, such as SOMP from [100] and simultaneous IHT (SIHT) presented in [101]. These now need to account for the joint sparsity across the CRs. The distributed CS-SOMP (DCS-SOMP) algorithm [102], which extends the original SOMP to allow for different sampling matrices A(j) for each receiver, is adapted to the CR collaborative setting in [57]. The main modification appears in the computation of the index that accounts for the greatest amount of residual energy. Here, the selected index is the one that maximizes the sum of residual projections over all the receivers. Once the shared support is updated, the residual matrices can be computed for each CR separately. The resulting modified algorithm is referred to as block sparse OMP (BSOMP) [57]. Next, the block sparse IHT (BSIHT) algorithm [57] extends SIHT by selecting the indices of the common support though averaging over all the estimated U(j) in each iteration. Once the support is selected, the update calculations are performed separately for each receiver. Both methods are suitable for centralized cooperation, in the presence of a fusion center. As in the previous approach, if the CSI is known, then the sampling rate per CR can be reduced by a factor of Nrec with respect to the rate required from an individual CR. C. Distributed Collaborative Support Recovery In the distributed approach, there is no fusion center and the CRs can only communicate with their neighbors. Both the digital and analog centralized approaches have been extended to the distributed settings. In [103], [104], a digital model (48) is used where the spectrum is divided into N known slots. Both unknown and known CSI cases are considered. In the first case, each CR computes its local binary decision for each spectral band by recovering the sparse spectrum using CS techniques. Then, an average consensus approach is adopted, with respect to the shared hard decision. If the CSI is known, similarly to [98], [99], then the spectrum is recovered in a distributed fashion. In [103], the proposed algorithm iterates through the following steps: local spectrum reconstruction given the support and consensus averaging on the support. In [104], a distributed augmented Lagrangian is adopted. The centralized approach, based on the analog model (11), presented in [57], is modified in [56] to comply with distributed settings. The ith CR contacts a random neighbor j, chosen with some probability Pij , according to the MetropolisHastings scheme for random transition probabilities, ⎧ ⎪ min{ d1i , d1j } ⎪ ⎪ ⎪ Pij = ⎨ ∑(i,k)∈E max{0, d1 − i ⎪ ⎪ ⎪ ⎪ ⎩ 0 1 } dk (i, j) ∈ E, i = j, otherwise. (50) Here di denotes the cardinality of the neighbor set of the ith CR and E is the set of communication links between CRs in the network. A single vector, computed from the low rate samples (and that will be defined below for each recovery algorithm), is passed between the CR nodes in the network, rather than the samples themselves, effectively reducing communication overhead. When a CR receives this vector, it performs local computation to update both the shared vector and its own estimate of the signal support accordingly. Finally, the vector is sent to a neighbor CR, chosen according to the random walk with probability (50). Two distributed algorithms are presented in [56]. The first, distributed one-step greedy algorithm (DOSGA), extends the OSGA from [102] to distributed settings. The second method, referred to as randomized distributed IHT (RDSIHT), adapts the centralized BSIHT [57] to the distributed case. To describe the DOSGA algorithm, we first present its centralized counterpart OSGA. Each CR computes the `2 norm of the projections of the observation matrix V(j) onto the columns of the measurement matrix A(j) , stored in the vector w(j) of size N . The fusion center then averages over all receivers’ vectors, such that ŵ = 1 Nrec (j) ∑w , Nrec j=1 (51) and retains the highest values of ŵ whose indices constitute the support of interest. In the absence of a fusion center, finding this average is a standard distributed average consensus problem, also referred to as distributed averaging or distributed consensus. DOSGA [56] then uses a randomized gossip algorithm [105] for this purpose, with the Metropolis-Hastings transition probabilities. Next, we turn to the RDSIHT algorithm, which adapts the centralized BSIHT algorithm [57] to the distributed scenario. The distributed approach from [56] was inspired by the randomized incremental subgradient method proposed in [106], and recent work on a stochastic version of IHT [107]. A vector w of size N , that sums the `2 -norms of the rows of the estimates of U(j) before thresholding, is shared in the network through random walk. The indices of its k largest values correspond to the current estimated support. When the ith CR receives w, it locally updates it by performing a gradient step using its own objective function that is then added to w. Next, it selects a neighbor j to send the vector to with probability Pij (50). The joint sparsity across the CRs is exploited by sharing one common vector w by the network. It is shown numerically in [56] that both DOSGA and RDSIHT converge to their centralized counterparts. 22 D. Hardware Simulations: Collaborative vs. Individual Spectrum Sensing We now confirm that the collaborative algorithms for spectrum sensing perform better than their individual counterparts by demonstrating a collaborative setting implemented using the MWC CR prototype, as can be seen in Fig. 28. During the conducted experiments, Nrec = 5 CR receivers, spread across different locations are emulated, denoted by white circles on the transmitter/receiver map. The transmitters are also positioned in various locations depicted by green x-marks. The transmitter positions and broadcasts mimic the effects of physical channel phenomena, i.e. fading and shadowing. The frequency support recovered by each of the CRs is false, since they individually receive only a partial spectral image of their surroundings, as expected in a real-world scenario. In all simulated scenarios, collaborative spectrum sensing outperforms detection realized by individual CRs. This result is expected, since the soft collaborative methods take advantage of the spatial deployment of the receivers to reproduce the exact spectral map of the environment. Moreover, the centralized and distributed algorithms BSOMP, BSIHT and RDSIHT, based on soft decisions, showed superior results in comparison with a hard decision method. The same result can be seen in Fig. 28, where the hard decision support algorithm (Hard Co-Op) fails to recover the entire active frequency support (depicted by red bins). VII. J OINT C ARRIER F REQUENCY AND D IRECTION E STIMATION Many signal processing applications, including CR, may require or at least benefit from joint spectrum sensing and DOA estimation. In order for CRs to map vacant bands more efficiently, spatial information about the PUs’ locations can be of great interest. Consider the network of CRs presented in Fig. 29 and focus on CR1. Now, picture a scenario where PU2, with angle of arrival (AOA) θ2 with respect to CR1, is transmitting in a certain frequency band with carrier f2 . Assuming that CR2 does not receive PU2’s transmission, CR1 could transmit in the same frequency band in the opposite direction of PU2 towards CR2. DOA estimation can thus enhance CR performance by allowing exploitation of vacant bands in space in addition to the frequency domain. A. Model and System Description To formulate our problem mathematically, assume that the input signal x(t) is composed of Nsig source signals si (t) with both unknown and different carrier frequencies fi and AOAs θi . The main difference between this scenario and the one that has been discussed in the previous sections is the additional unknown AOAs θi . Figure 29 illustrates this signal model. To recover the unknown AOAs, an array of sensors is required. A similar problem thoroughly treated in the literature, is the 2D-DOA recovery problem, where two angles are traditionally recovered and paired. In our case, the second variable is the signal’s carrier frequency instead of an additional angle. B. Multicoset Approach A few works have recently considered joint DOA and spectrum sensing of multiband signals from sub-Nyquist samples. In [108] and [109], low rate samples are obtained using the multicoset sampling scheme. In [108], which considers the digital model (48), both time and spatial compression are applied by selecting samples from the Nyquist grid and receivers from a uniform linear array (ULA), such that Z[n] = Cs X[n]Ct . (52) Here, X[n] is the matrix of Nyquist samples from all receivers in the ULA and the selection matrices Cs and Ct operate on the spatial and time domain, respectively, to form the matrix of compressed samples Z[n]. The 2D power spectrum matrix of the underlying signal is then reconstructed from the samples, where every row describes the power spectrum in the frequency domain for a given AOA and every column corresponds to the power spectrum information in the angular domain for a given frequency. In [109], an L-shaped array with two interleaved, or multicoset channels, with a fixed delay between the two, samples the signal below the Nyquist rate. Then, exploiting correlations between samples from the direct path and its delayed version, the frequencies and their corresponding AOAs are estimated using MUSIC [38], [39]. However, the pairing issue between the two, that is matching each frequency with its corresponding angle, is not discussed. In the next section, we describe the compressed carrier and DOA estimation (CaSCADE) system, presented in [53], that utilizes the sampling principles of the MWC. This technique addresses the pairing issue and avoids the hardware issues involved in multicoset sampling. C. The CaSCADE System The CaSCADE system implements the modified, or ULA based, MWC over an L-shaped array with 2M − 1 sensors (M sensors along the y axis and M sensors along the z axis including a common sensor at the origin) in the yz plane. Each transmission si (t) impinges on the array with its corresponding AOA θi , as shown in Fig. 30. The array sensors have the same sampling pattern as the alternative MWC. Each sensor is composed of an analog mixing frontend, implementing one physical branch of the MWC, that includes a mixer, a LPF and a sampler. By treating the L-shaped array as two orthogonal ULAs, one along the y axis and the other along the z axis, two systems of equations similar to (19) can be derived. For the ULA along the y axis, we obtain y(f ) = Ay x(f ), f ∈ Fs , (53) where ⎡ ej2πf1 τ1y (θ1 ) ⎢ ⎢ ⋮ ⎢ Ay = ⎢ ⎢ ⎢ j2πf τ y (θ ) ⎢e 1 M 1 ⎣ ⋯ ⋯ ej2πfK τ1 (θK ) ⎤⎥ ⎥ ⋮ ⎥ ⎥, ⎥ ⎥ y j2πfK τM (θK ) ⎥ e ⎦ y (54) 23 Fig. 28. Screen shot from the MWC CR collaborative hardware prototype. On the upper left side, we see the spatial map of the receivers in white, and transmitters in green. On the bottom left, the occupied band indices of the real spectral support are shown, while to the right of the transmitter/receiver map, the estimated indices by each CR individually are presented. On the right, we see the spectrum sensing results of 4 different algorithms: Hard Co-Op (hard decision collaboration that selects the most popular frequency band indices), BSIHT, BSOMP and RDSIHT. These results show both the superiority of collaborative spectrum sensing methods over individual detection and that of soft decision methods compared to the plain union of all CR results. f1 z f f2 0 PU2 f zM 0 PU1 CR1 θ1 z θ2 zM −1 θ3 CR2 (fj , θj ) (fi, θi) y PU3 0 z3 f3 f z2 Fig. 29. Illustration of Nsig = 3 source signals in the yz plane. Each transmission is associated with a carrier frequency fi and AOA θi . θi θj d y z1 y1 y and τm (θ) = dm cos (θ) denote the delays at the mth sensors c with respect to the first sensor. Along the z axis, the samples z z(f ), sampling matrix Az and delays τm are similarly defined. Two joint recovery approaches for the carrier frequencies and DOAs of the transmissions are proposed in [53]. Note that once the carriers and AOAs are estimated, the signals can be reconstructed, as shown for the alternative MWC. For the sake of simplicity, a statistical model where x(t) is wide-sense stationary is considered. The first recovery approach is based on CS techniques and allows recovery of both parameters assuming the electronic angles fi cos θi and fi sin θi lie on a predefined grid. The CS problem is formulated in such a way that no pairing issue arises between the carrier frequencies and their corresponding DOAs. To that end, the time-domain samples from both ULAs are concatenated into one vector y2 yM −1 y3 sub-array y1 yM sub-array y2 Fig. 30. CaSCADE system: L-shaped array with M sensors along the y axis and M sensors along the z axis including a common sensor at the origin. The sub-arrays y1 and y2 (and similarly z1 and z2 ) are defined in the derivation of the 2D-ESPRIT algorithm. T v[n] = [yT [n] zT [n]] , whose correlation matrix, R = E [v[n]vH [n]] = ARx AH , T (55) is computed. Here, A = [ATy ATz ] and the autocorrelation matrix Rx = E [x[k]xH [k]] is sparse and diagonal, from the stationarity of x(t). From the grid assumption, (55) can be discretized with respect to the possible values taken by the electronic angles. The resulting sparse matrix derived from Rx 24 is diagonal as well, and its sparse diagonal can be recovered using traditional CS techniques, similarly to (27). The second recovery approach, inspired by [110], [111], extends the ESPRIT algorithm to the joint estimation of carriers and DOAs, while overcoming the pairing issue. The 2D-ESPRIT algorithm presented in [53] is directly applied to the sub-Nyquist samples, by considering cross-correlation matrices between the sub-arrays of both axis. Dropping the time variable n for clarity, the samples from the sub-arrays can be written as y1 = Ay1 x, y 2 = A y2 x z1 = Az1 x, z2 = Az2 x, (56) where y1 , y2 , z1 , z2 are samples from the sub-arrays shown in Fig. 30. The matrices Ay1 and Ay2 are the first and last M −1 rows of Ay , respectively and Az1 and Az2 are similarly defined. Each couple of sub-array matrices along the same axis are related as Ay2 = Ay1 Φ Az2 = Az1 Ψ, (57) where Φ ≜ diag [ej2πf1 τ1 (θ1 ) y Ψ ≜ diag [ej2πf1 τ1 (θ1 ) z ⋯ ⋯ ej2πfK τ1 (θK ) ] y ej2πfK τ1 (θK ) ] . z (58) We see from (58) that the carrier frequencies fi and AOAs θi are embedded in the diagonal matrices Φ and Ψ. Applying the ESPRIT framework on cross-correlations matrices between the subarrays of both axis, allows to jointly recover Φ and Ψ [53]. This leads to proper pairing of the corresponding elements fi τ1y (θi ) and fi τ1z (θi ). The AOAs θi and carrier frequencies fi are then given by θi = tan−1 ( ∠Ψii ), ∠Φii fi = ∠Φii . 2π dc cos (θi ) (59) It is proven in [53] that the minimal number of sensors required for perfect recovery is 2K +1. This leads to a minimal sampling rate of (2K + 1)B, which is slightly higher than the minimal rate 2KB required for spectrum sensing in the absence of DOA recovery. These ideas can be extended to jointly recovery the transmissions’ carrier frequencies, azimuth and elevation angles in a 3D framework. VIII. C ONCLUSION AND F UTURE C HALLENGES In this paper, we reviewed several challenges imposed on the traditional task of spectrum sensing by the new application of CR. We first investigated sub-Nyquist sampling schemes, enabling sampling and processing of wideband signals at low rate, by exploiting their a priori known structure. A possible extension of these works is to include adaptive updating of the detected support, triggered by a change in a PU’s activity, either starting a transmission in a previously vacant band or withdrawing from an active band. To increase efficiency, this should be performed by taking the current detected support as a prior and updating it with respect to the new acquired samples, without going through the support recovery process from scratch. Additional preliminary assumptions on the structure or statistical behavior of the potentially active signals, such as statistics on channel occupancy, can also be exploited. We then considered detection challenges in the presence of noise, where second-order statistics recovery, and in particular cyclostationary detection, are shown to perform better than simple energy detection. Next, fading and shadowing channel effects were overcome by collaborative CR networks. Finally, we addressed the joint spectrum sensing and DOA estimation problem, allowing for better exploitation of frequency vacant bands by exploiting spatial sparsity as well. All these methods should be combined in order to map the occupied spectrum, in frequency, time and space, thus maximizing the CR network’s throughput. This requires an adequate spectrum access protocol as well, that translates the data acquired by spectrum sensing into transmission opportunities for the CRs. Spectrum access challenges and algorithms were outside the scope of this review. An essential part of the approach adopted in this survey is the relation between the theoretical algorithms and practical implementation, demonstrating real-time spectrum sensing from low rate samples using off-the-shelf hardware components. We believe that prototype development is key to enabling sub-Nyquist sampling as a solution to the task of spectrum sensing in CR platforms. A natural next step in that direction is the implementation of a complete CR network, collaboratively performing joint spectrum sensing and DOA estimation followed by spectrum access. This prototype should then be tested on real data in order to assess its true capabilities. We believe that a sub-Nyquist digital to analog interface can alleviate many of the bottlenecks currently hindering the development of CR systems, allowing fast deployment of low rate, simple and efficient CR devices, using currently available hardware. In order for CRs to become a viable solution to spectrum shortage, other main challenges need to be addressed, as discussed earlier. The issue of coexistence with existing communication links from PUs is crucial and is very particular to the CR scenario. Here, coexistence is not a symmetric requirement as CRs are prohibited from interfering with PUs. Another challenge is the establishment of a communication channel for CRs to be able to exchange the locations of their current transmission bands. Finally, the issue of security against attacks to the CR networks still has numerous unresolved questions. R EFERENCES [1] FCC, “Spectrum policy task force report: Federal communications commission, tech. rep. 02-135. [online],” Nov. http://www.gov/edocs public/attachmatch/DOC228542A1.pdf, 2002. [2] M. McHenry, “NSF spectrum occupancy measurements project summary. shared spectrum co., tech. rep. [online],” http://www.sharedspectrum.com, Aug. 2005. [3] R. I. C. Chiang, G. B. Rowe, and K. W. Sowerby, “A quantitative analysis of spectral occupancy measurements for cognitive radio,” Proc. IEEE Vehicular Technology Conf., pp. 3016–3020, Apr. 2007. [4] Y. Liu, “Beyond white space: Robust spectrum sensing and channel statistics based spectrum accessing strategies for cognitive radio network,” Ph.D. dissertation, University of Texas at Austin, Aug. 2013. 25 [5] T. Erpek, M. Lofquist, and K. Patton, “Spectrum occupancy measurements Loring Commerce Centre Limestone, Maine September 18-20, 2007,” The Shared Spectrum Company, 2007. [6] J. Mitola, “Software radios: Survey, critical evaluation and future directions,” IEEE Aerospace Electron. Syst. Mag., vol. 8, pp. 25–36, Apr. 1993. [7] S. Haykin, “Cognitive radio: Brain-empowered wireless communications,” IEEE J. Select. Areas Commun., vol. 23, pp. 201–220, Feb. 2005. [8] J. Mitola and C. Q. Maguire Jr., “Cognitive radio: Making software radios more personal,” IEEE Personal Commun., vol. 6, pp. 13–18, Aug. 1999. [9] C. E. Shannon, “Computers and automata,” Proc. IRE, vol. 41, pp. 1234–1241, Oct. 1953. [10] D. Cabric, S. Mishra, and R. Brodersen, “Implementation issues in spectrum sensing for cognitive radios,” Asilomar Conf. on Signals, Syst. and Computers, vol. 1, pp. 772–776, Nov. 2004. [11] E. G. Larsson and M. Skoglund, “Cognitive radio in a frequencyplanned environment: Some basic limits,” IEEE Trans. Wireless Commun., vol. 7, pp. 4800–4806, Dec. 2008. [12] A. Sahai, N. Hoven, and R. Tandra, “Some fundamental limits on cognitive radio,” Proc. Annu. Allerton Conf. Commun., Control, and Computing, pp. 1662–1671, Oct. 2004. [13] M. Mishali and Y. C. Eldar, “Wideband spectrum sensing at subNyquist rates,” IEEE Signal Process. Mag., vol. 28, pp. 102–135, Jul. 2011. [14] A. Ghasemi and E. S. Sousa, “Spectrum sensing in cognitive radio networks: requirements, challenges and design trade-offs,” IEEE Commun. Mag., vol. 46, pp. 32–39, Apr. 2008. [15] E. Axell, G. Leus, E. G. Larsson, and H. V. Poor, “Spectrum sensing for cognitive radios: State-of-the-art and recent advances,” IEEE Signal Process. Mag., vol. 29, pp. 101–116, May 2012. [16] B. Wang and K. Liu, “Advances in cognitive radio networks: A survey,” IEEE J. Select. Topics in Signal Process., vol. 5, pp. 5–23, 2011. [17] J. Ma, G. Y. Li, and B. H. F. Juang, “Signal processing in cognitive radio,” Proc. IEEE, vol. 97, pp. 805–823, 2009. [18] Y. Zeng, Y.-C. Liang, A. T. Hoang, and R. Zhang, “A review on spectrum sensing for cognitive radio: challenges and solutions,” EURASIP J. Advances Signal Process., vol. 2010, pp. 1–15, 2010. [19] T. Yücek and H. Arslan, “A survey of spectrum sensing algorithms for cognitive radio applications,” IEEE Commun. Surveys and Tutorials, vol. 11, pp. 116–130, 2009. [20] E. Hossain, D. Niyato, and D. I. Kim, “Evolution and future trends of research in cognitive radio: a contemporary survey,” Wireless Commun. and Mobile Computing, vol. 15, pp. 1530–1564, 2015. [21] E. Biglieri, A. J. Goldsmith, L. J. Greenstein, N. B. Mandayam, and H. V. Poor, Principles of cognitive radio. Cambridge University Press, 2012. [22] J. N. Laska, S. Kirolos, M. F. Duarte, T. S. Ragheb, R. G. Baraniuk, and Y. Massoud, “Theory and implementation of an analog-to-information converter using random demodulation,” IEEE Int. Symp. Circuits and Syst., pp. 1959–1962, May 2007. [23] J. A. Tropp, J. N. Laska, M. F. Duarte, J. K. Romberg, and R. G. Baraniuk, “Beyond Nyquist: Efficient sampling of sparse bandlimited signals,” IEEE Trans. Inf. Theory, vol. 56, pp. 520–544, Jan. 2010. [24] M. Fleyer, A. Linden, M. Horowitz, and A. Rosenthal, “Multirate synchronous sampling of sparse multiband signals,” IEEE Trans. Signal Process., vol. 58, pp. 1144–1156, Mar. 2010. [25] M. Mishali and Y. C. Eldar, “Blind multi-band signal reconstruction: Compressed sensing for analog signals,” IEEE Trans. Signal Process., vol. 57, no. 3, pp. 993–1009, Mar. 2009. [26] ——, “From theory to practice: Sub-Nyquist sampling of sparse wideband analog signals,” IEEE J. Select. Topics Signal Process., vol. 4, no. 2, pp. 375–391, Apr. 2010. [27] M. Mishali, Y. C. Eldar, and A. J. Elron, “Xampling: Signal acquisition and processing in union of subspaces,” IEEE Trans. Signal Process., vol. 59, pp. 4719–4734, Oct. 2011. [28] H. Urkowitz, “Energy detection of unknown deterministic signals,” Proc. IEEE, vol. 55, pp. 523–531, Apr. 1967. [29] E. Arias-Castro and Y. C. Eldar, “Noise folding in compressed sensing,” IEEE Signal Process. Lett., vol. 18, no. 8, pp. 478–481, Aug. 2011. [30] D. O. North, “An analysis of the factors which determine signal/noise discrimination in pulsed carrier systems,” Proc. IEEE, vol. 51, pp. 1016–1027, Jul. 1963. [31] G. L. Turin, “An introduction to matched filters,” IRE Trans. Inf. Theory, vol. 6, pp. 311–329, Jun. 1960. [32] W. A. Gardner, A. Napolitano, and L. Paura, “Cyclostationarity: Half a century of research,” Signal Process., vol. 86, pp. 639–697, 2006. [33] A. Napolitano, “Cyclostationarity: New trends and applications,” Signal Process., vol. 120, pp. 385–408, Mar. 2016. [34] I. F. Akyildiz, B. F. Lo, and R. Balakrishnan, “Cooperative spectrum sensing in cognitive radio networks: A survey,” Phys. Commun., vol. 4, pp. 40–62, Mar. 2011. [35] S. M. Mishra, A. Sahai, and R. W. Brodersen, “Cooperative sensing among cognitive radios,” IEEE Int. Conf. Commun., pp. 1658–1663, 2006. [36] A. Ghasemi and E. S. Sousa, “Collaborative spectrum sensing for opportunistic access in fading environments,” IEEE Int. Symp. New Frontiers in Dynamic Spectrum Access Networks, pp. 131–136, Nov. 2005. [37] Z. Quan, S. Cui, A. H. Sayed, and H. V. Poor, “Optimal multiband joint detection for spectrum sensing in cognitive radio networks,” IEEE Trans. Signal Process., vol. 57, pp. 1128–1140, 2009. [38] V. F. Pisarenko, “The retrieval of harmonics from a covariance function,” Geophysics, J. Roy. Astron. Soc., vol. 33, pp. 347–366, 1973. [39] R. O. Schmidt, “Multiple emitter location and signal parameter estimation,” IEEE Trans. Antennas Propagation, vol. 34, pp. 276–280, Mar. 1986. [40] R. Roy and T. Kailath, “ESPRIT-estimation of signal parameters via rotational invariance techniques,” IEEE Trans. Signal Process., vol. 37, pp. 984–995, Jul. 1989. [41] Y. C. Eldar and G. Kutyniok, Compressed Sensing: Theory and Applications. Cambridge University Press, 2012. [42] S. K. Sharma, E. Lagunas, S. Chatzinotas, and B. Ottersten, “Application of compressive sensing in cognitive radio communications: A survey,” IEEE Commun. Surveys and Tutorials, 2016. [43] Y. C. Eldar, Sampling Theory: Beyond Bandlimited Systems. Cambridge University Press, 2015. [44] S. G. Mallat and Z. Zhang, “Matching pursuits with time-frequency dictionaries,” IEEE Trans. Signal Process., vol. 41, pp. 3397–3415, Dec. 1993. [45] T. Blumensath and M. Davies, “Gradient pursuits,” IEEE Trans. Signal Process., vol. 56, pp. 2370–2382, Jun. 2008. [46] M. Mishali and Y. C. Eldar, “Sub-Nyquist sampling: Bridging theory and practice,” IEEE Signal Process. Mag., vol. 28, no. 6, pp. 98–124, Nov. 2011. [47] H. Landau, “Necessary density conditions for sampling and interpolation of certain entire functions,” Acta Math, vol. 117, pp. 37–52, Jul. 1967. [48] R. Venkataramani and Y. Bresler, “Perfect reconstruction formulas and bounds on aliasing error in sub-Nyquist nonuniform sampling of multiband signals,” IEEE Trans. Inf. Theory, vol. 46, pp. 2173–2183, Sept. 2000. [49] M. Mishali, Y. C. Eldar, O. Dounaevsky, and E. Shoshan, “Xampling: Analog to digital at sub-Nyquist rates,” IET Circuits, Devices and Syst., vol. 5, pp. 8–20, Jan. 2011. [50] E. Israeli, S. Tsiper, D. Cohen, A. Reysenson, R. Hilgendorf, E. Shoshan, and Y. C. Eldar, “Hardware calibration of the modulated wideband converter,” IEEE Global Commun. Conf., pp. 948–953, Dec. 2014. [51] M. Mishali and Y. C. Eldar, “Expected RIP: Conditioning of the modulated wideband converter,” IEEE Inf. Theory Workshop, pp. 343– 347, 2009. [52] H. W. L. Gan and H. Wang, “Deterministic binary sequences for modulated wideband converter,” in Int. Conf. Sampling Theory and Applications, 2013. [53] S. Stein, O. Yair, D. Cohen, and Y. C. Eldar, “CaSCADE: Compressed carrier and DOA estimation,” arXiv:1604.02723 [cs.IT], 2016. [54] R. Gold, “Optimal binary sequences for spread spectrum multiplexing (corresp.),” IEEE Trans. Inf. Theory, vol. 13, no. 4, pp. 619–621, 1967. [55] M. Mishali and Y. C. Eldar, “Expected RIP: conditioning of the modulated wideband converter,” IEEE Inf. Theory Workshop, pp. 343– 347, Oct. 2009. [56] D. Cohen, A. Akiva, B. Avraham, and Y. C. Eldar, “Distributed cooperative spectrum sensing from sub-Nyquist samples for cognitive radios,” IEEE Workshop Signal Proc. Advances Wireless Commun., pp. 336–340, Jun. 2015. [57] ——, “Centralized cooperative spectrum sensing from sub-Nyquist samples for cognitive radios,” IEEE Int. Conf. Commun., pp. 7487– 7491, Jun. 2015. [58] D. Cohen and Y. C. Eldar, “Sub-Nyquist cyclostationary detection for cognitive radio,” arXiv:1604.02659 [cs.IT], 2016. 26 [59] D. Adams, Y. C. Eldar, and B. Murmann, “A mixer frontend for a fourchannel modulated wideband converter with 62 db blocker rejection,” in 2016 IEEE Radio Frequency Integrated Circuits Symposium (RFIC), May 2016, pp. 286–289. [60] M. A. Lexa, M. E. Davies, J. S. Thompson, and J. Nikolic, “Compressive power spectral density estimation,” IEEE Int. Conf. Acoustics, Speech and Signal Process., vol. 57, pp. 22–27, May 2011. [61] M. A. Lexa, M. E. Davies, and J. S. Thompson, “Compressive and noncompressive power spectral density estimation from periodic nonuniform samples,” CoRR, vol. abs/1110.2722, 2011. [62] D. D. Ariananda and G. Leus, “Compressive wideband power spectrum estimation,” IEEE Trans. Signal Process., vol. 60, pp. 4775–4789, Sept. 2012. [63] D. D. Ariananda, G. Leus, and Z. Tian, “Muti-coset sampling for power spectrum blind sensing,” Int. Conf. Digital Signal Process., pp. 1–8, Jul. 2011. [64] D. Romero and G. Leus, “Compressive covariance sampling,” Proc. Inf. Theory and Applications Workshop, pp. 1–8, Feb. 2013. [65] C. P. Yen, Y. Tsai, and X. Wang, “Wideband spectrum sensing based on sub-Nyquist sampling,” IEEE Trans. Signal Process., vol. 61, pp. 3028–3040, Jun. 2013. [66] D. Cohen and Y. C. Eldar, “Sub-Nyquist sampling for power spectrum sensing in cognitive radios: A unified approach,” IEEE Trans. Signal Process., vol. 62, pp. 3897–3910, Aug. 2014. [67] Z. Tian, “Cyclic feature based wideband spectrum sensing using compressive sampling,” IEEE Int. Conf. Commun., pp. 1–5, Jun. 2011. [68] Z. Tian, Y. Tafesse, and B. M. Sadler, “Cyclic feature detection with sub-nyquist sampling for wideband spectrum sensing,” IEEE J. Select. Topics Signal Process., vol. 6, no. 1, pp. 58–69, Feb. 2012. [69] S. A. Razavi, M. Valkama, and D. Cabric, “High-resolution cyclic spectrum reconstruction from sub-Nyquist samples,” IEEE Workshop Signal Process. Advances Wireless Commun., pp. 250–254, Jun. 2013. [70] G. Leus and Z. Tian, “Recovering second-order statistics from compressive measurements,” IEEE Int. Workshop on Computational Advances in Multi-Sensor Adaptive Processing, pp. 337–340, Dec. 2011. [71] D. D. Ariananda and G. Leus, “Non-uniform sampling for compressive cyclic spectrum reconstruction,” IEEE Int. Conf. Acoustics, Speech and Signal Process., pp. 41–45, 2014. [72] W. Gardner, Statistical spectral analysis: a non probabilistic theory. Prentice Hall, 1988. [73] A. Papoulis, Probability, Random Variables, and Stochastic Processes. McGraw Hill, 1991. [74] P. Pal and P. P. Vaidyanathan, “Nested array: A novel approach to array processing with enhanced degrees of freedom,” IEEE Trans. Signal Process., vol. 58, pp. 4167–4181, Aug. 2010. [75] P. P. Vaidyanathan and P. Pal, “Sparse sensing with co-prime samplers and arrays,” IEEE Trans. Signal Process., vol. 59, pp. 573–586, 2011. [76] D. Qu and A. Tarczynski, “A novel spectral estimation method by using periodic nonuniform sampling,” Asilomar Conf. Signals, Syst. and Computers, pp. 1134–1138, 2007. [77] C. G. Khatri and C. R. Rao, “Solutions to some functional equations and their applications to characterization of probability distributions,” Sankhyā: The Indian J. Statistics, Series A, pp. 167–180, 1968. [78] M. Arts, A. Bollig, and R. Mathar, “Analytical test statistic distributions of the mmme eigenvalue-based detector for spectrum sensing,” in 2015 International Symposium on Wireless Communication Systems (ISWCS). IEEE, 2015, pp. 496–500. [79] D. Romero, R. López-Valcarce, and G. Leus, “Compression limits for random vectors with linearly parameterized second-order statistics,” IEEE Trans. Inf. Theory, vol. 61, no. 3, pp. 1410–1425, 2015. [80] J. Leech, “On the representation of 1, 2,, n by differences,” J. London Mathematical Soc., vol. 1, no. 2, pp. 160–169, 1956. [81] W. A. Gardner, “The spectral correlation theory of cyclostationary timeseries,” Signal Process., vol. 11, pp. 13–36, Jul. 1986. [82] P. S. Aparna and M. Jayasheela, “Cyclostationary feature detection in cognitive radio using different modulation schemes,” Int. J. Computer Applications, vol. 47, pp. 12–16, Jun. 2012. [83] S. Y. Kumar and M. Z. A. Khan, “Robust, block based cyclostationary detection,” Int. Conf. Telecommunications, pp. 1–5, May 2013. [84] A. V. Dandawate and G. B. Giannakis, “Statistical tests for presence of cyclostationarity,” IEEE Trans. Signal Process., pp. 2355–2369, 1994. [85] M. Ghozzi, F. Marx, M. Dohler, and J. Palicot, “Cyclostatilonaritybased test for detection of vacant frequency bands,” Int. ICST Conf. Cognitive Radio Oriented Wireless Networks and Commun., pp. 1–5, Jun. 2006. [86] Y. T. Chan, J. W. Plews, and K. C. Ho, “Symbol rate estimation by the wavelet transform,” IEEE Int. Symp. Circuits and Syst., pp. 177–180, Jun. 1997. [87] E. Rebeiz and D. Cabric, “Blind modulation classification based on spectral correlation and its robustness to timing mismatch,” Military Commun. Conf., pp. 277–282, 2011. [88] R. J. Mammone, R. J. Rothaker, C. I. Podilchuk, S. Davidovici, and D. L. Schilling, “Estimation of carrier frequency, modulation type and bit rate of an unknown modulated signal,” IEEE Int. Conf. Commun., pp. 1006–1012, 1987. [89] A. Badawy and T. Khattab, “Robust, block based cyclostationary detection,” IEEE Wireless Commun. and Networking Conf., pp. 253– 258, Apr. 2014. [90] A. Fehske, J. Gaeddert, and J. H. Reed, “A new approach to signal classification using spectral correlation and neural networks,” IEEE Int. Symp. on New Frontiers in Dynamic Spectrum Access Networks, pp. 144–150, Nov. 2005. [91] Aparna P.S and M. Jayasheela, “Cyclostationary feature detection in cognitive radio using different modulation schemes,” Int. J. Computer Applications, vol. 47, pp. 12–16, June 2012. [92] X. He, Z. Zeng, and C. Guo, “Signal classification based on cyclostationary spectral analysis and HMM/SVM in cognitive radio,” Int. Conf. on Measuring Technology and Mechatronics Automation, pp. 309–312, 2009. [93] D. Cohen, L. Pollak, and Y. C. Eldar, “Carrier frequency and bandwidth estimation of cyclostationary multiband signals,” IEEE ICASSP, Mar. 2016. [94] R. L. Thorndike, “Who belong in the family?” Psychometrika, vol. 18, pp. 267–276, Dec. 1953. [95] B. Sklar, “Rayleigh fading channels in mobile digital communication systems part I: Characterization,” IEEE Commun. Mag., vol. 35, pp. 90–100, Jul. 1997. [96] V. Erceg, L. J. Greenstein, S. Y. Tjandra, S. R. Parkoff, A. Gupta, B. Kulic, A. A. Julius, and R. Bianchi, “An empirically based path loss model for wireless channels in suburban environments,” IEEE J. Select. Areas Commun., vol. 17, pp. 1205–1211, Sep. 2006. [97] Y. Wang, A. Pandharipande, Y. L. Polo, , and G. Leus, “Distributed compressive wide-band spectrum sensing,” IEEE Inf. Theory and Applications Workshop, pp. 178–183, Feb. 2009. [98] D. D. Ariananda and G. Leus, “A study on cooperative compressive wideband power spectrum sensing,” Joint WIC/IEEE Symp. Inf. Theory and Signal Process., pp. 102–109, 2012. [99] ——, “Cooperative compressive wideband power spectrum sensing,” IEEE Asilomar Conf. on Signals, Syst., and Computers, pp. 303–307, Nov. 2012. [100] J. Tropp, A. C. Gilbert, and M. J. Strauss, “Simultaneous sparse approximation via greedy pursuit,” IEEE Int. Conf. Acoustics, Speech and Signal Process., vol. 5, pp. 721–724, Mar. 2005. [101] A. Makhzani and S. Valaee, “Reconstruction of jointly sparse signals using iterative hard thresholding,” IEEE Int. Conf. Commun., pp. 3564– 3568, 2012. [102] M. F. Duarte, S. Sarvotham, D. Baron, M. B. Wakin, and R. G. Baraniuk, “Distributed compressed sensing of jointly sparse signals,” IEEE Asilomar Conf. Signals, Syst. and Computers, pp. 1537–1541, 2005. [103] Z. Tian, “Compressed wideband sensing in cooperative cognitive radio networks,” IEEE Global Commun. Conf., pp. 1–5, Dec. 2008. [104] F. Zeng, C. Li, and Z. Tian, “Distributed compressive spectrum sensing in cooperative multihop cognitive networks,” J. Select. Topics Signal Process., vol. 5, pp. 37–48, Feb. 2011. [105] S. Boyd, A. Ghosh, B. Prabhakar, and D. Shah, “Randomized gossip algorithms,” IEEE Trans. Inf. Theory, vol. 52, pp. 2508–2530, 2006. [106] B. J. M. Rabi and M. Johansson, “A randomized incremental subgradient method for distributed optimization in networked systems,” SIAM J. Optimization, vol. 20, no. 3, pp. 1157–1170, 2009. [107] N. Nguyen, D. Needell, and T. Woolf, “Linear convergence of stochastic iterative greedy algorithms with sparse constraints,” CoRR, vol. abs/1407.0088, 2014. [Online]. Available: http://arxiv.org/abs/ 1407.0088 [108] D. D. Ariananda and G. Leus, “Compressive joint angular-frequency power spectrum estimation,” Proc. European Signal Process. Conf., pp. 1–5, Sep. 2013. [109] A. A. Kumar, S. G. Razul, and C. S. See, “An efficient sub-Nyquist receiver architecture for spectrum blind reconstruction and direction of arrival estimation,” IEEE Int. Conf. Acoustics, Speech and Signal Process., pp. 6781–6785, May 2014. 27 [110] J.-F. Gu and P. Wei, “Joint SVD of two cross-correlation matrices to achieve automatic pairing in 2-D angle estimation problems,” IEEE Antennas and Wireless Propagation Lett., vol. 6, 2007. [111] J.-F. Gu, W.-P. Zhu, and M. N. S. Swamy, “Joint 2-D DOA estimation via sparse L-shaped array,” IEEE Trans. Signal Process., vol. 63, Mar. 2015.
7cs.IT
Caching in Combination Networks: A Novel Delivery by Leveraging the Network Topology Kai Wan∗ , Mingyue Ji† , Pablo Piantanida∗ , Daniela Tuninetti‡ arXiv:1802.10479v1 [cs.IT] 28 Feb 2018 ∗ L2S CentraleSupélec-CNRS-Université Paris-Sud, France, {kai.wan, pablo.piantanida}@l2s.centralesupelec.fr † University of Utah, Salt Lake City, USA, [email protected] ‡ University of Illinois at Chicago, Chicago, USA, [email protected] Abstract—THIS PAPER IS ELIGIBLE FOR THE STUDENT PAPER AWARD. Maddah-Ali and Niesen (MAN) in 2014 surprisingly showed that it is possible to serve an arbitrarily large number of cache-equipped users with a constant number of transmissions by using coded caching in shared-link broadcast networks. This paper studies the tradeoff between the user’s cache size and the file download time for combination networks, where users with caches communicate with the servers through intermediate relays. Motivated by the so-called separation approach, it is assumed that placement and multicast message generation are done according to the MAN original scheme and regardless of the network topology. The main contribution of this paper is the design of a novel two-phase delivery scheme that, accounting to the network topology, outperforms schemes available in the literature. The key idea is to create additional (compared to MAN) multicasting opportunities: in the first phase coded messages are sent with the goal of increasing the amount of ‘side information’ at the users, which is then leveraged during the second phase. The download time with the novel scheme is shown to be proportional to 1/H (with H being the number or relays) and to be order optimal under the constraint of uncoded placement for some parameter regimes. I. I NTRODUCTION Network traffic can be smoothed out to some extent by placing content in user local memories during off-peak hours (placement phase) with the hope that the pre-fetched content will be requested during peak hours, in which case the number of broadcast transmissions from the server to the users (delivery phase) will be reduced. Coded caching was originally considered in [1] by Maddah-Ali and Niesen (MAN) for shared-link broadcast networks, where a server (equipped with N files) communicates to K users (with a cache able to store M files) through a shared noiseless channel. In the original MAN scheme, each of the N files is partitioned into a number of pieces, and each piece is placed uncoded into a number of user caches that depends on the cache size M; after this symmetric uncoded cache placement, MAN generates multicast coded messages (by a binary linear network code) that are simultaneously useful to many users; these coded multicast message delivery drastically reduces the download time, or network load, compared to traditional caching strategies. The MAN scheme is known to be optimal for shared-link broadcast networks under the constrain of uncoded cache placement and optimal to within a factor two otherwise [2]. Coded caching has been extended to other network topologies, such as relay networks, where cache-aided users commu- nicate with the server through intermediate relays. Due to the difficulty of analyzing general relay networks, in this paper we consider the symmetric network known as combination network [3]. In a (H, r, M, N) combination network, a server with N files is connected to H relays (without caches) through  H orthogonal links, and each of the K = Hr users (with caches of size M files) is connected to a different subset of the r relays through r orthogonal links. The goal is to design a caching (placement and delivery) scheme so as to minimize the maximum number of transmitted files among all the links for the worst set of user demands. Related Work: Two achievable schemes were proposed in [3] for combination networks: one based on uncoded placement and routing in the delivery phase, and the other on MAN placement and a linear code for delivery. In [4], a scheme was proposed based on coded placement that effectively splits the combination network into H parallel shared-link networks,  H−1 = users by using the sharedeach of which serves Kr H r−1 link MAN scheme. Both works benchmarked the performance of their schemes by using a cut-set outer bound as in [1]. Recently, we have proposed several outer and inner bounds for combination networks. In [5] we derived novel outer bounds under the constraint of uncoded placement; in particular, we gave various ways to deal with cycles when the ‘acyclic index coding outer bound’ originally proposed in [6] for shared-link networks is not applicable. In [5] we proposed two achievable schemes, both with MAN placement and MAN multicast message generation; one works for general relay networks; the other one, for combination networks with M = N/K, leverages the symmetric topology of combination networks and proposes to further network code the MAN multicast messages so as to enable interference elimination. In [7], we introduced a scheme that uses MAN placement but with a novel way to generate and deliver multicast messages. Numerical results show that the combination of our schemes in [5], [7] improves on [4]. Contributions of Paper Organization: Section II presents the system model. Section III gives the details of the novel proposed scheme, which–following the so called separation approach [8]–uses MAN placement and MAN multicast message generation (both oblivious of the network topology). The main contribution of this paper is a novel delivery scheme that leverages the symmetries in the network topology and is order optimal for small M. We proposed to deliver the MAN Server with N files (size B bits) (F1,..., FN ) H relays 1 K users 1 Caches Z1 (size MB bits) 2 3 4 2 3 4 5 6 Z2 Z3 Z4 Z5 Z6 Fig. 1: A combination network with end-user-caches, with H = 4 relays and K = 6 users, i.e., r = 2. multicast messages with the following two-phase scheme: First phase: we directly transmit each MAN multicast message to some relays, which forward them to their connected users; such messages are simultaneously useful for t := KM/N users and will be used as ‘side information’ in the next phase; in this phase, the multicasting gain is t + 1. Second phase: not all users are able to decode all their desired file at the end of the first phase; we thus deliver the MAN multicast messages through a carefully design network code, to let the unsatisfied users recover their demanded file; in this phase, the multicasting gain is r. Performance: The final network load compounds the gain from the MAN multicast message generation and from the novel delivery. After balancing the transmission load across the relays, the final load/download time is proportional to 1/H. Order Optimality: In Section III-D, the proposed scheme is proved to be optimal to within a factor f := 1 + t/r = 1 + KM Nr under the constraint of uncoded placement. We remark that for the small cache size regime given by t = KM/N ≤ r, our scheme is optimal within factor f ≤ 2 under the constraint of uncoded placement, and–owing to the result in [2]–it is optimal to within a factor 2f ≤ 4 for general placement. Improvement: In Section III-F, we improve on the proposed scheme by leveraging further multicasting opportunities, and in Section IV we show numerically that this improved scheme outperforms all known schemes. II. S YSTEM M ODEL Notation Convention: Calligraphic symbols denote sets, bold symbols denote vectors, and sans-serif symbols denote system parameters. We use | · | to represent the cardinality of a set; [a : b] := {a, a + 1, . . . , b} and [n] := [1 : n]. A \ B := {x / B}; We define the set arg maxx∈X f (x) :=  ∈A:x∈ x ∈ X : f (x) = maxx∈X f (x) . RLC(m, S) represents m random linear combinations of the equal-length packets indexed by S; m random linear combinations of |S| packets are linearly independent with high probability if operations are done on a large enough finite field; the same can be obtained by using the parity-check matrix of an (|S|, |S| − m) MDS (Maximum Distance Separable) code [9]. System Model: A server has access to N files denoted by {F1 , · · · , FN }, each composed of B i.i.d. bits, and is connected to H relays through H error-free and interference-free links. The relays are connected to K = Hr users nodes through r K error-free and interference-free links. The set of users connected to the h-th relay is denoted by Uh , h ∈ [H]. The set of relays connected to k-th user is denoted by Hk , k ∈ [K]. For each set of users W ⊆ [K], let HW = ∪k∈W Hk . For the combination network in Fig. 1, we have, for example, U1 = {1, 2, 3}, H1 = {1, 2}, and H{1,2} = {1, 2, 3}. In the placement phase, user k ∈ [K] stores information about the N files in its cache of size MB bits, where M ∈ [0, N]. We denote the content in the cache of user k ∈ [K] by Zk and let Z := (Z1 , . . . , ZK ). During the delivery phase, user k ∈ [K] demands file dk ∈ [N]; the demand vector d := (d1 , . . . , dK ) is revealed to all nodes. Given (d, Z), the server sends a message Xh of B Rh (d, Z) bits to relay h ∈ [H]. Then, relay h ∈ [H] transmits a message Xh→k of B Rh→k (d, Z) bits to user k ∈ Uh . User k ∈ [K] must recover its desired file Fdk from Zk and (Xh→k : h ∈ Hk ) with high probability for some B. The objective is to determine the optimal max-link load R? (M) := min max max {Rh (d, Z), Rh→k (d, Z)} . (1) Z k∈Uh ,h∈[H], d∈[N]K The placement phase is said to be uncoded if each user directly copies some bits into its cache. The max-link load under the constraint of uncoded cache placement is denoted by R?u (M). In general, R?u (M) ≥ R? (M). III. N OVEL D ELIVERY S CHEMES A. High Level Description of the Proposed Scheme Our proposed scheme uses MAN placement and MAN multicast message generation, and then it delivers the MAN multicast messages in two phases. The scheme is as follows. a) MAN placement: Let M = t N K for some t ∈ [0 : K]. Let Fi = (Fi,W : W ⊆ [K], |W| = t) be a partition of file Fi , i ∈ [N], into Kt equal size sub-files. User k ∈ [K] stores Fi,W in its cache if k ∈ W. b) MAN multicast message generation: Let the demanded vector be d. For each J ⊆ [K] of cardinality |J | = t + 1, multicast messages are generated as follows WJ := ⊕j∈J Fdj ,J \{j} . (2) User k ∈ J can recover Fdk ,J \{k} from WJ and the cached sub-files becuse it knows Fdj ,J \{j} for all j ∈ J where j 6= k. c) Novel delivery: At a high level, our proposed delivery works as follows. We directly transmit each MAN message to some relays in the first phase such that each WJ can be recovered by a subset of users in J ; these messages can be seen as side information for the second phase. In the second phase, we design linear combinations of the MAN messages such that the users in J who did not recover WJ previously can do so. We illustrate this idea by means of an example first. B. Example 1 Consider the network in Fig. 1 with N = K = 6, M = t = 2 and let d = (1 : 6). For each J ⊆ [K] = [6] where |J | = t + 1 = 3, the MAN multicast messages in (2) contain B/ Kt = B/15 bits. Let us now look at the two-phase delivery. First phase: For each J ⊆ [K] = [6] of size |J | = t + 1 = 3, we compute SJ := arg maxh∈[H] |Uh ∩ J | (i.e., the set of relays each of which is connected to the largest number of users in J ), then partition WJ into |SJ | equal-length parts, |SJ | denoted as WJ = {WJ ,h : h ∈ SJ }, and finally transmit |SJ | WJ ,h to relay h ∈ SJ . For example, for J = {1, 2, 3}, relay 1 is connected to three users in J (user 1, 2 and 3), relay 2 is connected to one user in J (user 1), relay 3 is connected to one user in J (user 2), and relay 4 is connected to one user in J (user 3). So we have S{1,2,3} = arg maxh∈[4] |Uh ∩ {1, 2, 3}| = {1}. 1 Therefore, we have W{1,2,3} = {W{1,2,3},1 }. Similarly, for J = {1, 2, 4}, relay 1 is connected to two users in J (users 1 and 2), relay 2 is connected to two users in J (users 1 and 4), relay 3 is connected to two users in J (users 2 and 4), and relay 4 is not connected to any users in J . So we have SJ = arg maxh∈[4] |Uh ∩ {1, 2, 4}| = {1, 2, 3}. There3 3 3 fore, we have W{1,2,4} = {W{1,2,4},1 , W{1,2,4},2 , W{1,2,4},3 }. By considering all the subsets J , the server has sent to relay 1 (and similarly for all other relays) 1 3 2 2 2 W{1,2,3},1 , W{1,2,4},1 , W{1,2,5},1 , W{1,2,6},1 , W{1,3,4},1 , 3 2 2 2 3 W{1,3,5},1 , W{1,3,6},1 , W{2,3,4},1 , W{2,3,5},1 , W{2,3,6},1 , for a total of B/15 + 6B/30 + 3B/45 = B/3 bits; these messages are then forwarded by relay 1 to the users in U1 . Second phase: Let us first focus on message W{1,2,3} = 1 1 {W{1,2,3},1 }. From the first phase, W{1,2,3},1 can be recovered by the users in U1 ∩{1, 2, 3} = {1, 2, 3} from the transmission 1 by relay 1. Hence, W{1,2,3},1 need not to be transmitted in the second phase as all users that must recover it have done so. 3 3 3 For W{1,2,4} = {W{1,2,4},1 , W{1,2,4},2 , W{1,2,4},3 }, from 3 the first phase, W{1,2,4},1 can be recovered by the users in U1 ∩ {1, 2, 4} = {1, 2} but not by the users in U1 \{1, 2, 4} = {4} from the transmission by relay 1. In the second phase, 3 we thus aim to transmit W{1,2,4},1 to user 4. We divide 3 W{1,2,4},1 into r = 2 non-overlapping and equal-length pieces, 3 3 W{1,2,4},1 = {W{1,2,4},1,h : h ∈ H4 }, with H4 = {2, 3}. 3 We then let user 4 recover W{1,2,4},1,2 from relay 2, and 3 W{1,2,4},1,3 from relay 3. In order to do so, since user 1, 3 who is also connected to relay 2, knows W{1,2,4},1,2 , we 3 2 2 put W{1,2,4},1,2 into P4,{1} ; here P4,{1} represents the set of bits needed to be recovered by user 4 (the first entry in the subscript) from relay 2 (the superscript) and already known by user 1 (the second entry in the subscript) who is also connected 3 to relay 2 (the superscript). Similarly, we put W{1,2,4},1,3 3 in P4,{2} . After considering all the pieces of the multicast messages WJ that need transmission in the second phase for relay 1 we have (similarly for all other relays) 1 3 2 2 P1,{2} = {W{1,2,4},3,1 , W{1,2,6},3,1 , W{1,4,6},3,1 }, 1 P1,{3} 1 P2,{1} 1 P2,{3} = = = 3 2 2 {W{1,3,5},4,1 , W{1,3,6},4,1 , W{1,5,6},4,1 }, 3 2 2 {W{1,2,4},2,1 , W{1,2,5},2,1 , W{2,4,5},2,1 }, 2 3 2 {W{2,3,5},4,1 , W{2,3,6},4,1 , W{2,5,6},4,1 }, 2 3 2 1 }, , W{3,4,5},2,1 , W{1,3,5},2,1 = {W{1,3,4},2,1 P3,{1} 1 2 3 2 P3,{2} = {W{2,3,4},3,1 , W{2,3,6},3,1 , W{3,4,6},3,1 }; each P’s contains B/90 + 2B/60 = 2B/45 bits. We transmit 1 1 3 3 P1,{2} ⊕ P2,{1} := {W{1,2,4},3,1 ⊕ W{1,3,5},4,1 , 2 2 2 2 W{1,2,6},3,1 ⊕ W{1,3,6},4,1 , W{1,4,6},3,1 ⊕ W{1,5,6},4,1 } 1 1 to relay 1, such that user 1 knowing P2,{1} can recover P1,{2} , 1 1 and user 2 knowing P1,{2} can recover P2,{1} . Similarly, the 1 1 1 1 server transmits P1,{3} ⊕P3,{1} and P2,{3} ⊕P3,{2} to relay 1. At the end of this phase, for each V ⊆ U1 , relay 1 (and 1 similarly for the other relays) forwards ⊕ Pk,V\{k} to the k∈J users in V. The total number of transmitted bits from the server to a relay in this phase is 2B/15. In conclusion, the achieved max link-load is 1/3 + 2/45 = 7/15, while the max link-loads of the schemes in [5], [3] and [4] are 8/15, 2/3 and 1/2, respectively. The outer bound with uncoded placement in [5, Thm.4] is 7/17. C. Detailed Description of the Proposed Scheme First phase: For each WJ in (2) where J ⊆ [K] and |J | = t + 1, we find SJ := arg maxh∈[H] |Uh ∩ J | (i.e., the set of relays each relay in which is connected to the largest number of users in J ). We then partition WJ into |SJ | non|SJ | overlapping equal-length pieces and denote WJ = {WJ ,h : |SJ | h ∈ SJ }. The server transmits WJ ,h to relay h ∈ SJ , and |SJ | relay h ∈ S transmits WJ ,h to the users in Uh . Second phase: For each WJ as in the first phase the users |SJ | in J ∩ Uh , h ∈ SJ , can recover WJ ,h ; thus the second phase |SJ | aims to transmit WJ ,h to the users in J \ Uh . For each user |SJ | k ∈ J \Uh , WJ ,h is divided into r non-overlapping and equal|SJ | |SJ | 0 length pieces and denoted as WJ ,h = {WJ ,h,h 0 : h ∈ Hk }. |SJ | We aim to let user k ∈ J \ Uh recover WJ ,h,h0 from relay h0 ∈ Hk . For relays h, h0 and user k, where user k is connected to relay h0 but not to relay h, we define  Qkh,h0 := j ∈ Uh ∩ Uh0 : Hj ⊆ Hk ∪ {h} (3) |S | 0 J h and put WJ ,h,h 0 in P k,Qk h,h0 representing the set of bits known Qkh,h0 by the users in and to be recovered by user k from relay h0 . Note |Qkh,h0 | = r − 1, as explained in Remark 1. Finally, for each relay h ∈ [H] and each set V ⊆ Uh where |V| = r, the h server transmits ⊕k∈V Pk,J \{k} to relay h, which forwards it to the users in V. |S | J Remark 1. The two partition steps for each WJ (e.g., WJ ,h |SJ | and WJ ,h,h0 ) ensure that the number of bits transmitted from the server to each relay is the same. So the achieved max link-load is proportional to 1/H. |SJ | h0 We put WJ ,h,h where Qkh,h0 is defined in (3); 0 in P k,Qk h,h0 among the relays h, h0 user k is only connected to relay h0 . Since the users in Qkh,h0 are connected to relays h and h0 simultaneously and the connected relays of these users are in the set Hk ∪ {h} including r + 1 relays, one has |Qkh,h0 | = r+1−2 r−2  = r −1. By the symmetry of the combination network, for each relay a ∈ Hk \ {h0 }, there must exist one set J 0 with |J 0 | = t where a is in the set arg maxb∈[H] |Ub ∩ J 0 |, which also includes |SJ | elements, and the user (assumed to be k 0 ) connected to relays in (Hk ∪ {h}) \ {a} is also in J 0 . Since user k 0 is connected to relays h and h0 , one has k 0 ∈ Qkh,h0 . |S 0| In addition, user k 0 needs to recover WJ 0J,a,h0 from relay h0 , |SJ | whose length is equal to the length of WJ ,h,h 0 . Notice that |S 0| |S 0| WJ 0J,a is directly transmitted to relay a, so WJ 0J,a,h0 is known by the r − 2 users in Qkh,h0 \ {k 0 } and by user k. So we can |S| |S 0| add WJ ,h,h0 and WJ 0J,a,h0 such that user k and k 0 can recover their desired pieces. Similarly, there are |Hk \ {h0 }| = r − 1 |S| relays as relay a. So WJ ,h,h0 can be added with the other r − 1 pieces with the same length (each of which is demanded by one user in Qkh,h0 ) and then be transmitted to relay h0 . Performance: For each WJ the server directly transmits |SJ | WJ ,h to relay h ∈ SJ in the first phase for a total of  |WJ | = B/ Kt bits. In the second phase, for relay h ∈ SJ , |SJ | |SJ | |J \Uh | users recover WJ ,h . So the server transmits WJ ,h,h 0 0 to each user k ∈ J \ Uh for h ∈ Hk ) in one linear combination with other r − 1 pieces of the same length (equal to r K B|S | . Hence, the total link-load to transmit WJ is (t) J |SJ ||J \Uh | 1 = 1+|J K\Uh |/r . By the symmetry of network, K + r(Kt )|SJ | (t) (t) the number of transmitted bits to each relay is the same and given in the following theorem. Theorem 1. For a (H, r, M, N) combination network with t = KM/N ∈ [0 : K], the max link-load is X 1 + minh∈[H] |J \ Uh |/r R?u ≤ R1 := , (4)  H Kt J ⊆[K]:|J |=t where R1 is achieved by the scheme in Section III-C. The tradeoff between memory size and max link-load is the lower convex envelope of the above points. D. Optimality Results for the Proposed Scheme Theorem 2. For  a (H, r, M, N) combination network with N ≥ K = Hr and M = tN K , t ∈ [0 : K], the scheme in Section III-C is optimal within a factor 1 + t/r under the constraint of uncoded cache placement, and to within a factor of 2(1 + t/r) otherwise. Proof: We compare Theorem 2 to the cut-set outer bound in [5, Eq.(12)]. For each J ⊆ [K] where |J | = t + 1, there exist some relays connected to at least one user in J , and thus one has minh∈[H] |J \ Uh | ≤ |J | − 1 = t. Hence, from (4),   K 1 + t/r R1 ≤ (5)  . t + 1 H Kt ? From [5], it was  proved that Ru is lower bounded by the K ( ) t+1 convex hull of Nt for t ∈ [0 : K]. Hence, the scheme K , H(K) t in Section III-C is order optimal within a factor of 1 + t/r under the constraint of uncoded cache placement. Since the multiplicative gap between uncoded and coded placements in shared-link network (which is used in [5] to derive the converse bound) is not larger than 2 [2], the scheme in Section III-C is order optimal within a factor of 2(1 + t/r). Remark 2. Under the assumptions of Theorem 2, we have: (a) if t ≤ r (i.e., small cache size regime), the scheme in Section III-C is order optimal within a constant factor no larger than (1 + t/r) ≤ 2, and (b) if t/r → 0 the scheme in Section III-C is optimal under under uncoded placement. The schemes in [3], [5], [4] are order optimal, under the uncoded cache placement, to within a factor H/r, which can be arbitrary large. The scheme in Section III-C can be improved by leveraging multicasting opportunities as the following example shows. E. Example 2 Consider the network in Fig. 1 with N = K = 6, M = t = 3 and let d = (1 : 6). For each J ⊆ [K] = [6] where |J | = t + 1 = 4, each MAN multicast message in (2) contains B/ Kt = B/20 bits. We proceed now to describe the improved delivery compared to the scheme in Section III-C. First phase: This step is the same as in Section III-C with the exception that each coded messages WJ is divided into B/P packets for some large enough length P (possible since B can be taken arbitrary large). Second phase: If one piece of multicast coded message needs to be recovered by a user in the second phase, the scheme in Section III-C divides this piece into r nonoverlapping parts and let the user recover one different part from each of its connected relays. For example, in the first phase W{1,2,5,6} is divided into |S{1,2,5,6} | = 4 non-overlapping and equal-length pieces, W{1,2,5,6} = 4 4 {W{1,2,5,6},h : h ∈ [4]}. We directly transmit W{1,2,5,6},4 to relay 4, which forwards it to users 3, 5 and 6. So in the second 4 phase, users 1 and 2 must recover W{1,2,5,6},4 . The scheme in 4 Section III-C treats W{1,2,5,6},4 demanded by user 1 and 2 as 4 two independent pieces. It lets user 1 recover |W{1,2,5,6},4 |/2 4 bits from relay 1 and |W{1,2,5,6},4 |/2 bits from relay 2 in two 4 linear combinations, and lets user 2 recover |W{1,2,5,6},4 |/2 4 bits from relay 1 and |W{1,2,5,6},4 |/2 bits from relay 3 in two other ones. Transmitting one message ‘twice’ is inefficient. Instead, we can leverage the following multicasting op4 4 portunity. We put RLC(|W{1,2,5,6},4 |/(2P ), W{1,2,5,6},4 ) in 1 1 X{1,2},{3} , where X{1,2},{3} is the set of packets needed to be recovered by users in {1, 2} (first part of the subscript) from relay 1 (superscript) and already known by the users in {3} (second part of the subscript) who are also connected to 1 relay 1 (superscript). The number of packets in X{1,2},{3} is 1 |X{1,2},{3} |/P . We then encode the messages at relay 1 as 1 1 1 1 1 1 X{1},{2} ⊕ X{2},{1} , X{1},{3} ⊕ X{3},{1} , X{2},{3} ⊕ X{3},{2} , where we used the same convention as before when it comes to ‘summing’ sets. We also send 1 1 1 1 RLC(2|X{2,3},{1} |/P, X{1,2},{3} ∪ X{1,3},{2} ∪ X{2,3},{1} ) to 15 4(K t) + 17 8(K t) [4, Zewail and Yener, ISIT 2017] [7, Wan et al, ICC 2018] Improved scheme in Section III−F Cut−set outer bound under the constraint of uncoded placement in [5] 2 1.5 1 = 0.29375, which is less than the max K=6,t=3 link-load of the scheme in Section III-C (equal to 0.3); for the same set of parameters, the max link-loads of the schemes in [5], [3] and [4] are 0.375, 0.375 and 1/3, respectively. The outer bound with uncoded placement in [5, Thm.4] is 0.25. F. Detailed Description of the Improved Delivery Scheme First phase: This step is the same as in Section III-C with the exception that each coded messages WJ is divided into B/P packets for some large enough length P Second phase: For each WJ where J ⊆ [K] and |J | = t + 1, and each h ∈ SJ , the second phase is used to transmit |SJ | WJ ,h to the users in J \ Uh . In this paragraph, to simplify  the notation, we let A := Uh0 ∩ (J \ Uh ) 6= ∅ and B := j ∈ Uh ∩ Uh0 : Hj ⊆ HA ∪ {h} . For each h0 ∈ [H] \ {h} where |SJ | A = 6 ∅, we add |WJ ,h |/(rP ) random linear combinations |SJ | h0 representing the packets to be of packets of WJ ,h in XA,B recovered by users in A from relay h0 and already known by the users in B who are also connected to relay h0 . We aim to let each user k ∈ J \ Uh recover all the sets h0 of packets XW 6= ∅ where h0 ∈ Uk and k ∈ W1 , such 1 ,W2 |SJ | that he can recover |WJ ,h |/P random linear combinations |SJ | |SJ | of packets in WJ ,h and then recover WJ ,h with high probability provided that B → ∞. We use a two-stage coding. Stage 1: For each relay h ∈ [H] and each set V ⊆ Uh , we h 6= ∅ where W1 ∪ W2 = encode all the sets of packets XW 1 ,W2 h V, by LV = RLC(c/P, C) where C= 2.5 Max link−load 1 relay 1. Note that the users in {1, 2, 3} know |X{2,3},{1} |/P 1 1 1 packets of X{1,2},{3} ∪ X{1,3},{2} ∪ X{2,3},{1} . So if the 1 server transmits 2|X{2,3},{1} |/P random linear combinations of those packets to relay 1, which will then forward them to its connected users, each user can recover all of the packets 1 1 1 of X{1,2},{3} ∪ X{1,3},{2} ∪ X{2,3},{1} with high probability provided that B → ∞. The max link-load of these improved two-phases scheme is ∪ h XW , 1 ,W2 X W1 ,W2 :W1 ∪W2 =V c = max k∈V h |XW |, 1 ,W2 W1 ,W2 :W1 ∪W2 =V,k∈W / 2 where c/P is the maximal number of packets in C not known by the users in V. So from LhV , each user k ∈ V can recover h all the sets XW 6= ∅ where k ∈ W1 . 1 ,W2 h Stage 2: If for each set XW , where W1 ∪ W2 = V and 1 ,W2 h |XW1 ,W2 | > 0, we have k ∈ W2 , it can be seen that user k already knows LhV from the first stage. Hence, in one relay h ∈ [H], we can encode LhV for all V ⊆ Uh where LhV 6= ∅ by RLC(c0 /P, C 0 ) where C0 = ∪ V⊆Uh :Lh V 6=∅ c0 = max k∈Uh LhV , X |LhV |. V⊆Uh :Lh V is unknown to k We transmit RLC(c0 /P, C 0 ) to relay h and relay h then forwards RLC(c0 /P, C 0 ) to users in Uh . 0.5 0 0 5 10 15 M Fig. 2: A combination network in centralized caching  systems with end-user-caches, with H = 6 relays, N = K = H r and r = 2. IV. N UMERICAL C OMPARISONS AND C ONCLUSIONS In Fig. 2 we compare the performance of the proposed schemes with those available in the literature for the centralized combination network with H = 6, r = 2, and N = K = 15. Notice that when M = N/K, for each illustrated scheme, we use the interference elimination scheme proposed in [5] (which is optimal under uncoded cache placement). We do not plot the schemes in [3] because it performs worse than the others plotted here. Our proposed scheme in Section III-F outperforms all other schemes when M is not too large (here, M ≤ 5.5). Compared to the scheme in [4] and our recent results in [7], the main advantage of the scheme in Section III-C is to characterize the order optimality within a constant factor for small cache size. R EFERENCES [1] M. A. Maddah-Ali and U. Niesen, “Fundamental limits of caching,” IEEE Trans. Infor. Theory, vol. 60, no. 5, pp. 2856–2867, May 2014. [2] Q. Yu, M. A. Maddah-Ali, and S. Avestimehr, “Characterizing the ratememory tradeoff in cache networks within a factor of 2,” in IEEE Int. Symp. Inf. Theory, Jun. 2017. [3] M. Ji, M. F. Wong, A. M. Tulino, J. Llorca, G. Caire, M. Effros, and M. Langberg, “On the fundamental limits of caching in combination networks,” IEEE 16th Int. Workshop on Sig. Processing Advances in Wireless Commun., pp. 695–699, 2015. [4] A. A. Zewail and A. Yener, “Coded caching for combination networks with cache-aided relays,” in IEEE Int. Symp. Inf. Theory, pp. 2438–2442, June 2017. [5] K. Wan, M. Ji, P. Piantanida, and D. Tuninetti, “Novel outer bounds and inner bounds with uncoded cache placement for combination networks with end-user-caches,” inner bounds in 55th Allerton Conf. Commun., Control, Comp. , outer bounds in IEEE Inf. Theory Workshop 2017, available at arXiv:1701.06884v5, Oct. 2017. [6] K. Wan, D. Tuninetti, and P. Piantanida, “On the optimality of uncoded cache placement,” in IEEE Infor. Theory Workshop, Sep. 2016. [7] K. Wan, M. Ji, P. Piantanida, and D. Tuninetti, “Caching in combination networks: Novel multicast message generation and delivery by leveraging the network topology,” accepted to IEEE Intern. Conf. Commun (ICC 2018), available at arXiv:1710.06752. [8] N. Naderializadeh, M. A. Maddah-Ali, and S. Avestimehr, “On the optimality of separation between caching and delivery in general cache networks,” in IEEE Int. Symp. Inf. Theory, Jun. 2017. [9] K. Wan, D. Tuninetti, and P. Piantanida, “On caching with more users than files,” in IEEE Int. Symp. Inf. Theory, Jul. 2016.
7cs.IT
Hyperbolic HHS II: Graphs of hierarchically hyperbolic groups Davide Spriano arXiv:1801.01850v1 [math.GR] 5 Jan 2018 January 5, 2018 Abstract In this paper we consider a large family of graphs of hierarchically hyperbolic groups (HHG) and show that their fundamental groups admit HHG structures. To do that, we will investigate the notion of hierarchical quasi convexity and show that for a hyperbolic HHS it coincides with the notion of quasi-convexity. The main technical result, for which we expect further applications, is that it is possible to incorporate the HHG structure of a hierarchically hyperbolically embedded subgroup into the HHG structure of the ambient group. This generalizes and provides some additional details to a procedure described in [DHS17]. Contents 1 Introduction 1 2 Background 2.1 Cone-offs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Hierarchically hyperbolic spaces . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 4 3 Hierarchical quasi-convexity 6 4 Graphs of Hierarchically Hyperbolic Groups 4.1 Definitions and notations . . . . . . . . . . . . . . . . . . . . . . . 4.1.1 Morphism of hierarchically hyperbolic spaces . . . . . . . . 4.2 Changing the hierarchically hyperbolic structure I: plan . . . . . . 4.3 Changing the hierarchically hyperbolic structure II: technical part 1 . . . . . . . . . . . . . . . . . . . . 7 . 7 . 7 . 9 . 10 Introduction The study of hierarchically hyperbolic spaces and groups (respectively HHS and HHG) was introduced by Behrstock, Hagen and Sisto in [BHS17c]. HHS and HHG form a very large class of spaces which contains several examples of interest including mapping class groups, right-angled Artin groups, many CAT(0) cube complexes, most 3-manifold groups, Teichmüller space (in any of the standard metrics), etc. A lot is known about HHS, see [BHS15, BHS17b, BHS17a, DHS17]. For instance a remarkable result about hierarchically hyperbolic space is that, under very mild conditions, every top-dimensional quasi-flat in an HHS lies within finite Hausdorff distance of a finite union of standard orthants. This proves open conjectures of Farb in the case of Mapping Class Group, and Brock in the case of Teichmüller space. For an introductory survey on HHS and HHG, we refer to [Sis17]. 1 Given a class of objects of interest, in this case the class of HHG, it is natural to ask if it is possible to obtain new examples by combining objects in the class. In the case of groups, one of the most natural ways to combine them is to take the fundamental group of an ”admissible” graph of groups. In the context of hyperbolic groups, the most comprehensive answer in this sense is provided by the celebrated Bestvina-Feighn Combination Theorem ([BF92, BF96]) that provides sufficient conditions which ensure that the fundamental group of a finite graph of hyperbolic groups is word-hyperbolic. In [BHS15], Behrstock, Hagen and Sisto introduced the definition of graph of HHG and proved what we will refer to as the Combination Theorem for HHG ([BHS15, Corollary 8.22], see Theorem 4.15) which provides strong answers in this sense. Indeed, under some hypotheses on the edge maps, they showed that the fundamental group of a graph of HHG is indeed an HHG. The idea of the Combination Theorem is that, given a graph of HHG G, some Cayley graphs of the various edge and vertex groups can be arranged in a ”Bass-Serre tree” fashion, giving a space T on which π1 (G) acts. The hypotheses basically guarantee that the HHS structures of the various groups glue together to get an HHS structure on T that is π1 (G) equivariant. The main goal of this paper is to show that a large class of graphs of HHG satisfies the hypotheses of the Combination Theorem. One of the key tools that will be used is the concept of hierarchically hyperbolically embedded subgroups. Hierarchically hyperbolically embedded subgroups (introduced in [BHS17b]) are the natural generalization of hyperbolically embedded subgroups to the hierarchical setting. Hyperbolically embedded subgroups were introduced and extensively studied in [DGO17] and can be thought of as a generalization of the peripheral structure of a relatively hyperbolic group. The existence of a (non degenerate) hyperbolically embedded subgroup has far reaching consequence, such as acylindrical hyperbolicity of the ambient group ([Osi16]). Conversely, given an acylidrically hyperbolic group, there are constructions that provides several hyperbolically embedded subgroups [DGO17]. Moreover, hyperbolically embedded subgroups are ”generic” as showed by Maher and Sisto in [MS17]. For these reasons, considering hierarchically hyperbolically embedded subgroups should not be thought of as an exceedingly restrictive hypothesis. Intuitively, the main result of this paper consists in showing that the hypotheses of the Combination Theorem are stable under adding new vertices with hyperbolic vertex groups and whose edge groups are hierarchically hyperbolically embedded in the vertex groups. Before giving a more precise formulation of the main result, let’s consider a motivating example. It is easy to see that a graph of HHG G consisting of a single vertex v satisfies the hypotheses of the Combination Theorem (Remark 4.16). Let Q be the vertex HHG associated to v. Then we can transform the graph G adding a vertex w and an edge e between v and w such that G = Gw is hyperbolic and H = He is a quasi-convex subgroup of G. We require moreover that H is hierarchically hyperbolically embedded in Q. Since the starting graph satisfy the Combination Theorem, so does the modified graph of groups. Thus the amalgamated product Q ∗H G admits an HHG structure. It is worth underlining that the only hierarchical-like requirement concerns the embedding H ֒→ Q. Since there are no requirements on the HHG structure of Q, an hypothesis of this type is clearly needed. We consider now the construction above in full generality. F Definition. Let G ′ = Gi be a finite union of finite graphs of HHG. A graph of groups G is star-obtainable from G ′ if G can be obtained from G ′ by a finite number of the following moves. 1. Joining two vertices of G ′ by an edge e such that Ge is hyperbolic. 2. Adding a new vertex v and joining it with a finite set of vertices of G ′ such that · the vertex group Gv is hyperbolic; · the edge groups are quasi-convex subgroups of Gv ; 2 We say that G is hyperbolic-obtainable from G ′ if it is star-obtainable and the following holds. For each vertex v of G ′ the set of edge groups adjacent to v that correspond to edges of G − G ′ is hierarchically hyperbolically embedded in Gv . The main result of the paper is the following. F Theorem 1 (4.17). Let G be a graph of groups that is hyperbolic-obtainable from G ′ = Gi , where each Gi is a finite graph of hierarchically hyperbolic groups that satisfies the hypotheses of the Combination Theorem for HHG. Then there are HHG structures on the vertices and edges groups of G such that G satisfies the hypotheses of the Combination Theorem. In particular, π1 (G) admits a hierarchically hyperbolic group structure. There are two key ingredients in the proof of Theorem 1: the flexibility in the HHG structures on hyperbolic groups provided by [Spr17, Corollary 5.23] and a construction that allows to incorporate the HHG structure of a hierarchically hyperbolically embedded subgroup H into an HHG Q (Proposition 4.22). The latter is greatly inspired, and in fact is a generalization of [BHS17b, Section 6]. It also provides a more detailed proof of the Large Link Lemma condition of [BHS17b, Proposition 6.14]. Outline Section 2 recalls the definition of hierarchically hyperbolic spaces and the some results related to cone-offs and factor systems. Section 3 shows the equivalence of quasi-convexity and hierarchical quasi-convexity in hyperbolic spaces. It also recalls some fundamental theorems of the theory of HHS such as the existence of hierarchy paths and the distance formula. Section 4 contains the main result of the paper. In Subsection 4.1 we recall the definitions and some results connected to HHG and (hierarchically) hyperbolically embedded subgroups. In Subsection 4.2 we state the main result and applications, and structure the ideas of the proof. The bulk of the proofs and technicalities is moved to Subsection 4.3. Acknowledgments The author would like to thank Alessandro Sisto for suggesting the topic and for very helpful comments and suggestions. 2 2.1 Background Cone-offs We recall the following results. Definition 2.1 (Coning-off). Let Γ be a graph, H a connected subgraph of Γ. We define b as the graph obtained from Γ adding the cone-off of Γ with respect to H, and denote it by Γ, an edge connecting each pair of vertices in (H × H) − ∆H×H , where ∆H×H denotes the diagonal. We call the edges added in such a way H-components. Similarly, the cone-off with respect to a family of connected subgraphs H = {Hi } is obtained adding the Hi -components for each Hi ∈ H. An edge is an H-component if it is a Hi -component for some Hi ∈ H. Proposition 2.2 (Kapovich-Rafi, Bowditch). Let Γ be a connected graph with simplicial metric dΓ such that (X, dX ) is δ-hyperbolic. Let K > 0 and H be a family of K-quasib be the cone-off of Γ with respect to the family H. Then Γ b is convex subgraphs of Γ. Let Γ δ ′ -hyperbolic (with respect to the path metric) for some constant δ ′ > 0 depending only on K and δ. Moreover there exists H = H(K, δ) > 0 such that whenever x, y ∈ V (Γ), [x, y]Γ is b then [x, y]Γ and a dΓ -geodesic from x to y in Γ and [x, y]Γb is a dΓb -geodesic from x to y in Γ b [x, y]Γb are H-Hausdorff close in (Γ, dΓb ). 3 b be the cone-off of a graph Γ with respect to a family of quasiDefinition 2.3. Let Γ b where isometrically embedded subgraphs H. Let γ = u1 ∗ e1 ∗ · · · ∗ en ∗ un+1 be a path of Γ, each ei is an Hi -component for some Hi ∈ H, and the ui are (possibly trivial) segments of Γ. The embedded-de-electrification e γ e of γ is the concatenation u1 ∗ η1 ∗ · · · ∗ ηn ∗ un+1 where each ηi is a geodesic segment of Hi connecting the endpoints of ei . If ei was an H-component, we say that ηi is an H-piece. A piece of γ e is an H-piece if it is an H-piece for some H ∈ H. Proposition 2.4 ([Spr17] Corollary 2.30). Let Γ be a δ-hyperbolic graph, H a family of b the cone-off of Γ with respect to uniformly quasi-isometrically embedded subgraphs and Γ H. Then there exist τ1 = τ1 (δ, K) and τ2 = τ2 (δ, K) such that for each pair of points b with the property that for each embedded-dex, y ∈ Γ there exists a τ1 -quasi-geodesic γ ′ of Γ electrification γ e′ of γ ′ , γ e′ is a τ2 -quasi-geodesic of Γ. 2.2 Hierarchically hyperbolic spaces The goal of this section is to recall the definition of hierarcahically hyperbolic spaces and some important properties. For additional details, the main reference is [BHS15]. Definition 2.5 (Hierarchically hyperbolic space, [BHS15]). The q-quasigeodesic space (X , dX ) is a hierarchically hyperbolic space if there exists δ ≥ 0, an index set S, and a set {CW : W ∈ S} of δ–hyperbolic spaces (CU, dU ), such that the following conditions are satisfied: 1. (Projections.) There is a set {πW : X → 2CW | W ∈ S} of projections sending points in X to sets of diameter bounded by some ξ ≥ 0 in the various CW ∈ S. Moreover, there exists K so that each πW is (K, K)–coarsely Lipschitz. 2. (Nesting.) S is equipped with a partial order ⊑, and either S = ∅ or S contains a unique ⊑–maximal element; when V ⊑ W , we say V is nested in W . We require that W ⊑ W for all W ∈ S. For each W ∈ S, we denote by SW the set of V ∈ S such that V ⊑ W . Moreover, for all V, W ∈ S with V properly nested in W there is a specified subset ρVW ⊂ CW with diamCW (ρVW ) ≤ ξ. There is also a projection CV ρW . (The similarity in notation is justified by viewing ρVW as a coarsely V : CW → 2 constant map CV → 2CW .) 3. (Orthogonality.) S has a symmetric and anti-reflexive relation called orthogonality: we write V ⊥W when V, W are orthogonal. Also, whenever V ⊑ W and W ⊥U , we require that V ⊥U . Finally, we require that for each T ∈ S and each U ∈ ST for which {V ∈ ST | V ⊥U } = 6 ∅, there exists W ∈ ST − {T }, so that whenever V ⊥U and V ⊑ T , we have V ⊑ W . Finally, if V ⊥W , then V, W are not ⊑–comparable. 4. (Transversality and consistency.) If V, W ∈ S are not orthogonal and neither is nested in the other, then we say V, W are transverse, denoted V ⋔ W . There exists κ0 ≥ 0 such that if V ⋔ W , then there are sets ρVW ⊆ CW and ρW V ⊆ CV each of diameter at most ξ and satisfying: n o min dW (πW (x), ρVW ), dV (πV (x), ρW V ) ≤ κ0 for all x ∈ X . For V, W ∈ S satisfying V ⊑ W and for all x ∈ X , we have: n o min dW (πW (x), ρVW ), diamCV (πV (x) ∪ ρW V (πW (x))) ≤ κ0 . The preceding two inequalities are the consistency inequalities for points in X . V Finally, if U ⊑ V , then dW (ρU W , ρW ) ≤ κ0 whenever W ∈ S satisfies either V ⊑ W and V 6= W or V ⋔ W and W 6 ⊥U . 4 5. (Finite complexity.) There exists n ≥ 0, the complexity of X (with respect to S), so that any set of pairwise–⊑–comparable elements has cardinality at most n. 6. (Large links.) There exist λ ≥ 1 and E ≥ max{ξ, κ0 } such that the following holds. Let W ∈ S and let x, x′ ∈ X . Let N = λdW (πW (x), πW (x′ )) + λ. Then there exists {Ti }i=1,...,⌊N⌋ ⊆ SW − {W } such that for all T ∈ SW − {W }, either T ∈ STi for some i, or dT (πT (x), πT (x′ )) < E. Also, dW (πW (x), ρTWi ) ≤ N for each i. 7. (Bounded geodesic image.) For all W ∈ S, all V ∈ SW − {W }, and all geodesics V γ of CW , either diamCV (ρW V (γ)) ≤ E or γ ∩ NE (ρW ) 6= ∅. 8. (Partial Realization.) There exists a constant α with the following property. Let {Vj } be a family of pairwise orthogonal elements of S, and let pj ∈ πVj (X ) ⊆ CVj . Then there exists x ∈ X so that: • dVj (x, pj ) ≤ α for all j, V • for each j and each V ∈ S with Vj ⊑ V , we have dV (x, ρVj ) ≤ α, and V • if W ⋔ Vj for some j, then dW (x, ρWj ) ≤ α. 9. (Uniqueness.) For each κ ≥ 0, there exists θu = θu (κ) such that if x, y ∈ X and d(x, y) ≥ θu , then there exists V ∈ S such that dV (x, y) ≥ κ. We often refer to S, together with the nesting and orthogonality relations, the projections, and the hierarchy paths, as a hierarchically hyperbolic structure for the space X . Definition 2.6 (Factor System). Let Γ be a connected graph. We say that a family H of connected subgraphs of Γ is a factor system for Γ if there are constants K, c, ξ, B such that the following are satisfied. 1. Each H ∈ H is K-quasi-isometrically embedded in Γ. 2. Given H1 , H2 ∈ H, either diam(pH1 (H2 )) ≤ ξ, or there is U ∈ H with such that U ⊆ H1 and dHaus (pH1 (H2 ), U ) ≤ B. 3. Given H1 , H2 ∈ H, if dHaus (pH1 (H2 ), H1 ) ≤ B, then H1 ⊆ H2 . 4. Every ascending chain of inclusions H1 ( H2 ( · · · ( Hn has length bounded above by c. 5. Given H1 , H2 ∈ H, if dHaus (H1 , H2 ) < ∞, then H1 = H2 . Theorem 2.7 ([Spr17], Theorem 3.14). Let Γ be a hyperbolic graph, H be a factor system b be the cone off of H with respect to all elements of for Γ and, for each H ∈ H ∪ {Γ}, let H H that are strictly contained in H. Then Γ admits a hierarchically hyperbolic structure, with b | H ∈ H ∪ {Γ}}. indexing set H ∪ {Γ}, and with associated hyperbolic spaces the family {H The projections are realized as closest point projections in Γ. There is a particular instance of factor system that we will use in Section 4. Corollary 2.8. Let Γ be a hyperbolic graph and let H be a family of uniformly quasiisometrically embedded subgraphs of Γ. Suppose that all the elements of H have infinite diameter. Suppose, moreover, that for each ε exists R = R(ε) such that for any pair of distinct elements H1 , H2 of H, the intersection Nε (H1 ) ∩ H2 has diameter at most R. Then H is a factor system for Γ and (Γ, H ∪ {Γ}) is a hierarchically hyperbolic space. Proof. The axioms 1,4 and 5 are immediate from the hypotheses. Axiom 3 follows easily from hyperbolicity of Γ. Consider Axiom 2. We claim that there is ξ such that for each pair of elements H1 and H2 of H, we have diam(pH2 (H1 )) ≤ ξ. Suppose this is not the case. Since Γ is hyperbolic, the spaces Hi are uniformly quasi-convex. In particular, there is are constants K and T such that diam(pH2 (H1 )) − T ≤ diam(NK (H1 ) ∩ H2 ). But the latter is uniformly bounded by R(K). A consequence of a generalized version of Theorem 2.7 is the following. 5 Theorem 2.9 ([Spr17], Corollary 5.23). Let G be a hyperbolic group and let F = {F1 , . . . , FN } be a finite family of infinite quasi-convex subgroups. Let ∼ be the equivalence relation between subset of G given by having finite distance in Cay(G) (note that does not depend on the choice of generators). Then there exists a finite family of quasi-convex subgroups F (M ) that contains F such that if Fcos is the set of cosets of F (M ) , then (G, Fcos /∼ ) is a hierarchically hyperbolic group structure on G. Corollary 2.10 ([Spr17], Section 5). Let G be a hyperbolic group, and let F = {F1 , . . . , FN } be a finite family of quasi-convex subgroups. Let (G, S) be the HHG structure on G provided by Theorem 2.9. Then for each F ∈ F, we have that (F, S[F ] ) is an HHG structure on F . Moreover the inclusion map i : F ֒→ G induces an injective hieromorphism between F and G, such that for each [H] ∈ S[F ] , we have i ([H]) = [H]. 3 Hierarchical quasi-convexity We conclude this section providing a result that will be useful in Section 4, namely that for a hyperbolic graph Γ equipped with the HHS structure coming from a factor system, quasi-convex subgraphs of Γ are hierarchically quasi-convex. The notion of hierarchical quasi-convexity was introduced by Behrstock, Hagen and Sisto and has deep consequences (see Sections 5,6,7 of [BHS15]). Definition 3.1 (Hierarchical quasi-convexity, [BHS15] Definition 5.1). Let (X , S) be a hierarchically hyperbolic space. We say that a subset Y ⊂ Q is k-hierarchically quasiconvex, for some k : [0, ∞) → [0, ∞), if the following holds: 1. For each U ∈ S, one has that πU (Y ) is k(0)-quasi-convex in CU . 2. For every r ≥ 0 and every x ∈ X such that dCU (πU (x), πU (Y )) ≤ r for all U ∈ S, one has that dX (x, Y ) ≤ k(r). We recall the Distance Formula for hierarchically hyperbolic spaces Theorem 3.2 (Distance formula, [BHS15] Theorem 4.5). Let (X , S) be hierarchically hyperbolic. Then there exists s0 such that for all s ≤ s0 there exists constants K, C such that for all x, y ∈ X , X {{dCW (πW (x), πW (y))}}s , dX (x, y) ≍(K,C) W ∈S where {{A}}s is equal to 0 if A < s, and equal to A otherwise. Definition 3.3 (Hierarchy path, [BHS15] Definition 4.2). Let (X , S) be a hierarchically hyperbolic space. A path γ of X is a D-hierarchy path if 1. γ is a (D, D)-quasi-geodesic of X ; 2. for each U ∈ S the projection πU (γ) is a (D, D)-quasi-geodesic. Theorem 3.4 (Existence of hierarchy paths, [BHS15] Theorem 4.4). Let X be a hierarchically hyperbolic space. Then there exists D0 so that any x, y ∈ X are joined by a D0 -hierarchy path. We can now state the main result of this section. Proposition 3.5 (Equivalence of quasi-convexity and hierarchical quasi-convexity). Let (X , S) be a hyperbolic hierarchically hyperbolic space, and let Y be a subspace of X . Then there are functions Q and K such that the following holds. If Y is q-quasi-convex in X , then Y is K(q)-hierarchically quasi convex in (X , S). Conversely, if Y is k-hierarchically quasi-convex in (X , S), then Y is Q(k)-quasi-convex in X . Proof. The fact that hierarchical quasi-convexity implies quasi-convexity is an easy consequence of Theorems 3.4 and 3.2. Suppose that Y is hierarchically k-quasi-convex for some k : [0, ∞) → [0, ∞), let a, b be two points of Y, and let [a, b] be a geodesic of X connecting 6 them. Let γ be a hierarchy path connecting a and b, whose existence is guaranteed by Theorem 3.4. Then, using the fact that the spaces CU are hyperbolic, we have that for each s ∈ γ and U ∈ S, we can uniformly bound the distance d(πU (s), πU (Y)). By the distance formula (Theorem 3.2), we can uniformly bound the distance between s and Y. Since γ is a quasi-geodesic, it has uniformly bounded Hausdorff distance from [a, b], thus the result follows. For the other implication, recall that hierarchically quasi-convexity consists of two parts. For each U ∈ S, the spaces πU (Y) are uniformly quasi-convex. Let x′ , y ′ be two points in πU (Y) and let x, y ∈ Y be such that x′ ∈ πU (x) and y ′ ∈ πU (y). Let γ be a hierarchy path between x and y, whose existence is guaranteed by Theorem 3.4. Since X is hyperbolic and Y is quasi-convex, each point of γ has uniformly bounded distance from Y. Since projections are uniformly quasi-Lipschitz, this is still true for πU (γ) and πU (Y). Since every CU is uniformly hyperbolic, the claim follows. There is a function k such that if dCU (x, Y) ≤ r for each U ∈ S, then dX (x, y) ≤ k(r). Let x ∈ X be such that for each U ∈ S, one has dCU (x, Y) ≤ r, and let y ∈ Y such that dX (x, y) is minimal. If there is ψ(r) such that for all U ∈ S one has dCU (x, y) ≤ ψ(r), then the result will follow form the distance formula (Theorem 3.2). Choose U and let z be a point of Y such that dCU (x, z) = dCU (x, Y). We want to uniformly bound dCU (y, z), which will imply the claim. Let [x, y] be a geodesic of X between x and y. Since [x, y] is a projection geodesic and Y is quasi-convex in X there is a point s′ ∈ [x, z] that has uniformly bounded distance from y. Let γ be a hierarchy path of X between x and y. Since X is hyperbolic, the Hausdorff distance between [x, z] and the hierarchy path γ is uniformly bounded. Thus there is a point s ∈ γ that has uniformly bounded distance from y in X . We remark that the uniform bound does not depend on x or U ∈ S. Since the projection πU is quasi-Lipschitz, we can uniformly bound dCU (s, y)by some uniform c. Since γ is a hierarchy path, s lies at uniformly bounded distance Λ from a geodesic [x, z] of CU . Since [x, z] is a projection geodesic, we get dCU (y, z) ≤ 2(Λ + c). 4 Graphs of Hierarchically Hyperbolic Groups The goal of this section is to apply the constructions of the previous sections in order to get an HHG structure on certain fundamental groups of graphs of groups. Indeed, the Combination Theorem for HHG (see [BHS15]) yields sufficient conditions for the fundamental group of a graph of groups to be an HHG. We will check that these conditions are verified for a class of graphs of groups. The key step will be to show that given a finite family of hyperbolic HHGs {(Hi , Hi )}i∈I that is hierarchically hyperbolic embedded into an HHG (Q, S), then it is possible to modify the HHG structure on Q in such a way that the various inclusions φi : Hi ֒→ Q become homomorphisms of HHG.F We will need some definitions introduced in [BHS15]. We refer to [BHS15] for additional details. 4.1 4.1.1 Definitions and notations Morphism of hierarchically hyperbolic spaces Definition 4.1 (Hieromorphism, [BHS15] Definition 1.19). Let (X , S) and (X ′ , S′ ) be hierarchically hyperbolic structures on the spaces X , X ′ respectively. A hieromorphism, consists of a map f : X → X ′ , an injective map f : S → S′ preserving nesting, transversality, and orthogonality, and maps f ∗ (U ) : CU → C(f (U )), for each U ∈ S, which are uniformly quasi-isometric embeddings. The three maps should preserve the structure of the hierarchically hyperbolic space, that is, they coarsely commute with the maps πU and ρU V , for U, V in either S or S ′ , associated to the hierarchical structures. 7 Definition 4.2 (Automorphism, hierarchically hyperbolic group, [BHS15] Definition 1.20). An automorphism of the hierarchically hyperbolic space (X, S) is a hieromorphism f : (X , S) → (X , S) such that f is bijective and each f ∗ (U ) is an isometry. The finitely generated group Q is hierarchically hyperbolic if there exists a hierarchically hyperbolic space (X , S) on which Q acts by automorphisms of hierarchically hyperbolic spaces, so that the uniform quasi-action of G on X is metrically proper and cobounded and S contains finitely many Q–orbits. Note that if Q is hierarchically hyperbolic by virtue of its action on the hierarchically hyperbolic space (X , S), then (Q, S) is a hierarchically hyperbolic structure with respect to any word-metric on Q; for any U ∈ S the projection is the composition of the projection X → CU with a Q–equivariant quasi-isometry Q → X . In this case, (Q, S) (with the implicit hyperbolic spaces and projections) is a hierarchically hyperbolic group structure. Definition 4.3 (Full hieromorphim, [BHS15] ). We say that a hieromorphism is full if · there exists ξ ≥ 0 such that each f ∗ (U ) : CU → C(f (U )) is a (ξ, ξ)–quasi-isometry, and · for each U ∈ S, if V ′ ∈ S′ satisfies V ′ ⊑ f (U ), then there exists V ∈ S such that V ⊑ U and f (V ) = V ′ . As the functions f, f ∗ (U ), and f S all have distinct domains, it is often clear from the context which is the relevant map; in that case we periodically abuse notation slightly by dropping the superscripts and just calling all of the maps f . Remark 4.4. Observe that the second item of the definition of full hieromorphism holds automatically unless V ′ is bounded. Definition 4.5 (Homomorphism of hierarchically hyperbolic groups, [BHS15] Def 1.21). Let (Q, S) and (Q′ , S′ ) be hierarchically hyperbolic groups. A homomorphism of hierarchically hyperbolic groups consists of a hieromorphims φ : Q → Q′ such that φ is a homomorphism of group and the hieromorphism maps φ∗ , φ are uniformly coarsely-equivariant with respect to the homomorphism φ. Hyperbolically embedded subgroups We recall the definition of hyperbolically embedded subgroups that was originally introduced by Dahmani, Guirardel and Osin in [DGO17]. Let G be a group and {Hi }i∈I be a F family of subgroups of G. Let T be a (possibly infinite) set of elements of G and let F = i∈I (Hi − 1). Suppose that T is symmetric (that is for each t ∈ T , we have that t−1 ∈ T ) and that hT ∪ F i = G. For each i ∈ I, the Cayley graph Cay(Hi , Hi − {1}) is a complete subgraph of Cay(G, T ∪ F ). Let E(Hi ) denote the set of edges of the Cayley graph of Hi . Definition 4.6 ([DGO17] Definition 4.2). For each i ∈ I, we define the relative metric dbi : Hi × Hi → [0, +∞] as the length of the shortest path in Cay(G, T ∪ F ) − E(Hi ). If such a path does not exist, then we set the length to be +∞. Definition 4.7 (Hyperbolically embedded subgroups, [DGO17] Definition 4.25). The family {Hi }i∈I is hyperbolically embedded in G with respect to the set T , and denoted by {Hi } ֒→h (G, T ) if: · the graph Cay(G, T ⊔ H) is hyperbolic; · for each i ∈ I, the metric space (Hi , dbi ) is proper. We say that the family {Hi } is hyperbolically embedded in G if there is a set X such that {Hi } ֒→h (G, X). Definition 4.8 (Hierarchically hyperbolically embedded subgroups, [BHS17b]). Let (Q, S) be an HHG, let S be the ⊑-maximal element of S and let ({Hi }i∈I ) be a finite family of subgroups of Q. We say that the family {Hi } is hierarchically hyperbolically embedded into Q, and denote this by H ֒→hh Q, if the following hold: 8 · There is a (possibly infinite) generating set T of Q such that CS = Cay(Q, T ) and πS is the inclusion. · T ∩ Hi generates Hi . · Hi is hyperbolically embedded in (Q, T ). We remark that, by the definition of hierarchically hyperbolic group, it is always possible to find a set T such that the first two conditions are satisfied. The focus of the definition is that the family {Hi } is hyperbolically embedded with respect to that particular set T . We recall some properties of hyperbolically embedded subgroups. Lemma 4.9 ([AMS16], Lemma 3.1). If {Hi }֒→h (G, T ) is a hyperbolically embedded family of subgroups, then for each i there is a finite set of generators Qi of Hi such that (Hi , dQi ) is quasi-isometrically embedded in (G, dT ). Lemma 4.10 ([AMS16], Lemma 3.2). Let {Hi }֒→h (G, T ) be a hyperbolically embedded family of subgroups. Then for every ε there exists R = R(ε) such that for every g ∈ G and i, j ∈ I, if diam(Hi ∩ Nε (gHj )) ≥ R, then i = j and g ∈ Hi . 4.2 Changing the hierarchically hyperbolic structure I: plan The goal of this subsection is to state the main result and streamline the strategy adopted. We will postpone the bulk of the proofs to the next paragraph. Consider the following class of graphs of groups. F Definition 4.11. Let G ′ = Gi be a finite union of finite graphs of HHG. A graph of groups G is star-obtainable from G ′ if G can be obtained from G ′ by a finite number of the following moves. 1. Joining two vertices of G ′ by an edge e such that Ge is hyperbolic. 2. Adding a new vertex v and joining it with a finite set of vertices of G ′ such that · the vertex group Gv is hyperbolic; · the edge groups are quasi-convex subgroups of Gv ; We say that G is hyperbolic-obtainable from G ′ if it is star-obtainable and the following holds. For each vertex v of G ′ the set of edge groups adjacent to v that correspond to edges of G − G ′ is hierarchically hyperbolically embedded in Gv . We remark that the construction (1) is a special case of the second one. Indeed, adding an edge with edge group He is the same (on the level of the fundamental group) as adding a vertex v adjacent to edges e1 , e2 such that He1 ∼ = Gv ∼ = He2 . However, we listed them separately for simplicity. We will now recall enough terminology to be able to state the Combination Theorem for HHG. Definition 4.12 (Graph of hierarchically hyperbolic groups, [BHS15]). Let G = (Γ, {Ge }, {Gv }, φ± e ) be a graph of groups, where Γ represent the underlying graph, {GV } are the vertex groups, {Ge } are the edges groups and {φ± e } are the edge maps. We say that G is a graph of hierarchically hyperbolic groups if for each v ∈ V, e ∈ E, we have sets Sv , Se so that (Gv , Sv ) and (Ge , Se ) are hierarchically hyperbolic group structures for which φ± e : Ge → Ge± is a homomorphism of hierarchically hyperbolic groups. Another concept that we want to recall is the one of bounded supports. However, since the definition is long and beyond the scope of this paper, we will refer to [BHS15, Definition 8.5] and consider instead the following two Lemmas. The intuitive idea is that given two graphs of HHG that are known to have bounded supports (for instance a graph consisting of a single vertex), we can connect them in a way that the supports do not propagate from one another, yielding that the new graph still has bounded supports. The proofs are a straightforward consequence of the definition of bounded supports ([BHS15, Definition 8.5]). 9 Lemma 4.13. Every graph of HHG that has only one vertex and no edges has bounded supports. Lemma 4.14. Let G1 and G2 be two finite graphs of hierarchically hyperbolic groups that have the bounded supports. Let G be a graph of hierarchically hyperbolic groups obtained adding edges to G1 and G2 in such a way that the result is a (connected) finite graph of hierarchically hyperbolic groups. Suppose that for each new edge e, with edge group (He , He ), the following holds. For each vertex v on e, edge f 6= e incident to v and g1 , g2 ∈ Gv we have that g1 φf (Hf ) ∩ g2 φe (He ) = ∅, where φf : Hf → Gv is the edge map. Then G has bounded supports. We recall the Combination Theorem for HHG. Theorem 4.15 (Combination Theorem for HHG, [BHS15] Corollary 8.22). Let G = (Γ, {Gv }, {Ge }, {φ± e }) be a finite graph of hierarchically hyperbolic groups and suppose that the following are satisfied. − · For each edge e, the images φ+ e (Ge ) and φe (Ge ) have hierarchically quasi-convex image (Definition 3.1). · The maps φ± e , as hieromorphisms, are full (Definition 4.3). · For each edge e, the image of the maximal element Se ∈ Se is not orthogonal to any element V ∈ Se± . · G has bounded supports. Then the fundamental group of G admits a hierarchically hyperbolical group structure. Remark 4.16. We remark that a graph with a single vertex of valence 0 satisfies the hypotheses of Theorem 4.15. Indeed, there are no edge maps and the bounded supports follows from Lemma 4.13. The main result of this section is the following. F Theorem 4.17. Let G be a graph of groups that is hyperbolic-obtainable from G ′ = Gi , where each Gi is a finite graph of hierarchically hyperbolic groups that satisfies the hypotheses of Theorem 4.15. Then there are HHG structures on the vertices and edges of G (as in Construction 4.21) such that G satisfies the hypotheses of Theorem 4.15. In particular, π1 (G) admits a hierarchically hyperbolic group structure. Proof. We postpone the full proof of the Theorem to the end of this section. This will allow to ”inductively apply” the construction of Definition 4.11 and Theorem 4.15 to obtain an HHG structure on interesting groups. Since every hierarchically hyperbolic group can be realized as the fundamental group of a graph of HHG with one vertex and no edges, Remark 4.16 provides an interesting class of examples. For instance, if H is a quasiconvex subgroup of a hyperbolic group G and H ֒→hh MCG, where MCG is the Mapping Class Group of a given (non sporadic) surface, we get that MCG ∗H G admits an HHG structure. 4.3 Changing the hierarchically hyperbolic structure II: technical part In this subsection we will prove Theorem 4.17. The proof will follow three steps. Firstly we will show that it is possible to equip the new added edge and vertex groups with an HHG structure. This is an easy consequence of Theorem 2.9. Then we will need to show that the whole graph of groups is a graph of HHG. To achieve this, we will change the HHG structure on (some) of the original vertices. This will require some amount of work. Finally we will verify that the new graph of HHG satisfies the hypotheses of Theorem 4.15, mainly the one concerning hierarchical quasi-convexity. 10 Definition 4.18 (Normalized HHS). The HHS (X , S) is normalized if there exists C such that for each U ∈ S one has CU = NC (πU (X )). Proposition 4.19 ([DHS17] Proposition 1.16). Let X , S be a hierarchically hyperbolic space. Then X admits a normalized hierarchically hyperbolic structure (X , S′ ) with a hieromorphism f : (X , S) → (X , S′ ) where f : X → X is the identity and f : S → S′ is a bijection. Moreover, if G ≤ Aut(X , S), then there is a homomorphism G → Aut(S′ ) making f equivariant. Remark 4.20. Let (Q, S) be a normalized hierarchically hyperbolic group and let S ∈ S be the ⊑-maximal element. Then the action of Q on CS is cobounded. In particular, there is a (possibly infinite) set of generators X for Q such that CS is quasi-isometric to Cay(Q, X). Convention. From now on, we will use Proposition 4.19 to assume that all the hierarchically hyperbolic spaces are normalized. Moreover, by Remark 4.20, we can assume that for each hierarchically hyperbolic group (Q, S), the maximal hyperbolic space CS associated it is a Cayley graph of Q. Notation. In what follows we will deal with different hierarchically hyperbolic structures on the same space. In order to avoid confusion, if (Q, S) and (Q, S′ ) are two different hierarchically hyperbolic structure on Q, we will denote by CS U , the hyperbolic spaces associated to U in S, and by CS′ U the one associated to the second structure. Similarly, S S we decorate the projections πU and the maps ρU πU and ρU V with left superscripts V. We want to describe how to incorporate the HHG structure of hierarchically hyperbolically embedded subgroups into an ambient HHG. First, consider the following construction, which is analogous to the one described in [BHS17b, Proposition 6.14] Construction 4.21 (Cf. [BHS17b]). Let {(Hi , Hi )}i∈I be a finite family of hyperbolic hierarchically hyperbolic groups, and let (Q, S) be a hierarchically hyperbolic group. Suppose that the family {Hi }i∈I is hierarchically hyperbolically embedded in Q. We construct a new HHS structure on Q. For each i ∈ I, let φi : Hi ֒→ Q be the inclusion maps. By Remark 4.20, there is a set T ⊆ Q so that CS S = Cay(Q, T ). Let Cos({Hi }) be the set of all the cosets of the various Hi in Q, and let d CS be the cone-off of CS with respect to Cos({Hi }). By Lemma 4.9, the maps φi : Hi ֒→ CS provide (uniform) quasi-isometric embeddings for all the elements of Cos({Hi }). Since each coset gφi (Hi ) is isometric to φi (Hi ), since HHS structures are preserved by quasi-isometry, and since, by assumption, (Hi , Hi ) is a hierarchically hyperbolic group, we can push forward the HHS structure of Hi to all the cosets gφi (Hi ). The new HHS on the group Q will be obtained ”adding” all the above HHS structures to (Q, S). Since all the HHS structures on the various cosets (of the same Hi ) are identical, we will describe a precise indexing set for all the HHS structures of the elements of Cos({Hi }). For each i ∈ L let Q(i) be a maximal set of elements of Q such that for each pair g1 , g2 ∈ Q(i), we have that g1 g2−1 6∈ Hi (that is, choose once and for all a representative F for the cosets of Hi ). Then for each i ∈ I define Fi to be the set Hi × Q(i), and let F = i∈I Fi . We claim (Proposition 4.22) that the following defines a hierarchically hyperbolic group structure on Q: • The index set is L = S ⊔ F • The relations ⊑ and ⊥ restricted to S are unchanged. Between the elements of a level set Hi × {g} ⊆ F, the relations are defined as on Hi , and we set all the elements of F to be nested into S. In all the other cases, we declare two elements to be transverse (that is, neither orthogonal nor nested). • The spaces CL W are defined as: d if W = S; · CS · CS W if W ∈ S − {S}; 11 · CHi U if W = (U, g), where U ∈ Hi and g ∈ Q(i). • The projections L πW : Q → 2CL W are unchanged on S. Given an element W ∈ F, there is i ∈ I, U ∈ Hi and g ∈ Q(i) such that W = (U, g). Then we define L πW as the composition Hi πU ◦ pgHi , where pHi denotes the closest point projection in CS on the coset gHi , and we identify gHi with Hi . L • The maps and spaces ρU V are: · unchanged if U and V are elements of S; · unchanged if U and V are elements of Hi × {g} for some i ∈ I and g ∈ Q(i); · defined as follow if we are not in the above cases. Let W ∈ {U, V } and define SW as S if W ∈ S, or as gHi if W ∈ Zi . We have that SU and SV can be uniquely seen as subgraphs of CS, so it is well defined the closest point projection pSV , where we remark that we consider the metric in CS. Then we set ρU V as the composition U πV ◦ p S V ◦ ρ U SU , where ρSU is defined as in the lines above and πV is well defined, since by hypotheses CS is a Cayley graph for Q. Proposition 4.22. The structure described in Construction 4.21 is a hierarchically hyperbolic structure on Q such that: · (Q, L) is a hierarchically hyperbolic group; · S ⊆ L; · for each i ∈ I, the map φi : Hi → Q is a homomorphism of hierarchically hyperbolic groups, with respect to the above structures. · for each i ∈ I we have that φi (Hi ) ∩ S = ∅, where φi : Hi → L is the map on the index set level induced by φ. Proof. The second and last point are clear by construction. The hard part of the proof consists in showing that (Q, L) is an HHS, and we will do by verifying the axioms of hierarchically hyperbolic space. The fact that (Q, L) is an HHG and that the maps φi are homomorphisms of hierarchically hyperbolic groups follow from the fact the HHS structures are clearly compatible with the Q and Hi actions. • There is a set of projections {πW | W ∈ L} that are uniformly quasi-Lipschitz. This follows because the maps F πW are defined as composition of uniformly quasi-Lipschitz maps. • There is a relation ⊑ and sets ρU V such that for each pair U, V with U properly nested in V , the set ρU V has uniformly bounded diameter. Lemma 4.10 and the fact that (Hi , Hi ) is a hierarchically hyperbolic group gives the statement on F. Since the map CS → d CS is distance-non-increasing, it holds also on S. Since, by construction, if two elements are nested, then they both belong to either S or F or one is in F and the other is S. But since each element of F is coned-off in d CS, we get the claim. • Orthogonality. This clearly holds because if U ⊥V , then U, V ∈ S. • Behrstock’s inequalities. We start with an useful lemma. Lemma 4.23. Let (Q, S) be a hierarchically hyperbolic group, S ∈ S be the maximal element and X be a set of generators for Q such that CS = Cay(Q, X) (as in Remark 4.20). Let H be a finitely generated group and Y a finite set of generators for H. Finally let φ : H → Q be a group homomorphism that is a quasi-isometric embedding with respect to the word metrics in Y and X. Then there is C such that for each g ∈ Q, and U ∈ S − S, one has diamCU (πU (gφ(H))) ≤ C. Proof. We recall that CS = Cay(Q, X). Since, for each U ∈ S − {S}, the space ρU S has uniformly bounded diameter in CS, and since H is quasi-isometrically embedded in CS, the following holds. There is a uniform radius ∆ = ∆(H) and for each U ∈ S − {S} a point xU ∈ CS such that · NE (ρU S ) ⊆ B∆ (xU ), where E is the constant for the bounded geodesic image property for S, 12 · For each g ∈ Q and y ∈ gH − B∆ (xU ), the projection of y on B∆ (xU ) ∩ gH is not contained in NE (ρU S ) (see figure 1). B∆ (xU ) y p(y) ρU S E U Figure 1: The projection of the point x on the set B∆ lies outside the E-neighborhood of ρU S. Firstly, we want to uniformly bound the diameter of the various projections πU (gH ∩ B∆ (xU )). Note that the projections πU : Q → 2CU are uniformly quasi-Lipschitz, but with respect to the metric on Q which is, in general, not quasi-isometric to CS. We will show that is nevertheless possible to uniformly bound the diameter in Q of the sets gH ∩ B∆ (xU ), which gives the desired estimate. Let F = B2∆ (1) ∩ H. Since H is finitely generated and quasi-isometrically embedded in CS, F is a finite set. Moreover, for each g ∈ Q and U ∈ S − {S}, there exists h ∈ gH such that gH ∩ B∆ (xU ) ⊆ hF . For instance, choosing h to be the closest point projection of xU on gH works. Since the set F is finite, it has finite diameter in Q. Moreover, left multiplication by h is an isometry. Thus we can uniformly bound the diameter in Q of of the sets hF , and thus of the sets gH ∩ B∆ (xU ). Now, consider a point z ∈ gH − B∆ (xU ). We claim that the projection πU (z) lies in a uniform neighborhood of πU (gF ). In fact, since z 6∈ B∆ (xU ), z lies outside the ball B∆ (xU ) in CS. Let γ be a geodesic of CS between z and its closest point projection on B∆ (xU ). By construction γ ∩ NE (ρU S ) = ∅, and thus, by the bounded geodesic image property, there is a uniform B such that diamCU (πU (γ)) ≤ B. In particular, πU (z) lies in the B-neighborhood of πU (B∆ (xU )), which concludes the proof. We will now proceed to prove Behrstock’s inequalities. 1 We have to show that there exists a uniform κ such that for all U, V ∈ L not nested into each other, it holds: min{dU (πU (x), ρVU ), dV (πV (x), ρU V )} ≤ κ. It is easily seen that there are only two cases we should worry about: when U ∈ Fi and V ∈ Fj with i 6= j, or when U ∈ S − {S} and V ∈ F − {S}. Consider the first one. Unraveling the definitions, it is clear that it suffices to show the case when U = g1 Hi and V = g2 Hj , with i 6= j. However, Lemma 4.10 and Corollary 2.8 give that the set of the various laterals of the Hi in Q is a factor system for CS. Then the result follows. So, consider the second case. Let i ∈ I, g ∈ Q(i) and J ∈ Hi such that V = (J, g). Unraveling the definitions, we get that we need to show that there exists a uniform κ such that: min{dU (πU (x), πU (ρVS )), dCHi J (πJ ◦ pgHi (x), πJ ◦ pgHi (ρU S ))} ≤ κ, were we remark that all the projections are considered with the metric of CS. We will show that if the second term is sufficiently large, then we can uniformly bound 13 the first one. Note that, since the maps πJ are uniformly quasi-Lipschitz and since gHi is quasi-isometrically embedded in CS, we can substitute the second term with dCS (pgHi (x), pgHi (ρU S )). Let E, κ0 be the constants coming from the bounded geodesic image and Behrstock’s inequality conditions of the HHG (Q, S). Let ∆ = E + κ0 . Let y = pgHi (x) and z = pgHi (ρU S ). Let γ be a geodesic of CS between x and y. Since the closest point projection on gHi is a quasi-Lipschitz map, say with constant L, if dCS (y, z) > L∆ + L, we obtain that γ ∩ NE (ρU S ) = ∅. The bounded geodesic image condition applied to γ, gives that diamCU (ρS U (γ)) is uniformly bounded. In particular, S since y ∈ gHi , we get that dU (ρS U (x), ρU (gHi )) is uniformly bounded. Since U, S ∈ S, the Behrstock’s inequality condition gives that, for every x ∈ Q, we have S min{dCS (x, ρU S ), diamCU (πU (x) ∪ ρU (x))} ≤ κ0 . But we have that dCS ({x, y}, ρU S ) > L∆+L ≥ κ0 . Thus, we must have dCU (πU (x), πU (gHi )) is uniformly bounded. Since, by Lemma 4.23, the projection πU (gHi ) is uniformly bounded, we get the claim. 2 We have to show that for each V ⊑ W properly nested into each other, there is an uniform κ such that min{dW (x, ρVW ), diamCV (πV (x) ∪ ρW V (x))} ≤ κ0 . The only case that we need to check is when W = S. So, suppose that V = (J, g) ∈ F, where J ∈ Hi , and g ∈ Q(i). Then, unraveling the definitions, the second term becomes diamCJ (πJ ◦ pgHi (x) ∪ πJ ◦ pgHi (x)), which has uniformly bounded diameter since πJ ◦ pgHi is uniformly quasi-Lipschitz. Suppose, instead, that V ∈ S−{S}. Since distance in d CS are smaller or equal distances in CS, and since the above statement holds in CS, we get the claim. 3 We need to show that whenever U ⊑ V and there is W which is not orthogonal or nested into V , it holds V dW (ρU W , ρW ) ≤ κ. Unraveling the definitions, it is easily to see that if U, V, W ∈ F, then the claim holds, and since distances in d CS are smaller or equal distances in CS, it also holds if U, V, W ∈ S. So, there are only two cases of interest: U, V ∈ S−{S} and W ∈ F−{S}, or U, V ∈ F − {S} and W ∈ S − {S}. The second case is clear because, unraveling the V definitions, one has ρU W ⊆ ρW . The first one follows from the fact that the statement S holds in CS and the projections ρS U and ρV are uniformly quasi-Lipschitz. • Finite complexity. This is clear by construction. • Large link lemma: there exists λ ≥ 1 and E such that the following holds. Let W ∈ L and x, y ∈ Q. Let N = λdW (πW (x), πW (y)) + λ. Then there exists {T1 , . . . , T⌈N⌉ } ⊆ HW such that for each V ∈ HW , either V ∈ HTi ∪ {Ti } for some i ∈ {1, . . . , ⌈N ⌉}, or dV (πV (x), πV (y)) < E. Also, dW (πW (x), ρTWi ) ≤ N for each i. Note that if W ∈ F or W ∈ S − S, then the claim holds because of the HHS structure of (Q, S) or (Hi , Hi ), for the various i. So, we are only interested in the case W = S. We need to show that given x, y ∈ Q, it is possible to linearly bound in terms of the distance in d CS the number of (⊑-maximal) elements U of L with the property that dCU (πU (x), πU (y)) ≤ E. We will consider separately the elements in F and in S. Consider the set A consisting of all Q-translates of the various Hi . We will use the following two important facts. By Corollary 2.8 and Lemma 4.10, we can easily see that A d is the cone-off of CS with respect to A, is a factor system for CS. Since, by definition, CS the Large Link Lemma holds for the set A. Secondly, since each gHi is uniformly quasi-isometrically embedded in CS, and since the projections πU , for U ⊑ gHi , are uniformly quasi-Lipschitz, we get that there exists a 14 non-decreasing map L : R → R such that the following holds. For each i ∈ I, g ∈ Q(i) and U ⊑ gHi we have that dCU (πCU (x), πCU (y)) ≤ L (dgHi (πgHi (x), πgHi (y))), for each x, y ∈ Q. Let E1 be the constant of the Large Link Lemma applied to the set A and let E2 > L(E1 ). The Large Link Lemma on the set A give us a constant λA and a set T A , with A |T A | ≤ λA dCS if and only if dgHi (pgHi (x), pgHi (y)) ≤ E1 . d (x, y) + λA , such that gHi ∈ T But then, for each U ∈ F, we have that dCU (πU (x), πU (y)) ≤ E2 if and only if U ⊑ gHi with dgHi (πgHi (x), πgHi (y)) > E1 . Thus, for each E2 > L(E1 ) the Large Link Lemma holds on the set F. Note that the key ingredient in the above proof is that we already have a version of the Large Link Lemma that holds with the distances in d CS. If such a result was available also for S, then, since each element of L is contained in either F or S, we would get the result. CS, it is, in general, impossible to estimate dCS (x, y) in However, given two points x, y ∈ d terms of dCS d (x, y). We will show that, for a large enough E, it is however possible to estimate the number of (maximal) elements W ∈ S with dW (πW (x), πW (y)) > E in terms of dCS d (x, y), which is enough for our purposes. This will require some amount of work. Lemma 4.24. For each C > 0 there exist T = T (CS, C) and Θ = Θ(CS) such that the following holds. Let γ = γ0 ∗ β1 ∗ γ1 ∗ · · · ∗ βM ∗ γM be a C-quasi-geodesic of CS such that for each i there is gi and j ∈ I such that βi ⊆ gi Hj and L(βi ) > Θ.Then for each U ∈ S − {S}, there exists 0 ≤ i ≤ M such that diam(πU (γ)) − T ≤ diam(πU (γi )). Proof. Let E be the constant of the bounded geodesic image property for S and H be such that all C-quasi-geodesics of CS with the same endpoints have Hausdorff distance at most H. Choose U ∈ S − {S} and consider B = NE+H (ρU S ). If γ does not intersect B the result trivially follows from the bounded geodesic image for S. So suppose that γ intersects B. Roughly speaking, if Θ is large enough, all the segments γi of γ becomes ”far away”. In particular, we will get that there is at most one segment γi that is near B. More precisely, setting Θ = C(3H + E) + C we obtain that there is i ∈ {0, . . . , M } such that (γ−(βi ∗γi ∗βi+1 ))∩B = ∅. Let χ1 , χ2 be the connected components of γ−(βi ∗γi ∗βi+1 ). The bounded geodesic image for S gives that diam(πU (χj )) is uniformly bounded, for j ∈ {1, 2}. Since each of the segments βi , βi+1 is contained in some element of Cos({Hi }), by Lemma 4.23 we get the claim. d Since d So, consider points x, y ∈ CS. CS is obtained from CS coning-off a family of uniformly quasi-isometrically embedded subgraphs, we can apply Proposition 2.4 and get a quasi-geodesic γ b of d CS with the property that each embedded-de-electrification γ ee of γ b is e uniformly a quasi-geodesic of CS. Fix such a de-electrification γ e . We want to apply Lemma 4.24 to e γ e . In order to do that, we will subdivide γ ee in a way that satisfies the hypotheses of Lemma 4.24. Recall that the quasi-geodesic γ b decomposes as γ b=b γ0 ∗ e1 ∗ · · · ∗ eM ∗ γ bM , where each ei is a Cos({Hi })-component and all the γ bi are quasi-geodesics of CS (in particular, they do not contain Cos({Hi })-components). Thus, e γ e has the form γ ee = b γ0 ∗ β1 ∗ · · · ∗ βM ∗ γ bM , where each βi is obtained substituting each ei ∈ gi Hj with a geodesic of gi Hj connecting the endpoints of ei . Let Θ be the constant coming from Lemma 4.24. We will choose a coarser subdivision of γ b and γ ee such that all the subsegments βj have length greater or equal to Θ. More formally, we obtain a new subdivision as follows: let j ∈ {1, . . . , M } be the first index such that L(βj ) < Θ. Then for each i < j − 1, set γi′ = γ bi and βi′ = βi . Set 15 ′ γi−1 =γ bi−1 ∗ βi ∗ b γi and for each i ≥ j set γi′ = γ bi+1 and βi′ = βi+1 . Proceeding in this way, we obtain a new subdivision: ee = γ0 ∗ β1 ∗ · · · ∗ βn ∗ γn , γ where each of the βi is contained in one element of Cos({Hi }) and has length greater or equal Θ, and each of the γi may contain some Cos({Hi })-piece of length strictly less than Θ. For each segment γi , let γi be the subsegment of b γ with the same endpoints of γi (that is, the segment obtained substituting back the Cos({Hi })-components in γi ). It is clear that γi is an embedded-de-electrification of γi , but with the remarkable property that each Cos({Hi })-components e of γi de-electrify to a CS segment of length at most Θ. Thus, for each i the following holds: LCS (γi ) ≤ ΘLCS d (γi ). Let τ be such that γ b is a τ -quasi-geodesic of d CS. We have: n X 0 LCS (γi ) ≤ n X ΘLCS γ ) ≤ τ ΘdCS d (γi ) ≤ ΘLCS d (b d (x, y) + τ. 0 That is, we can estimate the length of the portion of γ ee that is coarsely not contained in Cos({Hi }) in terms of dCS d (x, y). Since γ ee is uniformly a quasi-geodesic of CS, 4.24 gives that there is a uniform F such that for each U ∈ S − {S}, if diamCU (πU ({x, y})) > F , then there is i such that diamCU (γi ) > ES , where ES is the large link lemma constant for S. The large link lemma property for S furnish a series of subsets Ti ⊆ S − {S} such that if there exists U ∈ S − {S} with diamCU (γi ) > ES , then U is nested in one element P contained in Ti . Let T = ∪i Ti . We have that there is a uniform λ such that |T | ≤ λ( n i=0 LCS (γi )) + λ. Since the latter can be uniformly linearly estimated in terms of dCS d (x, y), we get the result. • Bounded geodesic image: there exists EL such that for all W ∈ L, V ∈ LW − {W } and V geodesics γ of CW , either diamCV (ρW V (γ)) ≤ EL , or NEL (ρW ) ∩ γ = ∅. The statements clearly holds in the case W 6= S or W = S and V ∈ F. So, we only have to check the statement for W = S and V ∈ S. But since, by Proposition 2.2, geodesic of CS and geodesics of d CS have uniformly bounded Hausdorff distance (with respect to the d the conclusion follows from the bounded geodesic image property for CS. metric in CS), • Partial Realization Note that a family of pairwise orthogonal elements is either contained in S or F. Since F is a factor system, it holds in F, and ii holds on S − {S}. Thus we get that the property holds on the whole L. • Uniqueness This holds in F, and that is enough, since for each W ∈ F, CL W = CF W and L πW = F πW . We are now ready to prove Theorem 4.17. Proof of Theorem 4.17. The proof will follow three steps. Firstly we will show that it is possible to equip the new added edge and vertex groups with an HHG structure. Then we will need to show that the whole graph of groups is a graph of HHG. To achieve this, we will change the HHG structure on (some) of the original vertices. Finally we will verify that the new graph of HHG satisfies the hypotheses of Theorem 4.15. For each vertex v ∈ G − G ′ , we have that Gv is hyperbolic and that the adjacent edge groups {Hi } are a finite family of quasi convex subgroups of Gv . Then Theorem 2.9 applied to (G, {Hi }) yields a hierarchically hyperbolic group structure (G, F) on G. This induces a hierarchically hyperbolic structure (Hi , Hi ) for each i, such that the inclusion maps ji : Hi ֒→ Gv are homomorphisms of hierarchically hyperbolic groups. Indeed, this follows because [Hi ] ∈ F, (CF Hi , FHi ) admits an HHS structure (see Corollary 2.10) and Hi is 16 quasi-isometric to CF Hi . It is straightforward that all the maps ji are full and, since there are no orthogonality relations in F, the images of the maximal elements are not orthogonal to any other element. For each vertex v ∈ G ′ , let {Hiv } be the set of edge groups adjacent to v that correspond to edges of G − G ′ . By hypothesis, we have that {Hiv } ֒→hh Gv . Note that, by the process above, all elements of {Hiv } are equipped with an HHG structure. Applying Proposition 4.22 to the pair (Gv , Sv ); {(Hiv , Hvi )}, we get new HHG structures (Gv , Lv ) on the Gv that turn G into a graph of hierarchically hyperbolic groups. The bounded supports condition follows from Lemma 4.14, the fullness of the maps and the orthogonality condition are clear by construction. We need to show that the images of the edge maps are hierarchically quasi-convex. To simplify notation, we will denote dVb (πV (x), πV (y)) as dVb (x, y). Consider an edge e and a vertex v adjacent to it. Let Y ⊆ X be the image of the edge map. We want to show that Y is hierarchically quasi-convex. There are several cases that needs to be considered. The case where e is an edge of G ′ . If the hierarchical structure on the vertex group Qv is unchanged, then Y is hierarchically quasi-convex by hypothesis. Otherwise, let (Qv , Sv ) be the old hierarchical structure, (Qv , Lv ) be the new one and S be the maximal element of both Sv and Lv . Finally, let CS denote the space CSv S and let d CS denote the space CLv S. Since Y is hierarchically quasi-convex in (Qv , Sv ) (and in particular quasi-convex), we get that for each element gHi ∈ Cos({Hi }), the projection pgHi (Y) is uniformly quasiconvex. Let x ∈ Qv be such that dCU (x, Y) ≤ r for all U ∈ Lv . We want to show that it is possible to uniformly bound dQ (Y, x). If we can bound dCS (x, Y), then the result would follows from the fact that Y is hierarchically quasi-convex in (Qv , Sv ). In order to obtain this bound we will consider two additional different sets of HHS structures on the various spaces involved. Firstly, let A be the set of cosets of the various Hi seen as subspaces of CS. By Corollary 2.8 and Lemma 4.10, we have that A is a factor system for CS. By Proposition 3.5, we have CS is quasi-isometric that Y is hierarchically quasi-convex in (CS, A ∪ {CS}). Note that d to the cone-off of CS with respect to A, and, by hypothesis, we have dCS d (Y, x) ≤ r. If for each element gHi ∈ A, we could uniformly bound dCgHi (Y, z), then hierarchically quasiconvexity of Y in (CS, A ∪ {CS}) would produce a bound on dCS (Y, x) and thus, a bound on dQ (Y, x). Thus, consider a coset gHi . If W = (Hi , g) ∈ F, one has that (gHi , FW ) is a hierarchically hyperbolic space, with hyperbolic total spaces. Thus we can apply Proposition 3.5 to obtain that Y is hierarchically quasi-convex in (gHi , FW ). Since, by hypothesis, for each U ∈ FW (⊆ Lv ) we have dCU (Y, x) ≤ r, there is a function k depending on i but not on g such that dgHi (x, Y) ≤ k(r). Since there are only finitely many choices for i, the result follows. The case where e is an edge of G − G ′ and v is a vertex of G ′ . The image of the edge map Y coincide with one of the subgroups Hi . Then we have that πU (Y) is uniformly bounded when U ∈ L−F, because of Lemma 4.23, or when U ⊑ (g, Hj ), with j 6= i, because of Lemma 4.10. In the other case, πU (Y) coarsely coincide with CU by normalness (Proposition 4.19). This clearly implies that for each U , the space πU (Y) is uniformly quasi-convex. Now let x be a point such that dCU (x, Y) ≤ r for all U ∈ S. Let y be a point witnessing the closest point projection of x on Hi = Y. It easily follows from the above discussion that for each U ∈ S, |dCU (x, y) − dCU (x, Y)| is uniformly bounded. Then the result follows from the distance formula applied to x and y. The case where e is an edge of G − G ′ and v is a vertex of G. This is a straightforward consequence of Proposition 3.5. 17 References [AMS16] Yago Antolı́n, Ashot Minasyan, and Alessandro Sisto. Commensurating endomorphisms of acylindrically hyperbolic groups and applications. Groups Geom. Dyn., 10(4):1149–1210, 2016. [BF92] M. Bestvina and M. Feighn. A combination theorem for negatively curved groups. J. Differential Geom., 35(1):85–101, 1992. [BF96] Mladen Bestvina and Mark Feighn. Addendum and correction to: “A combination theorem for negatively curved groups” [J. Differential Geom. 35 (1992), no. 1, 85–101; MR1152226 (93d:53053)]. J. Differential Geom., 43(4):783–788, 1996. [BHS15] Jason Behrstock, Mark F. Hagen, and Alessandro Sisto. Hierarchically hyperbolic spaces II: Combination theorems and the distance formula. ArXiv e-prints, February 2015. [BHS17a] J. Behrstock, M. F Hagen, and A. Sisto. Quasiflats in hierarchically hyperbolic spaces. ArXiv e-prints, April 2017. [BHS17b] Jason Behrstock, Mark F. Hagen, and Alessandro Sisto. Asymptotic dimension and small-cancellation for hierarchically hyperbolic spaces and groups. Proc. Lond. Math. Soc. (3), 114(5):890–926, 2017. [BHS17c] Jason Behrstock, Mark F. Hagen, and Alessandro Sisto. Hierarchically hyperbolic spaces, I: Curve complexes for cubical groups. Geom. Topol., 21(3):1731–1804, 2017. [DGO17] F. Dahmani, V. Guirardel, and D. Osin. Hyperbolically embedded subgroups and rotating families in groups acting on hyperbolic spaces. Mem. Amer. Math. Soc., 245(1156):v+152, 2017. [DHS17] Matthew Gentry Durham, Mark F. Hagen, and Alessandro Sisto. Boundaries and automorphisms of hierarchically hyperbolic spaces. Geom. Topol., 21(6):3659– 3758, 2017. [MS17] J. Maher and A. Sisto. Random subgroups of acylindrically hyperbolic groups and hyperbolic embeddings. Accepted in IMRN, January 2017. [Osi16] D. Osin. Acylindrically hyperbolic groups. Trans. Amer. Math. Soc., 368(2):851– 888, 2016. [Sis17] A. Sisto. What is a hierarchically hyperbolic space? Accepted in Proccedings of the ”Beyond hyperbolicity” conference, June 2017. [Spr17] Davide Spriano. Hyperbolic HHS I: Factor systems and quasi-convex subgroups. ArXiv e-prints, November 2017. 18
4math.GR
1 Inexact Gradient Projection and Fast Data Driven Compressed Sensing Mohammad Golbabaee, Mike E. Davies, Fellow, IEEE, arXiv:1706.00092v1 [cs.IT] 31 May 2017 Abstract We study convergence of the iterative projected gradient (IPG) algorithm for arbitrary (possibly nonconvex) sets and when both the gradient and projection oracles are computed approximately. We consider different notions of approximation of which we show that the Progressive Fixed Precision (PFP) and the (1 + ε)-optimal oracles can achieve the same accuracy as for the exact IPG algorithm. We show that the former scheme is also able to maintain the (linear) rate of convergence of the exact algorithm, under the same embedding assumption. In contrast, the (1 + ε)-approximate oracle requires a stronger embedding condition, moderate compression ratios and it typically slows down the convergence. We apply our results to accelerate solving a class of data driven compressed sensing problems, where we replace iterative exhaustive searches over large datasets by fast approximate nearest neighbour search strategies based on the cover tree data structure. For datasets with low intrinsic dimensions our proposed algorithm achieves a complexity logarithmic in terms of the dataset population as opposed to the linear complexity of a brute force search. By running several numerical experiments we conclude similar observations as predicted by our theoretical analysis. I. I NTRODUCTION Signal inference under limited and noisy observations is a major line of research in signal processing, machine learning and statistics and it has a wide application ranging from biomedical imaging, astrophysics, remote sensing to data mining. Incorporating the structure of signals is proven to significantly help with an accurate inference since natural datasets often have limited degrees of freedom as compared to their original ambient dimensionality. This fact has been invoked in Compressed sensing (CS) literature by adopting efficient signal models to achieve accurate signal reconstruction given near-minimal number of measurements i.e. much smaller than the signal ambient dimension (see [1, 2, 3, 4, 5, 6] and e.g. [7] for an overview on different CS models). CS consists of a linear sampling protocol: y ≈ Ax∗ , (1) where a linear mapping A samples a m-dimensional vector y of noisy measurements from a ground truth signal x∗ which typically lives in a high ambient dimension n  m. Natural signals often have efficient compact representations using nonlinear models such as low dimensional smooth manifolds, low-rank matrices or the Union of Subspaces (UoS) that itself includes sparse (unstructured) or structured sparse (e.g. group, tree or analysis sparsity) representations in properly chosen orthobases or redundant dictionaries [7]. CS reconstruction algorithms for estimating x∗ from y are in general more computationally complex (as opposed to the simple linear acquisition of CS) as they typically require solving a nonlinear optimization problem based around a prior signal model. A proper model should be carefully chosen in order to efficiently promote the low-dimensional structure of signal meanwhile not bringing a huge computational burden to the reconstruction algorithm. MG and MED are with the Institute for Digital Communications (IDCOM), School of Engineering, University of Edinburgh, EH9 3JL, United Kingdom. E-mail: {m.golbabaee, mike.davies}@ed.ac.uk. This work is partly funded by the EPSRC grant EP/M019802/1 and the ERC C-SENSE project (ERC-ADG-2015-694888). MED is also supported by the Royal Society Wolfson Research Merit Award. June 2, 2017 DRAFT 2 Consider the following constrained least square problem for CS reconstruction: 1 min{f (x) := ||y − Ax||2 }, (2) x∈C 2 where, the constraint set C ∈ Rn represents the signal model. First order algorithms in the form of projected Landweber iteration a.k.a. iterative projected gradient (IPG) descent or Forward-Backward are very popular for solving (2). Interesting features of IPG include flexibility of handling various and often complicated signal models, e.g. C might be convex, nonconvex or/and semi-algebraic such as sparsity or rank constraints (these last models result in challenging combinatorial optimization problems but with tractable projection operators). Also IPG (and more generally the proximal-gradient methods) has been considered to be particularly useful for big data applications [8]. It is memory efficient due to using only first order local oracles e.g., the gradient and the projection onto C , it can be implemented in a distributed/parallel fashion, and it is also robust to using cheap statistical estimates e.g. in stochastic descend methods [9] to shortcut heavy gradient computations. In this regard a major challenge that IPG may encounter is the computational burden of performing an exact projection step onto certain complex models (or equivalently, performing an exact but complicated gradient step). In many interesting inverse problems the model projection amounts to solving another optimization within each iteration of IPG. This includes important cases in practice such as the total variation penalized least squares [10, 11], low-rank matrix completion T [12] or tree sparse model-based CS [6]. Another example is the convex inclusion constraints C = i Ci , appearing in multi constrained problems e.g. [13, 14], where one might be required to perform a Djkstra type feasibility algorithm at each iteration [15, 16]. Also, for data driven signal models the projection will typically involve some form of search through potentially large datasets. In all these cases accessing an exact oracle could be either computationally inefficient or even not possible (e.g. in analysis sparse recovery [17] or tensor rank minimization [18] where the exact projection is NP hard), and therefore a natural line of thought is to carry those steps with cheaper approximate oracles. A. Contributions In this paper we feature an important property of the IPG algorithm; that it is robust against deterministic errors in calculation of the projection and gradient steps. We cover different types of oracles: i) A fixed precision (FP) oracle which compared to the exact one has an additive bounded approximation error. ii) A progressive fixed precision (PFP) oracle which allows for larger (additive) approximations in the earlier iterations and refines the precision as the algorithm progresses. iii) A (1 + ε)-approximate oracle which introduces a notion of relatively optimal approximation with a multiplicative error (as compared to the exact oracle). Our analysis uses a notion of model restricted bi-Lipschitz embedding similar to e.g. [19], however in a more local form and with an improved conditioning (we discuss this in more details in Section IV). With that respect, our analysis differs from the previous related works in the convex settings as the embedding enables us for instance to prove a globally optimal recovery result for nonconvex models, as well as establishing linear rate of convergences for the inexact IPG applied for solving CS problems (e.g. results of [20] on linear convergence of the inexact IPG assumes strong convexity which does not hold in solving underdetermined least squares such as CS). In summary, we show that the FP type oracles restrict the final accuracy of the main reconstruction problem. This limitation can be overcome by increasing the precision at an appropriate rate using the PFP type oracles where one could achieve the same solution accuracy as for the exact IPG algorithm under the same embedding assumptions (and even with the convergence rate). We show that the (1+ε)-approximate projection can also achieve the accuracy of exact IPG however under a stronger embedding assumption, moderate compression ratios and using possibly more iterations (since using this type of oracle typically June 2, 2017 DRAFT 3 decreases the rate of convergence). In all the cases above we study conditions that provide us with linear convergence results. Finally we apply this theory to a stylized data driven compressed sensing application that requires a nearest neighbour search order to calculate the model projection. We shortcut the computations involved, (iteratively) performing exhaustive searches over large datasets, by using approximate nearest neighbour search strategies corresponding to the aforementioned oracles and motivated by the cover tree structure introduced in [21]. Our proposed algorithm achieves a complexity logarithmic in terms of the dataset population (as opposed to the linear complexity of a brute force search). By running several numerical experiments on different datasets we conclude similar observations as predicted by our theoretical results. B. Paper organization The rest of this paper is organized as follows: In Section II we review and compare our results to the previous related works on inexact IPG. In Section III we define the inexact IPG algorithm for three types of approximate oracles. Section IV includes our main theoretical results on robustness and linear convergence of the inexact IPG for solving CS reconstruction problem. In Section VI we discuss an application of the proposed inexact algorithms to accelerate solving data driven CS problems. We also briefly discuss the cover tree data structure and the associated exact/approximate search strategies. Section VII is dedicated to the numerical experiments on using inexact IPG for data driven CS. And finally we discuss and conclude our results in Section VIII. II. R ELATED WORKS Inexact proximal-gradient methods (in particular IPG) and their Nesterov accelerated variants have been the subject of a substantial amount of work in convex optimization [20, 22, 23, 24, 25]. Here we review some highlights and refer the reader for a comprehensive literature review to [20]. Fixed precision approximates have been studied for the gradient step e.g. for using the smoothing techniques where the gradient is not explicit and requires solving an auxiliary optimization, see for more details [22] and [23] for a semi-definite programming example in solving sparse PCA. A similar approach has been extensively applied for carrying out the projection (or the proximity operator) approximately in cases where it does not have an analytical expression and requires solving another optimization within each iteration e.g. in total variation constrained inverse problems [10, 11] or the overlapping group Lasso problem [26]. Fortunately in convex settings one can stop the inner optimization when its duality gap falls below a certain threshold and achieve a fixed precision approximate projection. In this case the solution accuracy of the main problem is proportional to the approximation level introduced within each iteration. Recently [20] studied the progressive fixed precision (PFP) type approximations for solving convex problems, e.g. a sparse CUR type factorization, via gradient-proximal (and its accelerated variant) methods. The authors show that IPG can afford larger approximation errors (in both gradient and projection/proximal steps) in the earlier stages of the algorithm and by increasing the approximation accuracy at an appropriate rate one can attain a similar convergence rate and accuracy as for the exact IPG however with significantly less computation. A part of our results draws a similar conclusion for solving nonconvex constrained least squares that appears in CS problems by using inexact IPG. Note that an FP type approximation has been previously considered for the nonconvex IPG e.g. for the UoS [19] or the manifold [27] CS models, however these works only assume inexact projections whereas our result covers an approximate gradient step as well. Of more importance and to the best of our knowledge, our results on incorporating the PFP type approximation in nonconvex IPGs and analysing the associated rate of (global) convergence is the first result of its kind. We also note that the results in [20] are mainly about minimizing convex cost functions (i.e. not necessarily recovery guarantees) and that the corresponding linear convergence results only hold for uniformly strong convex objectives. We instead cover cases with local (and not uniform) strong June 2, 2017 DRAFT 4 convexity and establish the linear convergence of IPG for solving underdetermined inverse problems such as CS. Using relative (1 + ε)-approximate projections (described in Section IV-D) for CS recovery has been subject of more recent research activities (and mainly for nonconvex models). In [17] the authors studied this type of approximation for an IPG sparse recovery algorithm under the UoS model in redundant dictionaries. Our result encompasses this as a particular choice of model and additionally allows for inexactness in the gradient step. The work of [28] studied similar inexact oracles for a stochastic gradientprojection type algorithm customized for sparse UoS and low-rank models (see also [29] for low-rank CS using an accelerated variant of IPG). We share a similar conclusion with those works; for a large ε more measurements are required for CS recovery and the convergence becomes slow. Hegde et al. [30] proposed such projection oracle for tree-sparse signals and use it for the related model-based CS problem using a CoSamp type algorithm (see also [31, 32] for related works on inexact CoSamp type algorithms). In a later work [33] the authors consider a modified variant of IPG with (1 + ε)-approximate projections for application to structured sparse reconstruction problems (specifically tree-sparse and earthmover distance CS models). For this scenario they are able to introduce a modified gradient estimate (called the Head approximation oracle) to strengthen the recovery guarantees by removing the dependency on ε, albeit with a more conservative Restricted Isometry Property. Unfortunately, this technique does not immediately generalize to arbitrary signal models and we therefore do not pursue this line of research here. III. P RELIMINARIES Iterative projected gradient iterates between calculating the gradient and projection onto the model i.e. for positive integers k the exact form of IPG follows:   xk = PC xk−1 − µ∇f (xk−1 ) (3) where, µ is the step size, ∇f (x) = AT (Ax − y) and PC denote the exact gradient and the Euclidean projection oracles, respectively. The exact IPG requires the constraint set C to have a well defined, not necessarily unique but computationally tractable Euclidean projection PC : Rn → C PC (x) ∈ argminu∈C ||u − x||. Throughout we use ||.|| as a shorthand for the Euclidean norm ||.||`2 . In the following we define three types of approximate oracles which frequently appear in the literature and could be incorporated within the IPG iterations. We also briefly discuss their applications. Each of these approximations are applicable to the data driven problem we will consider in Section VI. A. Fixed Precision (FP) approximate oracles We first consider approximate oracles with additive bounded-norm errors, namely the fixed precision e νg f (x) : Rn → Rn where: gradient oracle ∇ e νg f (x) − ∇f (x)|| 6 νg , ||∇ ν PC p (4) Rn and the fixed precision projection oracle : → C where: n o ν 0 2 2 PC p (x) ∈ u ∈ C : ||u − x||2 6 inf ||u − x|| + ν p . 0 u ∈C (5) The values of νg , νp denote the levels of inaccuracy in calculating the gradient and projection steps respectively.1 The corresponding inexact IPG iterates as follows:   νk e νgk f (xk−1 ) . xk = PC p xk−1 − µ∇ (6) 1 Note that our fixed precision projection (5) is defined on the squared norms in a same way as in e.g. [19, 27]. June 2, 2017 DRAFT 5 Note that, unlike [19, 27] in this formulation we allow for variations in the inexactness levels at different stages of IPG. The case where the accuracy levels are bounded by a constant threshold νpk = νp and νgk = νg , ∀k , refers to an inexact IPG algorithm with fixed precision (FP) approximate oracles. Examples: Such errors may occur for instance in distributed network optimizations where the gradient calculations could be noisy during the communication on the network, or in CS under certain UoS models with infinite subspaces [19] where an exact projection might not exist by definition (e.g. when C is an open set) however a FP type approximation could be achievable. It also has application in finite (discrete) super resolution [34], source localization and separation [35, 36] and data driven CS problems e.g., in Magnetic Resonance Fingerprinting [37, 38], where typically a continuous manifold is discretized and approximated by a large dictionary for e.g. sparse recovery tasks. B. Progressive Fixed Precision (PFP) approximate oracles One obtains a Progressive Fixed Precision (PFP) approximate IPG by refining the FP type precisions thorough the course of iterations. Therefore any FP gradient or projection oracle which has control on tuning the accuracy parameter could be used in this setting and follows (6) with decaying sequences νpk , νgk . Examples: For instance this case includes projection schemes that require iteratively solving an auxiliary optimization (e.g. the total variation ball [11], sparse CUR factorization [20] or the multi-constraint inclusions [15, 16], etc) and can progress (at an appropriate rate) on the accuracy of their solutions by adding more subiterations. We also discuss in Section VI-C another example of this form which is customized for fast approximate nearest neighbour searches with application to the data driven CS framework. C. (1 + ε)-approximate projection Obtaining a fixed precision (and thus PFP) accuracy in projections onto certain constraints might be still computationally exhaustive, whereas a notion of relative optimality could be more efficient to implement. The (1 + ε)-approximate projection is defined as follows: for a given ε > 0, n o 0 PCε (x) ∈ u ∈ C : ||u − x|| 6 (1 + ε) inf ||u − x|| . (7) 0 u ∈C PCε (x) We note that might not be unique. In this regard, the inexact IPG algorithm with a (1 + ε)approximate projection takes the following form:   e νgk f (xk−1 ) . xk = PCε xk−1 − µ∇ (8) Note that we still assume a fixed precision gradient oracle with flexible accuracies νgk . One could also consider a (1 + ε)-approximate gradient oracle and in combination with those aforementioned inexact projections however for brevity and since the analysis would be quite similar to the relative approximate projection we decide to skip more details on this case. Examples: The tree s-sparse projection in Rn and in the exact form requires solving a dynamical programming with O(ns) running time [39] whereas solving this problem approximately with 1 + ε accuracy requires the time complexity O(n log(n)) [30] which better suits imaging problems in practice with a typical Wavelet sparsity level s = Ω(log(n)). Also [28, 29] show that one can reduce the cost of low-rank matrix completion problem by using randomized linear algebra methods, e.g. see [40, 41], and carry out fast low-rank factorizations with a 1 + ε type approximation. In a recent work on low-rank tensor CS [18] authors consider using a 1 + ε approximation (within an IPG algorithm) for low-rank tensor factorization since the exact problem is generally NP hard [42]. Also in Section VI-C we discuss a data driven CS recovery algorithm which uses 1 + ε approximate nearest neighbour searches in order to break down the complexity of the projections from O(d) (using an exhaustive search) to O(log(d)), for d denoting a large number of data points with low intrinsic dimensionality. June 2, 2017 DRAFT 6 IV. M AIN RESULTS A. Uniform linear embeddings The success of CS paradigm heavily relies on the embedding property of certain random sampling matrices which preserves signal information for low dimensional but often complicated/combinatorial models. It has been shown that IPG can stably predict the true signal x∗ from noisy CS measurements provided that A satisfies the so called Restricted Isometry Property (RIP): (1 − θ)||x − x0 ||2 6 ||A(x − x0 )||2 6 (1 + θ)||x − x0 ||2 , ∀x, x0 ∈ C (9) for a small constant 0 < θ < 1. This has been shown for models such as sparse, low-rank and lowdimensional smooth manifold signals and by using IPG type reconstruction algorithms which in the nonconvex settings are also known as Iterative Hard Thresholding [6, 12, 27, 43, 44]. Interestingly these results indicate that under the RIP condition (and without any assumption on the initialization) the first order IPG algorithms with cheap local oracles can globally solve nonconvex optimization problems. For instance random orthoprojectors and i.i.d. subgaussian matrices A satisfy RIP when the number of measurements m is proportional to the intrinsic dimension of the model (i.e. signal sparsity level, rank of a data matrix or the dimension of a smooth signal manifold, see e.g. [7] for a review on comparing different CS models and their measurement complexities) and sublinearly scales with the ambient dimension n. A more recent work generalizes the theory of IPG to arbitrary bi-Lipschitz embeddable models [19], that is for given C and A it holds α||x − x0 ||2 6 ||A(x − x0 )||2 6 β||x − x0 ||2 ∀x, x0 ∈ C. for some constants α, β > 0. Similar to the RIP these constants are defined uniformly over the constraint set i.e. ∀x, x0 ∈ C . There Blumensath shows that if β < 1.5α, then IPG robustly solves the corresponding noisy CS reconstruction problem for all x∗ ∈ C . This result also relaxes the RIP requirement to a nonsymmetric and unnormalised notion of linear embedding whose implication in deriving sharper recovery bounds is previously studied by [45]. B. Hybrid (local-uniform) linear embeddings Similarly the notion of restricted embedding plays a key role in our analysis. However we adopt a more local form of embedding and show that it is still able to guarantee stable CS reconstruction. Main assumption. Given (x0 ∈ C, C, A) there exists constants β, αx0 > 0 for which the following inequalities hold: • Uniform Upper Lipschitz Embedding (ULE) ||A(x − x0 )||2 6 β||x − x0 ||2 • ∀x, x0 ∈ C Local Lower Lipschitz Embedding (LLE) ||A(x − x0 )||2 > αx0 ||x − x0 ||2 ∀x ∈ C Upon existence, β and αx0 denote respectively the smallest and largest constants for which the inequalities above hold. This is a weaker assumption compared to RIP or the uniform bi-Lipschitz embedding. Note that for any x0 ∈ C we have: α 6 αx0 6 β 6 |||A|||2 June 2, 2017 DRAFT 7 (where |||.||| denotes the matrix spectral norm i.e. the largest singular value). However with such an assumption one has to sacrifice the universality of the RIP-dependent results for a signal x∗ dependent analysis. Depending on the study, local analysis could be very useful to avoid e.g. worst-case scenarios that might unnecessarily restrict the recovery analysis [46]. Similar local assumptions in the convex settings are shown to improve the measurement bound and the speed of convergence up to very sharp constants [47, 48]. Unfortunately we are currently unable to make the analysis fully local as we require the uniform ULE constraint. Nonetheless, one can always plug the stronger bi-Liptchitz assumption into our results throughout (i.e. replacing αx∗ with α) and regain the universality. C. Linear convergence of (P)FP inexact IPG for CS recovery In this section we show that IPG is robust against deterministic (worst case) errors. Moreover, we show that for certain decaying approximation errors, the IPG solution maintain the same accuracy as for the approximation-free algorithm. Theorem 1. Assume (x∗ ∈ C, C, A) satisfy the main Lipschitz assumption with constants β < 2αx∗ . Set the step size (2αx∗ )−1 < µ 6 β −1 . The sequence generated by Algorithm (6) obeys the following bound: ! √ k X 2 β ∗ k ∗ k −i i ||x − x || 6 ρ ||x || + ρ e + w (10) αx∗ (1 − ρ) i=1 where r ρ= 1 −1 µαx∗ and ei = 2νgi νpi +√ , αx∗ µαx∗ and w = ||y − Ax∗ ||. Remark 1. Theorem 1 implications for the exact IPG (i.e. νpk = νgk = 0) and inexact FP approximate IPG (i.e. νpk = νp , νgk = νg , ∀k ) improve [19, Theorem 2] in three ways: first by relaxing the uniform lower Lipschitz constant α to a local form αx∗ > α with the possibility of conducting a local recovery/convergence analysis. Second, by improving the embedding condition for CS stable recovery to β < 2αx∗ , (11) or β < 2α for a uniform recovery ∀x∗ ∈ C . And third, by improving the rate ρ of convergence. The following corollary is an immediate consequence of the linear convergence result established in Theorem 1 for which we do not provide a proof: Corollary 1. With assumptions in Theorem 1 the IPG algorithm with FP approximate oracles achieves the solution accuracy √   2νg νp 1 2 β K ∗ ||x − x || 6 +√ + w +τ 1 − ρ αx∗ µαx∗ α x∗ for any τ > 0 and in a finite number of iterations   ∗  1 ||x || K= log −1 log(ρ ) τ As it turns out in our experiments and aligned with the result of Corollary 1, the solution accuracy of IPG can not exceed the precision level introduced by a PF oracle. In this sense Corollary 1 is tight as a trivial converse example would be that IPG starts from the optimal solution x∗ but an adversarial FP scheme projects it to another point within a fixed distance. June 2, 2017 DRAFT 8 Interestingly one can deduce another implication from Theorem 1 and overcome such limitation by using a PFP type oracle. Remarkably one achieves a linear convergence to a solution with the same accuracy as for the exact IPG, as long as ek geometrically decays. The following corollary makes this statement explicit: Corollary 2. Assume ek 6 Crk for some error decay rate 0 < r < 1 and a constant C . Under the assumptions of Theorem 1 the solution updates ||xk − x∗ || of the IPG algorithm with PFP approximate oracles is bounded above by:   √ C 2 β k ∗  max(ρ, r) ||x || + + w, r 6= ρ min(ρ,r) αx∗ (1 − ρ) 1 − max(ρ,r) √   2 β k ∗ ρ ||x || + Ck + w, r=ρ αx∗ (1 − ρ) Which implies a linear convergence at rate n r) ρ̄ = max(ρ, ρ+ξ r 6= ρ r=ρ for an arbitrary small ξ > 0. Remark 2. Similar to Corollary 1 one can increase the final solution precision of the FPF type IPG with logarithmically more iterations i.e. in a finite number K = O(log(τ −1 )) of iterations one achieves ||xK − x∗ || 6 O(w) + τ . Therefore in contrast with the FP oracles one achieves an accuracy within the noise level O(w) that is the precision of an approximation-free IPG. Remark 3. Using the PFP type oracles can also maintain the rate of linear convergence identical as for the exact IPG. For this the approximation errors suffice to follow a geometric decaying rate of r < ρ. Remark 4. The embedding condition (11) sufficient to guarantee our stability results is invariant to the precisions of the FP/PFP oracles and it is the same as for an exact IPG. D. Linear convergence of inexact IPG with (1 + ε)-approximate projection for CS recovery In this part we focus on the inexact algorithm (8) with a (1 + ε)-approximate projection. As it turns out by the following theorem we require a stronger embedding condition to guarantee the CS stability compared to the previous algorithms. Theorem 2. Assume (x∗ ∈ C, C, A) satisfy the main Lipschitz assumption and that √ p αx∗ 2 2ε + ε 6 δ and β < (2 − 2δ + δ 2 )αx∗ |||A||| −1 for ε > 0 and some constant δ ∈ [0, 1). Set the step size (2 − 2δ + δ 2 )αx∗ < µ 6 β −1 . The sequence generated by Algorithm (8) obeys the following bound: ! k X κw ||xk − x∗ || 6 ρk ||x∗ || + κg ρ−i νgi + w 1−ρ i=1 where √ µ 1 2 ρ= − 1 + δ, κg = + δ, µαx∗ α x∗ |||A||| √ β √ κw = 2 + µδ, and w = ||y − Ax∗ ||. α x∗ r June 2, 2017 DRAFT 9 Remark 5. Similar conclusions follow as in Corollaries 1 and 2 on the linear convergence, logarithmic number of iterations vs. final level of accuracy (depending whether the gradient oracle is exact or FP/PFP) however with a stronger requirement than (11) on the embedding; increasing ε i.e. consequently δ , limits the recovery guarantee and slows down the convergence (compare ρ in Theorems 1 and 2). Also approximations of this type result in amplifying distortions (i.e. constants κw , κg ) due to the measurement noise and gradient errors. For example for an exact or a geometrically decaying PFP gradient updates and for a fixed ε chosen according to the Theorem 2 assumptions, Algorithm (8) achieves a full precision accuracy ||xK − x∗ || 6 O(w) + τ (similar to the exact IPG) in a finite number K = O(log(τ −1 )) of iterations. Remark 6. The assumptions  of Theorem  2 impose a stringent requirement on the scaling of the approxiq αx∗ mation parameter i.e. ε = O which is not purely dependent on the model-restricted embedding |||A||| condition but also on the spectral norm |||A|||. In this sense since |||A||| ignores the structure C of the problem it might scale very differently than the corresponding embedding constants αx∗ , α and β . For instance a m × n i.i.d. Gaussian matrix has w.h.p. |||A||| = Θ(n) (when m  n) whereas, e.g. for sparse signals, the embedding constants α, β w.h.p. scale as O(m). A similar gap exists for other low dimensional signal models and for other compressed sensing matrices e.g. random orthoprojectors. This indicates that the 1 + ε oracles may be sensitivep to the CS sampling ratio i.e. for m  n we may be limited to use very small approximations ε = O( m n ). In the following we show by a deterministic example that this requirement is indeed tight. We also empirically observe in Section VII that such a limitation indeed holds in randomized settings (e.g. i.i.d. Gaussian A) and on average. Although it would be desirable to modify the IPG algorithm to avoid such restriction, as was done in [33] for specific structured sparse models, we note that this is the same term that appears due to ’noise folding’ when the signal model is not exact or when there is noise in the signal domain (see the discussion in Section IV-E). As such most practical CS systems will inevitably have to avoid regimes of extreme undersampling. A converse example: Consider a noiseless CS recovery problem where n = 2, m = 1 and the sampling matrix (i.e. here a row vector) is A = [cos(γ) − sin(γ)] for some parameter 0 6 γ < π/2. Consider the following one-dimensional signal model along the first coordinate: C = {x ∈ R2 : x(1) ∈ R, x(2) = 0}. We have indeed |||A||| = 1. It is easy to verify that both of the embedding constants w.r.t. to C are αx∗ = β = cos(γ)2 . q αx ∗ Therefore one can tune γ → π/2 to obtain arbitrary small ratios for |||A||| = cos(γ). Assume the true signal, the corresponding CS measurement, and the initialization point are x∗ = [1 0]T , y = Ax∗ = cos(γ) and x0 = [0 0]T . Consider an adversarial (1 + ε)-approximate projection oracle which performs the following step for any given x ∈ R2 : PCε (x) := [x(1) + εx(2) 0]T . For simplicity we assume no errors on the gradient step. By setting µ = 1/ cos(γ)2 , the corresponding inexact IPG updates as   xk (1) = 1 + ε tan(γ) xk−1 (1) − 1 June 2, 2017 DRAFT 10 and only along the first dimension (we note that due to the choice of oracle xk (2) = 0, ∀k ). Therefore we have xk (1) = 1 − (ε tan(γ))k . which requires ε < tan−1 (γ) = O(cos(γ)) for convergence, and it diverges otherwise. As we can see for γ → π/2 (i.e. where A becomes extremely unstable w.r.t. sampling the first dimension) the range of admissible ε shrinks, regardless of the fact that the restricted embedding αx∗ = β exhibits a perfect isometry; which is an ideal situation for solving a noiseless CS (i.e. in this case an exact IPG takes only one iteration to converge). E. When the projection is not onto the signal model One can also make a distinction between the projection set C and the signal model here denoted as C 0 (i.e. x∗ ∈ C 0 ) by modifying our earlier definitions (5) and (7) in the following ways: an approximate FP projection reads, n o ν 0 2 2 PC p (x) ∈ u ∈ C : ||u − x||2 6 inf ||u − x|| + ν (12) p , 0 0 u ∈C and a (1 + ε)-approximate projection reads n o 0 PCε (x) ∈ u ∈ C : ||u − x|| 6 (1 + ε) inf ||u − x|| . 0 0 u ∈C (13) With respect to such a distinction, Theorems 1 and 2 still hold (with the same embedding assumption/constants on the projection set C ), conditioned that x∗ ∈ C . Indeed this can be verified by following identical steps as in the proof of both theorems. This allows throughout the flexibility of considering an approximate projection onto a possibly larger set C including the original signal model C 0 i.e. x∗ ∈ C 0 ⊆ C , which for instance finds application in fast tree-sparse signal or low-rank matrix CS recovery, see [29, 30]. Such an inclusion is also important to derive a uniform recovery result for all x∗ ∈ C 0 . The case where x∗ ∈ / C can also be bounded in a similar fashion as in [19]. We first consider a proximity point in C i.e. xo := argminu∈C ||x∗ − u|| and update the noise term to w := ||y − Axo || 6 ||y − Ax∗ || + ||A(x∗ − xo )||. We then use Theorems 1 and 2 to derive an error bound, here on ||xk − xo ||. For this we assume the embedding condition uniformly holds over the projection set C (which includes xo ). As a result we get a bound on the error ||xk − x∗ || 6 ||x∗ − xo || + ||xk − xo || which includes a bias term with respect to the distance of x∗ to C . Note that since here w also includes a signal (and not only measurement) noise term introduced by ||A(x∗ − xo )||, the results are subjected to noise folding i.e. a noise amplification with a similar unfavourable scaling (when m  n) to our discussion in Remark 6 (for more details on CS noise folding see e.g. [49, 50]). V. P ROOFS A. Proof of Theorem 1 We start from a similar argument as in [19, proof of Therorem 2]. Set g := 2∇f (xk−1 ) = 2AT (Axk−1 − e νg f (xk−1 ) = g + 2ekg for some vector ekg which by definition (4) is bounded ||ekg || 6 νgk . y) and ge := 2∇ It follows that ||y − Axk ||2 − ||y − Axk−1 ||2 = hxk − xk−1 , gi + ||A(xk − xk−1 )||2 6 hxk − xk−1 , gi + β||xk − xk−1 ||2 , June 2, 2017 DRAFT 11 where the last inequality follows from the ULE property in Definition IV-B. Assuming β 6 1/µ, we have 1 hxk − xk−1 , gi + β||xk − xk−1 ||2 6 hxk − xk−1 , gi + ||xk − xk−1 ||2 µ 1 = hxk − xk−1 , gei + ||xk − xk−1 ||2 − hxk − xk−1 , 2ekg i µ 1 k µ µ = ||x − xk−1 + ge||2 − ||ge||2 − hxk − xk−1 , 2ekg i. µ 2 4 Due to the update rule of Algorithm (6) and the inexact (fixed-precision) projection step, we have µ µ µ ||xk − xk−1 + ge||2 6 ||PC (xk−1 − ge) − xk−1 + ge||2 + (νpk )2 2 2 2 µ 2 ∗ k−1 k 2 6 ||x − x + ge|| + (νp ) . 2 The last inequality holds for any member of C and thus here for x∗ . Therefore we can write ||y − Axk ||2 − ||y − Axk−1 ||2 6 νpk 1 ∗ µ µ ||x − xk−1 + ge||2 − ||ge||2 − hxk − xk−1 , 2ekg i + ( √ )2 µ 2 4 µ ∗ = hx − x k−1 νpk 2 1 ∗ k−1 2 k k−1 k , gei + ||x − x || − hx − x , 2eg i + ( √ ) µ µ 6 hx∗ − xk−1 , gi + νpk 1 ∗ ||x − xk−1 ||2 + 2νgk ||xk − x∗ || + ( √ )2 . µ µ (14) The last line replaces ge = g + 2ekg and uses the Cauchy-Schwartz inequality. Similarly we use the LLE property in Definition IV-B to obtain an upper bound on hx∗ − xk−1 , gi: hx∗ − xk−1 , gi = w2 − ||y − Axk−1 ||2 + ||A(x0 − xk−1 )||2 6 w2 − ||y − Axk−1 ||2 + αx∗ ||x∗ − xk−1 ||2 , where w = ||y − Ax∗ ||. Replacing this bound in (14) and cancelling −||y − Axk−1 ||2 from both sides of the inequality yields   νpk 1 k 2 k k ∗ ∗ − αx ||xk−1 − x∗ ||2 + ( √ )2 + w2 . (15) ||y − Ax || − 2νg ||x − x || 6 µ µ We continue to lower bound the left-hand side of this inequality: ||y − Axk ||2 − 2νgk ||xk − x∗ || = ||A(xk − x∗ )||2 + w2 − 2hy − Ax∗ , A(xk − x∗ )i − 2νgk ||xk − x∗ || > ||A(xk − x∗ )||2 + w2 − 2w||A(xk − x∗ )|| − 2νgk ||xk − x∗ || p > αx∗ ||xk − x∗ ||2 + w2 − 2(w β + νgk )||xk − x∗ || !2 r k ν νgk 2 √ β β g = αx∗ ||xk − x∗ || − √ − w − (√ ) −( − 1)w2 . ∗ ∗ ∗ αx αx αx αx∗ The first inequality uses the Cauchy-Schwartz’s and the second inequality follows from the ULE and LLE properties. Using this bound together with (15) we get !2  r  k ν νgk 2 νpk √ β 1 β 2 g k ∗ αx∗ ||x − x || − √ − w 6 − αx∗ ||xk−1 − x∗ ||2 + ( √ ) + ( √ )2 + w ∗ ∗ ∗ αx αx µ αx µ αx∗ !2 r r k k ν ν 1 β g p 6 − αx∗ ||xk−1 − x∗ || + √ +√ + w . µ α x∗ µ αx∗ June 2, 2017 DRAFT 12 −1 . As a result The last inequality assumes µ 6 αx−1 ∗ which holds since we previously assumed µ 6 β we deduce that √ β k ∗ k−1 ∗ k w (16) ||x − x || 6 ρ||x − x || + e + 2 αx∗ for ρ and ek defined in Theorem 1. Applying this bound recursively (and setting x0 = 0) completes the proof: √ k X 2 β k ∗ k ∗ k−i i ||x − x || 6 ρ ||x || + ρ e + w. αx∗ (1 − ρ) i=1 Note that for convergence we require ρ < 1 and therefore, a lower bound on the step size which is µ > (2αx∗ )−1 . B. Proof of Corollary 2 Following the error bound (10) derived in Theorem 1 and by setting ek 6 Crk we obtain: ! √ k X 2 β ∗ i k ∗ k (r/ρ) + w, ||x − x || 6 ρ ||x || + C αx∗ (1 − ρ) i=1 which for r < ρ it implies ∗ k ||x − x || 6 ρ k  C ||x || + 1 − r/ρ ∗  √ 2 β + w, αx∗ (1 − ρ) and for r > ρ implies √ 2 β w αx∗ (1 − ρ) i=1 √   C 2 β 6 rk ||x∗ || + + w, 1 − ρ/r αx∗ (1 − ρ) ||xk − x∗ || 6 ρk ||x∗ || + Crk k X (ρ/r)k−i + and for r = ρ we immediately get √ 2 β ||x − x || 6 ρ ||x || + Ckρ + w. αx∗ (1 − ρ) k ∗ k ∗ k Note that there exists a constant c such that for an arbitrary small ξ > 0 it holds kρk 6 c(ρ + ξ)k . Therefore we also achieve a linear convergence for the case r = ρ. C. Proof of Theorem 2 As before set g = 2AT (Axk−1 − y) and ge = g + 2ekg for some bounded gradient error vector ekg i.e. ||ekg || 6 νgk . Note that here the update rule of Algorithm (8) uses the (1 + ε)-approximate projection which by definition (7) implies µ µ µ ||xk − xk−1 + ge||2 = ||PCε (xk−1 − ge) − xk−1 + ge||2 2 2 2 µ µ 2 k−1 6 (1 + ε) ||PC (x − ge) − xk−1 + ge||2 2 2 2 µ µ 6 ||x∗ − xk−1 + ge||2 + ϕ(ε)2 ||ge||2 2 4 √ k−1 2 where ϕ(ε) := 2ε + ε . For the last inequality we replace PC (x − µ2 ge) with two feasible points ∗ k−1 x ,x ∈ C. June 2, 2017 DRAFT 13 As a result by only replacing νgk with µϕ(ε)||ge||/2, we can follow identical steps as for the proof of √ √ Theorem 1 up to (16), revise the definition of ek := 2νgk /αx∗ + µϕ(ε)||ge||/(2 αx∗ ) and write r √ r 2νgk ϕ(ε) 1 µ β k−1 ∗ k ∗ − 1||x − x || + + ||ge|| + 2 w. ||x − x || 6 µαx∗ αx∗ 2 α x∗ α x∗ Note that so far we only assumed µ 6 β −1 . On the other hand by triangle inequality we have ||ge|| 6 ||g|| + 2νgk 6 2||AT A(xk−1 − x∗ )|| + 2||AT (y − Ax∗ )|| + 2νgk p 6 2 β|||A|||||(xk−1 − x∗ )|| + 2|||A|||w + 2νgk p 6 2 1/µ|||A|||||(xk−1 − x∗ )|| + 2|||A|||w + 2νgk . The third inequality uses the ULE property and the last one holds since µ 6 β −1 . Therefore, we get r  |||A||| 1 k ∗ − 1 + ϕ(ε) √ ||xk−1 − x∗ || ||x − x || 6 µαx∗ αx∗    √  r r 2 µ β µ k + + ϕ(ε) νg + 2 + ϕ(ε) |||A||| w. αx∗ αx∗ α x∗ αx∗ Based on assumption ϕ(ε) √|||A||| αx∗ 6 δ of the theorem we can deduce    √ √  µ 2 β √ k ∗ k−1 ∗ k ||x − x || 6 ρ||x − x || + + δ νg + 2 + µδ w α x∗ |||A||| αx∗ q where ρ = µα1x∗ − 1 + δ . Applying this bound recursively (and setting x0 = 0) completes the proof: ||xk − x∗ || 6 ρk ||x∗ || + κg k X i=1 ρk−i νgi + κw w 1−ρ for κg , κw defined in Theorem 2. The condition for convergence is ρ < 1 which implies δ < 1 and a lower bound on the step size which is µ > (αx∗ + (1 − δ)2 αx∗ )−1 . VI. A PPLICATION IN DATA DRIVEN COMPRESSED SENSING Many CS reconstruction programs resort to signal models promoted by certain (semi) algebraic functions h(x) : Rn → R+ ∪ {0}. For example we can have  C := x ∈ Rn : h(x) 6 ζ , where h(x) may be chosen as the `0 or `0−2 semi-norms or as the rank(x) which promotes sparse, groupsparse or low-rank (for matrix spaces) solutions, respectively. One might also replace those penalties with their corresponding convex relaxations namely, the `1 , `1−2 norms or the nuclear norm. Data driven compressed sensing however corresponds to cases where in the absence of an algebraic physical model one resorts to collecting a large number of data samples in a dictionary and use it as a point cloud model for CS reconstruction [7]. Data driven CS finds numerous applications e.g. in Hyperspectral imagery [51], Mass spectroscopy (MALDI imaging) [52], Raman Imaging [53] and Magnetic Resonance Fingerprinting (MRF) [37, 38] just to name a few. For instance the USGS Hyperspectral library 2 contains 2 http://speclab.cr.usgs.gov June 2, 2017 DRAFT 14 the spectral signatures (reflectance) of thousands of substances measured across a few hundred frequency bands. This side information is shown to be useful for CS reconstruction and classification in both convex and nonconvex settings (see e.g. [51] for more details and relations to sparse approximation in redundant dictionaries). Data driven CS may also apply to algebraic models with non trivial projections. For example in the MRF reconstruction problem one first constructs a huge dictionary of fingerprints i.e. the magnetization responses (across the readout times) for many T 1, T 2 relaxation values (i.e. spinspin and spin-echo) presented in normal tissues [37]. This corresponds to sampling a two-dimensional manifold associated with the solutions of the Bloch dynamic equations [38], which in the MRF settings neither the response nor the projection has an analytic closed-form solution. A. A data driven CS in product space To explore how our theoretical results can be used to accelerate CS reconstruction we consider a stylized data driven application for which we explain how one can obtain each of the aforementioned approximate projections. Consider a multi-dimensional image such as HSI, MALDI or MRF that can be represented by a n e × J matrix X , where n = n eJ is the total number of spatio-spectral pixels, J is the spatial resolution and n e is the number of spectral bands e.g. n e = 3 for an RGB image, n e ≈ 400 for an HSI acquired by NASA’s AVIRIS spectrometer, n e ≈ 5000 for a MALDI image [52]. In the simplest form we assume that each spatial pixel corresponds to a certain material with a specific signature, i.e. e Xj ∈ C, ∀j = 1, . . . , J, where Xj denotes the j th column of X and Ce := d [ {ψi } ∈ RJ i=1 is the point cloud of a large number d of signatures ψi e.g. in a customized spectral library for HSI or MALDI data. The CS sampling model follows (1) by setting x∗ := Xvec , where by Xvec ∈ Rn we denote the vector-rearranged form of the matrix X . The CS reconstruction reads  1 min f (x) := ||y − AXvec ||2 . (17) e 2 Xj ∈C, ∀j=1,...,J or equivalently and similar to problem (2)  1 f (x) := ||y − Ax||2 . J e 2 j=1 C min Q x∈ The only update w.r.t. problem (2) is the fact that now the solution(s) x lives in a product space of the same model i.e. J Y C := Ce (18) j=1 (see also [54] on product/Kronecker space CS however using a sparsity inducing semi-algebraic model). We note that solving directly this problem for a general A (e.g. sampling models which non trivially combine columns/spatial pixels of X ) is exponentially hard O(dJ ) because of the combinatorial nature of the product space constraints. In this regard, a tractable scheme which has been frequently considered for this problem e.g. in [38] would be the application of an IPG type algorithm in order to break down the cost into the gradient and projection computations (here the projection requires O(Jd) computations to search the closest signatures to the current solution) to locally solve the problem at each iteration. June 2, 2017 DRAFT 15 B. Measurement bound The classic Johnson-Lindenstrauss lemma says that one can use random linear transforms to stably e where # stands for the set cardinality [55]. embed point clouds into a lower dimension of size O(log(#C)) Theorem 3. Let Ce be a finite set of points in Rne . For A drawn at random from the i.i.d. normal distribution and a positive constant θe, with very high probability one has e e (1 − θ)||(x − x0 )|| 6 ||A(x − x0 )|| 6 (1 + θ)||(x − x0 )||, ∀x, x0 ∈ Ce e θe2 ). provided m = O(log(#C)/ Note that this definition implies an RIP embedding for the point cloud model according to (9) with a constant θ < 3θe which in turn (and for small enough θe) implies the sufficient embedding condition for a stable CS recovery using the exact or approximate IPG. This bound considers an arbitrary point cloud and could be improved when data points Ce ⊆ M are derived from a low-dimensional structure, e.g. a smooth manifold M such as the MR Fingerprints, for which one can alternatively use m = dimE (M) for the corresponding RIP type embedding dimension listed e.g. in [7]. We note that such a measurement bound for a product space model (18) without considering any structure between spaces turns into m = O (J min {log(d), dimE (M)}) . C. Cover tree for fast nearest neighbour search With the data driven CS formalism and discretization of the model the projection step of IPG reduces to searching for the nearest signature in each of the product spaces, however in a potentially very large d size dictionary. And thus search strategies with linear complexity in d e.g. an exhaustive search, can be a serious bottleneck for solving such problems. A very well-established approach to overcome the complexity of an exhaustive nearest neighbour (NN) search on a large dataset consists of hierarchically partitioning the solution space and forming a tree whose nodes represents those partitions, and then using branch-and-bound methods on the resulting tree for a fast Approximate NN (ANN) search with o(d) complexity e.g. see [21, 56]. In this regard, we address the computational shortcoming of the projection step in the exact IPG by preprocessing Ce and form a cover tree structure suitable for fast ANN searches [21]. A cover tree is a levelled tree whose nodes at different scales form covering nets for data points at multiple resolutions; if σ := maxψ∈Ce ||ψroot − ψ|| corresponds to the maximal coverage by the root, then nodes appearing at any finer scale l > 0 form a (σ2−l )-covering net for their descendants i.e. as we descend down the tree the covering resolution refines in a dyadic coarse-to-fine fashion. We consider three possible search strategies using such a tree structure: • Exact NN: which is based on the branch-and-bound algorithm proposed in [21, Section 3.2]. Note that we should distinguish between this strategy and performing a brute force search. Although they both perform an exact NN search, the complexity of the proposed algorithm in [21] is shown to be way less in practical datasets. • (1 + ε)-ANN: this search is also based on the branch-and-bound algorithm proposed in [21, Section 3.2] which has includes an early search termination criteria (depending on the accuracy level ε) for which one obtains an approximate oracle of type defined by (7). Note that the case ε = 0 refers to the exact tree NN search described above. νp • FP-ANN: that is traversing down the tree up to a scale l = dlog( σ )e for which the covering resolution falls below a threshold νp on the search accuracy. This search results in a fixed precision type approximate oracle as described in Section III-A and in a sense it is similar to performing the former search with ε = 0, however on a truncated (low-resolution) cover tree. June 2, 2017 DRAFT 16 All strategies could be applied to accelerate the projection step of an exact or inexact IPG (with variations discussed in Sections III-C and III-A) to tackle the data driven CS problem (17). In addition one can iteratively refine the accuracy of the FP-ANN search (e.g. νpk = rk for a certain decay rate r < 1 and IPG iteration number k ) and obtain a PFP type approximate IPG discussed in Section III-B. Note that while the cover tree construction is blind to the explicit structure of the data, several key growth properties such as the tree’s explicit depth, the number of children per node, and importantly the overall search complexity are characterized by the intrinsic dimension of the model, called the doubling dimension, and defined as follows [57, 58]: Definition 1. Let B(q, r) denotes a ball of radius r centred at a point q in some metric space. The doubling dimension dimD (M) of a set M is the smallest integer such that every ball of M (i.e. ∀r > 0, ∀q ∈ M, B(q, 2r) ∩ M) can be covered by 2dimD (M) balls of half radius i.e. B(q 0 , r) ∩ M, q 0 ∈ M. The doubling dimension has several appealing properties e.g. dimD (Rn ) = Θ(n), dimD (M1 ) 6 dimD (M2 ) when M1 is a subspace of M2 , and dim(∪Ii=1 Mi ) 6 maxi dimD (Mi ) + log(I) [56, 58]. Practical datasets are often assumed to have small doubling dimensions e.g. when Ce ⊆ M samples a low e 6 dimD (M) = K -dimensional manifold M with certain smoothness and regularity one has dimD (C) 3 O(K) [59]. Equipped with such a notion of dimensionality, the following theorem bounds the complexity of a (1 + ε)-ANN cover tree search [21, 56]: Theorem 4. Given a query which might not belong to Ce, the approximate (1 + ε)-ANN search on a cover tree takes at most e e 2O(dimD (C)) log ∆ + (1/ε)O(dimD (C)) (19) e memory requirement, where ∆ is the aspect ratio of Ce. computations in time with O(#C) For most applications log(∆) = O(log(d)) [56] and thus for datasets with low dimensional structures i.e. dimD = O(1) and by using moderate approximations one achieves a logarithmic search complexity in d, as opposed to the linear complexity of a brute force search. Note that the complexity of an exact cover tree search could be arbitrarily high and thus the same applies to the FP and PFP type ANN searches since they are also based on performing exact NN (on a truncated tree). However in the next section we empirically observe that the complexity of an exact cover tree NN (and also the FP and PFP type ANN) is much lower than performing an exhaustive search. VII. N UMERICAL EXPERIMENTS We test the performance of the exact/inexact IPG algorithm for our product-space data driven CS reconstruction using the four datasets described in Table I. The datasets are uniformly sampled (populated) from 2-dimensional continuous manifolds embedded in a higher ambient dimension, see also Figure 14 . To proceed with fast ANN searches within IPG, we separately build a cover tree structure per dataset i.e. a preprocessing step. As illustrated for the MRF manifold in Figure 2 the coverage levels decrease in a coarse-to-fine manner as we traverse down the tree i.e. increasing the scale. Along with a brute-force exact search, three cover tree based ANN search strategies are investigated as described in the previous section: 3 Although the two notions of embedding dimE and doubling dimD dimensions scale similarly for certain sets e.g. linear subspaces, UoS, smooth manifolds..., this does not generally hold in Rn and one needs to distinguish between them, see for more discussions [60, 61]. 4 The S-manifold, Swiss roll and Oscillating wave are synthetic machine learning datasets available e.g. in [62]. The Magnetic Resonance Fingerprints (MRF) is generated by solving the Bloch dynamic equation for a uniform grid of relaxation times T 1, T 2 and for an external magnetic excitation pattern, discussed and implemented in [37]. June 2, 2017 DRAFT 17 Dataset Population (d) Ambient dim. (e n) CT depth CT res. S-Manifold Swiss roll Oscillating wave MR Fingerprints 5000 5000 5000 29760 200 200 200 512 14 14 14 13 2.43E-4 1.70E-4 1.86E-4 3.44E-4 TABLE I: Datasets for data-driven CS evaluations; a cover tree (CT) structure is formed for each dataset. The last two columns respectively report the number of scales and the finest covering resolution of each tree. (a) S-Manifold (b) Swiss roll (c) Oscillating wave (d) MR Fingerprints Fig. 1: Illustration of the low dimensional structures of datasets presented in Table I. Points are depicted along the first three principal components of each dataset. FP-ANN for precision parameters νp = {0.1, 0.05, .01, 0.001}. PFP-ANN for varying precision errors νpk = rk decaying at rates r = {0.05, 0.1, 0.15, . . . , 0.95}. • (1 + ε)-ANN for near optimality parameters ε = {0, 0.2, 0.4, . . . , 4}. The case ε = 0 corresponds to an exact NN search, however by using the branch-and-bound algorithm on the cover tree proposed in [21]. Gaussian CS sampling: From each dataset we select J = 50 points at random and populate our signal matrix X ∈ Rne×J . We then subsample the signal using the linear noiseless model discussed in (17), where the sampling matrix A ∈ Rm×neJ is drawn at random from the i.i.d. normal distribution. We denote eJ ) as the subsampling ratio used in each experiment. by m n 6 1 (where, n = n Throughout we set the maximum number of IPG iterations to 30. The step size is set to µ = 1/m ≈ 1/β which is a theoretical value satisfying the restricted Lipschitz smoothness condition for the i.i.d. Normal sampling ensembles in our theorems and related works on iterative hard thresholding algorithms e.g. see [27, 43, 44]. k ∗ || Figure 3 shows the normalized solution MSE measured by ||x||x−x at each iteration of the exact ∗ || and inexact IPG algorithms, and for a given random realization of the sampling matrix A and selected • • June 2, 2017 DRAFT 18 (a) Scale 2 (b) Scale 3 (c) Scale 4 (d) Scale 5 Fig. 2: A cover tree is built on MR Fingerprints dataset: (a-d) data partitions i.e. descendants covered with parent nodes appearing at scales 2-5 are highlighted in different colours. The coverage resolution refines by increasing the scale. signals X . For the FP-ANN IPG the convergence rate is unchanged from the exact IPG algorithm but the reconstruction accuracy depends on the chosen precision parameter and for lower precisions the algorithm stops at an earlier iteration with reduced accuracy, but with the benefit of requiring a smaller search tree. The PFP-ANN IPG ultimately achieves the same accuracy of the exact algorithm. Refining the approximations at a slow rate slows down the convergence of the algorithm (i.e. the staircase effect visible in the plots correspond to r = {0.7, 0.9}), whereas choosing too fast error decays, e.g. r = 0.1, does not improve the convergence rate beyond the exact algorithm and thus potentially leads to computational inefficiency. The (1 + ε)-ANN IPG algorithm can also achieve the precision of an exact recovery for moderately chosen approximation parameters. The case ε = 0 (unsurprisingly) iterates the same steps as for the IPG with brute-force search. Increasing ε slows down the convergence and for a very large parameter, e.g. ε = {3, 4}, the algorithm diverges. Figure 4 illustrates the recovery phase transitions for the inexact IPG using the PFP-ANN and (1 + ε)ANN searches. The normalized MSE is averaged over 10 random realizations of the sampling matrix A and 20 randomly subselected signal matrices X for a given A. In each image the area below the red curve has the solution MSE less than 10−4 and is chosen as the recovery region. We can observe that the PFP-ANN oracle results in a recovery region which is almost invariant to the chosen decay parameter r (except for the slow converging case r & 0.6, due to the limit on the maximum number of iterations). In the case of the 1+ε oracle we see a different behaviour; smaller values of ε allow for a larger recovery region and larger approximations are restricted to work only in high sampling regimes. This observation is in agreement with our theoretical bounds on recovery and it shows that the (1 + ε)-approximate oracles are sensitive to the compression ratio, even though an exact (or a better-chosen approximate) IPG might still report recovery in the same sampling regime. Finally in Table II we report the total cost of projections for each iterative scheme. The cost is measured June 2, 2017 DRAFT 19 100 10-1 10-3 10 -4 5 10 15 20 25 30 Normalized Solution MSE -2 10-2 10 -3 10 -4 5 10 Number of Iterations -2 10-3 10-4 5 10 15 20 25 10 15 20 25 30 5 10 15 20 25 25 30 25 30 10-1 10-2 10-3 10-4 30 5 10 15 20 Number of Iterations 10-3 5 10 15 20 25 10-2 10-3 10-4 30 Normalized Solution MSE 10-1 Normalized Solution MSE Normalized Solution MSE 5 Number of Iterations 10-3 5 10 Number of Iterations 10-1 Bruteforce ν =0.1 ν =0.05 ν =0.01 ν =0.001 10-3 10 15 20 Number of Iterations 20 25 10-2 10-3 10-4 30 5 10 25 30 10 10 -2 10-3 10-4 5 10 15 20 Number of Iterations 15 20 Number of Iterations Bruteforce r =0.1 r =0.3 r =0.5 r =0.7 r =0.9 10-1 10-2 5 15 10-1 Number of Iterations Normalized Solution MSE Normalized Solution MSE -4 Number of Iterations 10-2 10-4 10-3 10 30 10-2 10-4 30 -1 10-4 25 10-2 -1 Number of Iterations 10 20 Normalized Solution MSE 10 Normalized Solution MSE Normalized Solution MSE 10-1 10 15 10-1 Number of Iterations Normalized Solution MSE 10 Normalized Solution MSE Normalized Solution MSE 10 -1 25 30 0 Bruteforce ǫ =0 ǫ =0.2 ǫ =0.4 ǫ =0.8 ǫ =1 ǫ =1.6 ǫ =2 ǫ =2.6 ǫ =3 ǫ =4 10-1 10-2 10-3 10-4 5 10 15 20 25 30 Number of Iterations Fig. 3: Convergence of the exact/inexact IPG for subsampling ratio m n = 0.2. Columns from left to right correspond to inexact algorithms with FP, PFP and 1 + ε ANN searches, respectively (legends for the plots in each column are identical and included in the last row). Rows from top to bottom correspond to S-Manifold, Swiss roll, Oscillating wave and MR Fingerprints datasets, respectively. as the total number of pairwise distances calculated for performing the NN or ANN searches, and it is averaged over the same trials as previously described5 . For a better evaluation we set the algorithm to 5 In our evaluations, we exclude the computation costs of the gradient updates, i.e. the forward and backward operators, which can become dominant when datasets are not very large and the sampling matrix is dense e.g. a Gaussian matrix. For structured embedding matrices such as the fast Johnson-Lindenstrauss transform [63] or randomized orthoprojectors e.g. in MRI applications the cost of gradient updates becomes a tiny fraction of the search step, particularly when dealing with a large size dataset. June 2, 2017 DRAFT 20 Fig. 4: Recovery phase transitions for IPG with approximate projection (i.e. ANN search). Image intensities correspond to the normalized solution MSE for a search parameter and a given subsampling ratio (ranging between 5-100%). Intensities in all plots are identically set with a logarithmic scale: black pixels correspond to accurate points with MSE 6 10−6 , white pixels represent points with MSE > 1, and the region below the red curve is defined as the exact recovery region with MSE 6 10−4 . Rows from top to bottom correspond to the phase transitions of S-Manifold, Swiss roll, Oscillating wave and MR Fingerprints datasets. The left and the right columns correspond to two cover tree based ANN searches namely, the (1 + ε)-ANN and the PFP-ANN with decay parameter r. June 2, 2017 DRAFT 21 Total NN/ANN cost (×104 ) Subsampling ratio ( m ) n Datasets Brute-force NN 10% 20% 30% SM SR OW MRF SM SR OW MRF SM SR OW MRF 194.23 193.67 215.10 923.34 130.80 127.19 140.89 744.23 113.55 109.34 123.06 699.48 CT’s exact NN (ε = 0) 8.11 8.90 15.47 33.05 4.90 5.19 8.99 24.74 3.87 4.08 7.19 20.91 FP-ANN Parameter νp 8.11 1E-3 8.90 1E-3 15.47 1E-3 - 4.90 1E-3 5.19 1E-3 9.00 1E-3 - 3.88 1E-3 4.07 1E-3 7.21 1E-3 - PFP-ANN Parameter r 2.94 4E-1 3.50 5E-1 7.10 5E-1 3.41 4E-1 1.96 3E-1 2.41 3E-1 3.94 4E-1 2.84 4E-1 1.78 4E-1 1.99 3E-1 3.38 4E-1 2.52 2E-1 (1 + ε)-ANN Parameter ε 2.36 4E-1 2.77 4E-1 4.54 4E-1 2.78 4E-1 1.54 4E-1 1.86 4E-1 2.91 4E-1 2.21 4E-1 1.31 4E-1 1.60 4E-1 2.46 6E-1 1.92 4E-1 TABLE II: Average computational complexity of the exact/inexact IPG measured by the total number of pairwise distances (in the ambient dimension) calculated within the NN/ANN steps to achieve an average solution MSE 6 10−4 (algorithms with less accuracies are marked as ’-’). For each ANN scheme the lowest cost and the associated parameter is reported. SM, SR, OW and MRF abbreviate S-Manifold, Swiss roll, Oscillating wave and the MR Fingerprints datasets, respectively. terminate earlier (than 30 iterations) when the objective function does not progress more than a tolerance level tol = 10−8 . For each scheme the reported parameter achieves an average normalized solution MSE 6 10−4 in the smallest amount of computations. For comparison we also include the cost of exact IPG implemented with the brute-force and exact (ε = 0) cover tree NN searches. When using a bruteforce NN search the cost per iteration is fixed and it is equal to the whole dataset population; as a result the corresponding exact IPG reports the highest computation. Replacing the brute-force search with a cover tree based exact NN search significantly reduces the computations. This is related to the low dimensionality of the manifolds in our experiments for which a cover tree search, even for performing an exact NN, turns out to require many fewer pairwise distances evaluations. Remarkably, the approximate algorithm (1 + ε)-ANN IPG consistently outperforms all other schemes by reporting 4-10 times acceleration compared to the exact algorithm with ε = 0, and about (or sometimes more than) 2 orders of magnitude acceleration compared to the IPG with an exact brute-force search; in fact for larger datasets the gap becomes wider as the (1 + ε)-ANN complexity stays relatively invariant to the population size. The FP-ANN IPG reports similar computations as for the exact tree search (ε = 0) algorithm because in order to achieve the desired accuracy the (exact) search is performed up to a very fine level of the tree. A gradual progress along the tree levels by the PFP-ANN IPG however improves the search time and reports a comparable computation cost to the (1 + ε)-ANN. Also it can be observed that by taking more samples the overall projection cost reduces which is related to the fast convergence (i.e. less iterations) of the algorithm once more measurements are available. VIII. C ONCLUSION AND DISCUSSIONS We studied the robustness of the iterative projected gradient algorithm against inexact gradient and projection oracles and for solving inverse problems in compressed sensing. We considered fixed precision, progressive fixed precision and (1 + ε)-approximate oracles. A notion of model information preserving under a hybrid local-uniform embedding assumption is at the heart of our analysis. We showed that under the same assumptions, the algorithm with PFP approximate oracles achieves the accuracy of the exact IPG. For a certain rate of decay of the approximation errors this scheme can also maintain the rate of linear convergence as for the exact algorithm. We also conclude that choosing too fast decays does not help the convergence rate beyond the exact algorithm and therefore can result in computational inefficiency. The (1 + ε)-approximate IPG can also achieves the accuracy of the exact algorithm, however under a stronger embedding condition, slower rate of convergence and possibly more noise amplification compared to the exact algorithm. We show that this approximation is sensitive to the CS subsampling regime i.e. for high compression ratios one can not afford too large approximation. We applied our results to a class of data June 2, 2017 DRAFT 22 driven compressed sensing problems, where we replaced exhaustive NN searches over large datasets with fast and approximate alternatives introduced by the cover tree structure. Our experiments indicate that the inexact IPG with (1 + ε)-ANN searches (and also comparably the PFP type search) can significantly accelerate the CS reconstruction. Our results require a lower bound on the chosen step size which is a critical assumption for globally solving a nonconvex CS problem, see e.g. [19, 43, 44]. With no lower bound on the step size only convergence to a local critical point is guaranteed (for the exact algorithm) see e.g. [64, 65]. Such assumption is restrictive for solving convex problems, where an upper bound on the step size is generally sufficient for the convergence. However recent studies [48, 66, 67] established fast linear convergence for solving non strongly convex problems such as CS with the exact IPG, and by assuming a notion of local (model restricted) strong convexity as well as choosing large enough step sizes. In our future work we would like to make more explicit connection between these results and our embedding assumptions and extend our approximation robustness study to the convex CS recovery settings with sharper bounds than e.g. [20]. A limitation of our current method is the dependency on ε for the CS recovery using (1 + ε)-ANN searches. In future we plan to investigate whether the ideas from [33] can be generalized to include our data-driven signal models. Finally we did not provide much discussion or experiments on the applications of the approximate gradient updates within the IPG. We think such approximations might be related to the sketching techniques for solving large size inverse problems, see [68, 69]. In our future work we would like to make explicit connections in this regard as well. R EFERENCES [1] D. L. Donoho, “Compressed sensing,” IEEE Transactions on Information Theory, vol. 52, no. 4, pp. 1289–1306, Apr. 2006. [2] E. J. Candes, J. Romberg, and T. Tao, “Robust uncertainty principles: exact signal reconstruction from highly incomplete frequency information,” IEEE Transactions on Information Theory, vol. 52, no. 2, pp. 489–509, Feb 2006. [3] J. A. Tropp, A. C. Gilbert, and M. J. Strauss, “Algorithms for simultaneous sparse approximation. part i: Greedy pursuit,” Signal Processing, vol. 86, no. 3, pp. 572 – 588, 2006. [4] E. Candès and B. Recht, “Exact matrix completion via convex optimization,” Commun. ACM, vol. 55, no. 6, pp. 111–119, Jun. 2012. [5] R. G. Baraniuk and M. B. Wakin, “Random projections of smooth manifolds,” Foundations of Computational Mathematics, vol. 9, no. 1, pp. 51–77, 2009. [6] R. G. Baraniuk, V. Cevher, M. F. Duarte, and C. Hegde, “Model-based compressive sensing,” IEEE Transactions on Information Theory, vol. 56, no. 4, pp. 1982–2001, April 2010. [7] R. G. Baraniuk, V. Cevher, and M. B. Wakin, “Low-dimensional models for dimensionality reduction and signal recovery: A geometric perspective,” Proceedings of the IEEE, vol. 98, no. 6, pp. 959–971, June 2010. [8] V. Cevher, S. Becker, and M. Schmidt, “Convex optimization for big data: Scalable, randomized, and parallel algorithms for big data analytics,” IEEE Signal Processing Magazine, vol. 31, no. 5, pp. 32–43, Sept 2014. [9] L. Bottou, Large-Scale Machine Learning with Stochastic Gradient Descent. Heidelberg: PhysicaVerlag HD, 2010, pp. 177–186. [10] A. Chambolle and T. Pock, “A first-order primal-dual algorithm for convex problems with applications to imaging,” Journal of Mathematical Imaging and Vision, vol. 40, no. 1, pp. 120– 145, 2011. [11] J. M. Fadili and G. Peyré, “Total variation projection with first order schemes,” IEEE Transactions on Image Processing, vol. 20, no. 3, pp. 657–669, 2011. June 2, 2017 DRAFT 23 [12] S. Ma, D. Goldfarb, and L. Chen, “Fixed point and bregman iterative methods for matrix rank minimization,” Mathematical Programming, vol. 128, no. 1, pp. 321–353, 2011. [13] A. d’Aspremont, L. E. Ghaoui, M. I. Jordan, and G. R. G. Lanckriet, “A direct formulation for sparse pca using semidefinite programming,” SIAM Review, vol. 49, no. 3, pp. 434–448, 2007. [14] M. Golbabaee and P. Vandergheynst, “Hyperspectral image compressed sensing via low-rank and joint-sparse matrix recovery,” in 2012 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2012, pp. 2741–2744. [15] R. L. Dykstra, “An algorithm for restricted least squares regression,” Journal of the American Statistical Association, vol. 78, no. 384, pp. 837–842, 1983. [16] J. P. Boyle and R. L. Dykstra, A Method for Finding Projections onto the Intersection of Convex Sets in Hilbert Spaces. New York, NY: Springer New York, 1986, pp. 28–47. [17] R. Giryes and M. Elad, “Iterative hard thresholding with near optimal projection for signal recovery,” in 10th international conference on Sampling Theory and Applications (SampTA 2013), 2013, pp. 212–215. [18] H. Rauhut, R. Schneider, and eljka Stojanac, “Low rank tensor recovery via iterative hard thresholding,” Linear Algebra and its Applications, vol. 523, pp. 220 – 262, 2017. [19] T. Blumensath, “Sampling and reconstructing signals from a union of linear subspaces,” IEEE Transactions on Information Theory, vol. 57, no. 7, pp. 4660–4671, July 2011. [20] M. Schmidt, N. L. Roux, and F. R. Bach, “Convergence rates of inexact proximal-gradient methods for convex optimization,” in Advances in Neural Information Processing Systems 24, 2011, pp. 1458–1466. [21] A. Beygelzimer, S. Kakade, and J. Langford, “Cover trees for nearest neighbor,” in Proceedings of the 23rd international conference on Machine learning. ACM, 2006, pp. 97–104. [22] O. Devolder, F. Glineur, and Y. Nesterov, “First-order methods of smooth convex optimization with inexact oracle,” Mathematical Programming, vol. 146, no. 1, pp. 37–75, 2014. [23] A. d’Aspremont, “Smooth optimization with approximate gradient,” SIAM Journal on Optimization, vol. 19, no. 3, pp. 1171–1183, 2008. [24] S. Villa, S. Salzo, L. Baldassarre, and A. Verri, “Accelerated and inexact forward-backward algorithms,” SIAM Journal on Optimization, vol. 23, no. 3, pp. 1607–1633, 2013. [25] J.-F. Aujol and C. Dossal, “Stability of over-relaxations for the forward-backward algorithm, application to fista,” SIAM Journal on Optimization, vol. 25, no. 4, pp. 2408–2433, 2015. [26] L. Yuan, J. Liu, and J. Ye, “Efficient methods for overlapping group lasso,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 35, no. 9, pp. 2104–2116, Sept 2013. [27] P. Shah and V. Chandrasekaran, “Iterative projections for signal identification on manifolds: Global recovery guarantees,” in 2011 49th Annual Allerton Conference on Communication, Control, and Computing (Allerton), Sept 2011, pp. 760–767. [28] N. Nguyen, D. Needell, and T. Woolf, “Linear convergence of stochastic iterative greedy algorithms with sparse constraints,” arXiv preprint arXiv:1407.0088, 2014. [29] A. Kyrillidis and V. Cevher, “Matrix recipes for hard thresholding methods,” Journal of Mathematical Imaging and Vision, vol. 48, no. 2, pp. 235–265, 2014. [30] C. Hegde, P. Indyk, and L. Schmidt, “A fast approximation algorithm for tree-sparse recovery,” in 2014 IEEE International Symposium on Information Theory, 2014, pp. 1842–1846. [31] M. A. Davenport, D. Needell, and M. B. Wakin, “Signal space cosamp for sparse recovery with redundant dictionaries,” IEEE Transactions on Information Theory, vol. 59, no. 10, pp. 6820–6829, Oct 2013. [32] R. Giryes and D. Needell, “Greedy signal space methods for incoherence and beyond,” Applied and Computational Harmonic Analysis, vol. 39, no. 1, pp. 1 – 20, 2015. [33] C. Hegde, P. Indyk, and L. Schmidt, “Approximation algorithms for model-based compressive June 2, 2017 DRAFT 24 sensing,” IEEE Transactions on Information Theory, vol. 61, no. 9, pp. 5129–5147, 2015. [34] G. Tang, B. N. Bhaskar, and B. Recht, “Sparse recovery over continuous dictionaries-just discretize,” in 2013 Asilomar Conference on Signals, Systems and Computers, 2013, pp. 1043–1047. [35] A. Asaei, M. Golbabaee, H. Bourlard, and V. Cevher, “Structured sparsity models for reverberant speech separation,” IEEE/ACM Transactions on Audio, Speech, and Language Processing, vol. 22, no. 3, pp. 620–633, March 2014. [36] M. Golbabaee, A. Alahi, and P. Vandergheynst, “Scoop: A real-time sparsity driven people localization algorithm,” Journal of Mathematical Imaging and Vision, vol. 48, no. 1, pp. 160–175, Jan. 2014. [37] D. Ma, V. Gulani, N. Seiberlich, K. Liu, J. Sunshine, J. Durek, and M. Griswold, “Magnetic resonance fingerprinting,” Nature, vol. 495, no. 7440, pp. 187–192, 2013. [38] M. Davies, G. Puy, P. Vandergheynst, and Y. Wiaux, “A compressed sensing framework for magnetic resonance fingerprinting,” SIAM Journal on Imaging Sciences, vol. 7, no. 4, pp. 2623–2656, 2014. [39] C. Cartis and A. Thompson, “An exact tree projection algorithm for wavelets,” IEEE Signal Processing Letters, vol. 20, no. 11, pp. 1026–1029, 2013. [40] A. Deshpande and S. Vempala, Adaptive Sampling and Fast Low-Rank Matrix Approximation. Berlin, Heidelberg: Springer Berlin Heidelberg, 2006, pp. 292–303. [41] N. Halko, P. G. Martinsson, and J. A. Tropp, “Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions,” SIAM Review, vol. 53, no. 2, pp. 217–288, 2011. [42] J. Håstad, “Tensor rank is NP-complete,” Journal of Algorithms, vol. 11, no. 4, pp. 644 – 654, 1990. [43] T. Blumensath and M. E. Davies, “Iterative hard thresholding for compressed sensing,” Applied and Computational Harmonic Analysis, vol. 27, no. 3, pp. 265 – 274, 2009. [44] T. Blumensath, “Accelerated iterative hard thresholding,” Signal Processing, vol. 92, no. 3, pp. 752 – 756, 2012. [45] J. D. Blanchard, C. Cartis, and J. Tanner, “Compressed sensing: How sharp is the restricted isometry property?” SIAM Review, vol. 53, no. 1, pp. 105–125, 2011. [46] S. Vaiter, M. Golbabaee, J. Fadili, and G. Peyré, “Model selection with low complexity priors,” Information and Inference: A Journal of the IMA, vol. 4, no. 3, p. 230, 2015. [47] V. Chandrasekaran, B. Recht, P. A. Parrilo, and A. S. Willsky, “The convex geometry of linear inverse problems,” Foundations of Computational Mathematics, vol. 12, no. 6, pp. 805–849, 2012. [48] S. Oymak, B. Recht, and M. Soltanolkotabi, “Sharp time-data tradeoffs for linear inverse problems,” arXiv preprint arXiv:1507.04793, 2015. [49] E. Arias-Castro and Y. C. Eldar, “Noise folding in compressed sensing,” IEEE Signal Processing Letters, vol. 18, no. 8, pp. 478–481, 2011. [50] M. A. Davenport, J. N. Laska, J. R. Treichler, and R. G. Baraniuk, “The pros and cons of compressive sensing for wideband signal acquisition: Noise folding versus dynamic range,” IEEE Transactions on Signal Processing, vol. 60, no. 9, pp. 4628–4642, 2012. [51] M. Golbabaee, S. Arberet, and P. Vandergheynst, “Compressive source separation: Theory and methods for hyperspectral imaging,” IEEE Transactions on Image Processing, vol. 22, no. 12, pp. 5096–5110, Dec 2013. [52] J. H. Kobarg, P. Maass, J. Oetjen, O. Tropp, E. Hirsch, C. Sagiv, M. Golbabaee, and P. Vandergheynst, “Numerical experiments with maldi imaging data,” Advances in Computational Mathematics, vol. 40, no. 3, pp. 667–682, 2014. [53] B. M. Davis, A. J. Hemphill, D. Cebeci Malta, M. A. Zipper, P. Wang, and D. Ben-Amotz, “Multivariate hyperspectral raman imaging using compressive detection,” Analytical Chemistry, vol. 83, no. 13, pp. 5086–5092, 2011. [54] M. F. Duarte and R. G. Baraniuk, “Kronecker compressive sensing,” IEEE Transactions on Image June 2, 2017 DRAFT 25 Processing, vol. 21, no. 2, pp. 494–504, 2012. [55] W. B. Johnson and J. Lindenstrauss, “Extensions of lipschitz mappings into a hilbert space,” Contemporary mathematics, vol. 26, no. 189-206, p. 1, 1984. [56] R. Krauthgamer and J. R. Lee, “Navigating nets: Simple algorithms for proximity search,” in Proceedings of the Fifteenth Annual ACM-SIAM Symposium on Discrete Algorithms, ser. SODA ’04, 2004. [57] P. Assouad, “Étude d’une dimension métrique liée la possibilité de plongements dans rn ,” C. R. Acad. Sci. Paris Sér. A-B., vol. 15, no. 288, pp. A731–A734, 1979. [58] J. Heinonen, Lectures on analysis on metric spaces. Springer Science & Business Media, 2012. [59] S. Dasgupta and Y. Freund, “Random projection trees and low dimensional manifolds,” in Proceedings of the fortieth annual ACM symposium on Theory of computing. ACM, 2008, pp. 537–546. [60] P. Indyk and A. Naor, “Nearest-neighbor-preserving embeddings,” ACM Trans. Algorithms, vol. 3, no. 3, Aug. 2007. [61] S. Kpotufe and S. Dasgupta, “A tree-based regressor that adapts to intrinsic dimension,” Journal of Computer and System Sciences, vol. 78, no. 5, pp. 1496 – 1515, 2012. [62] W. K. Allard, G. Chen, and M. Maggioni, “Multi-scale geometric methods for data sets ii: Geometric multi-resolution analysis,” Applied and Computational Harmonic Analysis, vol. 32, no. 3, pp. 435 – 462, 2012. [63] N. Ailon and B. Chazelle, “Approximate nearest neighbors and the fast johnson-lindenstrauss transform,” in Proceedings of the thirty-eighth annual ACM symposium on Theory of computing. ACM, 2006, pp. 557–563. [64] Y. Nesterov, “Gradient methods for minimizing composite functions,” Mathematical Programming, vol. 140, no. 1, pp. 125–161, 2013. [65] H. Attouch, J. Bolte, and B. F. Svaiter, “Convergence of descent methods for semi-algebraic and tame problems: proximal algorithms, forward–backward splitting, and regularized gauss–seidel methods,” Mathematical Programming, vol. 137, no. 1, pp. 91–129, 2013. [66] A. Agarwal, S. Negahban, and M. J. Wainwright, “Fast global convergence rates of gradient methods for high-dimensional statistical recovery,” in Advances in Neural Information Processing Systems 23. Curran Associates, Inc., 2010, pp. 37–45. [67] J. Liang, J. Fadili, and G. Peyré, “Local linear convergence of forward–backward under partial smoothness,” in Advances in Neural Information Processing Systems 27. Curran Associates, Inc., 2014, pp. 1970–1978. [68] M. Pilanci and M. J. Wainwright, “Iterative hessian sketch: Fast and accurate solution approximation for constrained least-squares,” J. Mach. Learn. Res., vol. 17, no. 1, pp. 1842–1879, 2016. [69] J. Tang, M. Golbabaee, and M. Davies, “Gradient projection iterative sketch for large scale constrained least-squares,” To appear in the Proceedings of 34th International Conference on Machine Learning (ICML), 2017. June 2, 2017 DRAFT
7cs.IT
Two-Armed Bandit Problem, Data Processing, and Parallel Version of the Mirror Descent Algorithm arXiv:1705.09977v1 [math.ST] 28 May 2017 Alexander Kolnogorov Alexander Nazin Dmitry Shiyan Yaroslav-the-Wise V.A.Trapeznikov Institute of Control Sciences Yaroslav-the-Wise Novgorod State University Russian Academy of Sciences Novgorod State University B.St-Petersburgskaya Str, 41 65, Profsoyuznaya str. B.St-Petersburgskaya Str, 41 Velikiy Novgorod, Russia, 173003 117997 Moscow, Russia Velikiy Novgorod, Russia, 173003 Email: [email protected] Email: [email protected] Email: [email protected] Abstract—We consider the minimax setup for the two-armed bandit problem as applied to data processing if there are two alternative processing methods available with different a priori unknown efficiencies. One should determine the most effective method and provide its predominant application. To this end we use the mirror descent algorithm (MDA). It is well-known that corresponding minimax risk has the order N 1/2 with N being the number of processed data. We improve significantly the theoretical estimate of the factor using MonteCarlo simulations. Then we propose a parallel version of the MDA which allows processing of data by packets in a number of stages. The usage of parallel version of the MDA ensures that total time of data processing depends mostly on the number of packets but not on the total number of data. It is quite unexpectedly that the parallel version behaves unlike the ordinary one even if the number of packets is large. Moreover, the parallel version considerably improves control performance because it provides significantly smaller value of the minimax risk. We explain this result by considering another parallel modification of the MDA which behavior is close to behavior of the ordinary version. Our estimates are based on invariant descriptions of the algorithms. All estimates are obtained by Monte-Carlo simulations. It’s worth noting that parallel version performs well only for methods with close efficiencies. If efficiencies differ significantly then one should use the combined algorithm which at initial sufficiently short control horizon uses ordinary version and then switches to the parallel version of the MDA. Keywords— two-armed bandit problem, control in a random environment, minimax approach, robust control, mirror descent algorithm, parallel processing. 1. Introduction We consider the two-armed bandit problem (see, e.g. [1], [2]) which is also well-known as the problem of expedient behavior in a random environment (see, e.g. [3], [4]) and the problem of adaptive control in a random environment (see, e.g. [5], [6]) in the following setting. Let ξn , n = 1, . . . , N be a controlled random process which values are interpreted as incomes, depend only on currently chosen actions yn (yn ∈ {1, 2}) and have probability distributions Pr(ξn = 1|yn = `) = p` , Pr(ξn = 0|yn = `) = q` where p` + q` = 1, ` = 1, 2. So, this is the so-called Bernoulli two-armed bandit. Such bandit is described by a parameter θ = (p1 , p2 ) with the set of values Θ = {θ : 0 ≤ p` ≤ 1; ` = 1, 2}. It is well-known that mathematical expectation and variance of one-step income are equal to m` = E(ξn |yn = `) = p` , D` = Var(ξn |yn = `) = p` q` The goal is to maximize (in some sense) the total expected income. Control strategy σ at the point of time n assigns a random choice of the action yn depending on the current history of the process, i.e. responses xn−1 = x1 , . . . , xn−1 to applied actions y n−1 = y1 , . . . , yn−1 : σ` (y n−1 , xn−1 ) = Pr(yn = `|y n−1 , xn−1 ), ` = 1, 2. The most general set of strategies is denoted here by Σ0 . However, there may be some additional restrictions on the set of strategies. For example, one can consider the set of strategies Σ1 described by the mirror descent algorithm presented below. More restrictive is additional requirement to strategy to allow parallel processing, this is the set Σ2 below. In the sequel we define some additional sets of strategies. If parameter θ is known then the optimal strategy should always apply the action corresponding to the largest value of m1 , m2 . The total expected income would thus be equal to N (m1 ∨ m2 ). If parameter is unknown then the regret ! N X LN (σ, θ) = N (m1 ∨ m2 ) − Eσ,θ ξn n=1 describes expected losses of total income with respect to its maximal possible value due to incomplete information. Here Eσ,θ denotes the mathematical expectation calculated with respect to measure generated by strategy σ and parameter θ. According to the minimax approach the maximal value of the regret on the set of parameters Θ should be minimized on the set of strategies. The value (0) RN (Θ) = inf sup LN (σ, θ) Σ0 Bayesian strategy and Bayesian risk. However, a direct application of the main theorem of the theory of games is virtually impossible because of its high computational complexity. Therefore, at first a description of the worstcase prior distribution is done. It is shown that the worstcase prior is symmetric and asymptotically uniform and this allows significantly to symplify the Bellman-type equation. In [12] the estimates (2) are improved as follows. Theorem 2. The following estimate of the minimax risk (1) holds for Gaussian two-armed bandit (1) Θ is called the minimax risk corresponding to the most general set of strategies Σ0 and the optimal strategy σ0M is called the minimax strategy. Application of the minimax strategy ensures that the following inequality holds (0) LN (σ0M , θ) ≤ RN (Θ) (0) lim (DN )−1/2 RN (Θ) = r0 N →∞ for all θ ∈ Θ and this implies robustness of the control. The minimax approach to the problem was proposed by H. Robbins in [7]. This article caused a significant interest to considered problem. It was shown in [8] that explicit determination of the minimax strategy and minimax risk is virtually impossible already for N > 4. However, the following asymptotic minimax theorem was proved by W. Vogel in [9]. Theorem 1. The following estimates of the minimax risk (1) hold as N → ∞ for Bernoulli two-armed bandit: (0) 0.612 ≤ (DN )−1/2 RN (Θ) ≤ 0.752 (3) with r0 ≈ 0.637. Remark 1. In [11], [12] the case D = 1 is considered. However, all reasonings can be easily extended to distributions with arbitrary D. Let’s explain the choice of Gaussian distribution of incomes. We consider the problem as applied to group control of processing a large amount of data. Let N = T M data items be given that can be processed using either of the two alternative methods. The result of processing of the n-th item of data is ξn = 1 if processing is successful and ξn = 0 if it is unsuccessful. Probabilities Pr(ξn = 1|yt = `) = p` , ` = 1, 2 depend only on selected methods (actions). Let’s assume that p1 , p2 are close to p (0 < p < 1). We partition the data into T packets of M data in each packet and use the same method for data processing in the same packet. For the we use the values of the process Pcontrol, tM ηt = M −1/2 n=(t−1)M +1 ξn , t = 1, . . . , T . According to the central limit theorem probability distributions of ηt , t = 1, . . . , T are close to Gaussian and their variances are close to D = p(1 − p) as in considered setting. Note that data in the same packet may be processed in parallel. In this case, the total time of data processing depends on the number of packets rather than on the total number of data. However, there is a question of losses in the control performance as the result of such aggregation. It was shown in [11], [12] that if T is large enough (e.g. T ≥ 30) then parallel control is close to optimal. Therefore, say 30000 items of data can be processed in 30 stages by packets of 1000 data with almost the same maximal losses as if the data were processed optimally one-by-one. However, one should ensure the closeness of p1 , p2 in this case. Otherwise parallel processing causes large losses at the initial stage of the control when both actions are applied turn-by-turn. In [11], [12] this requirement is discussed in more details and an adaptive algorithm which is optimal for both close and distant p1 , p2 is proposed. Remark 2. The estimates (2) can be easily extended to Gaussian two-armed bandit with a glance that the maximal value of the regret corresponds to |m1 −m2 | ≈ 3.78(D/N )1/2 in this case. In particular, this implies that thresholding strategy allows parallel processing. The estimate (3) can be in turn extended to Bernoulli twoarmed bandit by usage of parallel processing of data. (2) with D = 0.25 being the maximal possible variance of one-step income. Presented here the lower estimate was obtained in [10]. The upper estimate was obtained in [9] for the following strategy. Thresholding strategy. Use actions turn-by-turn until the absolute difference between total incomes for their applications exceeds the value of the threshold α(DN )1/2 or the control horizon expires. If the threshold has been achieved and the control horizon has not expired then at the residual control horizon use only the action corresponding to the larger value of total initial income. The optimal value of α is α ≈ 0.584 and the maximal value of the regret corresponds to |p1 −p2 | ≈ 3.78(D/N )1/2 with additional requirement that p1 , p2 are close to 0.5. This approach is generalized in [11], [12] for Gaussian (or Normal) two-armed bandit, i.e. described by the probability distribution density of incomes  fD (x|m` ) = (2πD)−1/2 exp −(x − m` )2 /(2D) if yn = ` (` = 1, 2). Gaussian two-armed bandit can be described by a vector parameter θ = (m1 , m2 ). The set of parameters is assumed to be the following Θ = {θ : |m1 − m2 | ≤ 2C}, where 0 < C < ∞. Restriction C < ∞ ensures the boundedness of the regret on Θ. In [11], [12], according to the main theorem of the theory of games the minimax risk for Gaussian two-armed bandit is sought for as Bayesian one corresponding to the worst-case prior distribution for which Bayesian risk attains its maximal value. The Bayesian approach allows to write recursive Bellman-type equation for numerical determination of both 2 Remark 3. Parallel control in the two-armed bandit problem was first proposed for treating a large group of patients by either of the two alternative drugs with different unknown efficiencies. Clearly, the doctor cannot treat the patients sequentially one-by-one. Say, if the result of the treatment will be manifest in a week and there is a thousand of patients, then one-by-one treatment would take almost twenty years. Therefore, it was proposed to give both drugs to sufficiently large test groups of patients and then the more effective one to give to the rest of them. As the result, the entire treatment takes two weeks. Note that the two-armed bandit problem, as applied to medical trials, was usually considered in Bayesian setting and for sufficiently small number of stages (two, and sometimes three or four treatment stages). So, the results depend on the prior which is often specifically chosen and the control quality is less than for sufficiently large number of stages. The discussion and bibliography of the problem can be found, for example, in [14]. versions of the MDA are proposed. These algorithms at initial sufficiently short stage apply the ordinary MDA and then switch to the parallel version. These algorithms perform well for all probabilities p1 , p2 . The structure of the paper is the following. In Section 2 we present the description of the algorithm from [16] and improve the estimate of the minimax risk by Monte-Carlo simulations. In Section 3 we propose the version of this algorithm which allows parallel processing and propose the invariant description of the algorithm. In Section 4 we propose another parallel version of the MDA which behaves like the ordinary algorithm. Combined algorithms are presented in Section 5. Section 6 contains a conclusion. Note that some results were presented in [13]. 2. Description and Properties of the MDA for Bernoulli Two-Armed Bandit There are some different approaches to robust control in the two-armed bandit problem, see, e.g. [6], [15], [16], [17]. In these articles, stochastic approximation method and mirror descent algorithm are used for the control. Instead of minimax risk, the authors often consider the equivalent attitude called the guaranteed rate of convergency. The order of the minimax risk for these algorithms is N 1/2 or close to N 1/2 . However, more precise estimates were not presented. The versions for parallel processing were not proposed as well. The goal of this paper is to investigate the mirror descent algorithm (MDA) for the two-armed bandit problem proposed in [16]. For this algorithm the minimax risk has the order N 1/2 and theoretical estimate of the factor (or normalized minimax risk) is r1 ≤ 4.710. We improve this estimate by Monte-Carlo simulations as r1 ≤ 2.0. Then we propose a parallel version of the algorithm which partitions application of actions in the packet in proportion to corresponding probabilities. For this parallel version of the MDA, we obtain invariant description which does not depend on the size of the packet. We show that corresponding minimax risk has the order N 1/2 and estimate the value of the factor as r2 ≈ 1.1 using Monte-Carlo simulations. It is quite unexpectedly that parallel version behaves unlike the ordinary one even if the number of packets is sufficiently large. Moreover, it provides significantly smaller value of the minimax risk. We explain this result by considering another parallel version of the MDA which partitions actions in the packet sequentially with probabilities determined at the beginning of packet processing. This version of the MDA behaves like the ordinary one if the number of packets is large enough. For this version of MDA, we obtain invariant description as well. It is important that parallel versions of the MDA perform well only for close values of probabilities p1 , p2 . For distant probabilities there may be significant expected losses caused by processing of the first packet. To avoid this, combined Figure 1. Normalized regret for Algorithm 1. β = 2.2; p = 0.5; N = 500, 2000, 8000, 16000, 32000. In this section, we provide a description of the MDA proposed in [16] for Bernoulli two-armed bandit problem. Note that the idea of the mirror descent originates from [18] for multy-armed bandit. (1) (2) Let’s introduce probability vectors pn = (pn , pn ) s.t. (1) (2) (1) (2) pn ≥ 0, pn ≥ 0, pn + pn = 1, dual vectors ζ n = (1) (2) (1) (2) (ζn , ζn ) and stochastic gradient vectors un = (un , un ). Gibbs distribution is defined as follows  (1)  (2) Gβ (ζ) = {Sβ (ζ)}−1 e−ζ /β , e−ζ /β where Sβ (ζ) = e−ζ (1) /β + e−ζ (2) /β . MDA for the two-armed bandit is defined recursively. Algorithm 1. 3 1) 2) Remark 4. Our description of the algorithm differs from the original in some details. The algorithm in [16] is proposed for the problem of minimization of the total expected income; it is done for multi-armed bandit with arbitrary finite number of actions and for 2nd moment rather than variance D of incomes. Fix some p0 and ζ 0 . For n = 1, 2, . . . , N : a) b) Draw an action yn distributed as follows: (`) Pr (yn = `) = pn−1 , ` = 1, 2; Apply the action yn and get random income ξn distributed as follows: The estimate (5) was obtained theoretically. It is approximately 7.39 times worse than the estimate (3). However, it may be improved by Monte-Carlo simulations. To this end, the following normalized regret was calculated: Pr (ξn = 1|yn = `) = p` , Pr (ξn = 0|yn = `) = q` , c) d) ` = 1, 2; Compute the thresholded stochastic gradient un (pn−1 ):  !  1 − ξ n   , 0 , if yn = 1,   (1) pn−1 ! un (pn−1 ) =  1 − ξn   , if yn = 2;   0, (2) pn−1 (1) L̂N (β, p, d) = (D̂N )−1/2 LN (σN , θN ), where θN and d are related as θ = (p + d(D̂/N )1/2 , p − d(D̂/N )1/2 ), where 0 < p < 1, D̂ = pq , q = 1 − p and σN stands for Algorithm 1 with βn = β{D̂(n + 1)}1/2 . Here (1) (2) (1) (2) and below we put p0 = p0 = 0.5, ζ0 = ζ0 = 0. The number of Monte-Carlo simulations is always 10000. (1) On figure 1 we present L̂N (β, p, d) calculated for different horizons N by Monte-Carlo simulations if β = 2.2, p = 0.5 and 1 ≤ d ≤ 10. Results are presented for N = 500, 2000, 8000, 16000, 32000. One can see that (1) L̂N (β, p, d) converges to some limiting function as N → ∞. (1) One can guess that the limiting function L̂N (β, p, d) does not depend on p if 0 < p < 1 just like the results of [11], [12]. However, this is not the case for MDA. On (1) figure 2 we present L̂N (β, p, d) calculated by Monte-Carlo simulations if β = 2.2, N = 2000 and 0 ≤ d ≤ 10. Results are presented for p = 0.1, 0.3, 0.5, 0.7, 0.9. One can see that the the lines are not similar and maximal expected losses are attained for the smallest p. Therefore, we calculate the following normalized regret Update the dual and probability vectors ζ n = ζ n−1 + un (pn−1 ), pn = Gβn (ζ n ); (1) LN (β, p, d) = (DN )−1/2 LN (σN , θN ), where θN and d are related as θ = (p + d(D/N )1/2 , p − d(D/N )1/2 ) where 0 < p < 1, D = 0.25 and σN stands for Algorithm 1 with βn = β{D(n + 1)}1/2 . First, we fix p = (1) 0.1 and calculate LN (β, p, d) by Monte-Carlo simulations if N = 2000 and 0 ≤ d ≤ 10. Results are presented on figure 3 for β = 1.0, 1.5, 2.0, 2.5, 2.0. One can see that β = 2.0 is approximately optimal because it provides the least maximal normalized regret in this case. More careful calculations give that β ≈ 2.2 is approximately optimal. (1) Finally we calculate LN (β, p, d) if β ≈ 2.2, N = 2000 for different p. Results are presented on figure 4 for p = 0.1, 0.3, 0.5, 0.7, 0.9. One can see that maximal values of (1) LN (β, p, d) are attained if p = 0.1. Hence, the value β ≈ 2.2 is approximately optimal and Figure 2. Normalized regret for Algorithm 1. β = 2.2; N = 2000; p = 0.1, 0.3, 0.5, 0.7, 0.9. Let’s denote by Σ1 the set of strategies described by the MDA and by (1) RN (Θ) = inf sup LN (σ, θ) Σ1 (4) Θ corresponding minimax risk. The following theorem holds [16]. Theorem 3. Consider Algorithm 1. Let βn = β ∗ × {D(n + 1)}1/2 with β ∗ = (8/ log 2)1/2 ≈ 3.397, D = 0.25. Then for any horizon N ≥ 1 for the minimax risk (4) the estimate holds (1) RN (Θ) ≤ r1∗ {D(N + 1)}1/2 . r1 = inf max β>0 1 ≤ d ≤ 10, (1) LN (β, p, d) ≈ 2.0. 0.1 < p < 0.9 (5) This estimate is approximately 2.37 times better than theoretical estimate (5). with r1∗ = 4(2 log 2)1/2 ≈ 4.710. 4 Figure 5. Normalized regret for Algorithm 2 if β = 1.0; % = 0.02; T = 100; M = 50, 200, 500, 1000. Figure 3. Normalized regret for Algorithm 1. p = 0.1, N = 2000, β = 1.0, 1.5, 2.0, 2.5, 3.0. 1) 2) Fix some p0 and ζ 0 . For t = 1, 2, . . . , T : a) b) (`) (`) Let Mt = pt−1 × M , ` = 1, 2; For n ∈ [(t − 1)M + 1, tM ] apply the `-th (`) action [Mt ] times getting random income P (`) ηt = (1 − ξn |yn = `), where Pr (ξn = 1|yn = `) = p` , Pr (ξn = 0|yn = `) = q` , c) Figure 4. Normalized regret for Algorithm 1 if β = 2.2, N = 2000, p = 0.1, 0.3, 0.5, 0.7, 0.9. 3. Parallel Version of the MDA d) Parallel version of the MDA for Bernoulli two-armed bandit is also defined recursively. Let’s assume that N = T M items of data are given where M describes the size of the packet of processed data and T is the number of (1) (2) processing stages. Let M t = (Mt , Mt ) be a vector s.t. (1) (2) (1) (2) (1) Mt > 0, Mt > 0, Mt +Mt = M . Denote by [Mt ], (2) (1) (2) [Mt ] the closest integer numbers to Mt , Mt . We also introduce a projection operator P% (p0 ) = p where % > 0 and ` = 1, 2; Compute the thresholded stochastic gradient ut (pt−1 ): ! (2) (1) ηt ηt , (2) , ut (pt−1 ) = (1) pt−1 pt−1 Update the dual and probability vectors ζ t = ζ t−1 + ut (pt−1 ), p0t = Gβt (ζ t ), pt = P% (p0t ); (`) The projection operator is used because Mt < 1 if cor(`) responding pt−1 is small enough. We define the normalized regret (2) L̂N (β, p, d) = (D̂N )−1/2 LN (σN , θN ) p = p0 , if p0(1) ≥ %, p0(2) ) ≥ %, p(1) = %, p(2) = 1 − %, if p0(1) < %, p(1) = 1 − %, p(2) = %, if p0(2) < %. where θN = (p + d(D̂/N )1/2 , p − d(D̂/N )1/2 ), and σN stands for Algorithm 2 with βt = β(D̂M (t + 0.5))1/2 , 0 < p < 1, q = 1 − p, D̂ = pq . Note that if M is large enough then according to the (`) central limit theorem all {ηt } are approximately normally distributed with parameters (1) The following parallel version of the MDA assigns [Mt ], (2) (1) (2) [Mt ] in t-th packet in proportion to pt−1 , pt−1 and then (1) (2) applies the first and the second actions [Mt ] and [Mt ] times respectively. (`) (`) (`) (`) E(ηt ) = q` [Mt ], Var(ηt ) = D̂[Mt ], ` = 1, 2. For normally distributed incomes, it is convenient to set a control problem with a continuous time. Namely, Algorithm 2. 5 if the `-th action is applied for a duration ∆M , which is not obligatory integer, then it generates normally distributed income with mathematical expectation q` × ∆M and variance D̂×∆M and independent from all previously obtained incomes. Let’s present corresponding modified algorithm. So, (`) ζt c) d) (`) (`) Let Mt = pt−1 × M , ` = 1, 2; (`) Apply the `-th action for a duration Mt (`) getting random income ηt which is normally distributed with (`) (`) E(ηt ) = q` × Mt , (`) (`) Var(ηt ) = D̂ × Mt , ` = 1, 2 and independent from all previous incomes; Compute the thresholded stochastic gradient ut (pt−1 ): ! (1) (2) ηt ηt ut (pt−1 ) = , (2) , (1) pt−1 pt−1 Y (`) (t) = (1) ζt (`) (`) (`) Here ε = M/N . Next, we obtain (`) = εw` (D̂N )1/2 + (`) Xt D̂N ε (`)  (2) (9)  ε E pt−1 . (`) (`) (`) Then η̂t = ηt (1 + δt ), ` = 1, 2; t = 1, 2, . . . , T , be(`) cause deviations {δt } are caused by nonintegral values (`) Mt in Algorithm 2. Since the number of stages T is finite and fixed it means that normalized loss function (2) (3) LN (β, p, d) is close to LN (β, p, d) in (9) if M is large enough. + Xt (D̂Mt ) (`) T X (`) (`) (`) (`) E(δt ) = O(M −1 ), Var(δt ) = O(M −1 ). (`) = εw` (D̂N )1/2 pt−1 + Xt (D̂N εpt−1 ). pt−1 0(1) This expression does not depend on N , M , p, D̂ but only on the parameters of packet processing. This proves theorem 4. (`) Remark 5. Denote by {η̂t } incomes corresponding to (`) Algorithm 2. Let δt be independent random variables s.t. ` = 1, 2; t = 1, 2, . . . , T . Then (`) (7) t=1 E(Xt (Dt )) = 0, Var(Xt (Dt )) = Dt , (`) (2) − ζt 2dτ =− 1/2 βt  β(τ + 0.5ε)  1 + Y (1) (t) − Y (2) (t) . β = 2d Proof. Consider q` = w` (D̂/N )1/2 , ` = 1, 2, so as (`) (`) q1 − q2 = −2d(D̂/N )1/2 , d > 0. Let Xt (Dt ) denote independent normally distributed random variables s.t. (`) . t=1 Theorem 4. Consider Algorithm 3 with a fixed number T of packet processing stages and arbitrary D̂ > 0. Then (3) normalized loss function LN (β, p, d) does not depend on N , M , p, D̂. = w` (D̂/N )1/2 Mt (`) (τ + 0.5ε)pi−1 (3) where θN = (p + d(D̂/N ) , p − d(D̂/N ) ), and σN stands for Algorithm 3 with βt = β(D̂M (t + 0.5))1/2 , 0 < p < 1, q = 1 − p, D̂ = pq . (`) ! ε LN (β, p, d) T   X (2) = (D̂N )−1/2 (p1 − p2 ) M E pt−1 1/2 (`) (`) Xi and pt−1 = 1 − pt−1 then all {pt−1 } depend only on the (3) parameters of packet processing. The regret LN (β, p, d) can be expressed as follows (3) ηt (6) Note that (7) depends only on parameters of packet processing. Since ! (2) (1) ζt − ζt exp − βt 0(1) ! pt−1 = (8) (2) (1) ζt − ζt exp − +1 βt L̂N (β, p, d) = (D̂N )−1/2 LN (σN , θN ) (`) , (`) pi−1 So, Update the dual and probability vectors ζ t = ζ t−1 + ut (pt−1 ), p0t = Gβt (ζ t ), pt = P% (p0t ); 1/2 t X i=1 We define the normalized regret ηt ! with 0(2) (`) D̂N ε where τ = t/T . Recall that βt = β(D̂M (t+0.5))1/2 . Hence   (`) ζt 1 τ w` (`) = + Y (t) βt β (τ + 0.5ε)1/2 Fix some p0 and ζ 0 . For t = 1, 2, . . . , T : a) b) (`) Xi i=1 Algorithm 3. 1) 2) = τ w` (D̂N )1/2 + t X Remark 6. It seems very likely that Algorithm 3 converges as N → ∞ and ε = M/N → 0. Let’s put (`) (`) (`) (`) ςN (τ ) = (D̂N )−1/2 ζt , PN (τ ) = pt−1 , ` = 1, 2 ! . pt−1 6 Figure 6. Normalized regret for Algorithm 2 if β = 1.0; % = 0.02; M = 100; T = 50, 100, 200, 500, 1000. Figure 8. Normalized regret for Algorithm 2 if % = 0.02; M = 100; T = 300; p = 0.5; β = 0.5, 0.75, 1.0, 1.25, 1.5, 2.0. Figure 7. Normalized regret for Algorithm 2 if β = 1.0; % = 0.02; M = 100; T = 500; p = 0.1, 0.3, 0.5, 0.7, 0.9. Figure 9. Normalized regret for Algorithm 2 if β = 1.0; % = 0.02; M = 100; T = 300; p = 0.1, 0.3, 0.5, 0.7, 0.9. where τ = t/T . Let W` (τ ), ` = 1, 2 be independent Wiener processes. Denote by ς (`) (τ ), P (`) (τ ) corresponding limiting random processes and L(3) (β, p, d) a limiting normalized regret as N → ∞ and ε = M/N → 0. Using (6), (8) and (9) a limiting description may be presented as In view of remark 5 we present simulations of Algorithm 2 but expect to observe the properties of Algorithm 3. (2) On figure 5 we present L̂N (β, p, d) calculated for different sizes of packet M by Monte-Carlo simulations if β = 1.0, p = 0.5, % = 0.02, T = 100 and 1 ≤ d ≤ 25. Results are presented for M = 50, 200, 500, 1000. One can see that (2) L̂N (β, p, d) is almost independent from the size of packet M. (2) On figure 6 we present L̂N (β, p, d) calculated for different T by Monte-Carlo simulations if β = 1.0, p = 0.5, % = 0.02, M = 100 and 1 ≤ d ≤ 25. Results are presented for T = 50, 100, 200, 500, 1000. One can see that (2) L̂N (β, p, d) converges as T → ∞. According to theorem 4 the limiting function (2) L̂N (β, p, d) as N → ∞ does not depend on p if (2) 0 < p < 1. On figure 7 we present L̂N (β, p, d) calculated by Monte-Carlo simulations if β = 1.0, M = 100, T = 500, % = 0.02 and 1 ≤ d ≤ 25. Results are presented for p = 0.1, 0.3, 0.5, 0.7, 0.9. One can see that these lines are close to each other. Then we determine the optimal β . We define the normalized regret dς (`) (τ ) = w` dτ + (P (`) (τ ))−1/2 dW` (τ ),  (1)  ς (τ ) − ς (2) (τ ) exp − βτ 1/2 P 0(1) (τ ) = ,  (1)  ς (τ ) − ς (2) (τ ) exp − +1 βτ 1/2 0 P 0(2) (τ ) = 1 − P 0(1) (τ ), P (τ ) = P{P (τ )}, τ ∈ [0, 1]. Initial conditions are given by ς (1) (0) = ς (2) (0) = 0. Then limiting normalized regret is equal to (3) L Z1 (β, p, d) = 2d   E P (2) (τ ) dτ. 0 (2) LN (β, p, d) = (DN )−1/2 LN (σN , θN ) However, we do not have a rigorous proof of this result. 7 where θN = (p + d(D/N )1/2 , p − d(D/N )1/2 ) and σN stands for Algorithm 2 with βt = β(DM (t + 0.5))1/2 , 0 < p < 1, D = 0.25. First, we fix p = 0.5 and calculate (2) LN (β, p, d) by Monte-Carlo simulations if M = 100, T = 300, % = 0.02 and 0 ≤ d ≤ 25. Results are presented on figure 8 for β = 0.5, 0.75, 1.25, 1.5, 2.0. One can see that β = 1.0 is approximately optimal because it provides (2) the least maximal normalized regret LN (β, p, d) < 1.05 if d < 20. (2) Finally we calculate LN (β, p, d) if β = 1.0, M = 100, T = 300, % = 0.02 and 0 ≤ d ≤ 25. Results are presented on figure 9 for p = 0.1, 0.3, 0.5, 0.7, 0.9. One can see that (2) maximal values of LN (β, p, d) are attained if p = 0.5. Hence, the value β = 1.0 is approximately optimal and r2 = inf Figure 10. Normalized regret for Algorithm 4 if β = 2.2; N = 10000; p = 0.5; M = 100; M = 1, 20, 50, 100, 200. (2) max β>0 1 ≤ d ≤ 20, LN (β, p, d) ≈ 1.1. 0.1 < p < 0.9 It is straightforward to check that This estimate is even better than r1 . However, it is attained for close p1 , p2 because % > 0. (`) χt tM X = (1 − ξn(`) ), n=(t−1)M +1 4. Another Parallel Version of the MDA where (`) {ξn } are i.i.d. variables distributed as (`) Pr{(1 − ξn(`) ) = 1} = pt−1 q` , Let’s consider now another parallel version of the MDA which behaves closely to the ordinary version. (`) Pr{(1 − ξn(`) ) = 0} = 1 − pt−1 q` Algorithm 4. (1) (2) and {ξn }, {ξn } are independent from each other. Hence (`) (`) 1) 2) Fix some p0 and ζ 0 . For t = 1, 2, . . . , T : a) i) ii) (1) (`) Varχt B) Draw an action yn distributed as follows: (`) Pr (yn = `) = pt−1 , ` = 1, 2; Apply the action yn , get random income ξn distributed as follows: (4) LN (β, p, d) = (DN )−1/2 LN (σN , θN ), where θN = (p + d(D/N )1/2 , p − d(D/N )1/2 ), and σN stands for Algorithm 4 with βt = β(DM (t + 0.5))1/2 . Theorem 5. Consider Algorithm 4 with a fixed number (`) T of packet processing stages. Assume that χt , ` = 1, 2 are normally distributed with mathematical expectations and variances given by (10). Then asymptotically (as (4) N → ∞) normalized loss function LN (β, p, d) does not depend on N , M , but does depend on on q , D and parameters of packet processing. Pr (ξn = 1|yn = `) = p` , Pr (ξn = 0|yn = `) = q` , and update: (`) (`) χt ← χt + (1 − ξn ) if yn = `, ` = 1, 2;. b) c) (10) Let’s put p1 = p + d(D/N )1/2 , p2 = p − d(D/N )1/2 , D = 0.25 and q` = 1 − p` , ` = 1, 2. Note that if N is (`) large enough then distributions of χt , ` = 1, 2 are close to gaussian ones. We define the normalized regret (2) Put χt = χt = 0. For n = (t − 1) × M + 1, . . . , t × M : A) Eχt = M pt−1 q` , (`) (`) = M pt−1 q` (1 − pt−1 q` ), ` = 1, 2. Compute the thresholded stochastic gradient ut (pt−1 ): ! (1) (2) χt χt ut (pt−1 ) = , (2) , (1) pt−1 pt−1 Proof. Let’s put q` = w` (D/N )1/2 , ` = 1, 2, so that (`) (`) q1 − q2 = −2d(D/N )1/2 , d > 0. Let Xt (Dt ) denote independent normally distributed random variables s.t. Update the dual and probability vectors ζ t = ζ t−1 + ut (pt−1 ), pt = Gβt (ζ t ); ` = 1, 2; t = 1, 2, . . . , T . Then (`) (`) (`) (`) (`) E(Xt (Dt )) = 0, Var(Xt (Dt )) = Dt , (`) (`) (`) (`) (`) χt = w` (D/N )1/2 M pt−1 + Xt (M pt−1 q` (1 − pt−1 q` )) (`) (`) (`) (`) = εw` (DN )1/2 pt−1 + Xt (εN pt−1 q` (1 − pt−1 q` )). 8 ` = 1, 2 where τ = t/T . Let W` (τ ), ` = 1, 2 be independent Wiener processes. Denote by ς (`) (τ ), P (`) (τ ) corresponding limiting random processes as N → ∞ and ε = M/N → 0 and L(4) (β, p, d) the limit of (4) LN (β, p, d). Using (11), (13) and (14) a limiting description may be presented as 1/2  q(1 − qP (`) (τ )) (`) dW` (τ ), dς (τ ) = w` dτ + DP (`) (τ ) Here ε = M/N . Next, we obtain (`) (`) χt εN q` (1 − pt−1 q` ) (`) (`) pt−1 = εw` (DN )1/2 + Xt ! . (`) pt−1 So, (`) ζt 1/2 = τ w` (DN ) + t X (`) εN q` (1 − pt−1 q` ) (`) Xi ! , (`) pt−1 i=1 (11) 1/2 where τ = t/T . Recall that βt = β(DM (t + 0.5)) β(DN (τ + 0.5ε))1/2 . Hence   (`) 1 τ w` ζt (`) = + YN (t) βt β (τ + 0.5ε)1/2  ς (1) (τ ) − ς (2) (τ ) exp − βτ 1/2 P (1) (τ ) = ,  (1)  ς (τ ) − ς (2) (τ ) exp − + 1 βτ 1/2  = where w1 −w2 = −2d, P (2) (τ ) = 1−P (1) (τ ), τ ∈ [0, 1]. Initial conditions are given by with (`) YN (t) = t X (`) (`) Xi i=1 εq` (1 − pt−1 q` ) ! (`) ς (1) (0) = ς (2) (0) = 0. . D(τ + 0.5ε)pi−1 Then limiting normalized regret is equal to (`) Note that q` → q as M → ∞, ` = 1, 2. Hence, YN (t) → Y (`) (t) as M → ∞ where ! (`) t X εq(1 − pt−1 q) (`) (`) Y (t) = Xi . (`) D(τ + 0.5ε)pi−1 i=1 (4) L − ζt 2dτ =− 1/2 βt  β(τ + 0.5ε)  1 + Y (1) (t) − Y (2) (t) . β Note that (12) depends only on q , D and T . Since ! (2) (1) ζt − ζt exp − βt (1) ! pt−1 = (2) (1) ζt − ζt exp − +1 βt (2) (1) (4) On figure 10 we present LN (β, p, d) calculated for different M by Monte-Carlo simulations if β = 2.2, p = 0.5, M = 10000 and 1 ≤ d ≤ 25. Results are presented for M = 20, 50, 100, 200 (accordingly T = 500, 200, 100, 50). The case M = 1 corresponds to ordinary MDA and (4) (1) LN (β, p, d). One can see that LN (β, p, d) is close to (1) LN (β, p, d) if T is large enough. (12) 5. Combined Algorithms One can see on figure 6 and figure 10 that larger sizes of packets correspond to larger sizes of normalized regret if d is large enough. It is caused by equal applications of both actions to initial packet. To avoid this effect of initial packet processing one can take initial packets of smaller sizes. The simplest decision is to use the ordinary algorithm at initial short stage and then to switch to parallel algorithm. First, we combine Algorithm 1 and Algorithm 4 as follows. Algorithm 5. (13) (`) and pt−1 = 1 − pt−1 then all {pt−1 } depend only on q , D (4) and T . The regret LN (β, p, d) can be expressed as follows (4) LN (β, p, d) T   X (2) = (DN )−1/2 (p1 − p2 ) M E pt−1 t=1 T X = 2d  (2)   E P (2) (τ ) dτ. We do not have a rigorous proof of this result as well. (2) (1) (β, p, d) = 2d 0 As the number of stages T is fixed, then asymptotically (as M → ∞) ζt Z1 (14) 1)  ε E pt−1 . 2) t=1 This expression does not depend on N , M , but does depend on q , D and T . This proves theorem 4. Remark 7. Like in section 3, we present a limiting description of Algorithm 4 as M → ∞ and ε = M/N → (`) (`) (`) (`) 0. Let’s put ςN (τ ) = (DN )−1/2 ζt , PN (τ ) = pt−1 , Apply Algorithm 1 at the initial horizon n = 1, . . . , M0 . Get pM0 and ζ M0 . Apply Algorithm 4 at the residual horizon n = M0 + 1, . . . , N . (5) On figure 11 we present LN (β, p, d) calculated by Monte-Carlo simulations for Algorithm 5 if β = 2.2; N = 20000; M0 = 600; M = 200; p = 0.1, 0.3, 0.5, 0.7, 0.9. One 9 Figure 11. Normalized regret for Algorithm 5 if β = 2.2; N = 20000; M0 = 600; M = 200; p = 0.1, 0.3, 0.5, 0.7, 0.9. Figure 13. Normalized regret for Algorithm 7 if β1 = 2.2; β2 = 1.0; N = 30000; M0 = 900; M = 300, % = 0.02, κ = 0.2; p = 0.1, 0.3, 0.5, 0.7, 0.9. 1) 2) Apply Algorithm 1 at the initial horizon n = 1, . . . , M0 with β = β1 . Get pM0 and ζ M0 . (2) (1) If min(pM0 , pM0 ) < κ then apply Algorithm 4 with β = β1 else apply Algorithm 2 with β = β2 at the residual horizon n = M0 + 1, . . . , N . can see that results are close to those presented on figure 4 for ordinary MDA. If κ is appropriately chosen this algorithm for small d switches mostly to Algorithm 2. For large d it switches mostly to Algorithm 4. On figure 12 we present comparative (7) (6) results for LN (β, p, d) and LN (β, p, d) if β1 = 2.2; β2 = 1.0; N = 30000; p = 0.5; M0 = 900; M = 300, % = 0.02, (7) κ = 0.2. One can see that LN (β, p, d) does not grow for large d. Finally, on figure 13 we present normalized regret for Algorithm 7 if β1 = 2.2; β2 = 1.0; N = 30000; M0 = 900; M = 300, % = 0.02, κ = 0.2; p = 0.1, 0.3, 0.5, 0.7, 0.9. (7) Maximal values of LN (β, p, d) are larger than those for (5) (2) LN (β, p, d) but smaller than those for LN (β, p, d). To take advantage of Algorithm 2, we combine Algorithm 1 and Algorithm 2 as follows. 6. Conclusion Figure 12. Comparative results for Algorithm 6 and Algorithm 7 if β1 = 2.2; β2 = 1.0; N = 30000; p = 0.5; M0 = 900; M = 300, % = 0.02, κ = 0.2. Algorithm 6. 1) 2) Two parallel versions of the mirror descent algorithm (MDA) for the two-armed bandit problem are proposed. The usage of parallel versions of the MDA ensures that total time of data processing depends mostly on the number of packets but not on the total number of data. Monte-Carlo simulations show that maximal expected losses for parallel versions are not more than for ordinary version which processes data one-by-one. However, it is true only for close mathematical expectations. For distant mathematical expectations the effect of the first packet processing, when both actions are equally applied, causes significant losses if the size of the packet is large enough. This effect may be avoided if at the sufficiently short initial stage the ordinary mirror descent algorithm is used and then switched to the parallel version. Apply Algorithm 1 at the initial horizon n = 1, . . . , M0 with β = β1 . Get pM0 and ζ M0 . Apply Algorithm 2 at the residual horizon n = M0 + 1, . . . , N with β = β2 . However, Algorithm 2 provides large normalized regret if d is large enough (see figure 5, 6) because it applies both actions with probabilities no less than %. Therefore we consider the following combined algorithm. Algorithm 7. 10 References [1] D. A. Berry and B. Fristedt, Bandit Problems: Sequential Allocation of Experiments. London, New York: Chapman and Hall, 1985. [2] E. L. Presman and I. M. Sonin, Sequential Control with Incomplete Information. New York: Academic Press, 1990. [3] M. L. Tsetlin, Automation Theory and Modeling of Biological Systems. New York: Academic Press, 1973. [4] V. I. Varshavsky, Collective Behavior of Automata. Moscow: Nauka, 1973. (In Russian) [5] V. G. Sragovich, Mathematical Theory of Adaptive Control. New Jersey, London: World Scientific. Interdisciplinary Mathematical Sciences, Vol. 4. 2006. [6] A. V. Nazin and A. S. Poznyak, Adaptive Choice of Alternatives. Moscow: Nauka, 1986. (In Russian) [7] H. Robbins, Some Aspects of the Sequential Design of Experiments. Bulletin AMS., Vol. 58(5), pp. 527 - 535, 1952. [8] J. Fabius and W. R. van Zwet, Some Remarks on the Two-Armed Bandit. Ann. Math. Statist., Vol. 41, pp. 1906 - 1916, 1970. [9] W. Vogel, An Asymptotic Minimax Theorem for the Two-Armed Bandit Problem. Ann. Math. Stat., Vol. 31, pp. 444 - 451, 1960. [10] J. A. Bather, The Minimax Risk for the Two-Armed Bandit Problem. Mathematical Learning Models - Theory and Algorithms. Lecture Notes in Statistics, New York Inc.: Springer-Verlag, Vol. 20, pp. 1 - 11, 1983. [11] A. V. Kolnogorov, Parallel Design of Robust Control in the Stochastic Environment (the Two-Armed Bandit Problem) Automation and Remote Control, Vol. 73, No. 4, pp. 689 - 701, 2012. [12] A. V. Kolnogorov, Contributions to the Asymptotic Minimax Theorem for the Two-Armed Bandit Problem. International Journal of Mathematics and Computers in Simulation, Vol. 10, pp. 129 - 132, 2016. [13] A. V. Kolnogorov, D. N. Shiyan, Parallel Version of the Mirror Descent Algorithm for the Two-Armed Bandit Problem. Proceedings of the 2016 Third International Conference on Mathematics and Computers in Sciences and in Industry (MCSI 2016), Chania, Crete, August 27-29, 2016, pp 241-235. [14] T. L. Lai, B. Levin, H. Robbins, D. Siegmund, Sequential medical trials (stopping rules/asymptotic optimality). Proc. Nati. Acad. Sci. USA, Vol. 77, No 6, pp. 3135 -3138, 1980. [15] G. Lugosi, N. Cesa-Bianchi, Prediction, Learning and Games. New York: Cambridge University Press, 2006. [16] A. Juditsky, A. V. Nazin, A. B. Tsybakov, N. Vayatis, Gap-Free Bounds for Stochastic Multi-Armed Bandit. Proc. 17th World Congress IFAC (Seoul, Korea, July 6 - 11), pp. 11560 - 11563, 2008. [17] A. V. Gasnikov, Yu. E. Nesterov, V. G. Spokoiny, On the Efficiency of a Randomized Mirror Descent Algorithm in Online Optimization Problems. Computational Mathematics and Mathematical Physics, Vol. 55, No 4, pp. 580 - 596, 2015. [18] A. S. Nemirovski, D. B. Yudin, Problem Complexity and Method Efficiency in Optimization. New Jersey: Wiley-Interscience, 1983. 11
10math.ST
arXiv:1701.07796v1 [cs.IT] 26 Jan 2017 A VARIATIONAL CHARACTERIZATION OF RÉNYI DIVERGENCES VENKAT ANANTHARAM1 ABSTRACT: Atar, Chowdhary and Dupuis have recently exhibited a variational formula for exponential integrals of bounded measurable functions in terms of Rényi divergences. We develop a variational characterization of the Rényi divergences between two probability distributions on a measurable space in terms of relative entropies. When combined with the elementary variational formula for exponential integrals of bounded measurable functions in terms of relative entropy, this yields the variational formula of Atar, Chowdhary and Dupuis as a corollary. We also develop an analogous variational characterization of the Rényi divergence rates between two stationary finite state Markov chains in terms of relative entropy rates. When combined with Varadhan’s variational characterization of the spectral radius of square matrices with nonnegative entries in terms of relative entropy, this yields an analog of the variational formula of Atar, Chowdary and Dupuis in the framework of finite state Markov chains. Key words: Markov chains; Relative entropy; Rényi divergence; Variational formulas. 1 EECS Department, University of California, Berkeley, CA 94720, USA. Research supported in part by the National Science Foundation grants ECCS-1343398, CNS-1527846, CCF-1618145, the NSF Science & Technology Center grant CCF0939370 (Science of Information), and the William and Flora Hewlett Foundation Center for Long Term Cybersecurity at Berkeley. 1 1 Introduction Evaluating how far away a given probability distribution is from another can be done in many ways. The Kullback-Leibler divergence or relative entropy, which is closely tied to Shannon’s notion of entropy, is one such measure prominent in statistical applications. It belongs to a larger family of divergences, the so-called Rényi divergences, which are closely tied to Rényi’s notion of entropy. Rényi divergences also have numerous applications in problems of interest in statistics and information theory, see [4] for a survey of some of their basic properties and some indication of their applications. The Rényi divergences, with a minor change in scaling relative to the definition in [4], are the topic of this article. We treat the Rényi divergences as parametrized by a real number α ∈ R, α ≠ 0, α ≠ 1. We were prompted to write this document by reading a recent paper of Atar, Chowdhary and Dupuis [1], which provides a variational formula for exponential integrals of bounded measurable functions in terms of Rényi divergences. We show that the variational characterization in [1] is a simple consequence of a variational characterization for Rényi divergences in terms of relative entropies, which we also develop. For the case of probability distributions on a finite set, and in the range α > 0, α ≠ 1, our variational characterization for Rényi divergences was developed by Shayevitz, [10] and [11, Thm. 1]. More recently, for mutually absolutely continuous probability distributions on a measurable space, in the case α > 0, α ≠ 1, parts of this variational characterization appear in a paper of Sason, see [8, Lem. 4 and Cor. 2]. The ability to derive the variational formula of [1] from inequalities for the Rényi divergences in terms of relative entropies, in the case α > 1, is also remarked on in a recent paper of Liu, Courtade, Cuff, and Verdú [6, Sec. II-A]. To the best of our knowledge, however, a full treatment of this variational characterization of Rényi divergences in terms of relative entropies, covering an arbitrary pair of probability distributions on a measurable space and all possible values for α, does not appear to be in the literature and so it seems worth writing down. It is also worth noting how easily the full variational formula of [1], in all cases, falls out of this variational characterization of Rényi divergences. Section 2 presents the notational conventions and the definitions of the main quantities used in this document in the i.i.d. case. The main result in the i.i.d. case, Theorem 1, is stated in Section 3. The result of [1] that prompted this paper is presented in Section 4, and is derived there as a consequence of Theorem 1 and the elementary variational formula for exponential integrals in (2). Theorem 1 itself is proved in Section 5. We then turn to a development of analogs of the preceding results in the case of stationary finite state Markov chains. Section 6 makes the necessary definitions and gathers some standard facts about the asymptotic properties of iterated powers of a square matrix with nonnegative entries, which we need for our discussion. It also contains the analog of the elementary variational formula in the context of finite state Markov chains, in (17), which is Varadhan’s variational characterization in terms of relative entropy of the spectral radius of square matrices with nonnegative entries. The main results in the case of stationary finite state Markov chains are stated in Section 7. These are Theorem 2, which gives a variational characterization of each Rényi divergence rate between two stationary finite state Markov chains in terms of relative entropy rates, and Theorem 3, which gives an analog of the variational formula of [1] in the context of finite state Markov chains. A proof of Theorem 3 assuming the truth of Theorem 2, and using (17), is also provided in this section. The proof of Theorem 2 is provided in Section 8. We end the paper in Section 9 with some thoughts about directions for future work. In order to maintain the flow of the main exposition, the details of several proofs are relegated to appendices. 2 2 Setup Let (S, F ) be a measurable space. B(S) denotes the set of bounded measurable real-valued functions and P(S) the set of probability measures on (S, F ). For ν, θ ∈ P(S), ν ⪯ θ is notation for ν being absolutely continuous with respect to θ, see [2, pg. 442] for the definition. If ν ⪯ θ, then dν dθ denotes the Radon-Nikodym derivative of ν with respect to θ; any two choices of Radon-Nikodym derivative differ only on a θ-null set, see [2, Thm. 32.2]. The relative entropy D(ν∥θ) of ν with respect to θ is defined by ⎧ ⎪ ) ⎪ (log dν dθ dν , D(ν∥θ) ∶= ⎨∫S ⎪ ⎪ ⎩∞ if ν ⪯ θ, if ν ⪯̸ θ. (1) From the convexity of the x log x function for nonnegative x, one can check that D(ν∥θ) ≥ 0. Here, and in the rest of the paper, ∶= is notation for equality by definition. Logarithms can be assumed to be to the natural base. For two measurable functions f and g on (S, F ), not necessarily bounded, and η ∈ P(S), f =η g denotes equality of f and g except possibly on an η-null set. Similarly, for C, D ∈ F , C =η D denotes equality of C and D up to η-null sets and C ⊆η D denotes the containment of C in D up to η-null sets. The variational characterization in (2) below of exponential integrals of bounded measurable functions is elementary. For any µ ∈ P(S) and g ∈ B(S) we have log ∫ eg dµ = sup (∫ gdθ − D(θ∥µ)) = S θ∈P(S) S sup θ∈P(S) ∶ θ⪯µ (∫ gdθ − D(θ∥µ)) . (2) S We provide a proof in Appendix A. For any α ∈ R/{0, 1}, and ν, θ ∈ P(S), the Rényi divergence Rα (ν∥θ) is defined as in eqn. (2.1) of [1], by first defining it for α > 0, α ≠ 1, by ⎧ ⎪ ⎪∞ Rα (ν∥θ) ∶= ⎨ 1 ′ ⎪ log ∫{ν ′ θ′ >0} ( νθ′ )α dθ ⎪ ⎩ α(α−1) if α > 1 and ν ⪯̸ θ otherwise , (3) dθ ′ where ν ′ ∶= dν dη and θ ∶= dη , where η ∈ P(S) is an arbitrary probability distribution such that ν ⪯ η and θ ⪯ η. It is straightforward to check that every choice of η, subject to the absolute continuity conditions, results in the same value of the Rényi entropy. Then, for α < 0, we use the definition Rα (ν∥θ) ∶= R1−α (θ∥ν) . (4) Remark 1. Even though the definition of Rα (ν∥θ) is broken up into cases above, a single formula would work, if suitably interpreted. One could write Rα (ν∥θ) = 1 log ∫ (ν ′ )α (θ′ )1−α dη , for all α ∈ R/{0, 1}. α(α − 1) S ) = ∞ on this event, In this formula, if η(ν ′ > 0, θ′ = 0) > 0 and α > 1, then because (ν ′ )α (θ′ )1−α = (θ(ν′ )α−1 we are forced to intepret Rα (ν∥θ) as being ∞. A similar argument forces us to interpret Rα (ν∥θ) as ∞ if η(ν ′ = 0, θ′ > 0) > 0 and α < 0. Rather than requiring of the reader the mental gymnastics needed to keep track of such interpretations, we prefer to break the discussion up into cases. ′ α 3 Remark 2. It is clear that Rα (ν∥θ) ≥ 0 (possibly ∞) if α > 1 or α < 0. For 0 < α < 1, an application of 1 (so p1 + 1q = 1) gives Hölder’s inequality with p ∶= α1 and q ∶= 1−α ∫{ν ′ θ′ >0} ( ν′ α ) dθ = ∫ (ν ′ )α (θ′ )1−α dη θ′ {ν ′ θ ′ >0} = ∫ (ν ′ )α (θ′ )1−α dη S ≤ (∫ ν ′ dη) (∫ θ′ dη) α = 1. S 1−α S Hence we also have Rα (ν∥θ) ≥ 0 (possibly ∞) if 0 < α < 1. Note in particular that if η(ν ′ θ′ > 0) = 0, then Rα (ν∥θ) = ∞ for all α ∈ R/{0, 1}. 3 Statement of the main result in the i.i.d. case Our main result in the i.i.d case is the following variational characterization of Rényi divergence. Theorem 1. Let α ∈ R/{0, 1} and ν, θ ∈ P(S). Then, if α > 1, we have Rα (ν∥θ) = 1 1 ( D(µ∥θ) − D(µ∥ν)) , α−1 {µ∈P(S) ∶ µ⪯ν} α (5) 1 1 D(µ∥ν)) , ( D(µ∥θ) − {µ∈P(S) ∶ µ⪯ν,µ⪯θ} α α−1 (6) sup while, if 0 < α < 1, we have Rα (ν∥θ) = and, if α < 0, we have Rα (ν∥θ) = inf 1 1 ( D(µ∥θ) − D(µ∥ν)) . α−1 {µ∈P(S) ∶ µ⪯θ} α sup (7) Further, when 0 < α < 1, one can find µ ∈ P(S), µ ⪯ ν, µ ⪯ θ, achieving the infimum on the RHS of (6), whenever {µ ∈ P(S) ∶ µ ⪯ ν, µ ⪯ θ} is nonempty. ◻ Remark 3. The case by case structure of this result is partly a consequence of the normalization chosen for the Rényi divergences (which is necessary to make Rényi divergence nonnegative) and partly a consequence of the need to apply the correct absolute continuity conditions. If it considered desirable to write a singe formula covering all cases, this can be done by considering Λα (ν∥θ) ∶= α(α − 1)Rα (ν∥θ), for α ∈ R/{0, 1}. Then one has the single formula Λα (ν∥θ) = sup {µ∈P(S) ∶ µ⪯ν or µ⪯θ} ((α − 1)D(µ∥θ) − αD(µ∥ν)) , for all α ∈ R/{0, 1}. Note, however, that the set over which the supremum is being taken need not be convex in general. This is essential to avoid encountering expressions of the form ∞ − ∞. 4 4 Discussion Atar, Chowdhary and Dupuis [1] have recently established a variational formula for exponential integrals of bounded measurable functions. This is established in two forms. For any α ∈ R/{0, 1}, ν ∈ P(S), and g ∈ B(S), eqn. (2.6) of [1] states that 1 1 log ∫ e(α−1)g dν = inf ( log ∫ eαg dθ + Rα (ν∥θ)) , θ∈P(S) α α−1 S S (8) 1 1 log ∫ eαg dθ = sup ( log ∫ e(α−1)g dν − Rα (ν∥θ)) . α α − 1 S S ν∈P(S) (9) while eqn. (2.7) of [1] states that for any α ∈ R/{0, 1}, θ ∈ P(S), and g ∈ B(S) we have It is straightforward to exhibit the equivalence of these two forms. For instance, assuming (8), let β ∶= 1−α and h ∶= −g, and conclude that for all β ∈ R/{0, 1}, ν ∈ P(S), and h ∈ B(S) we have 1 1 − log ∫ eβh dν = inf ( log ∫ e(β−1)h dθ + R1−β (ν∥θ)) , θ∈P(S) 1 − β β S S or equivalently that 1 1 log ∫ eβh dν = sup ( log ∫ e(β−1)h dθ − Rβ (θ∥ν)) , β β − 1 S S θ∈P(S) which is (9). One can similarly go in the opposite direction. We will therefore focus only on the form in (9). As observed in Remark 2.3 of [1], taking the limit as α → 1 in (9) recovers the elementary variational formula for exponential integrals of bounded measurable functions in (2). The structure of Theorem 1 is motivated by the variational characterization in (9). We will now demonstrate that Theorem 1 is at least as strong as (9) by deriving (9) from Theorem 1 and the elementary variational formula (2). First of all, we show that for any α ∈ R/{0, 1}, θ ∈ P(S), and g ∈ B(S) one can find ν ∈ P(S) achieving the supremum in (9). This proof does not depend on Theorem 1 and (2). In fact, the supremum is achieved by the choice Z1 e−g dν = dθ, where Z is the normalization factor, and it is elementary to prove this. For completeness, a proof is included in Appendix B. It remains to prove that for any α ∈ R/{0, 1}, g ∈ B(S), and θ, ν ∈ P(S), we have 1 1 log ∫ eαg dθ ≥ log ∫ e(α−1)g dν − Rα (ν∥θ) . α α−1 S S Assuming the truth of Theorem 1, and using (2), this is proved in Appendix C. 5 Proof of Theorem 1 We now prove Theorem 1. 5 (10) Consider first the case α > 1. Suppose ν ⪯̸ θ. Then the LHS of (5) is ∞. Also, in this case, we can choose µ ∈ P(S) such that µ ⪯ ν but µ ⪯̸ θ, which makes the RHS of (5) also equal to ∞. Thus we may assume that ν ⪯ θ. Given K > 0 sufficiently large, define µK ∈ P(S) by µ′K ∶= 1 (ν ′ )α (θ′ )1−α 1((ν ′ )α (θ′ )1−α ≤ K) ZK where η ∈ M(S × S) is chosen such that θ ⪯ η, and we define ν ′ ∶= ZK ∶= ∫ {(ν ′ )α (θ ′ )1−α ≤K} dν dη , θ′ ∶= dθ dη , and µ′K ∶= dµK dη . Further, (ν ′ )α (θ′ )1−α dη , and K sufficiently large means that ZK > 0. We note that µK ⪯ ν (and so µK ⪯ θ). Then 1 1 D(µK ∥θ) − D(µK ∥ν) α α−1 µ′ µ′K 1 1 = ∫ ′ ) dµK (log K′ ) dµK − (log α {µK >0} θ α − 1 ∫{µ′K >0} ν′ 1 (ν ′ )α (θ′ )1−α 1 ) dµ − ) dµK (log (log = ∫ ′ K ∫ α {µK >0} ZK (θ′ )α α − 1 {µ′K >0} ZK (ν ′ )1−α 1 = log ZK , α(α − 1) which, as K → ∞, converges to Rα (ν∥θ) = ν′ α 1 1 log ∫ ( ′ ) dθ = log ∫ (ν ′ )α (θ′ )1−α dη . α(α − 1) α(α − 1) {ν ′ θ ′ >0} θ S It remains to show that, in the case α > 1, for all ν, θ ∈ P(S) such that ν ⪯ θ, we have, for all µ ∈ P(S) such that µ ⪯ ν, the inequality Rα (ν∥θ) ≥ 1 1 D(µ∥θ) − D(µ∥ν) . α α−1 Pick η ∈ P(S) such that θ ⪯ η (so we also have ν ⪯ η and µ ⪯ η), and let ν ′ ∶= Multiplying the RHS of (11) by α(α − 1) gives (α − 1) ∫ {ν ′ θ ′ µ′ >0} log (11) dν dη , θ′ ∶= dθ dη , and µ′ ∶= dµ dη . µ′ (ν ′ )α (θ′ )1−α µ′ dµ − α log dµ = log dµ . ∫ ′′ ′ ∫ ′′ ′ θ′ ν′ µ′ {ν θ µ >0} {ν θ µ >0} On the other hand, we have α(α − 1)Rα (ν∥θ) = log ∫ {ν ′ θ ′ >0} ( ν′ α ν ′ α θ′ ) dθ ≥ log ( ) ′ dµ , ∫ ′′ ′ θ′ µ {ν θ µ >0} θ ′ so (11) follows from the concavity of the logarithm. Next, consider the case when 0 < α < 1. Pick η ∈ P(S) such that ν ⪯ η and θ ⪯ η, and let ν ′ ∶= ′ dθ . If {ν ′ θ′ > 0} =η ∅, then ∫{ν ′ θ′ >0} ( νθ′ )α dθ = 0, and so θ′ ∶= dη Rα (ν∥θ) ∶= ν′ 1 log ∫ ( ′ )α dθ = ∞ . α(α − 1) {ν ′ θ ′ >0} θ 6 dν dη and But we also have {µ ∈ P(S) ∶ µ ⪯ ν, µ ⪯ θ} = ∅, so the RHS of (6) equals ∞. We may therefore assume 1 (so 1p + 1q = 1) that η(ν ′ θ′ > 0) > 0. Now, an application of Hölder’s inequality with p ∶= α1 and q ∶= 1−α gives ∫ {ν ′ θ ′ >0} ( ν′ α ) dθ = ∫ (ν ′ )α (θ′ )1−α dη θ′ {ν ′ θ ′ >0} = ∫ (ν ′ )α (θ′ )1−α dη S ≤ (∫ ν ′ dη) (∫ θ′ dη) S S α 1−α = 1 Let µ ∈ P(S) be defined by µ′ ∶= Z1 (ν ′ )α (θ′ )1−α , where Z ∶= ∫S (ν ′ )α (θ′ )1−α dη. Note that Rα (ν∥θ) = 1 α(α−1) log Z. We have µ ⪯ ν and µ ⪯ θ, as required on the RHS of (6). Now, 1 1 D(µ∥θ) − D(µ∥ν) α α−1 1 µ′ 1 µ′ = ∫ (log ′ ) dµ − (log ) dµ α {µ′ >0} θ α − 1 ∫{µ′ >0} ν′ (ν ′ )α (θ′ )1−α 1 1 (log (log = ∫ ) dµ − ) dµ α {µ′ >0} Z(θ′ )α α − 1 ∫{µ′ >0} Z(ν ′ )1−α 1 = log Z , α(α − 1) which equals Rα (ν∥θ). It remains to show that, in the case 0 < α < 1, for all ν, θ ∈ P(S) such that η(ν ′ θ′ > 0) > 0, we have, for all µ ∈ P(S) such that µ ⪯ ν and µ ⪯ θ, the inequality Rα (ν∥θ) ≤ 1 1 D(µ∥θ) − D(µ∥ν) . α α−1 To see this, note that 1 1 α(1 − α) ( D(µ∥θ) − D(µ∥ν)) α α−1 = (1 − α)D(µ∥θ) + αD(µ∥ν) µ′ µ′ = (1 − α) ∫ (log ′ ) dµ + α ∫ (log ′ ) dµ θ ν {µ′ >0} {µ′ >0} ′ µ =∫ (log ′ α ′ 1−α ) dµ (ν ) (θ ) {µ′ >0} (ν ′ )α (θ′ )1−α ′ = ∫ f( )µ dη µ′ S ≥ f (∫ (ν ′ )α (θ′ )1−α dη) S = − log ∫ (ν ′ )α (θ′ )1−α dη S = α(1 − α)Rα (ν∥θ) . 7 (12) where f (⋅) is the negative logarithm function, which is decreasing and convex. This establishes (12). Note that we have also estabished the claim in Theorem 1 that when 0 < α < 1 one can find µ realizing the infimum in (6) whenever {µ ∈ P(S) ∶ µ ⪯ ν, µ ⪯ θ} is nonempty. It remains to consider the case where α < 0. Let β ∶= 1 − α. Then β > 1. By definition Rα (ν∥θ) = Rβ (θ∥ν). However, we have already proved that This reads Rβ (θ∥ν) = 1 1 D(µ∥θ)) . ( D(µ∥ν) − β−1 {µ∈P(S) ∶ µ⪯θ} β Rα (ν∥θ) = 1 1 D(µ∥ν)) , ( D(µ∥θ) − α−1 {µ∈P(S) ∶ µ⪯θ} α sup sup which establishes (7) in this case also and completes the proof of Theorem 1. 6 Rényi divergence rate between stationary finite state Markov chains In this section we set the stage to present analogs of the preceding results involving the Rényi divergence rates between two stationary finite state Markov chains. Extensions to general state space Markov processes in both discrete and continuous time of a form similar to those we will present for stationary finite state Markov chains no doubt exist, under suitable conditions on the transition kernel, but may be considered topics for future work. From this point onwards in this document we take S = {1, . . . , d} and F to be comprised of all the subsets of S. Let M(S × S) denote the set of Markov probability distributions on (S × S, F × F ), where ν ∈ M(S × S) if ν(i, j) ≥ 0 for all (i, j) ∈ S × S, ∑i,j∈S ν(i, j) = 1, and ν(k, ∗) = ν(∗, k) for all k ∈ S, where ν(k, ∗) ∶= ∑j∈S ν(k, j) and ν(∗, k) ∶= ∑i∈S ν(i, k). Here F × F is comprised of all the subsets of S × S. Given ν ∈ M(S × S), let Sν ∶= {k ∶ ν(k, ∗) > 0}. Sν is a subset of S, and is called the support of ν. For i ∈ Sν and j ∈ S, we define ν(j∣i) ∶= ν(i,j) ν(i,⋅) . Note that ν(j∣i) = 0 if i ∈ Sν and j ∉ Sν , and ∑j∈S ν(j∣i) = 1. For i ∉ Sν , we define ν(j∣i) = 0 for all j. This may seem strange, but is an important notational convention for the equations we are going to write. Note that ∑j∈S ν(j∣i) = 0 for i ∉ Sν . Given ν, θ ∈ M(S × S) we say ν is absolutely continuous with respect to θ, denoted ν ⪯ θ, if θ(i, j) = 0 ⇒ ν(i, j) = 0 for all (i, j) ∈ S × S. The relative entropy D(ν∥θ) of ν with respect to θ is defined by ⎧ ν(j∣i) ⎪ ⎪∑i,j∈Sν ν(i, j) log θ(j∣i) , if ν ⪯ θ, (13) D(ν∥θ) ∶= ⎨ ⎪ ∞ if ν ⪯̸ θ. ⎪ ⎩ It can be checked that D(ν∥θ) ≥ 0. We need certain basic facts about the asymptotic properties of iterated powers of square matrices with nonnegative entries. We will state these facts in narrative form. Proofs can be extracted from several books that provide standard treatments of the theory of nonnegative matrices or finite state Markov chains, see e.g. [9, Chap. 1]. Let M = [mij ] be a d × d matrix with nonnegative entries. Then the limit 1 log ∑ m(n) (i, j) , n→∞ n i,j ρ(M) ∶= lim 8 (14) exists, where m(n) (i, j) denotes the (i, j) entry of M n . We can associate to M a directed graph on the vertex set {1, . . . , d}, where we have a directed edge from i to j iff mij > 0. This graph may have self loops. Then ρ(M) = −∞ iff this directed graph does not have a directed cycle. Otherwise ρ(M) is finite. We call ρ(M) the growth rate of M. Suppose ρ(M) is finite. We say µ ∈ M(S × S) is absolutely continuous with respect to M if µ(i, j) > 0 ⇒ m(i, j) > 0 for all i, j ∈ S Let µ1 , µ2 ∈ M(S × S) be absolutely continuous with respect to M. Then so is 21 (µ1 + µ2 ). Thus there is a maximum element µ ∈ M(S × S) that is absolutely continuous with respect to M, in the sense that every other ν ∈ M(S × S) that is absolutely continuous with respect to M satisfies ν ⪯ µ. This maximum element need not be unique. Pick any such maximum element, call it τ . Let M ′ ∶= [m(i, j)1(i, j ∈ Sτ )]. Then ρ(M ′ ) = ρ(M). Let µ ∈ M(S × S), which we also think of as a nonnegative d × d matrix. The support of µ can be uniquely written as a disjoint union of subsets, called classes, Sµ = ⊍lk=1 Ck , for some l ≥ 1, such that µ(i, j) = 0 if i, j ∈ Sµ are in distinct classes, and such that, for each 1 ≤ k ≤ l, if we consider the restriction of the directed graph associated to µ to the vertices in the class Ck , then this directed graph is irreducible, in the sense that there is a directed path in the graph between any pair of vertices in Ck . Given µ ∈ M(S × S) and a d × d matrix M with nonnegative entries, we say M is compatible with µ if m(i, j) > 0 ⇔ µ(i, j) > 0. Let Sµ = ⊍lk=1 Ck be the decomposition of the support of µ into classes. For each 1 ≤ k ≤ l, the restriction of M to the coordinates in Ck defines a ∣Ck ∣ × ∣Ck ∣ irreducible matrix with nonnegative entries. This matrix has an associated Perron-Frobenius eigenvalue, which we denote by λk (M). We have λk (M) > 0 for all 1 ≤ k ≤ l. We have ρ(M) = log max1≤k≤l λk (M). Also, for each 1 ≤ k ≤ l, the restriction of M to the coordinates in Ck has a left eigenvector associated to the eigenvalue λk (M), which has all its coordinates strictly positive and is unique up to scaling, and also a right eigenvector associated to the eigenvalue λk (M), which has all its coordinates strictly positive and is unique up to scaling. Given ν ∈ M(S × S), what we mean by the stationary Markov chain defined by ν is the following: for each n ≥ 1 define a probability distribution νn on (S n , Fn ), where Fn is comprised of all subsets of S n , by setting ν1 (k) = ν(k, ∗) , for all k ∈ S , ν2 (i, j) = ν(i, j) , for all i, j ∈ S , ⋮ νn (i1 , . . . , in ) = ν(i1 , i2 ) ∏ ν(ik+1 ∣ik ) , for all (i1 , . . . , in ) ∈ S n , n−1 k=2 ⋮ . It is straightfoward to check that for all n ≥ 2 and ν, θ ∈ M(S × S) we have ν ⪯ θ ⇔ νn ⪯ θn . (15) The following fact, which will be very useful later, is easy to verify from the definitions. It holds for all ν, θ ∈ M(S × S). 1 (16) D(ν∥θ) = lim D(νn ∥θn ) , n→∞ n 9 where on the RHS of this defintion the notation D(νn ∥θn ) refers to the relative entropy between probability distributions on (S n , Fn ). We are now in a position where we can state the analog for stationary finite state Markov chains of the elementary variational formula (2). Let G = [g(i, j)] ∈ Rd×d and µ ∈ M(S × S). We have the following variational characterization of the growth rate of the exponential integral of G along the stationary Markov chain defined by µ. ρ([eg(i,j) µ(j∣i)]) = sup θ∈M(S×S) = ( ∑ g(i, j)θ(i, j) − D(θ∥µ)) (17) i,j∈S sup θ∈M(S×S) ∶ θ⪯µ ( ∑ g(i, j)θ(i, j) − D(θ∥µ)) . i,j∈S The proof is in Appendix D. The result is standard, being Varadhan’s characterization of the spectral radius of nonnegative matrices, see e.g. [3, Exer. 3.1.19]. We are also in a position to define the Rényi divergence rates between two stationary finite state Markov chains. This definition is classical, see e.g. the paper of Rached, Alajaji, and Campbell [7], which also considers the nonstationary case, and the references therein. Given ν, θ ∈ M(S × S) and α ∈ R/{0, 1}, we define the Rényi divergence rate of ν with respect to θ, denoted Rα (ν∥θ), by Rα (ν∥θ) ∶= lim n→∞ 1 Rα (νn ∥θn ) , n (18) where on the RHS of this defintion the notation Rα (νn ∥θn ) refers to the Rényi divergence between probability distributions on (S n , Fn ) defined as in (3) and (4). The proofs of the existence of the limit in (18) as well as of the properties of the Rényi divergence rate of interest to us, which are stated in the following proposition, are in Appendix E. Proposition 1. Given ν, θ ∈ M(S×S), the Rényi divergence rate, as defined in (18), satisfies the following properties: and 7 ⎧ ⎪ ⎪∞ Rα (ν∥θ) = ⎨ 1 ⎪ ρ([ν(j∣i)α θ(j∣i)1−α ]) ⎪ ⎩ α(α−1) if α > 1 and ν ⪯̸ θ , if 0 < α < 1 or if α > 1 and ν ⪯ θ , Rα (ν∥θ) = R1−α (θ∥ν) , if α < 0 . Main results in the Markov case Our first main result in the Markov case is the following variational characterization of the Rényi divergence rate, which is a direct analog of Theorem 1. Theorem 2. Let α ∈ R/{0, 1} and ν, θ ∈ M(S × S). Then, if α > 1, we have Rα (ν∥θ) = 1 1 D(µ∥ν)) , ( D(µ∥θ) − α−1 {µ∈M(S×S) ∶ µ⪯ν} α sup 10 (19) while, if 0 < α < 1, we have Rα (ν∥θ) = 1 1 D(µ∥ν)) , ( D(µ∥θ) − {µ∈M(S×S) ∶ µ⪯ν,µ⪯θ} α α−1 inf (20) and, if α < 0, we have Rα (ν∥θ) = 1 1 ( D(µ∥θ) − D(µ∥ν)) . α−1 {µ∈M(S×S) ∶ µ⪯θ} α sup (21) Further, one can find µ ∈ M(S × S) achieving the extremum on the RHS in all three cases, except in the case where 0 < α < 1 and {µ ∈ M(S × S) ∶ µ ⪯ ν, µ ⪯ θ} is empty. ◻ Our second main result in the Markov case is the following analog of the variational formula of [1]. Theorem 3. For any α ∈ R/{0, 1}, ν ∈ M(S × S), and G = [g(i, j)] ∈ Rd×d , we have 1 1 ρ([e(α−1)g(i,j) ν(j∣i)]) = inf ( ρ([eαg(i,j) θ(j∣i)]) + Rα (ν∥θ)) , θ∈M(S×S) α α−1 (22) and for any α ∈ R/{0, 1}, θ ∈ M(S × S), and G = [g(i, j)] ∈ Rd×d we have 1 1 ρ([eαg(i,j) θ(j∣i)]) = sup ( ρ([e(α−1)g(i,j) ν(j∣i)]) − Rα (ν∥θ)) . α α − 1 ν∈M(S×S) (23) It is straightforward to exhibit the equivalence of the claims in (22) and (23). This is done is Appendix F. It therefore suffices to focus only on the form in (23). It is straightforward to show that for each θ ∈ M(S × S) and G ∈ Rd×d , one can find ν ∈ M(S × S) achieving the supremum on the RHS of (23). Appendix F also contains a demonstration of this fact. A proof of Theorem 3, assuming the truth of Theorem 2, and using (17), is also provided in Appendix F. 8 Proof of Theorem 2 Suppose α > 1. If ν ⪯̸ θ, taking µ = ν on the RHS of (19) makes the RHS equal ∞, which is also the value of the LHS. We may therefore assume that ν ⪯ θ. Let M ∶= [ν(j∣i)α θ(j∣i)1−α ]. This matrix is compatible with ν. Let Sν = ⊍lk=1 Ck be the decomposition of the support of ν into classes. We may choose the indexing of the classes in such a way that ρ(M) = log λ1 (M). Let u be a 1 × d row vector whose entries are zero in the coordinates that are not in C1 , while its restriction to C1 is a nonzero left eigenvector of the restriction of M to C1 . All the entries of u in the coordinates in C1 are strictly positive. Similarly, let w be a d × 1 column vector whose entries are zero in the coordinates that are not in C1 , while its restriction to C1 is a nonzero right eigenvector of the restriction of M to C1 . All the entries of w in the coordinates in C1 will be strictly positive. For i, j ∈ S, we define 1 µ(i, j) ∶= u(i)ν(j∣i)α θ(j∣i)1−α w(j) , Z 11 where Z ∶= ∑i,j∈S u(i)ν(j∣i)α θ(j∣i)1−α w(j), which is strictly positive. Note that µ ∈ M(S × S) and µ ⪯ ν. We also have, for all i ∈ S, µ(i, ∗) ∶= ∑ µ(i, j) = j∈S 1 λ1 (M)u(i)w(i) , Z ⎧ ν(j∣i)α θ(j∣i)1−α w(j) ⎪ if i, j ∈ C1 ⎪ λ1 (M )w(i) µ(j∣i) = ⎨ ⎪ otherwise , ⎪ ⎩0 where we have used the fact that Sµ = C1 . Multiplying the RHS of (19) by α(α − 1) for this choice of µ gives so we get (α − 1)D(µ∥θ) − αD(µ∥ν) = ∑ µ(i, j) log i,j∈C1 = ∑ µ(i, j) log i,j∈C1 = log λ1 (M) , ν(j∣i)α θ(j∣i)1−α µ(j∣i) λ1 (M)w(i) w(j) which also equals α(α − 1) times the LHS of (19). This establishes the existence of µ ∈ M(S × S) satisfying µ ⪯ ν and achieving equality in (19). It remains to check that for all µ ∈ M(S × S) satisfying µ ⪯ ν we have the inequality Rα (ν∥θ) ≥ 1 1 D(µ∥θ) − D(µ∥ν) . α α−1 (24) But, in view of (15), in (5) applied to probability distributions on (S n , Fn ), for n ≥ 2, we have already proved that 1 1 Rα (νn ∥θn ) ≥ D(µn ∥θn ) − D(µn ∥νn ) . α α−1 Dividing by n, letting n → ∞, and appealing to (16) establishes (24). Next, consider the case where 0 < α < 1. If the directed graph associated to the matrix M ′ ∶= [ν(j∣i)α θ(j∣i)1−α ] has no cycles, then Rα (ν∥θ) = ∞, and {µ ∈ M(S × S) ∶ µ ⪯ ν, µ ⪯ θ} = ∅, so the RHS of (20) is also ∞, and so (20) holds in this case. We may therefore assume that {µ ∈ M(S ×S) ∶ µ ⪯ ν, µ ⪯ θ} is nonempty. Pick any τ ∈ M(S × S) that is a maximum element among all the elements of M(S × S) that are absolutely continuous with respect to M ′ . Let M ∶= [ν(j∣i)α θ(j∣i)1−α 1(i, j ∈ Sτ )]. Then ρ(M ′ ) = ρ(M). Further, M is compatible with τ . Let Sτ = ⊍lk=1 Ck be the decomposition of the support of τ into classes. We may choose the indexing of the classes in such a way that ρ(M) = log λ1 (M). Let u be a 1 × d row vector whose entries are zero in the coordinates that are not in C1 , while its restriction to C1 is a nonzero left eigenvector of the restriction of M to C1 . All the entries of u in the coordinates in C1 are strictly positive. Similarly, let w be a d × 1 column vector whose entries are zero in the coordinates that are not in C1 , while its restriction to C1 is a nonzero right eigenvector of the restriction of M to C1 . All the entries of w in the coordinates in C1 will be strictly positive. For i, j ∈ S, we define 1 µ(i, j) ∶= u(i)ν(j∣i)α θ(j∣i)1−α w(j) , Z 12 where Z ∶= ∑i,j∈S u(i)ν(j∣i)α θ(j∣i)1−α w(j), which is strictly positive. Note that µ ∈ M(S × S) and µ ⪯ τ , so µ ⪯ ν and µ ⪯ θ. We also have, for all i ∈ S, µ(i, ∗) ∶= ∑ µ(i, j) = j∈S 1 λ1 (M)u(i)w(i) , Z ⎧ ν(j∣i)α θ(j∣i)1−α w(j) ⎪ if i, j ∈ C1 ⎪ λ1 (M )w(i) µ(j∣i) = ⎨ ⎪ otherwise , ⎪ ⎩0 where we have used the fact that Sτ = C1 . Multiplying the RHS of (20) by α(1 − α) for this choice of µ gives so we get (1 − α)D(µ∥θ) + αD(µ∥ν) = ∑ µ(i, j) log i,j∈C1 = ∑ µ(i, j) log i,j∈C1 = − log λ1 (M) , µ(j∣i) ν(j∣i)α θ(j∣i)1−α w(j) λ1 (M)w(i) which also equals α(1 − α) times the LHS of (20). This establishes the existence of µ ∈ M(S × S) satisfying µ ⪯ ν and µ ⪯ θ and achieving equality in (20). It remains to check that for all µ ∈ M(S × S) satisfying µ ⪯ ν and µ ⪯ θ we have the inequality Rα (ν∥θ) ≤ 1 1 D(µ∥θ) − D(µ∥ν) . α α−1 (25) But, in view of (15), in (6) applied to probability distributions on (S n , Fn ), for n ≥ 2, we have already proved that 1 1 D(µn ∥νn ) . Rα (νn ∥θn ) ≤ D(µn ∥θn ) − α α−1 Dividing by n, letting n → ∞, and appealing to (16) establishes (25). It remains to consider the case α < 0. Let β ∶= 1 − α. Then β > 1. By definition Rα (ν∥θ) = Rβ (θ∥ν). However, we have already proved that This reads Rβ (θ∥ν) = 1 1 ( D(µ∥ν) − D(µ∥θ)) . β−1 {µ∈P(S) ∶ µ⪯θ} β Rα (ν∥θ) = 1 1 ( D(µ∥θ) − D(µ∥ν)) , α−1 {µ∈P(S) ∶ µ⪯θ} α sup sup which establishes (21) in this case also and completes the proof of Theorem 2. 9 Concluding remarks We have given a variational characterization of Rényi divergence between two arbitrary probability distributions on an arbitrary measurable space in terms of relative entropies, for all values of the parameter 13 defining the Rényi divergence. We also gave a variational characterization of the Rényi divergence rate between two stationary finite state Markov chains in terms of relative entropy rates, for all values of the parameter defining the Rényi divergence rate. A consequence of the latter development was an analog of the variational formula of [1] for stationary finite state Markov chains. While we restricted ourselves to stationary finite state Markov chains in the latter discussion, it is to be expected that there will be versions of this variational characterization of Rényi divergence rate in a much broader setting involving Markov or k-th order Markov processes in discrete time, and also in continuous time. It would also be interesting to consider to what extent such a variational characterization might generalize to the Rényi divergence rates between an arbitrary pair of stationary processes, assuming the existence of the defining limit to start with, since even the understanding of the relative entropy rate at this level of generality is somewhat limited [5]. Acknowledgments Thanks to Vivek Borkar and Payam Delgosha for their comments on a earlier draft of this document. References [1] Rami Atar, Kenny Chowdhary, and Paul Dupuis. “Robust Bounds on Risk-Sensitive Functionals via Rényi Divergence”, SIAM/ASA Journal on Uncertainty Quantification, Vol. 3, pp. 18 -33, 2015. [2] Patrick Billingsley. Probability and Measure. Second Edition, John Wiley & Sons Inc., New York, 1986. [3] Amir Dembo and Ofer Zeitouni. Large Deviations Techniques and Applications. Second Edition. Applications of Mathematics, Stochastic Modelling and Applied Probability, Vol. 38, SpringerVerlag, New York, 1998. [4] Tim van Erven and Peter Harremoës. “Rényi Divergence and Kullback-Leibler Divergence”, IEEE Transactions on Information Theory, Vol 60, No. 7, pp. 3797 -3820, 2014. [5] Robert M. Gray. Entropy and Information Theory. Second Edition, Springer Science + Business Media, New York, 2011. [6] Jingbo Liu, Thomas A. Courtade, Paul Cuff, and Sergio Verdú. “Brascamp-Lieb Inequality and its Reverse: An Information Theoretic View”, Proceedings of the 2016 IEEE International Symposium on Information Theory, IEEE Press, pp. 1048 -1052, 2016. [7] Ziad Rached, Fady Alajaji, and L. Lorne Campbell. “R’enyi’s Divergence and Entropy Rates for Finite Alphabet Markov Sources”, IEEE Transactions on Information Theory, Vol. 47, No. 4, pp. 1553 -1561, 2001. [8] Igal Sason. “On the Rényi Divergence, Joint Range of Relative Entropies, and a Channel Coding Theorem”, IEEE Transactions on Information Theory, Vol. 62, No. 1, pp. 23 -34, 2016. 14 [9] E. Seneta. Non-negative Matrices and Markov Chains. Revised Printing, Springer Science + Business Media Inc., New York, 2006. [10] Ofer Shayevitz. On Rényi Measures and Hypothesis Testing, Proceedings of the 2011 IEEE International Symposium on Information Theory, IEEE Press, pp. 894 -898, 2011. [11] Ofer Shayevitz. “A Note on the Characterization of Rényi Measures and its Relation to Composite Hypothesis Testing”, ArXiv:1012.4401v2 [cs.IT], 11 March 2016. A Proof of the elementary variational formula in (2) The second equality in (2) follows from the fact that D(θ∥µ) = ∞ if θ ⪯̸ µ. Given µ ∈ P(S) and g ∈ B(S), define θ ∈ P(S) by dθ = Z1 eg dµ, where Z ∶= ∫S eg dµ. Note that θ ⪯ µ. Then eg ∫ gdθ − D(θ∥µ) = ∫ gdθ − ∫ log ( Z ) dθ = log Z , S S S which also equals of the LHS of (2). It remains to show that for all θ ⪯ µ we have log ∫ eg dµ ≥ ∫ gdθ − D(θ∥µ) . S Let θ′ ∶= dθ dµ . S We have log ∫ eg dµ ≥ log ∫ S eg dθ ≥ ∫ (g − log θ′ ) dθ = ∫ gdθ − D(θ∥µ) , {θ ′ >0} S {θ ′ >0} θ ′ where the second step is justified by the concavity of the logarithm. This completes the proof. B ◻ Proof that the supremum in (9) is achieved Given θ ∈ P(S) and g ∈ B(S), let ν ∈ P(S) be defined by and θ are mutually absolutely continuous. Thus, for all α > 0, α ≠ 1, we have Rα (ν∥θ) = 1 −g Z e dν = dθ, where Z ∶= 1 . ∫ eg dθ Note that ν 1 1 1 log ∫ Z α eαg dθ = log Z + log ∫ eαg dθ . α(α − 1) α−1 α(α − 1) S S On the other hand 1 1 1 1 log ∫ e(α−1)g dν − log ∫ eαg dθ = log ∫ Zeαg dθ − log ∫ eαg dθ α−1 α α−1 α S S S S 1 1 log Z + log ∫ eαg dθ , = α−1 α(α − 1) S which is the same. 15 Suppose now that α < 0. Let β ∶= 1 − α. Then β > 1. For any θ ∈ P(S) and g ∈ B(S), let ν ∈ P(S) be defined by Z1 e−g dν = dθ. Then W1 e−h dθ = dν, where h ∶= −g and W = ∫ e1h dν = Z1 . We have then already S proved that Rα (ν∥θ) ∶= Rβ (θ∥ν) 1 1 log W + log ∫ eβh dν = β−1 β(β − 1) S 1 1 = log Z + log ∫ e(α−1)g dν α α(α − 1) S 1 1 = log Z + log ∫ eαg dθ , α−1 α(α − 1) S which completes the proof. ◻ C Proof of (10) Consider first the case α > 1. We may then assume that ν ⪯ θ, since otherwise the right hand side of (10) is −∞. From (2), we have, for all µ ∈ P(S) such that µ ⪯ ν that 1 1 eαg dθ ≥ ∫ gdµ − D(µ∥θ) . ∫ α S α S From (5) we have Rα (ν∥θ) ≥ 1 1 D(µ∥θ) − D(µ∥ν) , α α−1 which means that 1 1 eαg dθ ≥ ∫ gdµ − D(µ∥ν) − Rα (ν∥θ) . ∫ α S α−1 S Taking the supremum over µ ⪯ ν on the RHS of the preceding equation and using (2) gives 1 1 eαg dθ ≥ log ∫ e(α−1)g dν − Rα (ν∥θ) , ∫ α S α−1 S which was to be shown. Next, suppose 0 < α < 1. Given g ∈ B(S) and ν, θ ∈ P(S), if {ν ′ θ′ > 0} =η ∅ for some (and hence dθ ′ every) η ∈ P(S) such that ν ⪯ η and θ ⪯ η (where ν ′ ∶= dν dη and θ ∶= dη ), then Rα (ν∥θ) = ∞, and so (10) is true. Otherwise, we can find µ ∈ P(S) such that µ ⪯ ν and µ ⪯ θ. We know from the elementary variational formula (2) that for every µ ∈ P(S) we have 1 1 log ∫ eαg dθ ≥ ∫ gdµ − D(µ∥θ) , α α S S and where h ∶= −g. Hence 1 1 log ∫ e(1−α)h dν ≥ ∫ hdµ − D(µ∥ν) , 1−α 1−α S S 1 1 1 1 log ∫ eαg dθ + log ∫ e(1−α)h dν ≥ − ( D(µ∥θ) − D(µ∥ν)) . α 1−α α α−1 S S 16 But, from Theorem 1, we know that there exists µ ∈ P(S) for which the RHS of the preceding equation equals −Rα (ν∥θ). This shows that 1 1 log ∫ eαg dθ ≥ log ∫ e(1−α)h dν − Rα (ν∥θ) , α α−1 S S which establishes (10) in this case. It remains to consider the case α < 0. Let β ∶= 1 − α, so β > 1. We have already proved that 1 1 log ∫ eβh dν ≥ log ∫ e(β−1)h dθ − Rβ (θ∥ν) , β β−1 S S where h ∶= −g. Observing that Rβ (θ∥ν) = Rα (ν∥θ), this can be rewritten as 1 1 log ∫ e(α−1)g dν ≥ − log ∫ eαg dθ − Rα (ν∥θ) , 1−α α S S which is (10) in this case, and completes the proof. ◻ D Proof of (17) The second equality in (17) follows from the fact that D(θ∥µ) = ∞ if θ ⪯̸ µ. Given µ ∈ M(S × S) and G = [g(i, j)] ∈ Rd×d , the matrix M ∶= [eg(i,j) µ(j∣i)] has nonnegative entries and is compatible with µ, so ρ(M), i.e. the LHS of (17), is finite. Let Sµ = ⊍lk=1 Ck be the decomposition of the support of µ into classes. We may choose the indexing of the classes in such a way that ρ(M) = log λ1 (M). Let u be a 1 × d row vector whose entries are zero in the coordinates that are not in C1 , while its restriction to C1 is a nonzero left eigenvector of the restriction of M to C1 . Note that all the entries of u in the coordinates in C1 are strictly positive. Similarly, let w be a d × 1 column vector whose entries are zero in the coordinates that are not in C1 , while its restriction to C1 is a nonzero right eigenvector of the restriction of M to C1 . All the entries of w in the coordinates in C1 will be strictly positive. For i, j ∈ S, we define 1 θ(i, j) ∶= u(i)eg(i,j) µ(j∣i)w(j) , Z where Z ∶= ∑i,j∈S u(i)eg(i,j) µ(j∣i)w(j), which is strictly positive. Note that θ ∈ M(S × S) and θ ⪯ µ. We also have, for all i ∈ S, θ(i, ∗) ∶= ∑ θ(i, j) = j∈S 1 λ1 (M)u(i)w(i) , Z ⎧ eg(i,j) µ(j∣i)w(j) ⎪ ⎪ λ1 (M )w(i) θ(j∣i) = ⎨ ⎪ ⎪ ⎩0 where we have used the fact that Sθ = C1 . so we get 17 if i, j ∈ C1 otherwise , We may now compute ∑ g(i, j)θ(i, j) − D(θ∥µ) = ∑ g(i, j)θ(i, j) − ∑ θ(i, j) log ( i,j∈C1 i,j∈S i,j∈S = eg(i,j) w(j) ) λ1 (M)w(i) ∑ w(i)θ(i, j) − ∑ θ(i, j)w(j) + log λ1 (M) i,j∈C1 i,j∈C1 = ρ(M) , which also equals of the LHS of (17). This establishes that for each µ ∈ M(S×S) and G = [g(i, j)] ∈ Rd×d there exists θ ∈ M(S × S) achieving equality in (17). It remains to show that for all θ ∈ M(S × S) such that θ ⪯ µ we have ρ([eg(i,j) µ(j∣i)]) ≥ ∑ g(i, j)θ(i, j) − D(θ∥µ) . (26) i,j∈S But, using (2) applied to the probability distribution µn on (S n , Fn ), for n ≥ 2, with g(i1 , . . . , in ) ∶= n−1 ∑k=1 g(ik , ik+1 ), we have already proved that log ∑ µ(i1 , ∗) ∏ eg(ik ,ik+1 ) µ(ik+1 ∣ik ) ≥ ∑ ∑ g(ik , ik+1 )µn (i1 , . . . , in ) − D(θn ∥µn ) . i1 ,...,in n−1 n−1 k=1 i1 ,...,in k=1 Divide both sides by n and take the limit as n → ∞. Appealing to (16) and the definition of the growth rate in (14) proves (26). This completes the proof of (17). ◻ E Proof of the existence of the limit in (18), and of Proposition 1 Suppose α > 1 and ν ⪯̸ θ. Then νn ⪯̸ θn for all n ≥ 2 and so the limit on the RHS of (18) exists and equals ∞, as claimed in Proposition 1. If α > 1 and ν ⪯ θ, then νn ⪯ θn for all n ≥ 2, and so α n−1 n−1 1 Rα (νn ∥θn ) = ∑ (ν(i1 , i2 ) ∏ ν(ik+1 ∣ik )) (θ(i1 , i2 ) ∏ θ(ik+1 ∣ik )) α(α − 1) i1 ,...,in k=2 k=2 1−α . This is also the formula for Rα (νn ∥θn ) when 0 < α < 1, irrespective of whether ν ⪯ θ or not. It follows from the definition of the growth rate in (14) that the limit on the RHS of (18) exists and equals 1 α 1−α ]), as claimed in Proposition 1. α(α−1) ρ([ν(j∣i) θ(j∣i) Finally, suppose α < 0. Let β ∶= 1 − α. Then we have β > 1. We have therefore already proved that limn→∞ n1 Rβ (θn ∥νn ) exists and equals R1−α (θ∥ν), as given in Proposition 1. But Rβ (θn ∥νn ) equals Rα (νn ∥θn ). Therefore the limit on the RHS of (18) exists, and since this is what we call Rα (ν∥θ) it must be the case that Rα (ν∥θ) equals R1−α (θ∥ν), as claimed in Proposition 1. This completes the proof. ◻ F Proof of Theorem 3 assuming the truth of Theorem 2 and using (17), and proofs of the two claims about (23) We first verify the truth of the two claims about (23) which were made just after the statement of Theorem 3. 18 To exhibit the equivalence of the two forms (22) and (23) appearing in Theorem 3, assume, for instance, the truth of (22). Let β ∶= 1 − α and H = [h(i, j)] = −G, and conclude that for all β ∈ R/{0, 1}, ν ∈ M(S × S), and H ∈ Rd×d we have 1 1 ρ([e(β−1)h(i,j) θ(j∣i)]) + R1−β (ν∥θ)) , − ρ([eβh(i,j)ν(j∣i)]) = inf ( θ∈M(S×S) 1 − β β or equivalently that 1 1 ρ([eβh(i,j) ν(j∣i)]) = sup ( ρ([e(β−1)h(i,j) θ(j∣i)]) − Rβ (θ∥ν)) , β β − 1 θ∈M(S×S) which is (23). One can similarly go in the opposite direction. To verify that the supremum on the RHS of (23) is achieved, given θ ∈ M(S×S), G = [g(i, j)] ∈ Rd×d , and α ∈ R/{0, 1}, observe that N ∶= [eαg(i,j) θ(j∣i)] is compatible with θ. Let Sµ = ⊍lk=1 Ck be the decomposition of the support of θ into classes. We may choose the indexing of the classes in such a way that ρ(N) = log λ1 (N). Let M ∶= [eg(i,j) θ(j∣i)]. Observe that M is also compatible with θ. Let u be a 1 × d row vector whose entries are zero in the coordinates that are not in C1 , while its restriction to C1 is a nonzero left eigenvector of the restriction of M to C1 . All the entries of u in the coordinates in C1 are strictly positive. Similarly, let w be a d × 1 column vector whose entries are zero in the coordinates that are not in C1 , while its restriction to C1 is a nonzero right eigenvector of the restriction of M to C1 . All the entries of w in the coordinates in C1 will be strictly positive. For i, j ∈ S, we define ν(i, j) ∶= 1 u(i)eg(i,j) µ(j∣i)w(j) , Z where Z ∶= ∑i,j∈S u(i)eg(i,j) µ(j∣i)w(j), which is strictly positive. Note that ν ∈ M(S × S) and ν ⪯ θ. We also have, for all i ∈ S, ν(i, ∗) ∶= ∑ ν(i, j) = j∈S 1 λ1 (M)u(i)w(i) , Z ⎧ eg(i,j) θ(j∣i)w(j) ⎪ if i, j ∈ C1 ⎪ λ1 (M )w(i) ν(j∣i) = ⎨ ⎪ otherwise , ⎪ ⎩0 where we have used the fact that Sν = C1 . We now note that ⎧ eαg(i,j) θ(j∣i)w(j)α ⎪ if i, j ∈ C1 ⎪ λ1 (M )α w(i)α α 1−α ν(j∣i) θ(j∣i) =⎨ ⎪ otherwise . ⎪ ⎩0 so we get Then we have ρ([ν(j∣i)α θ(j∣i)1−α ]) = ρ([eαg(i,j) θ(j∣i)1(i, j ∈ C1 )]) − αρ(M) , = ρ([eαg(i,j) θ(j∣i)] − αρ(M) , = ρ(N) − αρ(M) 19 (27) Here the first step can be seen by observing that the w(i)α terms for i ∈ C1 cancel each other out by successive cancellation in the defintion of the growth rate as a limit. Equality in the second step depends on the fact that we have chosen C1 such that ρ(N) = log λ1 (N). We also note that ⎧ eαg(i,j) θ(j∣i)w(j) ⎪ if i, j ∈ C1 ⎪ λ1 (M )w(i) (α−1)g(i.j) e ν(j∣i) = ⎨ ⎪ otherwise , ⎪ ⎩0 so we have ρ([e(α−1)g(i.j) ν(j∣i)]) = ρ([ eαg(i,j) θ(j∣i)w(j) 1(i, j ∈ C1 )]) , λ1 (M)w(i) = ρ([eαg(i,j) θ(j∣i)1(i, j ∈ C1 )]) − ρ(M) , = ρ([eαg(i,j) θ(j∣i)]) − ρ(M) , = ρ(N) − ρ(M) . (28) Here the first step can be seen by observing that the w(i) terms for i ∈ C1 cancel each other out by successive cancellation in the defintion of the growth rate as a limit, and equality in the second step depends on the fact that we have chosen C1 such that ρ(N) = log λ1 (N). Since ν ⪯ θ, we have 1 ρ([ν(j∣i)α θ(j∣i)1−α ]) . Rα (ν∥θ) = α(α − 1) Multiplying (27) through by 1 α(α−1) and using (28) gives Rα (ν∥θ) = 1 1 ρ([e(α−1)g(i.j) ν(j∣i)]) − ρ(N) , α−1 α which demonstrates that ν works to show what what was claimed. In order to prove Theorem 3, it remains to show that for every θ, ν ∈ M(S × S), G = [g(i, j)] ∈ Rd×d , and α ∈ R/{0, 1}, we have 1 1 ρ([eαg(i,j) θ(j∣i)]) ≥ ρ([e(α−1)g(i,j) ν(j∣i)]) − Rα (ν∥θ) . α α−1 (29) We prove this, assuming the truth of Theorem 2, using (17). The proof is almost a verbatim copy of that in Appendix C, except that we are now dealing with the case of stationary finite state Markov chains rather than with the i.i.d. case. Consider first the case α > 1. We may then assume that ν ⪯ θ, since otherwise the right hand side of (29) is −∞. From (17), we have, for all µ ∈ M(S × S) such that µ ⪯ ν that 1 1 ρ([eαg(i,j) θ(j∣i)]) ≥ ∑ g(i, j)µ(i, j) − D(µ∥θ) . α α i,j∈S From (19) we have Rα (ν∥θ) ≥ 1 1 D(µ∥θ) − D(µ∥ν) , α α−1 20 which means that 1 1 ρ([eαg(i,j) θ(j∣i)]) ≥ ∑ g(i, j)µ(i, j) − D(µ∥ν) − Rα (ν∥θ) . α α−1 i,j∈S Taking the supremum over µ ⪯ ν on the RHS of the preceding equation and using (17) gives 1 1 ρ([eαg(i,j) θ(j∣i)]) ≥ ρ([e(α−1)g(i,j) ν(j∣i)]) − Rα (ν∥θ) , α α−1 which was to be shown. Next, suppose 0 < α < 1. There is no µ ∈ M(S × S) such that µ ⪯ ν and µ ⪯ θ precisely when the directed graph associated to [ν(i, j)α θ(i, j)1−α ] has no cycles, and in this case Rα (ν∥θ) = ∞, so (29) is true. Therefore, we may assume that we can find µ ∈ P(S) such that µ ⪯ ν and µ ⪯ θ. We know from (17) that for every µ ∈ M(S × S) we have 1 1 ρ([eαg(i,j) θ(j∣i)]) ≥ ∑ g(i, j)µ(i, j) − D(µ∥θ) , α α i,j∈S and 1 1 ρ([e(1−α)h(i,j) ν(j∣i)]) ≥ ∑ h(i, j)µ(i, j) − D(µ∥ν) , 1−α 1−α i,j∈S where h ∶= −g. Hence 1 1 1 1 ρ([eαg(i,j) θ(j∣i)]) + ρ([e(1−α)h(i,j) ν(j∣i)]) ≥ − ( D(µ∥θ) − D(µ∥ν)) . α 1−α α α−1 But, from Theorem 2, we know that there exists µ ∈ M(S × S) for which the RHS of the preceding equation equals −Rα (ν∥θ). This shows that 1 1 ρ([eαg(i,j) θ(j∣i)]) ≥ ρ([e(1−α)h(i,j) ν(j∣i)]) − Rα (ν∥θ) , α α−1 which establishes (29) in this case. It remains to consider the case α < 0. Let β ∶= 1 − α, so β > 1. We have already proved that 1 1 ρ([eβh(i,j)ν(j∣i)]) ≥ ρ([e(β−1)h(i,j) θ(j∣i)]) − Rβ (θ∥ν) , β β−1 where h ∶= −g. Observing that Rβ (θ∥ν) = Rα (ν∥θ), this can be rewritten as 1 1 ρ([e(α−1)g(i,j) ν(j∣i)]) ≥ − ρ([eαg(i,j) θ(j∣i)]) − Rα (ν∥θ) , 1−α α which is (29) in this case, and completes the proof. 21 ◻
10math.ST
On the influence of Dice loss function in multi-class organ segmentation of abdominal CT using 3D fully convolutional networks Chen SHEN1 , Holger R. ROTH1 , Hirohisa ODA2 , Masahiro ODA1 , Yuichiro HAYASHI1 , Kazunari MISAWA3 , and Kensaku MORI1 1 arXiv:1801.05912v1 [cs.CV] 18 Jan 2018 2 Graduate School of Informatics, Nagoya University Graduate School of Information Science, Nagoya University 3 Aichi Cancer Center Hospital Abstract Deep learning-based methods achieved impressive results for the segmentation of medical images. With the development of 3D fully convolutional networks (FCNs), it has become feasible to produce improved results for multi-organ segmentation of 3D computed tomography (CT) images. The results of multi-organ segmentation using deep learning-based methods not only depend on the choice of networks architecture, but also strongly rely on the choice of loss function. In this paper, we present a discussion on the influence of Dice-based loss functions for multi-class organ segmentation using a dataset of abdominal CT volumes. We investigated three different types of weighting the Dice loss functions based on class label frequencies (uniform, simple and square) and evaluate their influence on segmentation accuracies. Furthermore, we compared the influence of different initial learning rates. We achieved average Dice scores of 81.3%, 59.5% and 31.7% for uniform, simple and square types of weighting when the learning rate is 0.001, and 78.2%, 81.0% and 58.5% for each weighting when the learning rate is 0.01. Our experiments indicated a strong relationship between class balancing weights and initial learning rate in training. Key words: multi-organ segmentation, Dice loss function, fully convolutional network, computed tomography 1 Introduction Multi-class organ segmentation of abdominal computed tomography (CT) images is important for medical image analysis. Abdominal organs can have large individual differences due to the shape and size variations, which makes development of automated segmentation methods challenging. With the rapid development of medical image devices and the increase in routinely acquired images, fully automatic multi-organ segmentation of medical images becomes especially important. The segmentation results can be widely utilized in computer-aided diagnosis and computer-assisted surgery. Hence, much research [1][2][3] has focused on automated organ segmentation from CT volumes. However, achieving high segmentation accuracy is always challenging. One of the reasons is the low contrast to surrounding tissues which makes segmentations difficult. Failure of segmentation results in a reduction of diagnostic quality. Therefore, improving the segmentation accuracy is an active area of research. Recently, deep learning-based methods achieved impressive segmentation results on medical images. For example, convolutional neural networks (CNNs) make it easier to train models on a large datasets. Especially, 3D fully convolutional networks (FCNs) improved the accuracy of multi-organ segmentation from CT volumes. It is well-known that network architecture influences the result of segmentation. Furthermore, the segmentation accuracy relies on the choice of loss function. For this research, we developed a 3D FCN which can learn to automatically segment organs on CT volumes from a set of CT and labelled images, and discuss the influence of loss functions and initial learning 1 rates. The paper is organized as the follows. In Section 2, we describe the methods we utilized in detail. Section 3 gives the experiments and results, and we provide a discussion in Section 4. 2 2.1 Methods Overview FCNs have the ability to train models for segmentation from images in end-to-end fashion. With the development of FCNs, improved segmentation results have been reported[4]. In this paper, we utilize a 3D U-Net architecture for multi-organ segmentation, similar to the one proposed by Çiçek et al[5]. This network architecture is a type of 3D FCN designed for end-to-end image segmentation. We investigated three different types of weighting models for the Dice loss functions in order to evaluate their performances and compared segmentation accuracy of each organ for the different situations. In addition, we performed training on the same dataset with different initial learning rates µ, and compared how these parameters influence the segmentation results. 2.2 3D fully convolutional network With the improvement of CNN architectures and GPU memory, we are able to train a larger number of annotated 3D medical CT volumes to improve the segmentation results. We utilize a training set of abdominal CT volumes and labels S = (In , Ln ), n = 1, ..., N , where In represents CT volumes, Ln represents the ground truth label volumes. We define n as the index of volumes and N is the number of training volumes. In this work, we utilize a 3D U-Net type FCN with constant input size that is trained by randomly cropping subvolumes from the training data. Hence, we can obtain a trained model, which can segment the full 3D volume through subvolume prediction in testing. We chose an input size of 646464 that allows to use mini-batch sizes of three subvolumes sampled from different training patients. 2.3 Dice loss function The Dice similarity coefficient (DSC) measures the amount of agreement between two image regions[6]. It is widely used as a metric to evaluate the segmentation performance with the given ground truth in medical images. The DSC is defined in (1), we utilize | | to indicate the number of foreground voxels in the ground truth and segmentation images[7]. DSC = 2|S ∩ R| |S| + |R| (1) where S is the segmentation result and R is the corresponding ground truth label. This function however is not differentiable and hence cannot directly be used as a loss function in deep learning. Hence, continuous versions of the Dice score have been proposed that allow differentiation and can be used as loss in optimization schemes based on stochastic gradient descent[8]: P 2 N si ri LDSC = − PN i PN (2) i si + i ri where si and ri represent the continuous values of the softmax prediction map ∈ [0, . . . , 1] and the ground truth at each voxel i, respectively. Using the formulation in 2, we investigate three types of weighting based on class voxel frequencies in the whole training dataset. We defined three types of weighting factors Wu , Ws and Wq for uniform, simple and square weighting. The equations are as follows: Wu = 1 (3) Ws = N L|Rl | +  2 (4) (a) Initial learning rate µ = 0.001, Wu (b) Initial learning rate µ = 0.001, Ws (c) Initial learning rate µ = 0.001, Wq (d) Initial learning rate µ = 0.01, Wu (e) Initial learning rate µ = 0.01, Ws (f) Initial learning rate µ = 0.01, Wq Figure 1: Learning curves for different models. Wq = N L|Rl |2 +  (5) here, L is the number of labels and |Rl | is the number voxels in class l. We set  = 1 in this experiment in order to avoid division by zero. We calculate the multi-class Dice loss function using 6: L LM D = 1X wl LDSC L (6) l with wl indicating the weight for class l, computed from one of the weighting types Wu , Ws , Wq , . 3 Experiments and results We used 377 abdominal clinical CT volumes in portal venous phase acquired as pre-operative scans for gastric surgery planning. Each CT volume contains 460-1177 slices of 512 × 512 pixels. We downsampled the volumes with a factor of four in all experiments. We evaluated our models using a random subset of 340 training and 37 testing patients. The number of labelled abdominal organs is seven, which includes the artery, portal vein, liver, spleen, stomach, gallbladder and pancreas. Our network produced eight prediction maps as output (including the seven organ classes plus the background). Ground truth was established manually using semi-automated segmentation tools like graph-cuts and region growing using the Pluto software[10]. We implement our models in Keras[11] using the TensorFlow backend. We compared the Dice similarity scores of seven organs and background of the three different weight types: uniform, simple and square. Furthermore, we compared different initial learning rates of µ1 = 0.001 and µ2 = 0.01 using Adam[9] as optimization method. Training of each model was performed for 10,000 iterations which takes about two days on a NVIDIA GeForce GTX 1080 GPU with 8GB memory. The segmentation results of the models with different weightings and learning rates are shown in Table 1. The average Dice score performances were 88.3% for uniform, 74.2% for simple and 44.0% for square weightingwhen the initial learning rate µ1 =0.001. When the initial learning rate was µ2 =0.01, the Dice score for uniform, simple and square is 86.4%, 88.9% and 78.9%, respectively. 3 Table 1: Average Dice scores of different type of weighting schemes (uniform, simple, square). µ1 and µ2 is the value of initial learning rate. We define µ1 =0.001 and µ2 =0.01 in this experiment. The highest accuracies for each organ are written in bold text. Dice type background artery vein liver spleen stomach gallbladder pancreas AVG MAX MIN Wu , µ1 = 0.001 99.9% 80.4% 78.6% 96.5% 94.7% 96.3% 77.3% 82.7% 88.3% 99.9% 77.3% Ws , µ1 = 0.001 99.1% 63.6% 68.8% 73.4% 71.6% 64.1% 74.7% 78.0% 74.2% 99.1% 63.6% Wq , µ1 = 0.001 79.2% 63.4% 69.1% 10.1% 0% 6.9% 54.3% 69.1% 44.0% 79.2% 0.0% Wu , µ2 = 0.01 99.8% 79.5% 75.1% 95.6% 92.0% 93.9% 73.2% 82.4% 86.4% 99.8% 73.2% Ws , µ2 = 0.01 99.8% 89.2% 79.3% 96.3% 93.9% 96.1% 80.8% 84.7% 88.9% 99.8% 79.3% Wq , µ2 = 0.01 99.6% 72.4% 73.0% 87.7% 91.6% 82.4% 54.2% 70.3% 78.9% 99.6% 54.2% Figure 1 depicts the learning curve for comparison of different weighting types. Figures 2, 3 and 4 show the segmentation results of each weighting scheme. 4 Discussion The results of our experiments indicate that the weighting of the Dice loss function and the initial learning rate both affected the performance of multi-organ segmentation in CT volumes. For the type of Dice loss function, the results showed clearly in Table 1 that when the learning rate was 0.001, the uniform model performed the highest on average DSC of eight classes in the CT volumes. It achieved impressive result for liver, spleen and stomach with average DSC of 93.7%, 91.6% and 91.1%, respectively. For other organs, although the results were not the best, they were still acceptable. The simple and square models performed much worse than uniform on liver, spleen, and stomach segmentation. However, the simple model performed best when the learning rate was increased to 0.01. The artery, portal vein, and pancreas performed best on this case, and the DSC of liver, spleen, stomach and gallbladder are also higher. As for the uniform weights, it kept a stable accuracy. For the learning rate, the results also can be seen from Table 1. As we increased the learning rate from 0.001 to 0.01, the performances of simple and square models improved markedly. Especially for the simple type, the average DSC was raised from 59.5% to 81.0%. Furthermore, the results on artery, portal vein, and pancreas showed the best with the simple model when the initial learning rate was 0.01. Also, the square model performed much better on segmenting the liver, spleen, and stomach. Therefore, we can conclude that a higher learning rate was beneficial for simple and square type models in multi-organ segmentation. We inferred that the DSC of the square model could be even higher after the same number of iterations, if the learning rate was set to 0.1. Moreover, the learning curves showed in Figure 1 indicated that the training converges to stable results for the uniform weighting when the iteration is 10,000. However, for the simple and square weighting model, we can predict that the performance could continue to grow if training would be continued. We assume that a convergence would be achieved after 20,000 iterations. Utilizing three types of weighting and two different learning rates, the relationship between weighting type and learning rate can be observed from these experiments. We assume that the iteration number will also influence the results, but might result in overfitting. Our experiments indicate that when introducing a class balancing weight, the initial learning rates and number of iterations have to be adjusted appropriately in order to achieve improvements in the segmentation accuracy. 4 (a) Ground truth of CT image (b) Learning rate µ = 0.001 (c) Learning rate µ = 0.01 (d) Ground truth of 3D rendering (e) Learning rate µ = 0.001 (f) Learning rate µ = 0.01 Figure 2: Segmentation results for uniform type weight. The images in top row are CT axial slices and in the bottom row are 3D surface renderings of the segmentation results. 5 Conclusion We employed three types of weighting models for a Dice-based loss function and evaluated the segmentation accuracy for multiple organs with two different initial learning rates. These different types of weight models shows the influence on the multi-organ segmentation in CT volumes using FCN. The results depict that the class balancing weights and initial learning rates influence the performance of multi-organ segmentation in CT volumes. While we did not apply any data augmentation schemes, our results indicate no cases of strong overfitting, which points to a sufficiently large training dataset. Still, for future work, we can augment the original images and study how augmentation affects the segmentation accuracy. Moreover, we can match the best type of weighting and learning rate for single organs to achieve improvements in segmentation accuracy by combining the results from different models. With the availability of higher GPU memory and even larger datasets, the performance for automatic multi-organ segmentation is likely to increase. 6 Acknowledgments This work was supported by MEXT KAKENHI (26108006, 26560255, 25242047, 17H00867, 15H01116) and the JPSP International Bilateral Collaboration Grant. 5 (a) Ground truth of CT image (d) Ground truth of 3D rendering (b) Learning rate µ = 0.001 (c) Learning rate µ = 0.01 (e) Learning rate µ 0.001 (f) Learning rate µ = 0.01 = Figure 3: Segmentation results for simple type weight. The images in top row are CT axial slices and in the bottom row are 3D surface renderings of the segmentation results. 6 (a) Ground truth of CT image (b) Learning rate µ = 0.001 (c) Learning rate µ = 0.01 (d) Ground truth of 3D rendering (e) Learning rate µ = 0.001 (f) Learning rate µ = 0.01tab Figure 4: Segmentation results for square type weight. The images in top row are CT axial slices and in the bottom row are 3D surface renderings of the segmentation results. 7 References [1] H. R. Roth, M. Oda, N. Shimizu, H. Oda, Y. Hayashi, T. Kitasaka, M. Fujiwara, K. Misawa, and K. MoriTowards dense volumetric pancreas segmentation in CT using 3D fully convolutional networks, SPIE. Medical Imaging, 2018.(accepted) [2] H. R. Roth, M. Oda, Y. Hayashi, H. Oda, and K. Mori, Multi–organ segmentation in abdominal CT using 3D fully convolutional networks, International Journal of Computer Assisted Radiology and Surgery, Vol.12, Sup.1, pp.S55–S57, 2017. [3] O. Ronneberger, P. Fischer, and T. Brox, U–Net: Convolutional Networks for Biomedical Image Segmentation, International Conference on Medical Image Computing and Computer-Assisted Intervention, vol.9351, pp.234–241, 2015 [4] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation, Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp.3431–3440, 2015. [5] Ç Özgün, A. Abdulkadir, S. S. Lienkamp, T. Brox, and O. Ronneberger, 3D U–Net: Learning Dense Volumetric Segmentation from Sparse Annotation, MICCAI 2016, Part II, LNCS 9901, pp.424–432, 2016. [6] Sudre, C. H., Li, W., Vercauteren, T., Ourselin, S., and Cardoso, M. J. Generalized Dice overlap as a deep learning loss function for highly unbalanced segmentations, Deep Learning in Medical Image Analysis and Multimodal Learning for Clinical Decision Support. DLMIA 2017, ML–CDS 2017, Lecture Notes in Computer Science, vol.10553, pp.240–248, 2017. [7] A. A. Novikov, D. Lenis, D. Major, J. Hladuvka, M. Wimmer, and K. Bühler, Fully Convolutional Architectures for Multi-Class Segmentation in Chest Radiographs, Computing Research Repository, vol.abs/1701.08816, 2017. [8] F. Milletari, N. Navab, and S. A. Ahmadi, V–net: Fully convolutional neural networks for volumetric medical image segmentation, 3D Vision (3DV), 2016 Fourth International Conference on. IEEE, 2016. [9] D. P. Kingma, and J. L. Ba, Adam: A method for stochastic optimization, the 3rd International Conference for Learning Representations, 2015. [10] Pluto, Computer aided diagnosis system for multiple organ and diseases, Mori laboratory Nagoya University, Japan, http://pluto.newves.org. [11] Keras, The python Deep Learning library, http://keras.io. 8
1cs.CV
Early prediction of the duration of protests using probabilistic Latent Dirichlet Allocation and Decision Trees Satyakama Paul∗ , Madhur Hasija† and Tshilidzi Marwala‡ arXiv:1711.00462v1 [cs.SI] 18 Sep 2017 ∗ Oracle India Pvt. Ltd, Prestige Tech Park, Bengaluru, India - 560103 Email: [email protected] † WNS Global Pvt. Ltd, Whitefield, Bengaluru, India - 560048 Email: [email protected] ‡ University of Johannesburg, Johannesburg, South Africa - 2006 Email: [email protected] Abstract—Protests and agitations are an integral part of every democratic civil society. In recent years, South Africa has seen a large increase in its protests. The objective of this paper is to provide an early prediction of the duration of protests from its free flowing English text description. Free flowing descriptions of the protests help us in capturing its various nuances such as multiple causes, courses of actions etc. Next we use a combination of unsupervised learning (topic modeling) and supervised learning (decision trees) to predict the duration of the protests. Our results show a high degree (close to 90%) of accuracy in early prediction of the duration of protests. We expect the work to help police and other security services in planning and managing their resources in better handling protests in future. I. I NTRODUCTION Protests and agitations are an integral part of any democratic civil society. Not to be left behind when compared with the rest of the world, South Africa in recent years has also seen a massive increase in public protests. The causes of these protest were varied and have ranged from service delivery, labor related issues, crime, education, to environmental issues. While in the past multiple studies and news articles have analyzed the nature and cause of such protests, this research uses a combination of unsupervised (topic modeling using probabilistic Latent Dirichlet Allocation (pLDA)) and supervised (single and ensemble decision trees) learning to predict the duration of future protests. We develop an approach in which an user inputting a description of a protest in free flowing English text, the system predicts the duration of the protest to a high (close to 90%) degree of accuracy . We expect that an early correct prediction of the duration of the protest by the system will allow police and other security services to better plan and allocate resources to manage the protests. II. P ROBLEM S TATEMENT The objective of this research is to provide an early prediction of the duration of a protest based on South African protest data. The master dataset is obtained from the website TABLE I I MPORTANT S TATISTICAL F EATURES Whether Metro or not Police station Coordinates Start date End date Cause of protest Status of protest (Violent or not) Reason for protest (text data) TABLE II P ERCENTAGE OF PROTESTS VIS - A - VIS PROVINCES Provinces % of protests Provinces % of protests Gauteng 37 Limpopo 6 Western Cape 18 Mpumalanga 5 Kwazulu Natal 14 Free State 3 Eastern Cape 9 Northern Cape 2 North West 6 - Code for South Africa [1]. It consisted of 20 features (columns) describing 876 instances (rows) of protests over the period of 1st February 2013 to 3rd March 2014. Among the 20 features, the statistically important and hence selected ones are shown in Table I . The rest are repeated codification of the important features that convey the same statistical information as the important features. Hence they are ignored. Also detailed addresses of the location (Town or city name, First street, Cross street, Suburb area place name etc) of the protests are not considered. Instead the more accurate measures - Coordinates (latitudes and longitudes) are used. Table II, III, IV and V shows the overall descriptive statistics of the protests during the above mentioned period. From the 876 rows, three are removed for which the one or more columns are missing1 . Thus our modeling exercise is based upon 873 instances of protests. Table II shows 1 Since an insignificant percentage (0.34%) of our data is missing we conveniently remove them without doing missing value imputation. TABLE III P ERCENTAGE OF PROTESTS VIS - A - VIS ISSUES Issue Service delivery Labour Crime Election Vigilantism Education % of protests 31 30 12 6 5 5 % of protests 4 3 2 1 1 Issue Political Transport Xenophobia Individual causes Environment TABLE IV P ERCENTAGE OF PROTESTS VIS - A - VIS STATE State % of protests Peaceful 55 Violent 45 TABLE V P ERCENTAGE OF PROTESTS VIS - A - VIS DURATION IN DAYS Duration % of protests 0 (less than 24 hrs) 74.34 1 11.34 2 4.58 3 2.06 4 2.17 5-13,19, 21-23, 31, 34, 37, 39, 57, 65 less than 1% that Gauteng2 as the seat of commerce, and President and Cabinet; and Western Cape3 as the legislative capital has the largest concentration of protests, followed by the others. Table III shows that the three largest issues of protests are from service delivery, labor related issues, and crime related at respectively 31%, 30% and 12% of the total. From table IV it can be seen that the difference between peaceful and violent protests is low at 55% and 45% respectively. However the most interesting insight comes from the duration of protests4 . From table V it can be observed that the majority of protests (at 74.34% of the total) last for less than 24 hours. Thus this feature is highly skewed. The idea behind this work is to use only the text description of the protests (predictor variable) to predict the duration of future protest(s) (response variable). Some typical examples of the descriptions of protests are as follows. Flagged as service delivery and violent - “Residents of both towns Butterworths and Centane blockaded the R-47 between the two towns, accusing the Mnquma Municipality of ignoring their request for repairs to the road.” Eyeballing the text does not indicate any violence. A second example flagged as 2 Gauteng has in it Johannesburg and Pretoria. Johannesburg is the commercial hub of South Africa, and the office of President and Cabinet is in Pretoria. 3 Cape Town as the seat of South African parliament is situated in Western Cape. 4 Duration of protests is the difference between the End day and the Start Day of the protest. service delivery and peaceful protest is “ANGRY community leaders in four North West villages under the Royal Bafokeng Nations jurisdiction protested this week against poor services and widespread unemployment among the youth. Now they not only demand their land back, but want a 30% stake in the mines which are said to employ labour from outside the villages.”. While the first line of the text referred to the cause of the protest as service delivery, the second line referred to political (demand for return of land) and labor issues (3% stake in mines and corresponding increase in employment). In this sense, we believe that strict flagging of protests into one category or another restricts the knowledge of the protests. We also believe that it is normal for human social concerns to spill from one area to another during protests that is not well captured by only one restrictive flag attached to one protest. Thus we drop the categorical features (with strict class labels) and consider only the text descriptions of the protests as a predictor of its duration. Another important advantage of using text descriptions is that they give flow/progress of events that occurred during a protest and other relevant details. Figure 1 shows the word cloud of the entire protest corpus. Prior building the word cloud the usual preprocessing on the text corpus such as removal of punctuation, numbers, common English stopwords, white spaces etc have been carried out. The cloud consists of 75 words5 and words that occur with a minimum of at least 25 times are included. The more the frequency of the words occurring in the text corpus, the bigger is its font size. Lastly due to word stemming, resid is created from words like residence and residing. III. THEORETICAL CONCEPT - PROBABILISTIC LATENT DIRICHLET ALLOCATION In this subsection we provide a short introduction to pLDA. LDA is an unsupervised generative probabilistic model primarily used for topic discovery. It states that for a collection of words in a large number of documents, each document is a mixture of a number of “latent topics” 6 and each word in a document is a result of a latent topic. Following [2], [3]; a document is a random mixture of latent topics and each topic7 in turn is created by the distribution of words. Mathematically the LDA model can be stated as follows. For each document w in a corpus D 1) Choose N ∼ P oison(ξ) 2) Choose θ ∼ Dir(α) 3) For each of the N words wn : a) Choose a topic wn ∼ M ultinomial(θ) b) Choose a word wn from p(wn |zn , β), a multinomial probability conditioned on the topic zn where a document w is a cobination of N words, for example w = (w1 , w2 , ...., wN ). A corpus D is a collection of M documents such that D = (w1 , w2 , ...., wM ). α and β are 5 The number of words is kept low for better visibility. that the topics are latent because they are neither defined semantically nor epistemologically. 7 Topic and latent topic are the same and used interchangeably 6 Note % in total 20 40 60 2 4 6 8 11 19 23 Number of days 37 65 0 % in total 20 40 60 0 0 less than one day one or more days Classes of number of days Fig. 2. Setting of two class classification problem panel of figure 2 shows the percentage of protests falling in less than one day (74.34%) and one or more days (25.66%). Thus the binary classification problem now is to correctly predict the response variable (less than one day against one or more days) for the text corpus of the protest descriptions. However before getting into the classification exercise we need to perform two tasks. One, we need to find the optimal number of latent topics from the text corpus. Two, since classification algorithms per se cannot take text documents, we need to extract a set of latent topics for each text description of a protest. In the next section we discuss the above tasks and their results. Fig. 1. Word cloud of the entire text courpus of the protests V. RESULTS AND DISCUSSIONS parameters of the Dirichlet prior on per document topic and per topic word distribution respectively. z is a vector of topics. The central idea of LDA is to find the posterior distribution (θ) of the topics (z) when the document (w) is given, i.e. p(θ, z|w, α, β) = p(θ, z, w|α, β) p(w|α, β) (1) Since it is beyond the scope of this paper to derive the detailed formula, we summarize the two other important results that will subsequently be required in our analysis. The marginal distribution of a document is: Z p(w|α, β) = p(θ|α)( N X Y ) p(zn |θ)p(wn |zn , β)dθ (2) Finding the optimal number of hidden topics from the text corpus is an important task. If the chosen number of topics is too low, then the LDA model is unable to identify the accurate classifiers. However if the number is too high, the model becomes increasingly complex and thus less interpretable [4] [5]. In contrast to the often used procedure of intelligently guessing the optimal number of topics in a text corpus, following [2] we use the perplexity approach to find the optimal number of topics. Often used in language/text based models, perplexity is a measure of “on average how many different equally most probable words can follow any given word” [6]. In other words its a measure of how well a statistical model (in our case LDA) describes a dataset [4] where a lower perplexity denotes a better model. It is mathematically denoted by: n=1 PM The probability of a corpus is: p(D|α, β) = m X Y d=1 p(θd |α)( perplexity(Dtest ) = exp{− Nd Y p(wdn |zdn , β)dθ) (3) n=1 IV. E XPERIMENTAL S ETUP As seen in table V, our response variable - duration of protests is highly schewed. Protests lasting for less than 24 hours is 74.34% of the total number of protests. Protests above one day is less than 5% of the total number. In effect it means that in reality, South Africa rarely experiences protests that stretches beyond one day. So for practical purposes, we couple protests lasting above 24 hours into one class and compare it against protests lasting below 24 hours. The right d=1 logp(wd ) } PM d=1 Nd (4) where the symbols have the same meaning as in section III. Using a trial number of topics that range between 2 to 308 , we use perplexity to find the optimal number of topics from our text corpus. The text corpus is broken into a training and test set. A ten fold cross validation is carried out using 1000 iterations. The black dots show the perplexity score for each fold of cross validation on the test set for various numbers of topics. The average perplexity score is shown by the blue line in figure 3 and the score is least for 24 latent topics. Thus the optimal number of topics for our text corpus is 24. 8x axis of fig 3 shows the trial number of topics Perplexity when fitting the trained model to the test set 1200 1300 1400 1500 1600 1700 1800 Ten fold cross−validation to find the optimal value of k 5 10 15 Number of topics 20 TABLE VII AN EXAMPLE OF TEXT DESCRIPTION AND ITS ASSOCIATED HIGHEST PROBABILITY TOPICS 25 30 Fig. 3. Finding the optimal number of topics Text LP 2nd LP 3rd LP 4th LP The residents wanted Sterkspruit to be moved from the Senqu municipality and be a municipality on its own municip march resid hospit *** P(Tn ) refers to probability of the nth topic where n varies from 1 to 24. Here T1 = shop, T8 = march, T20 = municip and T24 = anc. TABLE VI AN EXAMPLE OF A TEXT DESCRIPTION AND ITS ASSOCIATED TOPIC PROBABILITIES Text P(T1 ).. ..P(T8 ) ... ..P(T20 ) ..P(T24 ) The residents wanted Sterkspruit to be moved from the Senqu municipality and be a municipality on its own 0.0027 0.15 ... 0.79 0.0028 TABLE VIII PERFORMANCE METRICS OF VARIOUS ALGORITHMS ON THE TEST SET C5.0 Treebag Random forest Balanced accuracy 79.38% 88.40% 89.69% Kappa 0.590 0.769 0.795 Sensitivity 87.03% 94.59% 95.68% Specificity 72.41% 82.76% 84.24% *** P(Tn ) refers to probability of the nth topic where n varies from 1 to 24. Here T1 = shop, T8 = march, T20 = municip and T24 = anc. *** P(Tn ) refers to probability of the nth topic where n varies from 1 to 24. Here T1 = shop, T8 = march, T20 = municip and T24 = anc. Next we perform a LDA with 24 topics on our text corpus. Table VI shows an example of a text description and the probabilities associated with the various topics. In addition, it might also be recalled that our response variable duration of protest is unbalanced with the percentage of values falling in the class - less than one day at 74.34% and one or more days at 25.66%. Since unbalanced classes are not learned well by decision trees, so we use both way balanced sampling strategies to balance the modeling data. Next the modeling data is split into a training and test set in the 7:3 ratio. The dimensions of the training and test sets are 910x5 and 388x5 respectively. The topic names are given in the bottom of the table. The topics court and resid have the highest probabilities for the text. It might also be noted that since the topics are multinomial distributed to the entire text corpus and the words in corpus, hence there is no direct or visible relationship that connects the topics with the text descriptions. We can only assume that the topics are complexly related to the text descriptions. Table VII shows the topics with four largest probabilities (largest, 2nd largest,... 4th largest) associated with a text description. With computational concerns in mind, we restrict the largest probabilities to only four. It might be recollected from the last paragraph of section IV where we stated that classification algorithms per se cannot take text documents as a predictor variable. Table VII shows a way in which a single text description can be represented as a set of most relevant9 topics. Thus for an entire corpus of 873 text documents, the predictor side of the classification model would consist of a topic matrix of 873x4 dimensions. Including the response variable, our modeling data would have 873x5 dimensions. 9 The most relevant topics are the ones with highest probabilities. In the next step we use decision tree based classification algorithms to model the relationship between the topic matrix and the duration of the protests. Specifically we use three algorithms - C 5.0, treebag, and random forest and do a ten fold cross validation with five repeated iterations. The prediction results for the class one or more days on the test dataset is shown in table VIII. Treebag with a number of decision trees is able to better predict the response variable than a single tree in C5.0 because multiple trees help in reducing variance without increasing bias. Again, random forest performs better than treebag because in addition to multiple trees it also randomly selects a subset of the total number of features at each node. Further best split feature from the subset is used to split each node of the tree. This salient feature of random forest is absent in treebag. The combination of a number of trees and random selection of a subset of features at each node of the tree helps in further reducing the variance of the model. Thus in effect, random forest performs best in predicting the duration of the protests on the test dataset. The codes for the analysis are in https: //www.dropbox.com/s/dzyj2lviqnlgk5x/ dropbox_ieee_la_cci_2017.zip?dl=0 VI. LIMITATIONS The first limitation of this research is that LDA does not allow for evolution of topics over time. This means that if the nature and scope of the protests remain pretty stagnant over time then our model is expected to perform fairly well. Second, since it is a bag of words model, so sentence structures are not considered. And third, topics are not independent of one another. Thus it might happen that the same word represents two topics creating a problem of interpretability. VII. C ONCLUSION This paper is an combination of unsupervised and supervised learning to predict the duration of protests in South African context. Protests and agitations being social issues; have multiple nuances in terms of causes, courses of actions etc that cannot be very well captured by restrictive tags. Thus we discard the approach of restrictive characterization of protests and use free flowing English texts to understand its nature, cause(s), course of action(s) etc. Topic discovery (unsupervised learning using pLDA) and subsequent classification (supervised learning using various decision tree algorithms) provides promising results in predicting the duration of protests. We expect that the implementation of the framework can help police and other security services in better allocating resources to manage the protests in future. R EFERENCES [1] Code for South Africa, Protest Data, https://data.code4sa.org/dataset/ Protest-Data/7y3u-atvk. [2] D.M. Blei, A.Y Ng and M.I Jordan, Latent Dirichlet Allocation, Journal of Machine Learning Research, Vol. 3, pp.993-1022, 2003. [3] C. Reed, Latent Dirichlet Allocation: Towards a Deeper Understanding, http://obphio.us/pdfs/ldatutorial.pdf. [4] W. Zhao, J.J Chen, R. Perkins, Z. Liu, W. Ge, Y. Ding and W. Zou, A heuristic approach to determine an appropriate number of topics in topic modeling, 12th Annual MCBIOS Conference, March, 2015. [5] W. Zhao, W. Zou, J.J Chen, Topic modeling for cluster analysis of large biological and medical datasets, BMC Bioinformatics, Vol. 15 (Suppl 11), 2014. [6] NCLab, Perplexity, http://nclab.kaist.ac.kr/twpark/htkbook/node218 ct. html.
2cs.AI
THE MAXIMUM LIKELIHOOD DEGREE OF TORIC VARIETIES arXiv:1703.02251v2 [math.AG] 8 Nov 2017 CARLOS AMÉNDOLA, NATHAN BLISS, ISAAC BURKE, COURTNEY R. GIBBONS, MARTIN HELMER, SERKAN HOŞTEN, EVAN D. NASH, JOSE ISRAEL RODRIGUEZ, DANIEL SMOLKIN Abstract. We study the maximum likelihood (ML) degree of toric varieties, known as discrete exponential models in statistics. By introducing scaling coefficients to the monomial parameterization of the toric variety, one can change the ML degree. We show that the ML degree is equal to the degree of the toric variety for generic scalings, while it drops if and only if the scaling vector is in the locus of the principal A-determinant. We also illustrate how to compute the ML estimate of a toric variety numerically via homotopy continuation from a scaled toric variety with low ML degree. Throughout, we include examples motivated by algebraic geometry and statistics. We compute the ML degree of rational normal scrolls and a large class of Veronese-type varieties. In addition, we investigate the ML degree of scaled Segre varieties, hierarchical log-linear models, and graphical models. 1. Introduction Maximum likelihood estimation is a fundamental optimization problem in statistical inference. The maximum likelihood degree of an algebraic statistical model was introduced in [CHKS06] and [HKS05] to study the geometry and complexity of this optimization problem. Here we study the maximum likelihood degree of toric varieties. Let V ⊂ Pn−1 be a projective variety over C. The homogeneous coordinates of Pn−1 will be denoted by [p1 : · · · : pn ]. The affine open subset of V where p1 + . . .+ pn 6= 0 is identified with the set of points in V where p1 + . . . + pn = 1. We can view the points p ∈ V satisfying p1 , . . . , pn ≥ 0 and p1 + . . . + pn = 1 as a family of probability distributions of a discrete random variable X where pi = prob(X = i) for i = 1, . . . , n. After observing X in N instances X1 , . . . , XN , we record the data vector u = (u1 , . . . , un ) ∈ Zn where ui is the number instances where Xj = i, i.e., ui = |{j : Xj = i}| and N = u1 + · · · + un . The likelihood function is the rational function pu1 1 · · · punn , ℓu (p) = (p1 + · · · + pn )u1 +···+un and one seeks to find a probability distribution p̂ = (p̂1 , . . . , p̂n ) in V which maximizes ℓu . Such a probability distribution p̂ is a maximum likelihood estimate, and p̂ can be identified by computing all critical points of ℓu on V . This project was started during the AMS Mathematics Research Communities 2016 program in Algebraic Statistics held in Snowbird, Utah. The authors were part of the Likelihood Geometry group led by Serkan Hoşten and Jose Rodriguez. This material is based upon work supported by the National Science Foundation under Grant Number DMS 1321794. 1 2 LIKELIHOOD GEOMETRY GROUP We let Vsing be the singular locus of V and Vreg = V \ Vsing be the regular locus. We also define H as the hypersurface that is the union of the coordinate hyperplanes and the hyperplane defined by p1 + · · · + pn = 0. Definition 1. The maximum likelihood degree of V , denoted mldeg(V ), is the number of complex critical points of the likelihood function ℓu on Vreg \ H for generic vectors u. In [CHKS06] and [HKS05], it was shown that mldeg(V ) is well-defined. We refer the reader to [DSS09, Huh13, HRS14] for a glimpse of the growing body of work on aspects of mldeg(V ). For an excellent recent survey we recommend [HS14]. In most applications, V is the Zariski closure of the image of a polynomial map, also known as a parametric statistical model. A widely used subclass of such models is composed of those given by a monomial parametrization. In algebraic geometry, they are known as toric varieties [Ful93, CLS11], and in probability theory and statistics they are known as discrete exponential families [BD76]. In particular, hierarchical log-linear models [BFH07] and undirected graphical models on discrete random variables [Lau96] present examples in contemporary applications. Theorem 13 is our main result and is restated below. Theorem 2 (Main result). Let V c ⊂ Pn−1 be the projective variety defined by the monomial parametrization ψ c : (C∗ )d −→ (C∗ )n where ψ c (s, θ1 , θ2 , . . . , θd−1 ) = (c1 sθa1 , c2 sθa2 , . . . , cn sθan ), and c ∈ (C∗ )n is fixed. Then mldeg(V c ) < deg(V ) if and only if c is in the principal Adeterminant of the toric variety V = V (1,...,1) . To set the stage, we start with an example chosen from the theory of graphical models. This is the smallest example of a graphical model that is not decomposable. Models that are decomposable have a unique maximum likelihood estimate that is a rational function of the data vector u. This is equivalent to mldeg(V ) = 1 [GMS06]. Example 3 (Binary 4-Cycle). This example is from a study to determine risk factors for coronary heart disease based on data collected in Czechoslovakia [R+ 81, EH85]. Six different factors affecting coronary heart disease were recorded for a sample of 1841 workers employed in the Czech automotive industry. We will only use the following four factors: whether they smoked (S), whether their systolic blood pressure was less than 140 mm (B), whether there was a family history of coronary heart disease (H), and whether the ratio of beta to alpha lipoproteins was less than 3 (L). Each is a binary variable, and the joint random variable X = (S, B, H, L) has a state space of cardinality 16. The data set is summarized in Table 1. We will use the graphical model known as the 4-cycle (Figure 1). If we set pijkℓ = prob(S = i, B = j, H = k, L = ℓ) the family of probability distributions for X which factor according to this model can be described by the following monomial parametrization: let aij , bjk , ckℓ , diℓ be parameters for i, j, k, ℓ ∈ {0, 1} and let pijkℓ = aij bjk ckℓ diℓ . The Zariski closure V of the image of this parametrization is a toric variety. Every probability distribution for X that lies on this toric variety satisfies certain independence statements which can be read from the graph. For instance, S and H are independent given B and L. Similarly, B and L are independent THE ML DEGREE OF TORIC VARIETIES S L B H Figure 1. The 4-cycle. 3 H L B S: no S: yes neg < 3 < 140 297 275 ≥ 140 231 121 ≥ 3 < 140 150 191 ≥ 140 155 161 pos < 3 < 140 36 37 ≥ 140 34 30 ≥ 3 < 140 32 36 ≥ 140 26 29 Table 1. Worker data. given S and H. The maximum likelihood estimate given by the worker data is p̂ = ( 0.15293342, 0.089760679, 0.021266977, 0.015778191, 0.12976986, 0.076165372, 0.020853199, 0.015471205, 0.13533793, 0.11789409, 0.018820142, 0.0207235, 0.083859917, 0.073051125, 0.01347576, 0.014838619 ). The degree of V is 64 and mldeg(V ) = 13. This was first computed in [GMS06, p. 1484] where the question of explaining the fact that mldeg(V ) = 13 was raised. The article is organized as follows. In Section 2 we define scaled toric varieties, introduce maximum likelihood degrees, and recall discriminants. In Section 3 we prove our main theorem (Theorem 13). In Sections 4-7 we compute the ML degree of rational normal scrolls and a large class of Veronese-type varieties. We investigate the ML degree of scaled Segre varieties, hierarchical log-linear models, and graphical models. In Section 8, we show that maximum likelihood estimates can be tracked between different scalings of a toric variety via homotopy continuation. We illustrate with computational experiments that homotopy continuation can be a better numerical method than iterative proportional scaling [DR72] for computing the maximum likelihood estimate of a discrete exponential model. 2. Preliminaries In this section we introduce scaled toric varieties and their likelihood equations. We show that the ML degree of a scaled toric variety is bounded by the degree of the variety. Next, we present two classical objects in toric geometry: the A-discriminant and the principal Adeterminant [GKZ94]. The principal A-determinant plays a crucial role in our main result Theorem 13. 2.1. Scaled toric varieties. In this paper, we study the maximum likelihood degree of projective toric varieties. Let A be a (d − 1) × n matrix with columns a1 , . . . , an ∈ Zd−1 . The convex hull of the lattice points ai defines a polytope Q = conv(A). Definition 4. A toric variety scaled by c ∈ (C∗ )n , denoted V c , is defined by the following map ψ c : (C∗ )d −→ (C∗ )n where A is a full rank (d − 1) × n integer matrix: (1) ψ c (s, θ1 , θ2 , . . . , θd−1 ) = (c1 sθa1 , c2 sθa2 , . . . , cn sθan ). 4 LIKELIHOOD GEOMETRY GROUP Here V c is the projective variety in Pn−1 corresponding to the affine cone that is the closure of ψ c ((C∗ )d ) in Cn . Different choices of c give different embeddings of isomorphic varieties V c in Pn−1 ; their ML degrees may also differ. When c = (1, 1, . . . , 1, 1), V c is the standard toric variety of A as in [CLS11]. Example 5. Consider ψ c : (C∗ )3 −→ (C∗ )6 given by (s, t, u) 7→ (s, 2st, st2 , 2su, 2stu, su2). This gives the Veronese embedding of P2 into P5 scaled by c = (1, 2, 1, 2, 2, 1). The usual Veronese embedding has ML degree four whereas this scaled version has ML degree one. 2.2. Likelihood equations. We begin our discussion with the critical equations whose solutions are the critical points of the likelihood function for a toric variety. These equations are called likelihood equations. Let A be a (d − 1) × n matrix as in Definition 4. We let n X f= ci θai = c1 θa1 + · · · + cn θan . i=1 P Definition 6. Let u = (u1 , . . . , un ) and u+ = i ui . Using the method of Lagrange multipliers, we obtain the likelihood equations for the variety V c : 1 = sf ∂f (Au)i = u+ sθi for i = 1, . . . , d − 1. ∂θi In other words, (2) 1 = sf (Au)1 = ∂f u+ sθ1 ∂θ 1 (Au)2 = .. . ∂f u+ sθ2 ∂θ 2 (Au)d−1 = u+ sθd−1 ∂θ∂f d−1 We remark that the solutions to the above system are exactly the solutions to (3) (Au)1 f = ∂f u+ θ1 ∂θ 1 (Au)2 f = .. . ∂f u+ θ2 ∂θ 2 (Au)d−1 f = u+ θd−1 ∂θ∂f d−1 where f 6= 0. We formulate the ML degree of the scaled toric variety V c using the coordinates p1 , . . . , pn as well. Note that f = c1 θa1 + · · · + cn θan induces a linear form Lf (p) = c1 p1 + · · · + cn pn ∂f on the toric variety V . Similarly, θi ∂θ induce corresponding linear forms Li (p) on V for i ∂f are a subset of the monomials appearing i = 1, . . . , d − 1, as the monomials appearing in θi ∂θ i in f . With this we immediately get the following. THE ML DEGREE OF TORIC VARIETIES 5 Proposition 7. The ML degree of V c is the number of solutions p ∈ V \ V (p1 · · · pn Lf (p)) to (4) (Au)1 Lf (p) (Au)2 Lf (p) = = .. . u+ L1 (p) u+ L2 (p) (Au)d−1 Lf (p) = u+ Ld−1 (p) for generic vectors u. Proof. Definition 1 combined with (3) give the result by noting the fact that the singularities of any toric variety are contained in the union of coordinate hyperplanes.  The following result was first proved in [HS14, Theorem 3.2]. Corollary 8. For c ∈ (C∗ )n , the ML degree of V c is at most deg(V ). Moreover, for generic c, mldeg(V c ) = deg(V ). Proof. For generic u, the linear equations (4) define a linear subspace of codimension d − 1. By Bertini’s theorem, the intersection of this linear subspace with V is generically transverse. Now by Bezout’s theorem [Ful98, Propositon 8.4], the sum of the degrees of the components of the intersection is equal to the degree of V . Therefore, the degree of the zero dimensional piece of this intersection is at most deg(V ). The ML degree of V c is obtained by removing those solutions in V (p1 · · · pn Lf (p)), hence mldeg(V c ) ≤ deg(V ). For generic c, the linear subspace is a generic linear subspace of codimension d − 1. Not only will the intersection contain exactly deg(V ) points, these points will not be in V (p1 · · · pn Lf (p)). Hence, in this case, mldeg(V c ) = deg(V ).  We will denote the set of solutions in V to (4) by L′c,u . Similarly, we will denote the set of solutions to (4) in V \ V (p1 · · · pn Lf (p)) by Lc,u . To close this subsection, we would like to point out a classical result both in probability theory and toric geometry. It is sometimes known as Birch’s theorem (see e.g. [Lau96]). Theorem 9 (Birch’s Theorem). There is a unique positive point in Lc,u (p), namely, there is a unique positive solution to (4) in V \ V (p1 · · · pn Lf (p)) if the scaling vector c and the data vector u are positive vectors. 2.3. A-discriminant and principal A-determinant. In this subsection we recall the classical definitions of discriminants and resultants. Definition 10. To any matrix A as above, we can associate the variety ∇A , defined by   ∂f n d−1 ∗ ∗ ∇A = c ∈ (C ) | ∃θ ∈ (C ) (θ) = 0 for all i . such that f (θ) = ∂θi If ∇A has codimension one in (C∗ )n , then the A-discriminant, denoted ∆A (f ), is defined to be the irreducible polynomial that vanishes on ∇A . This polynomial is unique up to multiplication by a scalar. Pn ai ∗ n As in the previous subsection, to f = i=1 ci θ where c = (c1 , . . . , cn ) ∈ (C ) we associate Pn the linear form Lf (p) = i=1 ci pi . 6 LIKELIHOOD GEOMETRY GROUP P Definition 11. Given f1 , . . . , fd where fj = ni=1 ci,j θai with coefficients ci,j ∈ C∗ there is a unique irreducible polynomial RA (f1 , . . . , fd ) in the coefficients ci,j , so that RA (f1 , . . . , fd ) = 0 at (ci,j ) if and only if Lf1 = Lf2 = · · · = Lfd = 0 on the toric variety V [GKZ94, Section 2, Chapter 8]. This polynomial is called the A-resultant of f1 , . . . , fd . P Definition 12. For f = ni=1 ci θai , we define the principal A-determinant as   ∂f ∂f . , . . . , θd−1 EA (f ) = RA f, θ1 ∂θ1 ∂θd−1 This is a polynomial in the coefficients ci of f . In [GKZ94], the principal A-determinant EA (f ) is related to the polytope Q of the toric variety V . More precisely, when the toric variety V is smooth, and A is the matrix whose columns correspond to the lattice points in Q, the principal A-determinant is Y (5) EA (f ) = ∆Γ∩A Γ face of Q where the product is taken over all nonempty faces Γ ⊂ Q including Q itself [GKZ94, Theorem 1.2, Chapter 10]. Here, Γ ∩ A is the matrix whose columns correspond to the lattice points contained in Γ. When V is not smooth, the radical of its principal A-determinant is the polynomial given in (5). The zero locus of EA (f ) in Cn will be denoted by ΣA . 3. ML degree and principal A-determinant We first state and prove our main theorem. Theorem 13. Let A = (a1 . . . an ) be a full rank (d − 1) × n integer matrix, and let V c ⊂ Pn−1 be the scaled toric variety defined by the monomial parametrization given by (1) where c ∈ (C∗ )n is fixed. Then mldeg(V c ) < deg(V (1,1,...,1,1) ) if and only if c ∈ ΣA . Proof. Let V = V (1,1,...,1,1) . Let c ∈ (C∗ )n ∩ ΣA . Then there exists p ∈ V such that Lf (p) = L1 (p) = · · · = Ld−1 (p) = 0. Such a p is a solution in L′c,u but not a solution in Lc,u . Since the degree of L′c,u is equal to deg(V ), and since mldeg(V c ) is equal to the degree of Lc,u we see that mldeg(V c ) < deg(V ). Conversely, suppose mldeg(V c ) < deg(V ). There are two ways this can happen (c.f. the proof of Corollary 8). On the one hand, there can exist p ∈ V so that Lf (p) = 0, which implies that L1 (p) = · · · = Ld−1 (p) = 0. This means c ∈ ΣA . On the other hand, there can exist a solution p in L′c,u where some pi = 0. The coordinates of p that are zero cannot be arbitrary. The support of p, that is {i : pi 6= 0}, is in bijection with the columns ai of A where the convex hull of these columns is a face of Q = conv(A). Let Γ be the corresponding face. Without loss of generality we will assume that Γ∩A = {a1 , . . . , ak }. Let e < d−1 be the dimension of Γ. Since pk+1 = · · · = pn = 0, the point pΓ = [p1 : · · · : pk ] is in the toric variety P VΓ defined by Γ ∩ A. Moreover, Lf (p) = LfΓ (p1 , . . . , pk ) where LfΓ = ki=1 ci pi is the linear form associated to the polynomial fΓ whose support is Γ. Similarly, Li (p) = L′i (p1 , . . . , pk ) Γ where L′i is the linear form associated to θi ∂f . If Lf (p) = LfΓ (p1 , . . . , pk ) 6= 0, then pΓ is a ∂θi THE ML DEGREE OF TORIC VARIETIES solution to 1 (Au)1 (Au)2 = = = .. . 7 LfΓ u+ L′1 u+ L′2 (Au)d−1 = u+ L′d−1 . But this is a d × k linear system of rank e < d. Because u is generic, this system does not have a solution. Therefore the only way p = [p1 : · · · : pk : 0 : · · · : 0] can be a solution in L′c,u is with LfΓ (p1 , . . . , pk ) = Lf (p) = 0. We again conclude that c ∈ ΣA .  Remark 14. A natural question one can ask is under what conditions a general projective variety has ML degree one. This question was answered in [Huh14]. 3.1. Toric Hypersurfaces. Let A = (a1 . . . ad+1 ) be a (d − 1) × (d + 1) integer matrix of rank d − 1. In this case, the toric variety V and each scaled toric variety V c is a hypersurface generated by a single polynomial. This polynomial can be computed as follows. We let A′ be the matrix obtained by appending a row of 1’s to the matrix A. The kernel of A′ is generated by an integer vector w = (w1 , . . . , wd+1 ) where gcd(w1 , . . . , wd+1 ) = 1. Without loss of generality we assume that w1 , . . . , wℓ > 0 and wℓ+1 , . . . , wd+1 ≤ 0. Then the hypersurface is defined by −wℓ+1 −w wℓ 1 w2 pw · · · pd+1d+1 . 1 p2 · · · pℓ − pℓ+1 We say A′ and A are in general position if no d columns of A′ lie on a hyperplane. The matrix A′ is in general position if and only if w has full support, i.e. no wi is 0. This is also equivalent to Q = conv(A) being a simplicial polytope with exactly d of the columns of A on P ai each facet of Q. Recall that f = d+1 i=1 ci θi . In this setting, the A-discriminant ∆A and the principal A-determinant EA (f ) can be calculated directly. Proposition 15. [GKZ94, Chapter 9, Proposition 1.8] If A is in general position then   −w −wℓ+1 −wd+1 −wℓ+1 wℓ wℓ w1 1 · · · cd+1d+1 . cw ∆A = wℓ+1 · · · wd+1 1 · · · cℓ − (w1 · · · wℓ ) cℓ+1 This is also the principal A-determinant of this toric hypersurface up to a monomial factor. Corollary 16. If A is in general position, mldeg(V c ) < deg(V ) if and only if    −wd+1 −wℓ+1 −w −w wℓ wℓ w1 1 · · · c ) c − (w · · · w · · · c c∈V wℓ+1ℓ+1 · · · wd+1d+1 cw 1 1 d+1 ℓ+1 ℓ ℓ −w −w wℓ ℓ+1 1 w2 · · · pd+1d+1 is the polynomial defining the hypersurface V . where pw 1 p2 · · · pℓ − pℓ+1 4. Rational Normal Scrolls In this section, we characterize the ML degree of a rational normal scroll. A rational normal scroll is a toric variety associated to a (d − 1) × n matrix A of the following form:   1 ··· 1 0 ··· 0 ··· 0 ··· 0 0 ··· 0  0 ··· 0 1 ··· 1 ··· 0 ··· 0 0 ··· 0   . ..   (6) A =  .. .  .  0 ··· 0 0 ··· 0 ··· 1 ··· 1 0 ··· 0  0 1 · · · n1 0 1 · · · n2 · · · 0 1 · · · nd−2 0 1 · · · nd−1 8 LIKELIHOOD GEOMETRY GROUP Here, n = d − 1 + n1 + n2 + · · · + nd−1 . This description is due to Petrović [Pet08]. We index the data vector and scaling vector as (uij ) and (cij ) respectively. For i = 1, 2, . . . , d − 1, define gi to be the following univariate polynomial in the variable θd−1 : ni 2 . gi = ci0 + ci1 θd−1 + ci2 θd−1 + · · · + cini θd−1 Note that for i 6= d − 1, gi is the ith partial derivative of f where f = (θ1 g1 + θ2 g2 + · · · + θd−2 gd−2 ) + gd−1 . We now state and prove our result on the ML degree of the rational normal scroll. Theorem 17. The ML degree of a rational normal scroll given by the matrix A as in (6) is equal to the number of distinct roots of g1 g2 · · · gd−1 . Proof. ForP each i, we use gi′ to denote the derivative of gi with respect to θd−1 , and we write nd−1 u(d−1)j . With this set up, the last equation in (3) is u(d−1)+ = j=0 ! d−2 X ′ (Au)d−1 f = u+ θd−1 gd−1 + θi gi′ . i=1 Multiply both sides of this equation by g1 g2 · · · gd−1 . Then substituting (Au)i f = u+ θi gi for each 1 ≤ i ≤ d − 2 in the appropriate summand on the right-hand side gives: ! d−2 X ′ (7) (Au)d−1 g1 · · · gd−1 = θd−1 u(d−1)+ g1 · · · gd−2 gd−1 + (Au)i g1 · · · gi−1 gi′ gi+1 · · · gd−1 . i=1 For generic (uij ), the solutions to (3) correspond to the solutions of (7) where gi 6= 0 for every i. Suppose that θd−1 = α is a repeated root of g1 g2 · · · gd−1 . Then either α is a shared root of gi and gj for i 6= j or α is a repeated root of a single gi . In the first case, θd−1 − α divides the right-hand side of (7) since each summand has either gi or gj as a factor. In the second case, θd−1 − α divides both gi and gi′ and hence the right-hand side of (7). Factoring out all such repeated roots results in an equation whose degree equals the number of distinct roots of g1 · · · gd−1 . This shows that the ML degree is at most the number of the distinct roots; we must still argue that no more roots can be factored out. Suppose g1 g2 · · · gd−1 has no repeated roots and let θd−1 = β be a root of an arbitrary gi . Then θd−1 − β does not divide g1 · · · gi−1 gi′ gi+1 · · · gd−1 but does divide every other summand on the right-hand side, so it does not divide the sum as a whole. This follows because for generic data vectors (uij ), no coefficient on the right-hand side vanishes. Thus, if the repeated roots of g1 g2 · · · gd−1 have been removed, the degree of the polynomial and hence the ML degree will not drop any further.  We finish this section with examples. Example 18. The simplest example of a rational normal scroll is a rational normal curve with A = (0 1 . . . n). We denote the scaled rational normal curve of degree n by Cnc . The ML degree of the scaled rational normal curve Cnc is equal to the number of distinct roots of the polynomial c0 + c1 θ + c2 θ 2 + · · · + cn θ n . For example, if n = 4, the zero locus of the principal A-determinant (where the ML degree drops from four) is cut out by the discriminant of a degree four polynomial. The variety THE ML DEGREE OF TORIC VARIETIES 9 where the ML degree drops at least two consists of two irreducible components. The first one corresponds to polynomials of the form f (θ) = k(θ + a)2 (θ + b)2 and the second corresponds to polynomials of the form f (θ) = k(θ + a)3 (θ + b). The variety where the ML degree is one is a determinantal variety, defined by 2-minors of the matrix   c1 4c2 3c3 8c4 . 2c0 3c1 c2 c3 Example 19. In the case that k = 2, the toric variety is known as a Hirzebruch surface, and we can draw the corresponding polytope (Figure 2). We denote this surface by Hn1 ,n2 . (0, 1) (1, 1) (0, 0) (1, 0) (2, 1) ··· ··· (n1 , 1) (n2 , 0) Figure 2. Polytope in R2 corresponding to a Hirzebruch surface. For c = (1, 1, . . . , 1, 1), the ML degree of Hn1 ,n2 is n1 + n2 − gcd(n1 + 1, n2 + 1) + 1. This is because g1 = 1 + θ + · · · + θn1 and g2 = 1 + θ + · · · + θn2 . The roots of g1 and g2 are respectively the (n1 + 1)th and (n2 + 1)th roots of unity not equal to 1. It follows that there are gcd(n1 + 1, n2 + 1) − 1 repeated roots of g1 g2 .  Example 20. If we choose the coefficients cij to be the binomial coefficients nji , then gi = (1 + θd−1 )ni for all i. For this choice of coefficients, the ML degree is 1 by Theorem 17, and the likelihood equations (2) have one solution given by −u(d−1)+ ui+ θi = (1 + θd−1 )nd−1 −ni for i = 1, 2, . . . , d − 2, 2 u++ P P where u++ = i j uij , and θd−1 equals the unique solution to (Au)d−1 (1 + θd−1 ) = θd−1 (u(d−1)+ + d−2 X ni ui+ ). i=1 5. Veronese Embeddings In this section we study Veronese and Veronese-type varieties. Definition 21. Consider the (d − 1) × n integer matrix A with columns that are the nonnegative integer vectors whose coordinate sum ≤ k. The projective toric variety defined by A is the Veronese Ver(d − 1, k) for d, k ≥ 1. It can be seen that deg(Ver(d − 1, k)) = k d−1 . A conjecture presented in [Vuc16] is that under the standard embedding, that is, with scaling vector c = (1, 1, . . . , 1, 1), the ML degree of any Veronese variety equals its degree. We now show this is true when k ≤ d − 1. Proposition 22. Consider Ver(d − 1, k) for k ≤ d − 1 which is embedded using the map (1) with scaling given by c = (1, 1, . . . , 1, 1). Then c ∈ / ΣA and mldeg(Ver(d − 1, k)) = k d−1 . 10 LIKELIHOOD GEOMETRY GROUP Proof. First note that, by induction, it is sufficient to show that c ∈ / ∆A . To prove this we need to show that the hypersurface defined by the polynomial f= X ai θ =1+ k X hi i=1 is nonsingular, where hi is the ith complete homogeneous symmetric polynomial in θ1 , . . . , θd−1 . The complete homogeneous symmetric polynomials h1 , . . . , hd−1 form an algebra basis for Λd−1 , the ring of symmetric polynomials in variables θ1 , . . . , θd−1 , see [Mac98, (2.8)]. The regular embedding ϕ of Λd−1 into the polynomial ring C[θ1 , . . . , θd−1 ] (specified by the definition of hi in terms of θj ’s) induces an embedding ϕ∗ of Spec(Λd−1 ) into Ad−1 = Spec(C[θ1 , . . . , θd−1 ]). Consider the hypersurface V = V (1 + h1 + h2 + · · ·+ hk ) ⊂ Spec(Λd−1 ). For k ≤ d − 1 we have that 1 + h1 + h2 + · · · + hk is a linear form in the indeterminates h1 , . . . , hd−1 . Hence V is smooth in Spec(Λd−1 ). Since the induced map ϕ∗ is a regular embedding, ϕ∗ (V ) is smooth in Ad−1 , and by the definition of hi and the map P ϕ we have that ϕ(1 + ki=1 hi ) = f .Thus f defines a smooth hypersurface in Ad−1 , and c = (1, 1, . . . , 1, 1) ∈ / ∆A . The conclusion follows by Theorem 13.  Remark 23 (Hypersimplex). Let k ≤ d − 1. Consider the (d − 1) × n integer matrix A where n = kd and where the columns of A are the vectors in {0, 1}d−1 that have precisely k or k − 1 entries equal to 1. The (d − 1)-dimensional polytope Q = conv(A) is called the hypersimplex. The projective toric variety V associated to A represents generic torus orbits on the Grassmannian of k-dimensional linear subspaces in Cd . It is shown in the discussion preceding [HS17, Proposition 4.7] that c = (1, 1, . . . , 1, 1) ∈ / ΣA for this matrix A. We remark that this result can be seen from the same proof given in Proposition 22. Let ek−1 and ek be elementary symmetric polynomials in θ1 , . . . , θd−1 of degree k − 1 and k, respectively. Similar to above, we need to only show that the hypersurface defined by the polynomial f = ek−1 + ek is nonsingular. This proceeds in a manner identical to the proof of Proposition 22 since the elementary symmetric polynomials also form an algebra basis for Λd−1 , and hence are algebraically independent (see [Mac98, (2.4)]). Thus, for the projective toric variety V associated to the hypersimplex, mldeg(V ) is equal to the normalized volume of the hypersimplex Q, which is the Eulerian number A(d − 1, k − 1). It should be noted that the form of the definition of the hypersimplex given above differs slightly from that in [HS17], however the definitions are equivalent (i.e. the resulting exponents of the monomial maps differ by elementary row operations). The difference is due to the fact that in [HS17] a projective toric variety is defined by a monomial map given by a d×n integer matrix A with full rank and the vector (1, . . . , 1) in the row space. In the convention used in our note we (equivalently) assume that the last row of what would be their matrix A consists only of ones and omit this row from our matrix A. Returning to Ver(d − 1, k), we note that in the case k = 2, the polynomial f reduces to a quadratic form, and a direct proof that c = (1, 1, . . . , 1, 1) ∈ / ΣA can be given by looking at THE ML DEGREE OF TORIC VARIETIES 11 the principal minors of the corresponding symmetric matrix   2c00 c01 ··· c0(d−1)  c01 2c11 · · · c1(d−1)  , (8) C= . . .. .  ..  .. .. . c0(d−1) c1(d−1) · · · 2c(d−1)(d−1) where f = (1, θ1 , . . . , θd−1 )C(1, θ1 , . . . , θd−1 )T . Proposition 24. Consider Ver(d − 1, 2). Then c = (1, 1, . . . , 1, 1) ∈ / ΣA . In particular, we have that mldeg(Ver(d − 1, 2)) = deg(Ver(d − 1, 2)) = 2d−1 . Proof. Let Q = conv(A). From (5) we have that [ ∇A∩Γ . ΣA = Γ face of Q The A-discriminant of the toric variety corresponding to each face will be given by a principal minor (of size corresponding to the dimension of the face) of the symmetric matrix C in (8). Any principal minor of size r × r will have the same form as C. Hence, to show that c = (1, 1, . . . , 1, 1) ∈ / ΣA we need only verify that the r × r matrix   2 1 ··· 1 .  1 2 · · · ..  C̃ = C(1, 1, . . . , 1, 1) =  .   .. 1 . . . 1 1 1 ··· 2 has a nonzero determinant. A calculation shows that det(C̃) = r + 1 6= 0 for all r ≥ 2. Thus, by Theorem 13, it follows that mldeg(Ver(d − 1, 2)) = deg(Ver(d − 1, 2)) = 2d−1 .  Now we give a sufficient condition for the opposite effect to happen: having ML degree equal to one, instead of having ML degree equal to the degree. The polynomial f has terms of degree ≤ k in θ1 , . . . , θd−1 . It uniquely corresponds to a symmetric tensor C of size d × d × . . . × d, where the product is k-fold. We say C has tensor rank one if the polynomial f is a power of a linear form. Theorem 25. Let C be the symmetric tensor corresponding to f where X f= ca θ a . deg(θ a )≤k If the tensor rank of C is equal to one then mldeg(Ver(d − 1, k)c ) = 1. Proof. In this case we have that f = Lk where L = b0 + b1 θ1 + · · · + bd−1 θd−1 . Then in the likelihood equations (3) we have that L 6= 0 and (9) (Au)1 Lk (Au)2 Lk = = .. . (u+ kb1 )θ1 Lk−1 (u+ kb2 )θ2 Lk−1 (Au)d−1 Lk = (u+ kbd−1 )θd−1 Lk−1 . So the factor Lk−1 cancels out and we obtain a linear system in the θi ’s.  12 LIKELIHOOD GEOMETRY GROUP Example 26. Let d = 3 and k = 2, that is, we consider embedding  the second Veronese  0 1 2 0 0 1 of P2 . In this case the matrix defining Ver(2, 2) is A = . The polytope 0 0 0 1 2 1 Q = conv(A) is given in Figure 3 with the labeled lattice point ai corresponding to the ith column of the matrix A. a5 a4 a1 a6 a2 a3 Figure 3. The polytope Q = conv(A) of Ver(2, 2). By (5), the ideal of ΣA ⊂ (C∗ )6 is defined by the polynomial EA in (10), (10) EA = ∆A · ∆[a1 a4 a5 ] · ∆[a3 a5 a6 ] · ∆[a1 a2 a3 ]         2c00 c10 c01 2c00 c10 2c20 c11 2c00 c01   = det c10 2c20 c11 det det det . c10 2c20 c11 2c02 c01 2c02 c01 c11 2c02 For generic values of cij in C as in equation (8), including cij = 1, we have that mldeg(V c ) = 4 = 22 . On the other hand, if we take a scaling c so that C is the matrix with all entries equal to 2, the ML degree drops to mldeg(V c ) = 1. See Table 2 for other combinations. Note that when the rank of C is 1, the ML degree is 1, illustrating Theorem 25. We also see that the converse does not hold: the ML degree can be 1 even with the rank of C equal to 3. 6. Segre Embeddings In this section, we study the maximum likelihood degree of the scaled Segre embedding V c . We give a sufficient condition for V c to have ML degree one. For c ∈ (C∗ )mn , let ψ c be the map defined by     (1) (2) (1) (2) (1) (1) (2) (1) (2) θn , θ1 , . . . , θn(2) = c11 sθ1 θ1 , . . . , cij sθi θj , . . . , cmn sθm (11) ψ c s, θ1 , . . . , θm Then V c is a scaled Segre embedding of Pm−1 × Pn−1 . In terms of the coordinates pij with 1 ≤ i ≤ m and 1 ≤ j ≤ n on Pmn−1 , the defining ideal I c of V c is given by the 2-minors of p the m × n matrix with ijth entry cijij . From this it follows that the likelihood equations (4) are ui+ pi+ u+j p+j pij pkl pil pkj = for 1 ≤ i ≤ m, = for 1 ≤ j ≤ n, = . u++ p++ u++ p++ cij ckl cil ckj P P Pm Pn Here ui+ = nj=1 uij , u+j = m j=1 uij . We define pi+ , p+j , and i=1 uij , and u++ = i=1 p++ analogously.  For all c ∈ (C∗ )mn , we have deg(V c ) = m+n−2 . If c = (1, 1, . . . , 1, 1), then the ML degree m−1 c of V is well known to be one (see [PS05, Example 1.12] and [DSS09, Example 2.1.2]). Also THE ML DEGREE OF TORIC VARIETIES C  2 1 1  2 2 1  2 2 1  -2 2 2  17 22 27  2 3 3  2 2 2 ∆A ∆[a1 a4 a5 ]  1 1 2 1 1 2  2 1 2 3 3 2  2 1 2 2 2 2 ∆[a3 a5 a6 ] ∆[a1 a2 a2 ] mldeg 6= 0 6= 0 6= 0 6= 0 4 0 0 6= 0 6= 0 3 0 0 0 6= 0 2 0 0 0 1 6= 0 6= 0 6= 0 3 0 6= 0 0 6= 0 2 0 0 0 0 1  2 2 -2 2  = 6 0 2 -2  22 27 29 36 0 36 45  3 3 5 5 5 5  2 2 2 2 2 2 13 Table 2. The ML degree of (Ver(2, 2)c ) for different scalings cij in the matrix C. the principal A-determinant for Segre embedding is easy to describe [GKZ94, Chapter 9, Section 1]: min(m,n) (12) EA = Y i=1 Y det[a1 , . . . , ai ; b1 , . . . , bi ] 1≤a1 <···<ai ≤m 1≤b1 <···<bi ≤n where [a1 , . . . , ai ; b1 , . . . , bi ] is the submatrix of c indexed by the rows 1 ≤ a1 < · · · < ai ≤ m and the columns 1 ≤ b1 < · · · < bi ≤ n. Example 27. Let V c be the scaled Segre variety with scaling   1 c12 c13 c =  c21 c22 1  ∈ M3,3 (C∗ ). 1 1 1 14 LIKELIHOOD GEOMETRY GROUP Here, m = n = 3, and the matrix A is given by  1 1 1 0 0 0  0 0 0 1 1 1   0 0 0 0 0 0 A=  1 0 0 1 0 0  0 1 0 0 1 0 0 0 1 0 0 1  The degree of V c is 3+3−2 = 6. The assignments 3−1 0 0 1 1 0 0 0 0 1 0 1 0 0 0 1 0 0 1     .   (c12 , c13 , c21 , c22 ) ∈ {(1, 1, 1, 1), (2, 1, 1, 1), (2, 3, 1, 1), (2, 3, 1, 2), (2, 3, 2, 1), (2, 3, 2, 3)} produce, respectively, the ML degrees mldeg(V c ) = 1, 2, 3, 4, 5, 6. This shows V c can have any ML degree i, for 1 ≤ i ≤ deg(V c ). Conjecture 28. For each i ∈ {1, . . . , deg(V )}, there exists c ∈ (C∗ )mn such that the scaled Segre variety V c has ML degree i. Example 29. The scaled toric variety  1 1 1 1 1  1 1 1 1 0 A=  1 1 0 0 1 1 0 1 0 1 V c with the configuration 1 0 1 0 1 0 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1  0 0   0  0 is isomorphic to the scaled Segre embedding of P1 × P1 × P1 × P1 into P15 . The degree of V c in this instance is 24. For each of the possible ML degrees i = 1, 2, . . . , 24, we have found a scaling vector c ∈ (C∗ )16 for which mldeg(V c ) = i. We see from (12) that for a point to lay in the vanishing of the principal A-determinant we must have that certain minors of the matrix (cij ) vanish; this observation informed our choice of scaling vector c. We conclude this section with a result analogous to Theorem 25. Proposition 30. If rank(c) = 1, then mldeg(V c ) = 1. Proof. If rank(c) = 1 then all the 2-minors of c vanish. This implies that cij ckl = cil ckj for all 1 ≤ i, k ≤ m and 1 ≤ j, l ≤ n. Then our likelihood equations reduce to ui+ pi+ p+j u+j = = for 1 ≤ i ≤ m for 1 ≤ j ≤ n, pij pkl = pil pkj , u++ 1 u++ 1 which are the likelihood equations for the unscaled Segre embedding of Pm−1 × Pn−1 . This is known to have ML degree equal to one.  7. Hierarchical log-linear and graphical models A large class of discrete exponential models that are used in statistical practice are hierarchical log-linear models [BFH07] and undirected graphical models [Lau96]. In both cases, the toric variety is constructed via a parametrization based on a simplicial complex where the vertices of the simplicial complex correspond to discrete random variables. In the second case, the simplicial complex is the clique complex of a given graph. These toric varieties, their defining ideals, and the polyhedral geometry of Q = conv(A) of the underlying matrix A have been intensely studied starting with [HS02] for the hierarchical log-linear models and [GMS06] for graphical models. THE ML DEGREE OF TORIC VARIETIES 15 Decomposable models form a subclass of these models, and they present attractive factorization properties. For instance, a graphical model is decomposable if and only if the underlying graph is a chordal graph [Lau96]. In particular, we have the following. Theorem 31. [GMS06, Theorem 4.4] A hierarchical log-linear model, and hence an undirected graphical model, is decomposable if and only if the ML degree of the corresponding toric variety is one. For example, the (unscaled) Segre embedding of Pm1 ×· · ·×Pmk is a decomposable graphical model, and hence has ML degree one. In this section we consider some examples of nondecomposable models. First we study a family of examples known as no-three-way interaction models. 7.1. No-three-way interaction models. Example 32 (Binary 3-cycle). Consider the hierarchical log-linear model arising from the 3-cycle depicted in Figure 4. This is also known as the no-three-way interaction model. We let the random variables X, Y, Z corresponding to the vertices to be binary variables. One parametrization ψ : (C∗ )6 → (C∗ )8 is given by the matrix   0 0 0 0 1 1 1 1  0 0 1 1 0 0 1 1     0 1 0 1 0 1 0 1  A= .  0 0 0 0 0 0 1 1   0 0 0 1 0 0 0 1  0 0 0 0 0 1 0 1 We see that the 6 × 8 matrix A is in general position as in Section 3.1. Hence, the toric variety V defined by A is a hypersurface with a generator of full support. For i, j, k ∈ {0, 1}, let pijk = prob(X = i, Y = j, Z = k). Labeling the columns of the matrix with the pijk in increasing lexicographic order, we find that the unique toric generator is g = p000 p011 p101 p110 − p001 p010 p100 p111 . By Corollary 16, the principal A-determinant is equal to the A-discriminant, and it is ∆A = c000 c011 c101 c110 − c001 c010 c100 c111 . The toric variety itself has degree 4 since it has a single degree 4 generator. However, if we choose the scaling coefficients cijk = 1 for all i, j, k ∈ {0, 1}, we see that this scaling vector lies in ΣA , and thus mldeg(V c ) drops, in this case, to 3. In fact, for this example, the only possibilities for mldeg(V c ) are 3 when the scaling vector lies in ΣA and 4 when the scaling vector does not. X Y Z Figure 4. The 3-cycle. 16 LIKELIHOOD GEOMETRY GROUP Proposition 33. The ML degree of the binary 3-cycle is 4 unless c ∈ (C∗ )d+1 is in ΣA . If c ∈ ΣA , then mldeg(V c ) = 3. Proof. We fix the lexicographic monomial ordering p000 > p001 > p010 > · · · > p111 > c000 > c001 > · · · > c111 over Q[p000 , p001 , p010 , p011 , p100 , p101 , p110 , p111 , c000 , c001 , c010 , c011 ,P c100 , c101 , c110 , c111 ]. 8 Let u = (u000 , . . . , u111 ) be a data vector in Z and let u+ = uijk . Consider I = h g , ∆A , Lf (p) − 1 , u+ L1 (p) − (Au)1 , . . . , u+ L6 (p) − (Au)6 i P where f = cijk pijk . Using [GS17] and the random data vector u = (2, 3, 5, 7, 11, 13, 17, 19), we calculate a Gröbner basis for I: g1 = c000 c011 c101 c110 − c001 c010 c100 c111 g2 = 5021863p3111 c3111 − 3752210p2111 c2111 + 984280p111c111 − 89856 g3 = 77p110 c110 + 77p111 c111 − 36 g4 = 17472p110 c001 c010 c100 − 456533p3111c000 c011 c101 c2111 + 341110p2111 c000 c011 c101 c111 + · · · g5 = 77p101 c101 + 77p111 c111 − 32 g6 = 19656p101 c001 c010 c100 − 456533p3111c000 c011 c110 c2111 + 341110p2111 c000 c011 c110 c111 + · · · g7 = 77p100 c100 − 77p111 c111 + 8 g8 = 184320p100 c000 c011 − 73501813p101p110 p2111 c001 c010 c3111 + · · · g9 = 77p011 c011 + 77p111 c111 − 26 g10 = 359424p011 c001 c010 − 115502849p100p3111 c000 c101 c110 c2111 + · · · g11 = 11p010 c010 − 11p111 c111 + 2 g12 = 287539200p010c000 − 1097794317389p011p101 p110 p2111 c001 c100 c3111 + · · · g13 = 77p001 c001 − 77p111 c111 + 16 g14 = 4313088p001 c000 − 12619941719p011p101 p110 p2111 c010 c100 c3111 + · · · g15 = 1725235200p000 − 59243384844259p001p010 p100 p3111 c011 c101 c110 c2111 + · · · As long as each cijk ∈ C∗ and satisfies the equation g1 = ∆A = 0, we see that g2 is a univariate polynomial in p111 of degree 3, and the initial terms of g3 through g15 have degree 1 in pijk . Therefore, when the coefficient vector lies in ΣA , the ML degree is always 3.  More generally, we consider the no-three-way interaction model Cm based on the 3-cycle with one m-ary variable and two binary variables. That is, for i ∈ {0, . . . , m − 1} and j, k ∈ {0, 1}, we set pijk = prob(X = i, Y = j, Z = k) = aij bik cjk . One can compute the normalized volume of Q = conv(Am ) for the matrix Am associated Cm . This gives a formula for the degree of Cm . Proposition 34. The degree of Cm is m2m−1 . THE ML DEGREE OF TORIC VARIETIES 17 When m = 3, deg(C3 ) = 12 and mldeg(C3 ) = 7. The toric ideal is hp100 p111 p201 p210 −p101 p110 p200 p211 , p000 p011 p101 p110 −p001 p010 p100 p111 , p000 p011 p201 p210 −p001 p010 p200 p211 i. Observe that the toric variety is not a hypersurface, so calculating the principal A-determinant requires more work than the previous example. When we compute ∆A3 , the A-discriminant for the whole polytope Q = conv(A3 ), we do not get a hypersurface: ∆A = hc100 c111 c201 c210 − c101 c110 c200 c211 , c000 c011 c101 c110 − c001 c010 c100 c111 , c000 c011 c201 c210 − c001 c010 c200 c211 i. We already see that c = (1, 1, . . . , 1, 1) is in ΣA and hence we know mldeg(C3c ) < deg(C3 ) = 12. Also comparing the toric variety and the discriminant locus ∇A3 we see that they are identical. Such a toric variety is known as self-dual. Based on our computations for m ≤ 5 we state the following conjecture. Conjecture 35. The no-three-way interaction model with one m-ary variable and two binary variables is self-dual. To compute the entire principal A-determinant, we need to consider all faces of Q. If a face Γ has dimension e and |Γ ∩ A3 | = e + 1, then ∆Γ∩A3 is the unit ideal. Moreover, for all codimension one and codimension two faces Γ which are not simplices, we observe that ∇Γ∩A3 are not hypersurfaces. They also lie in a coordinate hyperplane. For instance, for the facet Γ where the elements of Γ ∩ A3 correspond to {p001 , p011 , p100 , p101 , p110 , p111 , p200 , p201 , p210 , p211 } the discriminant is defined by h c001 , c011 , c100 c111 c201 c210 − c101 c110 c200 c211 i. Therefore, for c = (1, 1, . . . , 1, 1), these discriminants do not contribute to a drop in the ML degree. There is a total of three codimension 3 faces that are not simplices. In each case Γ ∩ A3 is in general position and their discriminants are given by Corollary 16. We list the indeterminates which correspond to the elements of Γ ∩ A3 in each of these three faces: {p000 , p001 , p010 , p011 , p100 , p101 , p110 , p111 }, {p000 , p001 , p010 , p011 , p200 , p201 , p210 , p211 }, {p100 , p101 , p110 , p111 , p200 , p201 , p210 , p211 }. It turns out that each face of codimension > 3 is a simplex and there are no more discriminants contributing to the principal A-determinant. Based on our computations for m ≤ 5, we state the following conjecture. Conjecture 36. The ML degree of Cm is 2m − 1. 7.2. The binary 4-cycle. The binary 4-cycle is the model we have used in Example 3. Let S, B, H, L be four binary random variables and let X = (S, B, H, L) be the joint random variable where we set pijkℓ = prob(S = i, B = j, H = k, L = ℓ). 18 LIKELIHOOD GEOMETRY GROUP The family of probability distributions for X which factor according to the graphical model depicted in Figure 1 can be described by the following monomial parametrization: let aij , bjk , ckℓ , diℓ be parameters for i, j, k, ℓ ∈ {0, 1} and let pijkℓ = aij bjk ckℓ diℓ . Below is the matrix A arising from a different parametrization that gives a full rank matrix. The columns are labeled by p0000 , p0001 , . . . , p1111 in increasing lexicographic ordering.       A=     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 1 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 1 1 1 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 0 1 0 0 0 1 1 0 1 1 0 0 1 1 1 1 0 1 1 0 0 1 1 1 1 1 1 1 1            The Zariski closure V of the image of this parametrization is a toric variety that is defined by the following prime ideal: I = h p1011 p1110 − p1010 p1111 , p0111 p1101 − p0101 p1111 , p1001 p1100 − p1000 p1101 , p0110 p1100 − p0100 p1110 , p0011 p1001 − p0001 p1011 , p0011 p0110 − p0010 p0111 , p0001 p0100 − p0000 p0101 , p0010 p1000 − p0000 p1010 , p0100 p0111 p1001 p1010 − p0101 p0110 p1000 p1011 , p0010 p0101 p1011 p1100 − p0011 p0100 p1010 p1101 , p0001 p0110 p1010 p1101 − p0010 p0101 p1001 p1110 , p0001 p0111 p1010 p1100 − p0011 p0101 p1000 p1110 , p0000 p0011 p1101 p1110 − p0001 p0010 p1100 p1111 , p0000 p0111 p1001 p1110 − p0001 p0110 p1000 p1111 , p0000 p0111 p1011 p1100 − p0011 p0100 p1000 p1111 , p0000 p0110 p1011 p1101 − p0010 p0100 p1001 p1111 i. The degree of this toric variety is 64 and mldeg(V ) = 13. This was computed in [GMS06, p. 1484] where the question of explaining the fact mldeg(V ) = 13 was first raised. One road to an explanation is to compute the A-discriminants of all the faces of Q = conv(A), and then determine the contribution of each for the drop in the ML degree. There are multiple faces that might contribute to such a drop. At this moment, we do not understand how different discriminants interact. Also, it is not possible to compute every discriminant. For instance, with standard elimination methods we were not able to compute ∆A P corresponding 16 ai to the entire polytope. However, one can check that the polynomial f = where i θ ∗ d−1 c = (1, 1, . . . , 1, 1) has singularities in (C ) . Hence, we conclude that ∆A does contribute to the drop from the generic ML degree. However, we can compute discriminants for facets and lower codimension faces. The polytope Q has 24 facets. Of these, 6 correspond to the 0 ideal and 2 correspond to toric hypersurfaces of the form c0001 c1101 − c0110 c1100 . Of the remaining 16 facets, eight lie on a coordinate hyperplane. An example of such a discriminant is hc1101 , c0011 , c0001 c0110 c1010 c1100 − c0010 c0101 c1000 c1110 − c0001 c0100 c1010 c1110 + c0000 c0101 c1010 c1110 i. There are 5 facets which give rise to hypersurfaces, and most are too long to display. Of these discriminants, there are three of degree 5, one of degree 6, and one of degree 16. The remaining three facets are neither of the above types. Two have 5 generators of degree 4 of THE ML DEGREE OF TORIC VARIETIES 19 the form hc0000 c0111 c1011 c1101 − c0011 c0100 c1001 c1111 + c0001 c0100 c1011 c1111 − c0000 c0101 c1011 c1111 , c0000 c0111 c1011 c1100 − c0011 c0100 c1000 c1111 , c0011 c0111 c1001 c1100 − c0001 c0111 c1011 c1100 − c0011 c0111 c1000 c1101 + c0011 c0101 c1000 c1111 , c0000 c0111 c1001 c1100 − c0000 c0111 c1000 c1101 − c0001 c0100 c1000 c1111 + c0000 c0101 c1000 c1111 , c0011 c0100 c1001 c1100 − c0001 c0100 c1011 c1100 + c0000 c0101 c1011 c1100 − c0011 c0100 c1000 c1101 i, and the remaining discriminant has 3 generators of degree 2, hc1001 c1100 − c1000 c1101 , c0011 c0110 − c0010 c0111 , c0001 c0100 − c0000 c0101 i. Because there are discriminants of codimension one faces that are not hypersurfaces, we must also analyze the 168 codimension two faces of Q. Of these, 86 are trivial and 61 correspond to toric hypersurfaces. Of the remaining 21, there is only a single face whose discriminant does not lie on a coordinate hyperplane, and the discriminant of this face is a hypersurface generated by c0110 c1000 c1011 c1101 + c0100 c1001 c1011 c1110 − c0100 c1001 c1010 c1111 . 8. ML Estimate Homotopies In this section we use homotopy continuation to track between ML estimates of different scalings of a given statistical model. Moreover, the endpoints may correspond to different scalings of the model with different ML degrees. Consider the case where we have found a particular scaling ceasy such that the ML degree drops to one, but we really wish to compute the ML estimate for the natural statistical model corresponding to the scaling cstat . The strategy is to apply a parameter homotopy [LSY89], [MS89] between ceasy and cstat , tracking the unique solution of the former to a solution of the latter. We argue that the endpoint is the unique ML estimate in Birch’s Theorem 9. Example 37. (Veronese) We illustrate the strategy with a Veronese model. Let   1 1 1 1 1 1 A =  0 1 2 0 1 0 , 0 0 0 1 1 2 with cstat = (1, 1, 1, 1, 1, 1) and ceasy = (1, 2, 1, 2, 2, 1). We can check (see Section 5) that the ML degree corresponding to cstat is 4, while the ML degree for ceasy is 1. Suppose we observe the data vector u = (1, 3, 5, 7, 9, 2). Computing the unique solution for ceasy we obtain the ML estimate θ̂easy = (0.0493, 1.8333, 1.6667). We track this point with a parameter homotopy (14) towards cstat , and obtain the point θ̂track = (0.0863, 1.6326, 1.5150) with corresponding p̂stat = (0.09, 0.14, 0.23, 0.13, 0.21, 0.20). The homotopy we track is   27θ1 θ22 + 54θ1 θ2 θ3 + 27θ1 θ32 + 54θ1 θ2 + 54θ1 θ3 + 27θ1 − 27  H (θ, t) = t ·  54θ1 θ22 + 54θ1 θ2 θ3 + 54θ1 θ2 − 22 2  54θ1 θ22θ3 + 54θ1 θ3 + 54θ1 θ32 − 20  (13) 27θ1 θ2 + 27θ1 θ2 θ3 + 27θ1 θ3 + 27θ1 θ2 + 27θ1 θ3 + 27θ1 − 27  +(1 − t) ·  54θ1 θ22 + 27θ1 θ2 θ3 + 27θ1 θ2 − 22 2 27θ1 θ2 θ3 + 54θ1 θ3 + 27θ1 θ3 − 20 20 LIKELIHOOD GEOMETRY GROUP Or alternatively, if we define c(t) = 27 + 27t, we can write it as   27θ1 θ22 + c(t)θ1 θ2 θ3 + 27θ1 θ32 + c(t)θ1 θ2 + c(t)θ1 θ3 + 27θ1 − 27 54θ1 θ22 + c(t)θ1 θ2 θ3 + c(t)θ1 θ2 − 22 (14) H (θ, t) = .  2 c(t)θ1 θ2 θ3 + 54θ1 θ3 + c(t)θ1 θ3 − 20 To verify this, we solve the critical equations for cstat to obtain the four solutions (0.2888, 1.4316, −1.8931), (0.3039, −1.8847, 1.3470), (0.8578, −0.7629, −0.7189), (0.0863, 1.6326, 1.5150), where θ̂stat is the solution with positive coordinates. Observe that θ̂track = θ̂stat , as desired. Let ceasy and cstat be scalings with positive entries. Let Feasy (u, θ) be the difference of the left and right sides of the equations of Definition 6 with c taken to be ceasy , and similarly for Fstat (u, θ). We may now state the main result of this section. Theorem 38. Fix a generic data vector u with positive entries. Let p̂easy and p̂stat be the respective ML estimates for these scaling problems for the data u and consider the homotopy below: H (θ, t) = t · Feasy (u, θ) + (1 − t) · Fstat (u, θ). Let γ denote the path of the homotopy whose start point (at t = 1) corresponds to p̂easy . Then the endpoint of γ (at t = 0) is p̂stat . Proof. By Birch’s theorem (Theorem 9), the likelihood equations are given by Ap̂ = u1+ Au for a data vector u. Let p̂win and p̂stat be the two monomial vectors for ceasy and cstat respectively. The homotopy above can be rewritten as A · (tp̂c(t) + u1+ u) where c(t) = tcstat + (1 − t)ceasy . Since c(t) is positive for any positive real ceasy , cstat and t ∈ [0, 1], Birch’s theorem states that there is exactly one positive real solution to this system at every point along the homotopy path. Thus, as long as no paths intersect, the unique solution for ceasy will track to the unique positive real solution for cstat . But paths only intersect where the Jacobian of the system drops rank, which we now show cannot occur. For a value of p̂ at some point on the path, the Jacobian matrix can be written as the product  ∂p1  ∂p1 · · · ∂θ1 ∂θd   A  ... . . . ...  . ∂pn ∂θ1 ··· Because we require the θi ’s to be nonzero, we  ∂p1 1 θ1 ∂θ1 · · · θd ∂p ∂θd  .. .. A  ... . . n n θ1 ∂p · · · θd ∂p ∂θ1 ∂θd ∂p ∂pn ∂θd can write this as    1 1  . ,...,  diag θ1 θd Note that if we denote A = (aij ), then θi ∂θji = aij pj , so we may rewrite the middle matrix as diag(p1 , p2 , . . . , pn )AT and the Jacobian thus factors as   1 1 T A diag(p1 , . . . , pn ) A diag . ,..., θ1 θd This is a product of full rank matrices, hence the Jacobian has full rank.  Time (s) THE ML DEGREE OF TORIC VARIETIES 1.5 1.5 1 1 0.5 0.5 0 0 4 6 8 10 ni d−1=5 12 21 1.5 1 0.5 0 4 6 8 10 12 ni d − 1 = 10 4 6 8 10 12 ni d − 1 = 15 Figure 5. Running times of iterative proportional scaling (triangles) versus path tracking (circles) on the rational normal scroll (6) for three choices of d − 1 with ni ’s constant. Average of 7 trials. Notice that the straight-line homotopy between Feasy and Fstat is equivalent to a parameter homotopy between ceasy and cstat ; see Example 37. 8.1. Timings. To test the viability of using homotopy methods, we ran timing comparisons with the iterative proportional scaling algorithm (IPS, Algorithm 2.1.9 in [DSS09]). We programmed IPS in Python using numpy for fast linear algebra calculations and a target residual of ǫ = 10e−12 , while for the homotopy approach we used Macaulay2 [GS17] for setup and PHCpack [Ver99] for the actual path tracking. We choose the rational normal scroll (6) example from Section 4, setting ni = k for all i and varying  k ∈ {4, . . . , 13} and ni d − 1 ∈ {5, 10, 15}. For the homotopy start system, we set cij = j and tracked from the closed form solution given in Example 20. It is clear from Figure 5 that as the problem size grows, the homotopy method has a significant speed advantage over the iterative proportional scaling algorithm.1 References [BD76] Peter J. Bickel and Kjell A. Doksum, Mathematical statistics, Holden-Day, Inc., San Francisco, Calif.-Düsseldorf-Johannesburg, 1976, Basic ideas and selected topics, Holden-Day Series in Probability and Statistics. [BFH07] Yvonne M. M. Bishop, Stephen E. Fienberg, and Paul W. Holland, Discrete multivariate analysis: theory and practice, Springer, New York, 2007, With the collaboration of Richard J. Light and Frederick Mosteller, Reprint of the 1975 original. [CHKS06] Fabrizio Catanese, Serkan Hoşten, Amit Khetan, and Bernd Sturmfels, The maximum likelihood degree, Amer. J. Math. 128 (2006), no. 3, 671–697. [CLS11] David A. Cox, John B. Little, and Henry K. Schenck, Toric varieties, Graduate Studies in Mathematics, vol. 124, American Mathematical Society, Providence, RI, 2011. [DR72] J. N. Darroch and D. Ratcliff, Generalized iterative scaling for log-linear models, Ann. Math. Statist. 43 (1972), 1470–1480. [DSS09] Mathias Drton, Bernd Sturmfels, and Seth Sullivant, Lectures on algebraic statistics, Oberwolfach Seminars, vol. 39, Birkhäuser, Basel, Switzerland, 2009. [EH85] David Edwards and Tomáš Havránek, A fast procedure for model search in multidimensional contingency tables, Biometrika 72 (1985), no. 2, 339–351. MR 801773 [Ful93] William Fulton, Introduction to toric varieties, Annals of Mathematics Studies, vol. 131, Princeton University Press, Princeton, NJ, 1993, The William H. Roever Lectures in Geometry. , Intersection theory, 2nd ed., Springer, 1998. [Ful98] 1Source code can be found at https://github.com/nbliss/Likelihood-MRC 22 [GKZ94] [GMS06] [GS17] [HKS05] [HRS14] [HS02] [HS14] [HS17] [Huh13] [Huh14] [Lau96] [LSY89] [Mac98] [MS89] [Pet08] [PS05] [R+ 81] [Ver99] [Vuc16] LIKELIHOOD GEOMETRY GROUP I. M. Gelfand, M. M. Kapranov, and A. V. Zelevinsky, Discriminants, resultants, and multidimensional determinants, Mathematics: Theory & Applications, Birkhäuser Boston, Inc., Boston, MA, 1994. Dan Geiger, Christopher Meek, and Bernd Sturmfels, On the toric algebra of graphical models, Ann. Statist. 34 (2006), no. 3, 1463–1492. Daniel R. Grayson and Michael E. Stillman, Macaulay2, a software system for research in algebraic geometry, Available at http://www.math.uiuc.edu/Macaulay2/, 2017. Serkan Hoşten, Amit Khetan, and Bernd Sturmfels, Solving the likelihood equations, Found. Comput. Math. 5 (2005), no. 4, 389–407. Jonathan Hauenstein, Jose Israel Rodriguez, and Bernd Sturmfels, Maximum likelihood for matrices with rank constraints, J. Algebr. Stat. 5 (2014), no. 1, 18–38. Serkan Hoşten and Seth Sullivant, Gröbner bases and polyhedral geometry of reducible and cyclic models, J. Combin. Theory Ser. A 100 (2002), no. 2, 277–301. June Huh and Bernd Sturmfels, Likelihood geometry, Combinatorial algebraic geometry, Lecture Notes in Math., vol. 2108, Springer, Cham, 2014, pp. 63–117. Martin Helmer and Bernd Sturmfels, Nearest points on toric varieties, Mathematica Scandinavica (2017), to appear. June Huh, The maximum likelihood degree of a very affine variety, Compos. Math. 149 (2013), no. 8, 1245–1266. June Huh, Varieties with maximum likelihood degree one, Journal of Algebraic Statistics 5 (2014), 1–17. Steffen L. Lauritzen, Graphical models, Oxford Statistical Science Series, vol. 17, The Clarendon Press, Oxford University Press, New York, 1996, Oxford Science Publications. T. Y. Li, Tim Sauer, and J. A. Yorke, The cheaters homotopy: An efficient procedure for solving systems of polynomial equations, SIAM Journal on Numerical Analysis 26 (1989), no. 5, 1241– 1251. Ian Grant Macdonald, Symmetric functions and hall polynomials, Oxford university press, 1998. Alexander P. Morgan and Andrew J. Sommese, Coefficient-parameter polynomial continuation, Appl. Math. Comput. 29 (1989), no. 2, 123–160. Sonja Petrović, On the universal Gröbner bases of varieties of minimal degree, Math. Res. Lett. 15 (2008), no. 6, 1211–1221. Lior Pachter and Bernd Sturmfels, Algebraic statistics for computational biology, Cambridge University Press, New York, NY, USA, 2005. Z. Reiniš et al., Prognostic significance of the risk profile in the prevention of coronary heart disease, Bratis. Lek. Listy 76 (1981), 137–150. J. Verschelde, Algorithm 795: PHCpack: A general-purpose solver for polynomial systems by homotopy continuation, ACM Trans. Math. Softw. 25 (1999), no. 2, 251–276. Radoslav Vuchkov, The maximum likelihood degree of various toric varieties, Master’s thesis, San Francisco State University, 2016.
10math.ST
arXiv:1606.02097v1 [math.GR] 7 Jun 2016 PRIMITIVE PERMUTATION GROUPS WITH A SUBORBIT OF LENGTH 5 AND VERTEX-PRIMITIVE GRAPHS OF VALENCY 5 JOANNA B. FAWCETT, MICHAEL GIUDICI, CAI HENG LI, CHERYL E. PRAEGER, GORDON ROYLE, GABRIEL VERRET Abstract. We classify finite primitive permutation groups having a suborbit of length 5. As a corollary, we obtain a classification of finite vertex-primitive graphs of valency 5. In the process, we also classify finite almost simple groups that have a maximal subgroup isomorphic to Alt(5) or Sym(5). 1. Introduction All graphs and groups considered in this paper are finite. Let G be a transitive permutation group on a set Ω and let ω ∈ Ω. An orbit of the point-stabiliser Gω is called a suborbit of G and it is non-trivial unless it is {ω}. It is an easy exercise to show that if a primitive permutation group has a non-trivial suborbit of length one, then it must be regular of prime order, while if it has a suborbit of length two, it must be dihedral of degree an odd prime. Primitive groups with a suborbit of length three have a more complicated structure. Classifying them is non-trivial and was accomplished by Wong [34] using the work of Sims [24]. The classification of primitive groups with a suborbit of length four is even more difficult. After some partial results by Sims [24] and Quirin [23], this was finally completed by Wang [26] using the classification of finite simple groups. Wang then turned his attention to the case of primitive groups with a suborbit of length 5. He proved some strong partial results [27, 28] but was unable to complete this project. This classification is the main result of our paper. Theorem 1.1. A primitive permutation group G has a suborbit of length 5 if and only if (G, Gv ) appears in Table 1 or 2. Note that each row in Table 1 corresponds to a unique primitive permutation group G with a suborbit of length 5 whereas, in Table 2, there exists one group for each value of the parameter p. (Throughout this paper, p always denotes a prime, while Dn denotes a dihedral group of order 2n.) The classification of primitive groups with suborbits of length three or four was used by Li, Lu and Marušič [19] to obtain a classification of arc-transitive vertexprimitive graphs of valency three or four. Similarly, as an application of Theorem 1.1, we prove the following: Theorem 1.2. A 5-valent graph Γ is vertex-primitive if and only if (Aut(Γ), Aut(Γ)v ) appears in Table 3. Note that a few well-known graphs appear in Table 3: the Clebsch graph in row (1), the Sylvester graph in row (2), the Odd graph O5 in row (4) and, when p = 3, the complete graph on 6 vertices in row (9) (recall that PΣL(2, 9) ∼ = Sym(6)). 1 2 J. B. FAWCETT, M. GIUDICI, C. H. LI, C. E. PRAEGER, G. ROYLE, G. VERRET (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) G Gv |G : Gv | Alt(5) D5 6 Sym(5) AGL(1, 5) 6 PGL(2, 9) D10 36 M10 AGL(1, 5) 36 PΓL(2, 9) AGL(1, 5) × Z2 36 PGL(2, 11) D10 66 Alt(9) (Alt(4) × Alt(5)) ⋊ Z2 126 Sym(9) Sym(4) × Sym(5) 126 PSL(2, 19) D10 171 Suz(8) AGL(1, 5) 1 456 J3 AGL(2, 4) 17 442 J3 ⋊ Z2 AΓL(2, 4) 17 442 Th Sym(5) 756 216 199 065 600 Table 1. Primitive groups with a suborbit of length 5: sporadic examples. (1) G Zp ⋊ Z5 Gv Z5 |G : Gv | p Conditions p ≡ 1 (mod 5) (2) Z2p ⋊ Z5 Z5 p2 p ≡ −1 (mod 5) (3) Z4p Z2p Z4p Z5 p 4 p ≡ ±2 (mod 5) p 2 p ≡ ±1 (mod 5) p 4 p ≡ ±2 (mod 5) p 4 p 6= 5 p 4 p 6= 5 p 4 p 6= 5 (4) (5) Z4p (6) ⋊ Z5 ⋊ D5 ⋊ D5 (8) (9) D5 ⋊ AGL(1, 5) AGL(1, 5) Z4p ⋊ Alt(5) Z4p ⋊ Sym(5) (7) D5 PSL(2, p) 2 Alt(5) Sym(5) Alt(5) (10) PSL(2, p ) Alt(5) (11) PΣL(2, p2 ) Sym(5) (12) PSp(6, p) Sym(5) (13) PSp(6, p) Alt(5) (14) PGSp(6, p) Sym(5) 3 p −p 120 p6 −p2 120 p6 −p2 120 p9 (p6 −1)(p4 −1)(p2 −1) 240 p9 (p6 −1)(p4 −1)(p2 −1) 120 p9 (p6 −1)(p4 −1)(p2 −1) 120 p ≡ ±1, ±9 (mod 40) p ≡ ±3 (mod 10) p ≡ ±3 (mod 10) p ≡ ±1 (mod 8) p ≡ ±3, ±13 (mod 40) p ≡ ±3 (mod 8), p > 11 Table 2. Primitive groups with a suborbit of length 5: infinite families. In the process of proving Theorem 1.1, we are led to classify almost simple groups admitting a maximal subgroup isomorphic to Alt(5) or Sym(5). PRIMITIVE GROUPS WITH A SUBORBIT OF LENGTH 5 Aut(Γ) Aut(Γ)v |V(Γ)| 3 Conditions (1) Z42 ⋊ Sym(5) Sym(5) 16 (2) PΓL(2, 9) AGL(1, 5) × Z2 36 (3) PGL(2, 11) D10 66 (4) Sym(9) Sym(4) × Sym(5) 126 (5) Suz(8) AGL(1, 5) 1 456 (6) J3 ⋊ 2 AΓL(2, 4) 17 442 (7) Th Sym(5) 756 216 199 065 600 (8) PSL(2, p) (9) 2 PΣL(2, p ) Sym(5) (10) PSp(6, p) Sym(5) (11) PGSp(6, p) Alt(5) Sym(5) p3 −p 120 p6 −p2 120 p9 (p6 −1)(p4 −1)(p2 −1) 240 p9 (p6 −1)(p4 −1)(p2 −1) 120 p ≡ ±1, ±9 (mod 40) p ≡ ±3 (mod 10) p ≡ ±1 (mod 8) p ≡ ±3 (mod 8), p > 11 Table 3. Vertex-primitive graphs of valency 5. Theorem 1.3. An almost simple group G has a maximal subgroup M isomorphic to Alt(5) or Sym(5) if and only if G appears in Table 4 or 5, respectively. Moreover, the third column in these tables gives the number c of conjugacy classes of such subgroups in G, while the fourth column gives the structure of NG (H)/H, where H is a subgroup of index 5 in M . (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) G Sym(5) J2 PSL(2, p) PSL(2, p) PSL(2, p2 ) PSL(2, 22r ) PSL(2, 5r ) PSp(6, 3) PSp(6, p) PSp(6, p) c NG (H)/H Conditions 1 Z2 1 1 2 1 p ≡ ±11, ±19 (mod 40) 2 Z2 p ≡ ±1, ±9 (mod 40) 2 Z2 p ≡ ±3 (mod 10) 1 1 r prime 1 1 r odd prime 1 Z3 1 Zp−1 p ≡ 13, 37, 43, 67 (mod 120) 1 Zp+1 p ≡ 53, 77, 83, 107 (mod 120) Table 4. Almost simple groups with maximal Alt(5). As a consequence of our results, we are also able to prove the following two corollaries. (A graph is called half-arc-transitive if its automorphism group acts transitively on its vertex-set and on its edge-set, but not on its arc-set.) Corollary 1.4. There is no half-arc-transitive vertex-primitive graph of valency 10. 4 J. B. FAWCETT, M. GIUDICI, C. H. LI, C. E. PRAEGER, G. ROYLE, G. VERRET G (1) Alt(7) (2) M11 (3) M12 ⋊ Z2 (4) J2 ⋊ Z2 (5) Th (6) PSL(2, 52 ) (7) PΣL(2, p2 ) (8) PSL(2, 22r ) ⋊ Z2 (9) PGL(2, 5r ) (10) PSL(3, 4) ⋊ hσi (11) PSL(3, 5) (12) PSp(6, p) (13) PGSp(6, 3) (14) PGSp(6, p) c NG (H)/H Conditions 1 1 1 1 1 1 1 1 1 Z2 2 1 2 Z2 p ≡ ±3 (mod 10) 1 1 r odd prime 1 1 r odd prime 1 1 σ a graph-field automorphism 1 1 2 Z2 p ≡ ±1 (mod 8) 1 1 1 Z2 p ≡ ±3 (mod 8), p > 11 Table 5. Almost simple groups with maximal Sym(5). Corollary 1.5. There are infinitely many half-arc-transitive vertex-primitive graphs of valency 12. It is easy to see that a half-arc-transitive graph must have even valency. In [19], it was proved that there is no vertex-primitive example of valency at most 8. The two results above thus imply that 12 is the smallest valency for a half-arc-transitive vertex-primitive graph, solving [19, Problem 1.3]. After some preliminaries in Section 2, we prove Theorem 1.1 in Section 3 and Theorem 1.2 in Section 4. These proofs are conditional on the proof of Theorem 1.3 which, being slightly more technical, is delayed until Section 5. We then prove Corollary 1.4 in Section 6 and Corollary 1.5 in Section 7. Before moving on to these proofs, we correct a few mistakes in the literature on this subject that have, as far as we know, gone undetected until now. 1.1. Corrections. • In [18, Theorem 1.2], it is mistakenly claimed that there exists an infinite family of 5-valent vertex-primitive 4-arc-transitive graphs. In fact, as can be inferred from Table 3, there is a unique such graph and it has order 17442. • In [19, Table 2], in the first row, one should have p ≡ 1 (mod 4). In the third row, the condition “p ≡ ±1 (mod 8), p 6= 7” should be replaced by “p ≡ ±1 (mod 24)”. In the fifth row, one should have p 6= 3. Finally, in the last row, Aut(Γ) should be PSL(3, 7).2 and the vertex-stabiliser should be Sym(4) × Sym(3). (See also next item.) • In [19, Table 3], the case when G = PSL(3, 7).hσi where σ is a graph automorphism is missing. (This can be traced back to a typographical error in [26, Theorem 1.4(6)] where it should read PSL(3, 7).2 instead of PRIMITIVE GROUPS WITH A SUBORBIT OF LENGTH 5 5 PSL(3, 7).3. Note that the correct version appears in Theorem 1.3(2) of the same paper.) • In the main theorem of [28], the case soc(G) = J3 is missing. (Indeed, this example was already known to Weiss [29].) Remark 1.6. As the above list reminds us, it is easy for a mistake to slip in with these kinds of results. This is partly because of the nature of the proofs. To increase our confidence in the correctness of our results, we have checked them against databases of known examples whenever possible. More specifically, we have checked Tables 1–3 against the database of primitive groups of degree less than 4 096 [7], and Tables 4 and 5 against the database of almost simple groups of order at most 16 000 000 implemented in Magma [2]. 2. Preliminaries In this section, as well as in Sections 6 and 7, we will need the notion of a digraph. Since this terminology has many usages, we formalise ours here. A digraph Γ is a pair (V, A) where V is a set and A is a binary relation on V . The set V is called the vertex-set of Γ and its elements are the vertices, while A is the arc-set and its elements arcs. If A is a symmetric relation, then Γ is called a graph. If (u, v) ∈ A, then v is an out-neighbour of u and u is an in-neighbour of v. The number of out-neighbours of v is its out-valency. If this does not depend on the choice of v, then it is the out-valency of Γ. An automorphism of Γ is a permutation of V that preserves A. We say that Γ is G-arc-transitive if G is a group of automorphisms of Γ that acts transitively on A. The following easy lemma will prove useful. Here, for a (not necessarily normal) subgroup H of a group G, G/H denotes the set of right H-cosets in G. Lemma 2.1. Let d > 2 and let G be a non-regular primitive permutation group such that Gv has a unique conjugacy class of subgroups of index d, and these subgroups are maximal and self-normalising in Gv . Let H be a representative of this conjugacy class, and let N = NG (H) be the normaliser of H in G. The following hold. (1) There is a one-to-one correspondence between G-arc-transitive digraphs of out-valency d and elements Hg of (N/H) \ {H}. (2) Such a digraph is a graph if and only if Hg has order 2 in N/H. (3) Gv has an orbit of length d if and only if (N/H) \ {H} 6= ∅ or, equivalently, N > H. Proof. We prove the three claims in order. (1) Let Γ be a G-arc-transitive digraph of out-valency d. Since Γ is G-arctransitive, Γ also has in-valency d. Also Gv is transitive on the d inneighbours of v and hence the stabilisers of these in-neighbours form a conjugacy class of subgroups of Gv of index d. As there is a unique such conjugacy class and H is contained in it, we have H = Guv for some inneighbour u of v. Since H is a self-normalising proper subgroup of Gv , it follows that u is the unique in-neighbour of v fixed by H (this is easily proved, and, for example, is set as an exercise in [10, Exercise 1.6.3]). The same argument on out-neighbours shows that H = Gvw for a unique outneighbour w of v. Since Γ is G-arc-transitive, there exists a unique coset Hg ∈ G/H such that (u, v)g = (v, w). Note that H g = Gguv = Gvw = H, and hence Hg ∈ N/H. Also u 6= v, and hence Hg 6= H. Thus ϕ : Γ → Hg 6 J. B. FAWCETT, M. GIUDICI, C. H. LI, C. E. PRAEGER, G. ROYLE, G. VERRET is a well-defined map from G-arc-transitive digraphs of out-valency d to (N/H) \ {H}. We show that ϕ is a bijection. To show that ϕ is onto, let Hg ∈ (N/H) \ {H}, and let w = v g . Since g∈ / Gv , w 6= v. Let Γ be the G-arc-transitive digraph with arc-set (v, w)G . We have H = H g 6 (Gv )g = Gw and thus H 6 Gvw . Since G is primitive but not regular, we have Gvw < Gv . As H is maximal in Gv , it follows that H = Gvw , and hence Γ has out-valency d. Finally, as in the previous paragraph, Gvw = H = Guv for some unique in-neighbour u of v, and we have (u, v)g = (v, w) so ϕ(Γ) = Hg. To show that ϕ is one-to-one, suppose that Γ = (V, A) and ∆ = (V, B) are G-arc-transitive digraphs of out-valency d with images ϕ(Γ) = Hg and ϕ(∆) = Hk such that Hg = Hk. By the first paragraph of the proof, H = Guv where A = (u, v)G , ug = v and g ∈ N \ Gv , and also H = Gxv , where B = (x, v)G , xk = v and k ∈ N \ Gv . Since Hg = Hk, we have k = hg for some h ∈ H, and so ug = v = xk = xhg = xg . Hence u = x which implies that A = B and Γ = ∆. (2) Suppose that Γ is a G-arc-transitive graph of valency d. Adopting the notation from the first paragraph of the proof of (1), we can choose u and w such that u = w. Hence (u, v)g = (v, u) and g 2 ∈ Guv = H. In other words, Hg has order 2. Conversely, if Hg is an element of order 2 in (N/H)\{H} then, adopting the notation from the second paragraph of the proof of (1), we have that 2 g 2 ∈ H = Gvw . Hence wg = v g = v and (w, v) = (v, w)g , so Γ is a graph. (3) Suppose that Gv has an orbit of length d. Let w be an element of that orbit, and let Γ be the digraph with arc-set (v, w)G . Clearly, Γ is G-arc-transitive and has out-valency d. Hence, by (1), (N/H) \ {H} 6= ∅. Conversely, if (N/H) \ {H} 6= ∅, then, by (1), there exists a G-arctransitive digraph of out-valency d and thus Gv has an orbit of length d.  2.1. Brauer characters. We will often use the Brauer character tables of Sym(n), Alt(n) and their double covers for n = 4 or 5. For an algebraically closed field F of characteristic p and a group G, the Brauer character of a finite-dimensional F representation ϕ of G is a function that maps each p-regular element g of G to the sum of lifts to C of the eigenvalues of ϕ(g) (see [13] for definitions). The Brauer character of ϕ is the sum of the Brauer characters of the irreducible constituents of ϕ, and two irreducible representations are equivalent precisely when their Brauer characters are equal [13, Theorem 15.5], which occurs exactly when their characters are equal [13, Corollary 9.22]. The Brauer character table describes the irreducible Brauer characters. If p ∤ |G|, then the Brauer table is the same as the complex character table [13, Theorem 15.13] and, for the groups above, can be accessed in GAP [11] or Magma [2], as well as the Atlas [6] when n = 5. Otherwise, the Brauer table can be accessed in GAP, or the Brauer Atlas [15] when n = 5. See [15] for details on how to read the tables, and [3, Section 4.2] for information about irrationalities. The following theory will be used in conjunction with Brauer character tables. Let G be a group and F a field. An irreducible F G-module V is absolutely irreducible if the extension of scalars V ⊗ E is irreducible for every field extension E of F . Note that V is absolutely irreducible if and only if EndF G (V ) = F [12, Lemma VII.2.2], where EndF G (V ) denotes the ring of F G-endomorphisms of V . The field PRIMITIVE GROUPS WITH A SUBORBIT OF LENGTH 5 7 F is a splitting field for G if every irreducible F G-module is absolutely irreducible. For a character χ of an F G-module V and a subfield K of F , let K(χ) denote the subfield of F generated by K and the image of χ. Now suppose that G is one of the groups above. By the Brauer character tables of these groups and [12, Theorem VII.2.6], F = GF(q 2 ) is a splitting field for G for any prime power q, so every irreducible representation of G over the algebraic closure of F can be realised over F . Let K = GF(q). If V is an irreducible F Gmodule with character χ, then either K(χ) = K and V = U ⊗F for some absolutely irreducible KG-module U [12, Theorem VII.1.17], or K(χ) = F and V is an irreducible KG-module of dimension 2 dimF (V ) [12, Theorem VII.1.16]. Moreover, every irreducible KG-module arises in this way. Indeed, suppose that V is an irreducible KG-module that is not absolutely irreducible, and let k := EndKG (V ). Then k is a finite field by Wedderburn’s Theorem, and V is an absolutely irreducible kG-module where k-scalar multiplication is defined to be evaluation. Let χ be the character of V as a kG-module. Then k = K(χ) by [12, Theorem VII.1.16], and K(χ) ⊆ F by [12, Theorem VII.2.6] (or the Brauer tables). Hence k = F and V is an irreducible F G-module, as desired. Further, V ⊗ F (with V as a KG-module) is a direct sum of two non-isomorphic irreducible F G-modules with the same dimension, one of which is V as an F G-module [12, Lemma VII.1.15 and Theorem VII.1.16]. 3. Proof of Theorem 1.1 For the rest of this section, let G be a primitive group, let Gv be one of its point-stabilisers, let ∆ be an orbit of Gv of length 5 and let G∆ v be the permutation group induced by the action of Gv on ∆. We first report the following result of Wang [27]. (Note that the case corresponding to Table 1 (2) was mistakenly omitted in [27].) Theorem 3.1. G∆ v is soluble if and only if (G, Gv ) appears in Table 1 (1–6,9,10) or Table 2 (1–6). It thus remains to consider the case when G∆ v is not soluble. Since it is a transitive permutation group of degree 5, it must be isomorphic to either Alt(5) or Sym(5). We first consider the case when Gv does not act faithfully on ∆. Theorem 3.2. G∆ v ∈ {Alt(5), Sym(5)} and Gv does not act faithfully on ∆ if and only if (G, Gv ) appears in Table 1 (7,8,11,12). Proof. This is essentially a result of Wang [28], except that the author left open the case when G is isomorphic to one of the Monster or Baby Monster sporadic groups and Gv is a maximal 2-local subgroup of G. By [17, Theorem 5.2] or [28], the order of Gv divides 214 · 32 · 5. This is impossible for the Monster by [4], and for the Baby Monster by [31]. Moreover, while running some computations, we noticed that Wang mistakenly excluded the cases corresponding to Table 1 (11,12).  By Theorems 3.1 and 3.2, it suffices to consider the case when Gv ∼ = G∆ v ∈ {Alt(5), Sym(5)}. Since Alt(5) and Sym(5) are 2-transitive, it follows by [22, Theorem A] that either G is almost simple, or it has a unique minimal normal subgroup which is regular. We deal with the latter case in the next two results. (Recall that a primitive group is affine if it has an elementary abelian regular normal subgroup.) 8 J. B. FAWCETT, M. GIUDICI, C. H. LI, C. E. PRAEGER, G. ROYLE, G. VERRET Lemma 3.3. If Gv ∈ {Alt(5), Sym(5)} and G has a unique minimal normal subgroup which is regular, then G is affine. Proof. Let N be the unique minimal normal subgroup of G. If N is abelian, then G is affine. We thus assume that N is non-abelian and hence N = T m for some non-abelian simple group T . Write N = T1 × · · · × Tm and let X = NGv (T1 ). By [10, Theorem 4.7B], m > 6, the action by conjugation of Gv on {T1 , . . . , Tm } is faithful and transitive, and X has a composition factor isomorphic to T . The only non-abelian composition factor of Gv is Alt(5) and thus m = |Gv : X| 6 2, which is a contradiction.  Lemma 3.4. G is affine and Gv ∈ {Alt(5), Sym(5)} if and only if (G, Gv ) appears in Table 2 (7,8). Proof. We assume that G is affine and Gv ∈ {Alt(5), Sym(5)}. By definition, G has an elementary abelian regular normal subgroup V , with V ∼ = Zdp . Note that G = V ⋊ Gv . We view V as a faithful irreducible GF(p)Gv -module. Let H be a subgroup of index 5 in Gv and let CV (H) be the centraliser of H in V . Since H is self-normalising in Gv , it follows that NG (H) = CV (H) ⋊ H. Lemma 2.1(3) implies that CV (H) 6= 0, so the trivial GF(p)H-module is a submodule of V . Suppose that p > 5 and Gv = Sym(5). In this case, V is isomorphic to a Specht module S µ for some partition µ of 5. Since the trivial GF(p)H-module is a submodule of V , [14, Theorem 9.3] implies that we can remove an element from one of the parts of µ and obtain the partition (4). If µ = (5), then V is the trivial module, a contradiction. Hence µ = (4, 1), in which case d = 4 and (G, Gv ) appears in Table 2 (8), and conversely, the pair (G, Gv ) has the required properties. Suppose that p > 5 and Gv = Alt(5). In particular, H = Alt(4). Using the Brauer character tables of Alt(4) and Alt(5), we determine that d = 4. Hence (G, Gv ) appears in Table 2 (7), and conversely, the pair (G, Gv ) has the required properties. Finally, suppose that p 6 5. Using Magma, we determine that p 6 3 and V is the deleted permutation module. Hence d = 4 and (G, Gv ) appears in Table 2 (7,8), and conversely, the pairs (G, Gv ) are examples.  By Lemmas 3.3 and 3.4 and the remark preceding them, we may now assume that G is an almost simple group. In particular, by Theorem 1.3, the possible groups G appear in Table 4 or 5. In view of Lemma 2.1 (3), Theorem 1.1 now follows by going through these tables and ignoring the rows with NG (H)/H = 1. (Row (1) of Table 4 must also be ignored as M is not core-free in G in this case.) 4. Proof of Theorem 1.2 Let Γ be a 5-valent vertex-primitive graph and let G = Aut(Γ). We first show that Γ is G-arc-transitive. Suppose, on the contrary, that Γ is not G-arc-transitive Γ(v) Γ(v) and thus Gv is intransitive. If Gv has a fixed point then, since G is primitive, it is regular and cyclic of prime order at least 7. However, a non-trivial regular abelian group G of odd order cannot be the full automorphism group of a graph since the permutation sending each element to its inverse is a nontrivial automorphism with a Γ(v) fixed point. Thus Gv has two orbits, one of length 2 and one of length 3. Having an orbit of length 2 implies that Gv is a 2-group, contradicting the fact that Gv PRIMITIVE GROUPS WITH A SUBORBIT OF LENGTH 5 9 has an orbit of length 3. This concludes the proof that Γ is G-arc-transitive. In particular, Gv has an orbit of length 5, and hence, by Theorem 1.1, (G, Gv ) appears in Table 1 or 2. It follows that G is either affine or almost simple. If G is of affine type, it has a regular elementary abelian subgroup R and Γ is a Cayley graph on R, with connection set S, say. Recall that S generates R and that |S| = 5. Since S is inverse-closed, this implies that R ∼ = Za2 for some a 6 5 and thus |G| 6 32. It is then easy to check that Γ appears in Table 3 (1) and, conversely, that the graph in Table 3 (1) does exist and has the required properties. We may now assume that G is almost simple. If Gv is not isomorphic to Alt(5) or Sym(5) then, by Tables 1 and 2, there are only finitely many possibilities for Γ (in fact, it has order at most 17442) and we can deal with them on a case-by-case basis, by computer if necessary. We obtain the graphs in Table 3 rows (2-4) and (6). We may therefore assume that Gv is isomorphic to Alt(5) or Sym(5). In particular, G appears in Table 4 or 5. Note that, in these tables, NG (H)/H always has at most one element of order 2. By Lemma 2.1 (2), it follows that |NG (H)/H| is even and that Γ is uniquely determined by G and Gv . Note that the number of choices for Gv for a given G corresponds to the number of conjugacy classes of maximal Alt(5) or Sym(5) in G, which is listed in the third column of Tables 4 and 5, respectively. It can be checked that, in the cases where there are multiple conjugacy classes, the classes are fused by an outer automorphism of G and hence the different conjugacy classes give rise to isomorphic graphs. Finally, note that the groups appearing in rows (5), (9) and (10) of Table 4 are subgroups of the ones appearing in rows (7) and (14) of Table 5. In particular, the former can be ignored as G will not be the (full) automorphism group of Γ in these cases. Finally, the groups in row (4) of Table 4 and rows (5, 7, 12, 14) of Table 5 lead to the graphs in rows (8, 7, 9, 10, 11) of Table 3. (Row (1) of Table 4 must also be ignored for the same reason as in the last section.) 5. Proof of Theorem 1.3 Throughout this section, let G be an almost simple group with socle T , let M be a maximal subgroup of G isomorphic to Alt(5) or Sym(5), and let H be a subgroup of index 5 in M . We prove Theorem 1.3 via a sequence of lemmas. Lemma 5.1. Theorem 1.3 holds if T is an alternating group. Proof. Suppose that T ∼ = Alt(n) for some n > 5. The case n 6 10 can be handled in various ways, including by computer, and we find that G appears in Table 4 rows (1,5) or Table 5 rows (1,7). (Recall that Alt(6) ∼ = PSL(2, 9) and Sym(6) ∼ = PΣL(2, 9).) We thus assume that n > 11. Note that Alt(n) 6 G 6 Sym(n) and we may view G as a permutation group of degree n in the natural way. If M is an intransitive subgroup of G, then Alt(k) × Alt(m) 6 M where n = k + m, a contradiction since n > 11. If M is imprimitive, then M = (Sym(k) ≀ Sym(m)) ∩ G where n = km and k, m > 2, so Sym(k)m ∩ Alt(n) is a normal subgroup of M , a contradiction. Finally, Alt(5) and Sym(5) have no primitive actions of degree greater than 10.  Lemma 5.2. Theorem 1.3 holds if T is a sporadic simple group. Proof. Suppose that T is a sporadic simple group. By [4, 21], we may assume that T is not the Monster. The maximal subgroups of the remaining sporadic groups can 10 J. B. FAWCETT, M. GIUDICI, C. H. LI, C. E. PRAEGER, G. ROYLE, G. VERRET be found in a variety of places, including [33] or the Atlas [6] (whose lists are not always complete). Most of the cases can be handled in a straightforward manner using the GAP package AtlasRep [32], and we find that G appears in Table 4 (2) or Table 5 (2–5). The only case which presents some difficulty is when G = Th, the Thompson sporadic group and M ∼ = Sym(5). A computation yields that |NG (H) : H| is nontrivial and we give a few details. The difficulty arises because the minimum degree of a permutation representation of Th is 143 127 000. Combined with the order of Th, this makes it computationally very hard to do any non-trivial calculations directly. To overcome this problem, we perform most calculations in one of the maximal subgroups of Th, only “pulling back” to the full group when computations in two different maximal subgroups have to be reconciled. Even using these tricks, the task is computationally non-trivial. We used Magma as it seems to perform better with very high degree permutation representations than GAP. It follows from the Atlas [6] that there is a unique choice for the conjugacy class of M and, clearly, there is a unique choice for the conjugacy class of H in M . Note that NTh (H) is a 2-local subgroup (as it normalises the Klein 4-subgroup of H) and therefore, by [30, Theorem 2.2] it must lie in either M2 or M3 , which are maximal subgroups of Th isomorphic to 25 .L5 (2) and 21+8 .A9 (in Atlas notation), respectively. We then use information from the Atlas [6] to find a permutation representation of degree 143 127 000 for M2 and M3 . Despite the very high degree, the fact that the order of Mi is known means that it is possible to construct a base and strong generating set for Mi using randomised algorithms. It is then easy to determine the orbits of Mi , and by taking the action of Mi on one of these orbits, obtain a faithful representation of Mi of a more reasonable degree. With a representation of relatively low degree (less than 106 ), it is possible to compute all the subgroups of Mi isomorphic to Sym(4) and determine their normalisers (in Mi ). Carrying out this process, we find that M2 has a single conjugacy class of subgroups isomorphic to Sym(4), while M3 has four such classes. To identify which of these classes contain H, we pull them back into the degree 143 127 000 representation of Th. Due to the extremely high degree, it is impossible to test directly the conjugacy of these groups in Th, but we can compute simple invariants of them. In particular, we can determine the number of points fixed by a representative of each class. It turns out that only one conjugacy class matches the number of fixed points of H, thereby identifying H as conjugate to a particular subgroup of M3 . We can then compute the normalizer in M3 of H to find that it has order 48, completing the verification of Table 5 (5).  We may now assume that T is a group of Lie type. By [8], it is not an exceptional group, so it must be a classical group. Let V be the natural module for T , let n be the dimension of V , let q be the order of the underlying field and p its characteristic. Lemma 5.3. If T is a classical group, then either G is as in Table 5 (10,11) or T is isomorphic to one of PSL(2, q) or PSp(6, p). Proof. For a subgroup K of PΓL(V ), we denote the preimage of K in ΓL(V ) b That is, K is the image of K b under the homomorphism φ : ΓL(V ) → by K. ΓL(V )/Z(GL(V )). PRIMITIVE GROUPS WITH A SUBORBIT OF LENGTH 5 11 Suppose first that n 6 6. The maximal subgroups of the classical groups of dimension at most 6 are given in [3]. The tables at the end of this book are especially useful. Care must be taken due to the fact that the tables give the structure of the pre-images in the matrix group instead of the projective group. One must also have in mind the many exceptional isomorphisms involving Alt(5) and Sym(5) (and other isomorphisms, such as PSp(4, 2) ∼ = Sym(6)). With this in mind, one finds that, apart from the two examples which appear in Table 5 (10,11), all examples have T isomorphic to either PSL(2, q) or PSp(6, p). From now on, we assume that n > 7. In particular, T 66 M and, since M is maximal in G, T M = G and G/T ∼ = M/(T ∩ M ). By the Schreier Conjecture, G/T is soluble, and hence T ∩ M 6= 1. Let X = soc(M ) ∼ = Alt(5). Then X 6 T , M = NG (X) and |G : T | = |M/(T ∩ M )| 6 |M/X| 6 2. In particular, if T = PΩ+ (8, q), then G does not contain a triality automorphism. Our argument is aided by Aschbacher’s Theorem for maximal subgroups of classical groups as developed in [16]. Since n > 7, either G 6 PΓL(V ) or T = PSL(V ) and G contains a graph automorphism. In both cases, G acts on the set of subspaces of V . Suppose that M is the stabiliser in G of a nontrivial decomposition V = U ⊕ W . Let m = dim(W ). Without loss of generality, we may assume that m > ⌈n/2⌉ > 4. cW . In the case where T 6= Let Yb be the subgroup of ΓL(W ) induced on W by M PSL(V ), the maximality of M implies that either U and W are both nondegenerate, or U and W are both totally singular of dimension n/2. If either T = PSL(V ) or both U and W are totally singular of dimension n/2, then Yb contains SL(W ) as a normal subgroup. However, m > 4, contradicting the fact that M is isomorphic to one of Alt(5) or Sym(5). Thus T 6= PSL(V ) and both U and W are nondegenerate. In particular, Yb contains one of SU(W ), Sp(W ) or Ωǫ (W ) as a normal subgroup. Since none of PSU(m, q) for m > 4, or PSp(m, q) for m > 4, or PΩǫ (m, q) for m > 5, have Alt(5) as a composition factor, it follows that G is an orthogonal c contains group and m = 4. Since m > n/2 it follows that n = 7 or 8. Thus M either Ω(3, q) × Ωǫ2 (4, q) or Ωǫ1 (4, q) × Ωǫ2 (4, q) as a normal subgroup. Note that, if n = 7, then q is odd. Also Ω(3, q) ∼ = PSL(2, q) for q odd, Ω− (4, q) ∼ = PSL(2, q 2 ) and + ∼ Ω (4, q) = SL(2, q) ◦ SL(2, q). Since M is insoluble and has Alt(5) as a unique nonabelian composition factor it follows that n 6= 7. Moreover, when n = 8 we must have that ǫ1 = +, ǫ2 = − and q = 2. In this case, the stabiliser of a decomposition in G will be 3-local (as PSL(2, 2) ∼ = Sym(3)) which M is not. This contradiction completes the proof that M is not the stabiliser in G of a decomposition V = U ⊕W . Suppose now that M fixes some nontrivial subspace U . As M is maximal in G, it is the stabiliser of U in G. Since M is not p-local, M is not a parabolic subgroup. In particular, T 6= PSL(V ) and U is either nondegenerate or p = 2, G is an orthogonal group and U is a nonsingular 1-space. The latter is not possible as the stabiliser of such a 1-space in PΩ± (n, q) is isomorphic to Spn−2 (q), which is not contained in Sym(5). It follows that U is nondegenerate and M also fixes U ⊥ and the decomposition V = U ⊕ U ⊥ . This contradicts the previous paragraph. We may now assume that M does not fix any nontrivial subspace of V . Suppose that, on the other hand, X does fix a nontrivial subspace U . Since M = NG (X), there is another subspace W fixed by X such that M fixes the set {U, W }. Moreover, as M is maximal in G, it is the stabiliser in G of {U, W } and either U < W or V = U ⊕ W . The latter case contradicts an earlier statement. In the former case, since M does not fix W , we must have that T = PSL(V ) and G contains a graph 12 J. B. FAWCETT, M. GIUDICI, C. H. LI, C. E. PRAEGER, G. ROYLE, G. VERRET automorphism (recall that n > 7 so T 6∼ = PSp(4, q)). However, this contradicts M not being p-local. We have shown that X does not fix any nontrivial subspace of V and hence b is irreducible. By [1, 31.1], we have X b = X b ′ ◦ Z(X). b Since Z(X) b consists of X b ′ is irreducible on V . Moreover, since X b ′ is a perfect scalars, it follows that X central extension of Alt(5), it is isomorphic to Alt(5) or 2 . Alt(5). By the Brauer b ′ , the (not necessarily absolutely) irreducible representations character table of X ′ b of X have dimension at most 6, contradicting our assumption that n > 7.  The next lemma follows from Dickson’s classification of the subgroups of PGL(2, q) [9]. Lemma 5.4. The subgroup of PSL(2, q) isomorphic to Alt(4) is self-normalising if and only if q is even or q ≡ ±3 (mod 8). For q odd, Sym(4) is a self-normalising subgroup of PGL(2, q) and it is the normaliser of an Alt(4). Lemma 5.5. Theorem 1.3 holds when T ∼ = PSL(2, q). Proof. Since PSL(2, 5) ∼ = Alt(5), we see from [3, Table 8.1] that PSL(2, 52 ) has two classes of maximal subgroups isomorphic to Sym(5). This gives row (6) of Table 5. The same isomorphism also yields that there is a unique conjugacy class of maximal Alt(5) subgroups in PSL(2, 5r ) for r an odd prime and a unique conjugacy class of maximal Sym(5) subgroups in PGL(2, 5r ) (and no such maximal subgroups when q = pr with r not prime). Since r is odd, 5r ≡ −3 (mod 8) and Lemma 5.4 implies row (7) of Table 4 and row (9) of Table 5. Since PSL(2, 4) ∼ = Alt(5), we see from [3, Table 8.1] that Alt(5) is a maximal subgroup of PSL(2, 22r ) for r an odd prime and there is a unique conjugacy class of such subgroups. Such a subgroup is normalised by a field automorphism of T of order 2r. When r = 2, such an Alt(5) is the centraliser of the field automorphism of order two but when r is odd the centraliser of a field automorphism of order two is PSL(2, 2r ), which does not contain an Alt(5). Thus when r is odd, the normaliser of Alt(5) in PSL(2, 22r ).2 is Sym(5) and is a maximal subgroup. Again there is a unique conjugacy class of such subgroups. Lemma 5.4 then yields row (6) of Table 4 and row (8) of Table 5. Using [3, Table 8.1], we see that Alt(5) is a maximal subgroup of PSL(2, p) for p ≡ ±1 (mod 10). There are two classes of such maximals and they are selfnormalising in PSL(2, p). This gives rows (3) and (4) of Table 4 with the normaliser of an Alt(4) given by Lemma 5.4. We also see that there are two classes of maximal Alt(5) subgroups in PSL(2, p2 ) when p ≡ ±3 (mod 10). Since p2 ≡ 1 (mod 8), by Lemma 5.4 the normaliser in T of an Alt(4) is Sym(4) and we get row (5) of Table 4. Finally, each of these Alt(5) subgroups is normalised but not centralised by a field automorphism. Hence we obtain two conjugacy classes of maximal Sym(5) subgroups in PΣL(2, p2 ). The normaliser of an Alt(4) in PΣL(2, p2 ) is then Sym(4)×Z2 and hence the Sym(4) in PΣL(2, p2 ) has normaliser twice as large. Hence we have row (7) of Table 5.  Before dealing with the case where T ∼ = PSp(6, p) we need a couple of lemmas. For a group X fixing a set U , we denote the permutation group of X induced on U by X U . Lemma 5.6. [25, p.36] Let p be an odd prime. A semisimple element A of GL(d, p) is conjugate to an element of Sp(d, p) if and only if A is conjugate to (A−1 )T . PRIMITIVE GROUPS WITH A SUBORBIT OF LENGTH 5 13 Lemma 5.7. [16, Lemmas 4.1.1 and 4.1.12] Let X 6 Sp(d, p) and suppose that X fixes an m-dimensional subspace U of the natural module. If X U is irreducible, then U is either nondegenerate or totally isotropic. Moreover (i) if U is nondegenerate then Sp(d, p)U ∼ = Sp(m, p) × Sp(d − m, p); (ii) if (|X|, p) = 1 and U is totally isotropic, then X fixes another totally isotropic subspace U ∗ such that U and U ∗ are disjoint and dim U = dim U ∗ . Moreover,    A 0 U⊕U ∗ = (Sp(d, p)U⊕U ∗ ) | A ∈ GL(m, p) . 0 (A−1 )T Lemma 5.8. Theorem 1.3 holds when T ∼ = PSp(6, p). Proof. The cases when p 6 5 can be verified by a Magma calculation. (In this case, we obtain row (8) of Table 4 and row (13) of Table 5.) We assume now that p > 7. Suppose first that p ≡ ±1 (mod 8). By [3, Table 8.29], M ∼ = Sym(5), G = T c ∼ and there are two possibilities for the conjugacy class containing M . Let M = . − . − ∼ b 2 Sym(5) be the preimage of M in Sp(6, p) and let H = 2 Sym(4) be the index c corresponding to H. Note that V ↓ M c is absolutely irreducible. five subgroup of M . By considering the Brauer character tables for 2 Sym(5)− and 2 . Sym(4)− , we b = U ⊕ W where U and W are absolutely irreducible reprededuce that V ↓ H b over GF(p) with degree two and four respectively. Since p > 7, sentations of H Lemma 5.7 implies that U and W are nondegenerate and hence the stabiliser in b is absolutely irreducible Sp(6, p) of this decomposition is Sp(2, p)×Sp(4, p). Since H b in Sp(6, p) on U and W , it follows from Schur’s Lemma that the centraliser of H is Z(Sp(2, p)) × Z(Sp(4, p)). By Lemma 5.4, Sym(4) is self-normalising in PSL(2, p) b is self-normalising in Sp(2, p). Thus NSp(6,p) (H) b = CSp(6,p) (H) b H b and and hence H so |NG (H) : H| = 2. This verifies Row (12) of Table 5. Next suppose that p ≡ ±3 (mod 8). It follows from [3, Table 8.29] that M ∼ = . c∼ Alt(5) 6 PSp(6, p). Let M 2 Alt(5) be the preimage of M in Sp(6, p). When p ≡ = ±3, ±13 (mod 40), [3, Table 8.29] asserts that M is maximal in PSp(6, p) and, moreover, X := NPGSp(6,p) (M ) ∼ = Sym(5) is a maximal subgroup of PGSp(6, p). When p ≡ ±11, ±19 (mod 40), M is not maximal in PSp(6, p) but X := NPGSp(6,p) (M ) ∼ = Sym(5) is maximal in PGSp(6, p). As usual, we denote the preimage of X in b Let H b = 2 . Alt(4) be the subgroup of M c corresponding to H. GSp(6, p) by X. c is absolutely irreducible. Let χ be the character for V ↓ M c and Note that V ↓ M let F be a splitting field for 2 . Alt(4). By the Brauer character table of 2 . Alt(4), we conclude that χ = χ1 + χ2 + χ3 over F , where the χi are the three irreducible representations of 2 . Alt(4) of degree two. Moreover, when p ≡ 1 (mod 3), we may take F = GF(p), and when p ≡ 2 (mod 3), we may take F = GF(p2 ). We divide our analysis into these two cases. Suppose first that p ≡ 1 (mod 3) and F = GF(p). In this case V splits as b of dimension two. By the sum of three irreducible spaces U, W1 and W2 for H looking at the character tables and using Lemmas 5.6 and 5.7, it follows that U is nondegenerate while W1 and W2 are complementary totally isotropic subspaces. By Lemma 5.7, the partwise stabiliser in Sp(6, p) of the decomposition of V preserved b is Sp(2, p) × GL(2, p). Since the actions of H b on W1 and W2 are dual, the by H . b centraliser in Sp(6, p) of H = 2 Alt(4) is Z1 × Z(GL(2, p)) where Z1 = Z(Sp(2, p)). By Lemma 5.4, Alt(4) is self-normalising in PSp(2, p) ∼ = PSL(2, p) when p ≡ ±3 14 J. B. FAWCETT, M. GIUDICI, C. H. LI, C. E. PRAEGER, G. ROYLE, G. VERRET b = HC b Sp(6,p) (H). b Thus NPSp(6,p) (H)/H is a cyclic (mod 8) and hence NSp(6,p) (H) group of order p − 1. This verifies row (9) of Table 4. b It has an index five subgroup R b containing Z = Z(GSp(6, p)) ∼ Now consider X. = ∼ b b b b Zp−1 such that R = R/Z = Sym(4) and R normalises H. Now R must preserve b The partwise stabiliser of this the decomposition V = U ⊥ (W1 ⊕ W2 ) fixed by H. partition in GSp(6, p) is (Sp(2, p) × GL(2, p)) ⋊ hδi where δ is an element of order b p − 1 that centralises the GL(2, p) and generates GSp(2, p) with Sp(2, p). Since R b b contains an element that does not centralise H, it follows that R must interchange b = 2. It follows that CGSp(6,p) (R) b = Z1 Z W1 and W2 . In particular, |CZ (R)| and hence |NPGSp(6,p) (R) : R| = 2. This verifies row (14) of Table 5 when p ≡ 1 (mod 3). We now assume that p ≡ 2 (mod 3) and F = GF(p2 ). It follows from the Brauer character table of 2 . Alt(4) that χ1 can be realised over GF(p) while χ2 b must decompose as V = U ⊕ W and χ3 cannot, hence the restriction of V to H with dim(U ) = 2 and dim(W ) = 4. Since dim(U ) 6= dim(W ) it follows from Lemma 5.7 that U and W are both nondegenerate and hence the stabiliser of this decomposition in Sp(6, p) is Sp(2, p) × Sp(4, p). Moreover, the image of 2 . Alt(4) in the group induced on W is contained in the subgroup Zp+1 ◦ Sp(2, p2 ). Thus the b in Sp(6, p) is equal to Z1 × Z2 where Z1 = Z(Sp(2, q)) and Z2 has centraliser of H b = HC b Sp(6,p) (H) b order p+1. Since p ≡ ±3 (mod 8), we again have that NSp(6,p) (H) and hence NPSp(6,p) (H)/H is cyclic of order p + 1. This verifies row (10) of Table 4. b and again let Z = Z(GSp(6, p)). Again it has an index five Now consider X ∼ b b b normalises H. b subgroup R containing Z such that R = R/Z = Sym(4) and R b b Also R must preserve the decomposition of V = U ⊕ W preserved by H. The stabiliser in GSp(6, p) of this decomposition is (Sp(2, p) × Sp(4, p)) ⋊ hδi where δ has order p − 1 and acts as an outer automorphism of order p − 1 on both Sp(2, p) b acting on V ′ = V ⊗ GF(p2 ) as a 6-dimensional space over and Sp(4, p). Consider H b we have that H b decomposes V ′ as a GF(p2 ). Since GF(p2 ) is a splitting field for H, nondegenerate 2-space and two totally isotropic 2-spaces. The partwise stabiliser in GSp(6, p2 ) of this decomposition is (Sp(2, p2 )×GL(2, p2 ))⋊hδi where δ is an element of order p2 − 1 that centralises the GL(2, p2 ) and, together with Sp(2, p2 ), generates b H b contains an element that does not centralise H, b it follows GSp(2, p2 ). Since R\ ′ b that R (when viewed as acting on V ) must interchange the two totally isotropic b is absolutely irreducible on W . Hence CGSp(6,p) (R) b = Z1 Z and 2-spaces. Thus R |NPGSp(6,p) (R) : R| = 2. This completes the verification of row (14) of Table 5.  6. Proof of Corollary 1.4 Suppose, to the contrary, that Γ is a half-arc-transitive vertex-primitive graph of valency 10, let G be its automorphism group, and let (u, v) be an arc of Γ. Let ~Γ be the digraph with the same vertex-set VΓ as Γ and with arc-set (u, v)G . Note that ~Γ is an asymmetric G-arc-transitive digraph of out-valency 5. In particular, Gv has an orbit of length 5 and (G, Gv ) appears in Table 1 or 2. It follows that G is either affine or almost simple. If G is of affine type, it has a regular elementary abelian subgroup R and Γ is a Cayley graph on R, with connection set S, say. Since R is abelian, the permutation sending every element of R to its inverse is an automorphism of Γ. On the other PRIMITIVE GROUPS WITH A SUBORBIT OF LENGTH 5 15 hand, if s ∈ S, then the composition of the inversion map with multiplication by s is an automorphism of Γ that reverses the arc (1, s), contradicting the fact that Γ is half-arc-transitive. We may now assume that G is almost simple. If Gv is not isomorphic to Alt(5) or Sym(5) then, as in the proof of Theorem 1.2, there are only finitely many possibilities which can be handled on a case-by-case basis. These yield no examples. We may therefore assume that Gv is isomorphic to Alt(5) or Sym(5). In particular, by Theorem 1.3, G appears in Table 4 or 5. By Lemma 2.1 (1-2), we may restrict our attention to rows where NG (H)/H contains an element of order at least 3. In particular, G ∼ = PSp(6, p) for some prime p with p ≡ ±3, ±13 (mod 40) and Gv ∼ = Alt(5). Let H = Guv and note that H ∼ = Alt(4). Let G∗ = PGSp(6, p). By [3, Table ∼ 8.29], NG∗ (Gv ) = Sym(5) and hence G∗ 6 NSym(VΓ) (G) and G∗v = NG∗ (Gv ). Let ∆ ∗ be the orbit of G∗v containing u. If ∆ is also an orbit of Gv , then (u, v)G = (u, v)G ∗ and G is contained in the automorphism group G of Γ, a contradiction. Since |G∗v : Gv | = 2, the only other possibility is that ∆ is a union of two orbits of Gv of the same size, namely 5. In particular |∆| = 10. It follows that G∗uv = H. Let H ∗ = NG∗v (H). Note that H ∗ ∼ = Sym(4). Since H is a characteristic subgroup of H ∗ , we have that NG∗ (H) = NG∗ (H ∗ ). If p = 3, then Table 5 implies that NG∗ (H) = H ∗ . If p 6= 3, then it follows by Table 5 (and the fact that Sym(4) is a complete group) that NG∗ (H) = H ∗ × Z for some Z ∼ = Z2 . In both cases, we have that NG∗ (H)/H is an elementary abelian 2-group. ∗ Let Γ∗ be the digraph with vertex-set VΓ and with arc-set (u, v)G . Since |∆| = ∗ ′ 10, Γ has out-valency 10. Let w be an out-neighbour of v. As Γ∗ is G∗ -arctransitive, H and G∗vw′ are conjugate in G and, in particular, isomorphic. On the other hand, G∗v has a unique conjugacy class of subgroups isomorphic to Alt(4), and hence H and G∗vw′ are conjugate in G∗v . It follows that H = G∗vw for some out-neighbour w of v in Γ∗ . Since Γ∗ is G∗ -arc-transitive, there exists g ∈ G∗ such that (u, v)g = (v, w). Note that g normalises H. By the previous paragraph, this 2 implies that g 2 ∈ H. However ug = v g = w and so u = w and Γ∗ is actually a graph. Since G < G∗ , ~Γ is a sub-digraph of Γ∗ and hence Γ∗ = Γ. This implies that G∗ is contained in the automorphism group of Γ which is a contradiction. 7. Proof of Corollary 1.5 We first need the following lemma. Lemma 7.1. Let p be a prime with p ≡ 7, 23 (mod 40), let G = PSp(6, p) and let M be a maximal subgroup of G isomorphic to Sym(5). If H is a subgroup of index 6 in M , then NG (H)/H ∼ = Zp+1 . Proof. First, note that M actually exists by Theorem 1.3. Note also that Sym(5) has a unique conjugacy class of subgroups of index 6. These subgroups are maximal c and H b be the preimage of M and H in Sp(6, p), and isomorphic to AGL(1, 5). Let M . − ∼ b ∼ c = 2 Sym(5) and H respectively. Note that M = Z5 ⋊ Z8 . Let V be the natural 6-dimensional module for Sp(6, p) over GF(p). Since p ≡ 7 (mod 8), it follows c and H b (available in Magma, for example) from the Brauer character tables of M b that V ↓ H splits as a sum of an absolutely irreducible 4-dimensional subspace W and an irreducible but not absolutely irreducible subspace U of dimension 2. b is faithful on W while elements of order 5 in H b act trivially on U . Moreover, H 16 J. B. FAWCETT, M. GIUDICI, C. H. LI, C. E. PRAEGER, G. ROYLE, G. VERRET Since p > 7, Lemma 5.7 implies that U and W are nondegenerate and hence the stabiliser in Sp(6, p) of this decomposition is Sp(2, p)×Sp(4, p). By Schur’s Lemma, b = Z1 ×Z2 where Z1 ∼ CSp(6,p) (H) = Zp+1 and Z2 = Z(Sp(4, p)) ∼ = Z2 . Since elements b b \ CSp(6,p) (H) b H, b of order 5 in H act trivially on U , any element of NSp(6,p) (H) b Moreover, for p ≡ −1 (mod 8), must centralise the elements of order 5 in H. the normaliser in Sp(2, p) of a cyclic group of order 8 is Q2(p+1) . Now 5 divides p2 + 1, and so the centraliser C of an element of order 5 in Sp(4, p) is cyclic of order p2 + 1 (see [5, Proposition 3.4.3 and Remark 3.4.4]). However, 4 does not divide p2 + 1 and so the Sylow 2-subgroup of C is equal to Z(Sp(4, p)) = Z2 . Thus b = CSp(6,p) (H) b H b and so NSp(6,p) (H) b b = (Z1 × Z2 )/Z2 ∼ b H b∼ H) NG (H)/H ∼ = Zp+1 . = CSp(6,p) (H)/Z( = NSp(6,p) (H)/  We are now ready to prove Corollary 1.5. Let p be a prime with p ≡ 7, 23 (mod 40) and let G = PSp(6, p). By Theorem 1.3, there exists a maximal subgroup M of G isomorphic to Sym(5). Note that Sym(5) has a unique conjugacy class of subgroups of index 6, and these subgroups are maximal and not normal. Let H be a subgroup of index 6 in M . By Lemma 7.1, NG (H)/H ∼ = Zp+1 . By Lemma 2.1, there exists Γ′ a G-arc-transitive digraph of out-valency 6 that is not a graph. Let Γ be the underlying graph of Γ′ and let A be the automorphism group of Γ. Note that Γ has valency 12 and that G 6 A 6 Sym(V Γ). Since Alt(V Γ) 66 A, it follows from [20] that soc(A) = G and thus A = G or A = PGSp(6, p). However, by [3, Table 8.29], M is self-normalising in PGSp(6, p) and thus PGSp(6, p) 66 Sym(V Γ). It follows that A = G and hence Γ is half-arc-transitive. As there are infinitely many primes p with p ≡ 7, 23 (mod 40), this proves that there are infinitely many vertex-primitive half-arc-transitive graphs of valency 12, as required. Acknowledgements. This research was supported by the Australian Research Council grants DE130101001, DP130100106 and DP150101066. We would like to thank the Centre for the Mathematics of Symmetry and Computation for its support, as this project started as a problem for the annual CMSC retreat in 2015. We would also like to thank David Craven for his immense and timely help in dealing with the case of exceptional groups of Lie type, and Derek Holt for assistance with the computations relating to the Thompson group. References [1] Aschbacher, M. Finite group theory. Cambridge Studies in Advanced Mathematics, 10. Cambridge University Press, Cambridge, 1986. [2] Bosma, W., Cannon, J., Playoust, C. The Magma algebra system. I. The user language. J. Symbolic Comput. 24 (1997), 235–265. [3] Bray, J. N., Holt, D. F., Roney-Dougal, C. M. The maximal subgroups of the low-dimensional finite classical groups. With a foreword by Martin Liebeck. London Mathematical Society Lecture Note Series, 407. Cambridge University Press, Cambridge, 2013. [4] Bray, J. N., Wilson, R. A. Explicit representations of maximal subgroups of the Monster. J. Algebra 300 (2006), 834–857. [5] Burness, T. C, Giudici, M. Classical Groups, Derangements and Primes, Cambridge University Press, Australian Mathematical Society Lecture Series, 25, 2016. PRIMITIVE GROUPS WITH A SUBORBIT OF LENGTH 5 17 [6] Conway, J. H., Curtis, R. T., Norton, S. P., Parker, R. A., Wilson, R. A. Atlas of finite groups. Maximal subgroups and ordinary characters for simple groups. With computational assistance from J. G. Thackray. Oxford University Press, Eynsham, 1985. [7] Coutts, H. J., Quick, M., Roney-Dougal, C. M. The primitive permutation groups of degree less than 4096. Comm. Algebra 39 (2011), 3526–3546. [8] Craven, D. Alternating Subgroups of Exceptional Groups of Lie Type, arXiv:1509.00534. [9] Dickson, L. E. Linear groups: With an exposition of the Galois field theory. Dover Publications Inc., New York, 1958. [10] Dixon, J. D., Mortimer, B. Permutation groups. Graduate Texts in Mathematics, 163. Springer-Verlag, New York, 1996. [11] The GAP Group, GAP – Groups, Algorithms, and Programming, Version 4.8.3 ; 2016, (\protect\vrule width0pt\protect\href{http://www.gap-system.org}{http://www.gap-system.org}). [12] Huppert, B., Blackburn, N. Finite groups. II. Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences], 242. AMD, 44. SpringerVerlag, Berlin-New York, 1982. [13] Isaacs, I.M. Character Theory of Finite Groups. Dover Publications Inc., New York, 1994. [14] James, G. D. The representation theory of the symmetric groups, Lecture Notes in Mathematics, 682. Springer, Berlin, 1978. [15] Jansen, C., Lux, K., Parker, R., Wilson, R. An atlas of Brauer characters. Appendix 2 by T. Breuer and S. Norton. London Mathematical Society Monographs. New Series, 11. Oxford Science Publications. The Clarendon Press, Oxford University Press, New York, 1995. [16] Kleidman, P., Liebeck, M. The subgroup structure of the finite classical groups. London Mathematical Society Lecture Note Series, 129. Cambridge University Press, Cambridge, 1990. [17] Knapp, W. Primitive Permutationsgruppen mit einem zweifach primitiven Subkonstituenten. J. Algebra 38 (1976), 146–162. [18] Li, C. H. The finite vertex-primitive and vertex-biprimitive s-transitive graphs for s > 4. Trans. Amer. Math. Soc. 353 (2001), 3511–3529. [19] Li, C. H., Lu, Z. P., Marušič, D. On primitive permutation groups with small suborbits and their orbital graphs. J. Algebra 279 (2004), 749–770. [20] Liebeck, M. W., Praeger, C. E., Saxl, J. A classification of the maximal subgroups of the finite alternating and symmetric groups. J. Algebra 111 (1987), 365–383. [21] Norton, S. P., Wilson, R. A. A correction to the 41-structure of the Monster, a construction of a new maximal subgroup L2 (41) and a new Moonshine phenomenon. J. London Math. Soc. 87 (2013), 943–962. [22] Praeger, C. E. Primitive permutation groups with a doubly transitive subconstituent. J. Austral. Math. Soc. Ser. A 45 (1988), 66–77. [23] Quirin, W. L. Primitive permutation groups with small orbitals. Math. Z. 122 (1971), 267– 274. [24] Sims, C. C. Graphs and finite permutation groups. Math. Z. 95 (1967), 76–86. [25] Wall, G. E. On the conjugacy classes in the unitary, symplectic and orthogonal groups. J. Austral. Math. Soc., 3 (1963), 1–62. [26] Wang, J. The primitive permutation groups with an orbital of length 4. Comm. Algebra 20 (1992), 889–921. [27] Wang, J. Primitive permutation groups with a solvable subconstituent of degree 5. Beijing Daxue Xuebao Ziran Kexue Ban 31 (1995), 520–526. [28] Wang, J. Primitive permutation groups with an unfaithful subconstituent containing A5 . Algebra Colloq. 3 (1996), 11–18. [29] Weiss, R. A characterization and another construction of Janko’s group J3 . Trans. Amer. Math. Soc. 298 (1986), 621–633. [30] Wilson, R. A. Some subgroups of the Thompson group. J. Austral. Math. Soc. Ser. A 44 (1988), 17–32. [31] Wilson, R. A. The maximal subgroups of the Baby Monster, I. J. Algebra 211 (1999), 1–14. [32] Wilson, R. A., Parker, R. A., Nickerson, S., Bray, J. N., Breuer, T. AtlasRep, A GAP Interface to the Atlas of Group Representations, Version 1.5, 2011. (\protect\vrule width0pt\protect\href{http://www.gap-system.org/Packages/atlasrep.html}{http://www.gap-system.o 18 J. B. FAWCETT, M. GIUDICI, C. H. LI, C. E. PRAEGER, G. ROYLE, G. VERRET [33] Wilson, R. A., Walsh, P., Tripp, J., Suleiman, I., Parker, R. A., Norton, S. P., Nickerson, S., Linton, S., Bray, J. N., Abbot, R. ATLAS of Finite Group Representations. (\protect\vrule width0pt\protect\href{http://brauer.maths.qmul.ac.uk/Atlas/}{http://brauer.maths.qmul.ac.uk/Atl [34] Wong, W. J. Determination of a class of primitive permutation groups. Math. Z. 99 (1967), 235–246. Joanna B. Fawcett, Michael Giudici, Cai Heng Li, Cheryl E. Praeger, Gordon Royle and Gabriel Verret∗ , Centre for the Mathematics of Symmetry and Computation, The University of Western Australia, 35 Stirling Highway, Crawley, WA 6009, Australia. ∗ Also affiliated with FAMNIT, University of Primorska, Glagoljaška 8, SI-6000 Koper, Slovenia. Current address: Department of Mathematics, The University of Auckland, Private Bag 92019, Auckland 1142, New Zealand. E-mail address: [email protected] E-mail address: [email protected] E-mail address: [email protected] E-mail address: [email protected] E-mail address: [email protected] E-mail address: [email protected]
4math.GR
A SIMPLE HASH CLASS WITH STRONG RANDOMNESS PROPERTIES IN GRAPHS AND HYPERGRAPHS∗ arXiv:1611.00029v1 [cs.DS] 31 Oct 2016 MARTIN AUMÜLLER† , MARTIN DIETZFELBINGER‡ , AND PHILIPP WOELFEL§ Abstract. We study randomness properties of graphs and hypergraphs generated by simple hash functions. Several hashing applications can be analyzed by studying the structure of d-uniform random (d-partite) hypergraphs obtained from a set S of n keys and d randomly chosen hash functions h1 , . . . , hd by associating each key x ∈ S with a hyperedge {h1 (x), . . . , hd (x)}. Often it is assumed that h1 , . . . , hd exhibit a high degree of independence. We present a simple construction of a hash class whose hash functions have small constant evaluation time and can be stored in sublinear space. We devise general techniques to analyze the randomness properties of the graphs and hypergraphs generated by these hash functions, and we show that they can replace other, less efficient constructions in cuckoo hashing (with and without stash), the simulation of a uniform hash function, the construction of a perfect hash function, generalized cuckoo hashing and different load balancing scenarios. Key words. Hashing, cuckoo hashing, randomized algorithms, random graphs, load balancing AMS subject classifications. 68P05, 68R10, 68W20, 05C80 1. Introduction. We study randomness properties of graphs and hypergraphs generated by hash functions of a particulary simple structure. Consider a set S of n keys chosen from a finite set U , and a sequence ~h = (h1 , . . . , hd ), d ≥ 2, of random hash functions hi : U → [m] = {0, . . . , m − 1} for some positive integer m. Then S and ~h naturally define a d-partite d-uniform hypergraph G(S, ~h) := (V, E) with V = Vm,d ,   where Vm,d is the union of d disjoint copies of [m] and E = h1 (x), . . . , hd (x) | x ∈ S . Properties of such (hyper-)graphs are essential in the analysis of a number of randomized algorithms from a variety of applications, such as balanced allocation [67, 70], shared memory and PRAM simulations [52, 45], perfect hashing [38, 51], and recent hashing based dictionaries [35, 48, 60, 33, 47]. Often such algorithms are analyzed under the idealized uniform hashing assumption, which says that every hash function h employed by the algorithm is a truly random function. For example, if all functions h1 , . . . , hd are truly random hash functions, then the graph G(S, ~h) can be analyzed using the vast array of tools from random graph theory [5]. Since it is infeasible to store truly random functions, it is preferable to use small sets of hash functions (called hash classes), and sample random hash functions from those sets. These sets provide some weaker randomness guarantees. Carter and Wegman [9] defined a universal hash class H as one which guarantees that any two distinct keys x, x0 ∈ U are mapped by a random function h ∈ H to the same function value only with a probability of O(1/m). A stronger notion is that of a k-wise independent hash class H [74], which says that for any k distinct keys x1 , . . . , xk and ∗ This work was supported in part by DFG grant DI 412/10-1, DFG grant DI 412/10-2, and by a Discovery Grant from the National Sciences and Research Council of Canada (NSERC). Part of this work was done during a visit of the second author to MPI Saarbrücken, Germany, and during Dagstuhl seminars 07391, 08381, and 11121. This work encompasses the results of the conference papers [32], [77], and—to some extent—[2], and adds many new insights. † IT University of Copenhagen, 2300 København, Denmark. ([email protected]) ‡ Fakultät für Informatik und Automatisierung, Technische Universität Ilmenau, 98694 Ilmenau, Germany. ([email protected]) § Department of Computer Science, University of Calgary, Calgary, Alberta T2N 1N4, Canada. ([email protected]) 1  a random hash function h ∈ H the vector h(x1 ), . . . , h(xk ) is uniformly distributed over [m]k . The canonical representation of a k-independent hash class is the class of all degree k − 1 polynomials over some prime field. For the representation of such a polynomial, we just store its k coefficients (k words). The evaluation is possible in time O(k). Sometimes, ad-hoc analyses show that such limited randomness properties are sufficient for algorithms to exhibit the desired behavior. For example, Pagh, Pagh, and Ružić [59] showed that closed hashing with linear probing works well using only 5-wise independence. On the other hand, insufficient randomness can have subtle and unexpected negative effects on some algorithms. For example, Pǎtraşcu and Thorup [63] showed that linear probing behaves badly when used with a certain artificial class of 4-wise independent hash functions. In the same vein, it was experimentally observed in [60] and formally proved by Dietzfelbinger and Schellbach in [29, 30] that cuckoo hashing using the multiplicative class of hash functions from [24], although universal, does not work with high probability. For many other applications, such as cuckoo hashing [60] and ε-minwise independent hashing [42], we know that a logarithmic degree of independence suffices (in the size of the key set for the former, in 1/ε for the latter). In that case, polynomials use logarithmic space and evaluation time. If one aims for constant evaluation time, there is the construction by Siegel [69]—although Siegel states that his construction has constant albeit impractical evaluation time—and, more recently, the more efficient constructions by Thorup [71] and Christiani, Pagh, and Thorup [12]. Several techniques to circumvent the uniform hashing assumption have been proposed. The most general one is to “simulate” uniform hashing. The idea is to generate a class H of hash functions at random such that for arbitrary given S ⊆ U with high probability H is “uniform” on S, which means that a random hash function h ∈ H restricted to the domain S is a truly random function. Such a simulation was presented by Pagh and Pagh in [56, 58], Dietzfelbinger and Rink [28], and in the precursor work [32]. However, such simulations require at least a linear (in |S| · log m) number of bits of additional space, which is often undesirable. An alternative is the so-called split-and-share technique [35, 21, 28], in which S is first partitioned by a top-level hash function into smaller sets of keys, called bins. Then, a problem solution is computed for each bin, but all bins share the same hash functions. Since the size of each bin is significantly smaller than the size of S, it is possible to use a hash function that behaves like a truly random function on each bin. Finally, the problem solution of all bins is combined to a solution of the original problem. This technique cannot be applied uniformly to all applications, as ad-hoc algorithms depending on the application are required to merge the individual solutions for each bin to a solution of the original problem. In some scenarios, e.g., balanced allocation with high loads, the small deviations in the bin sizes incurred by the top-level hash function are undesirable. Moreover, additional costs in space and time are caused by the top-level splitting hash function and by compensating for a larger failure probability in each of the smaller bins. Another perspective on uniform hashing is to assume that the key set S = {x1 , . . . , xn } itself is “sufficiently random”. Specifically, Mitzenmacher and Vadhan showed in [54] that when the distribution that governs {x1 , . . . , xn } has a low enough collision probability, then even using a hash function h from a 2-wise independent hash class H makes the sequence (h, h(x1 ), . . . , h(xn )) distributed close to the uniform distribution on H × Rn (see also [22]). 2 Besides these general techniques to circumvent the uniform hashing assumption, some research focuses on particular hash classes and their properties. Pǎtraşcu and Thorup [61] studied simple tabulation hashing, where each  key is a tuple (x1 , . . . , xc ) which is mapped to the hash value1 f1 (x1 )⊕· · ·⊕fc (xc ) mod m by c uniform random hash functions f1 , . . . , fc , each with a domain of cardinality d|U |1/c e. The authors showed that simple tabulation hashing has striking randomness properties, and several applications (for example cuckoo hashing) exhibit good behavior if such hash functions are used. One year later, the same authors introduced “twisted tabulation hashing” [62], which gives even stronger randomness properties in many applications. Furthermore, Dahlgaard and Thorup proved that twisted tabulation is ε-minwise independent [17]. Very recently, Dahlgaard, Knudsen, Rotenberg, and Thorup extended the use of simple tabulation hashing to load balancing [16], showing that simple tabulation suffices for sequential load balancing with two choices. Simple tabulation hashing provides constant evaluation time with a description length that is polynomial (with exponent smaller than 1) in the size of the key set, just as with the hash functions studied in the present paper. Each application of tabulation hashing requires its own analysis. There are other approaches that trade higher evaluation time for smaller description length. For example, Reingold, Rothblum, and Wieder [65] showed that a class of hash functions introduced by Celis et al. [11] has strong enough randomness properties for running a slightly modified version of cuckoo hashing and sequential load balancing with two choices. While the hash class has non-constant evaluation time, its description length is notably smaller than what one gets using the standard polynomial approach for log n-wise independence (O(log n log log n) vs. O(log2 n) bits) or tabulation hashing. The Contribution. In this paper we focus on the properties of random graphs G(S, ~h) generated by simple hash functions. These hash functions have been described before by Aumüller, Dietzfelbinger, and Woelfel in [3]. A function from their hash class, called Z, combines simple k-independent hash functions with lookups in random tables. It can be evaluated efficiently in constant time, using a few arithmetic operations and table lookups. Each hash function can be stored in sublinear space, more precisely using O(nγ ) bits for some γ < 1. To put our contribution in perspective, we first review some background. Building upon the work of Dietzfelbinger and Meyer auf der Heide [25], Aumüller, Dietzfelbinger, and Woelfel [3] showed that hash functions from class Z have randomness properties strong enough to run cuckoo hashing with a stash with guarantees only known for fully random hash functions. To prove this result, Aumüller, Dietzfelbinger, and Woelfel studied the randomness properties of G(S, h1 , h2 ) when the hash function pair (h1 , h2 ) is chosen randomly from Z. They showed that the connected components of this graph behave, in some technical sense, very close to what is expected of the graph G(S, h1 , h2 ) when (h1 , h2 ) is fully random. Our contribution is that we provide a general framework that allows us to analyze applications whose analysis is based on arguments on the random graph described above when hash functions from Z are used instead of fully random hash functions. To argue that the hash class can run a certain application, only random graph theory is applied, no details of the actual hash class need to be considered. Using this framework, we show that hash functions from Z have randomness properties strong enough for many different applications, e.g., cuckoo hashing with a stash as described by Kirsch, Mitzenmacher, and Wieder in [49]; generalized cuckoo hashing as proposed by Fotakis, Pagh, Sanders, and Spirakis in [35] with two recently discovered insertion algorithms 1⊕ denotes the bit-wise XOR operation 3 due to Khosla [47] and Eppstein, Goodrich, Mitzenmacher and Pszona [33] (in a sparse setting); the construction of a perfect hash function of Botelho, Pagh and Ziviani [7]; the simulation of a uniform hash function of Pagh and Pagh [58]; different types of load balancing as studied by Schickinger and Steger [67]. The analysis is done in a unified way which we hope will be of independent interest. We will find sufficient conditions under which it is possible to replace the full randomness assumption of a sequence of hash functions with explicit hash functions. The General Idea. The analysis of hashing applications is often concerned with bounding (from above) the probability that random hash functions h1 , . . . , hd map a given set S ⊆ U of keys to some “bad” configuration of hash function values. These undesirable events can often be described by certain properties exhibited by the random graph G(S, ~h). (Recall the notation ~h = (h1 , . . . , hd ).) For example, in cuckoo hashing a bad event occurs when G(S, h1 , h2 ) contains a very long simple path or a connected component with at least two cycles [60, 19]. If h1 , . . . , hd are uniform hash functions, often a technique called first moment method (see, e.g., [5]) is employed to bound the probability of undesired events: In the standard analysis, one calculates the expectation of the random variable X that counts the number of subsets T ⊆ S such that the subgraph G T, ~h forms a “bad” substructure, as e.g., a connected component with two or more cycles. This is done by summing the probability that the subgraph G T, ~h forms a “bad” substructure over all subsets T ⊆ S. One then shows that E(X) = O(n−α ) for some α > 0 and concludes that Pr(X > 0)—the probability that an undesired event happens—is at most O(n−α ) by Markov’s inequality. We state sufficient conditions allowing us to replace uniform hash functions h1 , . . . , hd with hash function sequences from Z without significantly changing the  probability of the occurrence of certain undesired substructures G T, ~h . On a high level, the idea is as follows: We assume that for each T ⊆ U we can split Z into two disjoint parts: hash function sequences being T -good, and hash function sequences being T -bad. Choosing ~h = (h1 , . . . , hd ) at random from the set of T -good hash functions ensures that the hash values hi (x) with x ∈ T and 1 ≤ i ≤ d are distributed fully randomly. Fix some set S ⊆ U . We identify some “exception set” BS ⊆ Z (intended to be very small) such that for all T ⊆ S we have: If G(T, ~h) has an undesired property (e.g., a connected component with two or more cycles) and ~h is T -bad, then ~h ∈ BS . For T ⊆ S, disregarding the hash functions from BS will allow us to calculate the probability that G(T, ~h) has an undesired property as if ~h were a sequence of fully random hash functions. Specifically, in [3, Lemma 2] it was already shown that Pr~h∈Z (X > 0) ≤ E(X) + Pr~h∈Z (BS ), where the expectation is calculated assuming that ~h is a pair of fully random hash functions. So, it is critical to find subsets BS of sufficiently small probability. Whether or not this is possible depends on the substructures we are interested in. Here, we deviate from [3] and provide general criteria that allow us to bound the size of BS from above entirely by using graph theory. This means that details about the hash function construction need not be known to argue that random hash functions from Z can be used in place of uniform random hash functions for certain applications. Outline and Suggestions. Section 2 introduces the considered class Z of hash functions and provides the general framework of our analysis. Because of its abstract nature, the details of the framework might be hard to understand. A simple application 4 of the framework is provided in Section 2.4. There, we will discuss the use of hash class Z in static cuckoo hashing. The reader might find it helpful to study the example first to get a feeling of how the framework is applied. Another way to approach the framework is to first read the paper [3]. This paper discusses one example of the framework with an application-specific focus, which might be easier to understand. The following sections deal with applications of the hash function construction. Because these applications are quite diverse, the background of each one will be provided in the respective subsection right before the analysis. Section 3 deals with randomness properties of Z on (multi-)graphs. Here, Subsection 3.1 provides some groundwork for bounding the impact of using Z in our applications. The subsequent subsections discuss the use of Z in cuckoo hashing (with a stash), the simulation of a uniform hash function, the construction of a perfect hash function, and the behavior of Z on connected components of G(S, h1 , h2 ). The next section (Section 4) deals with applications whose analysis builds upon hypergraphs. As an introduction, we study generalized cuckoo hashing with d ≥ 3 hash functions when the hash table load is low. Then, we consider two recently described alternative insertion algorithms for generalized cuckoo hashing. Finally, we prove that hash class Z provides randomness properties strong enough for many different load balancing schemes. In Section 5 we show how our analysis generalizes to the case that we use more involved hash functions as building blocks of hash class Z, which lowers the total number of hash functions needed and the space consumption. 2. Basic Setup and Groundwork. Let U and R be two finite sets with 1 < |R| ≤ |U |. A hash function with range R is a mapping from U to R. In our applications, a hash function is applied on some key set S ⊆ U with |S| = n. Furthermore, the range of the hash function is the set [m] = {0, . . . , m − 1} where often m = Θ(n). In measuring space, we always assume that log |U | is a term so small that it vanishes in big-Oh notation when compared with terms depending on n. If this is not the case, one first applies a hash function to collapse the universe to some size polynomial in n [69]. We say that a pair x, y ∈ U, x 6= y collides under a hash function g if g(x) = g(y). The term universal hashing, introduced by Carter and Wegman in [9], refers to the technique of choosing a hash function at random from a hash class Hm ⊆ {h | h : U → [m]}. Definition 2.1 ([9, 10]). For a constant c ≥ 1, a hash class H with functions from U to [m] is called c-universal if for an arbitrary distinct pair of keys x, y ∈ U we have  Prh∈H h(x) = h(y) ≤ c/m. In our constructions we will use 2-universal classes of hash functions. Examples for c c-universal hash classes can be found for example in [9, 24, 76]. In the following, Fm denotes an arbitrary c-universal hash class with domain U and range [m]. Definition 2.2 ([74, 75]). For an integer κ ≥ 2, a hash class H with functions from U to [m] is called a κ-wise independent hash class if for arbitrary distinct keys x1 , . . . , xκ ∈ U and for arbitrary j1 , . . . , jκ ∈ [m] we have  Prh∈H h(x1 ) = j1 ∧ . . . ∧ h(xκ ) = jκ = 1/mκ . In other terms, choosing a hash function uniformly at random from a κ-wise independent class of hash functions guarantees that the hash values h(x) are uniform in [m] and 5 that that the hash values of an arbitrary set of at most κ keys are independent. The classical construction of a κ-wise independent hash class is based on polynomials of degree κ − 1 over a finite field [74]. Another approach is to use tabulation-based hashing, see [72, 50, 61] for constructions using this approach. Tabulation-based constructions are often much faster in practice than polynomial-based hashing (cf. κ [72]) at the cost of using slightly more memory. Throughout this work, Hm denotes an arbitrary κ-wise independent hash class with domain U and range [m]. We remark that Section 2.1 and Section 2.2 are quite natural generalizations of the basic definitions and observations made in [3] for pairs of hash functions. We give a full account for the convience of the reader and to provide consistent notation. 2.1. The Hash Class. The hash class presented in this work draws ideas from many different papers. So, we first give a detailed overview of related work and key concepts. Building upon the work on k-independent hash classes and two-level hashing strategies, e.g., the FKS-scheme of Fredman et al. [39], Dietzfelbinger and Meyer auf der Heide studied in [25, 26] randomness properties of hash functions from U to [m] constructed in the following way: For given k1 , k2 , m, n ≥ 2, and δ with 0 < δ < 1, set ` = nδ . Let f : U → [m] be chosen from a k1 -wise independent hash class, and let g : U → [`] be chosen from a k2 -wise independent hash class. Fill a table z[1..`] with random values from [m]. Given a key x, the hash function is evaluated as follows: h(x) = f (x) + z[g(x)] mod m. For m = n, the hash class of [25] had many randomness properties that were only known to hold for fully random hash functions: When throwing n balls into n bins, where each candidate bin is chosen by “applying the hash function to the ball”, the expected maximum bin load is O(log n/ log log n), and conditioned on a “good event” 1 that occurs with probability 1 − poly(n) the probability that a bin contains i ≥ 1 balls decreases exponentially with i. Other explicit hash classes that share this property were discovered by Pǎtraşcu and Thorup [61] and Celis et al. [11] only about two decades later. Our work studies randomness properties of the same hash class as considered in Aumüller, Dietzfelbinger, and Woelfel [3]. For the convience of the reader we define this class Z next. It is a generalization of the hash class proposed in [25], modified so as to obtain pairs (h1 , h2 ) of hash functions. One could choose two f -functions (from a k1 -wise independent class), two z-tables, but only one g-function (from a k2 -wise independent class) that is shared among h1 and h2 . In [3], this idea is further generalized so that for a given c ≥ 1 one uses 2c z-tables and c g-functions. We restrict the f -functions and the g-functions to be from very simple, 2-wise independent and 2-universal hash classes, respectively. This modification has two effects: it simplifies the analysis and it seems to yield faster hash functions in practice (see [3, Section 7]). Definition 2.3. Let c ≥ 1 and d ≥ 2. For integers m, ` ≥ 1, and given f1 , . . . , fd : U → [m], g1 , . . . , gc : U → [`], and d two-dimensional tables z (i) [1..c, 0..`−1] with elements from [m] for i ∈ {1, . . . , d}, we let ~h = (h1 , . . . , hd ) = (h1 , . . . , hd )hf1 , . . . , fd , g1 , . . . , gc , z (1) , . . . , z (d) i, where   X hi (x) = fi (x) + z (i) [j, gj (x)] mod m, for x ∈ U, i ∈ {1, . . . , d}. 1≤j≤c 6 2 Let F`2 be an arbitrary two-universal class of hash functions from U to [`], and let Hm c,d 2 be an arbitrary two-wise independent hash class from U to [m]. Then Z`,m (F`2 , Gm ) is (1) (d) 2 the class of all sequences (h1 , . . . , hd )hf1 , . . . , fd , g1 , . . . , gc , z , . . . , z i for fi ∈ Hm 2 with 1 ≤ i ≤ d and gj ∈ F` with 1 ≤ j ≤ c. If arbitrary κ-wise independent hash classes are used as building blocks for the functions fi , for 1 ≤ i ≤ d, and gj , for 1 ≤ j ≤ c, one obtains the construction from [3]. However, the simpler hash functions are much easier to deal with in the proofs of this section. We defer the discussion of the general situation to Section 5. While this is not reflected in the notation, we consider (h1 , . . . , hd ) as a structure from which the components g1 , . . . , gc and fi , z (i) , i ∈ {1, . . . , d}, can be read off again. c,d 2 It is class Z = Z`,m (F`2 , Gm ) for some c ≥ 1 and d ≥ 2, made into a probability space by the uniform distribution, that we will study in the following. We usually assume 2 that c and d are fixed and that m and ` are known. Also, the hash classes F`2 and Gm are arbitrary (if providing the necessary degree of universality or independence) and will not be mentioned explicitly below. We will now discuss some randomness properties of hash class Z. The central lemma is identical to [3, Lemma 1], but the proof is notably simpler because of the restriction to simpler hash functions as building blocks. Definition 2.4. For T ⊆ U , define the random variable dT , the “deficiency” of ~h = (h1 , . . . , hd ) with respect to T , by dT (~h) = |T | − max{|g1 (T )|, . . . , |gc (T )|}. Further, let (i) badT be the event that dT > 1; (ii) goodT be badT , i.e., the event that dT ≤ 1; (iii) critT be the event that dT = 1. Hash function sequences (h1 , . . . , hd ) in these events are called “T -bad”, “T -good”, and “T -critical”, respectively. It will turn out that if at least one of the functions gj is injective on a set T ⊆ U , then all hash values on T are independent. The deficiency dT of a sequence ~h of hash functions measures how far away the hash function sequence is from this “ideal” situation. If ~h is T -bad, then for each component gj there are at least two “collisions” on T , i.e., there are at least two distinct pairs of keys from T that collide. If ~h is T -good, then there exists a gj -component with at most one collision on T . A hash function ~h is T -critical if for all functions gj there is at least one collision and there exists at least one function gj such that gj has exactly one collision on T . Note that the deficiency only depends on the gj -components of a hash function. In the following, we will first fix these gj -components when choosing a hash function. If dT (~h) ≤ 1 then the unfixed parts of the hash function, i.e., the entries in the tables z (i) and the f -functions, are sufficient to guarantee strong randomness properties of the hash function on T . Our framework will build on the randomness properties of hash class Z that are summarized in the next lemma. It comes in two parts. The first part makes the role of the deficiency of a hash function sequence from Z precise, as described above. The second part states that for a fixed set T ⊆ S three parameters govern the probability of the events critT or badT to occur: The size of T , the range [`] of the g-functions, and their number. To be precise, this probability is at most (|T |2 /`)c , which yields two consequences. When |T | is much smaller than `, the factor 1/`c will make the probability of a hash function behaving badly on a small key set vanishingly small. But when |T |2 is larger than `, the influence of the failure term of the hash class is 7 significant. We will see later how to tackle this problem. Lemma 2.5. Assume d ≥ 2 and c ≥ 1. For T ⊆ U the following holds: (a) Conditioned on goodT (or on critT ), the hash values (h1 (x), . . . , hd (x)), x ∈ T , are distributed uniformly and independently in [m]d . 2 c (b) Pr(badT ∪ critT ) ≤ |T | /` . Proof. Part (a): If |T | ≤ 2, then h1 , . . . , hd are fully random on T simply because f1 , . . . , fd are drawn independently from a 2-wise independent hash class. So suppose |T | > 2. First, fix an arbitrary g-part of (h1 , . . . , hd ) so that critT occurs. (The statement follows analogously for goodT .) Let j0 ∈ {1, . . . , c} be such that there occurs exactly one collision of keys in T using gj0 . Let x, y ∈ T , x 6= y, be this pair of keys (i.e., gj0 (x) = gj0 (y)). Arbitrarily fix all values in the tables z (i) [j, k] with i ∈ {1, . . . , d}, j = 6 j0 , and 0 ≤ k ≤ ` − 1. Furthermore, fix z (i) [j0 , gj0 (x)] with i ∈ {1, . . . , d}. The hash functions (h1 , . . . , hd ) are fully random on x and y since f1 , . . . , fd are 2-wise independent. Furthermore, the function gj0 is injective on T − {x, y} and for each x0 ∈ (T − {x, y}) the table cell z (i) [j0 , gj0 (x0 )] is yet unfixed, for i ∈ {1, . . . , d}. Thus, the hash values h1 (x0 ), . . . , hd (x0 ), x0 ∈ T −{x, y}, are distributed fully randomly and are independent of the hash values of x and y. Part (b): Assume |T | ≥ 2. (Otherwise the events critT or badT cannot occur.) Suppose critT (or badT ) is true. Then for each component gi , 1 ≤ i ≤ c, there are keys x, y ∈ T , x 6= y, such that gi (x) = gi (y). Since gi is chosen uniformly at random from a 2-universal hash class, the probability that such a pair exists is at most  |T | · 2/` ≤ |T |2 /`. Since all gi -components are chosen independently, the statement 2 follows. 2.2. Graph Properties and the Hash Class. Here we describe how (hyper)graphs are built from a set of keys and a tuple of hash functions. The notation is superficially different from [3], the proof of the central lemma is identical. We assume that the notion of a simple bipartite multigraph is known to the reader. A nice introduction to graph theory is given by Diestel [20]. We also consider hypergraphs (V, E), which extend the notion of a graph by allowing edges to consist of more than two vertices, i.e., the elements of E are subsets of V of size 2 or larger. For an integer d ≥ 2, a hypergraph is called d-uniform if each edge contains exactly d vertices. It is called d-partite if V can be split into d sets V1 , . . . , Vd such that no edge contains two vertices from the same class. A hypergraph (V 0 , E 0 ) is a subgraph of a hypergraph (V, E) if V 0 ⊆ V and if there is a one-to-one mapping % : E 0 → E such that e0 ⊆ %(e0 ) for each e0 ∈ E 0 . (The reader should be aware that while this definition gives the usual subgraphs for graphs, in the hypergraph setting it differs from the standard notion of a subhypergraph. To obtain a subgraph of a hypergraph in our sense, we may remove nodes and whole edges, but also delete nodes from single edges.) More notation for graphs and hypergraphs will be provided in Section 2.4 and Section 4, respectively. We build graphs and hypergraphs from a set of keys S = {x1 , . . . , xn } and a sequence of hash functions ~h = (h1 , . . . , hd ), where hi : U → [m] for 1 ≤ i ≤ d, in the following way: The d-partite hypergraph G(S, ~h) = (V, E) has d copies of [m] as vertex set and edge set E = {(h1 (x), . . . , hd (x)) | x ∈ S}.2 Also, the edge (h1 (xi ), . . . , hd (xi )) 2 In this paper, whenever we refer to a graph or a hypergraph we mean a multi-graph or multihypergraph, i.e., the edge set is a multiset. We also use the words “graph” and “hypergraph” synonymously in this section. Finally, note that our edges are tuples instead of sets to avoid problems with regard to the fact that the hash functions use the same range. The tuple notation (j1 , . . . , jd ) for edges is to be read as follows: j1 is a vertex in the first copy of [m], . . ., jd is a vertex in the d-th 8 is labeled “i”.3 Since keys correspond to edges, the graph G(S, ~h) has n edges and d · m vertices, which is the standard notation from a data structure point of view, but is non-standard in graph theory. For a set S and an edge-labeled graph G, we let T (G) = {xi | xi ∈ S, G contains an edge labeled i}. In the following, our main objective is to prove that with high probability certain d subgraphs do not occur in G(S, ~h). Formally, for n, m, d ∈ N, d ≥ 2, let Gm,n denote the set of all d-partite hypergraphs with vertex set [m] in each class of the partition d whose edges are labeled with distinct labels from {1, . . . , n}. A set A ⊆ Gm,n is called a graph property. If for a graph G we have that G ∈ A, we say that G has property A. We shall always disregard isolated vertices. For a key set S of size n, a sequence ~h of hash functions from Z, and a graph d property A ⊆ Gm,n , we define the following random variables: For each G ∈ A, let IG be the indicator random variable that indicates whether G is a subgraph of G(S, ~h) or not. (We demand the edge labels to coincide.) Furthermore, the random variable NSA counts P the number of graphs G ∈ A which are subgraphs of G(S, ~h), i.e., NSA = G∈A IG . Let A be a graph property. Our main objective is then to estimate (from below) the probability that no subgraph of G(S, ~h) has property A. Formally, for given S ⊆ U we wish to bound (from above)  Pr~h∈Z NSA > 0 . (2.1) In the analysis of a randomized algorithm, bounding (2.1) is often a classical application of the first moment method, which says that   X Pr~h∈Z NSA > 0 ≤ E~h∈Z NSA = Pr~h∈Z (IG = 1). (2.2) G∈A However, we cannot apply the first moment method directly to bound (2.1), since hash functions from Z do not guarantee full independence on the key set, and thus the right-hand side of (2.2) is hard to calculate. However, we will prove an interesting connection to the expected number of subgraphs having property A when the hash function sequence ~h is fully random. To achieve this, we will start by collecting “bad” sequences of hash functions. Intuitively, a sequence ~h of hash functions is bad with respect to a key set S and a graph property A if G(S, ~h) has a subgraph G with G ∈ A and for the keys T ⊆ S which form G the g-components of ~h distribute T “badly”. (Recall the formal definition of “bad” from Definition 2.4.) Definition 2.6. For S ⊆ U and a graph property A let BSA ⊆ Z be the event [  {IG = 1} ∩ badT (G) . G∈A This definition is slightly different from the corresponding definition in the paper [3, Definition 3], which considers one application of hash class Z with an applicationspecific focus.4 copy of [m]. 3 We assume (w.l.o.g.) that the universe U is ordered and that each set S ⊆ U of n keys is represented as S = {x1 , . . . , xn } with  x1 < x 2 < · · · < x n .  S 4 In [3] we defined B A = ~ T ⊆S {G(T, h) has property A} ∩ badT . This works well in the case S 9 In addition to the probability space Z together with the uniform distribution, we also consider the probability space in which we use d fully random hash functions from U to [m], chosen independently. From here on, we will denote probabilities of events and expectations of random variables in the former case by Pr and E; we will use Pr∗ A and E∗ in the  latter. The next lemma shows that for bounding Pr NS > 0 we can ∗ A use E NS , i.e., the expected number of subgraphs having property A in the fully random case, and have to add the probability that the event BSA occurs. We call this additional summand the failure term of Z on A. Lemma 2.7. Let S ⊆ U be given. For an arbitrary graph property A we have    Pr NSA > 0 ≤ Pr BSA + E∗ NSA . (2.3) Proof. We calculate:     Pr NSA > 0 ≤ Pr BSA + Pr NSA > 0 ∩ BSA . We only have to focus on the second term on the right-hand side. Using the union bound, we continue as follows:  X    Pr NSA > 0 ∩ BSA ≤ Pr {IG = 1} ∩ BSA G∈A = X Pr {IG = 1} ∩ ≤ !! G0 ∈A G∈A X  \  {IG0 = 0} ∪ goodT (G0 )   Pr {IG = 1} ∩ goodT (G) G∈A ≤ X   Pr IG = 1 | goodT (G) G∈A (i) = X  Pr∗ (IG = 1) = E∗ NSA , G∈A where (i) holds by Lemma 2.5(b). This lemma provides the strategy for bounding Pr(NSA > 0). The second summand in (2.3) can be calculated assuming full randomness and is often already known from the literature if the original analysis was conducted using the first moment method. The task of bounding the first summand is tackled separately in the next subsection. 2.3. A Framework for Bounding the Failure Term. As we have seen, using hash class Z gives an additive failure term (cf. (2.3)) compared to the case that we bound Pr∗ NSA > 0 by the first moment method in the fully random case. Calculating Pr BSA looks difficult since we have to calculate the probability that there exists a subgraph G of G(S, ~h) that has property A and where ~h is T (G)-bad. Since we know the probability that ~h is T (G)-bad from Lemma 2.5(b), we could tackle this task by that we only consider randomness properties of the graph G(S, h1 , h2 ). In the hypergraph setting, “important” subgraphs of G(S, ~h) often occur not in terms of the graph G(T, ~h), for some set T ⊆ S, but by removing some vertices from the edges of G(T, ~h). In Definition 2.6, we may consider exactly such subgraphs of G(T, ~h) by defining A appropriately. The edge labels of a graph are used to identify which keys of S form the graph. 10 calculating the probability that there exists such a subgraph G under the condition that ~h is T (G)-bad, but then we cannot assume full randomness of ~h on T (G) to obtain a bound that a certain subgraph is realized by the hash values. We avoid this difficulty by taking another approach. We will find suitable events that contain BSA and where ~h is guaranteed to behave well on the key set in question. Observe the following relationship that is immediate from Definition2.6.  d Lemma 2.8. Let S ⊆ U , |S| = n, and let A ⊆ B ⊆ Gm,n . Then Pr BSA ≤ Pr BSB . We will now introduce two concepts that will allow us to bound the failure probability of Z for “suitable” graph properties A. Definition 2.9 (Peelability). A graph property A is called peelable if for all G = (V, E) ∈ A with |E| ≥ 1 there exists an edge e ∈ E such that (V, E − {e}) ∈ A. An example for a peelable graph property for bipartite graphs, i.e., in the case d = 2, is the set of all connected bipartite graphs (disregarding isolated vertices), because removing an edge that lies on a cycle or an edge incident to a vertex of degree 1 does not destroy connectivity. Peelable graph properties will help us in the following sense: Assume that BSA occurs, i.e., for the chosen ~h ∈ Z there exists some graph G ∈ A that is a subgraph of G(S, ~h) and ~h is T (G)-bad. Let T = T (G). In terms of the “deficiency” dT of ~h (cf. Definition 2.4) it holds that dT (~h) > 1. If A is peelable, we can iteratively remove edges from G such that the resulting graphs still have property A. Let G0 be a graph that results from G by removing a single edge. Then dT (G) − dT (G0 ) ∈ {0, 1}. Eventually, because d∅ = 0, we will obtain a subgraph G0 ∈ A of G such that ~h is T (G0 )-critical. In this case, we can again make use of Lemma 2.5(b) and bound the probability that G0 is realized by the hash function sequence by assuming that the hash values are fully random. However, peelability does not suffice to obtain low enough bounds for failure terms  Pr BSA ; we need the following auxiliary concept, whose idea will become clear in the proof of the next lemma. Definition 2.10 (Reducibility). Let c ∈ N, and let A and B be graph properties. A is called B-2c-reducible if for all graphs (V, E) ∈ A and sets E ∗ ⊆ E with |E ∗ | ≤ 2c we have the following: There exists an edge set E 0 with E ∗ ⊆ E 0 ⊆ E such that (V, E 0 ) ∈ B. If a graph property A is B-2c-reducible, we say that A reduces to B. The parameter c shows the connection to hash class Z: it is the same parameter as the number of gj -functions in hash class Z. To shorten notation, we let X µAt := Pr∗ (IG = 1) G∈A,|E(G)|=t be the expected number of subgraphs with exactly t edges having property A in the fully random case. The following lemma is the central result of this section and encapsulates our overall strategy to bound the additive failure term introduced by using hash class Z instead of fully random hash functions. Lemma 2.11. Let c ≥ 1, S ⊆ U with |S| = n, and let A, B, and C be graph properties such that A ⊆ B, B is a peelable graph property, and B reduces to C. Then n X   Pr BSA ≤ Pr BSB ≤ `−c · t2c · µCt . t=2 11   S Proof. By Lemma 2.8 we have Pr BSA ≤ Pr(BSB ) = Pr G∈B ({IG = 1} ∩ badT (G) ) . Assume that ~h is such that BSB occurs. Then there exists a subgraph G of G(S, ~h) such that G ∈ B and dT (G) (~h) > 1. Fix such a graph. Since B is peelable, we iteratively remove edges from G until we obtain a graph G0 = (V, E 0 ) such that G0 ∈ B and critT (G0 ) occurs. The latter is guaranteed, since d∅ (~h) = 0 and since for two graphs G and G0 , where G0 results from G by removing a single edge, it holds that dT (G) (~h) − dT (G0 ) (~h) ∈ {0, 1}. Since critT (G0 ) happens, for each gi -component of ~h, 1 ≤ i ≤ c, there is at least one collision on T (G0 ). Furthermore, there exists one component gj0 with j0 ∈ {1, . . . , c} such that exactly one collision on T (G0 ) occurs. For each gi , i ∈ {1, . . . , c}, let xi and yi be two distinct keys such that G0 contains the edges eS xi and eyi labeled with these keys and such that xi and yi collide under gi . Let E ∗ = 1≤i≤c {exi , eyi }. By construction |E ∗ | ≤ 2c. Since B reduces to C, there exists some set E 00 with ∗ E ⊆ E 00 ⊆ E 0 such that G00 = (V, E 00 ) ∈ C. By construction of E ∗ , each gi -component has at least one collision on T (G00 ). Moreover, gj0 has exactly one collision on T (G00 ). Thus, ~h is T (G00 )-critical. We calculate: ! ! [ [ (i)     Pr BSA ≤ Pr BSB = Pr {IG = 1} ∩ badT (G) ≤ Pr {IG0 = 1} ∩ critT (G0 ) G0 ∈B G∈B ! (ii) [ ≤ Pr {IG00 = 1} ∩ critT (G00 )  ≤ G00 ∈C X = X Pr {IG00 = 1} ∩ critT (G00 ) G00 ∈C  Pr IG00 = 1 | critT (G00 ) · Pr critT (G00 )  G00 ∈C (iii) ≤ `−c · X Pr∗ (IG00 = 1) · |T (G00 )|2c 00 G ∈C = `−c · n  X t=2 t2c · n  X Pr∗ (IG00 = 1) = `−c · t2c · µCt , X G00 ∈C |E(G00 )|=t t=2 where (i) holds because B is peelable, (ii) is due to reducibility, and (iii) follows by Lemma 2.5. We summarize the results of Lemma 2.7 and Lemma 2.11 in the following proposition. Proposition 2.12. Let c ≥ 1, m ≥ 1, S ⊆ U with |S| = n, and let A, B, and C be graph properties such that A ⊆ B, B is a peelable graph property, and B reduces to C. Assume that there are constants α, β such that n X   E∗ NSA := µAt = O n−α , (2.4) t=1 and n X  t2c µCt = O nβ . t=2 12 (2.5)  c,d Then setting ` = n(α+β)/c and choosing ~h at random from Z`,m yields   Pr NSA > 0 = O n−α . Proof. The proposition follows immediately by plugging the failure probability bound from Lemma 2.11 into Lemma 2.7. Remark 2.13. In the statement of Lemma 2.7 and Proposition 2.12 graph properties B and C can be the same graph properties, since every graph property reduces to itself. Proposition 2.12 shows the power of our framework. The conditions of this lemma can be checked without looking at the details of the hash functions, only by finding suitable graph properties that have a low enough expected number of subgraphs in the fully random case. Let us compare properties (2.4) and (2.5). Property (2.4) is the standard first moment method approach. So, it can often be checked from the literature whether a particular application seems suitable for an analysis with our framework or not. Property (2.5) seems very close to a first moment method approach, but there is one important difference to (2.4). The additional factor t2c , coming from the randomness properties of the hash class, means that to obtain low enough bounds for (2.5), the average number of graphs with property C must decrease rapidly, e.g., exponentially, fast in t. This will be the case for almost all graph properties considered in this thesis. In the analysis for application scenarios, we will use Lemma 2.7 and Lemma 2.11 instead of Proposition 2.12. Often, one auxiliary graph property suffices for many different applications and we think it is cleaner to first bound the failure term of Z on this graph property using Lemma 2.11; then we only have to care about the fully random case and apply Lemma 2.7 at the end. This concludes the development of the theoretical basis of this paper. 2.4. Step by Step Example: Analyzing Static Cuckoo Hashing. We start by fixing graph-related notation for usual graphs: We call an edge that is incident to a vertex of degree 1 a leaf edge. We call an edge a cycle edge if removing it does not disconnect any two nodes. A connected graph is called acyclic if it does not contain cycles. It is called unicyclic if it contains exactly one cycle. Cuckoo hashing [60] is a well known dictionary algorithm that stores a (dynamically changing) set S ⊆ U of size n in two hash tables, T1 and T2 , each of size m ≥ (1 + ε)n for some ε > 0. It employs two hash functions h1 and h2 with h1 , h2 : U → [m]. A key x can be stored either in T1 [h1 (x)] or in T2 [h2 (x)], and all keys are stored in distinct table cells. Thus, to find or remove a key it suffices to check these two possible locations. For details on the insertion procedure we refer the reader to [60]. In this section, we deal with the static setting. Here the question is whether or not a key set S of size n can be stored in the two tables of size (1 + ε)n each, for some ε > 0, using a pair of hash functions (h1 , h2 ) according to the cuckoo hashing rules. To this end, we look at the bipartite graph G(S, h1 , h2 ) built from S and (h1 , h2 ). Recall that the vertices of G are two copies of [m] and that each key xi ∈ S gives rise to an edge (h1 (x), h2 (x)) labeled i. If (h1 , h2 ) allow storing S according to the cuckoo hashing rules, i.e., independent of the insertion algorithm, we call (h1 , h2 ) suitable for S. This section is meant as an introductory example for applying the framework. Already Pagh and Rodler showed in [60] that using a Θ(log n)-wise independent hash 13 Fig. 2.1. The minimal obstruction graphs for cuckoo hashing, see also [19]. class suffices to run cuckoo hashing. Since standard cuckoo hashing is a special case of cuckoo hashing with a stash, the results here can also be proven using the techniques presented in [3]. However, the proofs here are notably simpler than the proofs needed for the analysis of cuckoo hashing with a stash. The central insight the reader should take away from the proof is that the analysis can be carried out by applying Lemma 2.11 alone, without reference to the inner structure of the hash functions. We will prove the following theorem: Theorem 2.14. Let ε > 0 and 0 < δ < 1 be given. Assume c ≥ 2/δ. For n ≥ 1 consider m ≥ (1 + ε)n and ` = nδ . Let S ⊆ U with |S| = n. Then for (h1 , h2 ) chosen c,2 at random from Z = Z`,m the following holds: Pr((h1 , h2 ) is not suitable for S) = O(1/n). In the following, all statements of lemmas and claims use the parameter settings of Theorem 2.14. It is not hard to see that (h1 , h2 ) is suitable for S if and only if every connected component of G(S, h1 , h2 ) has at most one cycle [19]. So, if (h1 , h2 ) is not suitable then G(S, h1 , h2 ) has a connected component with more than one cycle. This motivates considering the following graph property. Definition 2.15. Let MOG (“minimal obstruction graphs”) be the set of all 2 labeled graphs from Gm,n (disregarding isolated vertices) that form either a cycle with a chord or two cycles connected by a path of length t ≥ 0. These two types of graphs form minimal connected graphs with more than one cycle, see Figure 2.1. So, if (h1 , h2 ) is not suitable for S, then G(S, h1 , h2 ) contains a subgraph with property MOG. We summarize:  Pr((h1 , h2 ) is not suitable for S) = Pr NSMOG > 0 . (2.6) According to Lemma 2.7, the probability on the right-hand side of (2.6) is at most    Pr NSMOG > 0 ≤ Pr BSMOG + E∗ NSMOG . (2.7) We first study the expected number of minimal obstruction graphs in the fully random case.  Bounding E∗ NSMOG . The expected number of minimal obstruction graphs in the fully random case is well known from other work, see, e.g., [60]. The proof is included for the convenience of the reader and follows [60]. Lemma 2.16.  E∗ NSMOG = O(1/m). 14 Proof. We start by counting unlabeled graphs with exactly t edges that form a minimal obstruction graph. Every minimal obstruction graphs consists of a simple path of exactly t − 2 edges and two further edges which connect the endpoints of this path with vertices on the path. Since a minimal obstruction graph with t edges has exactly t − 1 vertices, there are no more than (t − 1)2 unlabeled minimal obstruction graphs having exactly t edges. Fix an unlabeled minimal obstruction graph G. First, there are two ways to split the vertices of G into the two parts of the bipartition. When this is fixed, there are no more than mt−1 ways to label the vertices with labels from [m], and there are no more than nt+1 ways to label the edges with labels from {1, . . . , n}. Fix such a fully labeled graph G0 . Now draw t labeled edges5 at random from [m]2 . The probability that these edges realize G0 is exactly 1/m2t . We calculate: ∗ E NSMOG  ≤ n X 2nt · mt−1 · (t − 1)2 t=3 m2t n n 1 2 X t2 nt 2 X t2 ≤ · = · = O , m t=3 mt m t=3 (1 + ε)t m where the last step follows from the convergence of the series q > 1. Combining Lemma 2.16 and (2.7) we obtain:   Pr NSMOG > 0 ≤ Pr BSMOG + O   1 . m P∞ t=0 t2 /q t for every (2.8)  It remains to bound the failure term Pr BSMOG .  Bounding Pr BSMOG . In the light of Definition 2.9, we first note that MOG is not peelable. So, we first find a peelable graph property that contains MOG. Since paths are peelable, and a minimal obstruction graph is “almost path-like” (cf. proof of Lemma 2.16), we relax the notion of a minimal obstruction graph in the following way. Definition 2.17. Let RMOG (“relaxed minimal obstruction graphs”) consist of 2 all graphs in Gm,n that form either (i) a minimal obstruction graph, (ii) a simple path, or (iii) a simple path and exactly one edge which connects an endpoint of the path with a vertex on the path. (We disregard isolated vertices.) By the definition, we obviously have that MOG ⊆ RMOG. Lemma 2.18. RMOG is peelable. Proof. Let G ∈ RMOG. We may assume that G has at least two edges. We distinguish three cases: Case 1: G is a minimal obstruction graph. Let G0 be the graph that results from G when we remove an arbitrary cycle edge incident to a vertex of degree 3 or degree 4 in G. Then G0 has property (iii) of Definition 2.17. Case 2: G has property (iii) of Definition 2.17. Let G0 be the graph that results from G when we remove an edge in the following way: If G contains a vertex of degree 3 then remove an arbitrary cycle edge incident to this vertex of degree 3, otherwise remove an arbitrary cycle edge. Then G0 is a path and thus has property (ii) of Definition 2.17. Case 3: G is a simple path. Let G0 be the graph that results from G when we remove an endpoint of G with the incident edge. G0 is a path and has property (ii) of Definition 2.17. 5 The labels of these edges are equivalent to the edge labels of G0 . 15 Standard cuckoo hashing is an example where we do not need every component of our framework, because there are “few enough” graphs having property RMOG to obtain low enough failure probabilities. Lemma 2.19. n  Pr BSMOG = O c . ` Proof. We aim to apply Lemma 2.11, where MOG takes the role of A and RMOG takes the role of B and C (cf. Remark 2.13), respectively, in the statement of that lemma. Claim 2.20. For t ≥ 2, we have µRMOG ≤ t 6mt2 . (1 + ε)t Proof. We first count labeled graphs with exactly t edges having property RMOG. From the proof of Lemma 2.16 we know that there are fewer than 2 · t2 · nt · mt−1 labeled graphs that form minimal obstruction graphs ((i) of Def. 2.17). Similarly, there are not more than 2 · nt · mt+1 labeled paths ((ii) of Def. 2.17), and not more than 2 · t · nt · mt graphs having property (iii) of Def. 2.17. Fix a labeled graph G with property RMOG having exactly t edges. Draw t labeled edges at random from [m]2 . The probability that these t edges realize G is exactly 1/m2t . We calculate: 6t2 nt mt+1 6mt2 = . m2t (1 + ε)t µRMOG ≤ t Using Lemma 2.11, we proceed as follows: Pr BSMOG  −c ≤` · n X t 2c · µRMOG t −c ≤` t=2 · n X 6mt2(c+1) t=2 (1 + ε)t =O n `c . Putting Everything Together. Plugging the results of Lemma 2.16 and Lemma 2.19 into (2.7) gives:   n    1 Pr NSMOG > 0 ≤ Pr BSMOG + E∗ NSMOG = O c + O . ` m Using that m = (1 + ε)n and setting ` = nδ and c ≥ 2/δ yields Theorem 2.14. This example gives insight into the situation in which our framework can be applied. The graph property under consideration (MOG) is such that the expected number of subgraphs with this property is polynomially small in n. The peeling process, however, yields graphs which are much more likely to occur, e.g., paths of a given length. The key in our analysis is finding suitable graph properties of “small enough” size. (That is the reason why the concept of “reducibility” from Definition 2.10 is needed in other applications: It makes the number of graphs that must be considered smaller.) The g-components of the hash functions from Z provide a boost of `−c , which is then used to make the overall failure term again polynomially small in n. The reader might find it instructive to apply Proposition 2.12 directly. Then, graph property MOG plays the role of graph property A in that proposition; graph property RMOG plays the role of B and C. 16 3. Applying the Framework to Graphs. In this section, we will study different applications of our hash class in algorithms and data structures whose analysis relies on properties of the graph G(S, h1 , h2 ). We shall study four different applications: • A variant of cuckoo hashing called cuckoo hashing with a stash introduced by Kirsch, Mitzenmacher, and Wieder in [48]. • A construction for the simulation of a uniform hash function due to Pagh and Pagh [58]. • A construction of a (minimal) perfect hash function as described by Botelho, Pagh, and Ziviani [7]. • The randomness properties of hash class Z on connected components of G(S, h1 , h2 ). We start by studying the failure term of the hash class on a graph property that plays a central role in the applications. 3.1. Randomness Properties of Leaf less Graphs. In this section we study the additive failure term of hash functions from Z on a graph property that will be a key ingredient in the applications to follow. First, we recall some graph notation and present a counting argument from [3]. Subsequently, we study the failure term of Z on the class of graphs which contain no leaf edges, so-called “leafless graphs”. Leafless graphs are at the core of the analysis of many randomized algorithms and data structures, such as cuckoo hashing (note that the minimal obstruction graphs from Figure 2.1 have no leaves), the simulation of a uniform hash function as described by Pagh and Pagh in [58], and the construction of a perfect hash function from Botelho, Pagh, and Ziviani [7]. As we shall demonstrate in the subsequent sections, analyzing the case that we replace fully random hash functions by hash functions from Z in these applications becomes easy when the behavior of the additive failure term of Z on leafless graphs is known. The main result of this section says that the additive c,2 failure term of hash class Z`,m on leafless graphs is O(n/`c ), and can thus be made −α δ as small as O(n ) for ` = n , 0 < δ < 1, and c = Θ(α). On the way, we will use all steps of our framework developed in Section 2. We recall some graph notation. The cyclomatic number γ(G) is the dimension of the cycle space of a graph G. It is equal to the smallest number of edges we have to remove from G such that the remaining graph is a forest (an acyclic, possibly disconnected graph) [20]. Also, let ζ(G) denote the number of connected components of G (ignoring isolated vertices). Definition 3.1. Let N (t, `, γ, ζ) be the number of unlabeled (multi-)graphs with ζ connected components and cyclomatic number γ that have t − ` inner edges and ` leaf edges. The following bound is central in our analysis; it is taken from [3, Lemma 4]. Lemma 3.2. N (t, `, γ, ζ) = tO(`+γ+ζ) . 2 We let LL ⊆ Gm,n consist of all bipartite graphs that contain no leaf edge. It will turn out that for all our applications LL will be a suitable “intermediate” graph property, i.e., for the graph property A interesting for the application it will hold A ⊆ LL, which will allow us to apply Lemma 2.8. (For example, graph property LL could have been used instead of graph property RMOG in the example of the previous section.) Hence our goal in this section is to show that there exists a constant α > 0, c,2 which depends on the parameters ` and c of the hash class Z`,m , such that   Pr(h1 ,h2 )∈Z BSLL = O n−α . 17  Luckily, bounding Pr BSLL is an example par excellence for applying Lemma 2.11. To use this lemma we have to find a suitable peelable graph property (note that LL is not peelable) and a suitable further graph property to which that graph property reduces. 2 We let LC consist of all graphs G from Gm,n that contain at most one connected component that has leaves, disregarding isolated vertices. If such a component exists, we call it the leaf component of G. Lemma 3.3. LC is peelable. Proof. Suppose G ∈ LC has at least one edge. If G has no leaf component then all edges are cycle edges, and removing an arbitrary edge leaves a cycle component or creates a leaf component. So, the resulting graph has property LC. If G has a leaf component C, remove a leaf edge. This makes the component smaller, but maintains property LC. So, the resulting graph has again property LC. We will also need the following auxiliary graph property: 2 Definition 3.4. For K ∈ N, let LCY(K) ⊆ Gm,n be the set of all bipartite graphs G = (V, E) with the following properties (disregarding isolated vertices): 1. at most one connected component of G contains leaves (i.e., LCY(K) ⊆ LC); 2. the number ζ(G) of connected components is bounded by K; 3. if present, the leaf component of G contains at most K leaf and cycle edges; 4. the cyclomatic number γ(G) is bounded by K. Lemma 3.5. Let c ≥ 1. Then LC is LCY(4c)-2c-reducible. Proof. Consider an arbitrary graph G = (V, E) ∈ LC and an arbitrary edge set E ∗ ⊆ E with |E ∗ | ≤ 2c. We say that an edge that belongs to E ∗ is marked. G satisfies Property 1 of graphs from LCY(4c). We process G in three stages: Stage 1: Remove all components of G without marked edges. Afterwards at most 2c components are left, and G satisfies Property 2. Stage 2: If G has a leaf component C, repeatedly remove unmarked leaf and cycle edges from C, while C has such edges. The remaining leaf and cycle edges in C are marked, and thus their number is at most 2c; Property 3 is satisfied. Stage 3: If there is a leaf component C with z marked edges (where z ≤ 2c), then at least one of them is a leaf edge, and hence γ(C) ≤ z − 1. Now consider an arbitrary leafless component C 0 with cyclomatic number z. We construct a suitable subgraph C 00 of C 0 . For this, we need the following graph theoretic claim: Claim 3.6. Every leafless connected graph with i marked edges has a leafless connected subgraph with cyclomatic number ≤ i+1 that contains all marked edges. Proof. Let G = (V, E) be a leafless connected graph with i marked edges. If γ(G) ≤ i + 1, there is nothing to prove. So suppose γ(G) ≥ i + 2. Choose an arbitrary spanning tree (V, E0 ) of G. There are two types of edges in G: bridge edges and cycle edges. A bridge edge is an edge whose deletion disconnects the graph, cycle edges are those whose deletion does not disconnect the graph. Clearly, all bridge edges are in E0 . Let Emb ⊆ E0 denote the set of marked bridge edges. Removing the edges of Emb from G splits V into |Emb | + 1 connected components V1 , . . . , V|Emb |+1 ; removing the edges of Emb from the spanning tree (V, E0 ) will give exactly the same components. For each cyclic component Vj we choose one edge ej ∈ / E0 that connects two nodes in Vj . The set of these |Emb | + 1 edges is called E1 . Now each marked bridge edge lies on a path connecting two cycles in (V, E0 ∪ E1 ). Recall from graph theory [20] the notion of a fundamental cycle: Clearly, each edge e ∈ E − E0 closes a unique cycle with E0 . The cycles thus obtained are called the fundamental cycles of G w. r. t. the spanning tree (V, E0 ). Each cycle in G can 18 be obtained as an XOR-combination of fundamental cycles. (This is just another formulation of the standard fact that the fundamental cycles form a basis of the “cycle space” of G, see [20].) From this it is immediate that every cycle edge of G lies on some fundamental cycle. Now we associate an edge e0 ∈ / E0 with each marked cycle edge e ∈ Emc . Given e, let e0 ∈ / E0 be such that e is on the fundamental cycle of e0 . Let E2 be the set of all edges e0 chosen in this way. Clearly, each e ∈ Emc is a cycle edge in (V, E0 ∪ E2 ). Now let G0 = (V, E0 ∪ E1 ∪ E2 ). Note that |E1 ∪ E2 | ≤ (|Emb | + 1) + |Emc | ≤ i + 1 and thus γ(G0 ) ≤ i+1. In G0 , each marked edge is on a cycle or on a path that connects two cycles. If we iteratively remove leaf edges from G0 until no leaf is left, none of the marked edges will be affected. Thus, we obtain the desired leafless subgraph G∗ with γ(G∗ ) = γ(G0 ) ≤ i + 1. Claim 3.6 gives us a leafless subgraph C 00 of our leafless component C 0 with 00 γ(C ) ≤ z + 1 that contains all marked edges of C 0 . We remove from G all vertices and edges of C 0 that are not in C 00 . Doing this for all leafless components yields the final graph G. Summing contributions to the cyclomatic number of G over all (at most 2c) components, we see that γ(G) ≤ 4c; thus Property 4 is satisfied.  We now bound the additive failure term Pr BSLL . Lemma 3.7. Let S ⊆ U with |S| = n, ε > 0, c ≥ 1, and let ` ≥ 1. Assume c,2 m ≥ (1 + ε)n. If (h1 , h2 ) are chosen at random from Z`,m , then   Pr BSLL ≤ Pr BSLC = O(n/`c ). Proof. According to Lemma 2.11 and Lemma 3.5 it holds that n X   LCY(4c) Pr BSLL ≤ Pr BSLC ≤ `−c · t2c · µt . t=2 Claim 3.8. LCY(4c) µt = 2n · tO(1) . (1 + ε)t−1 Proof. By Lemma 3.2, there are at most tO(c) = tO(1) ways to choose a bipartite graph G in LCY(4c) with t edges. Graph G cannot have more than t + 1 nodes, since cyclic components have at most as many nodes as edges, and in the single leaf component, if present, the number of nodes is at most one bigger than the number of edges. In each component of G, there are two ways to assign the vertices to the two sides of the bipartition. After such an assignment is fixed, there are at most mt+1 ways to label the vertices with elements of [m], and there are not more than nt ways to label the t edges of G with labels from {1, . . . , n}. Assume now such labels have been chosen for G. Draw t labeled edges according to the labeling of G from [m]2 uniformly at random. The probability that they exactly fit the labeling of nodes and edges of G is 1/m2t . Thus, LCY(4c) µt ≤ 2 · mt+1 · nt · tO(1) 2n · tO(1) ≤ . m2t (1 + ε)t−1 We use this claim to finish the proof of Lemma 3.7 by the following calculation: n n n X 2n X tO(1) LCY(4c) Pr(BSLC ) ≤ `−c t2c · µt ≤ c · = O . ` t=2 (1 + ε)t−1 `c t=2 19 We now turn our focus to cuckoo hashing with a stash. We reprove a result from [3] to demonstrate the power of the framework. 3.2. Cuckoo Hashing (with a Stash). Kirsch, Mitzenmacher, and Wieder [48] proposed augmenting the cuckoo hashing tables with a stash, an additional segment of storage that can hold up to s keys for some (constant) parameter s. They showed that using a stash of size s reduces the rehash probability to Θ(1/ns+1 ). For details of the algorithm, see [49]. We focus on the question whether the pair (h1 , h2 ) allows storing the key set S in the two tables with a stash of size s. It is known from [49, 3] that a single parameter of G = G(S, h1 , h2 ) determines whether a stash of size s is sufficient to store S using (h1 , h2 ), namely the excess ex(G). The excess ex(G) of a graph G is defined as the minimum number of edges one has to remove from G so that all connected components of the remaining graph are acyclic or unicyclic. In [49] it is shown that the excess of a graph G = (V, E) is ex(G) = γ(G) − ζcyc (G), where ζcyc (G) is the number of cyclic connected components in G. The connection between the excess of a graph and the failure probability of cuckoo hashing with a stash is that (h1 , h2 ) are suitable for a key set S if and only if ex(G(S, h1 , h2 )) ≤ s. The following theorem shows that one can replace the full randomness assumption of [49] by hash functions from hash class Z. Theorem 3.9 ([3]). Let ε > 0 and 0 < δ < 1, let s ≥ 0 be given. Assume c ≥ (s + 2)/δ. For n ≥ 1 consider m ≥ (1 + ε)n and ` = nδ . Let S ⊆ U with |S| = n. c,2 Then for (h1 , h2 ) chosen at random from Z = Z`,m the following holds: Pr(ex(G(S, h1 , h2 )) ≥ s + 1) = O(1/ns+1 ). Proof. As in [3], we define an excess-(s + 1) core graph as a leafless graph G with excess exactly s + 1 in which all connected components have at least two cycles. 2 By CG(s + 1) we denote the set of all excess-(s + 1) core graphs in Gm,n . (For an illustration, see Figure 1 in [3].) From [3, Lemma 6] we know that each G = G(S, h1 , h2 ) with ex(G)≥ s+1 contains  CG(s+1) an excess-(s + 1) core graph. Hence Pr(ex(G(S, h1 , h2 )) ≥ s + 1) ≤ Pr NS >0 .    CG(s+1) To prove Theorem 3.9, it suffices to show that Pr NS > 0 = O 1/ns+1 . By Lemma 2.7, we know that       CG(s+1) CG(s+1) CG(s+1) Pr NS > 0 ≤ Pr BS + E ∗ NS . (3.1)   CG(s+1) From [3, Lemma 7] we know that E∗ NS = O(1/ns+1 ). Since CG(s + 1) ⊆ LL, we may apply Lemma 3.7 and write       n 1 1 CG(s+1) Pr NS > 0 ≤ O c + O s+1 = O s+1 , (3.2) ` n n for the parameters used in Theorem 3.9. 3.3. Simulation of a Uniform Hash Function. Consider a universe U of keys and a finite set R. Suppose we want to construct a hash function that takes on fully random values from R on a key set S ⊆ U of size n. The naı̈ve construction just assigns a random hash value to each key x ∈ S and stores the key-value pair in a 20 hash table that supports lookup in constant time and construction in expected time O(n), e. g., cuckoo hashing (with a stash). For information theoretical reasons, this construction needs space at least n log |R|. (See, e. g., [66, Lemma 5.3.1].) We will now see that we can achieve much more in (asymptotically) almost the same space. By the term “simulating uniform hashing for U and R” we mean an algorithm that does the following. On input n ∈ N, a randomized procedure sets up a data structure DSn that represents a hash function h : U → R, which can then be evaluated efficiently for keys in U . For each set S ⊆ U of cardinality n there is an event BS that occurs with small probability such that conditioned on BS the values h(x), x ∈ S, are fully random. So, in contrast to the naı̈ve construction from above, one h can be shared among many applications and works on each set S ⊆ U of size n with high probability. The quality of the algorithm is determined by the space needed for DSn , the evaluation time for h, and the probability of the event BS , which we call the failure probability of the construction. It should be possible to evaluate h in constant time. Again, the information theoretical lower bound implies that at least n log |R| bits are needed to represent DSn . The first constructions that matched this space bound up to constant factors were proposed independently by Dietzfelbinger and Woelfel [32] and Östlin and Pagh [56]. In the following, let R be the range of the hash function to be constructed, and assume that (R, ⊕) is a commutative group. (For example, we could use R = [t] with addition mod t.) We sketch the construction of [56] next. The construction described in [56] builds upon the graph G(S, h1 , h2 ). Each vertex v of G(S, h1 , h2 ) is associated with a random element xv from R. The construction uses a third hash function h3 : U → R. All three hash functions have to be chosen from a nδ -wise independent class. Let x ∈ U be an arbitrary key and let (v, w) be the edge that corresponds to x in G(S, h1 , h2 ). The hash value of x is h(x) = xv ⊕ xw ⊕ h3 (x). This construction uses 8n · log |R| + o(n) + O(log log |U |) bits of space and achieves a failure probability of O(1/ns ) for each s ≥ 1. (The influence of s on the description length of the data structure is in the o(n)+O(log log |U |) term. It is also in the construction time of the hash functions h1 , h2 , h3 .) The evaluation time is dominated by the evaluation time of the three highly-independent hash functions. The construction of [56] runs in time O(n). In their full paper [58], a general method to reduce the description length of the data structure to (1 + ε)n log |R| + o(n) + O(log log |U |) bits was presented. This is essentially optimal. This technique adds a summand of O(1/ε2 ) to the evaluation time. Another essentially space-optimal construction was presented by Dietzfelbinger and Rink in [28]. It is based on results of Calkin [8] and the “split-and-share” approach. It uses (1 + ε)n log |R| + o(n) + O(log log |U |) bits of space and has evaluation time O(max{log2 (1/ε), s2 }) for failure probability O(n1−(s+2)/9 ). The construction presented here is a modification of the construction in [58]. We replace the highly independent hash functions with functions from hash class Z. The data structure consists of a hash function pair (h1 , h2 ) from our hash class, two tables of size m = (1 + ε)n each, filled with random elements from R, a two-wise independent hash function with range R, O(s) small tables with entries from R, and O(s) twoindependent hash functions to pick elements from these tables. The evaluation time of h is O(s), and for S ⊆ U , |S| = n, the event BS occurs with probability O(1/ns+1 ). The construction requires roughly twice as much space as the most space-efficient solutions [28, 58]. However, it seems to be a good compromise combining simplicity and fast evaluation time with moderate space consumption. 21 Theorem 3.10. Given n ≥ 1, 0 < δ < 1, ε > 0, and s ≥ 0, we can construct a data structure DSn that allows us to compute a function h : U → R such that: (i) For each S ⊆ U of size n there is an event BS of probability O(1/ns+1 ) such that conditioned on BS the function h is distributed uniformly on S. (ii) For arbitrary x ∈ U , h(x) can be evaluated in time O(s/δ). (iii) DSn comprises 2(1 + ε)n log |R| + o(n) + O(log log |U |) bits. Proof. Choose an arbitrary integer c ≥ (s + 2)/δ. Given U and n, set up DSn as follows. Let m = (1 + ε)n and ` = nδ , and choose and store a hash function pair c,2 (h1 , h2 ) from Z = Z`,m , with component functions g1 , . . . , gc from F`2 . In addition, choose two random vectors t1 , t2 ∈ Rm , c random vectors y1 , . . . , yc ∈ R` , and choose f at random from a 2-wise independent class of hash functions from U to R. Using DSn , the mapping h : U → R is defined as follows: h(x) = t1 [h1 (x)] ⊕ t2 [h2 (x)] ⊕ f (x) ⊕ y1 [g1 (x)] ⊕ . . . ⊕ yc [gc (x)]. DSn satisfies (ii) and (iii) of Theorem 3.10. (If the universe is too large, it must be collapsed to size ns+3 first.) We show that it satisfies (i) as well. For this, let S ⊆ U with |S| = n be given. First, consider only the hash functions (h1 , h2 ) from Z. By Lemma 3.7 we have Pr(BSLL ) = O(n/`c ) = O(1/ns+1 ). Now fix (h1 , h2 ) ∈ / BSLL , which includes fixing the components g1 , . . . , gc . Let T ⊆ S be such that G(T, h1 , h2 ) is the 2-core of G(S, h1 , h2 ), i.e., the maximal subgraph with minimum degree at least two. The graph G(T, h1 , h2 ) is leafless, and since / BSLL , we have that (h1 , h2 ) is T -good. Now L (h1 , h2 ) ∈ we note that the part f (x) ⊕ 1≤j≤c yj [gj (x)] of h(x) acts exactly as one of our hash functions h1 and h2 , where f and y1 , . . . , yc are yet unfixed. So, arguing as in the proof of Lemma 2.5 we see that h is fully random on T . Now assume that f and the entries in the tables y1 , . . . , yc are fixed. Following [58], we show that the random entries in t1 and t2 alone make sure that h(x), x ∈ S − T , is fully random. For an idea of the proof let (x1 , . . . , xp ) be the keys in S \ T , ordered in such a way that the edge corresponding to xi is a leaf edge in G(T ∪{x1 , . . . , xi }, h1 , h2 ), for each i ∈ {1, . . . , p}. To obtain such an ordering, repeatedly remove leaf edges from G = G(S, h1 , h2 ), as long as this is possible. The sequence of corresponding keys removed in this way is xp , . . . , x1 . In [58] it is shown by an induction argument that h is uniform on T ∪ {x1 , . . . , xp }. When this construction was first described in [2], it was the easiest to implement data structure to simulate a uniform hash function in almost optimal space. Nowadays, the construction of Pagh and Pagh can use the highly-independent hash class construction of Thorup [71] or Christiani, Pagh, and Thorup [12] instead of Siegel’s construction. However, in the original analysis of Pagh and Pagh [58], the hash functions are required to be from an nδ -wise independent hash class. It remains to be demonstrated by experiments that the construction of Pagh and Pagh in connection with the constructions mentioned above is efficient. We believe that using hash class Z is much faster. Applying the same trick as in [58], the data structure presented here can be extended to use only (1 + ε)n words from R. The evaluation time of this construction is O max{ ε12 , s} . 3.4. Construction of a (Minimal) Perfect Hash Function. A hash function h : U → [m] is perfect on S ⊆ U if it is injective (or 1-on-1) on S. A perfect hash function is minimal if |S| = m. Here, S is assumed to be a static set. Perfect hash functions are usually applied when a large set of items is frequently queried; they allow 22 fast retrieval and efficient memory storage in this situation. We refer the reader to [7, 21] for surveys of constructions for (minimal) perfect hash functions. The first explicit practical construction of a (minimal) perfect hash function which needs only O(n) bits is due to Botelho, Pagh, and Ziviani [6] (full version [7]) and is based on a hypergraph approach. Our construction is based on this work. In [7], explicit hash functions based on the “split-and-share” approach were used. This technique builds upon a general strategy described by Dietzfelbinger in [21] and Dietzfelbinger and Rink in [28] to make the “full randomness assumption” feasible in the construction of a perfect hash function. Botelho et al. showed in experiments that their construction is practical, even when realistic hash functions are used. Our goal is to show that hash functions from class Z can be used in a specific version of their construction as well. After proving the main result, we will speculate about differences in running time between the split-and-share approach of [7] and hash class Z. The construction of [7] to build a perfect hash function mapping keys from a key set S to [2m] with m = (1 + ε)n works as follows. First, the graph G(S, h1 , h2 ) is built. If this graph contains a cycle, new hash functions are chosen and the graph is built anew. If the graph is acyclic, a peeling algorithm is used to construct a one-to-one mapping σ : S → [2m] with σ(x) ∈ {h1 (x), m + h2 (x)} for all x ∈ S. The result of the peeling procedure also makes it possible to construct two tables t1 [0..m − 1] and t2 [0..m − 1] storing bits, with the property that     h1 (x) 0 σ(x) = ⇐⇒ t1 [h1 (x)] ⊕ t2 [h2 (x)] = , for x ∈ S. m + h2 (x) 1 It is then obvious how σ(x) can be calculated in constant time, given t1 [0..m − 1] and t2 [0..m − 1]. If (h1 , h2 ) are fully random hash functions, the probability that the graph is acylic, i.e., the probability that the construction succeeds, for m = (1 + ε)n is s  1− 1 1+ε 2 . (3.3) We replace the pair (h1 , h2 ) of hash functions by functions from Z. The next lemma shows that for m ≥ 1.08n we can build a perfect hash function for a key set S by trying the construction of Botelho et al. a constant number of times (in expectation). Lemma 3.11. Let S ⊆ U with S = n. Let ε ≥ 0.08, and let m ≥ (1 + ε)n. Set c,2 ` = nδ and c ≥ 1.25/δ. Then for a randomly chosen pair (h1 , h2 ) ∈ Z`,m we have 1 Pr(G(S, h1 , h2 ) is acyclic) ≥ 1 + ln 1 − 2  1 1+ε 2 ! − o(1). (3.4) Figure 3.1 depicts the difference between the probability bounds in (3.3) and in (3.4). The theoretical bound using a first moment approach is close to the behavior in a random graph when ε ≥ 1. 2 Proof. [Of Lemma 3.11] Let CYC be the set of all cycles in Gm,n . Note that all these cycles have even length, since we consider bipartite graphs. By Lemma 2.7, we may bound Pr(NSCYC > 0) by Pr(BSCYC ) + E∗ (NSCYC ). Since CYC ⊆ LL, we know that Pr(BSCYC ) = O(n/`c ), see Lemma 3.7. For the parameter choices ` = nδ and c ≥ 1.25/δ we have Pr(BSCYC ) = o(1). We now focus on the second summand and 23 Success probability 1 0.5 r 1− 1+ 1 2  1 1+ε 2   2  1 ln 1 − 1+ε 0 0.08 0.50 1.00 1.50 2.00 ε 2.50 3.00 3.50 4.00 Fig. 3.1. Comparison of the probability of a random graph being acyclic and the theoretical bound following from a first moment approach for values ε ∈ [0.08, 4]. calculate (as in [7]): ∗ E NSCYC  = n/2 X t=1 = n/2 X t=1 µCYC 2t ≤ n/2 X t=1 1 2t · (1 + ε)2t n/2 n  n/2 X X (2t)! · m2t n2t 2t · (2t)! = ≤ 2t · m2·2t 2t · m2t 2t · m2t t=1 t=1  2 ! ∞ X 1 1 1 ≤ = − ln 1 − , 2t · (1 + ε)2t 2 1+ε t=1 n 2t  where the last step is the Maclaurin expansion. According to Lemma 3.11, we can build a perfect hash function with range [2.16n] with a constant number of constructions of G(S, h1 , h2 ) (in expectation). To store the data structure we need 2.16n bits (to store g1 and g2 ), and o(n) bits to store the pair (h1 , h2 ) from Z. For example, for a set of n = 232 keys, i.e., about 4.3 billion keys, the pair (h1 , h2 ) may consist of ten tables with 256 entries each, five 2-universal hash functions, and two 2-independent hash functions, see Lemma 3.11 with parameters c = 5 and δ = 1/4. This seems to be more practical than the split-and-share approach from [7] which uses more and larger tables per hash function, cf. [7, Section 4.2]. However, it remains future work to demonstrate in experiments how both approaches compare to each other. To obtain a minimal perfect hash function, one has to compress the perfect hash function further. This roughly doubles the description length, see [7] for details. In their paper [7], Botelho et al. showed that minimal space usage is achieved when using three hash functions h1 , h2 , h3 to build the hypergraph G(S, h1 , h2 , h3 ). In this case, one can construct a perfect hash function with range [1.23n] with high probability. Since the g-values must then index three hash functions, 1.23n · log2 3 ≈ 1.95n bits are needed to store the bit vectors. According to [7], the minimal perfect hash function needs about 2.62n bits. Our results with regard to hypergraphs do not lead to a construction that can compete. 3.5. Connected Components of G(S, h1 , h2 ) are small. As is well known from the theory of random graphs, for a key set S ⊆ U of size n and m = (1 + ε)n, for ε > 0, and fully random hash functions h1 , h2 : U → [m] the graph G(S, h1 , h2 ) w.h.p. contains only components of at most logarithmic size which are trees or unicyclic. (This is the central argument for standard cuckoo hashing to work.) We show here that hash class Z can provide this behavior if one is willing to accept a density that is smaller by a constant factor. Such situations have been considered in the seminal 24 work of Karp et al. [46] on the simulation of shared memory in distributed memory machines. We give the following result as a corollary. It has first appeared in [46], for a √ different class of ( n-wise independent) hash functions. Here we prove it for hash class Z. Corollary 3.12 ([46, Lemma 6.3]). Let S ⊆ U with |S| = n. Let m ≥ 6n. Then for each α ≥ 1, there are β, `, c, s ≥ 1 such that for G = G(S, h1 , h2 ) with c,2 (h1 , h2 ) ∈ Z`,m we have that (a) Pr(G has a connected component with at least β log n vertices) = O(n−α ). (b) Pr(G has a connected component with k vertices and ≥ k + s − 1 edges) = O(n−α ). Proof. We start with the proof of (b). If G = G(S, h1 , h2 ) has a connected component A with k vertices and at least k + s − 1 edges, then ex(G) ≥ s − 1. According to Theorem 3.9, the probability that such a component appears is O(1/nα ), for s = α and c ≥ 2(α + 1). The proof of Part (a) requires more care. For this part, we may focus on the probability that G contains a tree with k = β log n vertices. We let T consist of all trees with k vertices in Gm,n and apply Lemma 2.7 to get    Pr NST > 0 ≤ Pr BST + E∗ NST . (3.5) Since T ⊆ LCY, we have that Pr(BST ) = O(n/`c ), see Lemma 3.7. We now bound the second summand of (3.5). Note that the calculations are essentially the same as the ones made in [46] to prove their Lemma 6.3. By Cayley’s formula we know that there are k k−2 labeled trees with vertex set {1, . . . , k}. Fix such a tree T ∗ . We can label the n edges of T ∗ with k − 1 keys from S in k−1 · (k − 1)! many ways. Furthermore, there ∗ are two ways to fix which verticesof T belong to which side of the bipartition. After this, there are not more than 2m ways to assign the vertices of T ∗ to vertices in the k bipartite graph G(S, h1 , h2 ). Once all these labels of T ∗ are fixed, the probability that the hash values of (h1 , h2 ) realize T ∗ is 1/m2(k−1) . We can thus calculate:  k−2  n · 2 · (k − 1)! · 2m 2k+1 · m2 · k k−2 k−1 · k k ∗ T E (NS ) ≤ ≤ 6k · k! m2(k−1)   k+1 2 k−2 k 2 ·m ·k e √ ≤ ≤ 2m2 · 3 6k · 2πk · (k/e)k Part (a) follows for k = Ω(log n). The authors of [46] use the hash functions from [25] (precursor of Z) combined √ with functions from Siegel’s hash class to obtain a hash class with high ( n-wise) independence. They need this high level of independence in the proof of their Lemma 6.3, which states properties of the connected components in the graph built from the key set and these highly independent hash functions. Replacing Lemma 6.3 in [46] with our Corollary 3.12 immediately implies that the results of [46], in particular, their Theorem 6.4, also hold when (only) hash functions from Z are used. In particular, in [46] the sparse setting where m is at least 6n was considered as well. We remark that statement (b) of Corollary 3.12 holds for m ≥ (1 + ε)n. Moreover, this result could be applied to prove results for cuckoo hashing (with a stash), and de-amortized cuckoo hashing of Arbitman et al. [1]. However, note that while in the fully random case the statement of Corollary 3.12 holds for m = (1 + ε)n, here we had to assume m ≥ 6n, which yields only very low hash table load. We 25 note that this result cannot be improved to (1 + ε)n using √ the first moment approach inherent in our approach and the approach of [46] (for n-wise independence), since the number of unlabeled trees that have to be considered in the first moment approach is too large [57]. It remains open to show that graphs built with our class of hash functions have small connected components for all ε > 0. 4. Applying the Framework on Hypergraphs. In this section we will discuss some applications of hash class Z in the setting with more than two hash functions, i.e., each edge of G(S, ~h) contains at least three vertices. We will study three different applications: Generalized cuckoo hashing with d ≥ 3 hash functions as proposed by Fotakis, Pagh, Sanders, and Spirakis [35], two recently described insertion algorithms for generalized cuckoo hashing due to Khosla [47] and Eppstein, Goodrich, Mitzenmacher, and Pszona [33], and different schemes for load balancing as studied by Schickinger and Steger [67]. For applications regarding generalized cuckoo hashing, we will study the failure term of Z on the respective graph properties directly. We will show that Z allows running these applications efficiently. However, we have to assume that the load of the hash table is rather low. For the application with regard to load balancing schemes, the failure term of Z will be analyzed by means of a very general graph property. However, it requires higher parameters when setting up a hash function from Z, which degrades the performance of these hash functions. We will start by introducing some notation and making a small generalization to the framework. Hypergraph Notation. A hypergraph extends the notion of an undirected graph by allowing edges to consist of more than two vertices. We use the hypergraph notation from [68, 44]. A hypergraph is called d-uniform if every edge contains exactly d vertices. Let H = (V, E) be a hypergraph. A hyperpath from u to v in H is a sequence (u = u1 , e1 , u2 , e2 , . . . , et−1 , ut = v) such that ei ∈ E and ui , ui+1 ∈ ei , for 1 ≤ i ≤ t−1. The hypergraph H is connected if for each pair of vertices u, v ∈ V there exists a hyperpath from u to v. The bipartite representation of a hypergraph H is the bipartite graph bi(H) where vertices of H are the vertices on the right side of the bipartition, the edges of H correspond to vertices on the left side of the bipartition, and two vertices are connected by an edge in the bipartite graph if the corresponding edge in the hypergraph contains the corresponding vertex. Note that a hypergraph H 0 is a subgraph of a hypergraph H (as defined in Section 2) if and only if bi(H 0 ) is a subgraph of bi(H) in the standard sense. We will use a rather strict notion of cycles in hypergraphs. A connected hypergraph is called a hypertree if bi(H) is a tree. A connected hypergraph is called unicyclic if bi(H) is unicyclic. A connected hypergraph that is neither a hypertree nor unicyclic is called complex. Using the standard formula to calculate the cyclomatic number of a graph6 [20], we get the following (in)equalities for a connected d-uniform hypergraph H with n edges and m vertices: (d − 1) · n = m − 1 if H is a hypertree, (d − 1) · n = m if H is unicyclic, and (d − 1) · n > m if H is complex. We remark that there are different notions with respect to cycles in hypergraphs. In other papers, e.g., [15, 21, 7], a hypergraph is called acyclic if and only if there exists a sequence of repeated deletions of edges containing at least one vertex of degree 1 that yields a hypergraph without edges. (Formally, we can arrange the edge set E = {e1 , . . . , en } of the hypergraph in a sequence (e01 , . . . , e0n ) such that 6 The cyclomatic number of a connected graph G with m vertices and n edges is n − m + 1. 26 S e0j − s<j e0s 6= ∅, for 1 ≤ j ≤ n.) We will call this process of repeatedly removing edges incident to a vertex of degree 1 the peeling process, see, e.g., [55]. With respect to this definition, a hypergraph H is acyclic if and only if the 2-core of H is empty, where the 2-core of H = (V, E) is the largest set E 0 ⊆ E such that each vertex in (V, E 0 ) has minimum degree 2, disregarding isolated vertices. An acyclic hypergraph in this sense can have unicyclic and complex components according to the definition from above. In the analysis, we will point out why it is important for our work to use the concepts introduced above. Hypergraph-Related Additions to the Framework. When working with hypergraphs, it will be helpful to allow removing single vertices from hyperedges. This motivates considering the following generalizations of the notions “peelability” and “reducibility” for hypergraph properties. Definition 4.1 (Generalized Peelability). A hypergraph property A is called peelable if for all G = (V, E) ∈ A, |E| ≥ 1, there exists an edge e ∈ E such that 1. (V, E \ {e}) ∈ A or 2. there exists an edge e0 ⊆ e with |e0 | < |e| and |e0 | ≥ 2, where e and e0 have the same label, such that (V, (E \ {e}) ∪ {e0 }) ∈ A. Definition 4.2 (Generalized Reducibility). Let c ∈ N, and let A and B be hypergraph properties. A is called B-2c-reducible if for all graphs (V, E) ∈ A and sets E ∗ ⊆ E with |E ∗ | ≤ 2c we have the following: There exists a subgraph (V, E 0 ) of (V, E) with (V, E 0 ) ∈ B such that each edge e0 ∈ E 0 is a subset of some e ∈ E with the same label and for each edge e∗ ∈ E ∗ there exists an edge e0 ∈ E 0 with e0 ⊆ e∗ and e0 and e∗ having the same label. In contrast to Definition 2.9 and Definition 2.10, we can remove vertices from edges in a single peeling or reduction step. A proof analogous to the proof of Lemma 2.11 shows that the statement of that lemma is true in the hypergraph setting as well. 4.1. Generalized Cuckoo Hashing. The obvious extension of cuckoo hashing is to use a sequence ~h = (h1 , . . . , hd ) of d ≥ 3 hash functions. For a given integer d ≥ 3 and a key set S ⊆ U with |S| = n, our hash table consists of d tables T1 , . . . , Td , each of size m = O(n), and uses d hash functions h1 , . . . , hd with hi : U → [m], for i ∈ {1, . . . , d}. A key x must be stored in one of the cells T1 [h1 (x)], T2 [h2 (x)], . . . , or Td [hd (x)]. Each table cell contains at most one key. Searching and removing a key works in the obvious way. For the insertion procedure, note that evicting a key y from a table Tj leaves, in contrast to standard cuckoo hashing, d − 1 other choices where to put the key. To think about insertion procedures, it helps to introduce the concept of a certain directed graph. Given a set S of keys stored in a cuckoo hash table with tables T1 , . . . , Td using ~h, we define the following (directed) cuckoo allocation graph G = (V, E), see, e.g., [47]: The vertices V correspond to the memory cells in T1 , . . . , Td . The edge set E consists of all edges (u, v) ∈ V × V such that there exists a key x ∈ S so that x is stored in the table cell which corresponds to vertex u (x occupies u) and v corresponds to one of the d − 1 other choices of key x. If u ∈ V has out-degree 0, we call u free. (The table cell which corresponds to vertex u does not contain a key.) Standard methods proposed for inserting a key (see [35]) are breadth-first search to find a shortest eviction sequence or a random walk approach. In the next section, we will study two alternative insertion strategies that were suggested recently. If an insertion fails, a new sequence of hash functions is chosen and the data structure is built anew. If the hash functions used are fully random it is now fully understood what table sizes m make it possible w.h.p. to store a key set according to the cuckoo hashing rules 27 for a given number of hash functions. In 2009,7 this case was settled independently by Dietzfelbinger et al. [23], Fountoulakis and Panagiotou [36], and Frieze and Melsted [40]. Later, the random walk insertion algorithm was partially analyzed by Frieze, Melstedt, and Mitzenmacher [41] and Fountoulakis, Panagiotou, and Steger [37]. Here, we study the static setting in which we ask if ~h allows accommodating a given key set S ⊆ U in the hash table according to the cuckoo hashing rules. This is equivalent to the question whether the hypergraph G = G(S, ~h) built from S and ~h is 1-orientable or not, i.e., whether there is an injective function that maps each edge e to a vertex on e or not. If G(S, ~h) is 1-orientable, we call ~h suitable for S. We now discuss some known results for random hypergraphs. As for simple random graphs [34] there is a sharp transition phenomenon for random hypergraphs [44]. When a random hypergraph with m vertices has at most (1 − ε)m/(d(d − 1)) edges, all components are small and all components are hypertrees or unicyclic with high probability. On the other hand, when it has at least (1 + ε)m/(d(d − 1)) edges, there exists one large, complex component. We will analyze generalized cuckoo hashing under the assumption that each table has size m ≥ (1 + ε)(d − 1)n, for ε > 0. Note that this result is rather weak: The load of the hash table is at most 1/(d(d − 1)), i.e., the more hash functions we use, the weaker the edge density bounds we get for the hash functions to provably work. At the end of this section, we will discuss whether this result can be improved or not with the methodology used here. We will show the following theorem. Theorem 4.3. Let ε > 0, 0 < δ < 1, d ≥ 3 be given. Assume c ≥ 2/δ. For n ≥ 1, consider m ≥ (1 + ε)(d − 1)n and ` = nδ . Let S ⊆ U with |S| = n. Then for ~h = (h1 , . . . , hd ) chosen at random from Z = Z c,d the following holds: `,m   Pr ~h is not suitable for S = O(1/n). Most of this subsection is devoted to the proof of this theorem. Lemma 4.4. Let H be a hypergraph. If H contains no complex component then H is 1-orientable. Proof. We may consider each connected component of H separately. First, observe that a hypertree and a unicyclic component always contains an edge that is incident to a vertex of degree 1. Suppose C is such a hypertree or a unicyclic component. A 1-orientation of C is obtained via the well-known “peeling process”, see, e.g., [55]. It works by iteratively peeling edges incident to a vertex of degree 1 and orienting each edge towards such a vertex. In the light of Lemma 4.4 we bound the probability of G(S, ~h) being 1-orientable by the probability that G(S, ~h) contains no complex component. A connected complex component of H causes bi(G) to have at least two cycles. So, minimal obstruction hypergraphs that show that a hypergraph contains a complex component are very much like the obstruction graphs that showed that a graph contains more than one cycle, see Figure 2.1 on Page 14. For a clean definition of obstruction hypergraphs, we will first introduce the concept of a strict path in a hypergraph. A sequence (e1 , . . . , et ) with t ≥ 1 and ei ∈ E, for 1 ≤ i ≤ t, is a strict path in H if |ei ∩ ei+1 | = 1 for 7 Technical report versions of all papers cited here were published at www.arxiv.org. We refer to the final publications. 28 1 ≤ i ≤ t − 1 and |ei ∩ ej | = 0 for 1 ≤ i ≤ t − 2 and i + 2 ≤ j ≤ t. According to [44], a complex connected component contains a subgraph of one of the following two types: Type 1: A strict path e1 , . . . , et , t ≥ 1, and an edge f such that |f ∩ e1 | ≥ 1, |f ∩ et | ≥ 1, St and f ∩ i=1 ei ≥ 3. Type 2: A strict path e1 , . . . , et−1 , t ≥ 2, and edges f1 , f2 such that |f1 ∩ e1 | ≥ 1, St−1 |f2 ∩ et−1 | ≥ 1, and fj ∩ i=1 ei ≥ 2, for j ∈ {1, 2}. The bipartite representation of a hypergraph of Type 1 contains a cycle with a chord, the bipartite representation of a hypergraph of Type 2 contains two cycles connected d by a path of some nonnegative length. We call a hypergraph H in Gm,n of Type 1 or Type 2 a minimal complex obstruction hypergraph. Let MCOG denote the set of d all minimal complex obstruction hypergraphs in Gm,n , with edges labeled by distinct elements from {1, . . . , n}. In the following, our objective is to apply Lemma 2.7, which says that    Pr NSMCOG > 0 ≤ Pr BSMCOG + E∗ NSMCOG . (4.1)  Bounding E∗ NSMCOG . We prove the following lemma: Lemma 4.5. Let S ⊆ U with |S| = n, d ≥ 3, and ε > 0 be given. Assume m ≥ (1 + ε)(d − 1)n. Then  E∗ NSMCOG = O(1/n). Proof. From the proof of [44, Theorem 4, P. 128], we know that the number w1 (d, t + 1) of unlabeled minimal complex obstruction hypergraphs with t + 1 edges is at most  t−2 2 4  w1 (d, t + 1) ≤ dmd (d − 1)md−1 t d (d − 1)md−1 md−3 + m2(d−2) (4.2) So, the number of minimal complex obstruction hypergraphs with t + 1 edges and edge labels from {1, . . . , n} is not larger than     t−2 2 4  n · (t + 1)! dmd (d − 1)md−1 · t d · (d − 1)md−1 · md−3 + m2(d−2) t+1 ≤ nt+1 · d6 · m(d−1)(t+1)−1 · t2 · (d − 1)t−2 ≤ nd(t+1)−1 · d6 · t2 · (1 + ε)(d−1)(t+1)−1 · (d − 1)(d−1)(t+1)+t−3 = nd(t+1)−1 · d6 · t2 · (1 + ε)(d−1)(t+1)−1 · (d − 1)d(t+1)−4 . Let H be a labeled minimal complex obstruction hypergraph with t + 1 edges. Draw t + 1 edges at random from [m]d , one for each labeled edge in H. The d(t+1) probability that the hash values realize H is 1/md(t+1) ≤ 1/((1 + ε)(d − 1)n) . So, n d·(t+1)−4  X d6 · t2 · (1 + ε)(d−1)·(t+1)−1 · (d − 1) · nd·(t+1)−1 E∗ NSMCOG ≤ d(t+1) ((1 + ε)(d − 1)n) t=1   n 6 X d t2 1 ≤ · =O . (d − 1)4 n t+1 (1 + ε)t−1 n 29  Bounding Pr BSMCOG . We will now prove the following lemma. Lemma 4.6. Let S ⊆ U with |S| = n, d ≥ 3, and ε > 0 be given. Assume c,d m ≥ (1 + ε)(d − 1)n. Let `, c ≥ 1. Choose ~h ∈ Z`,m at random. Then n  Pr BSMCOG = O c . ` To use our framework from Section 2, we have to find a suitable peelable hypergraph property that contains MCOG. Since minimal complex obstruction hypergraphs are path-like, we relax that notion in the following way. d Definition 4.7. Let PX be the set of all hypergraphs H from Gm,n that fall in one of the following categories: 1. H has hypergraph property MCOG. 2. H is a strict path. 3. H consists of a strict path e1 , . . . , et , t ≥ 1, and an edge f such that |f ∩ (e1 ∪ St et )| ≥ 1 and f ∩ i=1 ei ≥ 2. All hypergraphs in PX are extensions of paths. Note that property 3 is somewhat artificial to deal with the case that a single edge of a minimal complex obstruction hypergraph of Type 2 is removed. Obviously, MCOG is contained in PX, and property PX is peelable. We can now prove Lemma 4.6. Proof of Lemma 4.6. We apply Lemma 2.11 which says that n  1 X 2c PX t µt . Pr BSPX ≤ c ` t=1 We start by counting unlabeled hypergraphs G ∈ PX having exactly t + 1 edges. For the hypergraphs having Property 1 of Definition 4.7, we may use the bound (4.2) in the proof of Lemma 4.5. Let w2 (d, t + 1) be the number of such hypergraphs which are strict paths, i.e., have Property 2 of Definition 4.7. We obtain the following bound: t w2 (d, t + 1) ≤dmd · (d − 1) · md−1 . Let w3 (d, t + 1) be the number of hypergraphs having Property 3 of Definition 4.7. We observe that w3 (d, t + 1) ≤dmd · (d − 1) · md−1 t−1 · 2d2 · t · md−2 . So, the number of fully labeled hypergraphs having exactly t + 1 edges is at most    n · (t + 1)! · (w1 (d, t + 1) + w2 (d, t + 1) + w3 (d, t + 1)) t+1 t−2 ≤ nt+1 · dmd · (d − 1) · md−1 ·   d2 m2(d−1) + d4 tm2(d−2) + d4 t2 m2(d−2) + 2d3 tm2d−3 ≤ 4 · d5 · t2 · nt+1 · m(d−1)(t+1)+1 · (d − 1)t−2 ≤ 4 · d5 · t2 · nd(t+1)+1 · (1 + ε)(d−1)(t+1)+1 · (d − 1)d(t+1)−2 . 30 We may thus calculate: n  1 X 2c 4 · d5 · t2 · (1 + ε)(d−1)(t+1)+1 · (d − 1)d(t+1)−2 · nd(t+1)+1 Pr BSPX ≤ c t · ` t=1 ((1 + ε)(d − 1)n)d(t+1) ≤ n n nX 4 · d5 · t2+2c = O . `c t=1 (d − 1)2 · (1 + ε)t−1 `c Putting Everything Together. Substituting the results of Lemma 4.5 and Lemma 4.6 into (4.1) yields   n  1 MCOG Pr NS >0 =O +O c . n ` Theorem 4.3 follows by setting c ≥ 2/δ and ` = nδ . Theorem 4.3 shows that given a key set of size n, if we use d tables of size at least (1 + ε)(d − 1)n and hash functions from Z there exists w.h.p. an assignment of the keys to memory cells according to the cuckoo hashing rules. Thus, the load of the hash table is smaller than 1/(d(d − 1)). In the fully random case, the load of the hash table rapidly grows towards 1, see, e.g., the table on Page 5 of [23]. For example, using 5 hash functions allows the hash table load to be ≈ 0.9924. The approach followed in this section cannot yield such bounds for the following reason. When we look back at the proof of Lemma 4.4, we notice that it gives a stronger result: It shows that when a graph does not contain a complex component, it has an empty two-core, i.e., it does not contain a non-empty subgraph in which each vertex has minimum degree 2. It is known from random hypergraph theory that the appearance of a non-empty two-core becomes increasingly likely for d getting larger.8 So, we cannot rely on hypergraphs with empty two-cores to prove bounds for generalized cuckoo hashing that improve for increasing values of d. Karoński and Luczak showed in [44] that if a random d-uniform hypergraph has m vertices and at most (1 − ε)m/(d(d − 1)) edges, then all connected components have size O(log m) with high probability. On the other hand, if a random d-uniform hypergraph has at least (1 + ε)m/(d(d − 1)) edges, then there exists a unique connected component of size Θ(m). So, for d ≥ 3 the analysis of general cuckoo hashing takes place in the presence of the giant component, which differs heavily from the analysis of standard cuckoo hashing. Whether or not hash class Z allows suitable bounds for the general case will depend on whether or not there exist small subgraphs in the giant component which are sufficiently unlikely to occur in the fully random case. Now that we turned our focus to hypergraphs, we again see that the analysis is made without exploiting details of the hash function construction, only using the general framework developed in Section 2 together with random graph theory. 4.2. Labeling-based Insertion Algorithms For Generalized Cuckoo Hashing. In the previous section we showed that when the tables are large enough, the hash functions allow storing S according to the cuckoo hashing rules with high probability. In this section we prove that such an assignment can be obtained (with high probability) with hash functions from Z using two recently described insertion algorithms. In the last section, we pointed out two natural insertion strategies for generalized cuckoo hashing: breadth-first search and random walk, described in [35]. Very recently, 8 According to [53, p. 418] (see also [51]) for large d the 2-core of a random d-uniform hypergraph with m vertices and n edges is empty with high probability if m is bounded from below by dn/ log d. 31 Khosla [47] (2013) and Eppstein et al. [33] (2014) presented two new insertion strategies, which will be described next. In both algorithms, each table cell i in table Tj has a label (or counter) l(j, i) ∈ N, where initially l(j, i) = 0 for all j ∈ {1, . . . , d} and i ∈ {0, . . . , m − 1}. The insertion of a key x works as follows: Both strategies find the table index j = arg min {l(j, hj (x))}. j∈{1,...,d} If Tj [hj (x)] is free then x is stored in this cell and the insertion terminates successfully. Otherwise, let y be the key that resides in Tj [hj (x)]. Store x in Tj [hj (x)]. The difference between the two algorithms is how they adjust the labeling. The algorithm of Khosla sets l(j, hj (x)) ← min{l(j 0 , hj 0 (x)) | j 0 ∈ ({1, . . . , d} \ {j})} + 1, while the algorithm of Eppstein et al. sets l(j, hj (x)) ← l(j, hj (x)) + 1. Now insert y in the same way. This is iterated until an empty cell is found or it is noticed that the insertion cannot be performed successfully.9 In Khosla’s algorithm, the content of the label l(j, i) is a lower bound for the minimal length of an eviction sequence that makes it possible to store a new element into Tj [i] by moving other elements around [47, Proposition 1]. In the algorithm of Eppstein et al., the label l(j, i) contains the number of times the memory cell Tj [i] has been overwritten. According to [33], it aims to minimize the number of write operations to a memory cell. Here we show that in the sparse setting with m ≥ (1 + ε)(d − 1)n, using class Z the maximum label in the algorithm of Eppstein et al. is log log n + O(1) with high probability and the maximum label in the algorithm of Khosla is O(log n) with high probability. This corresponds to results proved in these papers for fully random hash functions. Our result when using hash functions from Z is as follows. We only study the case that we want to insert the keys from a set S sequentially without deletions. Theorem 4.8. Let ε > 0, 0 < δ < 1, d ≥ 3 be given. Assume c ≥ 2/δ. For n ≥ 1 consider m ≥ (1 + ε)(d − 1)n and ` = nδ . Let S ⊆ U with |S| = n. Choose ~h ∈ Z c,d at random. Insert all keys from S according to ~h in an arbitrary order, using `,m the algorithm of Khosla. Then with probability 1 − O(1/n) (i) all key insertions are successful and (ii) max{l(j, i) | i ∈ {0, . . . , m − 1}, j ∈ {1, . . . , d}} = O(log n). Theorem 4.9. Let ε > 0, 0 < δ < 1, d ≥ 3 be given. Assume c ≥ 2/δ. For n ≥ 1 c,d consider m ≥ (1 + ε)(d − 1)n and ` = nδ . Let S ⊆ U with |S| = n. Choose ~h ∈ Z`,m at random. Insert all keys from S according to ~h in an arbitrary order, using the algorithm of Eppstein et al. Then with probability 1 − O(1/n) (i) all key insertions are successful and (ii) max{l(j, i) | i ∈ {0, . . . , m − 1}, j ∈ {1, . . . , d}} = log log n + O(1). For the analysis of both algorithms we assume that the insertion of an element fails if there exists a label of size n + 1. (In this case, new hash functions are chosen and the data structure is built anew.) Hence, to prove Theorem 4.8 and Theorem 4.9 it suffices to show that statement (ii) holds. (An unsuccessful insertion yields a label with value > n.) 9 Neither in [33] nor in [47] it is described how this should be done in the cuckoo hashing setting. From the analysis presented there, when deletions are forbidden, one should do the following: Both algorithms have a counter MaxLabel, and if there exists a label l(j, i) ≥ MaxLabel, then one should choose new hash functions and re-insert all items. For Khosla’s algorithm, MaxLabel = Θ(log n); for the algorithm of Eppstein et al., one should set MaxLabel = Θ(log log n). 32 Analysis of Khosla’s Algorithm. We first analyze the algorithm of Khosla. We remark that in our setting, Khosla’s algorithm finds an assignment with high probability. (In [47, Section 2.1] Khosla gives an easy argument why her algorithm always finds an assignment when this is possible. In the previous section, we showed that such an assignment exists with probability 1 − O(1/n).) It remains to prove that the maximum label has size O(log n). We first introduce the notation used by Khosla in [47]. Recall the definition of the cuckoo allocation graph from the beginning of Section 4.1. Let G be a cuckoo allocation graph. Let FG ⊆ V consist of all free vertices in G. Let dG (u, v) be the distance between u and v in G. Define dG (u, F ) := min({dG (u, v) | v ∈ F } ∪ {∞}). Now assume that the key set S is inserted in an arbitrary order. Khosla defines a move as every action that writes an element into a table cell. (So, the i-th insertion is decomposed into ki ≥ 1 moves.) The allocation graph at the end of the p-th move is denoted by Gp = (V, Ep ). Let M denote the number of moves necessary to insert S. (Recall that we assume that ~h is suitable for S.) Khosla shows the following connection between labels and distances to a free vertex. Proposition 4.10 ([47, Proposition 1]). For each p ∈ {0, 1, . . . , M } and each v ∈ V it holds that dGp (v, FGp ) ≥ l(j, i), where Tj [i] is the table cell that corresponds to vertex v. Now fix an integer L ≥ 1. Assume that there exists an integer p with 0 ≤ p ≤ M and a vertex v such that d(v, FGp ) = L. Let (v = v0 , v1 , . . . , vL−1 , vL ) be a simple path p of length L in Gp such that vL is free. Let x0 , . . . , xL−1 ⊆ S be the keys which occupy v0 , . . . , vL−1 . Then the hypergraph G(S, ~h) contains a subgraph H that corresponds to p in the obvious way. Definition 4.11. For given integers L ≥ 1, m ≥ 1, n ≥ 1, d ≥ 3, let SP(L) d (“simple path”) consist of all hypergraphs H = (V, {e1 , . . . , eL }) in Gm,n with the following properties: 1. For all i ∈ {1, . . . , L} we have that |ei | = 2. (So, H is a graph.) 2. For all i ∈ {1, . . . , L − 1}, |ei ∩ ei+1 | = 1. 3. For all i ∈ {1, . . . , L − 2} and j ∈ {i + 2, . . . , L}, |ei ∩ ej | = 0. Our goal in the following  is to show  that there exists a constant c such that for SP(L) all L ≥ c log n we have Pr NS > 0 = O(1/n). From Lemma 2.7 we obtain the bound       SP(L) SP(L) SP(L) Pr NS > 0 ≤ E∗ NS + Pr BS . (4.3)   SP(L) Bounding E∗ NS . We show the following lemma. Lemma 4.12. Let S ⊆ U with |S| = n, d ≥ 3, and ε > 0 be given. Consider m ≥ (d − 1)(1 + ε)n. Then   SP(L) E∗ NS ≤ md . (1 + ε)L Proof. We count fully labeled hypergraphs with property SP(L). Let P be an unlabeled simple path of length L. There are d · (d − 1)L ways to label the vertices on P with {1, . . . , d} to fix the class of the partition they belong to. Then there are not more than mL+1 ways to label the vertices with labels from [m]. There are fewer than 33 nL ways to label the edges with labels from {1, . . . , n}. Fix such a fully labeled path P 0 . Now draw 2L hash values from [m] according to the labels of P 0 . The probability that these random choices realize P 0 is 1/m2L . We calculate: L   d · (d − 1)L · mL+1 · nL m · d · (d − 1) md SP(L) E∗ NS = = . ≤ L L m2L ((d − 1)(1 + ε)) (1 + ε)   SP(L) Bounding Pr BS . Note that SP(L) is not peelable. We relax SP(L) in the S obvious way and define RSP(L) = 0≤i≤L SP(L). Graph property RSP(L) is peelable. Lemma 4.13. Let S ⊆ U with |S| = n and d ≥ 3 be given. For an ε > 0, set c,d m ≥ (1 + ε)(d − 1)n. Let `, c ≥ 1. Choose ~h ∈ Z`,m at random. Then   n SP(L) Pr BS =O c . ` Proof. Since SP(L) ⊆ RSP(L) and RSP(L) is peelable, we may apply Lemma 2.11 and obtain the bound n   1 X 2c RSP(L) SP(L) t · µt . Pr BS ≤ c· ` t=1 By the definition of RSP(L) and using the same counting argument as in the proof of Lemma 4.12, we calculate: n n   md 1 X 2c SP(L) t · = O Pr BS ≤ c· . ` t=1 (1 + ε)t `c Putting Everything Together. Plugging the results of Lemma 4.12 and Lemma 4.13 into (4.3) shows that   SP(L) Pr NS >0 ≤ n md + O . (1 + ε)L `c Setting L = 2 log1+ε (n), ` = nδ , and c ≥ 2/δ finishes the proof of Theorem 4.8. Analysis of the Algorithm of Eppstein et al. We now analyze the algorithm of Eppstein et al. [33]. We use the witness tree technique to prove Theorem 4.9. This proof technique was introduced by Meyer auf der Heide, Scheideler, and Stemann [52] in the context of shared memory simulations, and is one of the main techniques to analyze load balancing processes (see, e.g., [13, 14, 70, 67, 73]), which will be the topic of the next section. Central to our analysis is the notion of a witness tree for wear k, for an integer k ≥ 1. (Recall that in the algorithm of Eppstein et al., the label l(j, i) denotes the number of times the algorithm has put a key into the cell Tj [i]. This is also called the wear of the table cell.) For given values n and m, a witness tree for wear k is a (d − 1)-ary tree with k + 1 levels in which each non-leaf node is labeled with a tuple (j, i, κ), for 1 ≤ j ≤ d, 0 ≤ i ≤ m − 1, and 1 ≤ κ ≤ n, and each leaf is labeled with a tuple (j, i), 1 ≤ j ≤ d and 0 ≤ i ≤ m − 1. Two children of a non-leaf node v must have different first components (j-values) and, if they exist, third components (κ-values). In addition, the κ-values of a node and its children must differ. 34 We call a witness tree proper if no two different non-leaf nodes have the same labeling. Further, we say that a witness tree T can be embedded into G(S, ~h) if for each non-leaf node v with label (j0 , i0 , κ) with children labeled (j1 , i1 ), . . . , (jd−1 , id−1 ) in the first two label components in T , hjk (xκ ) = ik , for each 0 ≤ k ≤ d − 1. We can think d of a proper witness tree as an edge-labeled hypergraph from Gm,n by building from each non-leaf node labeled (j0 , i0 , κ) together with its d − 1 children with label components (j1 , i1 ), . . . , (jd−1 , id−1 ) a hyperedge (i00 , . . . , i0d−1 ) labeled “κ”, where i00 , . . . , i0d−1 are ordered according to the j-values. Suppose that there exists a label l(j, i) with content k for an integer k > 0. We now argue about what must have happened that l(j, i) has such a label. In parallel, we construct the witness tree for wear k. Let T be an unlabeled (d − 1)-ary tree with k + 1 levels. Let y be the key residing in Tj [i]. Label the root of T with (j, i, κ), where y = xκ ∈ S. Then for all other choices of y in tables Tj 0 , j 0 ∈ {1, . . . , d}, j 0 6= j, we have l(j 0 , hj 0 (y)) ≥ k − 1. (When y was written into Tj [i], l(j, i) was k − 1 and this was minimal among all choices of key y. Labels are never decreased.) Let x1 , . . . , xd−1 be the keys in these d − 1 other choices of y. Label the children of the root of T with the d − 1 tuples (j 0 , hj 0 (y)), 1 ≤ j 0 ≤ d, j 0 6= j, and the respective key indices. Arguing in the same way as above, we see that for each key xi , i ∈ {1, . . . , d − 1}, its d − 1 other table choices must have had a label of at least k − 2. Label the children of the node corresponding to key xi on the second level of T with the d − 1 other choices, for each i ∈ {1, . . . , d − 1}. (Note that already the third level may include nodes with the same label.) Proceeding with this construction on the levels 3, . . . , k gives the witness tree T for wear k. By construction, this witness tree can be embedded into G(S, ~h). So, all we have to do to prove Theorem 4.9 is to obtain a (good enough) bound on the probability that a witness tree for wear k can be embedded into G(S, ~h). If a witness tree is not proper, it seems difficult to calculate the probability that this tree can be embedded into G(S, ~h), because different parts of the witness tree correspond to the same key in S, which yields dependencies among hash values. However, we know from the last section that when G(S, ~h) is sparse enough, i.e., m ≥ (1 + ε)(d − 1)n, it contains only hypertrees and unicyclic components with probability 1 − O(1/n). Using a basic pruning argument, Eppstein et al. show that this simplifies the situation in the following way. Lemma 4.14 ([33, Observation 2 and Observation 3]). Let H be a hypergraph that consists only of hypertrees and unicyclic components. Suppose H contains an embedded witness tree for wear k. Then there exists a proper witness tree for wear k − 1 that can be embedded into H. Let WS,k be the event that there exists a witness tree for wear k that can be embedded into G(S, ~h). To prove Theorem 4.9, we have to show that for the parameter choices in Theorem 4.9 the probability that WS,k occurs is O(1/n). We separate the cases that G(S, ~h) contains a complex component and that this is not so. Let PWT(k) be the set of all hypergraphs in Gdm,n that correspond to proper witness trees for wear k. Using Theorem 4.3, we may bound:    PWT(k−1) Pr(WS,k ) ≤ Pr NS > 0 + Pr NSMCOG > 0      PWT(k−1) PWT(k−1) ≤ Pr BS + E∗ NS + Pr NSMCOG > 0 . (4.4) The last summand on the right-hand side of this inequality is handled by Theorem 4.3, so we may concentrate on the hypergraph property PWT(k − 1). 35   PWT(k−1) Bounding E∗ NS . We start by proving that the expected number of proper witness trees in G(S, ~h) is O(1/n) for the parameter choices in Theorem 4.9. We use a different proof method than Eppstein et al. [33], because we cannot use the statement of [33, Lemma 1]. We remark here that the following analysis could be extended to obtain bounds of O(1/ns ), for s ≥ 1. However, the last summand of (4.4) is O(1/n), so this does not improve the bounds for (4.4). Lemma 4.15. Let S ⊆ U with |S| = n and d ≥ 3 be given. For an ε > 0, set m ≥ (1 + ε)(d − 1)n. Then there exists a value k = log log n + Θ(1) such that     1 PWT(k−1) E∗ NS =O . n Proof. We first obtain a bound on the number of proper witness trees for wear k − 1. Let T be an unlabeled (d − 1)-ary tree with k levels. The number vk−1 of vertices of such a tree is vk−1 = k−1 X (d − 1)i = i=0 (d − 1)k − 1 . d−2 For the number ek−1 of non-leaf nodes of such a tree, we have ek−1 = k−2 X (d − 1)i = i=0 (d − 1)k−1 − 1 . d−2 There are n · d · m ways to label the root of T . There are not more than nd−1 · md−1 ways to label the second level of the tree. Labeling the remaining levels in the same way, we see that in total there are fewer than nek−1 · d · mvk−1 proper witness trees for wear k − 1. Fix such a fully labeled witness tree T . Now draw d · ek−1 = vk−1 + ek−1 − 1 values randomly from [m] according to the labeling of the nodes in T . The probability that these values realize T is exactly 1/mvk−1 +ek−1 −1 . We obtain the following bound:   nek−1 · d · ((1 + ε)(d − 1)n)vk−1 n·d PWT(k−1) E∗ NS ≤ vk−1 +ek−1 −1 = e −1 ((1 + ε)(d − 1)n) ((1 + ε)(d − 1)) k−1 n·d ≤ , (d−1)k−2 ((1 + ε)(d − 1)) which is O(1/n) for  k = log log  n + Θ(1). PWT(k−1) Bounding Pr BS . We first relax the notion of a witness tree in the following way. Definition 4.16. Let RWT(k − 1) (relaxed witness trees) be the set of all hypergraphs which can be obtained in the following way: 1. Let T ∈ PWT(k 0 ) be an arbitrary proper witness tree for wear k 0 , with k 0 ≤ k−1. Let ` denote the number of nodes on level k 0 − 1, i.e., the level prior to the leaf level of T . 2. Arbitrarily choose `0 ∈ N with `0 ≤ ` − 1. 3. Choose κ = b`0 /(d − 1)c arbitrary distinct non-leaf nodes on level k 0 − 2. For each such node, remove all its children together with their d − 1 children from T . Then remove from a group of d − 1 siblings on level k 0 − 1 the `0 − (d − 1) · κ siblings with the largest j-values together with their leaves. 36 Note that RWT(k − 1) is a peelable hypergraph property, for we can iteratively remove non-leaf nodes that correspond to edges in the hypergraph until the whole leaf level is removed. Removing these nodes as described in the third property makes sure that there exists at most one non-leaf node at level k 0 − 2 that has fewer than d − 1 children. Also, it is clear what the first components in the labeling of the children of this node are. Removing nodes in a more arbitrary fashion would give more labeling choices and thus more trees with property RWT(k − 1). Lemma 4.17. Let S ⊆ U with |S| = n and d ≥ 3 be given. For an ε > 0, set c,d m ≥ (1 + ε)(d − 1)n. Let `, c ≥ 1. Choose ~h ∈ Z`,m at random. Then   n RWT(k−1) Pr BS =O c . ` Proof. We apply Lemma 2.11, which says that n   1 X 2c RWT(k−1) RWT(k−1) Pr BS ≤ c· t µt . ` t=2   PWT(k−1) Using the same line of argument as in the bound for E∗ NS , the expected number of witness trees with property RWT(k − 1) with exactly t edges, i.e., exactly t t−1 non-leaf nodes, is at most n · d · /((1 + ε)(d − 1)) . We calculate: n   n 1 X 2c n·d RWT(k−1) Pr BS = c· t =O c . t−1 ` t=1 ` ((1 + ε)(d − 1)) Putting Everything Together. Using (4.4) and Lemmas 4.15 and 4.17, we conclude that      PWT(k−1) PWT(k−1) Pr(WS,k ) ≤ Pr BS + E∗ NS + Pr NSMCOG > 0 = O(1/n) + O(n/`c ). Theorem 4.9 follows for ` = nδ and c ≥ 2/δ. With respect to the algorithm of Eppstein et al., our result shows that n insertions take time O(n log log n) with high probability when using hash functions from Z. With an analogous argument to the one given by Khosla in [47], the algorithm of Eppstein et al. of course finds an assignment of the keys whenever this is possible. However, the bound of O(log log n) on the maximum label is only known for m ≥ (1 + ε)(d − 1)n and d ≥ 3, even in the fully random case. Extending the analysis on the maximum label size to denser hypergraphs is an interesting open question. 4.3. Load Balancing. In this section we apply hash class Z in the area of load balancing schemes. In the discussion at the end of this section, we will present a link of our results w.r.t. load balancing to the space utilization of generalized cuckoo hashing in which each memory cell can hold κ ≥ 1 items. In randomized load balancing we want to allocate a set of jobs J to a set of machines M such that a condition, e.g., there exists no machine with “high” load, is satisfied with high probability. To be consistent with the notation used in our framework and previous applications, S will denote the set of jobs, and the machines will be numbered 1, . . . , m. In this section we assume |S| = n = m, i.e., we allocate n jobs to n machines. 37 We use the following approach to load balancing: For an integer d ≥ 2, we split the n machines into groups of size n/d each. For simplicity, we assume that d divides n. Now a job chooses d candidate machines by choosing exactly one machine from each group. This can be modeled by using d hash functions h1 , . . . , hd with hi : S → [n/d], 1 ≤ i ≤ d, such that machine hi (j) is the candidate machine in group i of job j. In load balancing schemes, the arrival of jobs has been split into two models: parallel and sequential arrival. We will focus on parallel job arrivals and come back to the sequential case at the end of this section. In the parallel arrival model, all jobs arrive at the same time. They communicate with the machines in synchronous rounds. In these rounds, decisions on the allocations of jobs to machines are made. The τ -collision protocol is one algorithm to find such an assignment. This protocol was studied in the context of distributed memory machines by Dietzfelbinger and Meyer auf der Heide [27]. As a method for load balancing the allocation algorithm was analyzed by Stemann in [70]. The τ -collision protocol works in the following way: First, each job chooses one candidate machine from each of the d ≥ 2 groups. Then the following steps are repeated until all jobs are assigned to machines: 1. Synchronously and in parallel, each unassigned job sends an allocation request to each of its candidate machines. 2. Synchronously and in parallel, each machine sends an acknowledgement to all requesting jobs if and only if it got at most τ allocation requests in this round. Otherwise, it does not react. 3. Each job that gets an acknowledgement is assigned to one of the machines that has sent an acknowledgement. Ties are broken arbitrarily. Note that the number of rounds is not bounded. However, in [27] and [70] it was shown that w.h.p. the τ -collision protocol will terminate after a small number of rounds, if suitable hash classes are used. We will show that this also holds when class Z is used. There exist several analysis techniques for load balancing, e.g., layered induction, fluid limit models and witness trees [64]. We will focus on the witness tree technique. We use the variant studied by Schickinger and Steger in [67] in connection with hash class Z. The main contribution of [67] is that it provides a unified analysis for several load balancing algorithms. This allows us to show that hash class Z is suitable in all of these situations as well, with only little additional work. At the core of the analysis in [67] is the so-called allocation graph. In our setting, where each job chooses exactly one candidate machine in each of the d groups, the allocation graph is a bipartite graph G = ([n], [n], E), where the jobs are on the left side of the bipartition, and the machines are on the right side, split into groups of size n/d. Each job vertex is adjacent to its d candidate machines. As already discussed in Section 4.1, the allocation graph is equivalent to the hypergraph G(S, ~h). Recall that we refer to the bipartite representation of a hypergraph G = (V, E) as bi(V, E). We call the vertices on the left side job vertices and the vertices on the right side machine vertices. If a machine has high load we can find a subgraph in the allocation graph that shows the chain of events in the allocation process that led to this situation, hence “witnessing” the high load of this machine. (This is similar to the wear of a table cell in the algorithm of Eppstein et al. [33] in the previous section.) Such witness trees might differ greatly in structure, depending on the load balancing scheme. 38 In short, the approach of Schickinger and Steger works as follows.10 1. They show that high load leads to the existence of a “witness graph” and describe the properties of such a graph for a given load balancing scheme. 2. For their analysis to succeed they demand that the witness graph from above is a tree in the standard sense. They show that with high probability a witness graph can be turned into a cycle-free witness tree by removing a small number of edges at the root. 3. They show that it is unlikely that the allocation graph contains such a witness tree. We will give a detailed description of this approach after stating the main result of this section. The following theorem represents one selected result from [67], replacing the full randomness assumption with hash functions from Z to choose candidate machines for jobs. We simplify the theorem by omitting the exact parameter choices calculated in [67]. All the other examples considered in [67] can be analyzed in an analogous way, resulting in corresponding theorems. We discuss this claim further in the discussion part of this section. Theorem 4.18. For each constant α > 0, d ≥ 2, there exist constants β, c > 0 (depending on α and d), such that for each t with 2 ≤ t ≤ (1/β) ln ln n, ` = n1/2 and ~h = (h1 , . . . , hd ) ∈ Z c,d , the τ -collision protocol described above with threshold τ = `,n  O ((ln n)/(ln ln n))1/(t−2) /(d − 1) finishes after t rounds with probability 1 − O(n−α ). We will now analyze the τ -collision protocol using hash functions from class Z. Most importantly, we have to describe the probability of the event that the τ -collision protocol does not terminate after t rounds in the form of a hypergraph property. To achieve this, we start by describing the structure of witness trees. In the setting of the τ -collision protocol in parallel arrival, a witness tree has the following structure. Using the notation of [67], a machine is active in round t if there exists at least one job that sends a request to this machine in round t. If no such job exists, the machine is inactive in round t. Assume that after round t the collision protocol has not yet terminated. Then there exists a machine y that is active in round t and that received more than τ allocation requests. Arbitrarily choose τ of these requests. These requests were sent by τ unallocated jobs in round t. The vertex that corresponds to machine y is the root of the witness tree, the τ job vertices are its children. In round t, each of the τ unallocated jobs sent allocation requests to d − 1 other machines. The corresponding machine vertices are the children of each of the τ job vertices in the witness tree. By definition, the machines that correspond to these machine vertices are also active in round t, and so they were active in round t − 1 as well. So, there are τ · (d − 1) machine vertices that correspond to machines that are active and receive requests from one of the jobs on level t in round t − 1. We must be aware that among these machine vertices the same machine might appear more than once, because unallocated jobs may have chosen the same candidate machine. So, there may exist vertices in the witness tree that correspond to the same machine. For all these τ · (d − 1) machines the same argument holds in round t − 1. Proceeding with the construction for rounds t − 2, t − 3, . . . , 1, we build the witness tree Tt with root y. It exhibits a regular recursive structure, depicted abstractly in Figure 4.1. Note that 10 This approach has a lot in common with our analysis of insertion algorithms for generalized cuckoo hashing. However, the analysis will be much more complicated here, since the hypergraph G(S, ~h) has exactly as many vertices as edges. 39 machine Tt v Level t job τ d−1 d−1 Level t − 1 Tt−1 Tt−1 Fig. 4.1. Structure of a witness tree Tt with root v after t rounds if the τ -collision protocol with d candidate machines has not yet terminated. all leaves, i.e., vertices on level 0, correspond to machine vertices, since no allocation requests are sent in round 0. As we have seen, such regular witness trees do not need to be subgraphs of the allocation graph since two vertices of a witness tree might be embedded to the same vertex. Hence, the witness tree is “folded together” to a subgraph in the allocation graph. In the embedding of a witness tree as a subgraph of the allocation graph, edges do not occur independently and the analysis becomes difficult, even in the fully random case. Schickinger and Steger found the following way to analyze this situation. For a connected undirected graph G = (V, E) a shortest path tree T rooted at node s ∈ V is a tree in G in which the unique paths from s to all other vertices are shortest paths in G. (Such a tree can be obtained by starting a breadth-first search in G from s.) Schickinger and Steger introduced the notion of a multicycle that describes an “almost tree-like” graph. Definition 4.19. Let k, t ≥ 1. Let G = (V, E) be an undirected graph. Let s ∈ V . A (k, t)-multicycle of depth at most t at node s in G is a connected subgraph G0 = (V 0 , E 0 ) of G together with a shortest path tree (V 0 , T 0 ) of G0 rooted at node s with the following properties: 1. G0 includes vertex s. 2. G0 has cyclomatic number k ( cf. Section 3.1). 3. For each vertex v in T 0 , the distance between s and v in T 0 is at most t. 4. Each leaf in T 0 is incident to an edge in G0 that is not in T 0 . Multicycles will be used to reason in the following way: When G does not contain a certain (k, t)-multicycle at node s as a subgraph, removing only a few edges in G incident to node s makes the neighborhood that includes all vertices of distance at most t of s in the remaining graph acyclic. As we shall see, the proof that this is possible will be quite easy when using shortest path trees. One easily checks that a (k, t)-multicycle M with m vertices and n edges satisfies n = m + k − 1, because the cyclomatic number of a connected graph is exactly n − m + 1 [20]. Furthermore, it has at most 2kt + 1 vertices, because there can be at most 2k leaves that each have distance at most t from s, and all vertices of the spanning tree 40 lie on the unique paths from s to the leaves. We will later see that for the parameters given in Theorem 4.18, a (k, t)-multicycle is with high probability not a subgraph of the allocation graph. Lemma 4.20 ([67, Lemma 2]). Let k, t ≥ 1. Assume that a graph G = (V, E) contains no (k 0 , t)-multicycle, for k 0 > k. Furthermore, given a vertex v ∈ V , consider the induced subgraph H = (V 0 , E 0 ) of G that contains all vertices w ∈ V with distance at most t from v in G. Then we can remove at most 2k edges incident to v in H to get a graph H ∗ such that the connected component of v in H ∗ is a tree. In the light of this lemma, we set τ ≥ 2k + 1. Then we know that if the allocation graph contains a witness tree after t rounds, it contains a (k, t)-multicycle or a regular witness tree Tt−1 . This observation motivates considering the following hypergraph property: d Definition 4.21. Let k, t ∈ N. Then MCWT(k, t) ⊆ Gn/d,n is the set of all hypergraphs H such that bi(H) forms either a (k, t)-multicycle or a witness tree Tt−1 . If we use hash class Z and set τ ≥ 2k + 1, for a set S of jobs, we have, by the discussion above:   MCWT(k,t) Pr(the τ -collision protocol does not terminate after t rounds) ≤ Pr NS >0 . (4.5) By Lemma 2.7 we may bound the probability on the right-hand side of (4.5) by       MCWT(k,t) MCWT(k,t) MCWT(k,t) Pr NS > 0 ≤ Pr BS + E∗ NS . (4.6) MCWT(k,t) Bounding E∗ (NS ). We first bound the expected number of subgraphs that form multicycles or witness trees when the hash functions are fully random. The following lemma is equivalent to Theorem 1 in [67]. However, our parameter choices are slightly different because in [67] each of the d candidate machines is chosen from the set [n], while we split the n machines into d groups of size n/d. The proof of the lemma can be found in Appendix A. Lemma 4.22. Let α ≥ 1 and d ≥ 2. Set β = 2d(α + ln d + 3/2) and k = α + 2. Consider t with 2 ≤ t ≤ (1/β) ln ln n. Let ( )   1 1 βt ln n t−2 d+1 d τ = max , d e + 1, 2k + 1 . d − 1 ln ln n Then   MCWT(k,t) E∗ NS = O(n−α ). MCWT(k,t) Bounding Pr(BS ). To apply Lemma 2.11, we need a peelable hypergraph property that contains MCWT(k, t). We will first calculate the size of witness trees to see that they are small for the parameter settings given in Theorem 4.18. The Size of Witness Trees. Let Tt be a witness tree after t rounds. As above, the number of job vertices jt in Tt is given by jt = τ t (d − 1)t−1 − τ . τ (d − 1) − 1 41 We bound the size of the witness tree. Lemma 4.23. If α, d, β, k, t, and τ are as in Lemma 4.22, we have jt < log n. Proof. Observe the following upper bound for the number of jobs in a witness tree after t rounds: jt = τ t (d − 1)t−1 − τ τ (τ (d − 1))t−1 ≤ ≤ (τ (d − 1))t−1 . τ (d − 1) − 1 2τ − 1 Now observe that for τ ∈ {dd+1 ed + 1, 2k + 1} we have 1 (τ (d − 1))t−1 ≤ (τ (d − 1)) β ln ln n ≤ (ln n) since ln τ β ln τ +ln d β ≤ ln n, ≤ 1 for the two constant choices for τ in Lemma 4.22. Furthermore, for 1 τ = (βt(ln n)/ ln ln n) t−2 /(d − 1) we have ((d − 1)τ )t−1 ≤ βt ln n ≤ ln n, ln ln n and hence jt ≤ ln n < log n. A (k, t)-multicycle has at most 2kt + k − 1 edges, hence such multicycles are smaller than witness trees for t = O(log log n) and a constant k ≥ 1. A Peelable Hypergraph Property. To apply Lemma 2.11, we have to find a peelable hypergraph property that contains all subgraphs that have property MCWT(k, t) (multicycles or witness trees for t − 1 rounds). Since we know from above that witness trees and multicycles are contained in small connected subgraphs of the hypergraph G(S, ~h), we will use the following hypergraph property. Definition 4.24. Let K > 0 and d ≥ 2 be constants. Let Csmall (K, d) contain d all connected d-partite hypergraphs (V, E) ∈ Gn/d,n with |E| ≤ K log n disregarding isolated vertices. The following central lemma shows how we can bound the failure term of Z. Lemma 4.25. Let K > 0, c ≥ 1, ` ≥ 1, and d ≥ 2 be constants. Let S be the set of jobs with |S| = n. Then  K(d+1) log d+2      n MCWT(k,t) C (K,d) Pr BS ≤ Pr BS small =O . `c For proving this bound, we need the following auxiliary hypergraph property. Note that some of the considered graphs are not d-uniform. Definition 4.26. Let K > 0, ` ≥ 1, and d ≥ 2 be constants. Let n ≥ 1 be given. Then HT(K, d, `) (“hypertree”) is the set of all d-partite hypergraphs G = (V, E) in d Gn/d,n with |E| ≤ K log n for which bi(G) (disregarding isolated vertices) is a tree, has at most ` leaf edges and has leaves only on the left (job) side. We will now establish the following connection between Csmall (K, d) and HT(K, d, `). Lemma 4.27. Let K > 0, d ≥ 2 and c ≥ 1 be constants. Then Csmall (K, d) is HT(K, d, 2c)-2c-reducible, cf. Definition 4.2. Proof. Assume G = (V, E) ∈ Csmall (K, d). Arbitrarily choose E ∗ ⊆ E with |E ∗ | ≤ 2c. We have to show that there exists an edge set E 0 such that (V, E 0 ) ∈ HT(K, d, 2c), (V, E 0 ) is a subgraph of (V, E), and for each edge e∗ ∈ E ∗ there exists an edge e0 ∈ E 0 such that e0 ⊆ e∗ and e0 and e∗ have the same label. Identify an arbitrary spanning tree T in bi(G). Now repeatedly remove leaf vertices with their incident edges, as long as these leaf vertices do not correspond to edges from 42 E ∗ . Denote the resulting tree by T 0 . In the hypergraph representation, T 0 satisfies all properties from above. From Lemma 2.11 it follows that we have n     X MCWT(k,t) C (K,d) HT(K,d,2c) Pr BS ≤ Pr BS small ≤ `−c · t2c µt . t=2 Lemma 4.28. Let K > 0, d ≥ 2, and c ≥ 1 be constants. If t ≤ K · log n, then HT(K,d,2c) µt ≤ tO(1) · n · d(d+1)t . HT(K,d,2c) For t > K log n it holds that µt = 0. HT(K,d,2c) Proof. It is trivial that µt = 0 for t > K log n, since a hypergraph with more than K log n edges contains too many edges to have property HT(K, d, 2c). Now suppose t ≤ K log n. We first count labeled hypergraphs having property HT(K, d, 2c) consisting of t job vertices and z edges, for some fixed z ∈ {t, . . . , dt}, in the bipartite representation. (Note that hypergraphs with property HT(K, d, 2c) may not be d-uniform. Thus, in the bipartite representation not all vertices on the left side have d neighbors on the right side.) There are at most z O(2c) = z O(1) unlabeled trees with z edges and at most 2c leaf edges (Lemma 3.2). Fix one such tree T . There are not more than nt ways to label the job vertices of T , and there are at most dz ways to assign each edge a label from {1, . . . , d}. Once these labels are fixed, there are at most (n/d)z+1−t ways to assign the right vertices to machines. Fix such a fully labeled tree T 0 . Now draw z hash values at random from [n/d] and build a graph according to these hash values and the labels of T 0 . The probability that these random choices realize T 0 is exactly 1/(n/d)z . Thus we may estimate: HT(K,d,2c) µt ≤ dt X (n/d)z+1−t · z O(1) · nt · dz (n/d)z z=t O(1) < dt · (dt) (d+1)t ·n·d = dt X z O(1) · n · dz−1+t z=t =t O(1) · n · d(d+1)t . We can now proceed with the proof our main lemma. Proof of Lemma 4.25. By Lemma 2.11, we know that n   X MCWT(k,t) HT(K,d,2c) Pr BS ≤ `−c · t2c µt . t=2 Applying the result of Lemma 4.28, we calculate KX log n   MCWT(k,t) Pr BS ≤ `−c · t2c tO(1) · n · d(d+1)t = n · `−c · (K log n)O(1) · d(d+1)K log n t=2 = O(n2 · `−c ) · dK(d+1) log n = O(nK(d+1) log d+2 · `−c ). Putting Everything Together. The previous lemmas allow us to complete the proof of the main theorem. Proof of Theorem 4.18. 43 We plug the results of Lemma 4.22 and Lemma 4.25 into (4.6) and get  K(d+1) log d+2      n 1 MCWT(k,t) Pr NS >0 ≤O + O . `c nα For the case of parallel arrival with d ≥ 2 hash functions, we calculated that witness trees do not have more than log n edges (Lemma 4.23). So, we set K = 1. Setting ` = n1/2 and c = 2(2 + α + (d + 1) log d) finishes the proof of the theorem. Discussion on Load Balancing. We remark that the graph property Csmall (K, d) provides a very general result on the failure probability of Z on hypergraphs G(S, ~h). It can be applied for all results from [67]. We will exemplify this statement by discussing what needs to be done to show that Z works in the setting of Voecking’s “Always-GoLeft” sequential allocation algorithm [73]. By specifying explicitly how to break ties (always allocate the job to the “left-most” machine), Voecking’s algorithm decreases the maximum bin load (w.h.p.) in sequential load balancing with d ≥ 2 hash functions from ln ln n/ ln d + O(1) (arbitrary tie-breaking) [4] to ln ln n/(d · ln Φd ) + O(1), which is an exponential improvement in d. Here Φd is defined as follows. Let Fd (j) = 0 for Pd j ≤ 0 and Fd (1) = 1. For j ≥ 2, Fd (j) = i=1 Fd (j − i). (This is a generalization of the Fibonacci numbers.) Then Φd = limj→∞ Fd (j)1/j . It holds that Φd is a constant with 1.61 ≤ Φd ≤ 2, see [73]. (We refer to [67, Section 5.2] and [73] for details about the description of the algorithm.) In the unified witness tree approach of Schickinger and Steger, the main difference between the analysis of parallel arrivals and the sequential algorithm of Voecking is in the definition of the witness tree. Here, the analysis in [67] also assumes that the machines are split into d groups of size n/d. This means that we can just re-use their analysis in the fully random case. For bounding the failure term of hash class Z, we have to show that the witness trees in the case of Voecking’s “Go-Left” algorithm (see [67, Fig. 6]) have at most O(log n) jobs, i.e., that they are contained in small connected components. Otherwise, we cannot apply Lemma 4.25. According to [67, Page 84], the number of job vertices j` in a witness tree for a bin with load ` is bounded by j` ≤ 4h` + 1, (4.7) where h` is the number of leaves in the witness tree. Following Voecking [73], Schickinger and Steger show that setting ` as large as ln ln n/(d ln Φd ) + O(1) is sufficient to bound the expected number of witness trees by O(n−α ). Such witness trees have only O(log n) many job nodes. Lemma 4.29. Let α > 0 and ` = logΦd (4 log nα )/d. Then j` ≤ 33α log n. Proof. It holds h` = Fd (d · ` + 1), see [67, Page 84], and Fd (d · ` + 1) ≤ Φd·`+1 , d since Fd (j)1/j is monotonically increasing. We obtain the bound logΦ (4 log nα )+1 j` ≤ 4 · h` + 1 ≤ 4 · Φd·`+1 + 1 ≤ 4 · Φd d d +1 = 16 · Φd · α log n + 1 ≤ 33α log n, using Φd ≤ 2 and assuming α log n ≥ 1. Thus, we know that a witness tree in the setting of Voecking’s algorithm is contained in a connected hypergraph with at most 33α log n edges. Thus, we may apply Lemma 4.25 in the same way as we did for parallel arrival. The result is that c,d for given α > 0 we can choose (h1 , . . . , hd ) ∈ Z`,n with ` = nδ , 0 < δ < 1, and c ≥ (33α(d + 1) log d + 2 + α)/δ and know that the maximum load is (ln ln n)/(d · 44 d κ+1 \ 2 3 4 5 6 3 0.818 0.776 0.725 0.687 0.658 4 0.772 0.667 0.604 0.562 0.533 5 0.702 0.579 0.515 0.476 0.448 6 0.637 0.511 0.450 0.412 0.387 7 0.582 0.457 0.399 0.364 0.341 8 0.535 0.414 0.359 0.327 0.305 Table 4.1 Space utilization thresholds for generalized cuckoo hashing with d ≥ 3 hash functions and κ + 1 keys per cell, for κ ≥ 1, based on the non-existence of the (κ + 1)-core. Each table cell gives the maximal space utilization achievable for the specific pair (d, κ + 1). These values have been obtained using Maple R to evaluate the formula from Theorem 1 of [55]. ln Φd ) + O(1) with probability 1 − O(1/nα ). So, our general analysis using small connected hypergraphs makes it very easy to show that hash class Z suffices to run a specific algorithm with load guarantees. When we are interested in making the parameters for setting up a hash function as small as possible, one should take care when bounding the constants in the logarithmic bound on the number of edges in the connected hypergraphs. (According to [67], (4.7) can be improved by a more careful argumentation.) More promising is a direct approach to witness trees, as we did in the analysis of the algorithm of Eppstein et al. in the previous subsection, i.e., directly peeling the witness tree. Using such an approach, Woelfel showed in [77, Theorem 2.1 and its discussion] that smaller parameters for the hash functions Z are sufficient to run Voecking’s algorithm. Application to Generalized Cuckoo Hashing. We further remark that the analysis of the τ -collision protocol makes it possible to analyze the space utilization of generalized cuckoo hashing using d ≥ 2 hash functions and buckets which hold up to κ ≥ 2 keys in each table cell, as proposed by Dietzfelbinger and Weidling in [31]. Obviously, a suitable assignment of keys to table cells is equivalent to a κ-orientation of G(S, ~h). It is well-known that any graph that has an empty (κ + 1)-core, i.e., that has no subgraph in which all vertices have degree at least κ + 1, has a κ-orientation, see, e.g., [18] and the references therein. The (κ + 1)-core of a graph can be obtained by repeatedly removing vertices with degree at most κ and their incident hyperedges. The precise study of this process is due to Molloy [55]. The τ -collision protocol is the parallel variant of this process, where in each round all vertices with degree at most τ are removed with their incident edges. (In the fully random case, properties of this process were recently studied by Jiang, Mitzenmacher, and Thaler in [43].) In terms of orientability, Theorem 4.18 with the exact parameter choices from Lemma 4.22 shows that for τ = max{eβ , dd+1 ed + 1, 2k + 1} there exists (w.h.p.) an assignment of the n keys to n memory cells when each cell can hold τ keys. (This is equivalent to a hash table load of 1/τ .) It is open to find good space bounds for generalized cuckoo hashing using this approach. However, we think that it suffers from the same general problem as the analysis for generalized cuckoo hashing with d ≥ 3 hash functions and one key per table cell: Since the analysis builds upon a process which requires an empty (κ + 1)-core in the hypergraph to succeed, space utilization seems to decrease for d and κ getting larger. Table 4.1 contains space utilization bounds for static generalized cuckoo hashing with d ≥ 3 hash functions and κ elements per table cell when the assignment is obtained via a process that requires the (κ + 1)-core to be empty. These calculations clearly support the conjecture that space utilization decreases for larger values of d and κ. 45 5. A Generalized Version of the Hash Class. In this short section we present a generalized version of our hash class that uses arbitrary κ-wise independent hash classes as building blocks. 5.1. The Generalized Hash Class. The following definition is a generalization of Definition 2.3 to functions with higher degrees of independence than two. Definition 5.1. Let c ≥ 1, d ≥ 2, and κ ≥ 2. For integers m, ` ≥ 1, and given f1 , . . . , fd : U → [m], g1 , . . . , gc : U → [`], and d two-dimensional tables z (i) [1..c, 0..` − 1] with elements from [m] for i ∈ {1, . . . , d}, we let ~h = (h1 , . . . , hd ) = (h1 , . . . , hd )hf1 , . . . , fd , g1 , . . . , gc , z (1) , . . . , z (d) i, where   X hi (x) = fi (x) + z (i) [j, gj (x)] mod m, for x ∈ U, i ∈ {1, . . . , d}. 1≤j≤c κ Let Hm [H`κ ] be an arbitrary κ-wise independent hash class with functions from U to c,d,κ κ [m] [from U to [`]]. Then Z`,m (H`κ , Hm ) is the class of all sequences (h1 , . . . , hd )hf1 , (1) (d) κ . . . , fd , g1 , . . . , gc , z , . . . , z i for fi ∈ Hm with 1 ≤ i ≤ d and gj ∈ H`κ with 1 ≤ j ≤ c.  c,d,2k 2k We consider Z`,m H`2k , Hm for some fixed k ∈ N, k ≥ 1. For the parameters d = 2 and c = 1, this is the hash class used by Dietzfelbinger and Woelfel in [32]. We first analyze the properties of this hash class by stating a definition similar to Definition 2.4 and a lemma similar to Lemma 2.5. We hope that comparing the proofs of Lemma 2.5 and Lemma 5.3 shows the (relative) simplicity of the original analysis. Definition 5.2. For T ⊆ U , define the random variable dT , the “deficiency” of ~h = (h1 , . . . , hd ) with respect to T , by dT (~h) = |T | − max{k, |g1 (T )|, . . . , |gc (T )|}. (Note: dT depends only on the gj -components of (h1 , . . . , hd ).) Further, define (i) badT as the event that dT > k; (ii) goodT as badT , i.e., the event that dT ≤ k; (iii) critT as the event that dT = k. Hash function sequences (h1 , . . . , hd ) in these events are called “T -bad”, “T -good”, and “T -critical”, resp. The following lemma is identical to [3, Lemma 1]. Lemma 5.3. Assume d ≥ 2, c ≥ 1, and k ≥ 1. For T ⊆ U , the following holds: 2 ck (a) Pr(badT ∪ critT ) ≤ |T | /` . (b) Conditioned on goodT (or on critT ), the hash values (h1 (x), . . . , hd (x)), x ∈ T , are distributed uniformly and independently in [r]d . 5.2. Application of the Hash Class. The central lemma to bound the impact of using our hash class in contrast to fully random hash functions was Lemma 2.11. One can reprove this lemma in an analogous way for the generalized version of the hash class, using the probability bound from Lemma 5.3(a) to get the following result. Lemma 5.4. Let c ≥ 1, k ≥ 1, S ⊆ U with |S| = n, and let A be a graph property. Let B ⊇ A be a peelable graph property. Let C be a graph property such that B is C-2ck-reducible. Then n X   Pr BSA ≤ Pr BSB ≤ `−ck t2ck · µCt . t=2k 46 5.3. Discussion. One can now redo all the calculations from Section 3 and Section 4. We discuss the differences. Looking at Lemma 5.4, we notice the (t2ck )factor in the sum instead of t2c . Since k is fixed, this factor does not change anything in the calculations that always used tO(1) (see, e.g., the proof of Lemma 3.7). The factor 1/`ck (instead of 1/`c ) leads to lower values for c if k ≥ 2. E.g., in cuckoo hashing with a stash, we have to set c ≥ (s + 2)/(δk) instead of c ≥ (s + 2)/δ. This improves the space usage, since we need less tables filled with random values. However, the higher degree of independence needed for the f - and g-components leads to a higher evaluation time of a single function. 6. Conclusion and Open Questions. We have described a general framework for analyzing hashing-based algorithms and data structures whose analysis depends on properties of the random graph G(S, ~h), where ~h comes from a certain class Z of simple hash functions. This class combined lookups in small random tables with the evaluation of simple 2-universal or 2-independent hash functions. We developed a framework that allowed us to consider what happens to certain hashing-based algorithms or data structures when fully random hash functions are replaced by hash functions from hash class Z. If the analysis works using the so-called first-moment method in the fully random case, the framework makes it possible to analyze the situation without exploiting details of the hash function construction. Thus, it requires no knowledge of the hash function and only expertise in random graph theory. Using this framework we showed that hash functions from class Z can be used in such diverse applications as cuckoo hashing (with a stash), generalized cuckoo hashing, the simulation of uniform hash functions, the construction of a perfect hash function, and load balancing. Particular choices for the parameters to set up hash functions from Z provide hash functions that can be evaluated efficiently. We collect some pointers for future work. Our method is tightly connected to the first moment method. Unfortunately, some properties of random graphs cannot be proven using this method. For example, the classical proof that the connected components of the random graph G(S, h1 , h2 ) for m = (1 + ε)|S|, for ε > 0, with fully random hash functions have size O(log n) uses a Galton-Watson process (see, e.g., [5]). From previous work [25, 26] we know that hash class Z has some classical properties regarding the balls-into-bins game. In the hypergraph setting this translates to a degree distribution of the vertices close to the fully random case. It would be very interesting to see if such a framework is also possible for other hash function constructions such as [61, 11]. The analysis of generalized cuckoo hashing could succeed (asymptotically) using hash functions from Z. For this, one has to extend the analysis of the behavior of Z on small connected hypergraphs to connected hypergraphs with super-logarithmically many edges. Witness trees are another approach to tackle the analysis of generalized cuckoo hashing. We presented initial results in Section 4.3. It is open whether this approach yields good bounds on the space utilization of generalized cuckoo hashing. In light of the new constructions of Thorup [71] and Christiani, Pagh, and Thorup [12], it would be interesting to see whether or not highly-independent hash classes with constant evaluation time are efficient in practice. Moreover, it would be nice to prove that hash class Z allows running linear probing robustly or to show that it is ε-minwise independent (for suitable ε). REFERENCES 47 [1] Yuriy Arbitman, Moni Naor, and Gil Segev, De-amortized cuckoo hashing: Provable worstcase performance and experimental results, in Proc. of the 36th International Colloquium on Automata, Languages and Programming (ICALP’09), Springer, 2009, pp. 107–118. [2] Martin Aumüller, Martin Dietzfelbinger, and Philipp Woelfel, Explicit and efficient hash families suffice for cuckoo hashing with a stash, in Proc. of the 20th Annual European Symposium on Algorithms (ESA’12), Springer, 2012, pp. 108–120. [3] Martin Aumüller, Martin Dietzfelbinger, and Philipp Woelfel, Explicit and efficient hash families suffice for cuckoo hashing with a stash, Algorithmica, 70 (2014), pp. 428–456. [4] Yossi Azar, Andrei Z. Broder, Anna R. Karlin, and Eli Upfal, Balanced allocations, SIAM J. Comput., 29 (1999), pp. 180–200. [5] Béla Bollobás, Random Graphs, Academic Press, London, 1985. [6] Fabiano C. Botelho, Rasmus Pagh, and Nivio Ziviani, Simple and space-efficient minimal perfect hash functions, in Proc. of the 10th International Workshop on Algorithms and Data Structures (WADS’07), Springer, 2007, pp. 139–150. , Practical perfect hashing in nearly optimal space, Inf. Syst., 38 (2013), pp. 108–131. [7] [8] Neil J. Calkin, Dependent sets of constant weight binary vectors, Combinatorics, Probability and Computing, 6 (1997), pp. 263–271. [9] J. Lawrence Carter and Mark N. Wegman, Universal classes of hash functions (extended abstract), in Proc. of the 9th Annual ACM Symposium on Theory of Computing (STOC’77), ACM, 1977, pp. 106–112. [10] Larry Carter and Mark N. Wegman, Universal classes of hash functions, J. Comput. Syst. Sci., 18 (1979), pp. 143–154. [11] L. Elisa Celis, Omer Reingold, Gil Segev, and Udi Wieder, Balls and bins: Smaller hash families and faster evaluation, SIAM J. Comput., 42 (2013), pp. 1030–1050. [12] Tobias Christiani, Rasmus Pagh, and Mikkel Thorup, From independence to expansion and back again, in Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing (STOC’15), ACM, 2015, pp. 813–820. [13] Richard Cole, Alan M. Frieze, Bruce M. Maggs, Michael Mitzenmacher, Andréa W. Richa, Ramesh K. Sitaraman, and Eli Upfal, On balls and bins with deletions, in Proc. of the 2nd International Workshop on Randomization and Approximation Techniques in Computer Science (RANDOM’98), Springer, 1998, pp. 145–158. [14] Richard Cole, Bruce M. Maggs, Friedhelm Meyer auf der Heide, Michael Mitzenmacher, Andréa W. Richa, Klaus Schröder, Ramesh K. Sitaraman, and Berthold Vöcking, Randomized protocols for low congestion circuit routing in multistage interconnection networks, in Proc. of the 30th Annual ACM Symposium on Theory of Computing (STOC’98), ACM, 1998, pp. 378–388. [15] Zbigniew J. Czech, George Havas, and Bohdan S. Majewski, Perfect hashing, Theor. Comput. Sci., 182 (1997), pp. 1–143. [16] Søren Dahlgaard, Mathias Bæk Tejs Knudsen, Eva Rotenberg, and Mikkel Thorup, The power of two choices with simple tabulation, in Proc. of the 27th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’16), 2016. To appear. [17] Søren Dahlgaard and Mikkel Thorup, Approximately minwise independence with twisted tabulation, in Proc. of the 14th Scandinavian Symposium and Workshops on Algorithm Theory (SWAT’14), Springer, 2014, pp. 134–145. [18] Luc Devroye and Ebrahim Malalla, On the k-orientability of random graphs, Discrete Mathematics, 309 (2009), pp. 1476–1490. [19] Luc Devroye and Pat Morin, Cuckoo hashing: Further analysis, Inf. Process. Lett., 86 (2003), pp. 215–219. [20] Reinhard Diestel, Graph Theory, Springer, 2005. [21] Martin Dietzfelbinger, Design strategies for minimal perfect hash functions, in 4th International Symposium on Stochastic Algorithms: Foundations and Applications (SAGA’07), Springer, 2007, pp. 2–17. [22] , On randomness in hash functions (invited talk), in 29th International Symposium on Theoretical Aspects of Computer Science (STACS’12), Springer, 2012, pp. 25–28. [23] Martin Dietzfelbinger, Andreas Goerdt, Michael Mitzenmacher, Andrea Montanari, Rasmus Pagh, and Michael Rink, Tight thresholds for cuckoo hashing via XORSAT, in Proc. of the 37th International Colloquium on Automata, Languages and Programming (ICALP’10), Springer, 2010, pp. 213–225. [24] Martin Dietzfelbinger, Torben Hagerup, Jyrki Katajainen, and Martti Penttonen, A reliable randomized algorithm for the closest-pair problem, J. Algorithms, 25 (1997), pp. 19–51. [25] Martin Dietzfelbinger and Friedhelm Meyer auf der Heide, A new universal class of hash 48 [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] functions and dynamic hashing in real time, in Proc. of the 17th International Colloquium on Automata, Languages and Programming (ICALP’90), Springer, 1990, pp. 6–19. , Dynamic hashing in real time, in Informatik, Festschrift zum 60. Geburtstag von Günter Hotz, Teubner, 1992, pp. 95–119. , Simple, efficient shared memory simulations, in Proc. of the 5th ACM Symposium on Parallelism in Algorithms and Architectures, (SPAA’93), ACM, 1993, pp. 110–119. Martin Dietzfelbinger and Michael Rink, Applications of a splitting trick, in Proc. of the 36th International Colloquium on Automata, Languages and Programming (ICALP’09), Springer, 2009, pp. 354–365. Martin Dietzfelbinger and Ulf Schellbach, On risks of using cuckoo hashing with simple universal hash classes, in Proc. of the 20th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’09), SIAM, 2009, pp. 795–804. , Weaknesses of cuckoo hashing with a simple universal hash class: The case of large universes, in Proc. of the 35th Conference on Current Trends in Theory and Practice of Informatics (SOFSEM’09), 2009, pp. 217–228. Martin Dietzfelbinger and Christoph Weidling, Balanced allocation and dictionaries with tightly packed constant size bins, Theor. Comput. Sci., 380 (2007), pp. 47–68. Martin Dietzfelbinger and Philipp Woelfel, Almost random graphs with simple hash functions, in Proc. of the 35th Annual ACM Symposium on Theory of Computing (STOC’03), ACM, 2003, pp. 629–638. David Eppstein, Michael T. Goodrich, Michael Mitzenmacher, and Pawel Pszona, Wear minimization for cuckoo hashing: How not to throw a lot of eggs into one basket, in Proc. of the 13th International Symposium of Experimental Algorithms, (SEA’14), Springer, 2014, pp. 162–173. Paul Erdős and Alfréd Rényi, On the evolution of random graphs, Publ. Math. Inst. Hung. Acad. Sci, 5 (1960), pp. 17–61. Dimitris Fotakis, Rasmus Pagh, Peter Sanders, and Paul G. Spirakis, Space efficient hash tables with worst case constant access time, Theory Comput. Syst., 38 (2005), pp. 229–248. Nikolaos Fountoulakis and Konstantinos Panagiotou, Orientability of random hypergraphs and the power of multiple choices, in Proc. of the 37th International Colloquium on Automata, Languages and Programming (ICALP’10), Springer, 2010, pp. 348–359. Nikolaos Fountoulakis, Konstantinos Panagiotou, and Angelika Steger, On the insertion time of cuckoo hashing, SIAM J. Comput., 42 (2013), pp. 2156–2181. Edward A. Fox, Lenwood S. Heath, Qi Fan Chen, and Amjad M. Daoud, Practical minimal perfect hash functions for large databases, Commun. ACM, 35 (1992), pp. 105–121. Michael L. Fredman, János Komlós, and Endre Szemerédi, Storing a sparse table with o(1) worst case access time, J. ACM, 31 (1984), pp. 538–544. Alan M. Frieze and Páll Melsted, Maximum matchings in random bipartite graphs and the space utilization of cuckoo hash tables, Random Struct. Algorithms, 41 (2012), pp. 334–364. Alan M. Frieze, Páll Melsted, and Michael Mitzenmacher, An analysis of random-walk cuckoo hashing, SIAM J. Comput., 40 (2011), pp. 291–308. Piotr Indyk, A small approximately min-wise independent family of hash functions, J. Algorithms, 38 (2001), pp. 84–90. Jiayang Jiang, Michael Mitzenmacher, and Justin Thaler, Parallel peeling algorithms, in Proc. of the 26th ACM Symposium on Parallelism in Algorithms and Architectures, (SPAA ’14), ACM, 2014, pp. 319–330. Michal Karoński and Tomasz Luczak, The phase transition in a random hypergraph, Journal of Computational and Applied Mathematics, 142 (2002), pp. 125–135. Richard M. Karp, Michael Luby, and Friedhelm Meyer auf der Heide, Efficient PRAM simulation on a distributed memory machine, Algorithmica, 16 (1996), pp. 517–542. , Efficient PRAM simulation on a distributed memory machine, Algorithmica, 16 (1996), pp. 517–542. Megha Khosla, Balls into bins made faster, in Proc. of the 21st Annual European Symposium on Algorithms (ESA’13), Springer, 2013, pp. 601–612. Adam Kirsch, Michael Mitzenmacher, and Udi Wieder, More robust hashing: Cuckoo hashing with a stash, in Proc. of the 16th Annual European Symposium on Algorithms (ESA’08), Springer, 2008, pp. 611–622. , More robust hashing: Cuckoo hashing with a stash, SIAM J. Comput., 39 (2009), pp. 1543–1561. Toryn Qwyllyn Klassen and Philipp Woelfel, Independence of tabulation-based hash classes, in Proc. Theoretical Informatics - 10th Latin American Symposium (LATIN’12), Springer, 2012, pp. 506–517. 49 [51] Bohdan S. Majewski, Nicholas C. Wormald, George Havas, and Zbigniew J. Czech, A family of perfect hashing methods, Comput. J., 39 (1996), pp. 547–554. [52] Friedhelm Meyer auf der Heide, Christian Scheideler, and Volker Stemann, Exploiting storage redundancy to speed up randomized shared memory simulations, Theor. Comput. Sci., 162 (1996), pp. 245–281. [53] Marc Mezard and Andrea Montanari, Information, Physics, and Computation, Oxford University Press, 2009. [54] Michael Mitzenmacher and Salil P. Vadhan, Why simple hash functions work: exploiting the entropy in a data stream, in Proc. of the 19th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’08), SIAM, 2008, pp. 746–755. [55] Michael Molloy, Cores in random hypergraphs and boolean formulas, Random Struct. Algorithms, 27 (2005), pp. 124–135. [56] Anna Östlin and Rasmus Pagh, Uniform hashing in constant time and linear space, in Proceedings of the 35th Annual ACM Symposium on Theory of Computing (STOC’03), ACM, 2003, pp. 622–628. [57] Richard Otter, The number of trees, Annals of Mathematics, (1948), pp. 583–599. [58] Anna Pagh and Rasmus Pagh, Uniform hashing in constant time and optimal space, SIAM J. Comput., 38 (2008), pp. 85–96. [59] Anna Pagh, Rasmus Pagh, and Milan Ruzic, Linear probing with constant independence, SIAM J. Comput., 39 (2009), pp. 1107–1120. [60] Rasmus Pagh and Flemming Friche Rodler, Cuckoo hashing, J. Algorithms, 51 (2004), pp. 122–144. [61] Mihai Pǎtraşcu and Mikkel Thorup, The power of simple tabulation hashing, J. ACM, 59 (2012), p. 14. , Twisted tabulation hashing., in Proc. of the 24th Annual ACM-SIAM Symposium on [62] Discrete Algorithms (SODA’13), SIAM, 2013, pp. 209–228. [63] , On the k-independence required by linear probing and minwise independence, ACM Trans. Algorithms, 12 (2015), pp. 8:1–8:27. [64] Sanguthevar Rajasekaran, Panos M. Pardalos, John H. Reif, and Rosé Rolim, eds., Handbook of Randomized Computing, Vol. 1, Kluwer Academic Publishers, 2001. [65] Omer Reingold, Ron D. Rothblum, and Udi Wieder, Pseudorandom graphs in data structures, in Proc. of the 41st International Colloquium on Automata, Languages and Programming (ICALP’14), Springer, 2014, pp. 943–954. [66] Michael Rink, Thresholds for Matchings in Random Bipartite Graphs with Applications to Hashing-Based Data Structures, PhD thesis, Technische Universität Ilmenau, 2014. [67] Thomas Schickinger and Angelika Steger, Simplified witness tree arguments, in Proc. of the 27th Conference on Current Trends in Theory and Practice of Informatics (SOFSEM’00), Springer, 2000, pp. 71–87. [68] Jeanette Schmidt-Pruzan and Eli Shamir, Component structure in the evolution of random hypergraphs, Combinatorica, 5 (1985), pp. 81–94. [69] Alan Siegel, On universal classes of extremely random constant-time hash functions, SIAM J. Comput., 33 (2004), pp. 505–543. [70] Volker Stemann, Parallel balanced allocations, in Proc. of the 8th ACM Symposium on Parallelism in Algorithms and Architectures, (SPAA’96), ACM, 1996, pp. 261–269. [71] Mikkel Thorup, Simple tabulation, fast expanders, double tabulation, and high independence, in Proc. 54th Annual Symposium on Foundations of Computer Science (FOCS), ACM, 2013, pp. 90–99. [72] Mikkel Thorup and Yin Zhang, Tabulation-based 5-independent hashing with applications to linear probing and second moment estimation, SIAM J. Comput., 41 (2012), pp. 293–331. [73] Berthold Vöcking, How asymmetry helps load balancing, J. ACM, 50 (2003), pp. 568–589. [74] Mark N. Wegman and Larry Carter, New classes and applications of hash functions, in Proc. 20th Annual Symposium on Foundations of Computer Science (FOCS’79), IEEE Computer Society, 1979, pp. 175–182. [75] , New hash functions and their use in authentication and set equality, J. Comput. Syst. Sci., 22 (1981), pp. 265–279. [76] Philipp Woelfel, Efficient strongly universal and optimally universal hashing, in 24th International Symposium on Mathematical Foundations of Computer Science (MFCS’99), Springer, 1999, pp. 262–272. [77] , Asymmetric balanced allocation with simple hash functions, in Proc. of the 17th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA’06), ACM, 2006, pp. 424–433. 50 Appendix A. Proof of Lemma 4.22. Proof. For the sake of the analysis, we regard MCWT(k, t) as the union of two graph properties MC(k, t), hypergraphs that form (k, t)-multicycles, and WT(t − 1), hypergraphs that form  witness trees for the  parameter  t − 1. We show the lemma by MC(k,t) WT(t−1) ∗ ∗ −α proving E NS = O(n ) and E NS = O(n−α ). In both cases, we consider the bipartite representation of hypergraphs. Our proofs follow [67, Section 4].   MC(k,t) We start by bounding E∗ NS . As we have seen, a (k, t)-multicycle is a connected graph that has at most 2kt vertices and cyclomatic number k. We start by counting (k, t)-multicycles with exactly s vertices and s + k − 1 edges, for s ≤ 2kt. In this case, we have to choose j and u (the number of jobs and machines, resp.) such that s = j + u. By Lemma 3.2 there are at most (s + k − 1)O(k) unlabeled (k, t)-multicycles. Fix such an unlabeled (k, t)-multicycle G. There are two ways to split the vertices of G into the two sides of the bipartition. (G can be assumed to be bipartite since we consider (k, t)-multicycles that are subgraphs of the allocation graph.) Once this bipartition is fixed, we have nj ways to choose the job vertices and label vertices of G with these jobs. There are ds+k−1 ways to label the edges of G with labels from 1, . . . , d, which represent the request modeled by an edge between a job vertex and a machine vertex. Once this labeling is fixed, there are (n/d)u ways to choose machine vertices and label the remaining vertices of G. Fix such a fully labeled graph G0 . For each request r of a job w = 1, . . . , j, choose a machine from [n/d] at random and independently. The probability that this machine is the same machine that w had chosen in G0 is d/n. Thus, the probability that G0 is realized by the random choices is (d/n)s+k−1 . By setting k = α + 2 and using the parameter choice t = O(ln ln n) we calculate 2kt X   X MC(k,t) E∗ NS ≤ 2 · nj · (n/d)u · ds+k−1 · (s + k − 1)O(k) · (d/n)s+k−1 s=1 u+j=s ≤ n1−k 2kt X 2s · d2(s+k−1) · (s + k − 1)O(1) s=1 ≤ n1−k · 2kt · 4kt · d2(2kt+k−1) · (2kt + k − 1)O(1) ≤ n1−k · (ln ln n)O(1) · (ln n)O(1) = O(n2−k ) = O(n−α ).   WT(t−1) Now we consider E∗ NS . By the simple recursive structure of witness trees, a t−1 t−2 t−1 t−1 −τ −1 witness tree of depth t − 1 has j = τ τ (d−1) job vertices and u = τ τ (d−1) (d−1)−1 (d−1)−1 machine vertices. Let T be an unlabeled witness tree of depth t − 1. T has r = d · j edges. There are at most nj ways to choose j jobs from S and label the job vertices of T and at most dr ways to label the edges with a label from {1, . . . , d}. Once this labeling is fixed, there are at most (n/d)u ways to choose the machines and label the machine vertices in the witness tree. With these rough estimates, we over-counted the number of witness trees by at least a factor of (τ !)j/τ · ((d − 1)!)j . (See Figure 4.1. For each job vertex, there are (d − 1)! labelings which result in the same witness tree. Furthermore, for each non-leaf machine vertex, there are τ ! many labelings which yield the same witness tree.) Fix such a fully labeled witness tree T 0 . For each request of a job w = 1, . . . , j choose at random a machine from [n/d]. The probability that the edge matches the edge in T 0 is d/n. Thus, the probability 51 that T 0 is realized by the random choices is (d/n)r . We calculate E ∗  WT(t−1) NS  j r  u ≤ n · d · (n/d) · ≤n·d  ≤n 2r  · 1 τ! ed · dd+1 τ j/τ 1 τ!  · j/τ  · j 1 · (d/n)r (d − 1)! " #j j  d−1 1 e e 2d ≤n ·d · (d − 1)! τ d−1 j . Observe that t−2 j= τ t−1 (d − 1)t−2 − τ τ t−2 (d − 1)t−2 − τ (τ (d − 1)) ≥ ≥ τ (d − 1) − 1 d 2d . For the parameter settings assumed in the lemma we get ∗ E  WT(t−1) NS  ed · dd+1 ≤n τ  t−2  (τ (d−1)) 2d  ed · dd+1 =n τ βt ln n !  1 2d ln ln n   2dβtlnlnlnnn β ln ln n t−2 t ln n   2dβlnlnlnn n   d d+2 t β ln ln n ≤n· e ·d t ln n  2dβlnlnlnn n  1 1 d d+2 β ln ln n ≤n· e ·d · ln n ≤ n ed · dd+2 · ≤ n3/2+ln d−β/2d . MCWT(k,t) Setting β = 2d(α + ln d + 3/2) suffices to show that E∗ (NS 52 ) = O(n−α ).
8cs.DS
An overview of embedding models of entities and relationships for knowledge base completion Dat Quoc Nguyen School of Computing and Information Systems The University of Melbourne, Australia [email protected] Moscow Tokyo arXiv:1703.08098v3 [cs.CL] 3 Feb 2018 Abstract Knowledge bases (KBs) of real-world facts about entities and their relationships are useful resources for a variety of natural language processing tasks. However, because knowledge bases are typically incomplete, it is useful to be able to perform knowledge base completion or link prediction, i.e., predict whether a relationship not in the knowledge base is likely to be true. This article serves as a brief overview of embedding models of entities and relationships for knowledge base completion, summarizing up-to-date experimental results on standard benchmark datasets FB15k, WN18, FB15k-237, WN18RR, FB13 and WN11. Keywords: Knowledge base completion, link prediction, embedding model, triple classification, entity prediction. 1 Introduction Before introducing the KB completion task in details, let us return to the classic Word2Vec example of a “royal” relationship between “king” and “man”, and between “queen” and “woman.” As illustrated in this example: v king − v man ≈ v queen − v woman , word vectors learned from a large corpus can model relational similarities or linguistic regularities between pairs of words as translations in the projected vector space (Mikolov et al., 2013; Pennington et al., 2014). Figure 1 shows another example of a relational similarity between word pairs of countries and capital cities: v Japan − v T okyo ≈ v Germany − v Berlin v Germany − v Berlin ≈ v Italy − v Rome v Italy − v Rome ≈ v P ortugal − v Lisbon Let us consider the country and capital pairs in Figure 1 to be pairs of entities rather than word Ankara Russia Japan Turkey Warsaw Berlin Paris Rome Athens Poland Germany France Greece Italy Madrid Lisbon Spain Portugal Figure 1: Two-dimensional projection of vectors of countries and their capital cities. This figure is drawn based on Mikolov et al. (2013). types. That is, we now represent country and capital entities by low-dimensional and dense vectors. The relational similarity between word pairs is presumably to capture a “is capital of” relationship between country and capital entities. Also, we represent this relationship by a translation vector v is capital of in the entity vector space. Thus, we expect: v T okyo + v is capital of − v Japan ≈ 0 v Berlin + v is capital of − v Germany ≈ 0 v Rome + v is capital of − v Italy ≈ 0 v Lisbon + v is capital of − v P ortugal ≈ 0 This intuition inspired the TransE model—a wellknown embedding model for KB completion or link prediction in KBs (Bordes et al., 2013). Knowledge bases are collections of real-world triples, where each triple or fact (h, r, t) in KBs represents some relation r between a head entity h and a tail entity t. KBs can thus be formalized as directed multi-relational graphs, where nodes correspond to entities and edges linking the nodes encode various kinds of relationship (Garcı́a-Durán et al., 2016; Nickel et al., 2016a). Here entities are real-world things or objects such Figure 2: An illustration of (incomplete) knowledge base, with 4 person entities, 2 place entities, 2 relation types and total 6 triple facts. This figure is drawn based on Weston and Bordes (2014). as persons, places, organizations, music tracks or movies. Each relation type defines a certain relationship between entities. For example, as illustrated in Figure 2, the relation type “child of” relates person entities with each other, while the relation type “born in” relates person entities with place entities. Several KB examples include the domain-specific KB GeneOntology and popular generic KBs of WordNet (Fellbaum, 1998), YAGO (Suchanek et al., 2007), Freebase (Bollacker et al., 2008), NELL (Carlson et al., 2010) and DBpedia (Lehmann et al., 2015) as well as commercial KBs such as Google’s Knowledge Graph, Microsoft’s Satori and Facebook’s Open Graph. Nowadays, KBs are used in a number of commercial applications including search engines such as Google, Microsoft’s Bing and Facebook’s Graph search. They also are useful resources for many NLP tasks such as question answering (Ferrucci, 2012; Fader et al., 2014), word sense disambiguation (Navigli and Velardi, 2005; Agirre et al., 2013), semantic parsing (Krishnamurthy and Mitchell, 2012; Berant et al., 2013) and co-reference resolution (Ponzetto and Strube, 2006; Dutta and Weikum, 2015). A main issue is that even very large KBs, such as Freebase and DBpedia, which contain billions of fact triples about the world, are still far from complete. In particular, in English DBpedia 2014, 60% of person entities miss a place of birth and 58% of the scientists do not have a fact about what they are known for (Krompaß et al., 2015). In Freebase, 71% of 3 million person entities miss a place of birth, 75% do not have a nationality while 94% have no facts about their parents (West et al., 2014). So, in terms of a specific application, question answering systems based on incomplete KBs would not provide a correct answer given a correctly interpreted question. For example, given the incomplete KB in Figure 2, it would be impossible to answer the question “where was Jane born ?”, although the question is completely matched with existing entity and relation type information (i.e., “Jane” and “born in”) in KB. Consequently, much work has been devoted towards knowledge base completion to perform link prediction in KBs, which attempts to predict whether a relationship/triple not in the KB is likely to be true, i.e., to add new triples by leveraging existing triples in the KB (Lao and Cohen, 2010; Bordes et al., 2012; Gardner et al., 2014; Garcı́aDurán et al., 2016). For example, we would like to predict the missing tail entity in the incomplete triple (Jane, born in, ?) or predict whether the triple (Jane, born in, Miami) is correct or not. Embedding models for KB completion have been proven to give state-of-the-art link prediction performances, in which entities are represented by latent feature vectors while relation types are represented by latent feature vectors and/or matrices and/or third-order tensors (Nickel et al., 2011; Jenatton et al., 2012; Bordes et al., 2013; Wang et al., 2014; Dong et al., 2014; Lin et al., 2015b; Guu et al., 2015; Krompaß et al., 2015; Toutanova and Chen, 2015; Garcı́a-Durán et al., 2016; Trouillon et al., 2016; Toutanova et al., 2016; Nickel et al., 2016b). This article briefly overviews the embedding models for KB completion, and then summarizes up-to-date experimental results on two standard evaluation tasks: i) the entity prediction task—which is also referred to as the link prediction task (Bordes et al., 2013)—and ii) the triple classification task (Socher et al., 2013). 2 2.1 Embedding models for KB completion A general approach Let E denote the set of entities and R the set of relation types. Denote by G the knowledge base consisting of a set of correct triples (h, r, t), such that h, t ∈ E and r ∈ R. For each triple (h, r, t), the embedding models define a score function f (h, r, t) of its implausibility. Their goal is to choose f such that the score f (h, r, t) of a plausible triple (h, r, t) is smaller than the score f (h0 , r0 , t0 ) of an implausible triple (h0 , r0 , t0 ). Model Score function f (h, r, t) Opt. Unstructured kv h − v t k`1/2 SGD SE kWr,1 v h − Wr,2 v t k`1/2 ; Wr,1 , Wr,2 ∈ Rk×k SME TransE TransH TransR TransD lppTransD (W1,1 v h + W1,2 v r + b1 )> (W2,1 v t SGD + W2,2 v r + b2 ) SGD b1 , b2 ∈ Rn ; W1,1 , W1,2 , W2,1 , W2,2 ∈ Rn×k kv h + v r − v t k`1/2 ; v r ∈ Rk SGD > k(I − r p r > p )v h + v r − (I − r p r p )v t k`1/2 SGD r p , v r ∈ Rk ; I: Identity matrix size k × k kWr v h + v r − Wr v t k`1/2 ; Wr ∈ Rn×k ; v r ∈ Rn k(I + r p h> p )v h + v r − (I + SGD r p t> p )v t k`1/2 AdaDelta r p , v r ∈ Rn ; hp , tp ∈ Rk ; I: Identity matrix size n × k > k(I + r p,1 h> p )v h + v r − (I + r p,2 tp )v t k`1/2 STransE kWr,1 v h + v r − Wr,2 v t k`1/2 ; Wr,1 , Wr,2 ∈ Rk×k ; v r ∈ Rk TranSparse kWhr (θrh )v h DISTMULT k×k v> h Wr v t ; Wr is a diagonal matrix ∈ R NTN SGD r p,1 , r p,2 , v r ∈ Rn ; hp , tp ∈ Rk ; I: Identity matrix size n × k + vr − > v> r tanh(v h Mr v t Wtr (θrt )v t k`1/2 ; Whr , Wtr ∈ Rn×k ; θrh , θrt SGD ∈ R ; vr ∈ Rn SGD AdaGrad + Wr,1 v h + Wr,2 v t + br ) L-BFGS v r , br ∈ Rn ; Mr ∈ Rk×k×n ; Wr,1 , Wr,2 ∈ Rn×k HolE k sigmoid (v > r (v h ◦ v t )) ; v r ∈ R , ◦ denotes circular correlation AdaGrad Bilinear-COMP k×k v> h Wr1 Wr2 ...Wrm v t ; Wr1 , Wr2 , ..., Wrm ∈ R AdaGrad Rk TransE-COMP kv h + v r1 + v r2 + ... + v rm − v t k`1/2 ; v r1 , v r2 , ..., v rm ∈ ConvE v> t g (vec (g (concat(v h , v r ) ∗ Ω)) W ) ; g denotes a non-linear function Adam ConvKB w> concat (g ([v Adam h, vr , vt] ∗ Ω)) ; ∗ denotes a convolution operator AdaGrad Table 1: The score functions f (h, r, t) and the optimization methods (Opt.) of several prominent embedding models for KB completion. In all of these models, the entities h and t are represented by vectors v h and v t ∈ Rk , respectively. In ConvE, v h and v r denote a 2D reshaping of v h and v r , respectively. In both ConvE and ConvKB, Ω denotes a set of filters. Table 1 summarizes different score functions f (h, r, t) and the optimization algorithms used to estimate model parameters. To learn model parameters (i.e., entity vectors, relation vectors or matrices), the embedding models minimize an objective function. A common objective function is the following margin-based function: X L= [γ + f (h, r, t) − f (h0 , r, t0 )]+ (h,r,t)∈G 0 (h0 ,r,t0 )∈G(h,r,t) where [x]+ = max(0, x), γ is the margin hyper0 parameter, and G(h,r,t) is the set of incorrect triples generated by corrupting the correct triple (h, r, t) ∈ G. 2.2 Specific models The Unstructured model (Bordes et al., 2012) assumes that the head and tail entity vectors are similar. As the Unstructured model does not take the relationship into account, it cannot distinguish different relation types. The Structured Embedding (SE) model (Bordes et al., 2011) assumes that the head and tail entities are similar only in a relationdependent subspace, where each relation is represented by two different matrices. Furthermore, the SME model (Bordes et al., 2012) uses four different matrices to project entity and relation vectors into a subspace. The TransE model (Bordes et al., 2013) is inspired by models such as the Word2Vec Skip-gram model (Mikolov et al., 2013) where relationships between words often correspond to translations in latent feature space. TorusE (Ebisu and Ichise, 2018) embeds entities and relations on a torus to handle TransE’s regularization problem. The TransH model (Wang et al., 2014) associates each relation with a relation-specific hyperplane and uses a projection vector to project entity vectors onto that hyperplane. TransD (Ji et al., 2015) and TransR/CTransR (Lin et al., 2015b) extend the TransH model by using two projection vectors and a matrix to project entity vectors into a relation-specific space, respectively. Similar to TransR, TransR-FT (Feng et al., 2016a) also uses a matrix to project head and tail entity vectors. TEKE H (Wang and Li, 2016) extends TransH to incorporate rich context information in an external text corpus. lppTransD (Yoon et al., 2016) extends TransD to additionally use two projection vectors for representing each relation. STransE (Nguyen et al., 2016b) and TranSparse (Ji et al., 2016) can be viewed as direct extensions of the TransR model, where head and tail entities are associated with their own projection matrices. Unlike STransE, the TranSparse model uses adaptive sparse matrices, whose sparse degrees are defined based on the number of entities linked by relations. TranSparse-DT (Chang et al., 2017) is an extension of TranSparse with a dynamic translation. ITransF (Xie et al., 2017) can be considered as a generalization of STransE, which allows sharing statistic regularities between relation projection matrices and alleviates data sparsity issue. DISTMULT (Yang et al., 2015) is based on the Bilinear model (Nickel et al., 2011; Bordes et al., 2012; Jenatton et al., 2012) where each relation is represented by a diagonal rather than a full matrix. The neural tensor network (NTN) model (Socher et al., 2013) uses a bilinear tensor operator to represent each relation while ER-MLP (Dong et al., 2014) and ProjE (Shi and Weninger, 2017) can be viewed as simplified versions of NTN. Such quadratic forms are also used to model entities and relations in KG2E (He et al., 2015), TransG (Xiao et al., 2016), ComplEx (Trouillon et al., 2016), TATEC (Garcı́a-Durán et al., 2016), RSTE (Tay et al., 2017) and ANALOGY (Liu et al., 2017). In addition, the HolE model (Nickel et al., 2016b) uses circular correlation–a compositional operator–which can be interpreted as a compression of the tensor product. ConvE (Dettmers et al., 2017) and ConvKB (Nguyen et al., 2017) are based on convolutional neural networks. ConvE uses a 2D convolutional layer directly over head-entity and relation vector embeddings while ConvKB applies a convolutional layer over embedding triples. Unlike ConvE and ConvKB, the IRN model (Shen et al., 2017) uses a shared memory and recurrent neural network-based controller to implicitly model multi-step structured relationships. Recent research has shown that relation paths between entities in KBs provide richer context information and improve the performance of embedding models for KB completion (Luo et al., 2015; Liang and Forbus, 2015; Garcı́a-Durán et al., 2015; Guu et al., 2015; Toutanova et al., 2016; Nguyen et al., 2016a; Durán and Niepert, 2017). Luo et al. (2015) constructed relation paths between entities and, viewing entities and relations in the path as pseudo-words, then applied Word2Vec algorithms (Mikolov et al., 2013) to produce pre-trained vectors for these pseudowords. Luo et al. (2015) showed that using these pre-trained vectors for initialization helps to improve the performance of models TransE (Bordes et al., 2013), SME (Bordes et al., 2012) and SE (Bordes et al., 2011). Liang and Forbus (2015) used the implausibility score produced by SME to compute the weights of relation paths. PTransE-RNN (Lin et al., 2015a) models relation paths by using a recurrent neural network. In addition, RTransE (Garcı́a-Durán et al., 2015), PTransE-ADD (Lin et al., 2015a) and TransECOMP (Guu et al., 2015) are extensions of the TransE model. These models similarly represent a relation path by a vector which is the sum of the vectors of all relations in the path, whereas in the Bilinear-COMP model (Guu et al., 2015) and the PRUNED-PATHS model (Toutanova et al., 2016), each relation is a matrix and so it represents the relation path by matrix multiplication. The neighborhood mixture model TransE-NMM (Nguyen et al., 2016a) can be also viewed as a three-relation path model as it takes into account the neighborhood entity and relation information of both head and tail entities in each triple. Neighborhood information is also exploited in the relational graph convolutional networks R-GCN (Schlichtkrull et al., 2017). Furthermore, Durán and Niepert (2017) proposed the KBLRN framework to combine relational paths of length one and two with latent and numerical features. 2.3 Other KB completion models The Path Ranking Algorithm (PRA) (Lao and Cohen, 2010) is a random walk inference technique which was proposed to predict a new relationship between two entities in KBs. Lao et al. (2011) used PRA to estimate the probability of an unseen triple as a combination of weighted random walks that follow different paths linking the head entity and tail entity in the KB. Gardner et al. (2014) made use of an external text corpus to increase the connectivity of the KB used as the input to PRA. Gardner and Mitchell (2015) improved PRA by proposing a subgraph feature extraction technique to make the generation of random walks in KBs more efficient and expressive, while Wang et al. (2016) extended PRA to couple the path ranking of multiple relations. PRA can also be used in conjunction with first-order logic in the discriminative Gaifman model (Niepert, 2016). In addition, Neelakantan et al. (2015) used a recurrent neural network to learn vector representations of PRA-style relation paths between entities in the KB. Other random-walk based learning algorithms for KB completion can be also found in Feng et al. (2016b), Liu et al. (2016), Wei et al. (2016) and Mazumder and Liu (2017). Recently, Yang et al. (2017) have proposed a Neural Logic Programming (LP) framework to learning probabilistic first-order logical rules for KB reasoning, producing competitive link prediction performances. See other methods for learning from KBs and multi-relational data in Nickel et al. (2016a). 3 Evaluation tasks Two standard tasks are proposed to evaluate embedding models for KB completion including: the entity prediction task, i.e. link prediction (Bordes et al., 2013), and the triple classification task (Socher et al., 2013). Information about benchmark datasets for KB completion evaluation is given in Table 2. Commonly, datasets FB15k and WN18 (Bordes et al., 2013) are used for entity prediction evaluation, while datasets FB13 and WN11 (Socher et al., 2013) are used for triple classification evaluation. FB15k and FB13 are derived from the large realworld fact KB FreeBase (Bollacker et al., 2008). WN18 and WN11 are derived from the large lexical KB WordNet (Miller, 1995). Toutanova and Chen (2015) noted that FB15k and WN18 are not challenging datasets because Dataset FB15k WN18 FB13 WN11 FB15k-237 WN18RR |E | 14,951 40,943 75,043 38,696 14,541 40,943 |R| 1,345 18 13 11 237 11 #Triples in train/valid/test 483,142 50,000 59,071 141,442 5,000 5,000 316,232 5,908 23,733 112,581 2,609 10,544 272,115 17,535 20,466 86,835 3,034 3,134 Table 2: Statistics of the experimental datasets. In both WN11 and FB13, each validation and test set also contains the same number of incorrect triples as the number of correct triples. they contain many reversible triples. Dettmers et al. (2017) showed a concrete example: A test triple (feline, hyponym, cat) can be mapped to a training triple (cat, hypernym, feline), thus knowing that “hyponym” and “hypernym” are reversible allows us to easily predict the majority of test triples. So, datasets FB15k-237 (Toutanova and Chen, 2015) and WN18RR (Dettmers et al., 2017) are created to serve as realistic KB completion datasets which represent a more challenging learning setting. FB15k-237 and WN18RR are subsets of FB15k and WN18, respectively. Note that when creating the FB13 and WN11 datasets, Socher et al. (2013) already filtered out triples from the test set if either or both of their head and tail entities also appear in the training set in a different relation type or order. 3.1 3.1.1 Entity prediction Task description The entity prediction task, i.e. link prediction (Bordes et al., 2013), predicts the head or the tail entity given the relation type and the other entity, i.e. predicting h given (?, r, t) or predicting t given (h, r, ?) where ? denotes the missing element. The results are evaluated using a ranking induced by the function f (h, r, t) on test triples. Each correct test triple (h, r, t) is corrupted by replacing either its head or tail entity by each of the possible entities in turn, and then these candidates are ranked in ascending order of their implausibility score. This is called as the “Raw” setting protocol. Furthermore, the “Filtered” setting protocol, described in Bordes et al. (2013), filters out before ranking any corrupted triples that appear in the KB. Ranking a corrupted triple appearing in the KB (i.e. a correct triple) higher than the original test triple is also correct, but is penalized by the “Raw” score, thus the “Filtered” setting provides a clearer view on the ranking performance. Method SE (Bordes et al., 2011) Unstructured (Bordes et al., 2012) SME (Bordes et al., 2012) TransH (Wang et al., 2014) TransR (Lin et al., 2015b) CTransR (Lin et al., 2015b) KG2E (He et al., 2015) TransD (Ji et al., 2015) lppTransD (Yoon et al., 2016) TransG (Xiao et al., 2016) TranSparse (Ji et al., 2016) TranSparse-DT (Chang et al., 2017) ITransF (Xie et al., 2017) NTN (Socher et al., 2013) RESCAL (Nickel et al., 2011) [♥] TransE (Bordes et al., 2013) [♥] HolE (Nickel et al., 2016b) ComplEx (Trouillon et al., 2016) ANALOGY (Liu et al., 2017) TorusE (Ebisu and Ichise, 2018) STransE (Nguyen et al., 2016b) ER-MLP (Dong et al., 2014) [♠] DISTMULT (Yang et al., 2015) [♣] ConvE (Dettmers et al., 2017) IRN (Shen et al., 2017) ProjE (Shi and Weninger, 2017) R TransE (Garcı́a-Durán et al., 2015) PTransE-ADD (Lin et al., 2015a) PTransE-RNN (Lin et al., 2015a) GAKE (Feng et al., 2016b) Gaifman (Niepert, 2016) Hiri (Liu et al., 2016) Neural LP (Yang et al., 2017) R-GCN+ (Schlichtkrull et al., 2017) KBLRN (Durán and Niepert, 2017) NLFeat (Toutanova and Chen, 2015) TEKE H (Wang and Li, 2016) SSP (Xiao et al., 2017) Filtered FB15k MR @10 MRR MR 162 39.8 985 979 6.3 304 154 40.8 533 87 64.4 303 77 68.7 225 75 70.2 218 59 74.0 331 91 77.3 212 78 78.7 270 98 79.8 470 82 79.5 211 79 80.2 221 65 81.0 205 41.4 0.25 58.7 0.354 74.9 0.463 73.9 0.524 84.0 0.692 85.4 0.725 83.2 0.733 69 79.7 0.543 206 81 80.1 0.570 299 42 89.3 0.798 655 64 87.3 0.745 504 38 92.7 249 34 88.4 50 76.2 58 84.6 92 82.2 119 64.8 75 84.2 352 70.3 0.603 83.7 0.76 84.2 0.696 44 87.5 0.794 87.0 0.822 108 73.0 114 82 79.0 156 WN18 @10 MRR 80.5 38.2 74.1 86.7 92.0 92.3 92.8 92.2 94.3 93.3 93.2 94.3 94.2 66.1 0.53 92.8 0.890 94.3 0.495 94.9 0.938 94.7 0.941 94.7 0.942 95.4 0.947 93.4 0.657 94.2 0.895 94.6 0.797 95.5 0.942 95.3 93.9 90.8 0.691 94.5 0.94 96.4 0.819 94.3 0.940 92.9 93.2 - Raw FB15k WN18 MR @10 MRR MR @10 MRR 273 28.8 1011 68.5 1074 4.5 315 35.3 274 30.7 545 65.1 212 45.7 401 73.0 198 48.2 238 79.8 199 48.4 231 79.4 174 48.9 342 80.2 194 53.4 224 79.6 195 53.0 283 80.5 203 52.8 483 81.4 187 53.5 223 80.1 188 53.9 234 81.4 0.189 0.603 0.222 0.351 0.232 0.616 0.242 0.587 0.253 0.657 0.256 0.619 219 51.6 0.252 217 80.9 0.469 124 54.7 207 51.4 242 50.6 228 44.5 0.262 0.561 212 51.2 127 80.3 163 57.2 168 81.2 - Table 3: Entity prediction results on WN18 and FB15k. MR and @10 denote evaluation metrics of mean rank and Hits@10 (in %), respectively. TransG’s results are taken from its latest ArXiv version (https://arxiv.org/abs/1509. 05488v7). NTN’s results are taken from Yang et al. (2015) since NTN was originally evaluated only for triple classification. [♥]: Results are taken from Nickel et al. (2016b). [♠]: Results are taken from Ravishankar et al. (2017). [♣]: Results are taken from Kadlec et al. (2017). In the first 26 rows, the best score is in bold, while the second and third best scores are in underline. In addition to the mean rank and the Hits@10 (i.e., the proportion of test triples for which the target entity was ranked in the top 10 predictions), which were originally used in the entity prediction task (Bordes et al., 2013), recent work also reports the mean reciprocal rank (MRR). In both “Raw” and “Filtered” settings, mean rank is always greater or equal to 1 and the lower mean rank indicates better entity prediction performance. MRR and Hits@10 scores always range Filtered Method IRN (Shen et al., 2017, Nov.) DISTMULT (Yang et al., 2015, Jul.-2017) [♦] ComplEx (Trouillon et al., 2016, Jul.-2017) [♦] ConvE (Dettmers et al., 2017, Jul.) TransE (Bordes et al., 2013, Dec.-2017) [H] ConvKB (Nguyen et al., 2017, Dec.) ER-MLP (Dong et al., 2014, Dec.-2017) [♠] Neural LP (Yang et al., 2017, Dec.) R-GCN+ (Schlichtkrull et al., 2017, Mar.) KBLRN (Durán and Niepert, 2017, Sep.) NLFeat (Toutanova and Chen, 2015, Jul.) C ONV-E+D (Toutanova et al., 2015, Sep.) MR 211 254 248 330 347 258 219 209 - FB15k-237 @10 MRR 46.4 41.9 0.241 41.9 0.240 45.8 0.301 46.4 0.294 51.7 0.396 54.0 0.342 36.2 0.24 41.7 0.249 49.3 0.309 46.2 0.293 58.1 0.401 MR 5110 5261 7323 3384 2604 4798 - WN18RR @10 MRR 49.1 0.425 50.7 0.444 41.1 0.342 50.1 0.226 52.5 0.248 41.9 0.366 - - Table 4: Entity prediction results on WN18RR and FB15k-237. [♦]: Results are taken from Dettmers et al. (2017). [H]: Results are taken from Nguyen et al. (2017). [♠]: Results are taken from Ravishankar et al. (2017). C ONVE+D denotes C ONV-E + C ONV-DISTMULT. Citations also include months for which results are published. from 0.0 to 1.0, and higher score reflects better prediction result. 3.1.2 Main results Table 3 lists entity prediction results of KB completion models on the FB15k and WN18 datasets. The first 26 rows report the performance of triplebased models that directly optimize a score function for the triples in a KB, i.e. they do not exploit information about alternative paths between head and tail entities. The next 9 rows report results of models that exploit information about relation paths. The last 3 rows present results for models which make use of textual mentions derived from a large external corpus. The reasons why much work has been devoted towards developing triple-based models are mentioned by Nguyen et al. (2016b) as follows: (1) additional information sources might not be available, e.g., for KBs for specialized domains, (2) models that do not exploit path information or external resources are simpler and thus typically much faster to train than the more complex models using path or external information, and (3) the more complex models that exploit path or external information are typically extensions of these simpler models, and are often initialized with parameters estimated by such simpler models, so improvements to the simpler models should yield corresponding improvements to the more complex models as well. Table 3 shows that the models using external corpus information or employing path information generally achieve better scores than the triple-based models that do not use such information. In terms of models not exploiting path or external information, on FB15k the IRN model (Shen et al., 2017) obtains highest scores, followed by DISTMULT (Yang et al., 2015), ProjE (Shi and Weninger, 2017) and ConvE (Dettmers et al., 2017). On WN18 top-4 triple-based models are ConvE, IRN, TorusE (Ebisu and Ichise, 2018) and ANALOGY (Liu et al., 2017). Table 4 lists recent results on datasets FB15k237 and WN18RR. On FB15k-237, by exploiting external textual mentions of entities, the C ONVE + C ONV-DISTMULT model (Toutanova et al., 2015) produces the highest Hits@10 and MRR. In terms of models not exploiting external textual information, on FB15k-237, ER-MLP (Dong et al., 2014) can be considered as the best model to date, followed by ConvKB (Nguyen et al., 2017) and KBLRN (Durán and Niepert, 2017). On WN18RR, ConvKB can be considered as the best one, followed by ComplEx (Trouillon et al., 2016) and TransE (Bordes et al., 2013). Clearly, tables 3 and 4 show that TransE, despite of its simplicity, can produce very competitive results (by performing a careful grid search of hyper-parameters). 3.2 3.2.1 Triple classification Task description The triple classification task was first introduced by Socher et al. (2013), and since then it has been used to evaluate various embedding models. The aim of this task is to predict whether a Method CTransR (Lin et al., 2015b) TransR (Lin et al., 2015b) TransD (Ji et al., 2015) TEKE H (Wang and Li, 2016) TranSparse-S (Ji et al., 2016) TranSparse-US (Ji et al., 2016) NTN (Socher et al., 2013) TransH (Wang et al., 2014) SLogAn (Liang and Forbus, 2015) KG2E (He et al., 2015) Bilinear-COMP (Guu et al., 2015) TransE-COMP (Guu et al., 2015) TransR-FT (Feng et al., 2016a) TransG (Xiao et al., 2016) lppTransD (Yoon et al., 2016) TransE (Bordes et al., 2013) [*] TransE-NMM (Nguyen et al., 2016a) TranSparse-DT (Chang et al., 2017) W11 85.7 85.9 86.4 84.8 86.4 86.8 70.6 78.8 75.3 85.4 77.6 80.3 86.6 87.4 86.2 85.2 86.8 87.1 F13 82.5 89.1 84.2 88.2 87.5 87.2 83.3 85.3 85.3 86.1 87.6 82.9 87.3 88.6 87.6 88.6 87.9 Avg. 84.2 87.8 84.5 87.3 87.2 78.9 81.1 80.3 85.4 81.9 84.0 84.8 87.4 87.4 86.4 87.7 87.5 Table 5: Accuracy results (in %) for triple classification on WN11 (labeled as W11) and FB13 (labeled as F13) test sets. “Avg.” denotes the averaged accuracy. [*]: TransE results are taken from Nguyen et al. (2016a). triple (h, r, t) is correct or not. For classification, a relation-specific threshold θr is set for each relation type r. If the implausibility score of an unseen test triple (h, r, t) is smaller than θr then the triple will be classified as correct, otherwise incorrect. Following Socher et al. (2013), the relationspecific thresholds are determined by maximizing the micro-averaged accuracy, which is a per-triple average, on the validation set. 3.2.2 Main results Table 5 presents the triple classification results of KB completion models on the WN11 and FB13 datasets. The first 6 rows report the performance of models that use TransE to initialize the entity and relation vectors. The last 12 rows present the accuracy of models with randomly initialized parameters. Note that there are higher results reported for NTN, Bilinear-COMP and TransECOMP when entity vectors are initialized by averaging the pre-trained word vectors (Mikolov et al., 2013; Pennington et al., 2014). It is not surprising as many entity names in WordNet and FreeBase are lexically meaningful. It is possible for all other embedding models to utilize the pre-trained word vectors as well. However, as pointed out by Wang et al. (2014) and Guu et al. (2015), averaging the pre-trained word vectors for initializing entity vectors is an open problem and it is not always useful since entity names in many domain-specific KBs are not lexically meaningful. 4 Conclusions and further discussion This article presented a brief overview of embedding models of entity and relationships for KB completion. The article also provided update-todate experimental results of the embedding models on the entity prediction and triple classification tasks on benchmark datasets FB15k, WN18, FB15k-237, WN18RR, FB13 and WN11. Dozens of embedding models have been proposed for KB completion, so it is worth to further explore these models for a new application where we could formulate its corresponding data into triples. For example of an interesting application, Vu et al. (2017) extended the STransE model (Nguyen et al., 2016b) for a search personalization task in information retrieval, to model useroriented relationships between submitted queries and documents returned by search engines. References Eneko Agirre, Oier López de Lacalle, and Aitor Soroa. 2013. Random Walks for Knowledge-Based Word Sense Disambiguation. Computational Linguistics 40(1):57–84. Jonathan Berant, Andrew Chou, Roy Frostig, and Percy Liang. 2013. Semantic Parsing on Freebase from Question-Answer Pairs. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing. pages 1533–1544. Kurt Bollacker, Colin Evans, Praveen Paritosh, Tim Sturge, and Jamie Taylor. 2008. Freebase: A Collaboratively Created Graph Database for Structuring Human Knowledge. In Proceedings of the 2008 ACM SIGMOD International Conference on Management of Data. pages 1247–1250. Antoine Bordes, Xavier Glorot, Jason Weston, and Yoshua Bengio. 2012. A Semantic Matching Energy Function for Learning with Multi-relational Data. Machine Learning 94(2):233–259. Antoine Bordes, Nicolas Usunier, Alberto GarciaDuran, Jason Weston, and Oksana Yakhnenko. 2013. Translating Embeddings for Modeling Multirelational Data. In Advances in Neural Information Processing Systems 26, pages 2787–2795. Antoine Bordes, Jason Weston, Ronan Collobert, and Yoshua Bengio. 2011. Learning Structured Embeddings of Knowledge Bases. In Proceedings of the Twenty-Fifth AAAI Conference on Artificial Intelligence. pages 301–306. Andrew Carlson, Justin Betteridge, Bryan Kisiel, Burr Settles, Jr. Estevam R. Hruschka, and Tom M. Mitchell. 2010. Toward an Architecture for Neverending Language Learning. In Proceedings of the Twenty-Fourth AAAI Conference on Artificial Intelligence. pages 1306–1313. L. Chang, M. Zhu, T. Gu, C. Bin, J. Qian, and J. Zhang. 2017. Knowledge Graph Embedding by Dynamic Translation. IEEE Access 5:20898–20907. Tim Dettmers, Pasquale Minervini, Pontus Stenetorp, and Sebastian Riedel. 2017. Convolutional 2D Knowledge Graph Embeddings. arXiv preprint abs/1707.01476. Xin Dong, Evgeniy Gabrilovich, Geremy Heitz, Wilko Horn, Ni Lao, Kevin Murphy, Thomas Strohmann, Shaohua Sun, and Wei Zhang. 2014. Knowledge vault: A web-scale approach to probabilistic knowledge fusion. In Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. pages 601–610. Alberto Garcı́a Durán and Mathias Niepert. 2017. KBLRN: End-to-end learning of knowledge base representations with latent, relational, and numerical features. arXiv preprint abs/1709.04676. Sourav Dutta and Gerhard Weikum. 2015. CrossDocument Co-Reference Resolution using SampleBased Clustering with Knowledge Enrichment. Transactions of the Association for Computational Linguistics 3:15–28. Takuma Ebisu and Ryutaro Ichise. 2018. TorusE: Knowledge Graph Embedding on a Lie Group. In Proceedings of the 32nd AAAI Conference on Artificial Intelligence. Anthony Fader, Luke Zettlemoyer, and Oren Etzioni. 2014. Open Question Answering over Curated and Extracted Knowledge Bases. In Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. pages 1156–1165. Christiane D. Fellbaum. 1998. WordNet: An Electronic Lexical Database. MIT Press. Jun Feng, Minlie Huang, Mingdong Wang, Mantong Zhou, Yu Hao, and Xiaoyan Zhu. 2016a. Knowledge graph embedding by flexible translation. In Principles of Knowledge Representation and Reasoning: Proceedings of the Fifteenth International Conference. pages 557–560. Jun Feng, Minlie Huang, Yang Yang, and xiaoyan zhu. 2016b. GAKE: Graph Aware Knowledge Embedding. In Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers. pages 641–651. David Angelo Ferrucci. 2012. Introduction to ”This is Watson”. IBM Journal of Research and Development 56(3):235–249. Alberto Garcı́a-Durán, Antoine Bordes, and Nicolas Usunier. 2015. Composing Relationships with Translations. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing. pages 286–290. Alberto Garcı́a-Durán, Antoine Bordes, Nicolas Usunier, and Yves Grandvalet. 2016. Combining Two and Three-Way Embedding Models for Link Prediction in Knowledge Bases. Journal of Artificial Intelligence Research 55:715–742. Matt Gardner and Tom Mitchell. 2015. Efficient and Expressive Knowledge Base Completion Using Subgraph Feature Extraction. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing. pages 1488–1498. Matt Gardner, Partha P. Talukdar, Jayant Krishnamurthy, and Tom M. Mitchell. 2014. Incorporating Vector Space Similarity in Random Walk Inference over Knowledge Bases. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing. pages 397–406. Kelvin Guu, John Miller, and Percy Liang. 2015. Traversing Knowledge Graphs in Vector Space. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing. pages 318–327. Shizhu He, Kang Liu, Guoliang Ji, and Jun Zhao. 2015. Learning to Represent Knowledge Graphs with Gaussian Embedding. In Proceedings of the 24th ACM International on Conference on Information and Knowledge Management. pages 623–632. Rodolphe Jenatton, Nicolas L. Roux, Antoine Bordes, and Guillaume R Obozinski. 2012. A latent factor model for highly multi-relational data. In Advances in Neural Information Processing Systems 25, pages 3167–3175. Guoliang Ji, Shizhu He, Liheng Xu, Kang Liu, and Jun Zhao. 2015. Knowledge Graph Embedding via Dynamic Mapping Matrix. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers). pages 687–696. Guoliang Ji, Kang Liu, Shizhu He, and Jun Zhao. 2016. Knowledge Graph Completion with Adaptive Sparse Transfer Matrix. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence. pages 985–991. Rudolf Kadlec, Ondrej Bajgar, and Jan Kleindienst. 2017. Knowledge Base Completion: Baselines Strike Back. In Proceedings of the 2nd Workshop on Representation Learning for NLP. pages 69–74. Jayant Krishnamurthy and Tom Mitchell. 2012. Weakly Supervised Training of Semantic Parsers. In Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning. pages 754–765. Denis Krompaß, Stephan Baier, and Volker Tresp. 2015. Type-Constrained Representation Learning in Knowledge Graphs. In Proceedings of the 14th International Semantic Web Conference, pages 640– 655. Ni Lao and William W. Cohen. 2010. Relational retrieval using a combination of path-constrained random walks. Machine Learning 81(1):53–67. Ni Lao, Tom Mitchell, and William W. Cohen. 2011. Random Walk Inference and Learning in a Large Scale Knowledge Base. In Proceedings of the Conference on Empirical Methods in Natural Language Processing. pages 529–539. Jens Lehmann, Robert Isele, Max Jakob, Anja Jentzsch, Dimitris Kontokostas, Pablo N. Mendes, Sebastian Hellmann, Mohamed Morsey, Patrick van Kleef, Sören Auer, and Christian Bizer. 2015. DBpedia - A Large-scale, Multilingual Knowledge Base Extracted from Wikipedia. Semantic Web 6(2):167– 195. Chen Liang and Kenneth D. Forbus. 2015. Learning Plausible Inferences from Semantic Web Knowledge by Combining Analogical Generalization with Structured Logistic Regression. In Proceedings of the Twenty-Ninth AAAI Conference on Artificial Intelligence. pages 551–557. Yankai Lin, Zhiyuan Liu, Huanbo Luan, Maosong Sun, Siwei Rao, and Song Liu. 2015a. Modeling Relation Paths for Representation Learning of Knowledge Bases. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing. pages 705–714. Yankai Lin, Zhiyuan Liu, Maosong Sun, Yang Liu, and Xuan Zhu. 2015b. Learning Entity and Relation Embeddings for Knowledge Graph Completion. In Proceedings of the Twenty-Ninth AAAI Conference on Artificial Intelligence Learning, pages 2181–2187. Hanxiao Liu, Yuexin Wu, and Yiming Yang. 2017. Analogical Inference for Multi-relational Embeddings. In Proceedings of the 34th International Conference on Machine Learning. pages 2168–2178. Qiao Liu, Liuyi Jiang, Minghao Han, Yao Liu, and Zhiguang Qin. 2016. Hierarchical Random Walk Inference in Knowledge Graphs. In Proceedings of the 39th International ACM SIGIR Conference on Research and Development in Information Retrieval. pages 445–454. Yuanfei Luo, Quan Wang, Bin Wang, and Li Guo. 2015. Context-Dependent Knowledge Graph Embedding. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing. pages 1656–1661. Sahisnu Mazumder and Bing Liu. 2017. Contextaware Path Ranking for Knowledge Base Completion. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence. pages 1195–1201. Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. 2013. Distributed Representations of Words and Phrases and their Compositionality. In Advances in Neural Information Processing Systems 26, pages 3111–3119. George A. Miller. 1995. WordNet: A Lexical Database for English. Communications of the ACM 38(11):39–41. Roberto Navigli and Paola Velardi. 2005. Structural Semantic Interconnections: A Knowledge-Based Approach to Word Sense Disambiguation. IEEE Transactions on Pattern Analysis and Machine Intelligence 27(7):1075–1086. Arvind Neelakantan, Benjamin Roth, and Andrew McCallum. 2015. Compositional Vector Space Models for Knowledge Base Completion. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers). pages 156–166. Dai Quoc Nguyen, Tu Dinh Nguyen, Dat Quoc Nguyen, and Dinh Phung. 2017. A Novel Embedding Model for Knowledge Base Completion Based on Convolutional Neural Network. arXiv preprint abs/1712.02121. Dat Quoc Nguyen, Kairit Sirts, Lizhen Qu, and Mark Johnson. 2016a. Neighborhood Mixture Model for Knowledge Base Completion. In Proceedings of The 20th SIGNLL Conference on Computational Natural Language Learning. pages 40–50. Dat Quoc Nguyen, Kairit Sirts, Lizhen Qu, and Mark Johnson. 2016b. STransE: a novel embedding model of entities and relationships in knowledge bases. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. pages 460–466. Maximilian Nickel, Kevin Murphy, Volker Tresp, and Evgeniy Gabrilovich. 2016a. A Review of Relational Machine Learning for Knowledge Graphs. Proceedings of the IEEE 104(1):11–33. Maximilian Nickel, Lorenzo Rosasco, and Tomaso Poggio. 2016b. Holographic embeddings of knowledge graphs. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence. pages 1955– 1961. Maximilian Nickel, Volker Tresp, and Hans-Peter Kriegel. 2011. A Three-Way Model for Collective Learning on Multi-Relational Data. In Proceedings of the 28th International Conference on Machine Learning. pages 809–816. Mathias Niepert. 2016. Discriminative Gaifman Models. In Advances in Neural Information Processing Systems 29, pages 3405–3413. Jeffrey Pennington, Richard Socher, and Christopher Manning. 2014. Glove: Global Vectors for Word Representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing. pages 1532–1543. Simone Paolo Ponzetto and Michael Strube. 2006. Exploiting Semantic Role Labeling, WordNet and Wikipedia for Coreference Resolution. In Proceedings of the Human Language Technology Conference of the NAACL, Main Conference. pages 192– 199. Srinivas Ravishankar, Chandrahas, and Partha Pratim Talukdar. 2017. Revisiting Simple Neural Networks for Learning Representations of Knowledge Graphs. In Proceedings of the 6th Workshop on Automated Knowledge Base Construction. Michael Sejr Schlichtkrull, Thomas N. Kipf, Peter Bloem, Rianne van den Berg, Ivan Titov, and Max Welling. 2017. Modeling Relational Data with Graph Convolutional Networks. arXiv preprint abs/1703.06103. Yelong Shen, Po-Sen Huang, Ming-Wei Chang, and Jianfeng Gao. 2017. Modeling Large-Scale Structured Relationships with Shared Memory for Knowledge Base Completion. In Proceedings of the 2nd Workshop on Representation Learning for NLP. pages 57–68. Baoxu Shi and Tim Weninger. 2017. ProjE: Embedding Projection for Knowledge Graph Completion. In Proceedings of the 31st AAAI Conference on Artificial Intelligence. Richard Socher, Danqi Chen, Christopher D Manning, and Andrew Ng. 2013. Reasoning With Neural Tensor Networks for Knowledge Base Completion. In Advances in Neural Information Processing Systems 26, pages 926–934. Fabian M. Suchanek, Gjergji Kasneci, and Gerhard Weikum. 2007. YAGO: A Core of Semantic Knowledge. In Proceedings of the 16th International Conference on World Wide Web. pages 697–706. Kristina Toutanova, Danqi Chen, Patrick Pantel, Hoifung Poon, Pallavi Choudhury, and Michael Gamon. 2015. Representing Text for Joint Embedding of Text and Knowledge Bases. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing. pages 1499–1509. Kristina Toutanova, Victoria Lin, Wen-tau Yih, Hoifung Poon, and Chris Quirk. 2016. Compositional Learning of Embeddings for Relation Paths in Knowledge Base and Text. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). pages 1434–1444. Théo Trouillon, Johannes Welbl, Sebastian Riedel, Éric Gaussier, and Guillaume Bouchard. 2016. Complex Embeddings for Simple Link Prediction. In Proceedings of the 33nd International Conference on Machine Learning. pages 2071–2080. Thanh Vu, Dat Quoc Nguyen, Mark Song, and Alistair Willis. 2017. alization with Embeddings. In the 39th European Conference on trieval. pages 598–604. Johnson, Dawei Search PersonProceedings of Information Re- Quan Wang, Jing Liu, Yuanfei Luo, Bin Wang, and Chin-Yew Lin. 2016. Knowledge Base Completion via Coupled Path Ranking. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). pages 1308–1318. Zhen Wang, Jianwen Zhang, Jianlin Feng, and Zheng Chen. 2014. Knowledge Graph Embedding by Translating on Hyperplanes. In Proceedings of the Twenty-Eighth AAAI Conference on Artificial Intelligence, pages 1112–1119. Zhigang Wang and Juan-Zi Li. 2016. Text-Enhanced Representation Learning for Knowledge Graph. In Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence. pages 1293– 1299. Zhuoyu Wei, Jun Zhao, and Kang Liu. 2016. Mining Inference Formulas by Goal-Directed Random Walks. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing. pages 1379–1388. Robert West, Evgeniy Gabrilovich, Kevin Murphy, Shaohua Sun, Rahul Gupta, and Dekang Lin. 2014. Knowledge Base Completion via Searchbased Question Answering. In Proceedings of the 23rd International Conference on World Wide Web. pages 515–526. Yi Tay, Anh Tuan Luu, Siu Cheung Hui, and Falk Brauer. 2017. Random Semantic Tensor Ensemble for Scalable Knowledge Graph Link Prediction. In Proceedings of the Tenth ACM International Conference on Web Search and Data Mining. pages 751– 760. Jason Weston and Antoine Bordes. 2014. Embedding Methods for NLP. In EMNLP 2014 tutorial. Kristina Toutanova and Danqi Chen. 2015. Observed Versus Latent Features for Knowledge Base and Text Inference. In Proceedings of the 3rd Workshop on Continuous Vector Space Models and their Compositionality. pages 57–66. Han Xiao, Minlie Huang, and Xiaoyan Zhu. 2016. TransG : A Generative Model for Knowledge Graph Embedding. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). pages 2316–2325. Han Xiao, Minlie Huang, and Xiaoyan Zhu. 2017. SSP: semantic space projection for knowledge graph embedding with text descriptions. In Proceedings of the 31st AAAI Conference on Artificial Intelligence. Qizhe Xie, Xuezhe Ma, Zihang Dai, and Eduard Hovy. 2017. An Interpretable Knowledge Transfer Model for Knowledge Base Completion. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). pages 950–962. Bishan Yang, Wen-tau Yih, Xiaodong He, Jianfeng Gao, and Li Deng. 2015. Embedding Entities and Relations for Learning and Inference in Knowledge Bases. In Proceedings of the International Conference on Learning Representations. Fan Yang, Zhilin Yang, and William W Cohen. 2017. Differentiable Learning of Logical Rules for Knowledge Base Reasoning. In Advances in Neural Information Processing Systems 30, pages 2316–2325. Hee-Geun Yoon, Hyun-Je Song, Seong-Bae Park, and Se-Young Park. 2016. A Translation-Based Knowledge Graph Embedding Preserving Logical Property of Relations. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. pages 907–916.
2cs.AI
manuscript No. (will be inserted by the editor) Indoor UAV scheduling with Restful Task Assignment Algorithm Yohanes Khosiawan · Izabela Nielsen arXiv:1706.09737v1 [cs.AI] 29 Jun 2017 Received: date / Accepted: date Abstract Research in UAV scheduling has obtained an emerging interest from scientists in the optimization field. When the scheduling itself has established a strong root since the 19th century, works on UAV scheduling in indoor environment has come forth in the latest decade. Several works on scheduling UAV operations in indoor (two and three dimensional) and outdoor environments are reported. In this paper, a further study on UAV scheduling in three dimensional indoor environment is investigated. Dealing with indoor environment—where humans, UAVs, and other elements or infrastructures are likely to coexist in the same space—draws attention towards the safety of the operations. In relation to the battery level, a preserved battery level leads to safer operations, promoting the UAV to have a decent remaining power level. A methodology which consists of a heuristic approach based on Restful Task Assignment Algorithm, incorporated with Particle Swarm Optimization Algorithm, is proposed. The motivation is to preserve the battery level throughout the operations, which promotes less possibility in having failed UAVs on duty. This methodology is tested with 54 benchmark datasets stressing on 4 different aspects: geographical distance, number of tasks, number of predecessors, and slack time. The test results and their characteristics in regard to the proposed methodology are discussed and presented. Keywords UAV scheduling · Indoor UAV · Safe UAV · Heuristic · Particle swarm optimization 1 Introduction In the recent years, there has been a remarkable rise of applications and research interests in UAVs. Outdoor UAV operations has been applied through various domains and enabling systems such as [1, 15, 17, 18, 22], while reported works on UAV operations for indoor environment [9] are still limited. However, there is an Y. Khosiawan · I. Nielsen ( ) Department of Materials and Production Aalborg University, Aalborg 9220, Denmark E-mail: {yok, izabela}@make.aau.dk 2 Yohanes Khosiawan, Izabela Nielsen emerging demand to employ UAVs for indoor operations [9]. For instance, UAVs can be utilized to perform tasks such as inspection and material handling in a manufacturing environment. To fulfill such tasks, the UAV is equipped with an imaging device and a gripper. UAVs perform the tasks at the designated positions with the required equipment. The execution manner of these tasks also considers the total makespan or/and battery consumption. To accomplish such a goal, a schedule of task executions needs to be generated, and the respective instructions to be sent to the UAVs. During the schedule generation, several constraints need to be satisfied to produce a feasible schedule. The scheduling problem in this paper includes an optimization problem of assigning execution time of tasks in respect to the available limited resources such as UAVs and positions, whose class has been proven to be NP-hard [8]. Furthermore, the planning horizon may include non-determined recharge actions (as needed) during the operations. Unlike in [10], a variable recharge time is employed in this paper. Any sufficient time range (over the defined threshold) can be used for performing a recharge. Apart from that, other actions such as hover and wait on ground may also be included to represent feasible operations. In such a problem, obtaining an optimum solution takes a non-linear computation time in regard to the problem scale. During the numerical experiments (Section 5), benchmark datasets on both lab scale and industrial scale indoor environments are used. In the lab scale environment itself, with small numbers of tasks, hours of computation time are shown insufficient to complete the optimization process. This entails the need of a heuristic-based approach, where a near optimum (good quality feasible) solution is able to be obtained in a reasonable amount of time. Such computation time, together with the exponentially growing one obtained from experiments with IBM ILOG CPLEX, are presented in Section 5. In [10], the authors developed a methodology which includes the earliest available time heuristic which is incorporated with a metaheuristic algorithm called Particle Swarm Optimization (PSO) to obtain a good quality feasible solution in a quick computation time. The objective in [10] is to find a minimized total makespan. Meanwhile in this paper, the objective of the optimization is to minimize the total energy consumption. The tasks are given time windows, from which can be inferred that as long as the time window constraints are not violated, the execution of the following business process will not be delayed. Hence, optimizing battery consumption become relevant to keep the operational cost minimum, while inducing short flight paths simultaneously. This objective is associated with the awareness of keeping the battery level preserved achieved through the Restful Task Assignment Algorithm (RTAA). Battery is the source of life for the UAV, where battery failure may lead to the failure of the task and the UAV itself. In addition, the map of the operational environment is constructed with directed paths, where the layout is designed to support collision avoidance throughout the operations (described in Section 3). The main contributions in this work are described as follows. 1. Developed a methodology for safe scheduling which includes: – a novel heuristic based on RTAA for constructing a schedule from a task sequence RTAA promotes the preserved battery level of the UAVs throughout the operations. The tendency of the preserved battery level avoids UAVs from Indoor UAV scheduling with Restful Task Assignment Algorithm 3 suddenly dropping out of the game due to an unforeseen marginal remaining battery level. – an incorporation of RTAA-based heuristic with PSO to obtain a good quality feasible solution in a short computation time PSO parameters used in Section 5 are inspired by the pilot study in [10], where parameter analysis was extensively performed. – a directed-path three-dimensional indoor environment map The tasks are to be executed in a particular three-dimensional indoor environment, which is defined in a map. In the map, the paths are constructed in a directed manner, also in coherent with the UAV flying behavior, which altogether supports collision avoidance during the operations. 2. Performed numerical experiments and analysis on the characteristics of the resulting schedules on multiple datasets. There are 54 benchmark datasets stressing on different aspects, i.e. geographical distance, number of tasks, number of predecessors, and slack time. The characteristics analyzed from the resulting schedules are the total energy consumption, makespan, and computation time. The remainder of this paper is organized as follows. In Section 2, some related works on scheduling tasks with time windows and UAV scheduling in indoor environment are reviewed. Then, in Section 3, the formulation of the problem in this paper is presented. In Section 4, RTAA and its incorporation with PSO are described. Afterwards, the conducted numerical experiment is presented and analyzed in Section 5, followed with the conclusion in Section 6. 2 Literature review Scheduling has been a consistently demanding research interest which involves numerous scientists and specific problems in the optimization area. In 1988, a study on deciding the minimum fleet size for minimum traveling salesman problem with time windows [5] was conducted to be integrated into the previous related work [6] in 1986. The evaluation of the optimum number of fleet at the first node of a branch-and-bound tree will reduce the number of infeasible routes and the size of the tree to be explored. This approach, wherein an optimal solution is aimed at, is suitable for scheduling tasks significantly prior to the execution where changes towards the schedule during the execution are less likely to happen, e.g. in school bus transportation problem. When different numerous tasks are performed by multiple agents on a daily basis, where the tasks may come until right before the operation is started, a non-exhaustive near optimal search within a short time becomes more practical. A work on optimization using column generation approach for the vehicle routing problem with time windows [3] was carried out in 1992, where four essential rules for reducing the time window width were introduced as a part of the methodology. Rules 2 and 3 can be applied when there is only a single agent or there is no position occupation during the task execution. For instance, when a time window of a predecessor is trimmed upfront because the successor cannot be started sooner anyway (regardless of the predecessor’s sooner completion time), the required position to be accessed may be occupied by another agent later. Executing the predecessor earlier (and the successor is not immediately executed afterwards) may become its only option to satisfy the given time window constraint. In regard 4 Yohanes Khosiawan, Izabela Nielsen to rule 1 and 4, the respective time window examples in [3] which may lead to some unfeasible task assignments is not the focus of this paper, and hence such a condition is not reflected in the benchmark datasets (they are discussed later in Section 5). In the following years, heuristic-based approach is viewed to remain as a viable alternative for solving large-scale optimization problem in a short time [4]. For scheduling problem with time windows, a study on backtracking techniques for the job shop scheduling constraint satisfaction problem was conducted. To come up with a feasible solution as fast as possible, one essential remark to keep in mind is the expensive computation when a large complex conflict is met, for proving that some particular assignments need to be undone. The beginning of aircraft scheduling problem [2] was mainly flagged in 1997, using branch-and-bound approach supported by column generation technique. The goal is to gain a substantial profit improvement over the existing airline’s solution. The nature of such problem allows a longer computation time which is deemed reasonable. Recently, the application of aircraft has been widely explored, especially Unmanned Aerial Vehicle (UAV) into various application domains in both outdoor and indoor environments [9]. It can be deduced that a system of UAV application mainly comprises environment (mapping and positioning system), Unmanned Aerial System (UAV, ground station, control module), and task (scheduling). Those elements are affecting while enabling one another simultaneously. One problem instance of such kind involves numerous tasks and constraints to be considered in the scheduling process. This brings the appeal of heuristicbased approach being able to solve the problem with a good quality feasible solution in a reasonable time. A modified receding horizon task assignment heuristic which focuses on scheduling split jobs of long surveillance missions to maintain a persistent UAV operations was conducted [11], where an indoor system prototype was tested in [19]. Another heuristic-based is also used for UAV scheduling in two-dimensional environment with no constraint [16]. Under the metaheuristic family, PSO has been investigated for job shop and flexible manufacturing (where the employment of unmanned vehicles is found) scheduling problems in [10,13,14], and it is postulated to be effective and efficient. Such a metaheuristic algorithm is fast and easy to implement [13, 20]. Such an approach towards multiple tasks scheduling problem for UAV operations in indoor environment was piloted in [10]. The objective is to produce a schedule with a minimized total makespan in a short time. The pilot work serves as the ground to identify further issues and the respective solution - which are discussed in the following sections in this paper. 3 Problem definition Numerous task executions by UAVs in indoor environment require a thorough scheduling mechanism to reduce cost (e.g. time and energy) and promote safety towards both the users (human-labors) and the system itself (e.g. UAVs, indoor infrastructure). In the previous work [10], the total time of the operation is sought to be minimized to save both time and financial cost, and to allow the following business process to continue (e.g. surface inspections of the wind turbine blades need to be done before the trucks are booked for transporting them). In this study, the goal is to produce a schedule of task executions with a minimized total Indoor UAV scheduling with Restful Task Assignment Algorithm 5 energy consumption and preserve the battery level throughout the operations. Additionally, a task has a time window attribute, in which the task must be executed. Furthermore, when dealing with UAVs in indoor environment, no sudden out-of-power is expected since it may lead to human injuries or infrastructure damages. Complying to these conditions, a new heuristic-based method which minimizes the total battery consumption with the awareness of keeping the battery level preserved is required; not strictly utilizing the UAV without recharge until the battery is depleted. This is the limitation that is exposed in [10], where a full recharge is done only when the battery is completely or nearly depleted that the UAV can’t perform its following action. An instance of a task dataset is depicted in Table 1. Each task data consists of a task identifier, a start position, an end position (if it is an inspection task, then the value is the same as the start position; i.e. task 1 , 2 , 5 , 7 , 8 ), a processing time, a release date, a due date, and a predecessor list. In this study, the benchmark datasets used in Section 5 are tasks with time windows, while a support for assigning tasks without time window is induced in the proposed methodology - discussed later in Section 4. A characteristic which is introduced by the time window attribute is slack time. Slack time indicates the room where the execution time may be shifted around within the time window. For instance, task 10 in Table 1 has a time window of 281 seconds from 726∼1007, and a slack time of (281-44=)237 seconds—since the processing time of task 10 is 44 seconds. Table 1: Example of task dataset with 10 tasks Task ID Start Position Processing Time End Position Release date Due date Predecessor (Task ID) 1 2 3 4 5 6 7 8 9 10 c3 c1 d4 e2 d4 f1 d1 b3 c4 a2 c3 c1 f2 b2 d4 e2 d1 b3 b3 c2 10 10 39 42 10 35 10 10 35 44 726 1007 1429 827 0 1428 1007 292 382 726 1077 1379 1745 1230 382 1843 1429 726 827 1007 8 10 7 9 7 9;10 5 8 There are two types of task: inspection and material handling tasks. They expose 3 types of actions: perform task - material handling, perform task - inspection, and fly to. On top of that, there are 3 additional types of action that the UAV perform throughout the operations: hover, wait on ground, and recharge. Those actions are depicted in Table 2. The time for performing material handling is composite, where it comprises 30 seconds for loading and unloading the payload, and a variable flying time from the start to the end position. Such a level of task abstraction is needed to reduce the complexity of the computation. Throughout the operations, actions of perform task (material handling and inspection), fly to, and hover are the contributing factors in the battery consumption. 6 Yohanes Khosiawan, Izabela Nielsen Table 2: Action types Action Type Execution time (s) Perform task - material handling Perform task - inspection Fly to Hover Wait on ground Recharge 30 + $fly to$ 10 (as defined in the map) (as required) (as required) ≥270 Furthermore, an example of schedule which describes the solution representation for the addressed problem is depicted in Figure 1. It corresponds to the task dataset in the aforementioned Table 1. A schedule consists of the assigned tasks and the other actions, whose composition conforms to the UAV state machine depicted in Figure 2. Upon the completion of its last task, the UAV goes back to a nearest recharge station by default - such an action is not included in the schedule, while the assurance of having enough battery to go back is taken into account the imposing mechanism is explained later in Section 4.2. Schedule: { UAV 1 = [WoG(0-1051), to_c3(1051-1067), 1(1067-1077)], UAV 2 = [WoG(0-704), to_b3(704-716), 8(716-726), to_a2(726-732), H(732-963), 10(963-1007), to_R1_LDG(1007-1023), R(10231355), to_c1(1355-1369), 2(1369-1379)], UAV 3 = [WoG(0-348), to_d4(348-372), 5(372-382), to_R2_LDG(382-391), R(391-488), WoG(488-770), to_c4(770-792), 9(792-827), to_R1_LDG(827-835), R(835-982), WoG(982-1166), to_e2(11661188), 4(1188-1230)], UAV 4 = [WoG(0-1402), to_d1(1402-1419), 7(1419-1429), to_d4(14291432), H(1432-1706), 3(1706-1745)], UAV 5 = [WoG(0-1784), to_f1(1784-1808), 6(1808-1843)] } Fig. 1: Representation of schedule of the UAV operations /ĚůĞ ƚĂŬĞŽĨĨ ůĂŶĚ ƐƚĂŶĚďLJ ĨůLJ tĂŝƚŝŶŐŽŶŐƌŽƵŶĚ ƚĂŬĞŽĨĨ ƐƚĂŶĚďLJ ZĞĐŚĂƌŐŝŶŐ ƉĞƌĨŽƌŵƚĂƐŬ &ůLJŝŶŐ ƚŽ ŚŽǀĞƌ ůĂŶĚ ĨůLJ ,ŽǀĞƌŝŶŐ WĞƌĨŽƌŵŝŶŐƚĂƐŬ ;ŝ͘Ğ͘ŵĂƚĞƌŝĂů ŚĂŶĚůŝŶŐ͕ŝŶƐƉĞĐƚŝŽŶͿ ƉĞƌĨŽƌŵƚĂƐŬ Fig. 2: State machine of the UAV throughout the operations Indoor UAV scheduling with Restful Task Assignment Algorithm 7 The scenarios of the UAV operations are conducted in both lab scale and industrial scale indoor environments. The lab scale indoor environment is depicted in Figure 3. Each location of interest is indicated by a letter, where positions in the same location are distinguished by a number (following the letter). The green nodes are the recharge locations, where recharge actions take place. The established directed paths (illustrated in Figure 4b) are also designed to avoid potential deadlock or collision. This means, with a sensor detecting the area forward where the UAV is going to fly, a short wait upon another UAV ahead will avoid collision among UAVs. In another word, such a situation in Figure 4a does not happen, where the UAVs collide or wait for one another continuously (deadlock). UAV 2 UAV 2 UAV 1 Potential deadlock or collision 0.5 m UAV 1 (b) (a) Fig. 4: Potentially problematic non-directed paths environment (4a) and a more robust directed paths environment (4b) The constraints of the task scheduling problem in this study are mentioned as follows. 1. A task is executed once by one UAV. 2. A task is executed within the given time window. 3. A recharge station can be occupied by multiple UAVs. The recharge station has no limited space due to the technology advancement in the space efficient battery recharge or even replacement platform [21], and a small size of UAV fleet (e.g. ≤10) may cover the most instances of UAV application in indoor environment. The recharge time for a depleted battery with the capacity of 20 minutes is 45 minutes. 4. A non-recharge-station position can be occupied by at most one UAV at a particular time. 5. A UAV can only execute at most one task at a time. 6. A UAV may only land at a recharge station. 7. The battery level of a UAV must never be depleted at any non-recharge-station position. 8. The battery of each UAV is fully charged in the beginning of the planning horizon. 9. A task can only be executed after all its predecessors are completed. 10. There is no cyclic nor redundant precedence relationship. Notations i, j : index of task k : index of UAV 8 Yohanes Khosiawan, Izabela Nielsen (a) Positioning-system-based representation (b) Real-world representation Fig. 3: Lab scale indoor environment for the UAV operations l, l0 : index of position r : number of recharge stations hi : the index of nearest recharge station from the end position of task i R : set of recharge stations; R = 1, 2, ..r N : set of tasks; N = 1, 2, ..n V : set of UAVs; V = 1, 2, ..v a0i : release time of task i z0i : due time of task i Indoor UAV scheduling with Restful Task Assignment Algorithm 9 wi : processing time of task i si : start position of task i sk0 : initial position of UAV k ei : end position of task i dij : task i is preceded by task j 0 tll : travel time from l to l0 i ch l : travel time from l to recharge station hi α : maximum battery capacity (α = 1200) γ : one full cycle of recharge time Decision variables ai : start time of task i zi : end time of task i bik : battery level of UAV k before executing task i ( 1 0 if task i is executed by UAV k otherwise ( 1 0 if recharge is done by UAV k before executing task i otherwise xki = yik = ( oij = ( pi = 1 0 1 0 if task i is operationally preceded by another task otherwise ( x0kij 1 0 = qij = ukij = if task i and j are executed by the same UAV otherwise   1 if a recharge is conducted by UAV k before task i is executed and task i is operationally preceded by task j otherwise 1 0   1  0 ( mki = if task i and j are executed by UAV k otherwise (  0 k vij = if task i is operationally preceded by task j otherwise 1 0 if no recharge is conducted before task i is executed by UAV k and task i is operationally preceded by task j otherwise if a flight is required from sk0 before UAV k executes task i otherwise fj : start time of a task which is operationally preceded by task j f 0kij : ai which is penalized with a large value M when ai ≤ zj or task i (or j) is 10 Yohanes Khosiawan, Izabela Nielsen not executed by UAV k ( f 00ij = 1 0 if ai < zj otherwise k gij : battery consumption when no recharge takes place before the execution of task i, which is preceded by j, by UAV k E : total battery consumption Note: Task i is operationally preceded by task j if task i is scheduled to be executed right after task j by the same UAV; it is different from precedence rule. Indoor UAV scheduling with Restful Task Assignment Algorithm 11 Objective function: minimize E Subject to: 1 - end time is the summation of start time and processing time of the task ∀i ∈ N zi = ai + wi (1) 2 - the start time and end time of a task shall not violate its time window ai ≥ a0i ∀i ∈ N (2) zi ≤ z0i ∀i ∈ N (3) 3 - every task is executed once by one UAV X xki = 1 ∀i ∈ N (4) k∈V 4 - a UAV can only execute one task at a time ai ≥ zj kzi ≤ aj ∀i, j ∈ N, i 6= j, x0kij = 1 x0kij ≥ xki + xkj − 1 ∀i, j ∈ N, i 6= j, ∀k ∈ V (5) (6) x0kij ≤ xki ∀i, j ∈ N, i 6= j, ∀k ∈ V (7) x0kij ≤ xkj ∀i, j ∈ N, i 6= j, ∀k ∈ V (8) qij = X x0kij ∀i, j ∈ N (9) ∀i ∈ N, ∀k ∈ V (10) k∈V yik ≤ xki 5 - battery condition that will trigger recharge as necessary k i bik − (wi + ch ei )xi ≥ 0 i bjk − (zi − aj ) − ch ei ≥ 0 ∀i ∈ N, hi ∈ R k ∀i, j ∈ N, ∀k ∈ V, vi,j =1 (11) (12) 12 Yohanes Khosiawan, Izabela Nielsen 6 - no multiple tasks are executed at the same position at a particular time ai ≥ zj ||zi ≤ aj ∀i, j ∈ N, bmin(si , sj )/ max(si , sj )c = 1, i 6= j (13) 7 - define what recharge does to the battery level and how the battery is consumed h bik = (α − csij ) ∀i, j ∈ N, ukij = 1 bik = bjk − (ai − aj ) ukij ≥ oij + yik − 1 k ukij + vij ≤ oij k ∀i, j ∈ N, vij =1 (14) (15) ∀i, j ∈ N, ∀k ∈ V (16) ∀i, j ∈ N, ∀k ∈ V k ≥ oij + xki − yik − 1 vij k gij ≥ zi − aj , ∀j ∈ N, hj ∈ R (17) ∀i, j ∈ N, ∀k ∈ V (18) k ∀i, j ∈ N, ∀k ∈ V, vij =1 (19) 8 - set the battery to be consumed for the flight from the UAV’s initial position towards the first task; which is an exception case to the defined constraints for battery consumption in 14 and 15. bik = α − tssik 0 mki ≥ xki − pi ∀i, j ∈ N, ∀k ∈ V, pi = 0, xki = 1 (20) ∀i, j ∈ N, ∀k ∈ V, pi = 0, xki = 1 (21) 9 - determine the start time of a task which is the first task of a particular UAV tssik ∗ mki ≤ ai ∀i ∈ N, ∀k ∈ V (22) 0 10 - operational precedence relationship indicates task i is executed right after task j by the same UAV; j operationally precedes i oij ≥ −ai + fj − f 00ij 2M − (2 − xki − xkj )2M + 1 ∀i, j ∈ N, ∀k ∈ V oij ≤ qij ∀i, j ∈ N (23) (24) Indoor UAV scheduling with Restful Task Assignment Algorithm fj = min i∈N,k∈V f 0kij ∀j ∈ N (25) f 0kij = ai + f 00ij M + (2 − xki − xkj )M f 00ij = 1 − (ai ≥ zj ) 13 ∀i, j ∈ N, ∀k ∈ V ∀i, j ∈ N (26) (27) 11 - a task can operationally precede and be operationally preceded by at most one other task X (1 − pi ) ≤ v (28) oij ≤ 1 (29) i∈N X ∀j ∈ N i∈N pi = X ∀i ∈ N oij (30) j∈N 12 - no self operational-precedence oii = 0 ∀i ∈ N (31) 13 - no cyclic operational-precedence oij + oji ≤ 1 ∀i, j ∈ N (32) 14 - guaranteed feasible recharge time in the schedule h h k ) + (cejj + γ + csij )ukij ≤ ai zj + tseij (vij ∀i, j ∈ N, ∀k ∈ V, oij = 1, ∀hj ∈ R (33) 15 - precedence constraint ai ≥ zj dij ∀i, j ∈ N (34) 16 - the sum of all UAVs’ battery consumption does not exceed the total battery consumption X X i∈N k∈V (( X j∈N h h k + ukij ∗ (cejj + wi + csij )) + mki ∗ (tssik + wi )) ≤ E gij (35) 0 The developed MILP model is solved for small-scale problems, and the data is shown later in Section 5. The exponentially growing computation time indicates the need of a heuristic-based approach which is capable of solving the large-scale problem within a reasonable amount of time. Such a methodology is developed in this study, and it is discussed in the following section. 14 Yohanes Khosiawan, Izabela Nielsen 4 Methodology The proposed Restful Task Assignment Algorithm is described through Algorithm 3∼5 later in this section. To help to minimize the battery consumption while parallelizing task executions when deemed fit (which may lead to a shorter total execution time), Algorithm 3 is presented. The time window attribute on the task encourages the usage of Algorithm 4: Backward Fragment Placement Algorithm (BFPA) to quickly find a feasible solution if it exists and increase the system’s robustness. Moreover, this method tends to preserve the battery level, since some empty time ranges in between the task executions can be used for having recharge actions. The detailed procedure is described in Section 4.2. A support for assigning tasks which couldn’t be assigned in BFPA and those without time window is provided by Algorithm 5: Forward Fragment Placement Algorithm (FFPA). In respect to the route query between positions, Dijkstra’s Algorithm [7] is employed in the map module. RTAA is then incorporated with Particle Swarm Optimization (PSO), where task sequences from the initial swarm and the produced mutations throughout the whole search iterations are the inputs for RTAA. The mechanism of PSO is depicted in Section 4.1, followed by the description of RTAA in detail in Section 4.2. 4.1 Particle Swarm Optimization Algorithm PSO is an optimization algorithm which falls under the category of metaheuristic approach. It allows explorations to areas which may not look promising in the beginning of the search, alienating it from getting trapped in a local optimum solution. The incorporation of PSO performs the battery consumption minimization process during a reasonable computation time. The calculation of the total battery consumption of a schedule is contributed only by task executions, flight actions (among positions of task execution and recharge stations), and hover actions. The PSO algorithm is depicted in Algorithm 1, where more details of the incorporation with such a problem nature of this paper can be found in [10]. Algorithm 1 Particle Swarm Optimization Algorithm 1: 2: 3: 4: 5: 6: 7: 8: Input: Initial Swarm (swarm) Output: schedule of tasks on UAVs (schedule) Initialize (parameters, swarm, local best and global best) while stop condition not met do velocity ← updateVelocity(swarm, velocity, local best, global best); swarm ← updateSwarm(swarm, velocity); localBest ← getLocalBest(fitness(swarm), localbest); globalBest ← getGlobalBest(localBest, globalBest); generation++; end while The initial swarm has a role in placing initial starting points [12] throughout the solution space. There are 10 priority rules used in the initial swarm generation. Eight of them are addressed in [10], while two other rules in regard to the position Indoor UAV scheduling with Restful Task Assignment Algorithm 15 occupation are introduced in this paper. Those are most and less occupied position rules, task will be sorted based on the projected-occupation-load of its execution position in ascending and descending manner. For material handling task, these two rules see the start position as the execution position. The example of sequences (particles) in the initial swarm created through the priority rules in regard to the dataset in Table 1 is depicted in Table 3. Table 3: Priority rules for initial particle generation Heuristic Rules Minimum Number of Cumulative Predecessors Minimum Total Number Of Predecessors Maximum Number of Cumulative Successors Maximum Total Number of Successors Maximum Task Execution Time Minimum Task Execution Time Maximum Ranked Positional Weight Minimum Inverse Positional Weight Tasks with Less Occupied Position Tasks with Most Occupied Position Task Sequence (Task ID) 5 8 1 9 10 2 4 7 3 6 5 8 1 2 3 4 6 9 10 7 8 5 9 10 7 1 2 3 4 6 7 8 9 10 5 1 2 3 4 6 10 1 5 5 1 3 4 2 8 8 8 5 3 5 9 1 7 10 6 7 10 9 2 4 9 8 7 10 9 6 1 6 1 4 6 9 2 9 2 2 4 2 5 3 3 7 10 7 7 4 4 3 3 8 8 10 6 6 5 1 4.2 Restful Task Assignment Algorithm The scheduling algorithm is depicted by Algorithm 2∼5. The encapsulation of sub-methods performed in Algorithm 3∼5 provides a more clear top-constitutionalview of the heuristic approach depicted in Algorithm 2: Restful Task Assignment Algorithm (RTAA). The main idea of RTAA is to promote the existence of a continuous free timespan which can be used by the UAV to have a recharge. The algorithm takes input from a sequence of tasks created initially through the priority rules or update of position during a particular iteration. In line 1, the tasks are grouped based on the position occupation time where the task will start. For inspection tasks, it also acts as the position where the task will take place. Through the formed group, the positions will be ranked in a descending order; from the most occupied one to the most idle one. From line 3∼22, a method of creating a preliminary schedule without recharge action is depicted. Based on the ranked position list, tasks in the group will be iterated and tried to be assigned to a UAV to be executed at a particular time range. This provides the structure of the schedule by putting the tasks which are less flexible (i.e. to be executed at one position as many others may yield a smaller execution time range). In line 7, the task is put into schedule in a backward manner. Following the successful assignment, the record of UAV occupation-timestamp fragments (UOF) and position occupationtimestamp fragments (POF) are updated. 16 Yohanes Khosiawan, Izabela Nielsen Tasks which couldn’t be assigned previously and those without time windows will be attempted to be scheduled in line 14∼22. Here, the tasks are scheduled on the available time range according to the UOF and POF. When there are multiple possible placements of time fragment in the available time range, the task is assigned at the soonest execution time. If there is a task which still can’t be assigned in this attempt, a return value is returned indicating that another sequence should be checked since the current one does not yield a complete feasible schedule for the given set of tasks. In this manner, assuming that the given tasks are rational, the computation time can be minimized. The distinction of time fragment and time range is depicted in Figure 5. Time 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000 000 000 000 000 000 000 000 R~A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0 0 0 0 0 0 0 0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 LA 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000 000 000 000A~B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0 0 0 0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 LA 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 0 0 0 0A~B 0000000000000000000 UB 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000 000 000 000B~A 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 CA CD Available time range on the left side of task 3 (CD) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 0 0 0 0 0 0 0 0 R~A 00000000000000000000000 UB 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 0 0 0 0B~A 0000000000000000000 CA 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 A~D 00000000000000000000000000000000 CD A time fragment of flight from A to D Fig. 5: A time fragment put into the available time range based on the calculation according to a part of the scheduling algorithm After the preliminary schedule is constructed, the insertion of recharge, hover, and wait-on-ground actions is performed (line 23∼30). In this regard, a minimum recharge time shall be defined, to determine the amount of time that is worth (long enough) to be used for a recharge action. On the other hand, if the minimum recharge time is too long, then the potential time that actually can be used for recharging the battery would be wasted. The recharge insertion procedure looks for available time ranges which are not used for any task execution and at least equal to or greater than the defined minimum recharge time. In every attempt to put a task into the schedule, indicated by ’+’ throughout the pseudocode (Algorithm 4 line 8+ and Algorithm 5 line 7+ ), there is a check of the required flight’s execution time in respect to the adjacent task(s)’s and possibility to put a recharge action when applicable or necessary. This means, there will be no insufficient time for the UAV to fly from the end position of a preceding task to the start position of the successor task. Furthermore, there will be no insufficient battery value since a task will not be assigned at a particular time fragment when the formed sequence of tasks does not leave enough battery to go at least to the nearest recharge station. During this process, the time fragment for the task execution is ensured not to overlap with the existing UAV occupation time fragments. The reason why it is not done together with the trimming based on the position occupation time fragments is because of the dynamic flights of the UAVs between positions (where a recharge action might be replaced by a hover and a task execution —at a latter task assignment) causing frequent changes throughout the overall schedule construction. On the other hand, position occupation time Indoor UAV scheduling with Restful Task Assignment Algorithm 17 fragments are stagnant once the assignments are made, regardless of the previous or the following assignments. The distinction on the characteristic of UAV occupation and position occupation fragments is depicted in Figure 6. Let’s assume that during the schedule construction, several task assignments are performed, where task 1 , 3 , and 4 are assigned sequentially. In figure 6b, a particular position occupation time fragment is depicted to be stagnant once the respective task is assigned. However, the UAV occupation task is depicted otherwise in Figure 6c. In the beginning, a material handling task 1 is assigned—where the time fragments for flight from the recharge station to A (R∼A), a load (LA ), flight from A to B (A∼B), and unload (UB ) are put at their calculated time ranges. When task 3 is assigned to the schedule, assuming that the related time-fragments satisfy the considered constraints, a time fragment of flight from the end position of task 1 : B to the start position of task 3 : D is assigned to the respective time-range. Afterwards, task 4 is assigned according to its time window, and it occupies the time range between the end of task 1 and the start of task 3 . This means that the time fragment of flight B∼D is obsolete now. Instead, fragments of flight B ∼A, capturing inspection image at A, and flight A∼D are assigned in the respective time range. In another word, every assigned occupation time fragment of UAV 1 may change over time during the schedule construction. UAV ID Task ID Start Position End Position 1 1 A B 1 1 3 4 D A D A Task Type Material handling Inspection Inspection (a) Information on a sample set of tasks 0 Time Task ᬅ assigned ᬅ Task ᬈ assigned ᬅ ᬈ (b) Occupation time fragments of position A 0 Task ᬅ assigned Task ᬇ assigned Task ᬈ assigned 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000000000000000000000000000000 00 00 00 00 00 00 00 00 R~A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000000000000000000000000000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R~A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 R~A 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 Time LA LA LA 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000000000000000000000 00 00 00 00A~B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000000000000000000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00A~B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000A~B 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 UB UB UB 0000000000000000000000000000000000000000000000000000000000000000000000000000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00B~D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000B~A 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 CA 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 A~D 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 (c) Occupation time fragments of UAV 1 Fig. 6: Position and UAV occupation time fragments CD CD 18 Yohanes Khosiawan, Izabela Nielsen Algorithm 2 Restful Task Assignment Algorithm Input: sequence of tasks (seq) Output: schedule of task executions (sched) 1: taskGroup ← groupTasksBasedOnStartPositions(seq) 2: posRank ← rankPositionUsageFrequencyFromTheBusiestOne(taskGroup) Create schedule without recharge action: 3: for position in posRank.sortedList do 4: tasks ← taskGroup.get(position) 5: for t in tasks do 6: if hasTimeWindow(t) then 7: isScheduled ← BFPA(posOccupationF ragments, uavOccupationF ragments, sched, t) 8: if isScheduled then 9: seq.remove(t) 10: end if 11: end if 12: end for 13: end for 14: for t in seq do 15: isScheduled ← FFPA(posOccupationF ragments, uavOccupationF ragments, sched, t) 16: if isScheduled then 17: return getTotalBatteryConsumption(schedule) 18: else 19: NO SCHEDULE ← -1 20: return NO SCHEDULE 21: end if 22: end for Insert recharge and other actions: 23: utf s ← getUnallocatedTimeFragments(sched) 24: for utf in utf s do 25: if utf ≤ MIN RECHARGE TIME then 26: putActionsForRecharge(sched, utf ) 27: else 28: putActionsForFlightBeetwenPositions(sched, utf ) 29: end if 30: end for Prior to the task assignment, a sorting of the preferred UAV list for performing a particular task is done. This process is done based on the precedence relationships of the task to be assigned (1,2,4,5) and the possessed workload (line 3). The motivation behind the utilization of precedence relationship here is the tendency of the successor tasks being able to be executed immediately after its latest predecessor is done. Indoor UAV scheduling with Restful Task Assignment Algorithm 19 Algorithm 3 Sort the preferred UAV list 1: 2: 3: 4: 5: 6: Input: a list of all UAV IDs (uavIDs), UAV occupation fragment (uavOccF ragments), current schedule (sched), upcoming task to be assigned (t) Output: a sorted list of UAV IDs —from the most preferred one to the least (pref U AV s) uavOnDutyBef ore ← getUAVofTheLatestPredecessorIfExist(t, schedule) uavOnDutyAf ter ← getUAVofTheEarliestSuccessorIfExist(t, schedule) pref U AV s ← sortUAVIDsBasedOnCurrentWorkload(uavOccF ragment, uavIDs) moveUAVIDToTheFrontOfList(pref U AV s, uavOnDutyAf ter) moveUAVIDToTheFrontOfList(pref U AV s, uavOnDutyBef ore) return pref U AV s The details of the first task assignment attempt is depicted in Algorithm 4: Backward Fragment Placement Algorithm (BFAP). In line 4∼7, possible time fragments for the task to be assigned at are listed. They are obtained by trimming the fragments of the original time window of the given task which overlap with the current record of POF. The trimming based on the end time of a predecessor and the start time of a successor is a consequence of the design of Algorithm 2, where a left to right (time-wise) task assignment procedure is not a must. In line 8+ , the task is attempted to be assigned to the schedule in a backward manner to give an enhanced number of possibilities for the other tasks to be arranged without violating the given time window constraints. Once the task is assigned, the occupation fragments of the respective UAV and position are updated (line 10). Furthermore, when assigning tasks with the same precedence level, one with less slack may need to be assigned before the other(s) or maybe the other way around to yield a feasible schedule - as depicted in Figure 7. Task 12 has less slack than 11 and one may prefer to assign 12 before 11 . This results in the next task assignment attempt becoming infeasible (depicted in Figure 7b), while the other way around in Figure 7c is feasible. This is where the role of task sequence representation in the incorporated Particle Swarm Optimization comes in. The various task sequences enable a flexible exploration even towards an unlikely area. Additionally, it also promotes a quick exploration in a large solution space. In this manner, when there is no feasible schedule found, one can conclude that the given tasks (with the defined time windows) are too tight for the available resources (i.e., UAVs and positions). This is also supported by the condition where the tasks are not ranked based on their slack time before the task assignment - such treatment demotes the exploration during the search. 20 Yohanes Khosiawan, Izabela Nielsen UAV Task Duration 1 1 11 12 7 2 Release Date 1 6 Due Date 15 9 (a) Tasks with time window; 12 has less slack than 11 1 7 6 8 9 15 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00ᬏ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00ᬏ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Time ᬐ (b) Formerly assign (based on the manner described in Algorithm 4) task 12 and then 11 afterwards 1 8 6 9 15 Time ᬏ ᬐ (c) Formerly assign (based on the manner described in Algorithm 4) task 11 and then 12 afterwards Fig. 7: A task with more slack may actually be formerly assigned to yield a feasible solution in BFAP Indoor UAV scheduling with Restful Task Assignment Algorithm 21 Algorithm 4 Backward Fragment Placement Algorithm Input: position occupation time fragments (posOccupationF ragments), UAV occupation time fragments (uavOccupationF ragments), schedule of task executions (sched), task to be scheduled (t) Output: scheduling completion status 1: if hasNoTimeWindow(t) then 2: return false 3: end if 4: 5: 6: 7: List possible time fragments for the task to be assigned at based on the existing position occupation time fragments: pref U AV s ← getPreferredUAVs(uavOccupationF ragments, sched, t) . Get a list of UAVs sorted based on defined preferences: executor of a predecessor of task t, executor of a follower of task t, least loaded UAV predBasedT imeW in ← trimTimeWin(t.timeWindow, sched) . Trim time window based on the scheduled predecessor(s) and follower(s) f reeStartP osF ragments ← trimOccupiedTimeRange(predBasedT imeW in, posOccupationF ragments.get(t.startPos)) f reeEndP osF ragments ← trimOccupiedTimeRange(predBasedT imeW in, posOccupationF ragments.get(t.endPos)) Attempt to put the task into the schedule in a backward manner: 8: isScheduled ← assignTaskBackward(f reeStartP osF ragments, f reeEndP osF ragments, pref U AV s, sched, t)+ 9: if isScheduled then 10: updateOccupationFragments(posOccupationF ragments, uavOccupationF ragments, sched) . Update position and UAV occupation fragments according to the recently scheduled task 11: end if 12: return isScheduled After the attempt of assignment of tasks with time windows in Algorithm 4 is performed, the unassigned ones or tasks without time window will be attempted to be assigned based on Algorithm 5: Forward Fragment Placement Algorithm. In this second attempt, several tasks with time window assigned in a tardy manner may be found when the respective time range allows the task to still meet the defined precedence relationships. However, on the opposite, a task with time window shall not be assigned before its release date. This assumption is made according to the accommodated task where the existence of lead task may fail the purpose of the task itself. For example, an inspection task is scheduled to be performed in the middle of the day: when a wind turbine blade would have been manufactured further. In such a situation, another (lead) inspection task executed in advance in the morning (before the given time window in the middle of the day) gives no contribution to the original intention of that task. Generally, in the second attempt, the task assignment based on Algorithm 5 is attempted on the left side of a particular existing fragment (line 6). When there is a flexibility in the available time range, the soonest feasible time fragment will be chosen over the others (line 7). Such task assignment manner is promoted by the characteristic of Algorithm 4 where it tends to leave an empty area on the left-side of the (scheduled) task fragment. Hence, through Algorithm 5, this condition will be evened out by the insertion of the remaining unassigned tasks and potential recharge actions. In line 15, unscheduled tasks will be lastly attempted 22 Yohanes Khosiawan, Izabela Nielsen to be assigned after the last task in the existing schedule of a particular UAV when possible —satisfying the precedence relationships. Algorithm 5 Forward Fragment Placement Algorithm 1: pref U AV s ← getPreferredUAVs(uavOccupationF ragments, sched, t) . Get a list of UAVs sorted based on defined preferences: executor of a predecessor of task t, executor of a follower of task t, least loaded UAV 2: predBasedT imeW in ← trimTimeWin(t.timeWindow, sched) . Trim time window based on the scheduled predecessor(s) and follower(s) Attempt to put the task into the schedule in a forward manner: 3: TRY FFPA: 4: for uav in pref U AV s do 5: for st in sched.get(uav) do 6: f reeT imeF ragment ← getFreeFragmentOnTheLeftSideOfScheduledTask(st, posOccupationF ragment) . Based on position occupation time fragments 7: isScheduled ← assignTaskForward(f reeT imeF ragment, sched, t)+ 8: if isScheduled then 9: updateOccupationFragments(posOccupationF ragments, uavOccupationF ragments, sched) . Update position and UAV occupation fragments according to the recently scheduled task 10: break TRY FFPA 11: end if 12: end for 13: end for Last attempt to schedule the given tasks if all previous ones (including BFPA) failed: 14: if !isScheduled then 15: isScheduled = assignAfterLastTaskForward(pref U AV s, sched, t) 16: end if 17: return isScheduled 5 Numerical Experiment The developed MILP in Section 3 is attempted to be solved in IBM ILOG CPLEX, with 3 UAVs and up to 9 tasks. It is run on an Intel Core i7 processor (2.9 GHz) with 32 GB of RAM. The computation time of CPLEX grows exponentially as shown in Table 4. It reaches more than 2.5 hours after only 8 tasks, and this is significantly longer than the heuristic-based computation time for 100 tasks (presented later in this section). This condition essentially drives the need of pursuing a heuristic-based approach to obtain a good quality solution in a reasonable time. The proposed methodology has been benchmarked by 54 datasets generated based on the flight demonstrations at the lab facility of the Department of Mechanical, Production and Management Engineering. The datasets have different characteristics, formed by different levels of four parameters: geographical scale, number of tasks, predecessor distribution, and slack time distribution. The summary of the task characteristics interpolated from both lab scale and industrial scale datasets can be illustrated in Figure 8. Indoor UAV scheduling with Restful Task Assignment Algorithm 23 Table 4: Computation time of small scale problems solved in CPLEX Number of tasks Execution time (s) Solution 1.73 6.12 25.82 182.86) 10000 (stopped) 10000 (stopped) optimum optimum optimum optimum feasible feasible 4 5 6 7 8 9 200 50 Number of tasks 1000 100 600 Slack time 1400 1. There are 2 geographical scales of the environment: lab scale and industrial scale with the ratio of 1:8. The measurement of the lab environment is within 14 meters in width, 20 meters in length, and 7 meters in height. 2. For each geographical scale, there are 3 different numbers of tasks: 30, 50, and 100 tasks. 3. For each number of tasks, there are 3 predecessor distributions: 0, 1, 2. As depicted in Figure 8, there exist tasks with 3 or 4 predecessors in a particular dataset. The addressed parameter determines that the number of predecessors in a dataset satisfies the normal distribution with x = 0∨1∨2 and σ = min(1, x) —not the exact number of predecessors for each task. 4. For each number of predecessor distribution, there are 3 slack time distributions: 300, 600, and 1200 seconds. As depicted in Figure 8, there are some tasks with slack time of at least 100 and up to 1395 seconds. The addressed parameter determines that the slack time in a dataset satisfies the normal distribution with x = 300 ∨ 600 ∨ 1200 and σ = x/5 —not the exact slack time for each task. 5. Each dataset is used in a scheduling scenario which is run 20 times, whose results can provide a good quality observation. 30 0 1 2 3 4 Number of predecessors Fig. 8: Summary of characteristics of the benchmark datasets In alignment with the restful characteristic of Algorithm 2, the overall battery level is desired to be preserved throughout the operations. The battery level of each UAV after each task execution from every feasible schedule constructed during 24 Yohanes Khosiawan, Izabela Nielsen the search (iterations) is recorded, and the cumulative data is depicted through histograms in Figure 9. It is portrayed that the battery level of the UAVs has the tendency of being in a sufficiently preserved level. This condition applies for both lab scale and industrial scale environment, which shows the scalability of the proposed methodology. 400 600 800 1000 1200 2500000 Frequency 0 500000 500000 0 200 0 200 400 Battery level 600 800 1000 1200 0 200 400 Battery level (a) 600 800 1000 1200 Battery level (b) (c) 50 tasks, industrial scale environment 100 tasks, industrial scale environment 0 200 400 600 Battery level (d) 800 1000 1200 2e+06 1e+06 Frequency 1500000 0e+00 0 0 500000 500000 Frequency 1000000 3e+06 1500000 2500000 30 tasks, industrial scale environment Frequency 1500000 Frequency 1000000 1500000 2000000 1000000 Frequency 500000 0 0 100 tasks, lab scale environment 3500000 50 tasks, lab scale environment 1500000 30 tasks, lab scale environment 0 200 400 600 800 1000 1200 0 200 400 600 Battery level Battery level (e) (f) 800 1000 1200 Fig. 9: Battery level of the UAVs throughout the operations The set of learning coefficients used for the PSO algorithm is c1 =1, c2 =2, with 40 particles of initial swarm, 40 iterations, and a stop criteria of 10 no-improvement iterations —this is inspired by the pilot study conducted in [10]. In this study, the experiment purpose is to stress-test the methodology. Hence, the solution space may get vast in the used datasets, stressing exploration rooms not only for PSO, but also for RTAA. Each sub-figure in Figure 10 represents 180 attempts, which correspond to a particular geographical scale of the environment and number of tasks. There are 9 settings for a particular set of geographical scale and number of tasks, depicted in Table 5. The battery consumption peaks are at setting 1, 4, and 7 for all sub-figures, where the slack time is 300. This behavior is caused by the situation where there is less time in between task executions, where UAVs will be required to hover and wait; since recharging at the recharge station within a very short period will be insignificant or even waste the battery more (due to the flights from and to the recharge station). In addition, it is depicted that the exposure of Algorithm 3 in Algorithm 4∼5 (and Algorithm 2 as a whole) may reduce the battery consumption in the produced schedule through the existence of precedence relationships. The results of the total battery consumption optimization in 1080 Indoor UAV scheduling with Restful Task Assignment Algorithm 25 scheduling attempts are depicted in Figure 10, and the numerical data of average battery consumption is presented in Table 6. Table 5: Result analysis settings Setting Predecessor mean Slack time mean (s) 1 2 3 4 5 6 7 8 9 0 0 0 1 1 1 2 2 2 300 600 1200 300 600 1200 300 600 1200 Table 6: Average battery consumption of the UAV operations in regard to the 54 benchmark datasets Number of tasks Predecessor - none (0) low - 30 medium - 50 high - 100 Task Size Geographical distance - lab. scale (1) Precedents - rare (1) low - 30 medium - 50 high - 100 Task Size Precedents - frequent (2) low - 30 medium - 50 high - 100 Number of tasks Predecessor - none (0) low - 30 medium - 50 high - 100 Task Size Geographical distance - industrial scale (8) Precedents - rare (1) low - 30 medium - 50 high - 100 Task Size Precedents - frequent (2) low - 30 medium - 50 high - 100 low (300) 2256.75 4230.4 9305.05 low (300) 2438.1 3957.65 6953.55 low (300) 2532.75 4502.45 7316.45 low (300) 1921.55 4298.55 9097.8 low (300) 2434.4 3963.1 8305.9 low (300) 2107.95 4173.4 8276.55 Slack time medium (600) 1490.4 3171.2 8249.55 Slack time medium (600) 1547.65 2980.75 6693.65 Slack time medium (600) 1381 2848.75 6466.15 Slack time medium (600) 1524.35 3219.7 7595.45 Slack time medium (600) 1350.85 2855.2 7516.8 Slack time medium (600) 1825 2922.4 6402.4 high (1200) 1298.6 2531.4 5387.55 high (1200) 1421.8 2783.05 6600.65 high (1200) 1610.4 2540.35 6698.9 high (1200) 1429.4 2578.3 5257.05 high (1200) 1407.1 2831.4 6071.5 high (1200) 1375.95 2922.05 6766.4 26 Yohanes Khosiawan, Izabela Nielsen 0 20 2 15 4 6 10 0 2 4 6 8 20 15 10 0 5 5 0 20 15 10 2 4 6 8 5 8 0 0 2500 4000 2000 8000 3000 1500 2000 1000 500 6000 1000 4000 0 energy consumption 0 energy consumption run 2000 run setting run setting (a) 30 tasks, lab scale energy consumption 0 (b) 50 tasks, lab scale setting (c) 100 tasks, lab scale 0 20 2 15 2 0 4 6 8 20 15 10 5 0 0 4 6 8 10 0 2 4 1520 6 8 5 10 5 0 2500 4000 2000 8000 3000 1500 6000 1000 2000 4000 500 1000 0 energy consumption run energy consumption 2000 0 run run 0 energy consumption setting setting setting (d) 30 tasks, industrial scale (e) 50 tasks, industrial scale (f) 100 scale tasks, industrial Fig. 10: Battery consumption on UAV operations with 30, 50, and 100 tasks in lab scale and industrial scale indoor environments In regard to the computation time, it tends to converge in the reasonable computation time area. The computation time of every 20 scheduling attempts of a particular dataset is recorded, and the respective overview for the benchmark datasets is depicted in Figure 11. In Table 7, the average computation time of every dataset is presented. Indoor UAV scheduling with Restful Task Assignment Algorithm 50 tasks, lab scale environment 100 tasks, lab scale environment 15 Frequency 20 0 10 20 30 0 0 0 5 10 10 10 20 Frequency 20 Frequency 30 30 25 40 30 40 30 tasks, lab scale environment 27 0 Computation time 20 40 60 80 100 120 0 100 200 300 Computation time (a) 30 tasks, lab scale 400 500 600 700 Computation time (b) 50 tasks, lab scale (c) 100 tasks, lab scale 100 tasks, industrial scale environment 50 tasks, industrial scale environment 15 Frequency 10 5 10 20 Frequency 30 20 0 0 0 10 Frequency 30 40 20 40 25 50 30 tasks, industrial scale environment 0 0 10 20 30 40 Computation time 0 50 100 100 150 200 300 400 500 600 Computation time Computation time (d) 30 tasks, industrial scale (e) 50 tasks, industrial scale (f) 100 scale tasks, industrial Fig. 11: Computation time of scheduling attempt on UAV operations with 30, 50, and 100 tasks in lab scale and industrial scale indoor environments Table 7: Average computation time (s) of scheduling attempts in regard to the 54 benchmark datasets Number of tasks Predecessor - none (0) low - 30 medium - 50 high - 100 Task Size Geographical distance - lab. scale (1) Precedents - rare (1) low - 30 medium - 50 high - 100 Task Size Precedents - frequent (2) low - 30 medium - 50 high - 100 Number of tasks Predecessor - none (0) low - 30 medium - 50 high - 100 Task Size Geographical distance - industrial scale (8) Precedents - rare (1) low - 30 medium - 50 high - 100 Task Size Precedents - frequent (2) low - 30 medium - 50 high - 100 low (300) 19.96 58.16 245.02 low (300) 8.69 24.59 144.69 low (300) 7.06 19.04 109.60 low (300) 24.14 63.04 185.33 low (300) 7.50 28.06 151.92 low (300) 6.74 26.46 109.90 Slack time medium (600) 25.50 78.56 297.45 Slack time medium (600) 8.12 26.63 133.03 Slack time medium (600) 6.01 19.73 112.59 Slack time medium (600) 20.51 74.14 306.68 Slack time medium (600) 6.77 27.95 112.47 Slack time medium (600) 5.21 23.03 84.19 high (1200) 22.47 74.83 380.85 high (1200) 7.68 36.51 119.83 high (1200) 7.21 19.05 121.15 high (1200) 26.02 77.47 352.62 high (1200) 8.60 27.27 160.97 high (1200) 6.83 26.01 116.52 28 Yohanes Khosiawan, Izabela Nielsen 6 Conclusion UAV scheduling problem in indoor environment has been emerging with various challenges to solve. In this paper, a study on safe UAV scheduling is conducted, where tasks with time windows are performed by multiple UAVs in indoor environment. A heuristic approach based on RTAA is proposed. Furthermore, an incorporation of PSO with RTAA is performed, where two additional priority rules are proposed apart from the ones utilized in the pilot study [10]. The study involves 54 benchmark datasets stressing on different aspects: geographical distance, number of tasks, number of predecessors, and slack time. From the analysis of the results, it can be deduced that the proposed methodology is very effective for producing a restful schedule in a reasonable amount of time. This depicts a safe UAV scheduling, where the battery level is shown to be sufficiently preserved throughout the operations. On top of that, RTAA (specifically Algorithm 3,4, and 5) which is incorporated with PSO generates a drive for the search to obtain minimum total battery consumption. This methodology is also shown to be scalable for both lab scale and industrial scale indoor environments. Conflicts of Interest The authors declare that they have no conflicts of interest. Acknowledgement This work has partly been supported by Innovation Fund Denmark under project UAWorld; grant agreement number 9-2014-3. References 1. Darryl K Ahner, Arnold H Buss, and John Ruck. Assignment scheduling capability for unmanned aerial vehicles: a discrete event simulation with optimization in the loop approach to solving a scheduling problem. In Proceedings of the 38th conference on Winter simulation, pages 1349–1356. Winter Simulation Conference, 2006. 2. Guy Desaulniers, Jacques Desrosiers, Yvan Dumas, Marius M Solomon, and François Soumis. Daily aircraft routing and scheduling. Management Science, 43(6):841–855, 1997. 3. Martin Desrochers, Jacques Desrosiers, and Marius Solomon. A new optimization algorithm for the vehicle routing problem with time windows. Operations research, 40(2):342– 354, 1992. 4. Jacques Desrosiers, Yvan Dumas, Marius M Solomon, and François Soumis. Time constrained routing and scheduling. Handbooks in operations research and management science, 8:35–139, 1995. 5. Jacques Desrosiers, Michel Sauvé, and François Soumis. Lagrangian relaxation methods for solving the minimum fleet size multiple traveling salesman problem with time windows. Management Science, 34(8):1005–1022, 1988. 6. Jacques Desrosiers, François Soumis, and Martin Desrochers. Routing with time windows by column generation. Networks, 14(4):545–565, 1984. 7. Edsger W Dijkstra. A note on two problems in connexion with graphs. Numerische mathematik, 1(1):269–271, 1959. 8. M.R. Garey and D.S. Johnson. Computers and Intractability: A Guide to the Theory of NP-completeness. Books in mathematical series. W. H. Freeman, 1979. Indoor UAV scheduling with Restful Task Assignment Algorithm 29 9. Yohanes Khosiawan and Izabela Nielsen. A system of uav application in indoor environment. Production & Manufacturing Research, 4(1):2–22, 2016. 10. Yohanes Khosiawan, Young Soo Park, Ilkyeong Moon, Janardhanan Mukund Nilakantan, and Izabela Nielsen. Task scheduling system for uav operations in indoor environment. arXiv preprint arXiv:1604.06223, 2016. 11. Jonghoe Kim and James R Morrison. On the concerted design and scheduling of multiple resources for persistent uav operations. Journal of Intelligent and Robotic Systems, 74(12):479–498, 2014. 12. Uri Kirsch. Structural Optimization: Fundamentals and Applications. Springer-Verlag Berlin Heidelberg, 1st edition, 1993. 13. Zhixiong Liu. Investigation of particle swarm optimization for job shop scheduling problem. In Natural Computation, 2007. ICNC 2007. Third International Conference on, volume 3, pages 799–803. IEEE, 2007. 14. Maryam Mousavi, Hwa Jen Yap, Siti Nurmaya Musa, Farzad Tahriri, and Siti Zawiah Md Dawal. Multi-objective agv scheduling in an fms using a hybrid of genetic algorithm and particle swarm optimization. PloS one, 12(3):e0169817, 2017. 15. Claudio Piciarelli, Christian Micheloni, Niki Martinel, Marco Vernier, and Gian Luca Foresti. Outdoor environment monitoring with unmanned aerial vehicles. In Image Analysis and Processing–ICIAP 2013, pages 279–287. Springer, 2013. 16. Fatih Semiz. Task assignment and scheduling in UAV mission planning with multiple constraints. PhD thesis, Middle East Technical University, 2015. 17. Tal Shima, Steven J Rasmussen, and Andrew G Sparks. Uav cooperative multiple task assignments using genetic algorithms. In American Control Conference, 2005. Proceedings of the 2005, pages 2989–2994. IEEE, 2005. 18. Tal Shima and Corey Schumacher. Assignment of cooperating UAVs to simultaneous tasks using genetic algorithms. Defense Technical Information Center, 2005. 19. Byung Duk Song, Jonghoe Kim, Jeongwoon Kim, Hyorin Park, James R Morrison, and David Hyunchul Shim. Persistent uav service: An improved scheduling formulation and prototypes of system components. In Unmanned Aircraft Systems (ICUAS), 2013 International Conference on, pages 915–925. IEEE, 2013. 20. Kenneth Sörensen and Fred W Glover. Metaheuristics. In Encyclopedia of Operations Research and Management Science, pages 960–970. Springer, 2013. 21. Koji AO Suzuki, Paulo Kemper Filho, and James R Morrison. Automatic battery replacement system for uavs: Analysis and design. Journal of Intelligent & Robotic Systems, 65(1):563–586, 2012. 22. SK von Bueren, A Burkart, A Hueni, U Rascher, MP Tuohy, and IJ Yule. Deploying four optical uav-based sensors over grassland: challenges and limitations. Biogeosciences, 12(1):163–175, 2015.
2cs.AI
End-to-end Multi-Modal Multi-Task Vehicle Control for Self-Driving Cars with Visual Perceptions Zhengyuan Yang1 * , Yixuan Zhang1 * , Jerry Yu2 , Junjie Cai2 and Jiebo Luo1 arXiv:1801.06734v2 [cs.CV] 2 Feb 2018 1 Department of Computer Science, University of Rochester, Rochester NY 14627, USA 2 SAIC USA Innovation Center, San Jose, CA 95134, USA 1 Email: {zyang39, jluo}@cs.rochester.edu, {yzh215}@ur.rochester.edu 2 Email: {jyu, jcai}@saicusa.com Abstract—Convolutional Neural Networks (CNN) have been successfully applied to autonomous driving tasks, many in an endto-end manner. Previous end-to-end steering control methods take an image or an image sequence as the input and directly predict the steering angle with CNN. Although single task learning on steering angles has reported good performances, the steering angle alone is not sufficient for vehicle control. In this work, we propose a multi-task learning framework to predict the steering angle and speed control simultaneously in an end-to-end manner. Since it is nontrivial to predict accurate speed values with only visual inputs, we first propose a network to predict discrete speed commands and steering angles with image sequences. Moreover, we propose a multi-modal multi-task network to predict speed values and steering angles by taking previous feedback speeds and visual recordings as inputs. Experiments are conducted on the public Udacity dataset and a newly collected SAIC dataset. Results show that the proposed model predicts steering angles and speed values accurately. Furthermore, we improve the failure data synthesis methods to solve the problem of error accumulation in real road tests. I. I NTRODUCTION In many traditional self-driving car solutions [1], [2], [3], [4], [5], vehicle controls are rule based where perception and vehicle control are two individual modules. Nvidia [6] is the first to address the task of end-to-end steering angle control, where Convolutional Neural Networks (CNN) are used to regress steering angles directly from raw pixels recorded by front-view cameras. Xu et al. [7] further propose to predict the steering angle and understand the scene simultaneously in an end-to-end fashion with an FCN-LSTM architecture. A visual attention network [8] is proposed to help interpret the predictions with attention heatmaps. Other approaches [9], [10] are proposed to visualize the intermediate results in CNN. Despite the fact that the end-to-end steering angle control has achieved good results and has been well interpreted, the steering angle alone is not sufficient for vehicle control. The lack of speed commands greatly limits the potential applications of the end-to-end methods. In this work, we propose to predict the steering angle and speed command simultaneously with a multi-task learning approach. Intuitively, it is challenging to predict an accurate speed value with only visual inputs. A correct turning angle can be predicted with sufficient training data on the road, since there is only one correct way to keep the vehicle on the road. However, the driving speed is determined by a number of other factors including driver’s driving habits, surrounding traffic conditions, road conditions and so on. Many factors cannot be reflected solely through front-view cameras. Therefore, we start with an easier task of discrete speed command prediction. The task is to predict discrete speed control commands of accelerating, decelerating and maintaining speed. The discrete speed control commands can be adequately inferred from front-view cameras. For example, a decelerating command is predicted when there are obstacles in the front, and an accelerating command may be predicted when the road is clear and the vehicle speed is low. Although discrete speed commands provide a preliminary version of vehicle speed control, there exist two shortcomings. First, the levels of accelerating and decelerating are pre-fixed, which limit the smoothness [11] of the vehicle control. Second, using only the visual inputs limits the command prediction accuracy under certain circumstances. For example, when the vehicle is already fast enough or at the speed limit, the accelerating command should not be made even if the road is clear. In the initial model, the speed is inferred automatically from the input image sequences, and the prediction may be inaccurate. To achieve a better vehicle control, we propose to take previous feedback speeds as an extra modality, and predict speeds and steering angles simultaneously. The proposed model is evaluated on the public Udacity dataset [12] and the newly collected SAIC dataset. Experiment results show that the multi-modal multi-task network provides an accurate speed prediction while further improves the state-of-the-art steering angle prediction. Furthermore, we conduct real car tests on roads similar to the SAIC dataset’s testing data. We also improve the failure case data synthesis methods to solve the problem of error accumulation. Our main contributions include the following: • • • * Both authors contributed equally to this work. We propose a multi-modal multi-task network for end-toend steering angle and speed prediction. We collect a new SAIC dataset containing the driving records during the day and night. The dataset will be released upon the publication of this work. We improve the failure case data synthesis methods to solve the problem of error accumulation in real car tests. SAIC E2E Steering CONV1 CONV2 11X11X96 5X5X256 Norm. Norm. 3@227X227 POOL 3X3 96@55X55 POOL 3X3 CONV3 CONV4 CONV5 3X3X384 3X3X384 3X3X256 FC1 1024 FC2 50 FC3 10 256@27X27 384@13X13 384@13X13 dropout dropout dropout (a) End-to-end Base Steering Prediction Model SAIC Speed Command CONV1 CONV2 11X11X96 5X5X256 Norm. Norm. 3@227X227 POOL 3X3 96@55X55 POOL 3X3 CONV3 3X3X384 256@27X27 FC1 CONV4 CONV5 3X3X384 3X3X256 1024 384@13X13 384@13X13 dropout LSTM 256 FC2_1 50 FC3 dropout dropout FC2_2 50 dropout (b) Output Steering angle 10 Output Steering angle Output Speed Command Discrete Speed Command Network Fig. 1. End-to-end steering and discrete speed command model. II. R ELATED W ORK ALVINN [13] is one of the earliest successful neural network based self-driving vehicle project. The network is simple and shallow, but it manages to do well on simple roads with a few obstacles. With the development of deep learning [14], [15], many systems use CNN for environment perception and steering angle prediction. Nvidia is the first to adopt Convolutional Neural Networks (CNN) for end-to-end steering angle prediction [6]. They propose to predict steering angles with only three front-view cameras and manage to control the vehicle with the proposed system. There exist three main approaches: behavior reflex CNN, mediated perception and privileged training. Behavior reflex CNN [6], [8], [10], [16], [17], [18] directly predict the steering angle from the visual inputs. The system has a low model complexity and can be robust with enough training data. Furthermore, it has a good generalization ability. However, the performance is limited in complicated environments and the results are difficult to interpret. Some systems propose visualization methods [9], [10] and include attention mechanisms [8], [19], [20] to better interpret the results. Mediated perception [1] first maps visual inputs into several pre-defined parameters to depict the surroundings. Rule based methods then produce control commends with the estimated parameters. Such methods have a better vehicle control smoothness [11] but can only work in limited scenarios. Designing ideal control rules is also difficult. Privileged training [7], [21] is a multi-task approach that understands the scene and predicts vehicle commands simultaneously. The main limitation is the large amount of training data required. In this work, we expand the behavior reflex CNN with a multi-modal multi-task framework. Feedback speeds are used as an extra modality for steering angle and speed prediction. III. M ETHOD In this section, we first introduce the base CNN model for end-to-end steering angle prediction. Based on the improved CNN structure, a multi-task network is proposed to predict the steering angle and discrete speed command simultaneously by taking an image sequence as the input. Finally, we propose a multi-modal multi-task network that takes previous feedback speeds as an extra modality and predicts the speed and steering angle simultaneously. A. Base Steering Model It is shown in [6] that CNN has a good ability in extracting visual features and is capable of directly regressing the steering angle from raw pixels. Inspired by previous end-toend steering angle prediction systems, we propose an improved CNN structure for this task with two improvements. As shown in Figure 1 (a), the model consists of 9 layers including 5 convolutional layers and 4 fully connected layers. Unlike previous work [6], the convolutional layers are designed based on AlexNet [15], [22] and a large kernel size is adopted in the first few layers. Experiments show that larger kernels are suitable for front-view cameras and can better capture the environment features. Another improvement is changing the aspect ratio of the input image to 1:1. Previous methods [6], [8] resize the input with a fixed aspect ratio of around 2.5:1. The convolutional kernels with a same width and height are then adopted. According to human intuitions though, visual content distributed along the y-axis is more informative for steering angle prediction. This implies that CNN kernels should have a larger width than height. For simplicity, we squeeze the input images in width to an aspect ratio of 1:1 and continue using the square kernels. Experiments show that the two improvements, the larger kernel size and reshaped aspect ratio, improve the performance of the end-to-end steering angle prediction. We further combine these two improvements with larger networks like VGG [23] and ResNet [24]. Although the model tends to overfit on all the evaluated datasets, the combination is promising in the future when larger datasets are available. The mean absolute error is adopted as the training loss function. In addition, We apply different loss weights to alleviate the problem of data imbalance, as going straight appears more frequently than turning. The data with a small steering angle has a small training loss weight and the turning data has a larger weight. This technique is applied to all steering angle prediction models in this paper. B. Discrete Speed Command Network The end-to-end steering angle control successfully proves the feasibility of generating vehicle controls directly from front view cameras. However, the steering angle alone is not sufficient for vehicle control. The speed is another important parameter that needs to be predicted. Unlike the steering angle though, predicting the vehicle speed solely from a front view camera is counterintuitive, because even human drivers drive at different speeds given a similar road condition. Therefore, it is more reasonable to predict the speed control command from visual information, instead of directly predicting the desired speed values. For example, all drivers should slow down when the vehicle is too close to other cars or obstacles, and most drivers speed up when the road is clear. Based on this observation, we first propose a multi-task framework that predicts discrete speed commands and steering angles simultaneously. The model is called the speed command network. The model structure is shown in Figure 2. The network contains a visual encoder and a speed encoder. The visual encoder takes only one frame as inputs instead of using the CNN + LSTM structure. This greatly reduces the amount of computation, therefore guarantees a high FPS and a realtime performance even with low performance GPUs. The speed encoder encodes the pattern of previous feedback speed sequences. The encoded visual features are used for steering angle prediction, and the concatenation of visual features and feedback speed features are adopted for speed prediction. Both steering angle prediction and speed prediction apply mean absolute loss as a loss function, and a weighting parameter is tuned to adjust the weight between the two loss terms. IV. DATASET In this section, we first introduce the public Udacity dataset [12]. The collection and statistics of the SAIC dataset is then discussed. Example frames of both datasets are shown in Figure 3. Finally, we introduce the data pre-processing methods. Fig. 2. End-to-end multi-modal multi-task vehicle control model. Different colors represent different modules. As shown in Figure 1 (b), the speed command network takes an image sequence as the input and predicts discrete speed commands and steering angles simultaneously. The convolutional layers have a same structure as in the base steering model. The encoded visual features are fed into an LSTM layer for temporal analysis. The output image sequence feature is used for both steering angle regression and speed command classification. As a first step, the speed commands contain three classes: ”accelerating”, ”decelerating” and ”maintaining speed”. The cross entropy loss is used for speed command classification and the mean absolute error is calculated for steering angle prediction. A weighting term is added as a hyper-parameter to adjust the importance of the two tasks. C. Multi-modal Multi-task Network The speed command network provides an initial framework for vehicle speed control. However, the performance is limited due to the lack of input information. The visual contents from the front view cameras alone are not sufficient for accurate speed command prediction. For example, in most cases it is reasonable to speed up when the road is clear, but it is not the case when the vehicle is already at a high speed. Similarly, there is no need to slow down when the vehicle is already slow enough. These failure cases are observed in the experiments and vehicle speeds are necessary for making a good speed command prediction. Theoretically, the vehicle speed can be predicted from image sequences, but the prediction is difficult and inaccurate. A more reasonable solution is to directly adopt the feedback speeds. Therefore, we propose a multi-modal multi-task network to predict the values of steering angles and speeds simultaneously by taking previous feedback speeds as an extra modality. A. Dataset 1) Udacity: The Udacity dataset [12] is originally provided for an online challenge. The dataset contains six video clips with a total duration of around 20 minutes. Speed values, steering angles and video streams from three front view cameras are recorded. 2) SAIC: In order to obtain a larger data size and find regions for real road test, we record and build the SAIC dataset. The dataset includes five hours of driving data in north San Jose area, mostly on urban roads. The dataset contains the driving data in both day and night. The vehicle goes between several nodes and each trip between the nodes has a duration of around ten minutes. Parking, waiting at traffic lights and some other conditions are considered as noisy parts and filtered out. After filtering out the noisy videos, two hours’ data is split into training, validation and testing set. A whole video of a certain trip between two nodes is atomic in set splits. Three drivers are included to avoid biasing towards a specific driving behavior. Similarly, video streams, speed values and steering angles are recorded. The video streams contain videos from one center and two side front view cameras with a frame rate of 30 frames per second. B. Data Pre-Processing 1) Image Pre-Processing: We adopt several image preprocessing and data augmentation techniques to improve the robustness and prediction accuracy of the proposed system. The robustness under various lighting conditions is a major challenge for camera-based systems. We show that converting frames into different color spaces can improve the robustness towards lighting changes. The input frames are converted from RGB color space to HSV. A small rotation angle is randomly added to simulate the camera vibrations on vehicles. For data augmentation, random horizontal flips are first adopted. Another important technique is data synthesis with side cameras, which generates simulated failure cases for training. (a) (b) (d) (c) (e) Fig. 3. Example frames and predictions on the Udacity and SAIC datasets. First row: the Udacity dataset. Second row: the SAIC dataset. TABLE I E XPERIMENT RESULTS OF STEERING ANGLE PREDICTION ON U DACITY Method Nvidia’s PilotNet [6] Cg Network [25] Base Steering Model Discrete Speed Command Network Multi-modal Multi-task Network Angle (MAE in degree) 4.26 4.18 2.84 1.85 1.26 TABLE II R ESULTS OF SPEED VALUE PREDICTION ON THE U DACITY DATASET AND THE SAIC DATASET WITH M ULTI - MODAL M ULTI - TASK N ETWORK Dataset Udacity [12] SAIC Speed (MAE in m/s) 0.19 0.45 A. Steering Angle Prediction 2) Speed Command Generating: We introduce the methods for generating discrete speed commands. We first calculate acceleration from speed sequences with the following equation: speede − speeds (1) interval where acce is the calculated acceleration, speede is the speed at the end of the interval, speeds is the speed at the start of the interval. The interval is set to one second in our experiment. Two acceleration thresholds are then selected to generate the labels for the three classes: ”accelerating”, ”decelerating” and ”maintaining speed”. According to manual visual observations and domain experts’ suggestions, 0.25m/s2 and -0.25m/s2 are selected as the upper and lower thresholds, respectively. The accelerations larger than 0.25m/s2 are labeled as ”Accelerating”, and the values smaller than -0.25m/s2 is tagged with ”Decelerating”. Remaining minor speed changes are labeled as ”Maintaining Speed”. acce = V. E XPERIMENT The proposed method is evaluated on the public Udacity dataset [12] and the collected SAIC dataset. We first present the results of steering angle prediction. The performances of speed command predictions and speed value estimations are then evaluated. Finally, we introduce real car tests and an improved data synthesis method that solves the error accumulation problem in vehicle tests. We first evaluate the performance of end-to-end steering angle prediction. The proposed multi-modal multi-task model is compared with several state-of-the-art models and the proposed improved single task network. Nvidia’s PilotNet[6] and the Cg Network [25] proposed in the Udacity Self-Driving challenge is reimplemented and selected for comparison. As a regression task, the performance is reported in terms of MAE (Mean Absolute Error) in degree. Furthermore, we discard low speed data that is slower than 4m/s. It is observed that steering angles tend to be much larger when vehicles are almost stopped, which are considered as noise in steerings. The models are first evaluated on the Udacity dataset. As shown in Table I, the propose model is compared to the reimplemented Nvidia’s PilotNet[6] and the Cg Network [25] from the Udacity Self-Driving challenge. Nvidia’s PilotNet has five convolutional layers and five fully connected layers with an input of 200 ∗ 66. The Cg Network is even simpler with three convolutional layers and two fully connected layers. Furthermore, the proposed base steering model and the speed command network are compared in order to protrude the advantage of the proposed Multi-modal Multi-task network. As shown in Table I, the improved base steering mode outperforms the reimplemented Nvidia’s PilotNet[6] and the Cg Network [25]. This proves the effectiveness of the proposed CNN structure with larger kernel sizes and adjusted aspect ratios. PilotNet is proposed to work on other unpublished datasets, which might limit its performance in our evaluations. Fig. 4. Steering angle prediction results by the multi-modal multi-task network on the Udaicty dataset [12]. By comparing the multi-task speed command model to the base steering model, we observe a further improvement in the steering accuracy from 2.84◦ to 1.85◦ . This shows that the multi-task model provides additional speed prediction while further improves the performance of the steering angle prediction task. The multi-modal multi-task model further improves the steering accuracy from 1.85◦ to 1.26◦ . As an extension, the multi-modal multi-task model takes previous feedback speeds as an extra modality of inputs and predict the speed and steering angle simultaneously. The extra modality and task help the model better understand the vehicle condition and thus generate a more accurate steering angle prediction. Furthermore, we apply single exponential smoothing with thresholds [26], [8] on the final steering angle output. The intuition is to improve the vehicle control smoothness. The smoothing process adopts the following equation: θ̂t = α ∗ θt + (1 − α) ∗ θ̂t−1 (2) where θ̂t is the smoothed steering angle output at the current frame, θt is the steering angle prediction at the current frame and θ̂t−1 is the smoothed steering angle at the last timestamp. α is the smoothing factor and is set to 0.2. Experiments are also conducted on the newly collected SAIC dataset. We achieve a steering angle prediction accuracy of 0.17◦ with the multi-modal multi-task network. B. Discrete Speed Command Prediction As introduced in Section III-B, we first simplify the speed prediction problem into a multi-class classification problem where the classes are discrete speed commands. Experiments are conducted on the Udacity dataset and the SAIC dataset with the model structure shown in Figure 1 (b). We convert acceleration value sequences into discrete speed command sequences containing the labels of ‘accelerating’, ‘decelerating’ and ‘maintaining speed’. All discrete command labels are transferred into one-hot vectors. On the Udacity dataset, we achieve a speed command classification accuracy of 65.0%. Furthermore, the multi-task Fig. 5. Speed value prediction results by the multi-modal multi-task network on the Udaicty dataset [12]. model improves the steering angle prediction accuracy from 2.84◦ to 1.85◦ . Despite the improvements in steering angle prediction, the results are limited. After observing the error classes, we find two major reasons for the failure cases. First, the generated speed commands are noisy with the human factors-related speed changes. Increasing the interval in calculating the acceleration can alleviate the problem, but it leads to a delay in generating the speed command. Another problem is that it is inherently difficult to predict the speed command with only the visual inputs. As mentioned earlier, there is no need to slow down when the vehicle is already slow enough even if the obstacles are close to the vehicle. To solve these problems, we further propose the multi-modal multi-task network. C. Speed Control Value Prediction The multi-modal multi-task network, shown in Figure 2, directly predicts the speed value of the next frame by utilizing both visual inputs and feedback speed inputs. Different from speed command prediction, the ground truth labels of speed values are numerical values in unit of m/s and the problem is now modeled as a regression task. For inputs, the visual input is one single frame and the feedback speeds contain the speeds of 10 previous timestamps. Similar to steering angle prediction, the low speed data (less than 4m/s) is discarded to ensure a consistent driving condition. Experiments are conducted on both the Udacity and the SAIC datasets. The speed prediction performance of the multi-modal multi-task model is shown in Table II. We achieve an MAE of 0.19m/s on the Udacity dataset and an MAE of 0.45m/s on the SAIC dataset. Since the speed prediction task is novel, we did not find any baselines for comparison. The speed prediction results are plotted in Figure 5 and the predicted values match well with the ground truth. Furthermore, an improvement in steering angle prediction is observed with the multi-modal multi-task model. D. Road Tests and Data Synthesis Despite the good simulation results, we further discuss the challenges and corresponding solutions used in road tests. The major challenge in road tests is error accumulation. The accumulated error in the steering angle reflects as a shift vertical to the road and finally leads to the drift away of the vehicle. Similar error accumulation is also observed in speed control, as the feedback speeds have been used for future speed predictions. Therefore, the input data should contain adequate samples of recovering from failures. However, failure case data collection is dangerous and infeasible, since human drivers would have to frequently drive off the road and recover. Inspired by [6], we use side cameras to synthesize the failure case data for steering angle prediction. An artificial recovering angle is added with the following equation: θf = θr + arctan( dy ) s ∗ tr (3) where θf is the simulated steering angle with a recovering angle added, θr is the driver’s steering angle corresponding to the center camera, dy is the distance between the side and center cameras, s is the current speed and tr is the time of the whole recovering process. In our experiments, the camera offset dy is 20 inches (50.8 cm). Based on expert knowledge, we adopt a recovering time of one second in our experiments. Furthermore, we extend the data synthesis methods to speed data synthesis. Experiments on real cars show that vehicles would drift away without the data synthesis method. With the synthesized failure cases added, vehicles manage to drive autonomously on the road under a similar condition in SAIC. VI. C ONCLUSION In this paper, we address the challenging task of end-toend vehicle control in terms of both the speed and steering angle. A multi-modal multi-task framework is proposed for the joint task. The model takes front-view camera recordings and feedback speed sequences as the input. Experiments show that the proposed multi-task framework predicts the speed value accurately and further improves the accuracy of steering angle prediction. A new SAIC dataset is collected for evaluation and further studies. Finally, the error accumulation problem in real vehicle road tests are introduced. An extended data synthesis method is proposed for failure case simulation, which help solve the error accumulation problem. ACKNOWLEDGMENTS We thank the support of New York State through the Goergen Institute for Data Science, and SAIC USA. R EFERENCES [1] C. Chen, A. Seff, A. Kornhauser, and J. Xiao, “Deepdriving: Learning affordance for direct perception in autonomous driving,” in Proceedings of the IEEE International Conference on Computer Vision, 2015, pp. 2722–2730. [2] B. Huval, T. Wang, S. Tandon, J. Kiske, W. Song, J. Pazhayampallil, M. Andriluka, P. Rajpurkar, T. Migimatsu, R. Cheng-Yue et al., “An empirical evaluation of deep learning on highway driving,” arXiv preprint arXiv:1504.01716, 2015. [3] A. Gurghian, T. Koduri, S. V. Bailur, K. J. Carey, and V. N. Murali, “Deeplanes: End-to-end lane position estimation using deep neural networksa,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, 2016, pp. 38–45. [4] A. Geiger, M. Lauer, C. Wojek, C. Stiller, and R. Urtasun, “3d traffic scene understanding from movable platforms,” IEEE transactions on pattern analysis and machine intelligence, vol. 36, no. 5, pp. 1012– 1025, 2014. [5] H. Zhang, A. Geiger, and R. Urtasun, “Understanding high-level semantics by modeling traffic patterns,” in Proceedings of the IEEE International Conference on Computer Vision, 2013, pp. 3056–3063. [6] M. Bojarski, D. Del Testa, D. Dworakowski, B. Firner, B. Flepp, P. Goyal, L. D. Jackel, M. Monfort, U. Muller, J. Zhang et al., “End to end learning for self-driving cars,” arXiv preprint arXiv:1604.07316, 2016. [7] H. Xu, Y. Gao, F. Yu, and T. Darrell, “End-to-end learning of driving models from large-scale video datasets,” arXiv preprint arXiv:1612.01079, 2016. [8] J. Kim and J. Canny, “Interpretable learning for self-driving cars by visualizing causal attention,” arXiv preprint arXiv:1703.10631, 2017. [9] M. D. Zeiler and R. Fergus, “Visualizing and understanding convolutional networks,” in European conference on computer vision. Springer, 2014, pp. 818–833. [10] M. Bojarski, P. Yeres, A. Choromanska, K. Choromanski, B. Firner, L. Jackel, and U. Muller, “Explaining how a deep neural network trained with end-to-end learning steers a car,” arXiv preprint arXiv:1704.07911, 2017. [11] R. Rajamani, Vehicle dynamics and control. Springer Science & Business Media, 2011. [12] “Udacity. public driving dataset,” https://www.udacity.com/ self-driving-car, accessed: 2017-03-07. [13] D. A. Pomerleau, “Alvinn: An autonomous land vehicle in a neural network,” in Advances in neural information processing systems, 1989, pp. 305–313. [14] Y. LeCun, Y. Bengio, and G. Hinton, “Deep learning,” Nature, vol. 521, no. 7553, pp. 436–444, 2015. [15] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” in Advances in neural information processing systems, 2012, pp. 1097–1105. [16] L. Chi and Y. Mu, “Deep steering: Learning end-to-end driving model from spatial and temporal visual cues,” arXiv preprint arXiv:1708.03798, 2017. [17] M. Bojarski, A. Choromanska, K. Choromanski, B. Firner, L. Jackel, U. Muller, and K. Zieba, “Visualbackprop: visualizing cnns for autonomous driving,” arXiv preprint arXiv:1611.05418, 2016. [18] U. Muller, J. Ben, E. Cosatto, B. Flepp, and Y. L. Cun, “Off-road obstacle avoidance through end-to-end learning,” in Advances in neural information processing systems, 2006, pp. 739–746. [19] K. Xu, J. Ba, R. Kiros, K. Cho, A. Courville, R. Salakhudinov, R. Zemel, and Y. Bengio, “Show, attend and tell: Neural image caption generation with visual attention,” in International Conference on Machine Learning, 2015, pp. 2048–2057. [20] S. Chen, S. Zhang, J. Shang, B. Chen, and N. Zheng, “Brain inspired cognitive model with attention for self-driving cars,” arXiv preprint arXiv:1702.05596, 2017. [21] V. Sharmanska, N. Quadrianto, and C. H. Lampert, “Learning to rank using privileged information,” in Proceedings of the IEEE International Conference on Computer Vision, 2013, pp. 825–832. [22] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell, “Caffe: Convolutional architecture for fast feature embedding,” arXiv preprint arXiv:1408.5093, 2014. [23] K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” arXiv preprint arXiv:1409.1556, 2014. [24] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2016, pp. 770–778. [25] “Udacitysdc-challenge2,” https://github.com/udacity/self-driving-car/ tree/master/steering-models/community-models/cg23, accessed: 201612-15. [26] R. Hyndman, A. B. Koehler, J. K. Ord, and R. D. Snyder, Forecasting with exponential smoothing: the state space approach. Springer Science & Business Media, 2008.
1cs.CV
1 Load Balancing for 5G Ultra-Dense Networks using Device-to-Device Communications Hongliang Zhang, Student Member, IEEE, Lingyang Song, Senior Member, arXiv:1803.06082v1 [cs.IT] 16 Mar 2018 IEEE, and Ying Jun (Angela) Zhang, Senior Member, IEEE Abstract Load balancing is an effective approach to address the spatial-temporal fluctuation problem of mobile data traffic for cellular networks. The existing schemes that focus on channel borrowing from neighboring cells cannot be directly applied to future 5G wireless networks, because the neighboring cells will reuse the same spectrum band in 5G systems. In this paper, we consider an orthogonal frequency division multiple access (OFDMA) ultra-dense small cell network, where Device-to-Device (D2D) communication is advocated to facilitate load balancing without extra spectrum. Specifically, the data traffic can be effectively offloaded from a congested small cell to other underutilized small cells by D2D communications. The problem is naturally formulated as a joint resource allocation and D2D routing problem that maximizes the system sum-rate. To efficiently solve the problem, we decouple the problem into a resource allocation subproblem and a D2D routing subproblem. The two subproblems are solved iteratively as a monotonic optimization problem and a complementary geometric programming problem, respectively. Simulation results show that the data sum-rate in the neighboring small cells increases 20% on average by offloading the data traffic in the congested small cell to the neighboring small cell base stations (SBSs). Index Terms Device-to-device communications, ultra-dense small cell network, load balancing, sum-rate maximization, non-convex optimization. Part of this work has been presented in Proc. IEEE VTC-Spring 2017 [1]. H. Zhang and L. Song are with School of Electronics Engineering and Computer Science, Peking University, Beijing, China (email: {hongliang.zhang, lingyang.song}@pku.edu.cn). Y. J. Zhang is with the Department of Information Engineering, The Chinese University of Hong Kong, Shatin, New Territories, Hong Kong (email:[email protected]). 2 I. I NTRODUCTION The unprecedented growth in mobile devices and applications has triggered an explosion in the data traffic. According to Cisco’s report, global mobile data traffic has grown 4000-fold over the last decade, and is expected to reach 30.6 exabytes per month by 2020 [2]. To meet the surge in the traffic volume, vendors and operators are looking into every tool at hand to enhance the spectrum efficiency and network capacity. Ultra-dense small cell deployment is one of the most promising solutions in this regard [3]–[5]. Noticeably, traffic fluctuates far more significantly in small cells than in large cells, since small cells do not benefit from the “law of large numbers”. To address this issue, load balancing is recognized as an effective approach to alleviate traffic fluctuation in small cells [6], [7]. There has been a lot of research on load balancing in cellular networks. Most prior work focuses on borrowing channels from adjacent lightly loaded cells, such as selective borrowing [8], subcarrier borrowing without locking [9], and etc. Though effective, theses schemes do not work in the 5G ultra-dense small cell networks, where the same spectrum band is reused in neighboring small cells. Other techniques, including overlaying ad hoc relays on top of cellular networks [10], [11] and adapting cellular networks to the dedicated industrial scientific medical (ISM) band [12] or whitespaces spectrum [13], require the use of unlicensed spectrum to achieve load balancing. Moreover, due to uncoordinated channel access at the MAC layer, the interference from surrounding terminals is uncontrollable. Thus, operators cannot guarantee satisfactory Quality-of-Service (QoS) for mobile users. In this paper, we advocate device-to-device (D2D) load balancing as a useful mechanism to alleviate traffic fluctuation among small cells. Specifically, D2D communication enables two devices in proximity to communicate directly with each other by reusing cellular spectrum under the control of the small cell base station (SBS) [14]. Due to its underlay property [15]–[20] and proximity gain [21]–[23], D2D communication can relay traffic from congested small cells to adjacent under-loaded small cells without the need of extra spectrum. D2D load-balancing for cellular networks has been considered in the literature, e.g. [24]–[27]. In particular, [24] discussed the technical feasibility of D2D load balancing in cellular networks, and designed a base station (BS) selection algorithm to determine to which BS a user should route its traffic. The 3 work in [25] provided theoretical modeling and analysis to characterize the benefit of D2D load balancing, and derived a solution for allocating radio resources, including transmission power and time slots when the D2D route was fixed. D2D routing was considered in [26], where the destination BS was pre-determined, and a D2D link was only allowed to use one subchannel. The authors in [27] designed an online auction framework for the D2D routing and time slots allocation, when the subchannel allocation and the destination BS were given. In this paper, we consider OFDMA ultra-dense small cell networks, where a user can either send its data through the SBS in its own small cell, or route its data to a neighboring SBS with the help of multi-hop D2D communications. In the network, D2D links can share the spectrum with cellular links. Due to spectrum sharing, radio resource allocation is particularly important for interference management. Besides, the optimal SBS (destination) selection and D2D routing are indispensables, if the overall system performance is to be optimized. Unlike the existing work in [24]–[27] that only considers part of these issues, our work jointly optimizes resource allocation, D2D routing, and SBS selection. Therefore, the main contributions of this paper are summarized as follows: 1) To solve this optimization problem efficiently, we decouple the D2D load balancing problem into resource allocation and D2D routing subproblems, and propose an I-RA-DR algorithm to solve these subproblems iteratively. 2) We transform the resource allocation subproblem into a Monotonic Optimization (MO) problem [28]. By exploiting monotonicity, the MO problem can be solved by an accelerated polyblock outer approximation efficiently. 3) The D2D routing subproblem consists of two steps: SBS selection and routing. For SBS selection, we search all the potential SBSs of each flow and select the SBS with the maximum total sum-rate obtained by the routing decision. Meanwhile, the routing problem is transformed into a Complementary Geometric Programming (CGP) problem [29], which can be efficiently solved via an iterative convex relaxation approach. 4) Simulation results show that our proposed I-RA-DR algorithm can achieve a better performance than a greedy routing scheme and the scheme without load balancing. The rest of this paper is organized as follows. In Section II, we describe the system model. 4 Small Cell 1 Subchannel 1 Subchannel 2 SBS 1 User 3 User 1 SBS 3 User 4 User 2 User 6 SBS 2 Small Cell 3 User 5 Small Cell 2 Fig. 1. System model for D2D load balancing in an ultra-dense small cell network sharing uplink resource. In Section III, problem formulation is introduced. Then we decouple the problem into resource allocation and D2D routing subproblems. In Section IV, the resource allocation subproblem is transformed into a MO problem. Section V presents SBS searching and routing decision which is transformed into a CGP problem for the D2D routing subproblem. In Section VI, we analyze the overall convergence and computational complexity of the proposed I-RA-DR algorithm. Section VII evaluates the proposed I-RA-DR algorithm through numerical simulations. Finally, Section VIII concludes this paper. II. S YSTEM M ODEL As illustrated in Fig. 1, we consider the uplink of an orthogonal frequency division multiple access (OFDMA) ultra-dense small cell network with B SBSs, denoted by b ∈ B = {1, 2, . . . , B}. There exist M small cell users in the system, denoted by i ∈ M = {1, 2, . . . , M}. We also 5 assume that only F users, denoted by F = {1, 2, . . . , F }, have their own data to transmit, and each user corresponds to a data flow. For simplicity, data flow generated by user f is called data flow f . To balance the load in each small cell, a user can either send its data through the SBS in its own small cell, or route its data to a neighboring SBS via multi-hop D2D communications1. In Fig. 1, for example, user 2’s data is sent through SBS 1 by cellular communication, while the data generated by user 4 is sent to SBS 2 by a D2D route through user 5. Let K = {1, 2, . . . , K} be the set of K subchannels to be allocated. In this system, we assume that the spectrum reuse factor is 1, which means that the same frequency band is reused in all small cells. Besides, the power allocated to user i ∈ M over subchannel k is denoted by pk,i , P satisfying pk,i ≤ P , where P is the total transmitted power of user i. In particular, pk,i > 0 k∈K if subchannel k is allocated to user i, and pk,i = 0 otherwise. Suppose that the wireless channel is Rayleigh faded, and that the channel gain of link from node i to node j over subchannel k is expressed as k gi,j = Lki,j |hki,j |2 , (1) where Lki,j denotes the corresponding distance-dependent path loss and hki,j denotes the corresponding small-scale fading. The nodes can be users or SBSs, i.e., i, j ∈ M ∪ B. The path loss L is inversely proportional to the propagational distance d, i.e., L = κd−α , where α is the path loss exponent, and κ is the constant power gains factor introduced by amplifier and antenna. The small-scale fading hki,j ∼ CN (0, 1) follows a complex Gaussian distribution. In addition, the thermal noise satisfies independent Gaussian distribution with zero mean and the variance σ2. Define a flow matrix X(M +B)×(M +B)×F = [xfi,j ], where   1, when flow f transmits on link i − j, xfi,j =  0, otherwise. 1 (2) The number of D2D links for one flow is not predefined, instead, it is determined by the solution of the formulated problem. If the solution suggests that multi-hop D2D communications can achieve a better performance for the flow, then it will set up the multi-hop D2D communications. 6 Thus, we can derive the link matrix xi,j by xi,j = 1 − Y (1 − xfi,j ) (3) f ∈F to indicate whether link i − j is active. Besides, define a destination matrix D(M +B)×F = [di,f ] to indicate whether a node is the destination of a flow. Specifically,   1, when node i is the destination of flow f, di,f =  0, otherwise. (4) Likewise, define a source matrix S(M +B)×F = [si,f ] to indicate whether a node is the source of a flow, where si,f =   1, when node i is the source of flow f,  (5) 0, otherwise, respectively. It is worth mentioning that the entries in the destination matrix are decision variables, and those in the source matrix are constants. Besides, we define Ni as the neighbor set of node i, where j   ∈ Ni , node j is in the communication range of node i,  (6) ∈ / Ni , otherwise. In this paper, a link is allowed to transmit on multiple subchannels, which can be realized by carrier aggregation technique [30], [31]. The signal-to-interference-plus-noise ratio (SINR) at k the link i − j over subchannel k, denoted by γi,j , is calculated as k γi,j = σ2 + P i′ 6=i,j ′ 6=j k xi,j pki,j gi,j P P . k xi′ ,j pki′ ,j gik′ ,j xi,j ′ pki,j ′ gi,j xi′ ,j ′ pki′ ,j ′ gik′ ,j + ′ + i,j ′ 6=j (7) i′ 6=i,j According to the Shannon capacity formula, the achievable data rate Ri,j is given by X k log2 (1 + γi,j ). Ri,j = (8) k∈K f We denote the rate of flow f by rf , and the rate of flow f on link i − j by ri,j . As the total transmission rate of all the flows in link i − j cannot exceed the capacity of this link, the rate f ri,j needs to satisfy X f ∈F f ri,j ≤ Ri,j , ∀i ∈ M, ∀j ∈ M ∪ B. (9) 7 Moreover, since the rate of a flow on each link is equal to the input rate from the source, the rate of a flow needs to be the same on all links in the path. Therefore, the data rate of a flow can be defined as the input rate from the source, i.e., XX f rf = ri,j si,f , ∀f ∈ F . (10) i∈M j∈Ni In addition, the incoming and outgoing rates for a flow must satisfy flow conservation constraints: X f X f rj,i − ri,j = rf (di,f − si,f ), ∀i ∈ M, ∀f ∈ F . (11) j∈Ni j∈Ni Note that the data rate for a flow is positive on a link only if this flow goes through this link. Thus, we also have the following constraint: f f ri,j = 0 ⇔ xfi,j = 0, ri,j > 0 ⇔ xfi,j = 1. Finally, the destination of a flow path must be a SBS. That is to say, X X di,f = 1, ∀f ∈ F , di,f = 0, ∀f ∈ F . i∈B (12) (13) i∈B / III. P ROBLEM F ORMULATION The proposed D2D load balancing scheme aims to maximize the total sum-rate by optimizing xfi,j , di,f , and pki,j for all flows and nodes. The optimization problem is formulated as: X P1 : maximize rf , X;D;P s.t. X f rj,i − X di,f = 1, X f ri,j ≤ Ri,j , ∀i ∈ M, j ∈ M ∪ B, j∈Ni (14a) f ∈F X f ri,j = rf (di,f − si,f ), ∀i ∈ M, f ∈ F , (14b) j∈Ni i∈B X di,f = 0, ∀f ∈ F , (14c) i∈B / (14d) f ∈F Y (1 − xfi,j ), (14e) pki,j ≤ P, ∀i ∈ M, j ∈ M ∪ B, (14f) xi,j = 1 − f ∈F X k∈K 8 rf = XX f ri,j si,f , (14g) i∈M j∈Ni di,f , xfi,j ∈ {0, 1}, (14h) 0 ≤ pki,j ≤ P, (14i) f f ri,j = 0 ⇔ xfi,j = 0, ri,j > 0 ⇔ xfi,j = 1, (14j) where Ri,j is given in (8). Constraints (14b) correspond to the flow conservation of each flow. Constraints (14c) imply that each flow path only ends at a SBS. Constraints (14d) are the rate constraints on each link. The constraints in (14e), (14g), and (14j) correspond to equations (3), (10), and (12), respectively. Constraints (14f) are the transmission power constraints for each link. Note that this is an NP-hard problem due to the binary variables in constraints (14b)-(14e) and the interference term in constraint (14d). In what follows, we tackle the problem through alternating maximization, where resource allocation (RA) and D2D routing (DR) are optimized iteratively. The proposed algorithm is referred to as I-RA-DR algorithm, where “I” stands for “iterative”. The flowchart of the I-RA-DR algorithm is shown in Fig. 2. Given the D2D routing result (X (t) , D(t) ), the resource allocation subproblem can be transformed to an MO problem, where a sub-optimal solution can be obtained by the accelerated polyblock outer approximation method. Likewise, given the resource allocation decision and SBS selection (P (t) , D(t) ), the D2D routing subproblem can be formulated as a CGP problem, which can be turn into a Geometric Programming (GP) problem [33], [34] by approximating its non-convex constraints. The details of the solution algorithms of the resource allocation and D2D routing subproblems will be discussed in Section IV and V, respectively. IV. M ONOTONIC O PTIMIZATION FOR R ESOURCE A LLOCATION In this section, we first reformulate the resource allocation subproblem as a MO problem, and then propose a RA algorithm to solve this problem. 9 Initial power matrix P(0), t = 0 Solve D2D routing subproblem: SBS searching and routing decision; Obtain optimal solution (X(t),D(t)) Solve resource allocation subproblem; Obtain optimal solution P(t) Stopping criteria satisfied? t = t +1; Update power matrix P(t) N Y Optimal solution (P*,X*,D*) Fig. 2. I-RA-DR algorithm for D2D load balancing. A. Monotonic Optimization Formulation Suppose that the D2D routing decision, i.e., flow matrix X and destination matrix D is k k 1 k K given. Let γ̃i,j = γi,j + 1 and γ̃ = [γ̃1,1 , . . . , γ̃i,j , . . . , γ̃M +B,M +B ]. Then, problem (P1) can then be rewritten as P2: s.t. maximize P P P P f ∈F i∈M j∈Ni f ri,j si,f , (14b), (14f), (14g), (14i), and (14j), P f P k ri,j ≤ log2 γ̃i,j . f ∈F (15) k∈K Due to the coupling interference constraints among all concurrent links, the resource allocation subproblem (P2) is nonconvex. However, the problem exhibits hidden monotonic structures, which can be exploited to obtain global optimal solutions efficiently. In the following, we first introduce the preliminaries of MO [28], [32]. Then, we will show how the resource allocation 10 subproblem can be reformulated as a MO problem. 1) Preliminaries of MO: Definition 1. A set Q ⊂ RN + is called normal if ∀q0 ∈ Q, all the points q with 0  q  q0 satisfy q ∈ Q. Here, q  q0 means that q is component-wise less than or equal to q0 . Definition 2. An optimization problem can be transformed to a MO if it can be represented by maximize g(q), q (16) q ∈ Q, s.t. N where Q ⊂ RN + is a non-empty normal set and the function g(q) is increasing over R+ . Definition 3. Let y, z ∈ RN + and y  z. The hyper-rectangle determined by y and z is N Q called a box in RN , i.e., [y, z] = [yn , zn ], where [yn , zn ] is the n-th dimension of the box. For + n=1 example, when n = 2, the box is reduced to a rectangle [y1 , z1 ] × [y2 , z2 ]. The points y and z are called the lower bound vertex and upper bound vertex, respectively. A set is called polyblock if it is the union of a finite number of boxes. Remark 1. A polyblock is normal. 2) Transformation to MO: Given any feasible resource allocation result P that satisfies constraints (14f) and (14i), the value of γ̃ is also determined. We define r ∗ (γ̃(P )) to denote f 1 F the global optimal solution of r = [r1,1 , . . . , ri,j , . . . , rM +B,M +B ] by solving problem (P2). In particular, r ∗ (γ̃(P )) can be obtained by solving the following problem P P P f ri,j si,f , P3: maximize r s.t. f ∈F i∈M j∈Ni (14b), (14g), and (14j), P f P k ri,j ≤ log2 γ̃i,j . f ∈F (17) k∈K Note that problem (P3) is a linear programming problem, we can obtain the global optimal solution r ∗ (γ̃(P )) using a linear programming solver. Correspondingly, we define g(r ∗(γ̃)) as the global optimal sum-rate of problem (P2) for given γ̃. In this way, the search for resource 11 z(2),1 z(1),2 (0) y(1),2 y q z(1),1 q(1) (2),1 y(1),2 y(2),2 z(2),2 q(0) y(1),1 y(1),1 Fig. 3. z(1),2 Illustration of procedure for constructing a new polyblock. allocation variable P can be transformed into the search for SINR γ̃, and thus, problem (P2) can be rewritten as P4: s.t. g(r ∗(γ ′ )) = maximize ′ γ ∗ P P P r ∗ (γ ′ ), f ∈F i∈M j∈Ni ′ r (γ ) is the optimum to problem (P3), (18) γ ′ ∈ Q, where the feasible set is defined as Q = {γ ′ |0  γ ′  γ̃(P ), (14f) and (14i)}. (19) The constraints in the problem (P3) indicate that the feasible set of r is enlarged with the increase of γ̃. This implies that the function g(r ∗(γ̃)) is increasing with γ̃. In addition, the feasible set Q is normal. Thus, problem (P4) is a MO problem as defined in Definition 2. B. Resource Allocation Algorithm Now, we describe the solution algorithm for problem (P4). Define ∂Q as the upper boundary of set Q. The key idea of MO is to successively maximize the increasing objective function g(r ∗ (γ̃)) on a sequence of polyblocks P (i) enclosing ∂Q [28]. The most important operation is to calculate the boundary points q (i) on ∂Q within P (i) . In the following, we elaborate the detailed steps of the RA algorithm. 12 Step 1 Initialization: We give an initial polyblock P (0) that encloses the boundary ∂Q. Without the loss of generality, P (0) can be simply constructed as P (0) = [y (0) , z (0) ], where T y (0) = 1(M +B)2 K×1 and z = γ with γ = [γ 11,1 , . . . , γ K (M +B),(M +B) ] , and γ ki,j k xi,j P gi,j = 1+ , ∀i, j ∈ M ∪ B, k ∈ K. σ2 (20) Step 2 Shrinking: If the upperbound vertex z (i) over P (i) are found in the boundary ∂Q, then z (i) is the global optimal solution of problem (P4). Otherwise, we need to construct a smaller polyblock P (i+1) that still contains the boundary ∂Q to approximate the global optimal solution. Specifically, in a box B (i) = [y (i) , z (i) ] ∈ P (i) , we need to find a boundary point q (i) , and obtain some smaller boxes enclosing the boundary ∂Q, i.e., B(i) \([y (i) , q (i) ) ∪ (q (i) , z (i) ]), to replace B(i) . Boundary point q (i) is the intersection between the boundary ∂Q and the line segment from y (i) to z (i) , which will be discussed in Subsection IV-C. Next, we remove all the boxes whose upperbound vertex z satisfies g(r ∗ (z)) ≤ Φ(P (i) ). (21) Here, Φ(P (i) ) is the current best value on polyblock P (i) , which is equal to Φ(P (i) ) = max{g(r ∗(q (i) )), Φ(P (i−1) )}. (22) An illustration of this step in a two-dimensional feasible set is given in Fig. 3. The initial polyblock P (0) is with lower bound vertex y (1) and upper bound vertex z (1) . Here, y (i),1 and y (i),2 are the projections on the first and second dimensions of vertex y (i) , respectively. Likewise, z (i),1 and z (i),2 are the projections on the first and second dimensions of vertex z (i) . We obtain the boundary point q (0) by intersecting the boundary and the line from y (1) to z (1) , then delete the boxes [y (1) , q (0) ] and [q (0) , z (1) ] from the initial polyblock P (0) and form a new polyblock P (1) . Step 3 Termination: We repeat these steps until the global optimal solution is found. This will lead to a series of polyblocks containing ∂Q: P (0) ⊃ P (1) ⊃ . . . ⊃ ∂Q. The convergence of the RA algorithm is guaranteed only with infinite iterations. For practical implementation, we can terminate this algorithm when either g(r ∗(z)) − Φ(P (i) ) ≤ ǫ or ||z (i) − y (i) ||∞ ≤ η, where ǫ > 0 and η > 0 are predefined error tolerance levels. 13 Step 1 Initialization: Initial polyblock P(0), i = 0 Step 2 Shrinking: Obtain boundary point q(i); Construct a smaller polyblock P(i+1); Calculate the best value (P(i+1)) Step 3 Termination: Satisfy terminal condition? i = i +1 N Y Obtain optimal solution P* from (23) Fig. 4. RA algorithm for resource allocation. When the algorithm terminates, we obtain the boundary point in each box as the SINR solution. We define v (i) as the best feasible solution for the SINR at iteration i, where   v (i−1) , g(r ∗(q (i) )) ≤ Φ(P (i) ); (i) v =  q (i) , otherwise. (23) The flowchart of RA algorithm is provided in Fig. 4. C. Boundary Point q (i) Calculation According to the aforementioned algorithm, at iteration i, a critical step is to calculate the boundary point q (i) . The boundary point can be obtained by the intersection between ∂Q and the line segment from y (i) to z (i) , which can be given by q (i) = (1 − κ∗ )y (i) + κ∗ z (i) . Since y (i) 14 is an inner vertex of Q and z (i) is an outer vertex of Q, the larger κ with u(i) (κ) ∈ Q implies that it gets closer to the boundary ∂Q. Therefore, κ∗ is the solution of the following problem. P5: maximize κ, s.t. u(i) (κ) = (1 − κ)y (i) + κz (i) ∈ Q, (24) 0 ≤ κ ≤ 1. The bisection search starts with the initial interval [κ, κ] = [0, 1]. The algorithm first calculates κ = (κ + κ)/2, and then checks the feasibility of u(i) (κ). If we can find a feasible solution of problem (24), κ is replaced by κ. Otherwise, κ is replaced. The feasibility check of u(i) (κ) works as follows. Since u(i) (κ) = γ̃(κ), we will check whether γ̃(κ) is feasible instead. Define interference matrix A with entries  k g    i,j , i 6= j, k aki,j = gj,j    0, otherwise, 2 and a vector ν = ( gσ1 , . . . , g1 1,1 σ2 (M +B),(M +B) 2 , gσ2 , . . . , gK 1,1 σ2 (25) )T . Note that A is block diagonal (M +B),(M +B) due to synchronous transmission. According to the SINR definition in (7), we have k γ̃i,j (κ) pki,j −1= , i, j ∈ B ∪ M. (Ap + ν)ki,j (26) By rearranging the terms, (26) can be rewritten as diag(γ̃(κ) − 1)ν = (I − diag(γ̃(κ) − 1)A)p. (27) Denote the spectral radius of matrix diag(γ̃(κ) − 1)A by ρ(diag(γ̃(κ) − 1)A). The following property helps to check whether γ̃(κ) is feasible. Theorem 1. For any γ̃(κ)  1, γ̃(κ) is feasible if ρ(diag(γ̃(κ) − 1)A) < 1 and with p = (I − diag(γ̃(κ) − 1)A)−1 diag(γ̃(κ) − 1)ν. Proof: The proof of Theorem 1 is given in Appendix A. Based on Theorem 1, the steps of feasibility check are summarized as follows: 1) Construct A according to (25). P k∈K pki,j ≤ P 15 2) If ρ(diag(γ̃(κ) − 1)A) ≥ 1, then γ̃(κ) and thus u(i) (κ) is infeasible. Otherwise, set p = σ 2 (I − diag(γ̃(κ) − 1)A)−1 diag(γ̃(κ) − 1). P k pi,j ≤ P , then u(i) (κ) is feasible. Otherwise, it is infeasible. 3) If k∈K Remark 2. Denote N = {1, . . . , 2(M + B)2 K}. In each iteration, from computational point of view, we will not further partition the box along n-th axis for any n ∈ N when zn − yn ≤ η. Let I = {n ∈ N : zn − yn ≤ η}. We can only partition the boxes in N \ I, and thus, the number of new boxes is 2|N \ I| − 2. D. An Accelerated Method According to Remark 2, there are 2|N \ I| − 2 new boxes are generated at iteration i. Thus, the size of the box set grows quickly at each iteration when the number of small cell users M is large. To tackle this problem, we present an accelerated algorithm that prevents the size of box set from growing too fast, so as to expedite the convergence. The solution is sub-optimal when the accelerated method is applied. The accelerated method is to skip searching the neighboring boxes to achieve a trade-off between the optimality and the complexity. The partition scheme in RA algorithm suggests that partitions over the boxes with symmetric upper bound and lower bound vertices [y1 , z1 ] and [y2 , z2 ] yield nearly equally lower and upper bounds (g(r ∗(q1 )), r ∗ (z1 )) and (g(r ∗ (q2 )), r ∗ (z2 )). Such symmetry implies that there could exist more than one equally optimal box at each iteration. Therefore, selecting any one of these boxes and eliminating the others would not severely affect the optimality of the algorithm. One difficulty of this idea is the identification of symmetric boxes. To address this issue, we first give two definitions. Definition 4. The distance between two boxes B1 = [y1 , z1 ] and B2 = [y2 , z2 ] is defined as d(B1 , B2 ) = max{||y1 − y2 ||, ||z1 − z2 ||}. Definition 5. Two boxes B1 and B2 are said to be symmetric if and only if d(B1 , B2 ) ≤ δ, where δ ≥ 0 is predefined. Based on these two definitions, the symmetric box set of the best box B is defined as J (i) = {B : d(B, B) ≤ δ, B ∈ P (i) }. (28) 16 Therefore, RA algorithm can be modified as follows. Find the symmetric box set J (i) of B (i) according to (28), and skip all the boxes in J (i) in the shrinking process. V. C OMPLEMENTARY G EOMETRIC P ROGRAMMING FOR D2D ROUTING In this section, we first reformulate the D2D routing subproblem as a CGP problem given the SBS decision, and then propose a DR algorithm to solve this problem. A. Complementary Geometric Programming Formulation Given the resource allocation result p, problem (P1) can be rewritten as P P P f ri,j si,f , P6: maximize x,d s.t. f ∈F i∈M j∈Ni (29) (14b), (14c),(14d),(14e), (14h), and (14j). A close look at these constraints suggests that all the constraints are convex except constraint (14d). Note that k 1 + γi,j P k σ 2 + xi,j pki,j gi,j i,j P = 2 σ + xi′ ,j ′ pki′ ,j ′ gik′ ,j (30) i′ 6=i,j ′ 6=j k in constraint (14d) is nonconvex of variable x. However, 1 + γi,j is a ratio between two posynomials of x. Minimizing a ratio between two posynomials is a class of nonconvex problems known as CGP. In the following, we first briefly introduce some preliminaries of CGP [29]. Then, given the destination matrix d, problem (P6) will be reformulated as a CGP problem . 1) Preliminaries of CGP: Definition 6. A CGP is an optimization problem of the form min f0 (x) s.t. gl (x) ≤ 1, ∀l = 1, . . . , n1 , hl (x) = 1, ∀l = 1, . . . , n2 , wl1 (x) wl2 (x) (31) ≤ 1, ∀l = 1, . . . , n3 , where hl (x) are monomial functions and f0 (x), gl (x), wl1 (x), as well as wl2 (x) are posynomial functions. 17 2) Transformation to CGP: First, we show that relaxing the binary constraints on x does not affect the optimality of the solution. f Theorem 2. By approximating xfi,j with xfi,j = 1 − exp(−θri,j ), the relaxation of constraint (14e), i.e., Y xi,j + f (−θ) (r̃i,j ) ≤ 1, xi,j ≥ 0, (32) f ∈F is exact when θ is sufficiently large. Proof: The proof of Theorem 2 is given in Appendix B. f f Let r̃i,j = exp(ri,j ). Problem (P6) can then be rewritten as follows, given the destination d. YY Y f P7: maximize (r̃i,j )si,f , (33a) x,r s.t. Q j∈Ni f ∈F i∈M j∈Ni Q j∈Ni f r̃i,j Q Q f r̃i,j f ∈F xi,j + f (r̃u,v )su,f (di,f −si,f ) = 1, (33b) u∈M v∈Nu σ2 + Y f r̃j,i Y k∈K Y P i′ 6=i,j ′ 6=j σ2 + P i,j xi′ ,j ′ pki′ ,j ′ gik′ ,j ′ k xi,j pki,j gi,j ≤ 1, f (−θ) (r̃i,j ) ≤ 1, (33c) (33d) f ∈F 0 ≤ xi,j . (33e) Note the fact that the left hand side (LHS) of constraint (33b) is monomial, the LHS of constraint (33c) is the ratio of two posynomial functions, and the LHS of constraint (33d) is posynomial. Therefore, problem (33) is a CGP problem when d is given. In the following, we will design an iterative algorithm to solve the D2D routing subproblem efficiently. B. Algorithm Design for D2D Routing In the last subsection, we have reformulated the D2D routing subproblem as a CGP problem (33) given the destination matrix d. This subsection first presents an efficient algorithm to solve the problem. Then, we present an efficient algorithm for the SBS searching. 18 1) Posynomial Approximation: We first present an algorithm to solve problem (33). Note that the LHS of constraint (33c) is nonconvex. Here, we simplify the problem by approximating it by a monomial approximation. Then, the problem can be turned into a GP problem that can be solved efficiently [33]. Denote the LHS of constraint (33c) by W (r̃, x) and its approximation P k by Ŵ (r̃, x). In addition, denote hk (x) = σ 2 + xi,j pki,j gi,j , and the monomial approximation i,j ĥk (x) = ck Q ak xi,ji,j . i,j P k k Define logarithm transformations ti,j = log xi,j , gk (t) = log hk (t) = log( eti,j gi,j pi,j + σ 2 ), i,j P k and ĝk (t) = log ĥk (t) = log ck + ai,j ti,j . Equating the first-order Taylor expansion of gk (t) at i,j t′ with ĝk (t), we have gk (t′ ) + X ∂gk (t) i,j ∂ti,j (ti,j − t′i,j ) = log ck + X aki,j ti,j , (34) , (35) i,j which implies that aki,j = ∂gk (t) xi,j ∂hk (x) = ∂ti,j hk (x) ∂xi,j xi,j =x′i,j and ck = exp(gk (t′ ) − X ∂gk (t) i,j ∂ti,j hk (x) t′i,j ) = Q ak xi,ji,j i,j . (36) xi,j =x′i,j Once aki,j and ck are computed, the LHS of the approximated constraint can be expressed by P σ2 + xi′ ,j ′ pki′ ,j ′ gik′ ,j ′ Y f Y ′ ′ i 6=i,j 6=j r̃i,j , (37) W (r̃, x) = Q ak ck xi,ji,j k∈K f ∈F i,j which is monomial. Using the monomial approximation, the problem (P7) is converted into GP that can be solved efficiently using convex optimization techniques [34]. 2) Iterative GP Algorithm: In this subsection, we present the iterative GP algorithm to solve problem (P7) through a sequence of posynomial approximation. At the beginning of each iteration, we have an initial value for variables (r̃, x). Then, we replace constraint (33c) using the aforementioned monomial approximation approach, and convert this problem into a GP problem. The solution of the GP problem is taken as the initial value of the monomial approximation in the next iteration. 19 Initialize destination matrix D(l), optimal solution D* = D(l), l = 0 Given destination matrix D(l), initialize feasible solution X(k), k=0 Posynomial approximation of constraint (25c) near X(k), Solve problem (P6) for X(k+1) Stopping criteria satisfied? k = k +1 N Y SBS Selection: compare sum-rate SR(l) with the best one SR*; (l) If SR > SR*, SR* = SR(l), D* = D(l) U is empty? l = l +1 Update the destination matrix D(l) N Y Optimal solution (X(t),D(t)) Fig. 5. Iterative GP algorithm for the D2D routing subproblem. Theorem 3. The solutions obtained by the iterative GP algorithm converges to the KKT conditions of problem (P7). Proof: Please refer to [29]. 20 3) SBS Selection: In this subsection, we will discuss how to search the solution for destination matrix d. Since destination variables are binary, the feasible solution for each flow is finite. Thus, we can search these feasible solutions for the global optimal one. Note that the exhaustive search for the global optimal solution requires solving B F CGP problems, whose computational complexity grows exponentially as the number of flows. Thus, we propose a local search method to reduce the computational complexity. Denote U by the set of flows that have not found the local optimal destination. Initially, U = F . SBS selection follows three searching steps as below: Step 1: Give an initial feasible solution for the destination matrix d, and then solve problem (P7) to obtain the D2D routing result x; Step 2: Choose the flow fl with the lowest data rate from set U, and try each SBS b ∈ B, i.e., dfl ,b = 1, dfl ,i = 0, i ∈ B\{b}. In the enumeration for SBS b, recall the iterative GP algorithm to obtain the total sum-rate. Among the enumerations, the SBS with the maximum sum-rate bm will be selected as the destination for flow fl , i.e., dfl ,bm = 1, dfl ,i = 0, i ∈ B\{b}. Then, remove flow fl from the set U; Step 3: Repeat Step 2 until set U is empty. Using this local search method, we can find the solution for the destination matrix d by solving BF CGP problems. The flowchart of the iterative GP algorithm for the D2D routing subproblem is shown in Fig. 5. VI. OVERALL C ONVERGENCE AND C OMPLEXITY A NALYSIS In this subsection, we will first prove the convergence of the I-RA-DR algorithm. Then, we provide some analyses on the computational complexity and the signaling cost. A. Convergence Analysis Define g(P , X, D) = P rf . First, in the resource allocation subproblem, we obtain the f ∈F (t) solution given X (t) and D . Therefore, we have g(P (t+1) , X (t) , D(t) ) ≥ g(P (t) , X (t) , D(t) ). (38) 21 Second, in the D2D routing subproblem, we solve a local optimal solution given P (t+1) , thus, the following inequality holds: g(P (t+1) , X (t+1) , D(t+1) ) ≥ g(P (t+1) , X (t) , D(t) ). (39) Based on the above two inequalities (38) and (39), we can obtain g(P (t+1) , X (t+1) , D(t+1) ) ≥ g(P (t) , X (t) , D(t) ), (40) which implies that the objective value of problem (P1) is non-decreasing after each iteration of the I-RA-DR Algorithm. Since the objective value of problem (P1) is upper bounded by a finite value, the proposed I-RA-DR algorithm is guaranteed to converge. B. Computational Complexity Analysis In the resource allocation subproblem, we transform it as MO problem and obtain its solution by polyblock outer approximation method. However, the computational complexity of MO is still an open problem. To accelerate the convergence of the polyblock outer approximation method, we skip those boxes which are symmetric, at least 2δ 2δ+||z−y|| of boxes will be skipped in the RA algorithm, and the proportion of the skipped boxes is positively related to the dimension of z. In the D2D routing subproblem, we reformulate it as a CGP problem given the destination and solve it by successive GP approximation. According to the results in [35], the GP problem can be solved in polynomial time and GP approximation can terminate within few iterations in practice. Besides, the SBS selection requires to solve BF CGP problems, therefore, the D2D routing subproblem can be solved in polynomial time and the computational complexity of one iteration mainly comes from the resource allocation subproblem. C. Signaling Cost Analysis To describe the signaling cost of the proposed I-RA-DR algorithm, we assume that µ messages are required for a user to report its location, υ messages are necessary for the subchannel estimation, ζ messages are needed for the BS to notify a user about the allocated subchannels, transmission power, and routing results, and ξ messages for two SBSs to exchange information such as location and resource utilization. In the D2D routing subproblem, each user i ∈ M 22 TABLE I PARAMETERS FOR S IMULATION Network layout 50m-by-50m area Number of small cells 3 Small cell radius 10 m User’s Transmit Power P 20 dBm Transmission Bandwidth 20 MHz Carrier Frequency 1.9 GHz Noise Figure 5 dB Decay Factor of the Path Loss α 3.5 Power Gains Factor κ -31.5 dB Error Tolerance Level ǫ 0.1 Error Tolerance Level η 3 Error Tolerance Level δ 20 needs to upload its location to the associated SBS, and thus, this requires at most µM messages. Besides, each SBS also needs to exchange information with the others, therefore, at most B(B − 1)ξ messages are needed for the information interaction among SBSs. Note that the data traffic can only be offloaded to the neighboring small cells, and thus, the number of involved SBS B can be restricted. In the resource allocation subproblem, each active link needs to inform the associated SBS of the estimated channel information, and then the SBS will response to the requested link. P Therefore, (µ + υ) xi,j messages are required for the resource allocation. Due to the limited i,j subchannel resources, the number of active links is constrained, and thus, the signaling cost of the resource allocation can be also restricted to a tolerable level. VII. S IMULATION R ESULTS In this section, we evaluate the performance of the I-RA-DR algorithm for D2D load balancing. We consider a three-cell scenario, in which the users are uniformly distributed, and the data traffic generated in different cells are imbalanced to show the proposed algorithms can achieve efficient load balancing. In addition, we show that the D2D load balancing can improve the system performance on the data rate. In different small cells, the same set of available subchannels are 23 15 Without Load Balancing Data Rate for A Small Cell(bit/s/Hz) With Load Balancing 10 5 0 Fig. 6. 1 2 Small Cells 3 Distribution of the data rate for a small cell with K = 4 and N = 30. deployed. For simplicity, we assume that the numbers of users are also identical in different small cells. The simulation parameters are listed in Table I based on the existing LTE/LTE-Advanced specifications [36]. In Fig. 6, we plot the distribution of the data rate for a small cell with K = 4 subchannels and N = 30 users. Suppose that there are [8, 2, 1] users generating data traffic in respective small cells. Without load balancing, users get access to subchannels orthogonally, and each small cell can only support at most 4 users. On the contrary, with D2D load balancing, some users can set up D2D communications and detour the load traffic to the neighboring small cells. In Fig. 6, the data rate in small cell 2 and 3 increase by 18% and 75%, respectively. However, due to the interference from D2D communications, the data rate in small cell 1 decreases by 8%. It can be easily observed that the increased sum-rate caused by traffic detouring can make up the decreased sum-rate due to the intra-channel interference, and hence the total sum-rate grows. In Fig. 7, we plot the system sum-rate as a function of the number of flows F with N = 30 24 34 33 Without Load Balancing I−RA−DR Algorithm Greedy Routing Algorithm System Sum−rate (bit/s/Hz) 32 31 30 29 28 27 26 25 7 Fig. 7. 8 9 Number of Flows F 10 11 Sum-rate with the number of flows F for N = 30 and K = 4. users and K = 4 channels. There are [6, 2, 1] users generating data flows in small cell 1, 2, and 3, respectively, and the increased flows are all from small cell 1. In Fig. 7, we compare the system performance with the scheme without load balancing, and the scheme using Greedy routing algorithm with power control. Greedy algorithm always selects the nearest SBS as the destination, and the node closest to the destination SBS in the node candidate set as the D2D relay node. Without load balancing, the concurrent transmitting users in each small cell cannot exceed the number of subchannels. Thus, even the number of active users increases, the total sum-rate remains the same. It can be also observed that the system sum-rate obtained by the I-RA-DR algorithm is always higher than that using the greedy algorithm. This is because the greedy algorithm only considers interference, and the target data rate is not maximized. In Fig. 8, we plot the number of D2D links as a function of the number of users N with K = 4 channels. There are [7, 2, 1] users generating data flows in small cell 1, 2, and 3, respectively, and the increased flows are all from small cell 1. In this figure, we can learn that most flows can be offloaded to the neighboring SBS by one-hop D2D communications due to the ultra-dense SBS deployment. In addition, we can also observe that the number of D2D links increases slightly 25 3.5 Number of D2D Links 3 F=8 F=9 F = 10 2.5 2 1.5 1 0.5 27 30 33 36 39 42 Number of Users N Fig. 8. Number of D2D links with the number of users N for K = 4. 31 System Sum−rate (bit/s/Hz) 30 29 28 Without Load Balancing I−RA−DR Algorithm Greedy Routing Algorithm 27 26 25 27 Fig. 9. 30 33 36 Number of Users N 39 42 Sum-rate with the number of users N for F = 9 and K = 4. with the number of users N. This is because more users can provide more options in D2D routing. 26 1 Cumulative Distribution Function (CDF) 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 Without Load Balancing, F = 8 I-RA-DR Algorithm, F = 8 Without Load Balancing, F = 9 I-RA-DR Algorithm, F = 9 0.1 0 0 5 10 15 20 25 30 Data Rate of A Flow (bit/s/Hz) Fig. 10. Cumulative distribution function of data rate of a flow with K = 4 and N = 30. In Fig. 9, we plot the sum data rate as a function of the number of users N with F = 9 flows, i.e., there are [6, 2, 1] users generating data flows in small cell 1, 2, and 3, respectively, and K = 4 channels. Without load balancing, the concurrent transmission users need to be less than K, thus, there are 4 users communicating with SBS directly. For this reason, the sum data rate without load balancing keeps a constant even N grows. As for the I-RA-DR and greedy algorithms, more D2D relay users provide a diversity for relay selection. Thus, the system sumrate increases as the number of users grows. The simulation results show that the system sum-rate increases 0.2 bit/s/Hz using the I-RA-DR algorithm for there more D2D relays. In Fig. 10, we plot the Cumulative Distribution Function (CDF) of the data rate of a flow with K = 4 and N = 30. There are [5, 2, 1] users generating data flows in small cell 1, 2, and 3, respectively, and the increased flows are all from small cell 1. Without load balancing, the concurrent transmission users need to be less than K. Thus, there are 12.5% of edge users in outage when F = 8 and 22.2% of edge users in outage when F = 9. While in the I-RA-DR algorithm, the data generated from the cell edge users can be offloaded to the neighboring small cells by D2D communications, and thus, more users are active. For this reason, the D2D load balancing can effectively improve the data rate of the cell edge users. However, due to the 27 28.8 28.6 System Sum−rate (bit/s/Hz) 28.4 28.2 28 27.8 27.6 27.4 N = 27 N = 30 N = 33 27.2 27 26.8 2 Fig. 11. 4 6 8 10 Number of Iterations 12 14 16 Convergence speed of I-RA-DR algorithm. spectrum sharing of the D2D links, the average data rate for the active flows decreases. In Fig. 11, we demonstrate the convergence speed of the proposed I-RA-DR algorithm. We plot the sum data rate versus the number of iterations when F = 8 flows, i.e., there are [5, 2, 1] users generating data flows in small cell 1, 2, and 3, respectively, and K = 4 channels for different values of N. It can be seen that around 10 iterations are needed for convergence. In addition, we can observed that the number of iterations does not increase as the number of users N grows. In Fig. 12, we plot the running time per each iteration versus the number of users with K = 4 channels for different values of F . We can learn that the larger number of users or flows will lead to a longer running time for one iteration. It can also be observed that F affects the running time more significantly than N, because F will affect the running time of the both two subproblems while N only affects that of the D2D routing subproblem. This is also consistent with the analysis in Section VI-B. 28 Running Time for One Iteration (cputime) 1.6 × 105 1.4 F=8 F=9 F = 10 1.2 1 0.8 0.6 0.4 27 30 33 36 39 42 Number of Users N Fig. 12. Running time for one iteration of the I-RA-DR algorithm. VIII. C ONCLUSIONS In this paper, we studied the D2D load balancing in an OFDMA ultra-dense small cell network, in which users can set up direct cellular links with SBS or the data traffic was detoured to the neighboring SBS by D2D communications. We solved the D2D load balancing problem by an iterative method, where resource allocation and D2D routing subproblems were optimized iteratively. In particular, we reformulated the resource allocation subproblem as an MO problem. Likewise, the D2D routing subproblem was solved as a CGP. Simulation results showed that the D2D load balancing can not only balance the traffic effectively, but also improve the system performance in terms of data rate. Compared to the scheme without load balancing, the performance on system sum-rate using the I-RA-DR algorithm for D2D load balancing was improved by 12%. A PPENDIX A P ROOF T HEOREM 1 P k pi,j ≤ P . Second, γ̃(κ) is feasible First, the variable p needs to satisfy the power constraint OF k∈K when p in this equation has a unique solution p = (I − diag(γ̃(κ) − 1)A)−1 diag(γ̃(κ) − 1)ν. 29 On the other hand, p in this equation can be solved in an iterative method, p(i+1) = diag(γ̃(κ) − 1)ν + diag(γ̃(κ) − 1)A)p(i) , (41) and the necessary and sufficient condition of convergence is ρ(diag(γ̃(κ) − 1)A) < 1. Let diag(γ̃(κ) − 1)A = X −1 JX, with    J =  J1 (λ1 ) ··· .. . Jn (λn ) ··· 0 0 .. . JN (λN )      (42) where Jn (λn ) is a Jordan matrix, and λn is the n-th eigenvalue of diag(γ̃(κ) − 1)A. Thus, we have (diag(γ̃(κ) − 1)A)i = X −1 J i X. The iterative method converges only when lim Jni = 0, i→∞ that is, ∀n, |λn | < 1. Therefore, ρ(diag(γ̃(κ) − 1)A) < 1.  A PPENDIX B P ROOF OF T HEOREM 2 f We approximate xfi,j by xfi,j = 1 −exp(−θri,j ) in constraint (14j). When θ is sufficiently large, the approximation will not affect the optimal solution, because the value of xfi,j is always near 0 or 1, which indicates whether the link i − j is active. By substituting this approximation to Q f constraint (14e), we can get xi,j + (exp(−θri,j )) = 1. f ∈F Now, we need to prove that the optimal solution can be obtained by replacing the equality constraints with the inequality constraints. f Case 1: There does not exist a flow f on link i − j, i.e., ri,j = 0 for all f . According to the inequality constraints, xi,j only has the solution xi,j = 0, which is equivalent to the equality constraint. f Case 2: There exists a flow f on link i − j, i.e., ri,j > 0. The value of xi,j can be any number between 0 and 1. Note that the capacity of link i − j grows as the value of xi,j . Since our objective is to maximize the system sum-rate, the value of xi,j will reach the maximum, i.e., xi,j = 1. Therefore, the optimal solution can also be obtained by the inequality constraints.  30 R EFERENCES [1] H. Zhang, L. Song, and Y. Zhang, “Load Balancing for Cellular Networks using Device-to-Device Communications,” in Proc. IEEE VTC-Spring, Sydney, Australia, Jun. 2017. [2] Ciso, “Cisco Virtual Networking Index: Global Mobile Data Traffic Forecast Update, 2015-2020 White Paper,” Feb. 2016. [3] S. Samarakoon, M. Bennis, W. Saad, M. Debbah, and M. Latva-aho, “Ultra Dense Small Cell Networks: Turning Density Into Energy Efficiency,” IEEE J. Sel. Areas Commun., vol. 34, no. 5, pp. 1267-1280, May 2016. [4] A. Ghost, N. Mangalvedhe, R. Ratasuk, B. Mondal, M. Cudak, E. Visotsky, T. A. Thomas, J. G. Andrews, P. Xia, H. S. Jo, H. S. Dhillon, and T. D. Nolvan, “Heterogeneous Cellular Networks: From Theory to Practice,” IEEE Commun. Mag., vol. 50, no. 6, pp. 54-64, Jun. 2012. [5] T. Zhou, Z. Liu, D. Qin, N. Jiang, and C. Li, ”User association with maximizing weighted sum energy efficiency for massive MIMO-enabled heterogeneous cellular networks,” IEEE Commun. Lett., vol. 21, no. 10, pp. 2250-2253, Jul. 2017. [6] Q. We, B. Rong, Y. Chen, M. A.-Shalash, C. Caramanis, and J. G. Andrews, “User Association for Load Balancing in Heterogeneous Cellular Networks,” IEEE Trans. Wireless Commun., vol. 12, no. 6, pp. 2706-2716, Jun. 2013. [7] Y. Zhao, X. Fang, R. Huang, and Y. Fang, “Joint Interference Coordination and Load Balancing for OFDMA Multihop Cellular Networks,” IEEE Trans. Mobile Comput., vol. 13, no. 1, pp. 89-101, Jan. 2014. [8] H. Jiang and S. Rappaport, “CBWL: A New Channel Assignment and Sharing Method for Cellular Communication Systems,” IEEE Trans. Veh. Technol., vol. 43, no. 2, pp. 313-322, May 1994. [9] S. K. Das, S. K. Sen, and R. Jayaram, “A Dynamic Load Balancing Strategy for Channel Assignment Using Selective Borrowing in Cellular Mobile Environment,” Wireless Networks, vol. 3, no. 5, pp. 333-347, Oct. 1997. [10] H. Wu, C. Qiao, S. De, and O. Tonguz, “Integrated Cellular and Ad-hoc Relaying Systems: iCAR,” IEEE J. Sel. Areas Commun., vol. 19, no. 10, pp. 2105-2115, Oct. 2001. [11] E. Yanmaz and O. K. Tonguz, “Dynamic Load Balancing and Sharing Performance of Integrated Wireless Networks,” IEEE J. Sel. Areas Commun., vol. 22, no. 5, pp. 862-872, Jun. 2004. [12] C. K. Ho, D. Yuan, and S. Sun, “Data Offloading in Load Coupled Networks: A Utility Maximization Framework,” IEEE Trans. Wireless Commun., vol. 13, no. 4, pp. 1921-1931, Apr. 2014. [13] M. Madhavan, H. Ganapathy, M. Chetlur, and S. Kalyanaraman, “Adapting Cellular Networks to Whitespaces Spectrum,” IEEE/ACM Trans. Netw., vol. 23, no. 2, pp. 383-397, Apr. 2015. [14] L. Song, D. Niyato, Z. Han, and E. Hossain, Wireless Device-to-Device Communications and Networks, Cambridge University Press, UK, 2015. [15] L. Wang and H. Wu, “Fast Pairing of Device-to-Device Link Underlay for Spectrum Sharing with Cellular Users,” IEEE Commun. Lett., vol. 18, no. 10, pp. 1803-1806, Oct. 2014. [16] H. Zhang, L. Song, and Z. Han, “Radio Resource Allocation for Device-to-Device Underlay Communication Using Hypergraph Theory,” IEEE Trans. Wireless Commun., vol. 15, no. 7, pp. 4852 C 4861, Jul. 2016. [17] K. Doppler, M. Rinne, C. Wijting, C. B. Ribeiro, and K. Hugl, “Device-to-Device Communication as an Underlay to LTE-advanced Networks,” IEEE Commun. Mag., vol. 47, no. 12, pp. 42-49, Dec. 2009. [18] C. Xu, L. Song, Z. Han, Q. Zhao, X. Wang, X. Cheng, and B. Jiao, “Efficiency Resource Allocation for Device-toDevice Underlay Communication Systems: A Reverse Iterative Combinatorial Auction Based Approach,” IEEE J. Sel. Areas Commun., vol. 31, no. 9, pp. 348-358, Sep. 2013. 31 [19] L. Wang, H. Tang, H. Wu, and G. L. Stüber, “Resource Allocation for D2D Communications Underlay in Rayleigh Fading Channels,” IEEE Trans. Veh. Technol., vol. 66, no. 2, pp. 1159-1170, Apr. 2016. [20] T. Zhou, Y. Huang, and L. Yang, “Joint User Association and Interference Mitigation for D2D-Enabled Heterogeneous Cellular Networks,” Mobile Networks Applicat., vol. 21, no. 4, pp. 589-602, Aug. 2016. [21] X. Lin, J. G. Andrews, A. Ghosh, and R. Ratasuk, “An Overview of 3GPP Device-to-Device Proximity Services,” IEEE Commun. Mag., vol. 52, no. 4, pp. 40-48, Apr. 2014. [22] K. W. Choi and Z. Han, “Device-to-Device Discovery for Proximity-Based Service in LTE-Advanced System,” IEEE J. Sel. Areas Commun., vol. 33, no. 1, pp. 55-66, Jan. 2015. [23] H. Zhang, Y. Liao, and L. Song, “D2D-U: Device-to-Device Communications in Unlicensed Bands for 5G System,” IEEE Trans. Wireless Commun., vol. 16, no. 6, pp. 3507-3519, Jun. 2017. [24] J. Liu, Y. Kawamto, H. Nishiyama, N. Kato, and N. Kadowaki, “Device-to-Device Communications Achieve Efficient Load Balancing in LTE-advanced Networks,” IEEE Wireless Commun., vol. 21, no. 2, pp. 57-65, Apr. 2014. [25] L. Deng, Y. Zhang, M. Chen, Z. Li, J. Lee, Y. Zhang, and L. Song, “Device-to-Device Load Balancing for Cellular Networks,” in Proc. IEEE MASS, Dallas, USA, Oct. 2015. [26] Z. Chen, H. Zhao, Y. Chao, and T. Jiang, “Load Balancing for D2D-based relay Communications in Heterogeneous Network,” in Proc. WiOpt, Mumbai, India, May 2015. [27] M. H. Hajiesmaili, L. Deng, M. Chen, and Z. Li, “Incentivizing Device-to-Device Load Balancing for Cellular Networks: An Online Auction Design”, IEEE J. Sel. Areas Commun., vol. 35, no. 2, pp. 265-279, Feb. 2017. [28] Y. J. Zhang, L. Qian, and J. Huang, “Monotonic Optimization in Communication and Networking Systems,” Found. Trends Netw., vol. 7, no. 1, pp. 1-75, Oct. 2013. [29] M. Chiang, “Nonconvex Optimization for Communication Systems,” Advances in Mechanics and Mathematics, vol. 3, pp. 137-196, 2008. [30] Q. Chen, G. Yu, R. Yin, and G. Y. Li, “Energy-Efficient User Association and Resource Allocation for Multistream Carrier Aggregation,” IEEE Trans. Veh. Technol., vol. 65, no. 8, pp. 6366-6376, Aug. 2016. [31] F. Liu, K. Zheng, W. Xiang, and H. Zhao, “Design and Performance Analysis of An Energy-Efficient Uplink Carrier Aggregation Scheme,” IEEE J. Sel. Areas Commun., vol. 32, no. 2, pp. 197-207, Feb. 2014. [32] J. Li, L. P. Qian, Y. J. Zhang, and L. Shen, “Global Optimial Rate Control and Scheduling for Spectrum-Sharing Multi-Hop Networks,” IEEE Trans. Wireless Commun., vol. 15, no. 9, pp. 6462-6473, Sep. 2016. [33] M. Chiang, “Geometric Programming for Communication Systems,” Found. Trends Commun. Inform. Theory, vol. 2, no. 1-2, pp. 1-156, Aug. 2005. [34] S. Boyd and L. Vandenberghe, Convex Optimization, Cambridge University Press, Cambridge, UK, 2004. [35] P. C. Weeraddana, M. Codreanu, M. Latva-aho, A. Ephremides, and C. Fischione, “Weighted Sum-Rate Maximization in Wireless Networks: A Review,” Found. Trends Netw., vol. 6, no. 1-2, pp. 1-163, Sep. 2012. [36] 3GPP TR 36.931, “LTE; Evolved universal terrestrial radio sccess (E-UTRA); Radio frequency (RF) requirements for LTE Pico Node B,” Release 9, May 2011. [37] M. Xie, W. Zhang, and K.-K. Wong, “A Geometric Approach to Improve Spectrum Efficiency for Cognitive Relay Networks,” IEEE Trans. Wireless Commun., vol. 9, no. 1, pp. 268-281, Jan. 2010.
7cs.IT
arXiv:1611.08672v1 [math.RA] 26 Nov 2016 SOME CONJECTURES ON GENERALIZED CLUSTER ALGEBRAS VIA THE CLUSTER FORMULA AND D-MATRIX PATTERN PEIGEN CAO FANG LI Abstract. In the theory of generalized cluster algebras, we build the so-called cluster formula and D-matrix pattern. Then as applications, some fundamental conjectures of generalized cluster algebras are solved affirmatively. 1. introduction Cluster algebras were introduced by Fomin and Zelevinsky in [8]. The motivation was to create a common framework for phenomena occurring in connection with total positivity and canonical bases. By now numerous connections between cluster algebras and other branches of mathematics have been discovered, e.g. the theory of quiver representations, categorifications over some important algebras and Poisson geometry, etc.. There are many interesting conjectures about cluster algebras, for example, as follows. Note that in this paper, the positive integer n always denotes the rank of a cluster algebra. Conjecture 1.1. ([10, 14])(a) The exchange graph of a cluster algebra with rank n only depends on the initial exchange matrix; (b) Every seed is uniquely determined by its cluster under mutation equivalence; (c) Two clusters are adjacent in the exchange graph if and only if they have exactly n − 1 common cluster variables. In [14], M. Gekhtman, M. Shapiro and A. Vainshtein proved the following facts in the skewsymmetrizable case for standard cluster algebras: (1) (a) is true for B with full rank. (2) (b) implies (c). (3) (b) is true for cluster algebras of geometric type, and for cluster algebras whose exchange matrix is of full rank. It is also known that (b) is true for cluster algebras having some “realization”, for example cluster algebras from surfaces [7] and the cluster algebra which has a categorification [2, 6, 1]. We know a cluster should contain the whole information of the corresponding exchange matrix under the assumption that (b) is true. Trivially, (b) implies the following statement (d): (d) The exchange matrix could be uniquely recovered from a given cluster. In this paper, our aim is to discuss the above conjectures for generalized cluster algebras. Generalized cluster algebras were introduced in [5] by Chekhov and Shapiro, which are the generalization of the (standard) cluster algebras introduced by Fomin and Zelevinsky in [8]. In the standard case, a product of cluster variables, one known and one unknown, is equal to a binomial in other known variables. These binomial exchange relations is replaced by polynomial exchange relations in generalized cluster algebras. The structure of generalized cluster algebras naturally appears Date: version of November 29, 2016. 1 2 PEIGEN CAO FANG LI from the Teichmuller spaces of Riemann surfaces with orbifold points [5]. It also is raised in representations of quantum affine algebras [12] and in WKB analysis [16]. It can be seen in [5, 17] that many important properties and definitions of the standard cluster algebras are naturally extended to the generalized ones, for examples, Laurent phenomenon, finite type classification, the c-vectors, g-vectors and F -polynomials. From these views, we know generalized cluster algebra is an essential improvement of the standard cluster algebras. We want to consider Conjecture 1.1 in the case of generalized cluster algebra. As a tool for studying generalized cluster algebras including cluster algebras, we give the so-called cluster formula. Relying the using of the cluster formula, our method will be constructive, in particular, to recover the exchange matrix from a given cluster, as a direct proof of (d). Finally, we will show that Conjecture 1.1 holds for generalized cluster algebra in general case. Cluster algebras is introduced in a general case, which means their coefficients are in a general semifield. But it seems that many researchers are more interested in cluster algebras of geometric type. Many conjectures were proved for such cluster algebras, for example, Conjecture 1.1 given above. However, these conjectures are also believed true for cluster algebras with general coefficients. In order to consider Conjecture 1.1 in the case of cluster algebras with general coefficients, we introduce the D-matrix pattern, which explains the connection between any two (generalized) cluster algebras having the same initial exchange matrix with different coefficient rings from the view of exchange graphs. More precisely, we give a positive answer to Conjecture 1.1 for (generalized) cluster algebras with any coefficients, whose restricted results on standard cluster algebras are also an improvement of the conclusions in the case of geometrical type, given by other mathematicians early. This paper is organized as follows: in Section 2, some basic definitions are needed. In Section 3, we give the cluster formula, which is a main result in this papper. As an application, we prove (b) in Conjecture 1.1 is true for generalized cluster pattern of weak geometric type. In the final part of the Section 3, we give the connection between cluster formula and compatible 2-form. In Section 4, we give a positive answer to to Conjecture 1.1 in the case of generalized cluster algebra. 2. Preliminaries We know that (P, ⊕, ·) is a semifield if (P, ·) is an abelian multiplicative group endowed with a binary operation of auxiliary addition ⊕ which is commutative, associative, and distributive with respect to the multiplication · in P. Let T rop(ui : i ∈ I) be a free abelian group generated by {ui : i ∈ I} for a finite set of index I. We Q min(ai ,bi ) Q Q , then (T rop(ui : i ∈ I), ⊕) define the addition ⊕ in T rop(ui : i ∈ I) by uai i ⊕ ubi i = ui i i i is a semifield, which is called a tropical semifield. The multiplicative group of any semifield P is torsion-free for multiplication [8], hence its group ring ZP is a domain. The following proposition can be checked directly: Proposition 2.1. Assume P1 , P2 are two semifield, let P = P1 ∐ P2 = {(p1 , p2 )|p1 ∈ P1 , p2 ∈ P2 }. Then P is a semifield via (p1 , p2 )·(p̄1 , p̄2 ) := (p1 · p̄1 , p2 · p̄2 ) and (p1 , p2 )⊕ (p̄1 , p̄2 ) := (p1 ⊕ p̄1 , p2 ⊕ p̄2 ). Definition 2.2. (i) A square integer matrix B = (bij )n×n is called skew-symmetric if bij = −bji for any i, j = 1, · · · , n; (ii) In general, B = (bij )n×n is called skew-symmetrizable if there exists a diagonal matrix T with positive integer diagonal entries s1 , · · · , sn such that T B is skew-symmetric. SOME CONJECTURES ON GENERALIZED CLUSTER ALGEBRAS 3 We take an ambient field F to be the field of rational functions in n independent variables with coefficients in ZP. Definition 2.3. [8, 10, 17] A (labeled) seed Σ in F is a triplet (X, Y, B) such that (i) X = (x1 , · · · , xn ) is an n-tuple with n algebraically independent variables x1 · · · , xn over ZP. We call X a cluster and x1 · · · , xn cluster variables. (ii) Y = (y1 , · · · , yn ) is an n-tuple of elements in P, where y1 , · · · , yn are called coefficents. (iii) B = (bij ) is an n × n integer skew-symmetrizable matrix, called an exchange matrix. Let (R, Z) be a pair with R = (ri )n×n a diagonal matrix, ri ∈ N, and Z = (zi,m )i=1,··· ,n; m=1,··· ,ri −1 a family of elements in P satisfying the reciprocity condition zi,m = zi,ri −m for m = 1, · · · , ri − 1. And, denote the notations zi,0 = zi,ri = 1 for i = 1, · · · , n. Definition 2.4. ([17]) Let Σ = (X, Y, B) be a seed in F , we define the (R, Z)-mutation µk (Σ) = Σ̄ = (X̄, Ȳ , B̄) of Σ in the direction k ∈ {1, · · · , n} as a new seed in F :    if i 6= k xi , !rk rk rk n x̄i = (1) P Q L [−b ] −1  ( xj jk + zk,m ŷkm )/( zk,m ykm ), if i = k.  xk m=0 m=0 j=1  −1  i=k yk , −bki  rk  L  ȳi = (2) rk  yi yk[bki ]+ zk,m ykm , otherwise. m=0  −b , i = k or j = k ij b̄ij = (3) bij + rk (bik [−bkj ]+ + [bik ]+ bkj ) , otherwise. for i, j = 1, 2, · · · , n, where [a]+ = max{a, 0}, ŷi = yi n Q j=1 b xjji . Remark 2.5. (i). It is easy to check that the (R, Z)-mutation µk is an involution. (ii). If R = In , then (3) is the standard matrix mutation. Let B ′ be the matrix obtained from BR by the standard matrix mutation in the direction k, it is easy to see B ′ = B̄R. We can write µk (BR) = µgk (B)R, where µgk (B) = B̄ with µgk called the generalized matrix mutation. Definition 2.6. ([17]) An (R, Z)-cluster pattern (or say, generalized cluster pattern) M in F is an assignment for each seed Σt to a vertex t of the n-regular tree Tn , such that for any edge t k t′ , Σt′ = µk (Σt ). The triple of Σt are written as follows: Xt = (x1;t , · · · , xn;t ), Yt = (y1;t , · · · , yn;t ), Bt = (btij ). Remark 2.7. (i) Clearly, for each vertex of Tn , we can uniquely determine the (R, Z)-cluster pattern under (R, Z)-mutations. (ii) When R = In the identity matrix, Z must be empty. In this case, the generalized cluster pattern is just the standard cluster pattern. Definition 2.8. Let M be an (R, Z)-cluster pattern, we denote by X = {xi;t : t ∈ Tn , 1 ≤ i ≤ n} the set of all cluster variables. The generalized cluster algebra A associated with a given (R, Z)cluster pattern is the ZP-subalgebra of the field F generated by all cluster variables, i.e. A = ZP[X ]. By definition, A can be obtained from any given seed Σt0 for t0 ∈ Tn via mutations. So, we denote A = A(Σt0 ) and call Σt0 the initial seed of A. 4 PEIGEN CAO FANG LI Definition 2.9. (Restriction) (i) Let J be a subset of hni = {1, 2, · · · , n}. Remove from Tn all edges labeled by indices in hni\J, and denote Ttn0 (J) the connected component of the resulting graph containing the vertex t0 in Tn . Say that Ttn0 (J) is obtained from Tn by restriction to J including t0 . Trivially, Ttn0 (J) is a |J|-regular tree. (ii) Let M be an (R, Z)-cluster pattern on Tn in F with the seed Σt = (Xt , Yt , Bt ). We define a restricted generalized cluster pattern M t0 (J) on Ttn0 (J) by assigning the seed Σtt0 (J) = Q bt xi;tij0 )j∈J , B̄t = (btij )i,j∈J . Actually, (X̄t , Ȳt , B̄t ) at t ∈ Ttn0 (J) with X̄t = (xj;t )j∈J , Ȳt = (yj;t i∈hni\J M t0 (J) is a (R̄, Z̄)-cluster pattern on Ttn0 (J) in the semifield P ∐ T rop(xi;t0 : i ∈ hni\J), where R̄ = diag{rj }j∈J , Z̄ = (zj,m )j∈J; m=1,··· ,rj −1 . Say that M t0 (J) is obtained from M by restriction to J including t0 . Note that in the view in [15], we can think the seed Σtt0 (J) as a mixing-type subseed of Σt , that is, Σtt0 (J) = (Σt )hni\J,∅ . Definition 2.10. (a) Assume P1 is a semifield, P2 = T rop(uj : j ∈ I), where h = |I| < +∞. An ` (R, Z)-cluster pattern M with coefficients in P = P1 P2 is said to be of weakly geometric type if the following hold: (i) Z is a family of elements in P1 . ct ct ct (ii) yi;t is a Laurent monomial and denote it by yi;t = u11i u22i · · · uhhi . (b) Further, if P1 = T rop(Z), where we regard Z = (zi,m )i=1,··· ,n;m=1,··· ,ri −1 with zi,m = zi,ri −s as formal variables, then we say M to be an (R, Z)-cluster pattern of geometric type. Proposition 2.11. Let M be a (R, Z)-cluster pattern of weakly geometric type, Yt = (y1;t , · · · , yn;t ) ct ct ct be the coefficient tuples at t, where yi;t = u11i u22i · · · uhhi . Define Ct = (ctij ). Then for any edge t k t̄ in Tn , Ct and Ct̄ are related by the formula of mutation of C-matrices:  −ct , if j = k; ij c̄tij = ct + rk (ct [bt ]+ + [−ct ]+ bt ), otherwise. ij ik kj ik kj Proof. By (2), we have  t t c ct c  (u11k u22k · · · uhhk )−1 , c̄t1i c̄thi −bki  t  rk  L u1 · · · uh = rk ct ct c ct ct ct  u11i · · · uhhi (u11k · · · uhhk )[bki ]+ zk,m (u11k · · · uhhk )m , if i = k; otherwise. m=0 Then, we obtain rk L zk,m = 1 for k = 1, · · · , n and m=0  −ct , if j = k; ij c̄tij = ct + rk (ct [bt ]+ + [−ct ]+ bt ), otherwise. ij ik kj ik kj  Definition 2.12. We say M to be an (R, Z)-cluster pattern with (weakly) principle coefficients at t0 , if M is of (weakly) geometric type on Tn and Ct0 = In . Remark 2.13. The definition of (R, Z)-cluster pattern with principle coefficients given here is the same with the one in [17]. SOME CONJECTURES ON GENERALIZED CLUSTER ALGEBRAS 5 3. Cluster formula and related results 3.1. The cluster formula. . A fundamental fact is that for any vertex t ∈ Tn and the corresponding seed Σt = (Xt , Yt , Bt ), RBt is always a skew-symmetrizable matrix, that is, there is a positive integer diagonal matrix S such that SRBt is skew-symmetric. Indeed, since Bt is skew-symmetrizable, we have a positive integer diagonal matrix T which does n Q not depend on t such that T Bt is a skew-symmetric matrix. For R = (ri ), let S = ( ri )T R−1 . Trivially, S is a positive integer diagonal matrix. Then SRBt = ( n Q ri )T R −1 RBt = ( The diagonal matrix S = ( n Q ri )T Bt is i=1 i=1 skew-symmetric. i=1 n Q ri )T R−1 will be valuable for the following discussion, which is called i=1 the R-skew-balance for all seeds Σt with t ∈ Tn . Let Σt = (Xt , Yt , Bt ), Σt0 = (Xt0 , Yt0 , Bt0 ) be two seeds of M at t and t0 . Considering Σt0 as the initial seed, we know xi;t is a rational function in x1;t0 , · · · , xn;t0 with coefficients in ZP for each i. Let  ∂x1;t   x1;t x1;t0 x1;t0 ∂xn;t ∂x2;t ∂x1;t ∂x2;t ∂xn;t 0 · · · ∂x1;t ··· ∂x1;t0 ∂x1;t0 x1;t · ∂x1;t0 x2;t · ∂x1;t0 xn;t · ∂x1;t0 0  ∂x1;t  x2;t0 ∂x1;t x2;t0 x2;t0 ∂xn;t  ∂x2;t ∂xn;t ∂x2;t  ∂x   x · ∂x ··· x2;t · ∂x2;t0 xn;t · ∂x2;t0 2;t0  2;t0 ∂x2;t0 · · · ∂x2;t0   1;t t t Jt0 (X) =  . , Ht0 (X) =  .. .. .. ..  ..  ..  . . . .  .    xn;t0 xn;t0 xn;t0 ∂xn;t ∂x1;t ∂x2;t ∂xn;t ∂x2;t ∂x1;t · · · ∂xn;t · · · xn;t · ∂xn;t ∂xn;t ∂xn;t x1;t · ∂xn;t x2;t · ∂xn;t 0 we can obtain Htt0 (X) 0 0 = diag(x1;t0 , · · · 0 1 ,··· , xn;t0 )Jtt0 (X)diag( x1;t 0 0 1 , xn;t ).     ,   Lemma 3.1. Huv (X)Hvw (X) = Huw (X) for any u, v, w ∈ Tn . In particular, Huv (X)−1 = Hvu (X). Proof. We can view xj;w as a rational function in x1;v , · · · , xn;v , and view xk;v as a rational function n n P P ∂xj;w ∂xk;v ∂xk;v ∂xj;w ∂x · = = in x1;u , · · · , xn;u , where j, k = 1, · · · , n. Thus ∂xj;w ∂x ∂x ∂xi;u · ∂xk;v , i.e. i;u i;u k;v k=1 Juw (X) = Juv (X)Jvw (X). It follows that k=1 Huv (X)Hvw (X) = = = = 1 1 1 1 ,··· , } · diag{x1;v , · · · , xn;v }Jvw (X)diag{ ,··· , } x1;v xn;v xw;1 xw;n 1 1 ,··· , } diag{x1;u , · · · , xn;u }Juv (X)Jvw (X)diag{ x1;w xn;w 1 1 diag{x1;u , · · · , xn;u }Juw (X)diag{ ,··· , } x1;w xn;w Huw (X). diag{x1;u , · · · , xn;u }Juv (X)diag{  Lemma 3.2. If Σv = µk (Σu ) for k ∈ hni, then Huv (X)(Bv R−1 S −1 )Huv (X)⊤ = Bu R−1 S −1 , and det(Huv (X)) = −1. Proof. We assume that Σu = Σ, Σv = Σ̄, xi;u = xi , xi;v = x̄i for i ∈ hni and we denote H = Huv (X). We have   x , if i 6= k,    i rk P m zk,m ŷk n x̄i = −1 Q [−bjk ]+ rk m=0  , if i = k. ) x x (  r k L  m  k j=1 j zk,m yk m=0 6 PEIGEN CAO FANG LI For l = k, i 6= k, we have ∂ x̄k ∂xi = x−1 k rk L m=0 = ∂( [ n Q j=1 zk,m ykm [−bjk ]+ rk ) xj rk X ∂xi rk [−bik ]+ x−1 i x̄k + zk,m ŷkm + ( m=0 n Y ∂( [−b ] xj jk + )rk rk P m=0 j=1 zk,m ŷkm ) ∂xi ] rk n X Y xi−1 x−1 [−bjk ]+ rk k ) x mzk,m ŷkm bik ( j rk L m=0 zk,m ykm j=1 m=0 thus xi ∂ x̄k x̄k ∂xi = [−bik ]+ rk + rk P mzk,m ŷkm bik m=0 rk P m=0 We have (4) Hil = . zk,m ŷkm    δil ,     −1 , if l 6= k, xi ∂ x̄l =  x̄l ∂xi    [−bik ]+ rk +    if i = l = k, rk P m mzk,m ŷk bik m=0 rk P m=0 , if i 6= k, l = k. m zk,m ŷk It is easy to see that det(H) = −1. Without lose of generality, we may assume k = 1. Let     b̄21 a2 r1 ! P     mz1,m ŷ1m bi1 b̄  31   a3  −1 0 m=0     . Then H = . β =  .  , α =  .  , where ai = [−bi1 ]+ r1 + r1 P α In−1 z1,m ŷ1m  ..   ..  m=0 b̄n1 an ! ! r1 0 s1 0 Let R = ,S = , where R1 = diag{r2 , r3 , · · · , rn }, S1 = diag{s2, s3 , · · · , sn }. 0 R1 0 S1 ! 0 γ⊤ −1 ⊤ We can write Bv = , where γ ⊤ = −s−1 1 r1 β R1 S1 , due to the fact that SRBv is skewβ B1 symmetric. So, for B = Bu , B̄ = Bv , we need only to show that Bu = HBv R−1 S −1 H ⊤ SR. Denote M = HBv R−1 S −1 H ⊤ SR. Then, M = ! ! ! ! !⊤ ! ! −1 ⊤ −1 0 r1−1 0 0 −s−1 s−1 0 −1 0 s1 0 r1 0 1 r1 β R1 S1 1 β B1 α In−1 0 R1−1 0 S1−1 α In−1 0 S1 0 R1 ! −1 −1 ⊤ 0 s1 r1 β R1 S1 = . −1 −1 −1 ⊤ −β B1 + s1 r1 βα⊤ S1 R1 − s−1 1 r1 αβ S1 R1 Thus, we can obtain by replacing the entries that   if i = 1 or l = 1,  −b̄il ,    r1  P  m  mz1,m ŷ1 bl1    sl rl − [−bl1 ]+ r1 + m=0r1 b̄il + r1−1 s−1 1 b̄i1 P z1,m ŷ1m Mil = m=0    r1  P   mz1,m ŷ1m bi1   −1 −1   b̄l1 sl rl , otherwise.  r1 s1 [−bi1 ]+ r1 + m=0P r1   z1,m ŷ1m m=0  −b̄ , if i = 1 or l = 1, il = b̄il + s−1 sl rl b̄i1 [−bl1 ]+ − s−1 sl rl [−bi1 ]+ b̄l1 , otherwise. 1 1 SOME CONJECTURES ON GENERALIZED CLUSTER ALGEBRAS 7 By (3), we have b̄i1 = −bi1 , b̄l1 = −bl1 . Because SRB and SRB̄ are skew-symmetric, we have s1 r1 b1l = −bl1 sl rl , s1 r1 b̄1l = −b̄l1 sl rl , thus s1 r1 [b1l ]+ = [−bl1 ]+ sl rl , and  −b̄ , if i = 1 or l = 1, il Mil =  b̄il + r1 b̄i1 [−b̄1l ]+ + [b̄i1 ]+ b̄1l , otherwise. So, by mutation of B̄, we have M = µ1 (B̄), but µ1 (B̄) = B, so we get M = B.   if l 6= k, δil ,  ǫ Let ǫ ∈ {+, −}, Ek = (eil )n×n , eil = −1 , if i = l = k, We know (Ekǫ )2 = In .    [ǫbik ]+ rk , otherwise.  Corollary 3.3. Keep the above notations. For a seed Σ of M , if Σ̄ = µk (Σ), then Ekǫ B̄R−1 S −1 Ekǫ ⊤ = BR−1 S −1 . Proof. Let Ik+ = {i |bik ≥ 0}, and H0 = H|xi =t, ∀i∈I + . We know k   rk P mzk,m ŷkm bik   lim ([−bik ]+ rk + m=0rk )|xi =t, ∀i∈I +  P k  t→+∞  zk,m ŷkm = [bik ]+ rk = [−bik ]+ rk . m=0   ([−bik ]+ rk + lim  t→+0  Thus lim H0 = t→+∞ Ek+ , lim H0 t→0 = rk P m=0 rk P m=0 Ek− .  mzk,m ŷkm bik zk,m ŷkm   )|xi =t, ∀i∈Ik+  By Lemma 3.2, we have Ekǫ B̄R−1 S −1 Ekǫ ⊤ = BR−1 S −1 .  Remark 3.4. By corollary 3.3, we obtain µk (B) = Ekǫ BR−1 S −1 (Ekǫ )⊤ SR, which was proved for standard cluster pattern in [3]. Let t0 , t be two vertices in Tn with a walk t0 k1 t1 k2 t2 k3 km · · · tm−1 tm = t connecting t0 and t in Tn . Write Σtj the seed corresponding to tj , j = 1, 2, · · · , m. Now we can give the useful formula as follows: Theorem 3.5. (Cluster Formula) Keep the above notations. It holds that Htt0 (X)(Bt R−1 S −1 )Htt0 (X)⊤ = Bt0 R−1 S −1 , and detHtt0 (X) = (−1)m . m Proof. By Lemma 3.1, Htt0 (X) = Htt0m (X) = Htt01 (X)Htt12 (X) · · · Httm−1 (X). By Lemma 3.2, Htt0 (X)(Bt R−1 S −1 )Htt0 (X)⊤ t m−1 m m (X)⊤ · · · Htt01 (X)⊤ = Htt01 (X)Htt12 (X) · · · Httm−1 (X)⊤ Htm−2 (X)(Btm R−1 S −1 )Httm−1 t t t m−2 m−1 m−1 (X)⊤ · · · Htt01 (X)⊤ (X)⊤ Htm−3 (X)(Btm−1 R−1 S −1 )Htm−2 = Htt01 (X)Htt12 (X) · · · Htm−2 = · · · = Htt01 (X)(Bt1 R−1 S −1 )Htt01 (X)⊤ = Bt0 R−1 S −1 . m And, detHtt0 (X) = detHtt01 (X)detHtt12 (X) · · · detHttm−1 (X) = (−1)m . Corollary 3.6. rank(Bt ) = rank(Bt0 ) and det(Bt ) = det(Bt0 ). Corollary 3.7. If Xt = Xt0 , then Bt = Bt0 .  8 PEIGEN CAO FANG LI Proof. If Xt = Xt0 , then xi;t = xi;t0 . In this case, Htt0 (X) = In , so we have Bt = Bt0 .  Example 3.8. Consider S = diag{1, 2},R = diag{2, 1}, Z = (z1,1 ), assume that M is an (R, Z)cluster pattern via initial!seed Σt0 = (Xt0 , Yt0 , Bt0 ) with R-skew-balance S, where Xt0 = (x1 , x2 ), Yt0 = 0 −1 . Let Σt = µ2 µ1 (Σt0 ), we have (y1 , y2 ), Bt0 = 1 0 x1;t = 1 + z ŷ1 + ŷ22 1 + ŷ2 + z ŷ1 ŷ2 + ŷ12 ŷ2 , x = , Bt = Bt0 , 2;t x1 (1 ⊕ zy1 ⊕ y12 ) x2 (1 ⊕ y2 ⊕ zy1 y2 ⊕ y12 y2 ) where ŷ1 = y1 x2 , ŷ2 = y2 x−1 1 . Thus  Htt0 (X) =   −y2 −zy1 y2 x2 −y12 y2 x22 x1 +y2 +zy1 y2 x2 +y12 y2 x22  . y12 y2 x22 −x1 −y2 x1 +y2 +zy1 y2 x2 +y12 y2 x22 −1 zy1 x2 +2y12 x22 1+zy1 x2 +y12 x22 It is easy to check that Htt0 (X)(Bt R−1 S −1 )Htt0 (X)T = Bt0 R−1 S −1 and det(Htt0 (X)) = 1. More information on this example can be seen at Example 2.3 of [17]. 3.2. Connection between cluster formula and compatible 2-forms. . In [13, 14], M. Gekhtman, M. Shapiro and A. Vainshtein defined a closed differential 2-form ω compatible with a skew-symmerizable cluster algebra and proved such 2-form always exists for a cluster algebra of geometric type if its exchange matrices have no zero rows. In this part, we give the connection between compatible 2-forms and the cluster formula, and in particular, we prove the compatible 2-form always exists for any (R, Z) cluster pattern. Definition 3.9. A closed rational differential 2-form ω on an n-affine space is compatible with the Pn Pn dxj i (R, Z)-cluster pattern M if for any cluster X = (x1 , · · · , xn ) one has ω = i=1 j=1 wij dx xi ∧ xj , with wij ∈ Q. The matrix Ω = (wij ) is called the coefficient matrix of ω with respect to X. Trivially, the coefficient matrix Ω is skew-symmetric. Theorem 3.10. Let M be an (R, Z)-cluster pattern with any coefficients. (i) A closed rational differential 2-form ω on an n-affine space is compatible with M if and only if there exists a family of skew-symmetric matrices {Ωt ∈ Qn×n )|t ∈ Tn } such that for any t0 , t ∈ Tn , we have Htt0 (X)Ωt Htt0 (X)⊤ = Ωt0 . (ii) In particular, there always exists a closed rational differential 2-form ω compatible with M . Proof. (i): “=⇒”: Assume that ω is a closed rational differential 2-form on the n-affine space t compatible with M , Ωt = (wij ) is the coefficient matrix of ω with respect to Xt . We know Pn Pn ∂xi;t dxi;t ∂xi;t dxi;t = k=1 ∂xk;t dxk;t0 , thus xi;t = k=1 x1i;t · ∂xk;t dxk;t0 , and 0 n X n X i=1 j=1 t wij 0 dxi;t dxj;t ∧ xi;t xj;t = = n n X X 1 ∂xi;t ∂xj;t 1 t wij ( · · dxk;t0 ) ∧ ( dxl;t0 ) x ∂x x ∂x i;t k;t0 j;t l;t0 i=1 j=1 n X n X k=1 n X n X n X n X i=1 j=1 k=1 l=1 = l=1 t wij xk;t0 ∂xi;t xl;t0 ∂xj;t dxk;t0 dxl;t0 · ∧ xi;t ∂xk;t0 xj;t ∂xl;t0 xk;t0 xl;t0 n X n X n X n X xl;t0 ∂xj;t dxk;t0 dxl;t0 t xk;t0 ∂xi;t · ) ∧ . ( wij x ∂x xj;t ∂xl;t0 xk;t0 xl;t0 i;t k;t 0 i=1 j=1 k=1 l=1 Since ω= n n X X i=1 j=1 n t wij n XX dxi;t dxj;t dxl;t0 t0 dxk;t0 wkl ∧ = ∧ , xi;t xj;t xk;t0 xl;t0 k=1 l=1 SOME CONJECTURES ON GENERALIZED CLUSTER ALGEBRAS we have t0 wkl = n X n X i=1 j=1 that is, t wij 9 xk;t0 ∂xi;t xl;t0 ∂xj;t · , xi;t ∂xk;t0 xj;t ∂xl;t0 Ωt0 = Htt0 (X)Ωt Htt0 (X)⊤ . “⇐=”: Assume that {Ωt ∈ Qn×n |t ∈ Tn } is a set of skew-symmetric matrices, satisfying Htt0 (X)Ωt Htt0 (X)⊤ = Ωt0 , dxj;t0 t0 dxi;t0 j=1 wij xi;t0 ∧ xj;t0 , be a closed rational differential 2-form on an P ∂x 0 dxk;t into ω, we can see that ω is compatible with M . n-affine space. Replacing dxi;t0 = nk=1 ∂xi;t k;t −1 −1 n×n (ii): By Theorem 3.5, {Bt R S ∈ Q |t ∈ Tn } is a family of skew symmetric matrices satisfying Htt0 (X)(Bt R−1 S −1 )Htt0 (X)⊤ = Bt0 R−1 S −1 . Let Ωt = Bt R−1 S −1 . Then by (i), there for any t0 , t ∈ Tn , let ω = Pn i=1 Pn always exists a closed rational differential 2-form ω compatible with M .  4. Answer to Conjecture 1.1 for generalized cluster algebras 4.1. On Conjecture 1.1(b) in case of weak geometric type. . In this section, we firstly prove Conjecture 1.1 (b) for the generalized cluster patterns with coefficients of weak geometric type by using the cluster formula (see Theorem 4.12). The corresponding result for (R, Z)-cluster pattern with coefficients in general semmifield P, will be studied in the second part of this section, using the theory of D-matrix pattern. Before proving Theorem 4.12, we need some preparations. Theorem 4.1. (Theorem 2.5 of [5]) For any (R, Z)-cluster pattern with coefficients in P, each cluster ]. variable xi;t can be expressed as a Laurent polynomial in ZP[Xt±1 0 Definition 4.2. Let M be an (R, Z)-cluster pattern with principle coefficients at t0 , by the Laurent ], called the property, each cluster variable xi;t is expressed as a Laurent polynomial Xi;t ∈ ZP[Xt±1 0 X-function of xi,t , where P = T rop(Yt0 , Z). Definition 4.3. The F -polynomial of xi;t is defined by Fi;t = Xi;t |x1;t0 =···xn;t0 =1 ∈ Z[Yt0 , Z]. , Yt0 , Z]. Proposition 4.4. (Proposition 3.3 of [17]) We have Xi;t ∈ Z[Xt±1 0 Proposition 4.5. (Proposition 3.19 and Theorem 3.20 of [17]) Each F -polynomial has constant term 1. Corollary 4.6. Let M be an (R, Z)-cluster pattern with principle coefficients at t0 , if x is a cluster variable in M , then −x can not be a cluster variable in M . Proof. If both x and −x are cluster variables in M , assume that F is the F -polynomial corresponding to x, then −F is the F -polynomial corresponding to −x. This will contradict to that each F -polynomial has constant term 1.  Let M be an (R, Z)-cluster pattern with principle coefficients and initial seed Σ = (X, Y, B), the author in [17] introduced a Zn -grading of Z[X ±1 , Y, Z] as follows: deg(xi ) = ei , deg(yi ) = −bi , deg(zi;m ) = 0, where ei is the ith column vector of In , and bi is the ith column vector of the initial exchange matrix B. Note that these degrees are vectors in Zn . 10 PEIGEN CAO FANG LI In [17], the author proved that the X-functions are homogeneous with respect to the Zn -grading, and thanks to this, the g-vector of a cluster variable xi;t is defined to be the degree of its X-function t t t ⊤ Xi;t . From this definition, we have deg(Xi;t ) = (g1i , g2i , · · · , gni ) ∈ Zn . Theorem 4.7. (Theorem 3.22 and Theorem 3.23 of [17]) Let M be an (R, Z)-cluster pattern with coefficients in P and initial seed at t0 , Mpr be the corresponding (R, Z)-cluster pattern with initial principle coefficients at t0 , which has the same initial cluster and exchange matrix with M , then for the cluster variables xi;t and the coefficients yi;t of M at t, it holds that n  n btji Y ct Y Fj;t |P(Yt0 ,Z) (5) ; yj;tji0 yi;t = j=1 j=1 xi;t (6) =   n Y j=1  t gji  xj;t 0 Fi;t |F (Ŷt0 , Z) . Fi;t |P (Yt0 , Z) Proposition 4.8. Assume that M is an (R, Z)-cluster pattern with principle coefficients at t0 , and t S is the R-skew-balance of M . Let Gt = (gij )n×n . Then we have Gt = Htt0 (X)|Yt0 =0 . Proof. By Theorem 4.7, we know xj;t ∂xj;t ∂xi;t0 Thus xi;t0 ∂xj;t xj;t ∂xi;t0 gt gt nj 1j , · · · xn;t = Fj;t (Ŷt0 , Z)x1;t 0 0 = n t t t t t X gij ∂Fj;t (Ŷt0 , Z) btik0 gnj g1j gnj g1j · · · x , Z) + x )F ( Ŷ · · · x (x1;t ŷk . j;t t 0 n;t0 n;t0 1;t0 0 xi;t0 yk xt0 k=1 t = gij + n X btik0 ŷj ∂Fj;t (Ŷt0 , Z) , yk F (Ŷ , Z) k=1 j;t t0 By proposition 4.5, it is to make sense to take Yt0 = 0 in above equation, so we have t gij = xi;t0 ∂xj;t |Y =0 , xj;t ∂xi;t0 t0 i.e. Gt = Htt0 (X)|Yt0 =0 .  −1 −1 S From this result and the cluster formula, it is easy to see that Gt (Bt R−1 S −1 )G⊤ t = Bt0 R and det(Gt ) = ±1, as obtained in [17]. Assume that M is an (R, Z)-cluster pattern of weak geometric type with initial seed (Xt0 , Yt0 , Bt0 ). Using the notations in Proposition 2.11 and assuming S an R-skew-balance of M , we define M̃ a (R̃, Z̃)-cluster pattern with R̃-skew-balance S̃ and trivial coefficients, given by (X̃t0 , B̃t0 ), where R̃ = diag{R, Ih }, Z̃ = Z, X̃t0 = (x̃1;t0 , · · · , x̃h+n;t0 ), with x̃i;t0 = x!i;t0 , x̃n+j;t0 = yj;t0 for i = Bt0 −R−1 S −1 Ct⊤0 . 1, · · · , n, j = 1, 2, · · · , h, S̃ = diag{S, Ih }, B̃t0 = 0 Ct0 Clearly, M is a restriction of M̃ from {1, · · · , h + n} to {1, · · · , n} at t0 . Assume that Σt = µkm · · · µk2 µk1 (Σt0 ), where 1 ≤ kj ≤ n, j = 1, 2, · · · , m, then Σ̃ !t = µkm · · · µk2 µk1 (Σ̃t0 ). Since ! t Ht0 (X) 0 Bt −S −1 R−1 Ct⊤ t 1 ≤ kj ≤ n, j = 1, 2, · · · , m, we can write Ht0 (X̃) = , B̃t = . Ht Ih B̄t Ct Proposition 4.9. Keep the above notations, it holds SR(Ht Bt + Ct )R−1 S −1 Htt0 (X)⊤ = Ct0 . SOME CONJECTURES ON GENERALIZED CLUSTER ALGEBRAS 11 Proof. By Theorem 3.5, we have Htt0 (X̃)(B̃t R̃−1 S̃ −1 )Htt0 (X̃)⊤ = B̃t0 R̃−1 S̃ −1 , thus ! ! ! ! !⊤ Htt0 (X) 0 Bt −S −1 R−1 Ct⊤ R−1 0 S −1 0 Htt0 (X) 0 Ht Ih B̄t Ct 0 Ih 0 Ih Ht Ih ! ! ! R−1 0 Bt0 −R−1 S −1 Ct⊤0 S −1 0 = . 0 0 Ih Ct0 0 Ih So we have SR(Ht Bt + Ct )R−1 S −1 Htt0 (X)⊤ = Ct0 .  Remark 4.10. By Theorem 3.5, Htt0 (X)Bt R−1 S −1 Htt0 (X)⊤ = Bt0 R−1 S −1 , det(Htt0 (X)) = ±1. Then using this proposition, we can obtain Ct = R−1 S −1 Ct0 (Htt0 (X)⊤ )−1 SR − Ht (Htt0 (X))−1 Bt0 R−1 S −1 (Htt0 (X)⊤ )−1 SR. Using Proposition 4.9, the following result in [17] can be given directly. Corollary 4.11. ([17]) Let M be an (R, Z)-cluster pattern with principle coefficients at t0 and R-skew-balance S, then SRCt R−1 S −1 G⊤ t = In . Proof. By the definition of H-matrix, and proposition 4.5, we know Ht |Yt0 =0 = 0. By proposition 4.9 and proposition 4.8, we have SRCt R−1 S −1 G⊤  t = In . Now, we can give the positive affirmation on Conjecture 1.1 (b) in case of weak geometric type. Theorem 4.12. Assume that M is an (R, Z)-cluster pattern of weak geometric type at t0 , with an R-skew-balance S. Then for each t, the seed Σt is uniquely determined by Xt . Proof. We know Σt = (Xt , Yt , Bt ) and Yt is uniquely determined by Ct . However, by Theorem 3.5, we have (7) Bt = (Htt0 (X))−1 Bt0 R−1 S −1 (Htt0 (X)⊤ )−1 SR. By remark 4.10, we have (8) Ct = R−1 S −1 Ct0 (Htt0 (X)⊤ )−1 SR − Ht (Htt0 (X))−1 Bt0 R−1 S −1 (Htt0 (X)⊤ )−1 SR. We know the right side of (7) and (8) is uniquely determined by Xt , thus Bt and Ct is uniquely determined by Xt , which implies that Σt is uniquely determined by Xt .  4.2. D-matrix pattern and answer to Conjecture 1.1. . Let M be an (R, Z)-cluster pattern with coefficients in P and initial seed Σt0 = (Xt0 , Pt0 , Bt0 ). By Laurent phenomenon, we can express the cluster variable xi;t in Σt , as (9) xi;t = fi;t (x1;t0 , · · · , xn,t0 ) dt dt , ni 1i · · · xn;t x1;t 0 0 where fi;t is a polynomial in x1;t0 , · · · , xn;t0 with coefficients in ZP, such that xj;t0 ∤ fi;t . Define dti = (dt1i , dt2i , · · · , dtni )⊤ which is called the d-vector of xi;t . Define Dt = (dtij ) = (dt1 , dt2 , · · · , dtn ), called the D-matrix of the cluster Xt . Clearly, Dt0 = −In . Proposition 4.13. Dt is uniquely determined by the initial condition Dt0 = −In , together with the relation as follows under mutation of seeds:   if j 6= k; dtij P P (10) (Dt′ )ij = t dtil btlk rk , −dtil btlk rk } if j = k.  −dik + max{ t t blk >0 blk <0 12 PEIGEN CAO for any t, t′ ∈ Tn with edge t Proof. We know xk;t′ = ′ dtik = −dtik + max{ P btlk >0 x−1 k;t t′ . k n Q j=1 dtil btlk rk , FANG LI [−bt ]+ xj;t jk P btlk <0 ! rk rk P m=0 rk L m=0 m zk,m ŷk;t m zk,m yk;t m , where ŷk;t = yk;t −dtil btlk rk }, by (9). n Q j=1 bt jk . We can obtain xj;t  In this proposition, the case for standard cluster pattern has been given in [11]. Corollary 4.14. The d-vectors of the (R, Z)-cluster pattern with initial seed (Xt0 , Yt0 , Bt0 ) coincide with the d-vectors of the standard cluster pattern with initial seed (Xt0 , Yt0 , Bt0 R). Definition 4.15. A D-matrix pattern W at t0 is an assignment for each pair ∆t := (Dt , Qt ), called a matrix seed, to a vertex t of the n-regular tree Tn with ∆t0 = (−In , Qt0 ), which is called the initial matrix seed, where Qt0 is a skew-symmetrizable matrix. And for any edge t k t′ , ∆t′ = (Dt′ , Qt′ ) and ∆t = (Dt , Qt ) are related with Qt′ = µk (Qt ) by the standard matrix mutation ms is µk and Dt′ is defined satisfying (10) in Proposition 4.13. Denote µms k (∆t ) := ∆t′ , where µk called the mutation of matrix seed in the direction k. Remark 4.16. By Remark 2.5, any (R, Z)-cluster pattern M with initial seed at t0 can supply the corresponding D-matrix pattern W with matrix seed ∆t = (Dt , Bt R) at t ∈ Tn , where Dt is the D-matrix of the cluster Xt . This W is called the D-matrix pattern induced by M at t0 . Definition 4.17. (i) For an (R, Z)-cluster pattern M , two seeds Σt = (Xt , Yt , Bt ) and Σt′ = (Xt′ , Yt′ , Bt′ ), or say, their corresponding vertices t and t′ in Tn , are called M-equivalent if there ′ exists a permutation σ ∈ Sn such that xi;t′ = xσ(i);t , yi;t′ = yσ(i);t and btij = btσ(i)σ(j) , denote as Σt ≃M Σt′ . (ii) For a D-matrix pattern W , two matrix seeds ∆t = (Dt , Qt ) and ∆t′ = (Dt′ , Qt′ ), or say, their corresponding vertices t and t′ in Tn are W-equivalent if there exists a permutation σ ∈ Sn ′ t′ t = qσ(i)σ(j) , denote as ∆t ≃W ∆t′ . such that dti = dtσ(i) and qij Definition 4.18. The exchange graph Γ of a matrix pattern W (respectively, (R, Z)-cluster pattern M ) is defined as the graph whose vertices are the W-equivalence classes of matrix seeds [∆t ] (respectively, M-equivalence classes of seeds [Σt ]) and whose edges given between [∆t1 ] and [∆t2 ] (respectively, [Σt1 ] and [Σt2 ]) for t1 , t2 ∈ Tn if there exists k ∈ {1, · · · , n} such that µms k (∆t1 ) ∈ [∆t2 ] (respectively, µk (Σt1 ) ∈ [Σt2 ]). Remark 4.19. By the definition, the exchange graph of a D-matrix pattern only depends on the initial exchange matrix ∆t0 . Now we discuss the further relationship between an (R, Z)-cluster pattern with initial seed Σt0 and the matrix pattern induced by it at t0 . Lemma 4.20. Let Mpr be an (R, Z)-cluster pattern with principal coefficients at t0 . If there exists a permutation σ ∈ Sn such that dtσ(i) = dti0 , where dti are the i-th columns of Dt for all i, then xσ(i);t = xi;t0 and Σt ≃M Σt0 . Proof. By Proposition 4.4, there exist polynomials f1 , · · · , fn in x1;t0 , · · · , xn;t0 with coefficients in Z[Yt0 , Z],and xj;t0 ∤ fi for any i, j in order to get Dt . But dtσ(i) = dti0 and Dt0 = −In , then (11) xσ(1);t = x1;t0 f1 , · · · , xσ(n);t = xn;t0 fn . SOME CONJECTURES ON GENERALIZED CLUSTER ALGEBRAS 13 x . Conversely, there exist polynomials g1 , · · · , gn in x1;t , · · · , xn;t So we have xi;t0 = fi (x1;t σ(i);t 0 ,··· ,xn;t0 ) with coefficients in Z[Yt0 , Z], and xj;t ∤ gi for any i, j, such that x1;t0 = (12) g1 (x1;t , · · · , xn;t ) gn (x1;t , · · · , xn;t ) , · · · , xn;t0 = . k11 kn1 1n nn x1;t · · · xn;t xk1;t · · · xkn;t Hence, for any i, xσ(i);t gi (x1;t , · · · , xn;t ) , = xi;t0 = k1i kni g1 (x1;t ,··· ,xn;t ) g (x1;t ,··· ,xn;t ) x1;t · · · xn;t ) fi ( k11 kn1 , · · · , n k1n knn x1;t ···xn;t x1;t ···xn;t λ λ n;i /hi (x1;t , · · · , xn;t ), For the right side of this equality, we can write xi;t0 as that xi;t0 = x1;t1;i · · · xn;t where hi is a polynomial in x1;t , · · · , xn;t such that xj;t ∤ hi for j = 1, · · · , n. So we have k 1;i gi (x1;t , · · · , xn;t )hi (x1;t , · · · , xn;t ) = x1;t +λ1;i k n;i · · · xn;t +λn;i , However, due to xj;t ∤ gi and xj;t ∤ hi for j = 1, · · · , n, it implies that gi = ±1 = hi , then from (12), we have xi;t0 = k1i±1 kni . From this and by the definition of Htt0 (X), we can obtain that x1;t ···xn;t Htt0 (X) = (−kij )n×n . By Theorem 3.5, detHtt0 (X) = ±1. By Lemma 3.1, Htt0 (X) = Htt0 (X)−1 . Then we have Htt0 (X) ∈ Mn (Z). Lemma 4.21. For any i = 1, · · · , n, xi;t is a Laurent monomial in x1;t0 , · · · , xn;t0 and fi = ±1. Proof. Without loss of generality, we can assume that i = 1. By (11) and the definition of x x 0 ∂f1 Htt0 (X)jσ(1) , we can get Htt0 (X)jσ(1) = δ1j + fj;t1 0 ∂x∂fj;t1 . Since Htt0 (X) ∈ Mn (Z), j;t f1 ∂xj;t is 0 0 m−1 an integer. Write f1 = am xm j;t0 + am−1 xj;t0 + · · · + a1 xj;t0 + a0 , where am 6= 0 and a0 , · · · , am are x polynomials of x1;t0 , · · · , xj−1;t0 , xj+1;t0 , · · · , xn;t0 with coefficients in Z[Yt0 , Z], then fj;t1 0 ∂x∂fj;t1 = m−1 mam xm j;t0 +(m−1)am−1 xj;t +···+a1 xj;t0 0 m−1 am x m j;t +am−1 xj;t +···+a1 xj;t0 +a0 0 0 0 is an integer. If m > 0, then xj;t0 ∂f1 f1 ∂xj;t0 = m and a0 = a1 = · · · = am−1 = 0. So f1 = am xm j;t0 , which contradicts to xj;t ∤ f1 . Thus m = 0 and f1 = a0 , which is a polynomial of x1;t0 , · · · , xj−1;t0 , xj+1;t0 , · · · , xn;t0 with coefficients in Z[Yt0 , Z]. Since j can take x value from 1 to n, f1 must be in Z[Yt0 , Z]. By (11), we have x1;t0 = σ(1);t f1 , then by Proposition 4.4, 1 , Z], which means f = ±1.  ∈ Z[Y 1 t0 f1 Return to the proof of Lemma 4.20. By Lemma 4.21 and (11), we have xσ(i);t = ±xi;t0 . Thus t = git0 and ctσ(i) = cti0 . xσ(i);t = xi;t0 by Corollary 4.6. It is easy to see that btσ(i)σ(j) = btij0 , gσ(i)  Thus Σt ≃M Σt0 . Theorem 4.22. Let M be an (R, Z)-cluster pattern with initial seed (Xt0 , Yt0 , Bt0 ) at t0 , W be the D-matrix pattern induced by M at t0 . Let Mpr be the corresponding (R, Z)-cluster pattern with principal coefficients at t0 of M , denote by Σpr t the seed of Mpr at t. Then, pr (i) The following statements are equivalent: (1) Σt1 ≃M Σt2 , (2) Σpr t1 ≃M Σt2 , (3) ∆t1 ≃W ∆t2 ; (ii) ΓM = ΓMpr = ΓW . Proof. (i): Firstly, we prove (2)⇐⇒(3). “=⇒”: Obviously. 2 and btij1 = “⇐=”: Since ∆t1 ≃W ∆t2 , there exists a permutation σ ∈ Sn such that dti1 = dtσ(i) pr 2 btσ(i)σ(j) . We always have Σpr t0 = µik · · · µi2 µi1 (Σt1 ) for a series of mutations µi1 , µi2 , · · · , µik . Let pr pr Σt = µσ(ik ) · · · µσ(i2 ) µσ(i1 ) (Σt2 ), then we have dti0 = dtσ(i) and btij0 = btσ(i)σ(j) . By Lemma 4.20, we pr pr pr pr pr t0 t have xpr σ(i);t = xi;t0 and cσ(i) = ci . Since Σt1 = µi1 µi2 · · · µik (Σt0 ) and Σt2 = µσ(i1 ) µσ(i2 ) · · · µσ(ik ) µσ(i1 ) (Σt ), pr pr pr t1 t2 t1 t2 we obtain xpr σ(i);t2 = xi;t1 , then bσ(i)σ(j) = bij and cσ(i) = ci , which means Σt1 ≃M Σt2 . (1)=⇒(3) is also trivial. Now we prove (2)=⇒(1). 14 PEIGEN CAO FANG LI pr t1 t2 t1 If Σpr t1 ≃M Σt2 , then there exists a permutation σ ∈ Sn such that bσ(i)σ(j) = bij , cσ(i) = t1 = git2 and Fσ(i);t1 = Fi;t2 . By Theorem 4.7, for cluster variables and coefficients of M , we cti2 , gσ(i) have the relations xσ(i);t1 = xi;t2 , yσ(i);t1 = xi;t2 , then Xt1 = Xt2 , Yt1 = Yt2 as sets. It follows that Σt1 and Σt2 are M-equivalent. (ii) is obtained directly from (i).  From this theorem, we now can answer Conjecture 1.1 (a),(b),(c) for a generalized cluster algebra in the statements (a),(b),(c) respectively as follows. Theorem 4.23. Given an (R, Z)-cluster pattern M with coefficients in P and initial seed Σt0 , the following statements hold: (a) The exchange graph only depends on the initial exchange matrix Bt0 . (b) Every seed Σt in M is uniquely determined by Xt . (c) Two clusters are adjacent in the exchange graph ΓM if and only if they have exactly n − 1 common cluster variables. Proof. (a) Let W be the D-matrix pattern induced by M at t0 . By Theorem 4.22, ΓM ≃ ΓW . Moreover, the result follows from Remark 4.19. (b) By Theorem 4.22, Σt is uniquely determined by ∆t = (Dt , Bt R). And, by the definition of Dt , Dt is uniquely determined by Xt and the initial seed Σt0 . By Theorem 3.5, Bt is also determined by Xt . Then the result follows. (c) “ =⇒ ”: It is clear from the definition of mutation. “ ⇐= ”: Assume that Xt1 and Xt2 are two clusters of M with n − 1 common cluster variables, we will prove that the matrix seed ∆t1 and ∆t2 are adjacent in the exchange graph ΓW . Thus, by (b) and Theorem 4.22, Xt1 and Xt2 are adjacent in the exchange graph ΓM . Let Mtr be the corresponding (R, Z)-cluster pattern with trivial coefficients of M , which has the same initial exchange matrix with M . The cluster variables xi,t of Mtr can be obtained from the corresponding cluster variables xoi,t of M via valuing their coefficients to 1. Hence, any pair of equal cluster variables in Xt1 and Xt2 respectively becomes a pair of equal cluster variables in Xttr1 and Xttr2 respectively. Without loss of generality, let Xttr1 = (x1 , x2 , · · · , xn ), Xttr2 = (w1 , x2 , · · · , xn ), Xttr3 = µx1 (Xttr1 ) = (x̄1 , x2 , · · · , xn ). If x1 = w1 , then by (b) and Theorem 4.22, ∆t1 ≃W ∆t1 and then Xt1 = Xt2 as sets. This is a contradiction. Hence, we have x1 6= w1 . Then, the given clusters Xttr1 and Xttr2 of Mtr have also n − 1 common cluster variables. t2 t2 t2 tr tr tr By the definition of ! Ht1 (X ) and Ht3 (X ), they can be! written as the form Ht1 (X ) = a O1×(n−1) ā O1×(n−1) and Htt32 (X tr ) = . By the cluster formula, detHtt32 (X tr ) = α(n−1)×1 In−1 ᾱ(n−1)×1 In−1 −detHtt12 (X tr ) = ±1, thus ā = −a = ±1. x1 ∂w1 = 1, we will show that w1 = x1 , which is a contradiction. If a = 1, i.e. w 1 ∂x1 By Laurent phenomenon, w1 can be written as w1 = f (x1 , · · · , xn )/(xd11 · · · xdnn ), (13) x1 ∂w1 where f is a polynomial in x1 , · · · , xn with coefficients in Z[Z] with xi ∤ f for any i. By 1 = w = 1 ∂x1 x1 ∂f x1 ∂f −d1 + f ∂x1 , we know f ∂x1 is an integer. Just as in the proof of Lemma 4.21, we can show that ∂f x1 does not appear in f , i.e. f is a polynomial in x2 , · · · , xn . Thus xf1 ∂x = 0 and d1 = −1. Then 1 w1 by (13), we have x1 = −d1 −dn . By Laurent phenomenon, it is easy to know f is a x2 ···xn f (x2 ,··· ,xn ) 2 n monomial in x2 , · · · , xn . Since xi ∤ f , we obtain f = 1 and w1 = x1 x−d · · · x−d . n 2 SOME CONJECTURES ON GENERALIZED CLUSTER ALGEBRAS 15 For i 6= 1, if di > 0, we consider the cluster variable x̄i obtained from Xttr1 by mutation at cluster variable xi . Then xi x̄i = g(x1 , · · · , xi−1 , xi+1 , · · · , xn ). Clearly, g is a nontrivial polynomial, otherwise, the generalized cluster algebra generated by xi will split off, which contradicts to that di 6= −d −d 2 n 0. Therefore w1 = (x1 x−d )/g di . It contradicts to Laurent phenomenon · · · xi−1i−1 x̄di i xi+1i+1 · · · x−d n 2 since g is an exchange polynomial. So di ≤ 0 for i = 2, · · · , n. Consider x1 = w1 xd22 · · · xdn and use the similar discussion as above, we can show di ≥ 0 dually for i = 2, · · · , n. Thus d2 = · · · = dn = 0, and we obtain w1 = x1 . It is impossible. Therefore we have only a = −1, then ā = 1. Since ā = 1, we can repeat the above discussion via replacing Xttr1 by Xttr3 , and obtain w1 = x̄1 , i.e. µx1 (Xttr1 ) = Xttr2 . By (b) and the definition of matrix seed, it follows that the matrix seed ∆t1  and ∆t2 are adjacent in the exchange graph ΓW . Then the result holds. We know that a pattern (cluster pattern or matrix pattern) is said to be of finite type, if the exchange graph has finite many vertexes. Corollary 4.24. Assume M is an (R, Z)-cluster pattern with initial seed (Xt0 , Yt0 , Bt0 ), let M̄ be the standard cluster pattern with initial seed (Xt0 , Yt0 , Bt0 R) at t0 induced from M , then (i) Σt1 ≃M Σt2 if and only if Σ̄t1 ≃M Σ̄t2 , (ii) ΓM ≃ ΓM̄ . Proof. We know that M and M̄ induce the same D-matrix pattern W at t0 . By Theorem 4.22, we have Σt1 ≃M Σt2 if and only if ∆t1 ≃M ∆t2 if and only if Σ̄t1 ≃M Σ̄t2 , then ΓM ≃ ΓW ≃ ΓM̄ .  Following Corollary 4.24 (ii), we have furthermore: Corollary 4.25. M is of finite type if and only if M̄ is of finite type. Remark 4.26. The classifications of standard cluster algebras and generalized cluster algebras of finite type has been given respectively in [9] and [5]. Corollary 4.25 actually supplies a simple way to give the classification of generalized cluster algebras of finite type via that of standard cluster algebras. Acknowledgements: This project is supported by the National Natural Science Foundation of China (No.11671350 and No.11571173) and the Zhejiang Provincial Natural Science Foundation of China (No.LZ13A010001). References [1] Claire Amiot, Cluster categories for algebras of global dimension 2 and quivers with potential, Ann. Inst. Fourier (Grenoble) 59 (2009), no. 6, 2525-2590. [2] Buan, A.B., Marsh, R., Reineke, M., Reiten, I., Todorov, G.: Tilting theory and cluster combinatorics. Adv. Math. 204(2), 572-618 (2006) [3] Arkady Berenstein, Andrei Zelevinsky, Quantum cluster algebras, Advances in Mathematics 195 (2005) 405-455. [4] Caldero, P., Keller, B.: From triangulated categories to cluster algebras II. Ann. Sci. Ecole Norm. Sup. ,4eme serie, 39, 983-1009 (2006) [5] L.Chekhov and M.Shapiro, Teichmuller spaces of Riemann surfaces with orbifold points of arbitary order and cluster variables, Int. Math. Res. Notices 2014 (2014), 2746-2772; arXiv:1111.3963[math-ph]. [6] L. Demonet, Categorification of skew-symmerizable cluster algebras. Algebr Represent Theory, 14, 10871162, 2011. [7] S. Fomin, M. Shapiro, D. Thurston, Cluster algebras and triangulated surfaces. Part I: Cluster complexes, Acta Math. 201 (2008), 83-146. [8] Sergey Fomin and Andrei Zelevinsky, Cluster algebras. I. Foundations, J. Amer. Math. Soc. 15 (2002), no. 2, 497-529 (electronic). 16 PEIGEN CAO FANG LI [9] S.Fomin and A.Zelevinsky. Cluster algebras. II. Finite type classification. Invent. Math., 154 (2003), no.1, 63-121. [10] S. Fomin and A. Zelevinsky, Cluster algebras: notes for the CDM-03 conference, Current developments in mathematics, 2003, Int. Press, Somerville, MA, 2003, pp. 1-34. [11] S.Fomin and A.Zelevinsky. Cluster algebras. IV. Coefficients. Compos. Math. 143(2007), 112-164. [12] A. Gleitz, Quantum affine algebras at roots of unity and generalized cluster algebras, 2014, arXiv:1410.2446 [math.RT]. [13] M. Gekhtman, M. Shapiro and A. Vainshtein, Cluster algebras and Weil-Petersson forms, Duke Math. J. 127(2005),291-311. [14] M. Gekhtman, M. Shapiro and A. Vainshtein, On the properties of the exchange graph of a cluster algebra, Math. Res. Lett. 15 (2008), 321-330. [15] Min Huang and Fang Li, On Structure of cluster algebras of geometric type I: In view of sub-seeds and seed homomorphisms, arXiv:1509.01050 [Math.RT]. [16] K. Iwaki and T. Nakanishi, Exact WKB analysis and cluster algebras II: simple poles, orbifold points, and generalized cluster algebras, 2014, arXiv:1409.4641 [math.CA]. [17] Tomoki Nakanishi, Structure of seeds in generalized cluster algebras, Pacific Journal of Mathematics, Vol. 277 (2015), No. 1, 201-218. [18] Tomoki Nakanishi and Andrei Zelevinsky, On tropical dualities in cluster algebras, arXiv:1101.3736 [math.RA]. [19] D. Rupel, Greedy bases in rank 2 generalized cluster algebras, 2013, arXiv:1309.2567[math.RA] Peigen Cao Department of Mathematics, Zhejiang University (Yuquan Campus), Hangzhou, Zhejiang 310027, P.R.China E-mail address: [email protected] Fang Li Department of Mathematics, Zhejiang University (Yuquan Campus), Hangzhou, Zhejiang 310027, P.R.China E-mail address: [email protected]
0math.AC
1 Reliable OFDM Transmission with Ultra-Low Resolution ADC arXiv:1801.00893v1 [cs.IT] 3 Jan 2018 Hanqing Wang, Wan-Ting Shih, Chao-Kai Wen, and Shi Jin Abstract—The use of low-resolution analog-to-digital converters (ADCs) can significantly reduce power consumption and hardware cost. However, severe nonlinear distortion due to low-resolution ADCs makes achieving reliable data transmission challenging. Particularly, for orthogonal frequency division multiplexing (OFDM) transmission, the orthogonality among subcarriers is destroyed, which invalidates the conventional linear receivers that highly relies on this orthogonality. In this study, we develop an efficient system architecture for OFDM transmission with ultra-low resolution ADC (e.g., 1−2 bits). A novel channel estimator is proposed to estimate the desired channel parameters without their priori distributions. In particular, we integrate the linear minimum mean squared error channel estimator into the generalized Turbo (GTurbo) framework and derive its corresponding extrinsic information to guarantee the convergence of the GTurbo-based algorithm. We also propose feasible schemes for automatic gain control, noise power estimation, and synchronization. Furthermore, we construct a proof-of-concept prototyping system and conduct over-the-air (OTA) experiments to examine the feasibility/reliability of the entire system. To the best of our knowledge, this is the first work that focused on system design and implementation of communications with low-resolution ADCs worldwide. Numerical simulation and OTA experiment results demonstrate that the proposed system supports reliable OFDM data transmission with ultra-low resolution ADCs. Index Terms—Low-precision ADC, OFDM, Turbo signal recovery, prototyping system. I. I NTRODUCTION Achieving highly reliable data transmission with low hardware cost and low power consumption is a substantial pursuit of future wireless communication systems. Applying ultra-low resolution (i.e., 1−2 bit) quantizers, including analog-to-digital converters (ADCs) or digital-to-analog converters (DACs) is a promising solution that has been widely explored by the academia and industry. The advantages of low-resolution quantizers can be summarized as follows. • The relationship of power consumption of the quantizer with its quantization precision b and sampling frequency Fs expressed by PADC ∝ 2b × Fs [1] reveals that the reduction in quantizers’ precision can lead to the exponential decrease in their power consumption. • Data represented by few bits can be easily stored and transferred, which allows for relaxing the quality requirements on the radio frequency (RF) and interface circuits. H. Wang and S. Jin are with the National Mobile Communications Research Laboratory, Southeast University, Nanjing 210096, P. R. China. P (e-mail: [email protected]; [email protected]). W.-T. Shih and C.-K. Wen are with the Institute of Communications Engineering, National Sun Yat-sen University, Kaohsiung, Taiwan (e-mail: [email protected]; [email protected]). The cost and implementation comlexity of low-resolution quantizers are extremely low [2]. The feasibility of using low-resolution quantizers has been demonstrated by those studies that analyze the capacity or achievable rate degradation caused by low-resolution quantizers [3]–[9]. For example, as shown by the capacity derivation for additive white Gaussian noise (AWGN) channel in [4], only 10%-20% capacity is lost under the quantization precision of 2−3 bits. Research in [7] revealed that in a multiple antenna array system, equipping only a small proportion of high-resolution ADCs can closely approximate the achievable rate of conventional architecture with all full-resolution ADCs. These results have inspired subsequent studies into transceiver designs. Several algorithms have been developed for flat-fading MIMO or massive MIMO systems with low-resolution ADCs, such as linear receiver [10], [11], relaxed convex optimization based algorithm [12], coding theory-based approach [13], and supervised learning based method [14]. For the coarsely quantized MIMO systems with channel matrix comprising i.i.d. Gaussian entries, an iterative process called generalized approximate message passing (GAMP) can be strictly proven to yield Bayesian optimal detection or estimation performance [15]–[17]. However, these studies lack at least two important aspects. First, linear receivers yield acceptable performance due to the array gain from a large number of received data streams. This compensates for performance loss caused by low-resolution quantizers to a large extent, which weakens the contribution of subsequently developed algorithms with better performance but higher complexity. Second, the aforementioned works did not consider the wideband channel, which is a typical setting of future communication systems. For the wideband channel, the delay spread is generally larger than the symbol duration of the transmitted signal, which leads to severe frequency-selective fading and serious inter-symbol interference (ISI). Orthogonal frequency division multiplexing (OFDM) is a well-developed multicarrier transmission technology, which enables the decomposition of the ISI channel into a bank of orthogonal flat-fading subchannels [18]. Therefore, the OFDM waveform has been widely used by various wideband wireless communication systems to pursue high data rates, such as IEEE 802.11ad [19] and 5G air interface. OFDM transmissions combined with low-resolution quantizers (hereinafter referred to as quantized OFDM (Q-OFDM) systems) are considered a typical setting for future communication systems. Works for designing QOFDM receivers have emerged, such as linear receiver [20] and fast adaptive shrinkage/thresholding algorithm [21]. Their • 2 suboptimality is due to the neglect of nonlinear distortion caused by coarse quantization and the relaxation of detected symbols from discrete constellation to the Gaussian signal. In [22], the GAMP is mechanically applied to the detection and channel estimation problem for a quantized MIMO-OFDM system. However, GAMP has only been proven optimal for the i.i.d. Gaussian linear transformation matrix but not for the orthogonal matrix of our interest. The Bayesian optimal detector for the Q-OFDM system has been proposed and theoretically proven in [23]. This paper aims to make breakthrough progress in terms of practical feasibility of reliable data transmission based on low-resolution quantizers given that majority of extant works merely remain theoretic and simulation-based. Their numerical simulation results seem to verify the feasibility of employing low-resolution quantizers but fail to eliminate the widespread doubts regarding the application of reliable data transmission with low-resolution quantizers in practice. Therefore, further research should be conducted for system design and implementation. Current works have proven that iterative processes and complicated nonlinear computations involved in signal recovery or algorithm formation for combating strong nonlinear distortion can be implemented hardwarefriendly. The feasible hardware architecture of generalized Turbo (GTurbo) for coarsely quantized compressed sensing problem was first presented in [24], wherein a hardwarefriendly approximation for probability distribution functions, and the pipelined and folding hardware architecture, are proposed. These architectures have been proven to exhibit only a slight performance degeneration compared with the original full-precision result. In addition, in [25], massively parallel very-large-scale integrated architectures were developed for massive MIMO downlink with 1-bit DACs, which achieved excellent error-rate performance under acceptable hardware complexity, system cost, and circuit power consumption. Efficient hardware architecture design is the first and most important step. However, achieving reliable data transmission with low-resolution quantizers is an extensive and complicated process. The preceding related works mentioned only focused on developing a certain algorithm for signal recovery instead of the overall system design to guarantee the practicability of these algorithms. Specifically, under strong nonlinear distortion, maintaining the input signal amplitude within a certain range (i.e., automatic gain control (AGC)), estimating the noise power, and identifying the starting point of each radio frame are challenging tasks. To the best of our knowledge, no previous work has accounted for the preceding issues mentioned, thereby motivating us to address the problem. In this paper, we not only propose a feasible channel estimator and data detector but also introduce a series of robust solutions for AGC, noise estimation, and synchronization, which constitute the entire system architecture. Our ultimate goal is not restricted to propose a seemingly feasible system architecture but to implement the first prototyping system in the world for verifying the data transmission reliability using low-resolution ADCs through over-the-air (OTA) experiments. We focus on achieving wideband highspeed OFDM transmission under the extreme case of 1-bit quantization. Intuitively, under AWGN channel, when the precision of ADC is equal to the number of bits per real dimension of the employed modulation scheme, the achievable error-rate performance is equivalent to the performance under full-resolution quantization. For example, 1-bit quantization is adequate for the transmission of 4-QAM symbols under AWGN channel. However, for OFDM transmission where the inverse discrete Fourier transform (IDFT) operation produces continuous time-domain samples instead of discrete constellations, a high ADC precision is expected for reliable signal recovery. The OTA experiment results reveal that the preceding intuitive knowledge is also valid for OFDM systems, that is, 1-bit quantization can support OFDM transmission of 4-QAM symbols. Experiments are further conducted for the transmission of 16-QAM under 2-bit quantization, whose reliability is also proven. The rest of paper is organized as follows. Section II models the inference problem considered in this study and highlights the challenges caused by coarsely quantized received signal. Section III presents the overall receiver architecture and provides detailed explanations on each processing module. Numerical simulation results are shown in Section IV for the performance evaluations and comparisons of the proposed algorithms. Section V introduces the prototyping system and presents the OTA experiment results. Finally, Section VI concludes this paper. Notations: This paper uses lowercase and uppercase boldface letters to represent vectors and matrices, respectively. For vector a, aj denotes the j-th entry of a, and the operator diag(a) denotes the diagonal matrix with diagonal elements as the entries of a. Moreover, the real and imaginary parts of a complex scalar a are represented by aR and aI , respectively. The distribution of a proper complex Gaussian random variable z with mean µ and variance ν is expressed by 2 1 − |z−µ| ν e . πν Similarly, N (z; µ, ν) denotes the probability density function of a real Gaussian random variable z with mean µ and variance ν. Let Dz denote the real Gaussian integration measure z ∼ CN (z; µ, ν) = z2 1 Dz = φ(z)dz with φ(z) = √ e− 2 . 2π The cumulative distribution function is defined as R z Gaussian t2 Φ(z) = √12π −∞ e− 2 dt, and the Q function is defined as Q(z) = 1 − Φ(z). II. S YSTEM M ODEL AND C HALLENGES We consider the overall system architecture design for supporting reliable data transmission with OFDM technique based on ultra-low resolution ADC (i.e., 1−2 bit) at the receiver. The OFDM system comprises N orthogonal subcarriers. Among them, only Nd subcarriers corresponding to the frequency − N2d FNs , . . . , − FNs , FNs , . . . , N2d FNs are dedicated to data transmission, where Fs denotes the sampling frequency. Meanwhile, other N − Nd subcarriers are reversed as guard band, which are padded by the null signal to reduce the signal leakage into the sidelobe. In this paper, we use X = 3 ^ŽƵƌĐĞ dƵƌďŽ ŶĐŽĚĞƌ DŽĚƵůĂƚŽƌ ^ƵďĐĂƌƌŝĞƌ DĂƉƉŝŶŐ /&&dΘ ĚĚW Z&ŚĂŝŶ Fig. 1: Block diagram of an OFDM transmitter. {1, 2, · · · , N } to denote the index set of all subcarriers and Xd ⊆ X to denote the index subset of the Nd subcarriers used for data transmission. In addition, the subscript “d ” for N dimension vector and a matrix with N rows (for example, ad and Ad ) represent the Nd -dimension subvector comprised of the elements of a with index Xd and the submatrix comprised of the rows of A with index Xd , respectively. The signaling process at the transmitter follows the conventional OFDM transmission, which is shown in Fig. 1. The information bits generated by the data source are first encoded using Turbo code. Then, the modulator maps the coded bits into corresponding constellation symbols based on the selected modulation method, such as M -ary quadrature amplitude modulation (M -QAM), and each modulated symbol is assigned into one of Nd subcarrier of the OFDM symbol. We denote the vector of frequency-domain constellation symbols as s ∈ CN ×1 , where sj = 0 for j ∈ X \Xd . Subsequently, the frequency-domain OFDM symbol s is transformed into the time-domain using N -point IDFT. The CP with length Lcp larger than the maximum length of channel impulse response is appended at the beginning of the OFDM symbol to avoid the ISI due to the multipath effect of wireless channel. The baseband sequence is finally fed into the RF chain to be upconverted and transmitted over the wireless channel. At the receiver, the RF received signal is first downconverted into the analog baseband. The equivalent baseband received signal is sampled and quantized using ultra-low resolution ADC. After CP removal and under ideal synchronization, the coarsely quantized time-domain samples of an OFDM symbol can be expressed by a vector  √ q = Qc gAGC FH diag(h)s + n , (1) where F denotes the normalized DFT matrix with √1 e−2πj(n−1)(m−1)/N being its (m, n)-th entry; n ∈ CN ×1 N denotes the AWGN vector with distribution CN (0, σ 2 I); h is the vector of frequency-domain channel gains, which is obtained by operating DFT on the time-domain tapped delay line representation of the ISI channel denoted by ht = [ht,1 , ht,2 , · · · , ht,N ]T with ht,j = 0 for (L + 1) ≤ j ≤ N with L being the maximum number of channel taps; gAGC is the temporal gain of the AGC unit used for adjusting the input amplitude of ADC within a certain range; Qc (·) denotes the mapping function of the elementwise complexvalued quantizer. The complex-valued quantizer comprises two parallel real-valued B-bit quantizers Q(·) that separately and independently quantize the real and imaginary parts of each analog input sample. For a scalar analog input y, Qc (y) = Q(y R ) + jQ(y I ), where the quantizer Q(·) outputs the discrete value cb when the real-valued input y R or y I is within the interval (rb−1 , rb ], −∞ = r0 < r1 < · · · < r2B−1 < r2B = ∞ are the thresholds, and cb is taken as the centroid of the interval (rb−1 , rb ]. The receiver is designed for recovering the original information bits from coarse quantization observation q with minimum error rate. The canonical solution is to compute a certain estimate of s and its corresponding mean-square error for subsequently calculating the log-likelihood ratio (LLR) corresponding to each coded bit, which is finally fed into the Turbo decode to recover information bits. Many issues should be considered for receiver design to ensure the performance of this information recovery process. We summarize the challenges as follows: 1) AGC and noise power estimation: AGC and noise power estimation are two essential components in modern digital communications. In conventional systems with full-resolution ADCs, these functional modules are based on the power accumulator performed by taking the long-term time average of the amplitude of the corresponding received baseband samples. However, almost all amplitude information has already been lost due to the low-resolution ADCs. Therefore the first challenging issue is how to design the certain architecture in receiver to overcome the loss of signal amplitude and further facilitate AGC and noise power estimation. 2) Synchronization: The classical method of synchronization searching is based on transmitting a pre-defined complex sequence at the beginning of each radio frame. At the receiver, we compute the correlation between the received and reference sequence and find the local maximum correlation to identify the starting point of each frame. It is desirable to clarify the validity of this method under coarsely quantized received samples, and more important, to design a specialized reference sequence to guarantee the synchronization accuracy. 3) Channel estimation: A common approach to obtaining the CSI is to periodically transmit pilot signals at frequency domain, which are contained by subcarriers with index Xd . The vector of frequency-domain pilot symbols is denoted by p ∈ CN , where pj = 0 for j ∈ X \Xd . The quantized received signal vector for each pilot OFDM symbol is given by  √ (2) q = Qc gAGC FH diag(p)h + n , √ gAGC p to and we define an auxiliary vector as p̄ = simplify the notation. Conventional linear channel estimator first perform the least-square (LS) channel estimation to yield Fq/p̄, and then left-multiplies it by a certain weight matrix. This method is initially derived based on the orthogonality among different subcarriers. However, this orthogonality has not been preserved due to the low-resolution ADC. This motivates us to re-design a specialized channel estimator for estimating hd from (2). 4) Data detection: Data detector aims to compute the estimate of each frequency-domain modulated symbol based on q and the estimated CSI h̄. The conventional OFDM receiver transforms the quantized signal q into frequency-domain and yields q̃ = Fq, which is followed by the one-tap equalizer. The receiver computes the estimate of sj for j ∈ Xd by q̃j /h̄j , and their corresponding mean squared error (MSE) by c2 /h̄j , where σ c2 denotes the estimated noise power. For gAGC σ full-precision quantization, the DFT operation on q enables 4 ůŽǁƌĞƐŽůƵƚŝŽŶ  s' Ğƚ͘ ^LJŶĐ͘ dƵƌďŽ ĞĐŽĚĞƌ ' ŚŝŐŚƌĞƐŽůƵƚŝŽŶ  EŽŝƐĞ Ɛƚ͘ ŚĂŶŶĞů Ɛƚ͘ Fig. 2: Receiver architecture. each q̃j to be an AWGN observation of hj sj corresponding to the j-th subcarrier. However, this conventional OFDM detector can no longer yield acceptable performance for the lowresolution quantization case because the orthogonality among subcarriers has been severely destroyed. III. R ECEIVER A RCHITECTURE In this section, we introduce the overall architecture of the proposed receiver, and provide detailed explanations on each processing module. In this section, we first introduce the overall architecture of the proposed receiver, and then given detailed explanations about how each processing modules work. Once the RF signal is received from the wireless channel, it is down-converted into the analog baseband for the subsequent processing. The overall architecture of baseband processing at the receiver is shown as block diagram in Fig. 2. The received analog baseband signal is divided into two streams to be independently sampled and discretized for different purposes to facilitate digital storage and processing. One stream is quantized with ultra-low resolution (e.g., 1−2 bit) and sampled with frequency Fs , from which synchronization searching, channel estimation and data detection are sequentially conducted. Another stream is quantized with high precision but sampled with low sampling frequency (tens or hundreds times lower than Fs ), which is used for signal/noise power accumulator to assist AGC and noise power estimation. We elaborate the details on each processing module in the following subsections. A. AGC and Noise Power Estimation The AGC unit priori to the low-resolution ADC is used to adjust the amplitude of baseband signal within a certain range to suit the fixed thresholds of the ADC, which is indispensable for the quantization resolution of 2 bit and more. In our system, AGC is implemented by measuring the average power of each received radio frame Pr and normalizing it to be one, hence gAGC = 1/Pr . For 1-bit quantization, the AGC itself is not necessary. However, the average power of received signal Pr is a requisite parameter in this case for the initialization of proposed iterative algorithms and the recovery of the channel norm. Considering the development of a unified system architecture for different quantization resolutions, we reserve the AGC module to obtain Pr by taking the reciprocal of gAGC when 1-bit ADC is used. The noise power estimation is conducted by assigning a few OFDM symbols in each frame to transmit null signal and measuring the average power of these OFDM symbols at the receiver. The signal/noise power is measured by using the samples quantized by the high-resolution ADC with low sampling frequency. Notably, this assistant high-resolution ADC will not lead to significant increase in power consumption under a significantly low sampling frequency. The reduction in the precision of signal/noise power estimation due to sampling frequency reduction can be compensated by prolonging the time of power accumulator. B. Synchronization We perform the symbol-timing synchronization at the receiver to precisely identify the starting point of each frame from the sequence of coarsely quantized samples. Owing to the low cross-correlation and high autocorrelation, the Zadoff-Chu (ZC) sequence is selected as the primary synchronization sequence (PSS). For the OFDM symbols in each frame arranged to transmit PSS, the ZC sequence is placed at 62 subcarriers on both sides of the zero frequency, while other subcarriers are padded by null signal to facilitate accurate synchronization. The synchronization searching is conducted by calculating the correlation between the quantized received sequence and a reference sequence and determining the position with highest correlation to identify the starting point of each frame. We redesign the reference sequence considering the effect of lowresolution ADC as the following steps: 1) Transferring the frequency-domain OFDM symbol transmitting PSS into time-domain. 2) Normalizing the power of the resulting sequence. 3) Discretizing the obtained sequence by using the mapping function Qc (·). Once the starting point of each frame is identified, the CP of each OFDM symbol is removed, and quantized timedomain OFDM symbols are inputted into their corresponding processing modules, that is, channel estimator or detector. C. Channel Estimator The goal of channel estimator is to estimate the frequencydomain channel parameters of those subcarriers dedicated for data transmission, namely hd , based on the given q and p̄. The estimated channel parameter h̄d is subsequently utilized as the CSI for data detection by applying Algorithm 2 to the remainder of OFDM symbols in the current slot. Before formally introducing the proposed algorithm, we define the following two auxiliary vectors x = diag(p̄)h, z = FH x (3) to facilitate our subsequent discussion. Herein, x and z represent the noiseless received signal in frequency and time domain, respectively. The channel estimation problem (2) has been formulated as a generalized linear model of the frequency-domain channel vector h. A straightforward idea to estimate hd is to directly apply the GTurbo principle [26] proposed for quantized compressed sensing problem with orthogonal measurement matrix to (2). The GTurbo-based algorithm comprises two processing 5 DŽĚƵůĞ KÖ d [ dSUL B [ H[W d A ) ] H[W Ao B DŽĚƵůĞ ] SRVW A Ğdžƚ DD^ ĞƐƚŝŵĂƚŽƌŽĨ T nj >DD^ ŚĂŶŶĞů ƐƚŝŵĂƚŝŽŶ KÖ GLDJ S [ SRVW B Ğdžƚ [H[W Bo A )H ] SUL A ] H[W Bo A Fig. 3: Block diagram of GTurbo-LMMSE channel estimator. The “ext” block represents the extrinsic information computation. The block of a certain matrix represents the operation of left-multiplying the input vector by the matrix in the block. modules: Module A is used to directly produce a coarse estimation of x from the quantized measurement q, which is equivalent to produce a coarse estimate of h following the linear transform in (3); Module B is used to produce a refined version of the estimated hd by computing its minimum MSE (MMSE) estimate. The extrinsic mean and variance of each module are passed to the other module as the input. The estimate of hd is successively refined by iteratively executing the two modules until convergence. However, Module B of the GTurbo-based algorithm, which computes the MMSE estimate of hd , requires the prior distribution of the channel parameters. The statistics of wireless channels are unavailable, hence the use of the GTurbo-based algorithm for the channel estimation problem is invalid. The extant GTurbo framework should be extended to accommodate the inference problem without the priori distribution of the parameters to be estimated. The challenges encountered in the channel estimation algorithm design include: • • Algorithm 1: GTurbo-LMMSE Channel Estimator pri post Initialization: zpri = 0N×1 , A = 0N×1 , xB = 0N×1 , xB pri 2 vA = 1 − gAGC σ ; for t = 1 : Tmax do Module A: (1) Compute the a posteriori mean/variance of z: h i h i post zj,A = E zjR | qjR + jE zjI | qjI , (4a) h i h i post R R I I vj,A = var zj | qj + var zj | qj , (4b) (2) Compute the extrinsic information of Module A: post vA = pri vB ext vA→B 1 = ext xext A = vA→B The re-design of Module B to directly extract the desired channel parameter hd from its input without using the the priori distribution of hd . The derivation of extrinsic mean and variance corresponding to the preceding operations guarantee the convergence of the proposed algorithm. The unavailability of the priori distribution of h makes the Bayesian optimal MMSE estimation infeasible, thereby significantly complicating the algorithm design. However, the breakthrough can be completed given the decoupling effect of Module A. Specifically, the output of Module A, which is also the input of Module B, can be approximated by the elementwise product of the pilot vector and the frequency-domain channel response vector corrupted by the AWGN. Module B is tasked to extract the channel parameter hd through its AWGN observation, which can be resorted to the welldeveloped denoiser in the field of image processing. Various kinds of denoisers are available, such as the SURE-LET [27], BM3D [28], dictionary learning [29], and SVT [30]. However, these denoisers are specialized for i.i.d. sparse signal, low-rank matrix, or image. In our earlier trial computer simulations, we find that mechanical application of these denoisers cannot yield satisfactory performance for the estimation of hd with strongly correlated entries. Therefore, we must select a new kind of denoiser for this channel estimation problem. We observe that extracting hd from its approximate AWGN = N 1 X post v , N j=1 j,A post vA (5a) 1 − pri vA !−1 Fzpost Fzpri A A − post pri vA vA ! , , ext xpri d,B = xd,A→B , (5b) (5c) (5d) Module B: (3) LMMSE channel estimation: ĥ = WLMMSE diag−1 (p̄d )xpri d,B , (6) (4) Compute the extrinsic information of Module B: xpost d,B = diag(p̄d )ĥd ,   post pri , xA = xext − αxpri B→A = c xB B zpri A =F H xpri A , pri ext vA = vB→A = xext d,B − xpost d,B Nd (7a) (7b) (7c) 2 . (7d) end observation is similar to channel estimation problem in the conventional full-resolution OFDM systems. Many robust channel estimators are available for being selected as the denoiser here. Among these channel estimators, linear MMSE (LMMSE) channel estimator is a type of widely-used linear channel estimator, which is aimed at minimizing the MSE. The reliability and hardware efficiency of the LMMSE channel estimator are confirmed by our previously developed massive MIMO-OFDM prototyping system [31]. Therefore, we select 6 the LMMSE channel estimator as the denoiser in Module B. The proposed algorithm is definitely named as GTurboLMMSE channel estimator. The proposed channel estimation algorithm is presented in Algorithm 1, and its computation procedure is illustrated in Fig. 3. We then provide several intuitive explanations to allow readers to improve their understanding of the proposed channel estimator. In Module A, (4a) and (4b) compute the MMSE estimate of zj under the given quantized observation  qj , and  its corresponding MSE, where E zjR | qjR and var zjR | qjR denote the posteriori expectation and variance of zjR given qjR pri,R 1 pri under the assumption of P(zjR ) = N (zjR ; zj,A , 2 vA ). Their explicit expressions can be derived through [17] as   pri   vA φ(η1 ) − φ(η2 ) pri,R +q E zjR | qjR = zj,A , Φ(η1 ) − Φ(η2 ) pri 2(vA + σ2 ) (8a) pri 2 (vA ) − × pri 2 2(vA + σ 2 ) 2 η1 φ(η1 ) − φ(η2 ) pri vA   var zjR | qjR = " φ(η1 ) − Φ(η1 ) − Φ(η2 ) where σ2 + # η2 φ(η2 ) , Φ(η1 ) − Φ(η2 ) c2 , and = gAGC σ pri,R pri,R zj,A − l(qjR ) zj,A − u(qjR ) , η2 = q η1 = q pri pri (vA + σ 2 )/2 (vA + σ 2 )/2 (8b) (9) (10) pri where ω B ∼ CN (0, vB I). The LMMSE denoiser for extractpri ing hd from xB is constructed by (6), where WLMMSE is the corresponding linear weight matrix with the form  WLMMSE = Rhhd Rhd hd + γ 2 I , j2π L̂ N where Xd (n) is the n-th element of the set Xd . In addition, we pri let γ 2 to be a very small number, e.g., 10−5 instead of 1/vB in the simulations and experiments, which yields an enhanced performance proven by our extensive simulations. The remaining task is to derive the extrinsic mean and variance of Module B associated with the LMMSE denoiser (6). The extrinsic mean xext B→A is first constructed as the linear combination of xpost and xpri B B with the form of (7b). Next, we determine coefficients α and c according to the divergence-free property of the series of algorithms extended from the Turbo signal recovery principle [33]. The details of this principle can be summarized in the following two conditions: (a) The error of the input vector and extrinsic mean of Module B is orthogonal, namely, T ext E[(xpri B − x) (xB→A − x)] = 0; where l(qjR ) and u(qjR ) are the lower and upper bounds corresponding to the output value qjR . Moreover,   Iquantizer  I I I E zj | qj and var zj | qj can be similarly computed by pri,R pri,I simply replacing zj,A with zj,A when computing η1 and η2 in (9). Subsequently, extrinsic information of Module A can be computed by (5a)–(5d); specifically, (5a) and (5b) compute the extrinsic variance of Module A, whereas (5c) and (5d) compute the extrinsic mean of Module A, which is then used as the input of Module B. We then consider the operations of Module B for extracting the desired channel parameters. The input of Module B xpri B can be approximately represented by the AWGN observation of x = diag(p̄)h as follows: xpri B = diag(p̄)h + ω B , of Rhhd and Rhd hd given this assumption can be computed by [32, Appendix A]   1, m=Xd (n) m−Xd (n) −j2π L̂ [Rhhd ](m,n) = N  1−e m−Xd (n) , m 6= Xd (n)  j2πL̂ N  1, Xd (m) =Xd (n) X (m)−Xd (n) −j2π L̂ d [Rhd hd ](m,n) = N  1−e Xd (m)−Xd (n) , Xd (m) 6= Xd (n) (11) where parameter γ 2 can be theoretically selected as the signalto-noise ratio (SNR) of equivalent AWGN channel (10), that pri . The notation Rab = E{abH } represents the crossis 1/vB correlation matrix of vectors a and b. The major challenge here is that the exact correlation matrices Rhhd and Rhd hd are unknown. Therefore, we assume the time-domain profile of the channel to be a uniform tapped delay line with the maximum number of channel taps as L̂. The (m, n)-th entry (12) (b) The error of extrinsic mean of Module B E[||xext B→A − x||2 ] is minimized. Finally, coefficients α and c satisfying conditions (a) and (b) can be obtained following the derivations in [34], which is given by diag(Wd,LMMSE)diag−1 (qd )1Nd ×1 , Nd (xpri )H (xpost − αxpri B ) c = B post B . pri 2 kxB − αxB k α= (13a) (13b) In addition, we can approximate the extrinsic variance 2 ext vB→A = N1 ||xext B→A − x|| by relaxing the exact x as its post estimate xB . Notably, nearly all amplitude information is lost irretrievably under 1-bit quantization. We must recover the amplitude information, specifically the average channel gain Ph = P 1 2 |h j | , by additional means to overcome this intrinj∈Xd Nd sic defect of 1-bit ADC and further improve the performance. We refine the channel estimate ĥd with the extra amplitude information by operating channel normalization expressed by q ĥd , (14) h̃d = P̂h kĥd k which is the final output of the channel estimator. In our system, the estimated Ph can be obtained from the current gain of AGC circuit gAGC , which is defined by   1 c2 × N . −σ (15) P̂h = gAGC Nd √ We use h̄d = gAGC h̃d as the CSI for the data detector after obtaining the normalized channel estimate h̃d . The channel normalization is unnecessary when the ADC precision is more 7 DŽĚƵůĞ Kd DŽĚƵůĞ [ SUL B DD^ V SRVW ĞƐƚŝŵĂƚŽƌŽĨ d B Ɛ [ H[W Ao B ) ] SUL B GLDJ K [ SRVW B )H ] SRVW B ] SRVW A ) DD^ ĞƐƚŝŵĂƚŽƌŽĨ T nj [ SUL A H VSRVW B [ SRVW A Ğdžƚ ) Ğdžƚ ] SUL A ] H[W Bo A Fig. 4: Block diagram of GTurbo-based data detector with estimated CSI h̄. The “ext” block represents the extrinsic information computation. The block of a certain matrix represents the operation of left-multiplying the input vector by the matrix in the block. than 1 bit because the majority of amplitude information can be recovered by the proposed GTurbo-LMMSE channel estimator. This result can be verified by numerical results √ presented in Section IV. We let h̄d = gAGC ĥd as the CSI for the data detector under the case without channel normalization. D. Data Detector The data detector is designed for computing the MMSE estimate of s and its corresponding MSE based on the quantized received signal q modeled by (1). The GTurbo principle can be directly used for data detection by following the framework of [23, Algorithm 1] using the estimated channel parameters h̄ as the known CSI. In this subsection, we provide a brief introduction to this GTurbo-based detector. We define two auxiliary vectors similar to (3) as follows: x = diag(h)s, Algorithm 2: GTurbo-based Data Detector pri post Initialization: zpri = 0N×1 , N×1 , xB A = 0N×1 P , xB = 0 pri 2 1 vA = N j∈Xd |h̄j | ; for t = 1 : Tmax do Module A: (1) Compute the posteriori mean/variance of z: h i h i post zj,A = E zjR | qjR + jE zjI | qjI , (16a) h i h i post vj,A = var zjR | qjR + var zjI | qjI , (16b) (2) Compute the extrinsic mean/variance of x: post vA = pri vB ext vA→B 1 = post vA (17a) 1 − pri vA !−1 Fzpost Fzpri A A post − pri vA vA ext xext A→B = vA→B z = FH x. The computation procedures are demonstrated in Algorithm 2, and the corresponding flow diagram of this algorithm is presented in Fig. 4. This detector has two modules as follows: Module A calculates the coarse estimation of x without considering the prior distribution of s; Module B refines the estimate by considering the prior distribution of s. In Module A, (16a) and (16b) compute the posteriori mean and variance of zj with explicit expressions provided by (8a) and (8b), respectively. The extrinsic variance of Module A can be computed using (17a) and (17b), while the extrinsic mean can be computed using (17c) and (17d), correspondingly. Algorithms 1 and 2 demonstrate the same operations in Module A, which can be implemented hardware-friendly using the hardware architecture proposed in [24]. Therefore, these algorithms can share the identical circuit module when implementing the application specific integrated circuit (ASIC) of the receiver in practice. In module B, we compute the estimate of s and its MSE for j ∈ Xd in (18a) and (18b). Their explicit expressions are given by   pri pri P xj,B vB s CN s; h̄j , |h̄j |2 s∈S post  ,  (20a) sj,B = pri P xpri vB j,B CN s; h̄j , 2 |h̄j | s∈S = N 1 X post v , N j=1 j,A , ! (17b) , (17c) ext xpri d,B = xd,A→B , (17d) Module B: (3) Compute the posteriori mean/variance of q: i h pri spost j,B = E sj | h̄j , xj,B , j ∈ Xd , h i post vj,B = var sj | h̄j , xpri j,B , j ∈ Xd , (18a) (18b) (4) Compute the extrinsic mean/variance of z: 1 X post post |h̄j |2 vj,B , vB = Nd j∈X d !−1 1 1 pri ext , vA = vB→A = post − pri vB vB (19a) (19b) post xpost j,B = h̄j sj,B , j ∈ Xd , (19c) F xpost B post vB ext ext zpri A = zB→A = vB F xpri B pri vB H H − ! . (19d) end post vj,B = P 2  pri xpri vB j,B , 2 h̄j |h̄j | |s| CN s;  pri P x CN s; h̄j,B , j s∈S s∈S pri vB 2 h̄j | |   2 − spost . j,B (20b) 8 NMSE vs Iteration Numbers under 1 bit Quantization -10 -15 -25 Perfect Parameters, with Normalization Imperfect Parameters, with Normalization Perfect Parameters, without Normalization Imperfect Parameters, without Normalization -30 2 4 6 8 10 12 Iteration Numbers 14 16 18 -20 20 NMSE (dB) NMSE (dB) -20 -25 -30 NMSE vs Iteration Numbers under 2 bit Quantization GTurbo-LMMSE, Perfect Parameters, with Normalization GTurbo-LMMSE, Imperfect Parameters, with Normalization GTurbo-LMMSE, Perfect Parameters, without Normalization GTurbo-LMMSE, Imperfect Parameters, without Normalization LMMSE, Perfect Parameters, with Normalization LMMSE, Imperfect Parameters, with Normalization LMMSE, Perfect Parameters, without Normalization LMMSE, Imperfect Parameters, without Normalization -20 -25 -40 0 2 4 6 Perfect Parameters, with Normalization Imperfect Parameters, with Normalization Perfect Parameters, without Normalization Imperfect Parameters, without Normalization -30 -35 2 4 6 8 10 12 Iteration Numbers 14 16 18 8 10 SNR (dB) 12 14 16 18 20 18 20 (a) 1-bit quantization 20 -15 Fig. 5: NMSEs versus iteration numbers of the proposed GTurbo-LMMSE channel estimator (i.e., Algorithm 1) for the SNR of 12 dB and quantization precisions of 1 and 2 bit under four conditions. where S denotes the set of constellation points. Subsequently, we compute the extrinsic variance of Module B by (19a) and (19b) and extrinsic mean by (19c) and (19d). Further details are provided in [23]. post The output of the GTurbo-based detector spost d,B and vd,B is used for calculating the LLRs corresponding to each coded bits that are prepared for the subsequent Turbo decoding. We denote the i-th bit associated with the modulated symbol sj by bji . The LLR of bji can be computed by [35]   2 2 1 post + − , (21) − spost − s s − s LLR (bji ) = j,i j,i j,B j,B 2β P post − where β = N1d j∈Xd vj,B , s+ j,i and sj,i are defined as follows: -20 NMSE (dB) NMSE (dB) -35 -25 -30 GTurbo-LMMSE, Perfect Parameters, with Normalization GTurbo-LMMSE, Imperfect Parameters, with Normalization GTurbo-LMMSE, Perfect Parameters, without Normalization GTurbo-LMMSE, Imperfect Parameters, without Normalization LMMSE, Perfect Parameters, with Normalization LMMSE, Imperfect Parameters, with Normalization LMMSE, Perfect Parameters, without Normalization LMMSE, Imperfect Parameters, without Normalization -35 -40 0 2 4 6 8 10 SNR (dB) 12 14 16 (b) 2-bit quantization Fig. 6: NMSEs versus SNR of the proposed GTurboLMMSE channel estimator (i.e., Algorithm 1) and conventional LMMSE channel estimator under quantization precisions of 1 and 2 bit and four conditions. 2 post , s+ j,i = argmin s − sj,B s∈Si+ 2 post , s− j,i = argmin s − sj,B s∈Si− where Si+ and Si− are the subset of the constellation symbols of the adopted modulation scheme, which ith bit is 1 and 0, respectively. IV. N UMERICAL S IMULATIONS In this section, we evaluate the performance of the proposed algorithms through numerical simulations, several relevant insights into those algorithms are also provided. The numerical simulations and OTA experiments share the following setting: the number of orthogonal subcarriers N = 2048, the number of subcarriers dedicated to data transmission Nd = 1200, the code rate is 1/3, and each code word is transmitted in the successive three OFDM symbols. In this section, we simulate the channel using tapped delay line model with L = 4 channel taps, in which the power profile of each tag is set to 0, -7, -12, and -18 dB. Each entry of the pilot symbols pd is drawn independently from the equiprobable 4-QAM constellation. We also normalize each entry of the pilot symbols pd and each entry of transmitted constellation symbols sd in which E[|pj |2 ] = 1 and E[|sj |2 ] = 1 for j ∈ Xd . The desired performance metrics are obtained through the Monte-Carlo simulations of 1,000 independent channel realizations. We compare the 9 0.6 10 0 Proposed, Perfect Parameters Proposed, Imperfect Parameters Linear Receiver, Perfect Parameters Linear Receiver, Imperfect Parameters 0.5 0.4 PER Probability 10 -1 0.3 0.2 10 -2 0.1 0 -20 10 -15 -10 -5 -3 0 2 4 6 8 10 SNR 12 14 16 18 0 5 10 15 20 10 15 20 STO 20 (a) 1-bit quantization (a) 1-bit quantization for 4-QAM 0.7 10 0 Proposed, Perfect Parameters Proposed, Imperfect Parameters Linear Receiver, Perfect Parameters Linear Receiver, Imperfect Parameters 0.6 Probability 0.5 PER 10 -1 0.4 0.3 0.2 10 -2 0.1 0 -20 10 -3 -15 -10 -5 0 5 STO 0 2 4 6 8 10 SNR 12 14 16 18 20 (b) 2-bit quantization for 16-QAM (b) 2-bit quantization Fig. 8: Distribution of STO corresponding to the exact synchronization position. Fig. 7: PERs versus SNR of the proposed algorithms and linear receiver. performance of the proposed algorithms with linear receiver algorithms, including conventional LMMSE channel estimator performed by left-multiplying Fq/p̄ by the LMMSE weight matrix constructed as (11), and linear detector conducted by first approximating the quantized received signal (1) through the additive quantization noise model (AQNM) [36] and then computing the estimate of s and its corresponding MSE based on the conventional one-tap equalizer. In the following experiments, we discuss the influence of the channel normalization in (14) and the imperfect paramc2 6= σ 2 , and L̂ 6= L, on the eters, such as gAGC 6= 1/Pr , σ performance of Algorithm 1. We artificially impose an error that is uniformly distributed in [-30%, 30%] on parameters c2 , and let L̂ = 6 to 1/Pr and σ 2 to obtain gAGC and σ simulate the practical situation that exact parameters 1/Pr , σ 2 and L are unavailable. Moreover, we let gAGC = 1/Pr , c2 = σ 2 , and L̂ = L to simulate the ideal situation as σ a benchmark. The performances are compared under four conditions, namely, perfect parameters with normalization, perfect parameters without normalization, imperfect parameters with normalization, and imperfect parameters without normalization for each case of quantization precision and SNR in Figs. 5 and 6. Fig. 5 depicts the NMSEs of h̃d defined as NMSE = kh̃d − hd k2 khd k 2 which is obtained by Algorithm 1 versus the iteration numbers for the SNR of 12 dB and the quantization precisions of 1 and 2 bit under the aforementioned four conditions. The NMSE performance is better with perfect parameters than with imperfect parameters. We find that Algorithm 1 cannot converge without channel normalization with 1-bit ADC because nearly all amplitude information is lost under 1-bit quantization. Therefore, we cannot recover the lost amplitude information through the proposed iterative algorithm without extra information about the average channel gain Ph . 10 ZdKϮϬϰϰ >E Zdž DŽŶŽƉůĞ ddž ^'dϭϬϬ Fig. 9: Picture of the proposed prototyping system. The NMSE performance with channel normalization is better than that without normalization, except for the case of 2-bit quantization with imperfect parameters. This result reflects that information about the average channel gain Ph recovered by Algorithm 1 is much better than that estimated by (15) c2 provided that the quantization from incorrect gAGC and σ bit is larger than 1. The result demonstrates that channel normalization is unnecessary with quantization resolution of 2 bit and larger under which amplitude information can be recovered precisely through the proposed iterative algorithm when implementing the algorithms in practice. Fig. 6 compares the NMSE performances of Algorithm 1 and the conventional LMMSE channel estimator under different quantization precisions and the four conditions. Generally, the proposed channel estimation algorithm outperforms the conventional LMMSE channel estimator for each case, because the conventional LMMSE channel estimator is designed highly relied on the orthogonality of the different subcarriers, which has been already destroyed by low-resolution ADCs. We also notice that the conventional LMMSE estimator without channel normalization undergoes a significant performance degradation compared with its performance with normalization, even under 2-bit quantization. This result verifies the extremely poor capability of the conventional LMMSE channel estimator to recover any amplitude information from lowresolution observations. Therefore, the results also reveal that the proposed GTurbo-LMMSE channel estimator has a robust capability for recovering channel amplitude information under the quantization precision of 2 bits. Fig. 7 compares the overall information recovery performances in terms of the packet error rate (PER) between the combination of the proposed algorithms and the combination of linear schemes. For both cases, the PER obtained by the proposed algorithms is lower than 0.1 and reduces steeply when the SNR is more than 8 dB, which can be considered as achieving the reliable data transmission. However, obvious error floors appear for the PER performance of the linear receiver. Therefore, a significant performance gain can be obtained by using our proposed algorithms. We also find that imperfect parameters do not result in significant performance losses (with approximately 2 dB loss in SNR). This result can be attributed to the robust signal recovery capability of the proposed algorithms and error correction of Turbo code. We notice that an anti-intuitive phenomenon occurs for the linear receiver. Specifically, the performance with imperfect parameters outperforms that with perfect parameters under the SNR of more than 10 dB. This is because that the AQNM cannot yield a satisfactory approximation to (1) under high SNR. Under this condition, imperfect parameters compensate minimally for the mismatch of the AQNM and result in this performance improvement. This result is a form of a special phenomenon called stochastic resonance [37]. Synchronization precision is also a critical performance metric for system implementation, except for the error-rate performance evaluated above. We display the distribution of different STOs corresponding to the exact starting point of each OFDM symbol under the SNR of 15 dB and quantization precision of 1−2 bit in Fig. 8. The exact synchronization position under extremely low quantization precision of 1 and 2 bits can be identified with the probability of approximately 0.45 and 0.56, respectively. The STO is retained within the range from -4 to 4 with the highest probability, which is an acceptable range of synchronization error. We can conclude from the above results that the conventional synchronization technique remains reliable for received samples with lowresolution quantization. V. OTA E XPERIMENTS In this section, we present the OTA experiment results to verify the reliability of our proposed Q-OFDM transmission scheme. We first establish a proof-of-concept prototyping system, which is depicted in Fig. 9. The transmitter and receiver are established with a separate baseband and RF processing unit. Baseband processing is performed through the software programmed in the host computers. The corresponding procedures have been specified in Sections II and III. The RF processing is conducted by using the Rohde & Schwarz components. Specifically, we use SGT100A for the transmitter and RTO2044 for the receiver. The output baseband samples of RTO2044 are quantized by high-resolution ADC. Thus, the coarse quantization is performed virtually by the software before being further processed. This setting allows us to obtain certain reference parameters for the subsequent performance evaluations. The data exchange between the baseband processing software and RF processing components is performed through off-the-shelf high-speed interfaces. The frame structure used in our prototyping system is illustrated in Fig. 10. This structure is designed based on the frame structure of the long-term evolution system, which can be flexibly reconfigured for future extensions. An entire radio frame consists of 10 subframes; each subframe has two consecutive slots. In each slot, seven OFDM symbols are transmitted. In our system, Lcp is set to 144 for OFDM symbols 1−6, and 160 for OFDM symbol 0 in each slot. For 11 TABLE I: 4-QAM under 1 bit quantization Transmitted Power (dBm) Distance (cm) SNR (dB) MSE (dB) Uncoded BER Coded BER PER -10 50 100 200 21.9369 14.7147 9.0586 -26.2585 -21.7561 -17.6597 0 0 0.5925 0 0 0.0067 0.0241 0.0550 0.1225 0 200 500 16.9047 14.6274 -17.4163 -17.8153 0.0050 0.0138 1.5308 × 10−5 5.4899 × 10−5 0.0646 0.0831 TABLE II: 16-QAM under 2 bit quantization Transmitted Power (dBm) Distance (cm) SNR (dB) MSE (dB) Uncoded BER Coded BER PER -10 50 100 200 21.7440 15.0625 9.4999 -29.4138 -25.4841 -19.6486 0 0 0.5025 0 0 0.0033 0.0529 0.0810 0.1556 0 200 500 17.5740 14.7362 -19.5718 -19.0786 0.0141 0.0213 7.1527 × 10−5 7.8442 × 10−4 0.0796 0.0950 ϭ&ƌĂŵĞ͘ ϭ^ƵďͲ&ƌĂŵĞ Ϭ ϭ^ůŽƚ ϭ Ϯ  ϯ Ϭ ϭ Ϯ ϯ ϭϬ ϭϭ ϭϮ ϰ ϱ ϲ  ϭϴ ϭϵ LJĐůŝĐWƌĞĨŝdž ϳK&D^LJŵďŽůƐ Fig. 10: Frame structure each frame, slots 2−19 are dedicated for data transmission, in which the predefined pilot sequence is transmitted via the first OFDM symbol of these slots for channel estimation, while the rest of the six OFDM symbols are used for transmitting data sequences. To establish the synchronization between the transmitter and the receiver, OFDM symbol 6 of slots 0 to 10 are reversed for transmitting the primary synchronization signals (PSS). The first OFDM symbol of slot 1 is padded by null symbols for noise power estimation. III. Experiments are conducted to evaluate the error-rate performance of the proposed prototyping system under different quantization precisions and modulation schemes including 1 bit for 4-QAM and 2 bits for 16-QAM. Various average SNRs are generated by changing the transmit power and distance between transmitter and receiver. The performance metrics to be evaluated include the MSE of estimated channel parameter, coded and uncoded BER, and PER of the information bits in each code word. The average SNRs and these metrics are measured from 10,000 received frames and obtained by taking the average of these measured results. We use the LMMSE channel estimate from the high-resolution received signal as the reference when calculating the MSE of estimated channel parameters. The experiment results are shown in Tables I and II, which present the measured performance metrics when transmitting 4-QAM with 1-bit quantization and 16-QAM with 2-bit quantization, respectively. We can conclude that the reliable data transmission can be guaranteed with a SNR that is higher than 10 dB for both cases. TABLE III: System Parameters Parameter System Bandwidth Sampling Rate Subcarrier Interval Frame Duration Subframe Duration OFDM symbol Duration (without CP) Zdž 100 MHz 153.6 MHz 75 KHz 2 ms 0.2 ms 13.33 µs ϱŵ Fig. 11: The experiment environment and equipment deployment. VI. C ONCLUSION WƌŝŶƚĞƌ &ŝůŝŶŐ ĐĂďŝŶĞƚ This paper proposed an overall system architecture for supporting a reliable OFDM transmission with ultra-low res͹ƚƌĂŶƐŵŝƚƚĞƌ olution ADC (i.e.,͹ƌĞĐĞŝǀĞƌ 1−2 bit) at the receiver. We developed a novel GTurbo-LMMSE channel estimator by aligning Module ϱŵ A of the GTurbo framework with the LMMSE denoiser to ^ŚŽĞ ĐĂďŝŶĞƚ The experiments are conducted in an indoor environment displayed in Fig. 11. The transmitter and receiver are placed in the corridor beside office table. We adjust their distance by fixing the transmitter and placing the receiver in different positions. In our experiments, the carrier frequency is set to 3.5 GHz, and we extend the bandwidth to 100 MHz to support a high data transmission with unchanged frame duration. The resulting system parameters are listed in Table ddž KĨĨŝĐĞdĂďůĞ Value KĨĨŝĐĞƚĂďůĞ ddž t Zdž 12 estimate the desired channel parameters without their priori distribution. Synchronization, AGC and noise power estimation were also considered and integrated into the system design, except for the novel inference algorithms. We established the first prototyping system based on extremely low-resolution quantization at the receiver worldwide. OTA experiments were conducted to examine the reliability of the proposed system. The following conclusions were drawn from the results of numerical simulations and OTA experiments. • The proposed GTurbo-LMMSE channel estimator outperforms the conventional LMMSE channel estimator in terms of NMSE performance and amplitude recovery capability. In addition, Channel normalization is indispensable with 1-bit ADC. • The GTurbo-based detector in cooperation with the proposed GTurbo-LMMSE channel estimator obtain significant gain in error-rate performance compared with the linear schemes, which is insufficient for dealing with the strong nonlinear distortion caused by low-resolution ADCs. • The precision of the synchronization searching can be guaranteed even from coarsely quantized received signals. • A communication system supporting reliable OFDM transmission with ultra-low resolution ADCs was achieved. R EFERENCES [1] R. Walden, “Analog-to-digital converter survey and analysis,” IEEE J. Sel. Areas Commun., vol. 17, no. 4, pp. 539–550, Apr. 1999. [2] B. Murmann. ADC performance survey 1997-2017. [Online]. Available: http://web.stanford.edu/∼ murmann/adcsurvey.html [3] A. Mezghani and J. Nossek, “Analysis of rayleigh-fading channels with 1-bit quantized output,” in Proc. IEEE Int. Symp. Inf. Theory (ISIT), Toronto, Canada, Jul. 2008, pp. 260–264. [4] J. Singh, O. Dabeer, and U. Madhow, “On the limits of communication with low-precision analog-to-digital conversion at the receiver,” IEEE Trans. Commun., vol. 57, no. 12, pp. 3629–3639, Dec. 2009. [5] S. Krone and G. Fettweis, “Fading channels with 1-bit output quantization: Optimal modulation, ergodic capacity and outage probability,” in Proc. IEEE Information Theory Workshop (ITW), Dublin, Ireland, 2010, pp. 1–5. [6] J. Mo and R. Heath, “Capacity analysis of one-bit quantized MIMO systems with transmitter channel state information,” IEEE Trans. Signal Process., vol. 63, no. 20, pp. 5498–5512, Oct. 2015. [7] N. Liang and W. Zhang, “Mixed-ADC massive MIMO uplink in frequency-selective channels,” IEEE Trans. Commun., vol. 64, no. 11, pp. 4652–4666, Nov. 2016. [8] L. Fan, S. Jin, C.-K. Wen, and H. Zhang, “Uplink achievable rate for massive MIMO systems with low-resolution ADC,” IEEE Commun. Lett., vol. 19, no. 12, pp. 2186–2189, Dec. 2015. [9] S. Rini, L. Barletta, Y. Eldar, and E. Erkip. (2017) A general framework for low-resolution receivers for MIMO channels. [Online]. Available: https://arxiv.org/abs/1702.08133v1 [10] C. Risi, D. Persson, and E. G. Larsson. (2014) Massive MIMO with 1-bit ADC. [Online]. Available: http://arxiv.org/abs/1404.7736 [11] A. Mezghani, M.-S. Khoufi, and J. Nossek, “A modified MMSE receiver for quantized MIMO systems,” in Proc. ITG Workshop Smart Antennas (WSA), 2007. [12] J. Choi, J. Mo, and R. Heath, “Near maximum-likelihood detector and channel estimator for uplink multiuser massive MIMO systems with one-bit ADCs,” IEEE Trans. Commun., vol. 64, no. 5, pp. 2005–2018, May 2016. [13] Y.-S. Jeon, S.-N. Hong, and N. Lee. (2017) Uplink multiuser massive MIMO systems with low-resolution ADCs: A coding-theoretic approach. [Online]. Available: https://arxiv.org/abs/1704.03287v1 [14] ——. (2017) Supervised-learning-aided communication framework for massive MIMO systems with low-resolution ADCs. [Online]. Available: https://arxiv.org/abs/1610.07693v3 [15] A. Mezghani and J. Nossek, “Belief propagation based mimo detection operating on quantized channel output,” in Proc. IEEE Int. Symp. Inf. Theory (ISIT), Austin, TX, 13-18 June 2010, pp. 2113–2117. [16] T. Zhang, C.-K. Wen, S. Jin, and T. Jiang, “Mixed-ADC massive MIMO detectors: Performance analysis and design optimization,” IEEE Trans. Wireless Commun., vol. 15, no. 11, pp. 7738–7752, Nov. 2016. [17] C.-K. Wen, C.-J. Wang, S. Jin, K.-K. Wong, and P. Ting, “Bayes-optimal joint channel-and-data estimation for massive MIMO with low-precision ADCs,” IEEE Trans. Signal Process., vol. 64, no. 10, pp. 2541–2556, May 2016. [18] J. G. Proakis, Digital Communications. Boston, USA: McGraw-Hill Companies, 2007. [19] IEEE Std 802.11ad-2012 (Amendment to IEEE Std 802.11-2012), Std., 2012. [20] C. Molln, J. Choi, E. G. Larsson, and R. Heath, “One-bit ADCs in wideband massive MIMO systems with OFDM transmission,” in Proc. 2016 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), March 2016, pp. 3386–3390. [21] C. Studer and G. Durisi, “Quantized massive MU-MIMO-OFDM uplink,” IEEE Trans. Commun., vol. 64, no. 6, pp. 2387–2399, June 2016. [22] J. Garcı́a, J. Munir, K. Roth, and J. A. Nossek. Channel estimation and data equalization in frequency-selective MIMO systems with one-bit quantization. 2016. [Online]. Available: http://arxiv.org/abs/1504.04799v1,preprint. [23] H. Wang, C. K. Wen, and S. Jin, “Bayesian optimal data detector for mmwave OFDM system with low-resolution ADC,” IEEE J. Sel. Areas Commun., vol. 35, Sept. 2017. [24] J. Yang, C. Zhang, S. Jin, C.-K. Wen, and X. You, “Efficient hardware architecture for compressed sensing with DFT sensing matrix,” in Proc. IEEE International Workshop on Signal Processing Systems (SiPS), Oct. 26-28, 2016, pp. 207–212. [25] O. Castañeda, S. Jacobsson, G. Durisi, M. Coldrey, T. Goldstein, and C. Studer. 1-bit massive MU-MIMO precoding in VLSI. 2017. [Online]. Available: http://arxiv.org/abs/1702.03449,preprint. [26] T. Liu, C.-K. Wen, S. Jin, and X. You, “Generalized Turbo signal recovery for nonlinear measurements and orthogonal sensing matrices,” in Proc. IEEE Int. Symp. Inf. Theory (ISIT), Barcelona, Spain, Jul. 10-15, 2016, pp. 2883–2887. [27] T. Blu and F. Luisier, “The sure-let approach to image denoising,” IEEE Trans. Image Process., vol. 16, no. 11, pp. 2778–2786, Nov. 2007. [28] K. Dabov, A. Foi, V. Katkovnik, and K. Egiazarian, “Image denoising with block-matching and 3d filtering,” vol. 6064, 2006. [29] M. Elad and M. Aharon, “Image denoising via sparse and redundant representations over learned dictionaries,” IEEE Trans. Image Process., vol. 15, no. 12, pp. 3736–3745, Dec. 2006. [30] J.-F. Cai, E. J. Candès, and Z. Shen, “A singular value thresholding algorithm for matrix completion,” SIAM Journal on Optimization, vol. 20, no. 4, pp. 1956–1982, 2010. [31] X. Yang, W. Lv, N. Wang et al. (2016) Design and implementation of a TDD-based 128-antenna massive MIMO prototyping system. [Online]. Available: https://arxiv.org/abs/1608.07362 [32] O. Edfors, M. Sandell, J. J. van de Beek, S. K. Wilson, and P. O. Borjesson, “OFDM channel estimation by singular value decomposition,” IEEE Trans. Commun., vol. 46, no. 7, pp. 931–939, July 1998. [33] J. Ma and P. Li, “Orthogonal AMP,” IEEE Access, vol. 5, pp. 2020– 2033, 2017. [34] Z. Xue, J. Ma, and X. Yuan, “Denoising-based Turbo compressed sensing,” IEEE Access, vol. 5, pp. 7193–7204, 2017. [35] Y. S. Cho, J. Kim, W. Y. Yang, and C. G. Kang, MIMO-OFDM Wireless Communications With MATLAB. Hoboken, NJ: Wiley, 2007. [36] O. Orhan, E. Erkip, and S. Rangan, “Low power analog-to-digital conversion in millimeter wave systems: Impact of resolution and bandwidth on performance,” in Proc. Information Theory and Applications Workshop (ITA), San Diego, USA, Feb. 1-6, 2015, pp. 191–198. [37] M. D. McDonnell, N. G. Stocks, C. E. M. Pearce, and D. Abbott, Stochastic resonance: from suprathreshold stochastic resonance to stochastic signal quantization. Cambridge University Press, 2008.
7cs.IT
1 List Decoding of Insertions and Deletions arXiv:1701.02612v4 [cs.IT] 17 Nov 2017 Antonia Wachter-Zeh, Member IEEE Abstract—List decoding of insertions and deletions in the Levenshtein metric is considered. The Levenshtein distance between two sequences is the minimum number of insertions and deletions needed to turn one of the sequences into the other. In this paper, a Johnson-like upper bound on the maximum list size when list decoding in the Levenshtein metric is derived. This bound depends only on the length and minimum Levenshtein distance of the code, the length of the received word, and the alphabet size. It shows that polynomial-time list decoding beyond half the Levenshtein distance is possible for many parameters. Further, we also prove a lower bound on list decoding of deletions with with the well-known binary Varshamov-Tenengolts (VT) codes which shows that the maximum list size grows exponentially with the number of deletions. Finally, an efficient list decoding algorithm for two insertions/deletions with VT codes is given. This decoder can be modified to a polynomial-time list decoder of any constant number of insertions/deletions. Index Terms—insertions, deletions, Levenshtein metric, list decoding, Varshamov–Tenengolts (VT) codes. I. I NTRODUCTION Lately, codes for correcting insertions and deletions attract a lot of attention due to their possible application to correcting errors in DNA storage and DNA sequencing, cf. [8]. Furthermore, insertions and deletions can be seen as synchronization errors in communication systems since the information about the position is lost when receiving a certain symbol. The algebraic concepts by Varshamov, Tenengolts, and Levenshtein for correcting insertions and deletions go back to the 1960s. Varshamov and Tenengolts designed a class of codes, nowadays called VT codes, which was originally designed to correct asymmetric errors on the Z-channel [24], [25]. Levenshtein proved that these codes can also be used to correct a single insertion or deletion [26]. Further, he constructed a class of codes that can correct two adjacent insertions or deletions [13], and designed q-ary single insertion-/deletioncorrecting codes [24]. Brakensiek, Guruswami and Zbarsky recently presented multiple insertion-/deletion-correcting codes in [2] with low redundancy. The papers [3], [21], [22] deal with bursts of insertions/deletions. Special types of insertions include duplications [12] and sticky insertions [17]. Asymptotic bounds on the size of insertion-/deletion-correcting codes were derived by Levenshtein [26] and non-asymptotic bounds were recently presented by Kulkarni and Kiyavash [11]. This paper investigates list decoding of insertions and deletions. A list decoder returns the list of all codewords in This work was supported by the Technical University of Munich—Institute for Advanced Study, funded by the German Excellence Initiative and European Union Seventh Framework Programme under Grant Agreement No. 291763. Parts of these results were presented at the IEEE International Symposium on Information Theory (ISIT) 2017, Aachen, Germany [28]. A. Wachter-Zeh is with the Institute for Communications Engineering, Technical University of Munich (TUM), Munich, Germany, Email: [email protected]. radius at most τ around a given received word. The idea of list decoding was introduced by Elias [4] and Wozencraft [29]. In this paper, we investigate list decoding in the Levenshtein metric. The Levenshtein distance between two words is the minimum number of insertions and deletions needed to turn one of the words into the other. A (τ, ℓ)L -list decoder is therefore a decoder which returns all codewords of a given code in Levenshtein distance at most τ around any given received word. The size of this list is at most ℓ. A fundamental question when considering list decoding in a certain metric is whether the complexity of a list decoding algorithm is “feasible”. This leads to investigating the possibility of polynomial-time (w.r.t. the code-length) list decoding. The list size ℓ gives a lower bound on the complexity of such a decoder, since writing down the whole list of codewords is part of any list decoding algorithm. On the one hand, a lower bound on the maximum list size that grows exponentially in the length of the code rules out the possibility of polynomialtime list decoding. This is the case for example for certain families of rank-metric codes, cf. [27], [18]. On the other hand, a polynomial upper bound shows that polynomial-time list decoding is possible (but explicit algorithms still have to be found). In the Hamming metric, the Johnson upper bound [9], [10], [1], [7] shows for any code of length n and minimum Hamming distance D that the size of the decoding list is polynomialp in n when τ is less than the so-called Johnson radius n − n(n − D). In this paper, we investigate list decoding of insertions and deletions in the Levenshtein metric. First, we derive a Johnsonlike upper bound on the list size. Second, a lower bound on list decoding VT codes and a list decoding algorithm of a constant number of insertions/deletions with VT codes are given. To our knowledge, this is the first paper which considers list decoding of insertions/deletions in the Levenshtein metric. The recent work by Mazooji [16], [15] considers unique decoding beyond half the minimum Levenshtein distance, but this is a different setting since such a decoder always fails when the list size is larger than one. The paper [6] by Guruswami and Wang shows that there exists  a binary code of length n which can list-decode n 12 − ǫ deletions, where 0 < ǫ < 21 . However, they consider deletions only, and their code rate is very small, in the order of ǫ3 . In this region, our upper bound shows that from a combinatorial point of view, polynomial-time list decoding is actually possible up to a larger radius. Another similar-looking problem is the sequence reconstruction problem of insertions or deletions, see [14], [20], [5], where the maximum intersection of two insertion/deletion balls of radius τ around any two words is calculated. The problem in this paper can on the contrary be seen as calculating the maximum number of codewords in a ball around any word. 2 The rest of this paper is organized as follows. Section II provides notations and definitions, and defines VT codes. In Section III, we derive the main result, i.e., the Johnsonlike upper bound on the maximum list size and also give an alphabet-free version of this bound. This bound is then illustrated and discussed in Section IV and simplified for the cases of deletions only and insertions only. Section V provides the lower bound on list decoding deletions only with VT codes and finally, in Section VI we give a list decoder for two insertions/deletions with VT codes and explain how it can be extended to any constant number of insertions/deletions. II. P RELIMINARIES A. Notations and Definitions Let Fq be a finite field of order q, where q is a power of a prime, and let Fnq denote the set of all vectors (sequences) of length n over Fq . A subsequence of a vector x = (x1 , x2 , . . . , xn ) is formed by taking a subset of the symbols of x and aligning them without changing their order. Hence, for N < n, any vector y = (xi1 , xi2 , . . . , xiN ) is a subsequence of x if 1 ≤ i1 < i2 < · · · < iN ≤ n, and in this case we say that n − N deletions occurred in the sequence x and y is the result. Vice versa, N − n insertions occurred in the sequence x if N > n and x is a subsequence of y = (y1 , y2 , . . . , yN ). Here, y is called a supersequence of x. The Levenshtein distance dL (a, b) between two words a and b (not necessarily of the same length) is the minimum number of insertions and deletions which is needed to transform a into b. In this sense, an additive error of Hamming weight one (also called substitution error) consists of one insertion and one deletion at the same position. Therefore, if the Hamming distance between a and b is dH (a, b) = D, then dL (a, b) ≤ 2D. Also notice that for two vectors a of length n and b of length N , dL (a, b) can become larger than n and at most n + N . (τ ) By BL (r) we denote the set of all vectors in Levenshtein (δ) distance at most τ around a given word r; by BD (r) the set of all vectors which can be obtained from r by at most δ (ǫ) deletions; and by BI (r) the set of words which can be (τ ) obtained from r by at most ǫ insertions. The size of BL (r) (δ) (ǫ) and BD (r) depends on its center, whereas the size of BI (r) only depends on the radius ǫ and the length N of r and (ǫ) therefore, by slight abuse of notation, we also write |BI (N )|. By the triple (n, M, d)Lq we denote a code of Levenshtein distance d, of length n, and cardinality M . An (n, M, d)Lq code can always decode uniquely if the number of insertions ǫ and the number of deletions δ satisfy τ ,ǫ+δ < d . 2 (1) In this paper, we analyze the capability of (n, M, d)Lq codes to perform polynomial-time list decoding beyond d/2. Given a L received word r ∈ FN q , a (τ, ℓ)L -list decoder for an (n, M, d)q code returns the set of all codewords in Levenshtein distance at most τ from r and the size of this list is at most ℓ. Throughout this paper, the maximum list size is denoted by  (τ ) ℓ , max C ∩ BL (r) . r∈FN q Finally, for any positive integers a, b, we denote by [a, b] the set of integers {i : a ≤ i ≤ b, i ∈ Z}. B. Varshamov–Tenengolts Codes The binary Varshamov–Tenengolts (VT) codes [25] are single-deletion correcting codes (cf. Sloane’s survey in [23]), defined as follows. Definition 1 (VT Codes) For a ∈ [0, n], the binary Varshamov–Tenengolts (VT) code VT a (n) is the following set of binary vectors: n o n X i · ci ≡ a mod (n + 1) . VT a (n) , c = (c1 , . . . , cn ) : i=1 Levenshtein proved in [26] that VT codes can correct either a single deletion or a single insertion. The largest VT codes are obtained for a = 0, and these codes are conjectured to be optimal in the sense that they have the largest cardinality among all single-deletion correcting codes [23]. The cardinality of the 2n VT 0 (n) code is at least n+1 ; for the exact cardinality of the VT 0 (n) code, see [23, Eq. (10)]. For all n, the union Sn of all VT codes forms a partition of the space Fn2 , that is a=0 VT a (n) = Fn2 . III. J OHNSON - LIKE U PPER B OUND In this section, we derive a Johnson-like upper bound on the list size which holds for any q-ary code, minimum Levenshtein distance d, and any received word of length N ≥ 0. Thus, from a combinatorial point of view, polynomial-time list decoding is possible at least up to the derived radius. The proof follows similar ideas as the proof of Bassalygo [1] and Roth [19, Prop. 4.11] for the Johnson bound in Hamming metric, but the adaptations to the Levenshtein metric are nontrivial since we have to deal with sequences of different lengths and spheres in the Levenshtein metric behave completely different than spheres in the Hamming metric. E.g., the size of a deletion sphere depends on its center, not only its radius. Theorem 1 (Main Theorem: Johnson-like Upper Bound) Let q ≥ 2 and let an integer τ < d ≤ n + N be given. Let r ∈ FN q be a given word of length N , where N ∈ [n−τ, n+τ ]. Denote q (n + N ). η, q+1 Then, for any (n, M, d)Lq code C and for any integer τ such that p τ < η − η(η − d) , τL (q), (2)  (τ ) the maximum list size ℓ = maxr∈FN C∩BL (r) is bounded q by dη ℓ≤ 2 τ − (2τ − d)η d(n + N ) = q+1 . (3) 2 − (2τ − d)(n + N ) τ q 3 Proof: We denote the list of codewords as follows: L,C∩ (τ ) BL (r) = {c1 , c2 , . . . , cℓ } ⊆ C ⊆ Fnq , with |L| = ℓ. Therefore, for each i = 1, . . . , ℓ, the number of insertions ǫi and the number of deletions δi of elements of ci to obtain r (where δi + ǫi is minimized), satisfies ǫi + δi = dL (r, ci ) ≤ τ . Equivalently, dL (r, ci ) is obtained by δi deletions of elements of ci and ǫi deletions of elements of r such that both result in the same vector and δi + ǫi is minimized. We therefore denote sets of positions of deletions from ci and r, respectively, of smallest size to obtain the same vector by D(i) and E (i) , where |D(i) | = δi and |E (i) | = ǫi . Note that these sets do not have to be unique, but the choice is fixed for the remainder of the proof. We associate each ci with the two corresponding sets D(i) and E (i) . For these sets, the following holds: D(i) ⊆ [1, n] and E (i) ⊆ [1, N ]. The total number λ of the previously mentioned five events can be bounded from below as follows: X X |D(i1 )∪ D(i2 ) \{k : k ∈ D(i1 ) ∩ D(i2 )∧ ai1 = ai2 }| λ, i1 ∈[1,ℓ]i2 ∈[1,ℓ] i2 6=i1 + |(E (i1 ) ∪ E (i2 ) ) \ (E (i1 ) ∩ E (i2 ) )| ≥ X X i1 ∈[1,ℓ] i2 ∈[1,ℓ] i2 6=i1 |F (i1 ,i2 ) | + |F (i2 ,i1 ) | ≥ ℓ(ℓ − 1)d. (5) On the other hand, we can explicitly count the five events as follows: given a position k ∈ [1, n] and a fixed element a ∈ Fq , the list size equals ℓ = xa,k + x̂a,k + x⊗,k where x̂a,k denotes the number of values i, i ∈ [1, ℓ], for which k ∈ D(i) but where the deleted k-th symbol of c(i) does not equal a. Then, the number of values i1 and i2 , i1 , i2 ∈ [1, ℓ] andPi1 6= i2 , for which the first event holds (for a fixed k) pairs (i1 , i2 ) is a∈Fq xa,k · x̂a,k . Similarly, the number of P The Levenshtein distance is therefore: for which the second or third event holds are a∈Fq xa,k · x⊗,k + x⊗,k (ℓ − x⊗,k ). Thus, summing over the number of dL (r, ci ) = |D(i) | + |E (i) | = δi + ǫi ≤ τ, ∀i ∈ [1, ℓ]. pairs (i1 , i2 ) for P which one of the first three events occur for Further, we denote by F (i1 ,i2 ) ⊆ [1, n] and F (i2 ,i1 ) ⊆ [1, n] a fixed k, gives a∈Fq ∪⊗ xa,k (ℓ − xa,k ). the sets of positions which have to be deleted to obtain the A similar argument shows that the total number of same vector from ci1 and from ci2 such that the sum of their pairs P (i1 , i2 ) of the last two events for a fixed j equals cardinalities |F (i1 ,i2 ) | + |F (i2 ,i1 ) | is minimal. Therefore, a∈Fq ∪⊗ ya,j (ℓ − ya,j ). It therefore follows from summing dL (ci1 , ci2 ) = |F (i1 ,i2 ) |+|F (i2 ,i1 ) | ≥ d, ∀i1 , i2 ∈ [1, ℓ], i1 6= i2 . over all j and k that (pay attention that the ⊗ is included in the summation): Let xa,j denote the number of times in all ℓ codewords in L  X X  X that a fixed position j ∈ [1, n] is contained in D(i) and the λ = ya,j (ℓ − ya,j ) . xa,k (ℓ − xa,k ) + deleted value equals a ∈ Fq . Similarly, let ya,j denote the a∈Fq ∪⊗ k∈[1,n] j∈[1,N ] number of times in all ℓ codewords in L that j ∈ [1, N ] is (6) P contained in E (i) and the deleted value equals a ∈ Fq . x = ℓ for all k ∈ [1, n] and Since a,k a∈Fq ∪⊗ P Thus, a∈Fq ∪⊗ ya,j = ℓ for all j ∈ [1, N ], we can simplify (6)  X X X as follows: (4) ya,j ≤ ℓτ. xa,j + ! X X X a∈Fq j∈[1,n] j∈[1,N ] 2 . (7) ya,j x2a,k + λ = ℓ2 (n + N ) − Denote by x⊗,j and y⊗,j the number of times that a fixed a∈Fq ∪⊗ j∈[1,N ] k∈[1,n] position j ∈ / D(i) , respectively j ∈ / E (i) , ∀i ∈ [1, ℓ]. Hence, Combining (5) and (7) yields: X X ! y⊗,j ≥ ℓ(N + n − τ ). x⊗,j + X X X 2 2 2 j∈[1,N ] j∈[1,n] ya,j . xa,k + ℓ (n + N ) − ℓ(ℓ − 1)d ≥ a∈Fq ∪⊗ j∈[1,N ] k∈[1,n] In the following, consider all ℓ(ℓ − 1) tuples of two distinct P codewords in L, i.e., all tuples (ci1 , ci2 ) where i1 6= i2 , and Further, x ⊗,k = ℓ − a∈Fq xa,k and similarly, y⊗,j = ℓ − P their associated sets D(i1 ) , E (i1 ) , D(i2 ) , E (i2 ) . y , and therefore, a,j a∈Fq We count the overall number of the following events 2 2   X X ∀i1 , i2 ∈ [1, ℓ], i1 6= i2 , ∀k ∈ [1, n] and ∀j ∈ [1, N ]: 2 ya,j . and y⊗,j = ℓ− xa,k x2⊗,k = ℓ − (i1 ) (i2 ) • k ∈D ∩D and for the deleted values ai1 6= ai2 a∈Fq a∈Fq • or k ∈ / D(i1 ) and k ∈ D(i2 ) (i ) • or k ∈ D 1 and k ∈ / D(i2 ) Hence, (i1 ) • or j ∈ /E and j ∈ E (i2 ) (i ) ℓ2 (n + N ) − ℓ(ℓ − 1)d • or j ∈ E 1 and j ∈ / E (i2 ) .   Notice that X X X X X 2 2   y⊗,j x2⊗,k + + ya,j x2a,k + ≥ (i1 ) (i2 ) {j ∈ E ∩E and for the deleted values ai1 6= ai2 } = ∅, a∈F j∈[1,N ] k∈[1,n] j∈[1,N ] k∈[1,n] q since deleting the symbol at the same position of r always has the same value, otherwise this case would have to be considered as well. = ℓ2 (n+N ) + X X k∈[1,n] a∈Fq x2a,k − 2ℓ X a∈Fq xa,k + X a∈Fq xa,k ! 2 4 + X j∈[1,N ] X 2 ya,j a∈Fq − 2ℓ X ya,j + a∈Fq X ya,j a∈Fq 2 ! the list size ℓ is bounded from above by . (8) The Cauchy–Schwarz inequality states that 2 X 1 X xa,k . x2a,k ≥ · q a∈Fq a∈Fq Further, for ease of notation, we denote: X X ya,j . xa,k , and Yj , Xk , a∈Fq a∈Fq Plugging this into (8) gives: ℓ(ℓ − 1)d  X   X q+1 2 q+1 2 ≤ 2ℓXk − Xk + Yj . 2ℓYj − q q k∈[1,n] ℓ≤ (n + N )d , ℓL . τ 2 − (2τ − d)(n + N ) (13) We have therefore derived an upper bound on the list size, depending on the length of the code n, the minimum Levenshtein distance of the code d, and the length of the received word N . This bound holds for any number of insertions ǫ and number of deletions δ where ǫ + δ ≤ τ , when τ satisfies (2), respectively (12). Thus, polynomial-time list decoding is feasible up to this radius. Corollary 1 is an alphabet-free version of the Johnson-like bound from Theorem 1 which is clearly weaker. Similar to the Johnson bound in Hamming metric, taking into account the field size q makes the largest difference for the smallest field size q, i.e., for q = 2. j∈[1,N ] (9) We will now bound the RHS of (9) from above. For that purpose, denote the following function f (z) (over the reals): f (z) = 2ℓz − q+1 2 z . q q ℓ, This function f (z) is monotonically increasing for z ≤ q+1 q achieves its global maximum for zmax , z = q+1 ℓ where q f (zmax ) = ℓ2 q+1 . For bounding (9), we have to take into account the restriction from (4), i.e., X X Yj ≤ ℓτ. (10) Xk + k∈[1,n] j∈[1,N ] Since f (Xk ) and f (Yj ) are monotonically increasing, also the following sum (which is equal to the RHS of (9)) X X f (Yj ) f (Xk ) + k∈[1,n] j∈[1,N ] is monotonically increasing and has its maximum value when q q Xk = Yj = q+1 ℓ which is q+1 ℓ2 (n + N ). Since ℓτ ≤ q 2 q+1 ℓ (n + N ), the RHS of (9) is maximized under the restriction of (10) for ℓτ , ∀i ∈ [1, n], k ∈ [1, N ]. n+N Therefore, we can bound (9) from above as follows: Xk = Yj = ℓ(ℓ − 1)d ≤ 2ℓ2 τ − q + 1 ℓ2 τ 2 . q n+N (11) Solving (11) for ℓ leads to the statement of Theorem 1. The restriction on τ holds since the denominator of (3) has to be positive. The following corollary shows an alphabet-free Johnsonlike upper bound which holds since the bound from (3) can be bounded from above by (13). Corollary 1 (Alphabet-free Johnson-like Bound) For any (n, M, d)Lq code C, any received word of length N , and any integer τ such that p (12) τ < n + N − (n + N )(n + N − d) , τL , IV. D ISCUSSION OF THE J OHNSON - LIKE B OUND A. Illustration In this section, we plot our Johnson-like bounds in order to illustrate the gain in the decoding radius compared to unique decoding. First, we illustrate the alphabet-free Johnson-like upper bound (Corollary 1). Since ∆ , N − n depends on τ , we normalize the radius by 2n (and not by n + N ) and illustrate τL d 2n of (12) as a function of 2n for different values of ∆ in Fig. 1. This normalization of (12) gives: s   d ∆ ∆ ∆2 ∆ τL =1+ − 1+ + 2 − 1+ (14) 2n 2n n 4n 2n 2n Fig. 1 illustrates (14) for different values of ∆. Notice that since N ∈ [n − τ, n + τ ], we know that ∆ ∈ τ ≥ 14 . On the [−τ, τ ]. Thus, for e.g., ∆ = − n2 , we have 2n other hand, the argument in the square root is only defined for τ 3 2n ≤ 4 and therefore the curve is only plotted for this region. In general, the plot shows a notable improvement compared to the unique decoding radius (1) (green dash-dotted line). Interestingly, for ∆ = 0, the result equals p the alphabetfree Hamming-metric Johnson radius n − n(n − d) when normalized by n. Second, we take the field size into account which gives a further improvement, especially for small q. The alphabetdependent bound from (2) when normalized by 2n gives:   ∆ q τL (q) 1+ = 2n q+1 2n s       ∆ ∆ d q q − 1+ · 1+ − . q+1 2n q+1 2n 2n For q = 2, this gives: τL (q) 2 ∆ = + − 2n 3 3n s ∆2 4 4∆ + + 2− 9 9n 9n   d . 2n (15) (q) for In Fig. 1, the last black dash-dotted curve illustrates τL2n ∆ = 0. Compared to the second curve, we notice that taking the field size into account demonstrates a further improvement. ∆ 2 + 3 3n 5 1 τL /2n for ∆ = −n/2 τL /2n for ∆ = 0 τL /2n for ∆ = n Unique decoding radius τL (q = 2)/2n for ∆ = 0 0.8 τ 2n 0.6 0.4 0.2 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 d 2n τL d Figure 1. Normalized alphabet-free Johnson-like radius 2n from (12) (first three curves), as a function of the normalized minimum Levenshtein distance 2n . d τ = 4n ) corresponds to the green dash-dotted line. The last curve (black dash dotted) illustrates the alphabet-dependent The unique decoding radius (i.e., 2n (q) normalized Johnson-like radius τL2n from (2) for q = 2 and ∆ = 0. B. VT Codes The following example shows that polynomial-time list decoding of two insertions/deletions is possible with VT codes. Example 1 (Johnson-like Bound for VT Codes) First note that VT codes have Levenshtein distance d = 4 since all codewords have equal length n (thus d has to be even) and since it is proven that they can correct any single deletion or insertion (and therefore d ≥ 3). For fixed d, the larger n+N gets, the smaller the RHS of (2) and (12) get. Thus, for fixed n and d and N ∈ [n − τ, n + τ ], the minimum of the RHS is achieved for N = n + τ . Thus, if we prove that τ insertions can be corrected, any combination of τ insertions and deletions can be corrected as well. We want to understand if list decoding of VT codes for τ = 2 is possible for any N ∈ [n − 2, n + 2] and therefore check (12) for d = 4 and N = n + 2. From (12), we therefore need that: p 2n + 2 − (2n + 2)(2n − 2) > 2. p √ p ⇐⇒ 2n = 4n2 > (2n − 2)(2n + 2) = 4n2 − 4, which is true for any n > 0. Thus, list decoding of two insertions/deletions is feasible in polynomial time. This potentially doubles the error-correcting capability of VT codes (at the cost of having a list of codewords). In Section VI, a simple list decoding algorithm for this case is shown and also how to generalize it to any constant number of insertions/deletions. C. Only Deletions or Only Insertions The bound from Theorem 1 simplifies to the following corollary when only deletions occur. Corollary 2 (Johnson-like Upper Bound for Deletions) Let q ≥ 2 and let r ∈ FN q be a given word of length N = n − δ ≥ 0. Then, for any (n, M, d)Lq code C and for any integer δ such that q+1 2 δ − (2δ − d)(2n − δ) > 0, q the list size ℓ is bounded from above by n o (δ) ℓ = max C ∩ BD (r) r∈FN q ≤ q+1 2 q δ d(2n − δ) , − (2δ − d)(2n − δ) (δ) where BD (r) denotes a deletion ball around r of deletion radius δ, i.e., the number of deletions δ between all words in the ball and r is at most δ. Similarly, we obtain the following Johnson-like upper bound for list decoding only insertions. Corollary 3 (Johnson-like Upper Bound for Insertions) Let q ≥ 2 and let r ∈ FN q be a given word of length N = n + ǫ ≥ n. Then, for any (n, M, d)Lq code C and for any integer ǫ such that q+1 2 ǫ − (2ǫ − d)(2n + ǫ) > 0, q the list size ℓ is bounded from above by n o (ǫ) ℓ = max C ∩ BI (r) r∈FN q ≤ q+1 2 q ǫ d(2n + ǫ) , − (2ǫ − d)(2n + ǫ) 6 (ǫ) where BI (r) denotes a ball around r of insertion radius ǫ, i.e., the number of insertions ǫ between all words in the ball and r is at most ǫ. Interestingly, the Johnson-like bound for deletions is larger than the one for insertions; i.e., it seems that more deletions can be list decoded than insertions. V. A L OWER B OUND D ELETION -L IST-D ECODING OF VT C ODES In this section, we derive a lower bound on the maximum list size when list decoding deletions only with VT codes. In general, a lower bound on the maximum list size will give a minimum complexity estimate of any list decoder since stating the list of codewords is a necessary task of any list decoder. FOR Theorem 2 (Lower Bound of VT Codes for Deletions) 2n , For the binary VT 0 (n) code of cardinality |VT 0 (n)| ≥ n+1 the maximum list size of list decoding up to δ deletions is bounded from below as follows:  n  n δ 1 nδ−1 δ ℓ≥ · ≥ & δ . n+1 δ n+1 δ Proof: The length of the received word r is N = n − δ. Due to the pigeonhole principle, there is a received word r of length N such that the number of codewords of length n around r in insertion radius at most δ is at least the average number of codewords in an insertion ball of radius δ (whose size does not depend on r, but on N ): (δ) |BI (N )| . 2n It is known that for a binary vector of length NP , the number  s of supersequences of length N + s is exactly i=0 N +s . i Thus, the number of supersequences of a vector of length N Pδ Ps (δ) of length at most N + δ is |BI (N )| = s=0 i=0 N +s i and with the size of the VT code, we obtain:  Pδ Ps (δ) N +s |BI (N )| s=0 i=0 i = ℓ≥ n+1 n+1 and the statement follows. The maximum list size therefore grows exponentially with the number of deletions and at least polynomially with a degree-δ-function in the length n of the VT code. Notice that this result does not contradict in any sense Example 1 or Algorithm 2, since this shows in general a lower bound on list decoding δ deletions, while Example 1 and Algorithm 2 show that list decoding of a constant number deletions with VT codes always results in a polynomial-sized list of codewords. Deriving a similar lower bound for list decoding of insertions does not work in this way since the actual size as well (δ) as lower bounds on the size of the deletion ball |BD (r)| depend on the received word rather than only its length (or actually, the number of runs of the received word), see [26, Equation (1)] and therefore the pigeonhole argument of the proof of Theorem 2 does not work. The same problem occurs when deriving a lower bound for insertions and deletions. Additionally, we are not aware of an expression or an explicit (τ ) lower bound for |BL (r)|. ℓ ≥ |C| · VI. L IST D ECODING A LGORITHM FOR VT C ODES As shown in Example 1, polynomial-time list decoding of VT codes for τ = 2 is possible. In this section, we present a simple (2, n)L -list decoder for VT codes. We restrict ourselves to a = 0, but this principle works for any other VT code as well. Usually, the list size will be much smaller than n. Despite its simple concept, this decoder is the first explicit polynomialtime list decoding algorithm in the Levenshtein metric. It is also shown how to generalize the algorithm to any constant number of insertions/deletions. We denote the following checksum S(r) of the received word r (which is zero if r ∈ VT 0 (n) and N = n): S(r) , − N X i=1 i · ri mod (n + 1). (16) Notice that the minus for the checksum is introduced such that (16) rather denotes the checksum deficiency as in [23]. The length of the received word r = (r1 , r2 , . . . , rN ) is denoted by N and provides information on how many insertions/deletions occurred. We thereby assume that the total number of insertions and deletions is at most τ = 2. Thus, for N = n − 2, we will correct two deletions; for N = n − 1 we correct a single deletion (with list size one); for N = n we will correct one insertion and one deletion (if the received word is already a codeword, the list size will be one as explained later); for N = n + 1, one insertion; and for N = n + 2, two insertions. For our list decoder, we make use of the well-known single insertion/deletion decoder for VT codes, cf. [23], which is summarized in Algorithm 1 for the case when N = n − 1, i.e., a single deletion happened. Here, from a VT codeword (c1 , c2 , . . . , cn ) the symbol cp was deleted. Denote by L0 /L1 the number of zeros/ones left of cp and by R0 /R1 the number zeros/ones right of cp . Note that wtH (r) = R1 +L1 . Of course, the decoder knows neither p nor cp nor L0 , L1 , R0 , R1 . Algorithm 1. VT-D EL -D EC (r) Input: Received sequence: r = (r1 , . . . , rn−1 ) ∈ F2n−1 1 2 3 4 5 6 7 Weight calculation: w = wtH (r) Checksum calculation: S(r) if S(r) ≤ w then Find p such that wtH (rp , . . . , rn−2 , rn−1 ) = S(r) Output: Reconstructed sequence of length n: (r1 , . . . , rp−1 , 0, rp , . . . , rn−1 ) else L0 = S(r) − w − 1 Find p such that (r1 , r2 , . . . , rp−1 ) contains L0 zeros Output: Reconstructed sequence of length n: (r1 , . . . , rp−1 , 1, rp , . . . , rn−1 ) The complexity of Algorithm 1 is in O(n). Single insertioncorrection works in a similar way and is denoted by VT-I N D EC in the following. 7 Our list decoding algorithm uses the VT single insertion/deletion decoder and is shown in Algorithm 2. If N = n− 1 or n+ 1, we directly call a unique VT decoder since two insertions or deletions in a vector of length n cannot result in a vector of length n − 1 or n + 1. In the other cases, we first generate all subsequences or supersequences of length n − 1 or n + 1, respectively, and call a VT decoder for each of these sequences. Algorithm 2. VT-L IST-D EC (r) Input: Received sequence: r = (r1 , r2 , . . . , rN ) ∈ FN 2 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 L=∅ if N = n − 2 then for all supersequences r′ of r of length n − 1 do c =VT-D EL -D EC(r′ ) if S(c) = 0 and dL (r, c) ≤ 2 then Add c to L if N = n − 1 then c =VT-D EL -D EC(r) L = {c} if N = n then for all subsequences r′ of r of length n − 1 do c =VT-D EL -D EC(r′ ) if S(c) = 0 and dL (r, c) ≤ 2 then Add c to L for all supersequences r′ of r of length n + 1 do c =VT-I N -D EC(r′ ) if S(c) = 0 and dL (r, c) ≤ 2 then Add c to L if N = n + 1 then c =VT-I N -D EC(r) L = {c} if N = n + 2 then for all subsequences r′ of r of length n + 1 do c =VT-I N -D EC(r′ ) if S(c) = 0 and dL (r, c) ≤ 2 then Add c to L Output: List of possible codewords L ⊂ Fnq Clearly, this strategy provides all codewords around r in distance at most τ = 2. To understand the maximum list size, recall that for N = n − 2, the number of supersequences of length n − 1 is exactly n; for N = n + 2, the number of subsequences of length n + 1 is equal to the number of runs of r and therefore at most n + 2. Further, there cannot be two codewords in the output list which result in the given received word by deleting the symbol at the same position (and one additional insertion or deletion at different positions) since otherwise these two words have Levenshtein distance only two. Thus, the list size for N = n + 2 and also for N = n is at most n. The previously mentioned reasoning explains also why the list size will be one if r has length N = n and is a codeword (i.e., S(r) = 0). The complexity of Algorithm 2 is in O(n2 ) since O(n) times a unique VT decoder is called. This algorithm can be extended to any constant number of insertions and deletions τ , by building simply all the corresponding sub- and supersequences. For example, when N = n, we know that the same number of insertions and deletions occurred; From r we then create • all supersequences of length n + 1 and use a single insertion decoder, • all subsequences of length n− 1 and use a single deletion decoder, • all supersequences of length n + 2, from each of these sequences all subsequences of length n + 1 and then use a single insertion decoder, • ... • all subsequences of length n − ⌊τ /2⌋, from each of these sequences all supersequences of length n − ⌊τ /2⌋ − 1, from each of these sequences all supersequences of length n − ⌊τ /2⌋ − 2 and so on until we have many sequences of length n − 1 and use a single deletion decoder. For analyzing the list size, let us look at the last step: here the number of subsequences of length n−⌊τ /2⌋ is at most n⌊τ /2⌋ , for each time when a new set of supersequences of these sequences is created, the number of investigated sequences is increased by a factor of n. Thus, a VT decoder has to be applied to at most n⌊τ /2⌋ · n⌊τ /2⌋−1 = nτ −1 sequences. Since there are in total τ such steps, at most τ nτ −1 sequences have to be investigated, i.e., for constant τ , the list size is in O(nτ −1 ). For τ = 2, we could previously show that the list size is at most n, and not 2n, so it might be possible to prove that for the general case the list size is at most nτ −1 instead of τ nτ −1 , but this is not obvious. In the case for a constant number δ of deletions only, for any received word of length N = n − δ, we have to calculate all supersequences of length n − 1 and apply a VT decoder. In this case, the list size is at most nδ−1 . ACKNOWLEDGMENT The author would like to thank the reviewers whose very helpful comments helped to improve the paper significantly (and in particular to make the proof of the main result more understandable) and also the reviewers from ISIT 2017 (one of the reviewers made a comment which significantly simplified the list decoder of VT codes). Further, the author wants to thank Andreas Lenz and Eitan Yaakobi for the helpful discussions. R EFERENCES [1] L. A. Bassalygo, “New upper bounds for error correcting codes,” Probl. Inf. Transm., vol. 1, no. 4, pp. 41–44, Oct. 1965. [2] J. Brakensiek, V. Guruswami, and S. Zbarsky, “Efficient low-redundancy codes for correcting multiple deletions,” CoRR, vol. abs/1507.06175, 2015. [Online]. Available: http://arxiv.org/abs/1507.06175 [3] L. Cheng, T. G. Swart, H. C. Ferreira, and K. A. S. Abdel-Ghaffar, “Codes for correcting three or more adjacent deletions or insertions,” in IEEE Int. Symp. Infrom. Theory (ISIT), Jun. 2014, pp. 1246–1250. 8 [4] P. Elias, “List decoding for noisy channels,” Massachusetts Institute of Technology, Cambridge, MA, USA, Technical Report 335, 1957. [5] R. Gabrys and E. Yaakobi, “Sequence reconstruction over the deletion channel,” in IEEE Int. Symp. Inform. Theory (ISIT), July 2016, pp. 1596– 1600. [6] V. Guruswami and C. Wang, “Deletion codes in the high-noise and highrate regimes,” IEEE Trans. Inform. Theory, vol. 63, no. 4, pp. 1961– 1970, Apr. 2017. [7] V. Guruswami, List Decoding of Error-Correcting Codes. Springer, Dec. 1999. [8] S. Jain, F. Farnoud, M. Schwartz, and J. Bruck, “Duplication-correcting codes for data storage in the DNA of living organisms,” in IEEE Int. Symp. on Inform. Theory (ISIT), Jul. 2016, pp. 1028–1032. [9] S. Johnson, “A new upper bound for error-correcting codes,” IRE Trans. Inform. Theory, vol. 8, no. 3, pp. 203–207, Apr. 1962. [10] ——, “Improved asymptotic bounds for error-correcting codes,” IEEE Trans. Inform. Theory, vol. 9, no. 3, pp. 198–205, Jul. 1963. [11] A. A. Kulkarni and N. Kiyavash, “Nonasymptotic upper bounds for deletion correcting codes,” IEEE Trans. Inf. Theory, vol. 59, no. 8, pp. 5115–5130, Aug. 2013. [12] A. Lenz, A. Wachter-Zeh, and E. Yaakobi, “Bounds on codes correcting tandem and palindromic duplications,” in Int. Workshop on Coding and Cryptography (WCC), Sep. 2017. [13] V. Levenshtein, “Asymptotically optimum binary code with correction for losses of one or two adjacent bits,” Systems Theory Research (translated from Problemy Kibernetiki), vol. 19, pp. 293–298, 1967. [14] V. I. Levenshtein, “Efficient reconstruction of sequences from their subsequences or supersequences,” J. Comb. Theory Ser. A, vol. 93, no. 2, pp. 310–332, Feb. 2001. [15] K. Mazooji, “Examining the unique decodability of insertion-correcting codes beyond the guarantee,” Nov. 2016. [Online]. Available: http:// arxiv.org/abs/1611.09073 [16] ——, “On unique decoding from insertion errors,” in IEEE Int. Symp. Inf. Theory (ISIT), Jun. 2017, pp. 2698–2702. [17] M. Mitzenmacher, “Capacity bounds for sticky channels,” IEEE Trans. Inform. Theory, vol. 54, no. 1, pp. 72–77, Jan. 2008. [18] N. Raviv and A. Wachter-Zeh, “Some gabidulin codes cannot be list decoded efficiently at any radius,” IEEE Trans. Inform. Theory, vol. 62, no. 4, pp. 1605–1615, Apr. 2016. [19] R. M. Roth, Introduction to Coding Theory. Cambridge University Press, 2006. [20] F. Sala, R. Gabrys, C. Schoeny, and L. Dolecek, “Exact reconstruction from insertions in synchronization codes,” IEEE Trans. Inform. Theory, vol. 63, no. 4, pp. 2428–2445, Apr. 2017. [21] C. Schoeny, A. Wachter-Zeh, R. Gabrys, and E. Yaakobi, “Codes for correcting a burst of deletions or insertions,” in IEEE Int. Symp. Inf. Theory (ISIT), Jul. 2016. [22] ——, “Codes correcting a burst of deletions or insertions,” IEEE Trans. Inform. Theory, vol. 63, no. 4, pp. 1971–1985, Apr. 2017. [23] N. J. A. Sloane, “On single-deletion-correcting codes,” in Proc. Codes and Designs, 2001, pp. 273–291. [24] G. Tenengolts, “Nonbinary codes, correcting single deletion or insertion (corresp.),” IEEE Trans. Inf. Theory, vol. 30, no. 5, pp. 766–769, 1984. [25] R. R. Varshamov and G. M. Tenengolts, “Codes which correct single asymmetric errors (in Russian),” Automatika i Telemkhanika, vol. 161, no. 3, pp. 288–292, 1965. [26] V.I. Levenshtein, “Binary codes capable of correcting deletions, insertions and reversals (in Russian),” Doklady Akademii Nauk SSR, vol. 163, no. 4, pp. 845–848, 1965. [27] A. Wachter-Zeh, “Bounds on list decoding of rank-metric codes,” IEEE Trans. Inform. Theory, vol. 59, no. 11, pp. 7268–7277, Nov. 2013. [28] ——, “Limits to list decoding of insertions and deletions,” in IEEE Int. Symp. Inf. Theory (ISIT), Jun. 2017. [29] J. M. Wozencraft, “List Decoding,” Massachusetts Institute of Technology, Cambridge, MA, USA, Technical Report, 1958. Antonia Wachter-Zeh (S’10–M’14) is an Assistant Professor at the Technical University of Munich (TUM), Munich Germany. She received an equivalent of the B.S. degree in electrical engineering in 2007 from the University of Applied Science Ravensburg, Germany, and the M.S. degree in communications technology in 2009 from Ulm University, Germany. She obtained her Ph.D. degree in 2013 at the Institute of Communications Engineering, University of Ulm, Germany and at the Institut de recherche mathématique de Rennes (IRMAR), Université de Rennes 1, Rennes, France. From 2013 to 2016, she was a postdoctoral researcher at the Technion—Israel Institute of Technology, Haifa, Israel. Her research interests are coding and information theory and their application to storage, communications, and security.
7cs.IT
First-spike based visual categorization using reward-modulated STDP Milad Mozafari1,2 , Saeed Reza Kheradpisheh1,2 , Timothée Masquelier3 , Abbas Nowzari-Dalini1 , and Mohammad Ganjtabesh1,2,∗ arXiv:1705.09132v2 [q-bio.NC] 2 Jan 2018 1 Department of Computer Science, School of Mathematics, Statistics, and Computer Science, University of Tehran, Tehran, Iran 2 School of Biological Sciences, Institute for Research in Fundamental Sciences (IPM) , Tehran, Iran 3 CerCo UMR 5549, CNRS Université Toulouse 3, France Abstract 80, and NORB), this reward modulated STDP (RSTDP) approach extracted particularly discriminative visual features, whereas classic unsupervised STDP extracts any feature that consistently repeats. As a result, R-STDP outperformed STDP on these datasets. Furthermore, R-STDP is suitable for online learning, and can adapt to drastic changes such as label permutations. Finally, it is worth mentioning that both feature extraction and classification were done with spikes, using at most one spike per neuron. Thus the network is hardware friendly and energy efficient. Reinforcement learning (RL) has recently regained popularity, with major achievements such as beating the European game of Go champion. Here, for the first time, we show that RL can be used efficiently to train a spiking neural network (SNN) to perform object recognition in natural images without using an external classifier. We used a feedforward convolutional SNN and a temporal coding scheme where the most strongly activated neurons fire first, while less activated ones fire later, or not at all. In the highest layers, each neuron was assigned to an object category, and it was assumed that the stimulus category was the category of the first neuron to fire. If this assumption was correct, the neuron was rewarded, i.e. spiketiming-dependent plasticity (STDP) was applied, which reinforced the neuron’s selectivity. Otherwise, anti-STDP was applied, which encouraged the neuron to learn something else. As demonstrated on various image datasets (Caltech, ETH∗ Keywords: Spiking Neural Networks, Reinforcement Learning, Reward-Modulated STDP, Visual Object Recognition, Temporal Coding, FirstSpike Based Categorization. 1 Introduction Neurons in the brain are connected by synapses that can be strengthened or weakened over time. The neural mechanisms behind long-term synaptic plasticity, which is crucial for learning, have been under investigation for many years. Spiketiming-dependent plasticity (STDP) is an unsupervised form of synaptic plasticity, observed in different brain areas [1, 2, 3, 4], in particular in the visual cortex [5, 6, 7]. STDP works by consid- Corresponding author. Email addresses: [email protected] (MM), [email protected] (SRK), [email protected] (TM), [email protected] (AND), [email protected] (MG). 1 ering the time difference between pre- and postsynaptic spikes. According to this rule, if the presynaptic neuron fires earlier (later) than the postsynaptic one, the synapse is strengthened (weakened). Studies have shown that STDP results in coincidence detectors, by which a neuron gets selective to a frequent input spike pattern leading to an action potential whenever the pattern is presented [8, 9, 10, 11]. STDP works well in finding statistically frequent features, however, as any unsupervised learning algorithm, it faces with difficulties in detecting rare but diagnostic features for important functionalities such as decision-making. pute the value of the reward. Also, Florian [33] showed that R-STDP is able to solve the XOR task by either rate or temporal input coding and learning a target firing rate. A year later, Legenstein et al. [34] investigated conditions, under which R-STDP achieves a desired learning effect. They demonstrated the advantages of R-STDP by theoretical analysis, as well as practical applications to biofeedbacks and a two-class isolated spoken digit recognition task. Vasilaki et al. [35] examined the idea of R-STDP on problems with continuous space. They showed that their model is able to solve the Morris water maze quite fast, while the standard policy gradient rule failed. Investigating capabilities of R-STDP continued by research from Frémaux et al. [36], in which conditions for a successful learning is theoretically discussed. They showed that a prediction of the expected reward is necessary for R-STDP to learn multiple tasks simultaneously. Studying the RL mechanism in the brain has gathered attentions in recent years, and researchers try to solve more practical tasks by reward-modulated synaptic plasticity [37, 38, 39]. Several studies suggest that the brain’s reward system plays a vital role in decision-making and forming behaviors. This is also known as reinforcement learning (RL), by which the learner is encouraged to repeat rewarding behaviors and avoid those leading to punishments [12, 13, 14, 15, 16, 17, 18]. It is found that dopamine, as a neuromodulator, is one of the important chemical substances involved in the reward system [19], where its release is proportional to the expected future reward [17, 20, 21]. It is also shown that dopamine, as well as some Visual object recognition is a sophisticated task, other neuromodulators influences the synaptic plasat which humans are expert. This task requires ticity, such as changing the polarity [22] or adjustboth feature extraction, that is done by the brain’s ing the time window of STDP [23, 24, 25, 26, 27]. visual cortex, and decision-making on the cateOne of the well-studied ideas to model the role gory of the object, for which higher brain areas of the reward system is to modulate or even reverse are involved. Spiking neural networks (SNNs) the weight change determined by STDP, which is have been widely used in computational object called reward-modulated STDP (R-STDP) [28]. R- recognition models. In terms of network arSTDP stores the trace of synapses that are eligi- chitecture, there are several models with shalble for STDP and applies the modulated weight low [40, 41, 42, 43], deep [44, 45, 46], recurchanges at the time of receiving a modulatory sig- rent [47], fully connected [48], and convolutional nal; a reward or punishment (negative reward). structures [40, 46, 49, 50]. Some use rate-based In 2007, Izhikevich [29] proposed a R-STDP rule coding [51, 52, 53], while others use the tempoto solve the distal reward problem, where the re- ral coding [40, 43, 46, 48, 54]. Various kinds of ward is not immediately received. He solved the learning techniques are also applied to SNNs, from problem using a decaying eligibility trace, by which backpropagation [49, 55], tempotron [43, 56], and the recent activities are considered to be more im- other supervised techniques [52, 53, 57, 58], to unportant. He showed that his model can solve both supervised STDP and STDP-variants [42, 48, 59]. classical and instrumental conditionings [30, 31]. In Although STDP-enabled networks provide a more the same year, Farries and Fairhall [32] employed biological plausible means of visual feature extracR-STDP to train neurons for generating particu- tion, they need an external readout, e.g. support lar spike patterns. They measured the difference vector machines [46, 60], to classify input stimuli. between the output and target spike trains to com- Additionally, STDP tends to extract frequent fea2 tures which are not necessarily suitable for the desired task. In this research, we present a hierarchical SNN equipped with R-STDP to solve the visual object recognition in natural images, without using any external classifier. Instead, we put classspecific neurons that are reinforced to fire as early as possible if their target stimulus is presented to the network. Thus, the input stimuli are classified solely based on the first-spike latencies in a fast and biologically plausible way. R-STDP enables our network to find task-specific diagnostic features, therefore, decreases the computational cost of the final recognition system. aging it to unlearn what it has learned before. Thus, reusing a computational resource that is no longer useful. Moreover, we evaluated the proposed network on object recognition in natural images, using three different benchmarks, that are Caltech face/motorbike (two classes), ETH-80 (eight classes), and NORB (five classes). The results of the experiments demonstrate the advantage of employing R-STDP over STDP in finding task-specific discriminative features. Our network reached the performances (recognition accuracies) of 98.9% on Caltech face/motorbike, 89.5% on ETH-80, and 88.4% on NORB datasets. The rest of this paper is organized as follows: A precise description of the proposed network is provided in Section 2. Then, in Section 3, the results of the experiments are presented. Finally, in Section 4, the proposed network is discussed from different points of view and the possible future works are highlighted. Our network is based on Masquelier and Thorpes model [40] with four layers. The first layer of the network converts the input image into spike latencies based on the saliency of its oriented edges. This spike train goes under a local pooling operation in the second layer. The third layer of the network includes several grids of integrate-and-fire neurons that combine the received information of oriented edges and extract complex features. This is the only trainable layer in our network which employs R-STDP for synaptic plasticity. The signal (reward/punishment) for modulation of synaptic plasticity is provided by the fourth layer, in which the decision of the network is made. Our network only uses the earliest spike emitted by the neurons in the third layer to make a decision, without using any external classifier. If its decision is correct (incorrect) a global reward (punishment) signal is generated. Besides, in order to increase the computational efficiency, each cell in the network is allowed to spike only once per image. The motivation for at most one spike per neuron is not only computational efficiency, it is also biological realism [61, 62]. Decision-making without any classifiers with at most one spike per neuron, turns the proposed method into a well-suited candidate for the hardware implementation. 2 Materials and Methods In this section, we first describe the structure of the proposed network and the functionality of each layer. We then explain R-STDP, by which the neurons achieve reinforced selectivity to a specific group of input stimuli. Finally, we give a detailed description on the classification strategy that is used to evaluate the network’s performance. 2.1 Overall Structure Similar to Masquelier and Thorpes model [40], our network consists of two simple and two complex layers, that are alternately arranged in a feedforward manner (see Fig. 1). The first layer of the network (S1) is a simple layer whose cells detect oriented edges in the input image. These cells emit a spike with a latency that is inversely proportional to the saliency of the edge. After S1, there is a complex layer (C1), which introduces some degrees of position invariance by applying local pooling operation. A C1 neuron propagates the earliest spike in its input window. We performed two toy experiments to illustrate the abilities of R-STDP. We showed that the network employing R-STDP finds informative features using fewer computational resources than STDP. We also showed that R-STDP can change the behavior of a neuron, if needed, by encour3 S1 The second simple layer (S2) is made of integrate-and-fire (IF) neurons. A neuron in this layer, that detects a complex feature, receives its inputs from C1 neurons and generates a spike once its membrane potential reaches the threshold. For synaptic plasticity, we use a learning rule based on three factors: (1) pre-synaptic spike time, (2) postsynaptic spike time, and (3) a reward/punishment signal. This kind of synaptic plasticity provides the ability to control the behavior of the neurons in terms of their selectivity to input patterns. The second complex layer (C2) of our network is the decision-making layer. Each neuron in this layer is assigned to a category and performs a global pooling operation over S2 neurons in a particular grid. Using a rank-order decoding scheme, the neuron which fires first, indicates the network’s decision about the input image. According to the decision made by the network, a reward/punishment signal is then generated, which drives in the synaptic plasticity of S2 neurons. Implementation of the network is mainly done with C# and the code is available upon request. 2.2 C1 S2 C2 Input Window Figure 1: Overall structure of the proposed network with four retinotopically organized layers. The first layer (S1) extracts oriented edges from the input image by applying Gabor filters. A local max-pooling operation is applied by the cells in the subsequent layer (C1) to gain some degrees of position invariance. From here, spikes are propagated by the latencies that are inversely proportional to the maximum values. These spikes are the inputs for the IF neurons in the layer S2 that are equipped with the R-STDP learning rule. These neurons are encouraged/punished to learn/unlearn complex features. The activity of S2 neurons are used by C2 neurons for decision-making. These neurons are associated with class labels and the decision is made based on the neuron with the earliest spike. Layer S1 The goal of this layer is to extract oriented edges from the gray scaled input image and turn them into spike latencies. To this end, the input image is convolved with Gabor filters of four different orientations. Thus, this layer includes four feature maps, each representing the saliency of edges in a particular preferred orientation. Let I be the grayscaled input image and G(θ) represent a Gabor filter (convolution kernel) with window size 5 × 5, wavelength 2.5, effective width 2, and orientation θ. Then, the lth feature map of layer S1 is generated using the following equations: S1l = |I ⊗ G(θl )|, (l − 1) × π π + , θl = 4 8 zontal edges are very common in natural images, a π offset is applied to relax this bias [40]. 8 For each of the feature maps (orientations), we put a 2D grid of the same size containing dummy neurons to propagate spikes. Using an intensityto-latency encoding scheme, the obtained feature maps are converted to the spike latencies that are inversely proportional to the saliency of edges. In other words, the more salient the edge, the earlier the corresponding spike is propagated. (1) We implemented the proposed network in an event-based manner, where the spikes are sorted by their latencies in ascending order and propagated sequentially (i.e. the first spike is propagated in time step t = 1, the second one in t = 2, and so on). where ⊗ is the convolution operator and l ∈ {1, 2, 3, 4}. In order to introduce invariance to image negative operation, the absolute value of the convolution is used. Also, since vertical and hori4 2.3 Layer C1 belonging to the same grid. This mechanism provides the ability of detecting a particular feature over the entire spatial positions. To be precise, let Ps2 (i) be the set of all pre-synaptic neurons corresponding to the ith neuron. Then, the membrane potential of this neuron at time step t is updated by the following equation:   X f vi (t) = vi (t − 1) + Wij × δ t − tc1 (j) , (3) Our first complex layer is a local pooling layer over the spikes coming from layer S1. Here, there are four 2D neuronal grids corresponding to each of the orientations. Each C1 neuron performs a local pooling operation over a window of size ωc1 × ωc1 and stride rc1 (here we set rc1 = ωc1 − 1) on S1 neurons in a particular grid, after which, it emits a spike immediately after receiving its earliest input spike. This pooling operation decreases the redundancy of layer S1, and shrinks the number of required neurons, which consequently increases the computational efficiency. It also adds a local invariance to the position of oriented edges. let Pc1 (i) be the set of all pre-synaptic neurons of the ith neuron in layer C1. Then, the firing time of this neuron is computed as follows: tfc1 (i) = min {tfs1 (j)}, j∈Pc1 (i) j∈Ps2 (i) where Wij denotes the synaptic weight, δ is the Kronecker delta function, and tfc1 (j) is the firing time of the jth cell in layer C1. For each input image, a neuron in S2 fires if its membrane potential reaches the threshold T . Also, these neurons have no leakage and are allowed to fire at most once while an image is being presented. As the neurons fire, their synaptic weights the feature they are detecting - are being updated based on the order of pre- and post-synaptic spikes, as well as a reward/punishment signal (see section reward-modulated STDP). This signal is derived from the activity of the next layer, that indicates the network’s decision. Besides, initial weights of the synapses are randomly generated, with mean 0.8 and standard deviation 0.05. Note that choosing small or midrange values for mean results in inactive, thus untrained, neurons. Moreover, large values for variance increase the impact of network’s initial state. Accordingly, high mean value with small variance is a suitable choice [46]. (2) where tfs1 (j) denote the firing time of the jth neuron in Pc1 (i). Additionally, two kinds of lateral inhibition mechanisms are employed, which help the network to propagate more salient information. If a neuron located at position (x, y) of the ith grid (orientation) fires, (1) the other neurons at the same position, but in other grids are prevented from firing, and (2) the latencies of the nearby neurons in the same grid are increased by a factor relative to their mutual Euclidean distance. In our experiments, inhibition is done for distances from 1 to 5 pixel(s) 2.5 Layer C2 (floating-point distances are truncated to integer This layer contains exactly n neurons, each is asvalues) with inhibition factors 15%, 12%, 10%, 7%, signed to one of the S2 neuronal grids. A C2 neuand 5%, respectively. ron only propagates the first spike that is received from its corresponding neuronal grid. To put it differently, let Pc2 (i) define the set of S2 neurons in 2.4 Layer S2 the ith neuronal grid (for i ∈ {1, 2, ..., n}). Then, This layer combines the incoming information the firing time of the ith C2 neuron is computed as about oriented edges and turns them into mean- follows: ingful complex features. Here, there are n 2D grids of IF neurons with the threshold T . Each neuron tfc2 (i) = min {tfs2 (j)}, (4) j∈Pc2 (i) receives its inputs from a ωs2 × ωs2 × 4 window of C1 neurons through plastic synapses. A weight where tfs2 (j) denote the firing time of the jth neuron sharing mechanism is also applied to the neurons in layer S2. 5 As mentioned before, the activity of C2 neurons indicates the decision of the network. To this end, we divide C2 neurons into several groups and assign each group to a particular category of input stimuli. Then, the network’s decision on the category of the input stimulus is assumed to be the one whose group propagates the earliest spike among other C2 groups. Assume that there are m distinct categories for the input stimuli, labeled from 1 to m, and n neuronal grids in layer S2. Accordingly, there are exactly n neurons in layer C2, that are divided into m groups. Let g : {1, 2, ..., n} 7→ {1, 2, ..., m} denote a function that returns the group’s index of a C2 neuron, and let tfc2 (i) denote the firing time of the ith neuron in layer C2. Then, the network’s decision D is made by F = arg min{tfc2 (i)|1 ≤ i ≤ n}, i D = g (F) , To formulate our R-STDP learning rule, if a reward signal is received, then ∆Wij =  −   ar ×Wij ×(1−Wij ) if tfc1 (j) − tfs2 (i) ≤ 0, if tfc1 (j) − tfs2 (i) > 0, (6) or the jth cell is silent, and in case of receiving a punishment signal, we have ∆Wij =    +  ap ×Wij ×(1−Wij )    a− ×W ×(1−W ) ij ij p if tfc1 (j)−tfs2 (i) > 0, or the jth cell is silent, (7) if tfc1 (j) − tfs2 (i) ≤ 0, where i and j refer to the post- and pre-synaptic cells, respectively, ∆Wij is the amount of weight change for the synapse connecting the two neu− + − rons, and a+ r , ar , ap , and ap scale the magnitude of weight change. Furthermore, to specify + the direction of weight change, we set a+ r , ap > 0 − Here, our learning rule does and a− r , ap < 0. not take into account the exact spike time difference and uses an infinite time window. According to this learning rule, the punishment signal reverses the polarity of STDP (a.k.a anti-STDP). In other words, it swaps long-term-depression (LTD) with long-term-potentiation (LTP), which is done to conduct the effect of aversion (avoid repeating a bad behavior), and a+ p is there to encourage the neuron to learn something else. (5) where F is the index of a C2 neuron which fires first. The network receives reward (punishment) if its decision matches (does not match) the correct category of the input stimulus. If none of the C2 neurons fire, no reward/punishment signal is generated, thus, no weight-change is applied. Moreover, if more than one neuron fire early (with the minimum spike time), the one with the minimum index (i) is selected. 2.7 2.6   a+  r ×Wij ×(1−Wij )   Overfitting Avoidance Reward-Modulated STDP (R- In reinforcement learning problems, there is a chance of being trapped into local optima or overSTDP) fitting to acquiring the maximum possible reward over the training examples. In order to help the network, exploring other possible solutions that are more general to cover both seen and unseen examples, we apply two additional mechanisms during the training phase. These techniques are only used for object recognition tasks. We propose a reinforcement learning mechanism to update the pre-synaptic weights of S2 neurons. Here, the magnitude of weight change is modulated by a reward/punishment signal, which is received according to the correctness/incorrectness of the network’s decision. We also applied a one-winnertakes-all learning competition among the S2 neurons, by which the one with the earliest spike is the 2.7.1 Adaptive learning rate winner and the only one which updates its synaptic weights. Note that this neuron is the one determin- Since the initial weights of the neurons are randomly set, the number of misclassified samples ing the network’s decision. 6 Here, we employ the dropout technique [63], which causes a C2 neuron to be temporary turned off with the probability of pdrop . This technique gives rise to the overall involvement rate of the neurons, which in turn, not only increases the chance of finding more discriminative features, but also decreases the rate of blind firings (see Supplementary Materials: Dropout). is relatively high at the beginning of the training phase (i.e. the performance is at the chance level). As training trials go on, the ratio of correctly classified samples to the misclassified ones increases. In the case of high rate of misclassification, the network receives more punishment signals, which rapidly weakens synaptic weights and generates dead or highly selective neurons that cover a small number of inputs. Similarly, when the rate of correct classification gets higher, the rate of reward acquisition increases as well. In this case, the network prefers to exclude misclassified samples by getting more and more selective to correct ones and remain silent for the others. In either cases, the overfitting happens due to the unbalanced impact of reward and punishment. To tackle this problem, we multiply an adjustment factor to the amount of weight modification, by which the impact of correct and incorrect training samples is balanced over the trials. Assume that the network sees all of the training samples on each training iteration and let Nhit and Nmiss denote the number of samples that are classified correctly and incorrectly in the last training iteration, respectively. If N is the number of all training samples, then, the weight changes for the current training trial are modified as follows:    Nmiss ∆Wij 2.8 Classification As mentioned before, the activity of the last layer, particularly the earliest spike in layer C2, is the only information that our network uses to make its final decision on the input stimuli. This way, we do not need external classifiers and increase the biological plausibility of the network at the same time. To setup the network for a classification task with m categories, we put n = k × m neuronal grids in layer S2, where k is the number of features associated to each category. Then, we assign each C2 neurons to a category by the association function g : {1, 2, ..., n} 7→ {1, 2, ..., m} defined as follows: g(i) = b(i − 1)/kc + 1. if a reward is received, (9) Then, the network uses equation (5) to classify the input stimuli. During the training phase, each net∆Wij otherwise. work’s decision is compared to the label of stimulus Note that Nhit + Nmiss ≤ N , since there may be and a reward (punishment) signal is generated, if some samples for which none of the S2 neurons is the decision matches (mismatches) the label. active. Wij = Wij + 2.7.2  N Nhit N  (8) 2.9 Dropout In a reinforcement learning scenario, the goal of the learner is to maximize the expected value of reward acquisition. In our case, since the network only sees the training samples, it may find a few number of features that are sufficient to correctly classify almost all of the training samples. This issue appears to cause severe overfitting in face of complex problems and the network prefers to leave some of the neurons untrained. These neurons decrease the hit rate of the network over the testing samples, as they blindly fire for almost all of the stimuli. Comparison of R-STDP and STDP In object recognition tasks, we make a comparison between our model, SNN with R-STDP, and the one that uses STDP. To this end, we first train the network using STDP and let the network extract features in an unsupervised manner. Next, we compute three kinds of feature vectors of length n from layer S2: • The first-spike vector. This is a binary vector, in which all the values are zeros, except the one corresponding to the neuronal grid with earliest spike. 7 Stimulus 1 Stimulus 2 • The spike-count vector. This vector saves the total number of spikes emitted by neurons in each grid. • The potential vector. This vector contains the maximum membrane potential among the neurons in each grid, by ignoring the threshold. (a) Feature 2 Synaptic Weights Feature 2 (b) (c) Figure 2: Temporal discrimination task. (a) Two input stimuli including a temporally different sub-pattern. Spikes are propagated from the white squares with the order written on them. (b) Synaptic weights (features) that are learned by the neurons with STDP (left column) and R-STDP (right column). The higher the weight the lighter is the gray level. (c) Synaptic weights when we used STDP-enabled neurons with large receptive fields and high thresholds. Results the other neurons. Since the early parts are spatiotemporally the same among all of the input stimuli, there is no chance for the other neurons to fire and win the synaptic plasticity. Consequently, the overall activity of the neuronal group is the same for all of the input stimuli and classifies them into a single category. As we will see below (Fig. 2c), there are also some STDP-based solutions for this problem, however they are inefficient in using computational resources. For example, if we increase the size of receptive fields along with the thresholds, neurons gain the opportunity to receive the last spikes as well as the early ones. Another possible solution is to use many neurons that locally inhibit each other and drop the one-winner-takes-all constraint. This way, regarding the initial random weights, there is a chance for the neurons to learn other parts of the input stimuli. Here, we show that the R-STDP learning rule solves this issue in a more efficient way than STDP. For this purpose, we designed an experiment containing two 3 × 11 input stimuli. The inputs are spatially similar, which means that spikes are propagated from similar locations of both inputs. As illustrated in Fig. 2a, each input is a 2D grid of white and gray squares. By white (gray) squares we denote locations, from which a spike is (is not) To evaluate the proposed network and learning strategy, we performed two types of experiments. First, we used a series of hand-made problems to show the superiority of R-STDP over STDP. Second, we assessed the proposed network on several object recognition benchmarks. 3.1 Feature 1 Synaptic Weights After extracting feature vectors for both training and testing sets, K-nearest neighbors (KNN) and support vector machine (SVM) classifiers are used to evaluate the performance of the network. Moreover, the learning strategy and the STDP formula is the same as [40], and to make a fair comparison, we use the same values for parameters in both models. The only parameters that are explored for the STDP are the magnitudes of LTP and LTD. 3 R-STDP Feature 1 STDP R-STDP Increases Computational Efficiency Using STDP, when a neuron is exposed to input spike patterns, it tends to find the earliest repetitive sub-pattern by which the neuron reaches its threshold and fires [64, 65, 8, 11]. This tendency to favor early input spikes can be troublesome in case of distinguishing spike patterns that have temporal differences in their late sections. Assume that there are several categories of input stimuli that possess the same spatial configuration (Fig. 2a). They also have identical early spikes. These patterns are repetitively presented to a group of IF neurons, for which the synaptic plasticity is governed by STDP and the onewinner-takes-all mechanism. If the neurons have low thresholds, one of them gets selective to the early common part of the input stimuli and inhibits 8 propagated. At the time of presenting any of these patterns to the network, spikes are propagated with a temporal order that is defined by the numbers written on the squares. According to this ordering, spikes with lower numbers are propagated earlier. Since the input stimuli are artificial spike patterns, there was no need to apply Gabor filters, thus, they were fed directly into the layer S2. There, we put two neuronal grids with parameters ωs2 = 3 and T = 3. Therefore, each grid contained 1 × 9 neurons to cover the entire input stim− + uli. We also set a+ r = 0.05, ar = −0.05, ap = 0.1, − and ap = −0.1. The goal of the task was that the first (second) C2 neuron fires earlier for the first (second) pattern. We examined both STDP and R-STDP learning rules to see if the network finds discriminative features or not. As shown in Fig. 2b, using STDP, the network extracted a non-discriminative feature, the shared one between both input stimuli. On the other side, the proposed reinforcement learning mechanism guided the neurons to extract features whose temporal order of appearance is the only thing leading to a successful pattern discrimination. We repeated this experiment for 100 times using different random initial weights. Results showed that our network succeeded in 98% of the times, while there were no chance for STDP to find the discriminative features. When we increased the threshold to 4 (requiring at least two sub-patterns) and the size of the receptive fields to 11 × 11 (covering the entire pattern), the network employing the STDP could also find discriminative features (see Fig. 2c) in 80% of the times. 3.2 with similar input stimuli and parameter values, except that we swapped the target input stimuli during the training iterations (see Task 1 and Task 2 in Fig. 3a). As shown in Fig. 3b, at the beginning of the simulation, the desired behavior was that the neurons belonging to the first grid respond to the first stimulus earlier than those in the second grid, and vice versa. After 200 iterations, when the convergence is fulfilled, we swapped the target stimuli. At this stage, since the neurons were exclusively sensitive to the previous target stimuli, they began to generate false alarms. Consequently, the network was receiving high rates of punishments for around 80 iterations (see iterations 200 to 280 in Fig 3b), which in turn swapped LTD and LTP (see Materials and Methods: Reward-modulated STDP). As the network received punishments, the previously weakened (strengthened) synapses got stronger (weaker). Therefore, the sensitivity diminished for a while, and the neurons regained the possibility of learning something new. After iteration 300, neurons found their new target stimulus and, once again, converged to the discriminative features (see the plots of synaptic weights in the top two rows in Fig. 3b). In summary, R-STDP enables the neurons to unlearn what they have learned so far. This ability results in neurons with flexible behavior (plastic neurons), that are able to learn rewarding behavior in changing environments. This ability also helps the neurons to forget and escape from the local optima in order to learn something that earns more reward. Applying STDP in such a scenario does not work at all, since there is no difference between Task 1 and Task 2 from an unsupervised point of view. Plastic Neurons 3.3 As mentioned earlier, the brain reward system plays an important role in the emergence of a particular behavior. In this part of the paper, we demonstrate the R-STDP’s capability of readjusting neurons’ behavior in an online manner. We designed an experiment, in which the predefined desired behavior of the neurons is changed during the simulation. The experimental setup is very similar to the “Temporal Discrimination” task Object Recognition In this section, the performance of our network on categorization of natural images is evaluated. We begin with a description of the datasets that are used in our experiments. Then, we show how the network benefits from the reinforcement learning mechanism to extract features from natural images, followed by comparing R-STDP and STDP in object recognition tasks. Finally, we illustrate how 9 Task 1 Task 2 Target for the first neuronal grid Target for the second neuronal grid Swapping target stimuli (a) Feature 2 0 Synaptic weights 1 Feature 1 1 Reward Punishment 0.5 Convergence 0 Task switch Task Task 1 0 50 100 Task 2 150 200 250 300 350 400 450 500 Iterations (b) Figure 3: Neurons with flexible behavior. (a) Target stimuli for each neuronal grid. In Task 2, the target stimuli of Task 1 are swapped. (b) Flexibility of the network in a changing environment. Plots on the top two rows represent changes of the synaptic weights. The plot on the bottom illustrates changes in the rate of receiving reward (green solid line), punishment (red dotted line), and the convergence of the synaptic P Wij (1−Wij ) weights (blue dashed line) over 500 iterations. Convergence is measured by 1 − , where the summation is over the 18 (3 × 3 + 3 × 3) 18 synaptic weights that are shared between S2 neurons. As this value gets closer to one, the synaptic weights have more binary-like values. the dropout and adaptive learning techniques re- criminative features, both spatially and temporally. duce the chance of overfitting to the training sam- Here, we show that R-STDP encourages the neuples. rons to become selective to a particular category of natural images. To this end, we trained and examined the network on images from two categories of 3.3.1 Datasets face and motorbike from the Caltech dataset. We used three well-known object recognition In this experiment, we put 10 neuronal grids for benchmarks to evaluate the performance of the proeach category that were reinforced to win the firstposed network. The first and easiest one is Caltech spike competition in response to the images from face/motorbike which is mainly used for demontheir target categories. Therefore, the desired bestration purposes. The next two that are used havior of the network was that the neurons of the to evaluate the proposed network are ETH-80 and first 10 grids get selective to the face category, while small NORB. These datasets contain images of obthose in the other grids get selective to the motorjects from different view points which make the task bikes. harder (see supplementary Fig. S1). Fig. 4 illustrates the behavior of the network over the training iterations. Since the early it3.3.2 Reinforced Selectivity erations contained rapid changes, they are plotThe previous experiments showed that R-STDP ted wider. During early iterations, strong synapenables the network to find informative and dis- tic weights (see Materials and Methods: Layer S2) 10 0 50 100 200 300 400 500 600 700 (a) (b) 0.005 0.004 | | 0.003 0.002 | | 0.001 0 1 50 100 150 200 250 300 350 400 450 500 550 600 650 700 Iteration (c) Figure 4: Training the network on Caltech face/motorbike dataset. (a) Evolution of four different features (out of 20) extracted by the network. The black and red plots correspond to the face and motorbike neurons, respectively. (b) Hit rate for neurons of each category. The gray (pink) filled curves depict the percentage of the times that the face (motorbike) neurons emit the earliest spike in response to their target stimulus. Notice that curves for motorbike neurons are mirrored vertically for the sake of better illustration, and hit rates over testing set are indicated by dot-patterns. (c) Trajectory of changes in learning rate with respect to the number of correct (Nhit ) and incorrect (Nmiss ) categorizations. and 50% dropout probability resulted in an unstable network whose neurons responded to random input stimuli. This chaotic behavior can be easily spotted on early iterations in the middle plot (see Fig. 4b). As the network continues training iterations, reward/punishment signals made neurons more and more selective to their target categories. As shown in Fig. 4b, after 200 iterations, a quite robust selectivity appeared for the training sam- ples, while on the testing samples, it is elongated for 300 more iterations. This quick convergence on training samples is due to the fact that the network is relatively fast in finding features that successfully discriminate seen samples (see Fig. 4a). These primary features need to converge more to be applicable on testing samples, which requires even more iterations because of the adaptive learning rates. Moreover, we do not let the learning rate 11 drops below 20% of the values of parameters a+ r , − + . This allows the network to con, and a , a a− p p r tinue convergence with a constant rate even if all of the training samples are correctly categorized (see Fig. 4c). We repeated the experiment 30 times with random initial weights and different training and testing samples and the performance achieved by the proposed network is 98.9 ± 0.4% (mean ± std). When we tried a same network structure with STDP, 97.2% was its best achievement (see Table 1). 3.3.3 Performance We have shown how the proposed network successfully classified faces from motorbikes with high accuracy. Here, we examined the performance of the proposed network on the ETH-80 and NORB datasets that are more challenging (see Supplementary Materials: Datasets). The performance of the network is tested over the entire testing set after each training iteration, in which the network receives all of the training samples in random order. For ETH-80 dataset, we configured the network to extract 10 features per category, which resulted in 8 × 10 = 80 features in total. The receptive field of each neuron in layer S2 was set in a way that it covered the whole input image. Here, nine instances of each category were presented to the network as the training samples, and the remaining were employed in the test phase. After performing 250 training and testing iterations, the best testing performance of the network was reported. Again, we repeated this experiment 30 times, each time using a different training and testing set. As before, the network successfully extracted discriminative features (see Supplementary Fig. 2) and reached the performance of 89.5 ± 1.9% (mean ± std). We also applied STDP to a network with the same structure. To examine the STDP performance, we used support vector machines with linear kernel and KNNs (K was changed from 1 to 10). According to the results, the accuracy achieved by this network is 84.5%, when the maximum potentials were used as the feature vectors and the classifier was KNN. Considering that the proposed net- work classifies input patterns solely based on the first-spike information, R-STDP definitely outperforms STDP. Table 1 provides the details of the comparison made between R-STDP and STDP. By looking at confusion matrices (see Supplementary Fig. 3a), we found that both R-STDP and STDP agree on the most confusing categories, that are cow, dog, and horse. However, thanks to the reinforcement learning, R-STDP not only decreased the confusion error, but also provided a more balanced error distribution. The same experiment was also performed on the NORB dataset. Again, we put 10 neuronal grids for each of the five categories, whose neurons are able to see the entire incoming stimuli. The proposed network with R-STDP reached the performance of 88.4 ± 0.5% (mean ± std) on testing samples, whereas STDP achieved 66% at most. By reviewing confusion matrices of both methods, we found that both networks encountered difficulties mostly in distinguishing four-leg animals from humans, as well as cars from trucks (see Supplementary Fig. 3b). As before, R-STDP resulted in a more balanced error distribution. Additionally, we compared the proposed network to convolutional neural networks (CNNs). Although the proposed network is not able to beat pre-trained deep CNNs such as VGG16 [66] (see Supplementary Materials: Comparison with Deep Convolutional Neural Networks), comparing it to a shallow CNN, with a similar network structure and same input would be a fair point. We repeated all of the object categorization experiments using a shallow CNN implemented with Keras neural networks API and Tensorflow as its backend. As shown in Table 1, the proposed network successfully outperformed the supervised CNN in both of the ETH-80 and NORB datasets. 3.3.4 Overfitting Problem Overfitting is one of the most common issues in supervised or reinforcement learning scenarios. This problem got even worse by the emergence of deep learning algorithms. There are many studies focused on developing techniques that increase the generalization power of the learning algorithms. 12 Table 1: Comparison of the network’s performance when using R-STDP and STDP. Dataset R-STDP Caltech (Face/Motorbike) ETH-80 NORB First-Spike SVM KNN 96.4 96.4 72.9 69.8 62.7 58.6 98.9 89.5 88.4 One of the mechanism that has shown promising empirical results on deep neural networks is the dropout technique [63]. This technique temporary reduces the complexity of the network by suppressing the activity of a specific number of neurons. This reduction in neuronal resources forces the network to generalize more in order to reduce the prediction error. ETH-80 NORB 1 Adaptive learning rate Non-adaptive learning rate 0.95 Performance 0.9 0.85 0.8 0.75 0.7 0.65 STDP Spike-Count SVM KNN 96.9 93.4 74 70.4 61.7 55.3 Max-Potential SVM KNN 96.6 97.2 79.9 84.5 66 65.9 Shallow CNN 99.3 87.1 85.5 the impact of both mentioned mechanisms on categorization of test samples. It is clear that when the adaptive learning rate mechanism is applied, the network achieved higher performances (solid lines). It is also shown that the dropout probability must be chosen according to the complexity of the dataset as well as the network. Since the NORB dataset contains more complex samples than the ETH-80, it tends more to overfitting on training samples. As a consequence, it needs more dropout rate to overcome this issue. The magnitude of this tendency is even clearer when the steady learning rates are used. To put it differently, faster convergence rate along with the complexity of the samples induce more overfitting, which in turn needs more dropout rate. 0.6 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Dropout probability 0.8 0.9 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Dropout probability Figure 5: Impact of the dropout and the adaptive learning rate techniques. The plot on the left (right) demonstrates the result for ETH-80 (NORB) dataset. In these plots the solid (dashed) lines illustrate the performance of the network with different dropout probabilities when the adaptive learning rate is on (off). The proposed network is not an exception and has shown tendencies to overfit on the training samples through our examinations. Therefore, we adopted the dropout technique in our experiments. We also found that an steady learning rate does increase the chance of overfitting. Thus, we made use of dynamic learning rates with respect to the performance of the network (see Material and Methods: Overfitting Avoidance). To show the impact of the aforementioned mechanisms, we repeated the object recognition experiments with different dropout probabilities and steady learning rates. Fig. 5 simultaneously shows 4 Discussion Mammals are fast and accurate at visual object recognition. Their visual cortex processes the incoming data in a hierarchical manner, through which the complexity of neuronal preference is gradually increased. This hierarchical processing provides a robust and invariant object recognition [67, 68, 69, 70, 71]. Computational modeling of the mammalian visual cortex has been under investigation for many years. Developing a biologically plausible model not only enables scientists to examine their hypotheses with low cost, but also provides a human-like vision for artificially intelligent machines [40, 72, 73, 74, 75]. Deep convolutional neural networks (DCNNs) are the most successful works in this area [63, 76, 66, 77, 78]. The idea behind these networks is inspired by the hierarchical structure of the visual 13 cortex. Despite the promising results obtain by DCNNs, they are not biologically plausible because of using supervised learning rules. In addition, they employ rate-based encoding scheme, which is both energy and resource consuming. There is another group of studies trying to use spiking neurons along with the unsupervised STDP learning rule [40, 42, 46, 48, 59]. These models are more biologically plausible, but they cannot beat DCNNs in terms of accuracy. In theory, spiking neural networks (SNNs) have more computational power than DCNNs, however, they are harder to control because of the complex dynamics and high dimensional space of effective parameter. Furthermore, since most of them are trained in an unsupervised manner, the classification step is done by an external classifier or statistical methods. Here, we solved the object recognition task using a hierarchical SNN equipped with a reinforcement learning rule called R-STDP [28]. There are several studies showing that the brain uses RL to solve the problem of decision-making [15, 16, 17, 18]. Therefore, it is a suitable choice for training classspecific neurons that are able to decide on the class of the input image. Therefore, we put one step further developing a more biologically plausible model which is able to perform the visual categorization totally on its own. The proposed network functions in the temporal domain, where the information is encoded by spike times. The input image is first convolved with oriented Gabor filters and a spike train is generated based on a latency-to-intensity coding scheme. The resulting spikes are then propagated toward the feature extraction layer. Using R-STDP, the proposed network successfully found task-specific diagnostic features using neurons that were pre-assigned to the class labels. In other words, each neuron was assigned to a class a priori, where its desired behavior was to respond early for the instances belonging to the specified class. To decrease the computational cost even more, neurons were forced to fire at most once for an input image and the latency of their spike is considered as the measure of stimulus preference. Therefore, if a neuron fired earlier than the others, it would have received its preferred stimulus. This measure of preference served as an indicator for the network’s decision. That is to say, when a neuron belonging to a particular class fired earlier, the network’s decision was considered to be that class. Through our experiments, we compared R-STDP to STDP from different aspects. We showed that RSTDP can save computational resources. This was clarified by a hand-designed discrimination task, in which the order of spikes was the only discriminative feature. R-STDP solved the problem using minimal number of neurons, synapses, and threshold, whereas STDP needed more neurons, more synapses, and higher thresholds. This drawback for STDP is due to the fact that it tends to find statistically frequent features [8, 9, 10, 11], which are not necessarily the diagnostic ones. As a consequence, one needs to use either more neurons or more synapses to ensure that the diagnostic features will be eventually found. On the other hand, since R-STDP informs the neurons about their outcomes, they can function better using minimal resources. After having demonstrated the advantages of RSTDP in finding diagnostic features, we investigated how well it can be combined with a hierarchical SNN for solving both visual feature extraction and object categorization in a biologically plausible manner. We evaluated the proposed network and a similar network which uses STDP, as well as a CNN with the same structure, on three datasets of natural images Caltech Face/Motorbike, ETH-80 and NORB. The last two contain images of objects from different viewpoints, which made the task harder. When we compared the performances obtained by the networks, we found that R-STDP strongly outperforms STDP and the CNN with same structure. An even more interesting point is that the proposed network achieved this superiority decisions solely based on the first-spikes, while in the case of the others, even the powerful classifiers like SVMs and error back-propagation were not of any help. To compare R-STDP with STDP, both networks used the same values for parameters except the learning rate (see Materials and Methods: Comparison of the R-STDP and STDP). However, one can use STDP with higher number of neurons and 14 tuned thresholds to compensate the blind unsupervised feature extraction and achieve better performances [60]. Again, we conclude that R-STDP helps the network to act more efficiently in consuming computational resources. Putting everything together, the proposed network has the following prominent features: • Robust object recognition in natural images. • Each neuron is allowed to spike only once per image. This results in a huge reduction of energy consumption. • Decision-making (classification) is performed using the first-spike latencies instead of powerful classifiers. Therefore, the biological plausibility of the model is increased. • Synaptic plasticity is governed by RL (the RSTDP rule), for which supporting biological evidence can be found [28], and which allows to extract highly diagnostic features. To date, we could not find any other works possessing the aforementioned features. To mention one of the closest attempts, Gardner et al. [79] tried to classify Poisson-distributed spike trains by a readout neuron equipped with R-STDP. Although their method is working, it cannot be applied on natural images as it is, because of their time-based encoding and target labeling. There is another related work by Huerta and Nowotny [80]. In this work, the authors designed a model of the RL mechanism which occurs in the mushroom body. They applied their RL mechanism on a pool of randomly connected neurons with 10 readout neurons to classify handwritten digits. Our work is different from theirs in several aspects. First, we used a hierarchical structure based on the mammalian visual cortex, while they used randomly connected neurons. Second, we used the R-STDP learning rule, whereas they employed a probabilistic approach for the synaptic plasticity. Third, the input of our network were natural images using intensity-to-latency encoding, while they used binary encoding with a threshold on artificial images. Although the results of the proposed network were significantly better than the network employing STDP with external classifiers, they are still not competitive to the state-of-the-art deep learning approaches. One of the limitations to the current method is using only one trainable layer. Besides, the receptive field of the neurons in the last layer are set to be large enough to cover an informative portion of the image. As a result, the network cannot resist high rates of variations in the object, unless using more and more number of neurons. Extending the number of layers in the current network is one of the directions for future research. Going deeper seems to improve the performance by providing a gradual simple to complex feature extraction. However, deeper structure needs more parameter tuning, and a suitable multi-layer synaptic plasticity rule. Recent studies have also shown that combining deep networks and RL can lead to outstanding results [81, 82]. Another direction for the future research is to use the RL for learning semantic associations. For example, STDP is able to extract features for different kinds of animals in different viewpoints, but it is not able of relating all of them into the category of “animal”, because different animals have no reason to co-occur. Or, it can extract features for the frontal and profile face, but it cannot generate an association putting both in the general category of “face”. On the other hand, by a reinforcement signal and using learning rules like R-STDP, neurons are not only able to extract diagnostic features, but also learn relative connections between categories and create super-categories. Acknowledgment The authors would like to thank Dr. Jean-Pierre Jaffrézou for proofreading this manuscript. This research received funding from the European Research Council under the European Union’s 7th Framework Program (FP/20072013)/ERC Grant Agreement no. 323711 (M4 project) and Iran National Science Foundation: INSF (No. 96005286). 15 References [13] P. Dayan and B. W. Balleine, “Reward, motivation, and reinforcement learning,” Neuron, vol. 36, no. 2, [1] W. Gerstner, R. Kempter, J. L. van Hemmen, pp. 285–298, 2002. and H. Wagner, “A neuronal learning rule for submillisecond temporal coding,” Nature, vol. 383, no. [14] N. D. Daw and K. Doya, “The computational neurobiology of learning and reward,” Current Opinion in 6595, p. 76, 1996. Neurobiology, vol. 16, no. 2, pp. 199–204, 2006. [2] H. Markram, J. Lübke, M. Frotscher, and B. Sakmann, “Regulation of synaptic efficacy by coincidence of post- [15] Y. Niv, “Reinforcement learning in the brain,” Journal of Mathematical Psychology, vol. 53, no. 3, pp. 139–154, synaptic APs and EPSPs,” Science, vol. 275, no. 5297, 2009. pp. 213–215, 1997. [3] G.-q. Bi and M.-m. Poo, “Synaptic modifications in [16] D. Lee, H. Seo, and M. W. Jung, “Neural basis of reinforcement learning and decision making,” Annual Recultured hippocampal neurons: dependence on spike view of Neuroscience, vol. 35, pp. 287–308, 2012. timing, synaptic strength, and postsynaptic cell type,” Journal of Neuroscience, vol. 18, no. 24, pp. 10 464– [17] E. E. Steinberg, R. Keiflin, J. R. Boivin, I. B. Witten, 10 472, 1998. K. Deisseroth, and P. H. Janak, “A causal link between prediction errors, dopamine neurons and learning,” Na[4] P. J. Sjöström, G. G. Turrigiano, and S. B. Nelson, ture Neuroscience, vol. 16, no. 7, pp. 966–973, 2013. “Rate, timing, and cooperativity jointly determine cor- tical synaptic plasticity,” Neuron, vol. 32, no. 6, pp. [18] W. Schultz, “Neuronal reward and decision signals: 1149–1164, 2001. from theories to data,” Physiological Reviews, vol. 95, no. 3, pp. 853–951, 2015. [5] C. D. Meliza and Y. Dan, “Receptive-field modification in rat visual cortex induced by paired visual stimulation [19] ——, “Getting formal with dopamine and reward,” and single-cell spiking,” Neuron, vol. 49, no. 2, pp. 183– Neuron, vol. 36, no. 2, pp. 241–263, 2002. 189, 2006. [20] ——, “Predictive reward signal of dopamine neurons,” [6] S. Huang, C. Rozas, M. Treviño, J. Contreras, S. Yang, Journal of Neurophysiology, vol. 80, no. 1, pp. 1–27, L. Song, T. Yoshioka, H.-K. Lee, and A. Kirkwood, 1998. “Associative Hebbian synaptic plasticity in primate visual cortex,” Journal of Neuroscience, vol. 34, no. 22, [21] P. W. Glimcher, “Understanding dopamine and reinforcement learning: the dopamine reward prediction erpp. 7575–7579, 2014. ror hypothesis,” Proceedings of the National Academy [7] Y. Guo, W. Zhang, X. Chen, J. Fu, W. Cheng, D. Song, of Sciences, vol. 108, no. Supplement 3, pp. 15 647– X. Qu, Z. Yang, and K. Zhao, “Timing-dependent LTP 15 654, 2011. and LTD in mouse primary visual cortex following different visual deprivation models,” PLoS One, vol. 12, [22] G. H. Seol, J. Ziburkus, S. Huang, L. Song, I. T. Kim, K. Takamiya, R. L. Huganir, H.-K. Lee, and A. Kirkno. 5, p. e0176603, 2017. wood, “Neuromodulators control the polarity of spike[8] T. Masquelier, R. Guyonneau, and S. J. Thorpe, “Spike timing-dependent synaptic plasticity,” Neuron, vol. 55, timing dependent plasticity finds the start of repeating no. 6, pp. 919–929, 2007. patterns in continuous spike trains,” PLoS one, vol. 3, [23] Q. Gu, “Neuromodulatory transmitter systems in the no. 1, p. e1377, 2008. cortex and their role in cortical plasticity,” Neuro[9] M. Gilson, T. Masquelier, and E. Hugues, “STDP alscience, vol. 111, no. 4, pp. 815–835, 2002. lows fast rate-modulated coding with poisson-like spike trains,” PLoS Computational Biology, vol. 7, no. 10, p. [24] J. N. Reynolds and J. R. Wickens, “Dopaminedependent plasticity of corticostriatal synapses,” Neue1002231, 2011. ral Networks, vol. 15, no. 4, pp. 507–521, 2002. [10] R. Brette, “Computing with neural synchrony,” PLoS Computational Biology, vol. 8, no. 6, p. e1002561, 2012. [25] J.-C. Zhang, P.-M. Lau, and G.-Q. Bi, “Gain in sensitivity and loss in temporal contrast of STDP by [11] T. Masquelier, “Stdp allows close-to-optimal spadopaminergic modulation at hippocampal synapses,” tiotemporal spike pattern detection by single coinciProceedings of the National Academy of Sciences, vol. dence detector neurons,” Neuroscience, 2017. 106, no. 31, pp. 13 028–13 033, 2009. [12] R. S. Sutton and A. G. Barto, Introduction to rein- [26] E. Marder, “Neuromodulation of neuronal circuits: forcement learning. MIT Press Cambridge, 1998, vol. back to the future,” Neuron, vol. 76, no. 1, pp. 1–11, 135. 2012. 16 [27] F. Nadim and D. Bucher, “Neuromodulation of neu- [40] T. Masquelier and S. J. Thorpe, “Unsupervised learnrons and synapses,” Current Opinion in Neurobiology, ing of visual features through spike timing dependent vol. 29, pp. 48–56, 2014. plasticity,” PLoS Computational Biology, vol. 3, no. 2, p. e31, 2007. [28] N. Frémaux and W. Gerstner, “Neuromodulated spiketiming-dependent plasticity, and theory of three-factor [41] J. M. Brader, W. Senn, and S. Fusi, “Learning reallearning rules,” Frontiers in neural circuits, vol. 9, world stimuli in a neural network with spike-driven p. 85, 2016. synaptic dynamics,” Neural Computation, vol. 19, no. 11, pp. 2881–2912, 2007. [29] E. M. Izhikevich, “Solving the distal reward problem through linkage of STDP and dopamine signaling,” [42] D. Querlioz, O. Bichler, P. Dollfus, and C. Gamrat, Cerebral Cortex, vol. 17, no. 10, pp. 2443–2452, 2007. “Immunity to device variations in a spiking neural network with memristive nanodevices,” IEEE Transac[30] I. P. Pavlov and G. V. Anrep, Conditioned reflexes. tions on Nanotechnology, vol. 12, no. 3, pp. 288–295, Courier Corporation, 2003. 2013. [31] E. L. Thorndike, “Review of animal intelligence: An [43] Q. Yu, H. Tang, K. C. Tan, and H. Li, “Rapid feedexperimental study of the associative processes in aniforward computation by temporal encoding and learnmals.” Psychological Review, 1898. ing with spiking neurons,” IEEE transactions on neural networks and learning systems, vol. 24, no. 10, pp. [32] M. A. Farries and A. L. Fairhall, “Reinforcement learn1539–1552, 2013. ing with modulated spike timing–dependent synaptic plasticity,” Journal of Neurophysiology, vol. 98, no. 6, [44] J. H. Lee, T. Delbruck, and M. Pfeiffer, “Training deep pp. 3648–3665, 2007. spiking neural networks using backpropagation,” Frontiers in Neuroscience, vol. 10, 2016. [33] R. V. Florian, “Reinforcement learning through modulation of spike-timing-dependent synaptic plasticity,” [45] P. O’Connor and M. Welling, “Deep spiking networks,” Neural Computation, vol. 19, no. 6, pp. 1468–1502, arXiv preprint arXiv:1602.08323, 2016. 2007. [46] S. R. Kheradpisheh, M. Ganjtabesh, S. J. Thorpe, [34] R. Legenstein, D. Pecevski, and W. Maass, “A learning and T. Masquelier, “STDP-based spiking deep neutheory for reward-modulated spike-timing-dependent ral networks for object recognition,” arXiv preprint plasticity with application to biofeedback,” PLoS ComarXiv:1611.01421, 2016. putational Biology, vol. 4, no. 10, p. e1000180, 2008. [47] J. Thiele, P. U. Diehl, and M. Cook, “A wake-sleep al[35] E. Vasilaki, N. Frémaux, R. Urbanczik, W. Senn, and gorithm for recurrent, spiking neural networks,” arXiv W. Gerstner, “Spike-based reinforcement learning in preprint arXiv:1703.06290, 2017. continuous state and action space: when policy gradient methods fail,” PLoS Computational Biology, vol. 5, [48] P. U. Diehl and M. Cook, “Unsupervised learning of no. 12, p. e1000586, 2009. digit recognition using spike-timing-dependent plasticity,” Frontiers in Computational Neuroscience, vol. 9, [36] N. Frémaux, H. Sprekeler, and W. Gerstner, p. 99, 2015. “Functional requirements for reward-modulated spiketiming-dependent plasticity,” Journal of Neuroscience, [49] Y. Cao, Y. Chen, and D. Khosla, “Spiking deep convol. 30, no. 40, pp. 13 326–13 337, 2010. volutional neural networks for energy-efficient object recognition,” International Journal of Computer Vi[37] J. Friedrich, R. Urbanczik, and W. Senn, “Spatiosion, vol. 113, no. 1, pp. 54–66, 2015. temporal credit assignment in neuronal population learning,” PLoS Computational Biology, vol. 7, no. 6, [50] A. Tavanaei and A. S. Maida, “Bio-inspired spikp. e1002092, 2011. ing convolutional neural network using layer-wise sparse coding and STDP learning,” arXiv preprint [38] N. Frémaux, H. Sprekeler, and W. Gerstner, “ReinarXiv:1611.03000, 2016. forcement learning using a continuous time actor-critic framework with spiking neurons,” PLoS Computational [51] P. Merolla, J. Arthur, F. Akopyan, N. Imam, Biology, vol. 9, no. 4, p. e1003024, 2013. R. Manohar, and D. S. Modha, “A digital neurosynaptic core using embedded crossbar memory with 45pJ [39] G. M. Hoerzer, R. Legenstein, and W. Maass, per spike in 45nm,” in Custom Integrated Circuits Con“Emergence of complex computational structures from ference (CICC), 2011 IEEE. IEEE, 2011, pp. 1–4. chaotic neural networks through reward-modulated Hebbian learning,” Cerebral Cortex, vol. 24, no. 3, pp. [52] S. Hussain, S.-C. Liu, and A. Basu, “Improved margin 677–690, 2014. multi-class classification using dendritic neurons with 17 morphological learning,” in Circuits and Systems (IS- [64] S. Song, K. D. Miller, and L. F. Abbott, “CompetiCAS), 2014 IEEE International Symposium on. IEEE, tive Hebbian learning through spike-timing-dependent 2014, pp. 2640–2643. synaptic plasticity,” Nature Neuroscience, vol. 3, no. 9, pp. 919–926, 2000. [53] P. O’Connor, D. Neil, S.-C. Liu, T. Delbruck, and M. Pfeiffer, “Real-time classification and sensor fusion [65] R. Guyonneau, R. VanRullen, and S. J. Thorpe, “Neurons tune to the earliest spikes through STDP,” Neural with a spiking deep belief network,” Frontiers in NeuComputation, vol. 17, no. 4, pp. 859–879, 2005. roscience, vol. 7, p. 178, 2013. [54] M. Beyeler, N. D. Dutt, and J. L. Krichmar, “Cate- [66] K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” gorization and decision-making in a neurobiologically arXiv preprint arXiv:1409.1556, 2014. plausible spiking network using a STDP-like learning rule,” Neural Networks, vol. 48, pp. 109–124, 2013. [67] S. Thorpe J, D. Fize, and C. Marlot, “Speed of processing in the human visual system,” Nature, vol. 381, [55] P. U. Diehl, D. Neil, J. Binas, M. Cook, S.-C. Liu, no. 6582, p. 520, 1996. and M. Pfeiffer, “Fast-classifying, high-accuracy spiking deep networks through weight and threshold bal[68] C. P. Hung, G. Kreiman, T. Poggio, and J. J. DiCarlo, ancing,” in Neural Networks (IJCNN), 2015 Interna“Fast readout of object identity from macaque inferior tional Joint Conference on. IEEE, 2015, pp. 1–8. temporal cortex,” Science, vol. 310, no. 5749, pp. 863– 866, 2005. [56] B. Zhao, R. Ding, S. Chen, B. Linares-Barranco, and [57] [58] [59] [60] [61] [62] H. Tang, “Feedforward categorization on AER motion [69] J. J. DiCarlo and D. D. Cox, “Untangling invariant obevents using cortex-like features in a spiking neural ject recognition,” Trends in Cognitive Sciences, vol. 11, network,” IEEE Transactions on Neural Networks and no. 8, pp. 333–341, 2007. Learning Systems, vol. 26, no. 9, pp. 1963–1978, 2015. [70] H. Liu, Y. Agam, J. R. Madsen, and G. Kreiman, F. Ponulak and A. Kasiński, “Supervised learning in “Timing, timing, timing: fast decoding of object inforspiking neural networks with ReSuMe: sequence learnmation from intracranial field potentials in human viing, classification, and spike shifting,” Neural Compusual cortex,” Neuron, vol. 62, no. 2, pp. 281–290, 2009. tation, vol. 22, no. 2, pp. 467–510, 2010. [71] J. J. DiCarlo, D. Zoccolan, and N. C. Rust, “How does E. Neftci, S. Das, B. Pedroni, K. Kreutz-Delgado, the brain solve visual object recognition?” Neuron, and G. Cauwenberghs, “Event-driven contrastive divol. 73, no. 3, pp. 415–434, 2012. vergence for spiking neuromorphic systems.” Frontiers in Neuroscience, vol. 7, pp. 272–272, 2012. [72] K. Fukushima and S. Miyake, “Neocognitron: A selforganizing neural network model for a mechanism of A. Tavanaei, T. Masquelier, and A. S. Maida, “Acvisual pattern recognition,” in Competition and Coopquisition of visual features through probabilistic spikeeration in Neural Nets. Springer, 1982, pp. 267–285. timing-dependent plasticity,” in International Joint Conference on Neural Networks (IJCNN). IEEE, 2016, [73] Y. LeCun and Y. Bengio, “Convolutional networks for images, speech, and time series,” The Handbook of pp. 307–314. Brain Theory and Neural Networks, vol. 3361, no. 10, S. R. Kheradpisheh, M. Ganjtabesh, and T. Masquep. 1995, 1995. lier, “Bio-inspired unsupervised learning of visual features leads to robust invariant object recognition,” [74] T. Serre, L. Wolf, S. Bileschi, M. Riesenhuber, and T. Poggio, “Robust object recognition with cortex-like Neurocomputing, vol. 205, pp. 382–392, 2016. mechanisms,” IEEE Transactions on Pattern Analysis S. J. Thorpe and M. Imbert, “Biological constraints on and Machine Intelligence, vol. 29, no. 3, 2007. connectionist modelling,” Connectionism in Perspec[75] H. Lee, R. Grosse, R. Ranganath, and A. Y. Ng, “Contive, pp. 63–92, 1989. volutional deep belief networks for scalable unsuperR. VanRullen and S. J. Thorpe, “Surfing a spike wave vised learning of hierarchical representations,” in Prodown the ventral stream,” Vision Research, vol. 42, ceedings of the 26th Annual International Conference no. 23, pp. 2593–2615, 2002. on Machine Learning. ACM, 2009, pp. 609–616. [63] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Ima- [76] M. D. Zeiler and R. Fergus, “Visualizing and undergenet classification with deep convolutional neural netstanding convolutional networks,” in European Conferworks,” in Advances in Neural Information Processing ence on Computer Vision. Springer, 2014, pp. 818– Systems, 2012, pp. 1097–1105. 833. 18 [77] S. R. Kheradpisheh, M. Ghodrati, M. Ganjtabesh, and T. Masquelier, “Humans and deep networks largely agree on which kinds of variation make object recognition harder,” Frontiers in Computational Neuroscience, vol. 10, no. 74, p. 92, 2016. [78] ——, “Deep networks can resemble human feedforward vision in invariant object recognition,” Scientific Reports, vol. 6, p. 32672, 2016. [79] B. Gardner, I. Sporea, and A. Grüning, “Classifying spike patterns by reward-modulated STDP,” in International Conference on Artificial Neural Networks. Springer, 2014, pp. 749–756. [80] R. Huerta and T. Nowotny, “Fast and robust learning by reinforcement signals: explorations in the insect brain,” Neural Computation, vol. 21, no. 8, pp. 2123– 2151, 2009. [81] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski et al., “Human-level control through deep reinforcement learning,” Nature, vol. 518, no. 7540, pp. 529–533, 2015. [82] 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, vol. 529, no. 7587, pp. 484–489, 2016. 19 “Supplementary Materials” First-spike based visual categorization using reward-modulated STDP Milad Mozafari1,2 , Saeed Reza Kheradpisheh1,2 , Timothée Masquelier3 , Abbas Nowzari-Dalini1 , and Mohammad Ganjtabesh1,2,∗ 1 Department of Computer Science, School of Mathematics, Statistics, and Computer Science, University of Tehran, Tehran, Iran 2 School of Biological Sciences, Institute for Research in Fundamental Sciences (IPM) , Tehran, Iran 3 1 CerCo UMR 5549, CNRS Université Toulouse 3, France Datasets summarizes the parameters for each dataset. Caltech face/motorbike was chosen as the first benchmark to monitor the behavior of our network in a two-class object recognition task. Images in this task fall into two categories: faces and motorbikes (see Fig. S1a), that are provided by the California Institute of Technology1 . For each task, 435 images were randomly selected from each category, among which 200 images were chosen for training while the remaining were used for testing. For computational efficiency, images are scaled by the factor 0.5. The second benchmark that we chose for object recognition is ETH-80, provided by Max Planck Institute for Informatics2 . This dataset contains eight categories of objects, that are apple, car, cow, cup, dog, horse, pear, and tomato (see Fig. S1b). In each category, there are 10 different instances, for each, 41 images are captured from different view points. Hence, this benchmark is a good assessment of view-invariant object recognition ability. Here, we applied the leave-one-out cross-validation technique to evaluate the network’s performance. In each evaluation trial, nine instances of each ob- In this section, a detailed description of the datasets that are used in our experiments is provided. In all of the benchmarks, images in the training set were used to train the network and extract discriminative features, while those in the testing set were used to evaluate the network. In other words, in each training iteration, the network receives all of the images in the training set and does per-image synaptic plasticity, after which it goes under evaluation by receiving images from the testing set. This way, we assessed the ability of the network to extract general features, that work for categorization of either the training (seen) or the testing (unseen) samples. For each dataset, an exhaustive search was performed to find suitable values for all of the parameters. We should add that the size of the input windows were chosen according to the average size of the target objects in each dataset. Table SI ∗ Corresponding author. Email addresses: [email protected] (MM), [email protected] (SRK), [email protected] (TM), [email protected] (AND), [email protected] (MG). 1 http://www.vision.caltech.edu https://www.mpi-inf.mpg.de/departments/ computer-vision-and-multimodal-computing 2 1 following sub-sampling procedure on both training and testing sets. This sub-sampling results in images of only one camera (left), one lighting condition (level 4), four elevations (odd values), and all of the 18 azimuths. Therefore, there are 3600 (50 × 4 × 18) images that are equally divided into two 1800-image sets: training and testing samples. (a) 2 Results In this part of the supplementary materials, we present some complementary explanations and demonstrations on the results of the experiments. 2.1 (b) 2.1.1 Object Recognition Feature Extraction Using R-STDP, the proposed network is able to extract discriminative features. This is of great importance for similar objects like apples and tomatoes. Fig. S2 clearly shows how the network distinguishes apples from tomatoes by including tomato’s head in the corresponding feature. (c) Figure S1: Sample images from the three datasets that are used in this work. (a) Caltech face/motorbike, (b) ETH-80, and (c) NORB dataset. ject were put in the training set (8 × 9 × 41 = 2952 in total) and the remaining ones constituted the testing set (8 × 41 = 328). The third object recognition benchmark is called NORB, provided by Courant Institute at New York University3 . This dataset contains five classes of objects, that are four-legged animals, human figures, airplanes, trucks, and cars (see Fig. S1c). The object instances (50 different object in total) are imaged in different view-points, coupled with different lighting conditions. In this task, we used the training and testing sets provided by the authors of this dataset. Since there are large number of images in this dataset, we also performed the 3 Figure S2: Some of the features extracted for each category of the ETH-80 dataset. 2.1.2 Confusion Matrix As STDP tends to find frequent features, it encounters problems in distinguishing similar objects. The reason is that neurons learn common features and start to fire for images in two or more categories. Regarding this tendency, the external classifier has http://www.cs.nyu.edu/~ylclab/data/norb-v1.0/ 2 Table SI: Values for parameters used in each of the object recognition tasks. Dataset Caltech ETH-80 NORB ωc1 7 5 5 ωs2 17 31 23 n 20 80 50 T 42 160 150 a+ p 0.0005 0.0006 0.0005 a− p −0.005 −0.01 −0.05 pdrop 0.5 0.4 0.5 Predicted category no other means than getting biased towards one of the similar categories. On the other hand, R-STDP helps the network to extract features that provide more balanced (not biased) discrimination. Comparing the confusion matrices of R-STDP and STDP, you can see that the former has a more symmetric structure than the latter. To provide a quantified comparison, for each matrix A, we computed the following equation: P P i j |Aij − Aji | , (1) asym(A) = 2 where Aij denotes the value of row i and column j. asym can be considered as a measure of being asymmetry, where as the matrix A is more symmetry, the value of asym(A) is closer to 0 (see Fig. S3). 2.2 a− r −0.0025 −0.0035 −0.003 a+ r 0.005 0.01 0.05 1 Actual category 0.8 0.6 0.4 0.2 0 R-STDP STDP asym = 0.16 asym = 0.85 (a) Predicted category 1 Actual category 0.8 0.6 0.4 0.2 Dropout R-STDP One of the techniques we used to avoid overfitting is dropout. In each training iteration, dropout turns some neurons off by chance. This procedure temporarily decreases the network’s complexity and forces smaller portion of neurons to cover the whole training set as much as possible. This way, the probability that a neuron only learns few samples decreases, and the total involvement rate of neurons in solving the task increases. Fig. S4 illustrates the involvement rate of neurons for one of the trials with each of the ETH-80 and NORB datasets. Green bars denote the number of times that a neuron generates earliest spike for testing images belonging to its pre-assigned category, while red bars denote the number of false alarms. By comparing this measure with and without dropout, we found that dropout improves performance by increasing the chance of finding more discriminative features, as well as decreasing the rate of blind firings. STDP asym = 0.12 0 asym = 0.98 (b) Figure S3: Comparing confusion matrices of the network over the (a) ETH-80, and (b) NORB datasets, while employing R-STDP and STDP. 2.3 Shallow CNN In object recognition tasks, we compared the proposed model to a shallow CNN with a similar structure. Here you can find the detailed structure of this CNN. Input images to this CNN are grayscale. The first convolutional layer has four feature maps with the same input window size as our Gabor filters in layer S1. This layer is followed by a max-pooling layer with the same pooling window size and stride as the neurons in layer C1. Next, we put a convolutional layer with n feature maps and neurons 3 ETH-80 Apple Car Cow Cup Dog Horse Pear Number of correctly involved neurons Tomato 15 15 With Dropout 12 7 6 3 2 3 7 5 4 3 3 4 4 5 5 5 4 2 0 1 0 8 8 8 7 4 2 2 0 0 0 0 0 8 7 1 1 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 2 1 1 2 4 4 4 4 1 0 8 4 5 0 0 0 0 0 0 0 0 0 0 0 5 1 0 1 0 0 0 Without Dropout 5 9 4 0 2 6 0 5 1 3 4 2 6 3 3 6 4 6 6 0 0 0 0 0 0 0 0 4 4 0 1 1 1 1 6 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 1 3 63 6 8 1 0 4 3 2 0 0 8 6 8 4 5 4 3 4 4 0 4 5 3 4 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 5 8 7 6 1 3 11 13 8 8 8 2 3 2 1 0 0 0 0 4 3 2 4 3 1 1 0 0 1 0 0 6 1 1 3 5 5 16 17 16 10 1 2 1 0 0 1 0 0 0 0 0 0 4 2 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 1 0 0 1 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 1 0 0 0 0 0 2 2 2 3 3 3 57 23 NORB 4-legged Animals Human figures Airplanes Trucks Cars 81 76 72 70 65 With Dropout 57 51 43 37 36 30 42 46 45 41 47 44 35 34 29 23 27 28 26 17 47 35 34 30 27 1 2 8 2 49 30 22 14 2 6 11 4 2 9 5 4 0 0 1 3 6 3 2 8 4 0 0 2 0 0 0 0 0 0 8 14 4 0 4 10 0 2 7 7 0 1 6 5 0 0 1 2 1 2 3 8 7 5 0 6 3 4 44 Without Dropout 4 52 32 23 6 4 49 45 11 Number of spikes for the pre-assigned category Number of spikes for the other categories Figure S4: Involvement rate of neurons in solving different object recognition tasks with and without applying dropout. Table SII: Performance of VGG16 over the ETH-80 and NORB datasets. Dataset ETH-80 NORB Fine-tuned 97.8 94.7 tivation function for the hidden and output layer are set to ReLU and Softmax, respectively. For overfitting avoidance, we explore using dropout on dense layers and kernel regularizers with different parameter values to achieve the best performance. Trained from Scratch 96.8 80.1 with input window that covers the whole incoming data from previous layer. Activation functions of convolutional neurons are set to ReLU. After convolutional layers, we put two dense layers: a hidden and an output layer. Number of neurons in the hidden layer is tuned for each task. Ac- 2.4 Comparison with Deep Convolutional Neural Network Deep convultional neural networks (DCNNs) has achieved outstanding results in various complex visual object recognition tasks. Spiking neural net4 works, despite of being theoretically more powerful, cannot beat them in practice by the time of writing this manuscript. One problem with DCNNs is that they are data-hungry and they need lots of training samples to generalize well. This problem can be tackled by applying fine-tuning strategies over pre-trained DCNNs (initialized with pre-trained weights), instead of training them from scratch (initialized with random weights). Here, we repeated our object recognition tasks, this time using a DCNN called VGG16, which is known as one of the state-of-the-art networks for object categorization. We used Keras network API4 with Tensorflow5 as its backend to examine VGG16 network, while doing fine-tuning or training from scratch. Table SII summarizes the best performances of VGG16 over the ETH-80 and NORB (after doing the aforementioned subsampling) datasets. Since the performance depends on the fine-tuning strategy and values of parameters, we do not guaranty that the obtained results are the best possible ones. However, we did our best to achieve high performances. According to the results, VGG16 always beats us when it is fine-tuned, whereas it has encountered serious overfitting problem, as well as the proposed network, while being trained on the NORB dataset from scratch. 4 5 https://keras.io/ https://www.tensorflow.org/ 5
1cs.CV
1 Control Capacity Gireeja Ranade∗† and Anant Sahai† ∗ Microsoft Research, Redmond † Electrical Engineering and Computer Sciences, University of California, Berkeley [email protected], [email protected] Abstract arXiv:1701.04187v1 [cs.IT] 16 Jan 2017 Feedback control actively dissipates uncertainty from a dynamical system by means of actuation. We develop a notion of “control capacity” that gives a fundamental limit (in bits) on the rate at which a controller can dissipate the uncertainty from a system, i.e. stabilize to a known fixed point. We give a computable single-letter characterization of control capacity for memoryless stationary scalar multiplicative actuation channels. Control capacity allows us to answer questions of stabilizability for scalar linear systems: a system with actuation uncertainty is stabilizable if and only if the control capacity is larger than the log of the unstable open-loop eigenvalue. For second-moment senses of stability, we recover the classic uncertainty threshold principle result. However, our definition of control capacity can quantify the stabilizability limits for any moment of stability. Our formulation parallels the notion of Shannon’s communication capacity, and thus yields both a strong converse and a way to compute the value of side-information in control. The results in our paper are motivated by bit-level models for control that build on the deterministic models that are widely used to understand information flows in wireless network information theory. 1. I NTRODUCTION Shannon’s notion of communication capacity has been instrumental in developing communication strategies over information bottlenecks [3]. This powerful idea provides engineers with a language to discuss the performance of a wide-range of systems going from a single point-to-point link to complex networks. Just like communication systems, control systems also face many different performance bottlenecks. Some of these are explicitly informational in nature, such as rate-limited channels in networked control systems. Other performance bottlenecks come from the fact that parameters of the system might be uncertain or unpredictable. Model parameters (e.g. mass, moment-of-inertia) must be estimated from data. Other parameters (e.g. linearization constants) might be changing with time; algorithms such as iterated-LQR control require re-linearizing the system at each step. The impact of of model uncertainty has been investigated by robust control, and robust control provides worstcase bounds on the controllability of a system when only partial information about system parameters is available This paper was presented in part at ISIT 2015 [1] and at ICC 2016 [2]. 2 (e.g. [4], [5]). Many works have also investigated how side-information regarding uncertain parameters can improve the performance of control systems, and this work is discussed later in the introduction. We build on these ideas and are motivated by Witsenhausen’s comments in [6], where he points out the need for a theory of information that is compatible with control. We propose that model parameter variations/uncertainties in control systems can also be interpreted as informational bottlenecks in the system. We define a family of notions of control capacity that capture the fundamental limits of a controller’s ability to stabilize a system over an unreliable actuator. A. Main results System X[n] X[n] Controller U [n] Fig. 1. A block diagram representation of an “actuation” channel, where the chosen control signal has an uncertain effect, i.e. it is only applied after passing through an unreliable channel. Since this actuation channel models physical unreliabilities in the system (e.g. unreliable gains) an encoder and decoder are not a part of the model. The results in this paper focus on the stability of a scalar system with unpredictable control gains B[n]: X[n + 1] = a (X[n] + B[n]U [n]) + W [n], (1) Y [n] = X[n] + V [n]. A block diagram for this is shown in Figure 1. Let the initial state X[0] = x0 6= 0 be arbitrary, and let V [n] and W [n] be i.i.d. N (0, 1) white Gaussian noise sequences. U [n] is a causal control that must be computed using only the observations Y [0] to Y [n]. The goal is to stabilize the system. While traditionally stochastic control has considered second moment stability, we consider the more general notion of η -th moment stability, i.e. to ensure that supn E [|X [n]|η ] is always bounded. B[n] is a random variable that is drawn i.i.d. from a known distribution pB , and represents the uncertainty in how the applied control will actually influence the state. This leads us to call the block (X[n] + B[n]U [n]), the “actuation channel” in this system. Note that our model does not include an encoder-decoder pair around the actuation channel — this is because we would like to model physical unreliabilities in the system as opposed to traditional communication constraints. Our objective is to develop the notion of control capacity that can be measured in bits, in order to provide an informational interpretation for these physical unreliabilities that is compatible with the language of information theory. 3 The precise definition of the η -th moment control capacity (Cη ) is deferred to Section 5. Our first main family of results (Theorems 3.1, 4.1, 5.1) shows that the system in (1) is stabilizable in the η -th moment if Cη > log |a|, and only if Cη ≥ log |a|. The second family of results (Theorems 3.4, 4.2, 5.2) show that Cη is actually computable, and depends only on the distribution of the i.i.d B ’s, i.e., 1 Cη = max − log E [|1 + B · d|η ] . d η It turns out the limiting cases of the notion of η -th moment stability as η → 0 and η → ∞ are of particular interest, as the weakest and strongest potential notions of stability. The “Shannon” notion of control capacity, Csh , is what becomes relevant as η → 0, and captures the stabilization limit for supn E [log |X [n]|] < ∞. While this logarithmic sense of stability might seem artificial, Thm. 3.8 shows a strong converse style result for the Shannon control capacity — without enough Shannon control capacity, it is impossible to have the state be stable in any sense. As η → ∞ we approach the regime traditionally considered in robust control, and require stability with probability 1. This is captured by the zero-error notion of control capacity, Cze . Theorem 5.5 establishes these limits formally. One advantage of our information theoretic formulation is that it allows us to easily compute how side-information about a channel can improve our ability to control a system, paralleling calculations we are so familiar with in information theory. In particular, it turns out that the value of side-information about an actuation channel can be computed as a conditional expectation (Theorems 8.2, 8.3). B. Previous work This paper builds on many previous ideas in information theory and control. Yüksel and Basar provide a detailed discussion and summary on the work at this intersection with a focus on understanding information structures and stabilization in their book [7]. A recently released book by Fang et al. [8] provides some more of the history as well as recently developments on the work to integrate information theory with control, with a focus on performance-limits from the input-output perspective represented by Bode’s integral formula. This section discusses some representative results and a more detailed discussion of related work can be found in [9]. Stochastic unreliability in control systems has been extensively studied, starting with the uncertainty threshold principle [10], which considers the control of a system where both the system growth and control gain are unpredictable at each time step. The notion of control capacity provides an information-theoretic interpretation of the uncertainty threshold principle, and generalizes it to consider η -th moment stability instead of just secondmoment stability. Further, control capacity can understand general uncertainty distributions (as opposed to just Gaussian distributions in [10]). We discuss different categories of related work as well as the inspiration we have drawn from these different areas. 4 1) Control with communication constraints: Our work is strongly inspired by the family of data-rate theorems [11], [12], [13], [14], [15]. These results quantify the minimum rate required over a noiseless communication channel between the system observation and the controller to stabilize the system1 . The related notion of anytime capacity considers control over noisy channels and also general notions of η -th moment stability [17]. Elia’s work [18] uses the lens of control theory to examine the feedback capacity of channels in a way that is inspired by and extends the work of Schalkwijk and Kailath in [19], [20]. These papers “encode” information into the initial state of the system, and then stabilize it over a noisy channel. All these results allow for encoders-decoder pairs around the unreliable channels, and thus capture a traditional communication model for uncertainty. The main results have the flavor that the appropriate capacity of the bottlenecking communication channel must support a rate R that is greater than a critical rate. This critical rate represents the fundamental rate at which the control system generates uncertainty — it is typically the sum of the logs of the unstable eigenvalues of the system for linear systems. Our paper focuses on extending this aesthetic to capture the impact of physical unreliabilities. The data-rate theorems and anytime results consider the system plant as a “source” of uncertainty. This source must be communicated2 over the information bottleneck. Our current paper focuses on how control systems can reduce uncertainty about the world by moving the world to a known point as suggested in [21]. We refer to the dissipation of information/uncertainty as the “sink” nature of a control system. This difference is made salient by focusing on the control limits imposed by physical unreliabilities, which cannot be coded against. This represents how our perspective is different from previous data-rate theorems, while the aim of this work is to provide tools for use in conjunction with the data-rate results. 2) Actuation channels and other parameter uncertainties: A few other results have explicitly focused on understanding physical unreliabilities, and these have guided our explorations. Elia and co-authors were among the first to consider control actions sent over a real-erasure actuation channel [22], [23], [24], with a focus on second-moment stability. They restricted the search space to consider only linear time-invariant (LTI) strategies so that the problem might become tractable and connected the problem to second-moment robust control. Related work by Schenato et al. [25] and Imer et al. [26] also looked at this problem using dynamic programming techniques and showed that LTI strategies are in fact optimal in the infinite horizon when the effect of the control actions is available to the controller through feedback. Together these results show that the restriction to LTI strategies in [23] is in fact not a restriction at all! Our results recover some of these results for the scalar case and generalize them to η -th moment notions of stability. 1 One of the objectives of this line of work is to be able to consider problems with explicit rate-limits as well as parameter uncertainty in a unified framework, and this has been explored in later work in [16]. 2 In fact, the traditional data-rate theorems tend to come in pairs where the control system is paired with a pure estimation problem involving an open-loop version of the plant. 5 Other related works by Garone et al. [27] and Matveev et al. [28] both consider control actions that are subject to packet drops, but allow the controller and system to use an encoder-decoder pair to treat this limitation as a traditional communication constraint. The works [25], [27] also examined the impact of control packet acknowledgements (a kind of side information); this becomes relevant for choosing between practical protocols such as TCP and UDP when building a system. In this paper, we provide a more general method to consider side-information that goes beyond the packet drop case. Martins et al. [29] considered the stabilization of a system with uncertain growth rate in addition to a rate limit. Okano et al. [30] also considered uncertain system growth from a robust control perspective. By contrast, the focus of our current work is on uncertainty in the control gain. Recent work [16] tries to provide an informational perspective that can bridge these various results. 3) Value of information in control: Parameter uncertainty in systems has been studied previously in control, and there has been a long quest to understand a notion of “the value of information” in control. One perspective on this has been provided by the idea of preview control and how it improves performance. A series of works have examined the value of information in stochastic control problems with additive disturbances. For a standard LQG problem, Davis [31] defines the value of information as the control cost reduction due to using a clairvoyant controller with non-causal knowledge. He observed that future side information about noise realizations can effectively reduce a stochastic control problem to a set of deterministic ones: one for each realization of the noise sequence. The area of non-anticipative control characterizes the price of not knowing the future realizations of the noise [32], [33]. Rockafellar and Wets [32] first considered this in discrete-time finite-horizon stochastic optimization problems, and then Dempster [34] and Flam [33] extended the result for infinite horizon problems. Finally, Back and Pliska [35] defined the shadow price of information for continuous time decision problems as well. Other related works and references for this also include [36], [37], [38]. An important related result is also that of Martins et al. [39]. Their paper studied how a preview of the noise can improve the frequency domain sensitivity function of the system, in the context of systems with additive noise. We are motivated by a similar spirit, however, our paper considers multiplicative parameter uncertainty in the system in addition to additive noise, and we take an information-theoretic approach where the value of information is measured in bits. 4) Multiplicative noise in information theory: Because fading (channel gain) in wireless channels behaves multiplicatively and is modeled as random, such channels have been extensively studied in information theory [40]. However, even the qualitative nature of the results hinge crucially on whether the fading is known at the transmitter and/or receiver, and how fast the fades change. Most closely related to this paper is the work of Lapidoth and his collaborators, e.g. [41], [42]. These works consider non-coherent channels (that change too fast 6 to predict) and show that the scaling of capacity with signal-to-noise ratio (SNR) is qualitatively different than if fading were known — growing only as the double logarithm of the SNR rather than with the logarithm of the SNR. However, achieving even this scaling requires having an encoder and decoder around the channel and more importantly, using a specially tailored input distribution that is far from continuous. 5) Side information in information theory: There are two loci of uncertainty in point-to-point communication. The first is uncertainty about the system itself, i.e. uncertainty about the channel state, and the second is uncertainty about the message bits in the system. Information theory has looked at both channel-state side information in the channel coding setting and source side information in the source coding setting. Wolfowitz was among the first to investigate side-information in the channel coding setting with time-varying channel state [43]. Goldsmith and Varaiya [44] build on this to characterize how channel-state side information at the transmitter can improve channel capacity. Caire and Shamai [45] provided a unified perspective to understand both causal and imperfect CSI. Lapidoth and Shamai quantify the degradation in performance due to channel-state estimation errors by the receiver [41]. Medard in [46] examines the effect of imperfect channel knowledge on capacity for channels that are decorrelating in time and Goldsmith and Medard [47] further analyze causal side information for block memoryless channels. Their results recover Caire and Shamai [45] as a special case. The impact of side information has also been studied in multi-terminal settings. For example, Kotagiri and Laneman [48] consider a helper with non-causal knowledge of the state in a multiple access channel. Finally, there is the surprising result by Maddah-Ali and Tse [49]. They showed that in multi-terminal settings stale channel state information at the encoder can be useful even for a memoryless channel. It can enable a retroactive alignment of the signals. Such stale information is completely useless in a point-to-point setting. On the source-coding side there are the classic Wyner-Ziv and Slepian-Wolf results for source coding with source side information that are found in standard textbooks [50]. Pradhan et al. [51] showed that even with side information, the duality between source and channel coding continues to hold: this is particularly interesting given the well-known parallel between source coding and portfolio theory. Source coding with fixed-delay side information can be thought of as the dual problem to channel coding with feedback [52]. Another related body of work looks at the uncertainty in the distortion function as opposed to uncertainty of the source. Uncertainty regarding the distortion function is a way to model uncertainty of meaning. In this vein, Martinian et al. quantified the value of side information regarding the distortion function used to evaluate the decoder [53], [54]. Moving beyond communication, the MMSE dimension looks at the value of side information in an estimation setting. In a system with only additive noise, Wu and Verdu show that a finite number of bits of side information regarding the additive noise cannot generically change the high-SNR scaling behavior of the MMSE [55]. 7 Finally, the ideas in this paper were inspired by the change in doubling rate with side information in portfolio theory [56]. Permuter et al. [57], [58] showed that directed mutual information is the gain in the doubling rate for a gambler due to causal side information. 6) Bit-level models: Our core results were first obtained for simplified bit-level carry-free models for uncertain control systems [1]. These models build on previous bit-level models developed in wireless network information theory such as the deterministic models developed by Avestimehr, Diggavi and Tse (ADT models) [59], and lower-triangular or carry-free models developed by Niesen and Maddah-Ali [60]. Our previous work on carry-free models [61] generalized these models to understand communication with noncoherent fading. The results in [61] form the basis of the bit-level models for the control of systems with uncertain parameters. Some of the results in this paper were previously summarized in [1], which appeared at ISIT 2015. C. Outline The next section, Section 2 introduces the problem formulation. Subsequently, Sections 3, 4, 5 introduce the Shannon notion, the zero-error notion and the general η -th moment notions of control capacity for the simple case of systems with only multiplicative noise on the actuation channel (no additive noise). These are discussed in Section 6, and extended to the case of additive noise in Section 7. Section 8 then discusses how this notion of control capacity can be used to understand the value of side-information in systems. The discussion of the visual intuition from the bit-level carry-free models that inspired the work is deferred to the Appendix A. 2. P ROBLEM SETUP AND DEFINITIONS We focus our attention on a scalar system without additive system disturbances or observation noise. Section 7 will then extend these ideas to systems with additive disturbances. First we consider a system S with system gain a = 1. X[n + 1] = X[n] + B[n]U [n], (2) Y [n] = X[n]. We call the basic setup in (2) the actuation channel as it captures the basic multiplicative bottleneck in the system. The control signal U [n] can be any causal function of Y [i] for 0 ≤ i ≤ n. The random variables B[k], 0 ≤ i ≤ n, are independent. B[k] ∼ pB[k] , and these distributions are known to the controller beforehand. Let X[0] = x0 6= 0 be an arbitrary but fixed known nonzero initial state. In the case where the B[k]’s are distributed i.i.d. according to a distribution pB (·), we will parameterize the system by this distribution as S(pB ). Our objective is to use the control capacity of the actuation channel to understand the stabilizability of the related 8 system Sa with non-trivial intrinsic growth a > 1, Xa [n + 1] = a (Xa [n] + B[n]Ua [n]) (3) Ya [n] = Xa [n]. We fix the initial condition of this system to be the same as system S , i.e. Xa [0] = X[0] = x0 . The random variables B[i] in the system are the same as those of system S defined in (2). We will introduce a few different notions of stability that are intimately related to each other. For each of these notions of stability we will later define a notion of control capacity of the actuation channel, which will be the maximum growth rate that can be tolerated while maintaining stability. First, we consider a notion of η -th moment stability, as has been considered in the past in [17] and other related works. Definition 2.1. Consider η > 0. A system (e.g. (1), (2), and (3)) is said to be stabilizable in the η -th moment sense if there exists a causal control strategy U [0], U [1], · · · , i.e. a strategy such that each U [k] is a function of the observations Y [0] to Y [k], such that for some M < ∞,   lim sup E |X[n]|η < M. n→∞ η -th moment stability captures a family of stability notions as η varies from zero to infinity, and there is clearly an order to this notion of stability: a system is stabilizable in an (η + )-th moment sense ( > 0), only if it is stabilizable in an η -th moment sense. We are particularly interested in the limits η → 0 and η → ∞, and define two more notions of stability that capture those limits in an interpretable way. The first of these is a notion of logarithmic stability, a sense of stability that corresponds to that of the “zeroth” moment; if a system is not logarithmically stabilizable, it is not η -th moment stabilizable for any η . Definition 2.2. A system (e.g. (1), (2), and (3)) is said to be logarithmically stabilizable if there exists a causal control strategy U [0], U [1], · · · such that for some M < ∞, lim sup E [log |X[n]|] < M. n→∞ We will see later in Thm. 5.5 and illustrated by examples in Section 6 that the η -th moment control capacity converges to the “logarithmic” control capacity as η → 0. We are motivated to call the notion of control capacity associated with logarithmic stability as “Shannon” control capacity because of this convergence. It is reminiscent of the convergence of Rènyi α-entropy to Shannon entropy as α → 1. The next notion of stability corresponds to a worst-case or traditional robust control perspective. The name “zero-error” stability comes from an analogy to the notion of zero-error communication capacity in information theory, which is the rate at which a communication channel can transmit bits with probability 1. Correspondingly, 9 in control, we require that the system be bounded by a finite box with probability 1. Definition 2.3. A system (e.g. (1), (2), and (3)) is said to be stabilizable in the zero-error sense if there exists M < ∞, an N > 0 and a causal control strategy U [0], U [1], · · · such that for all n > N , P (|X[n]| < M ) = 1. (4) The last definition for stability we introduce here is ostensibly the weakest notion of stability for a system, and builds on the concept of tightness of measure. This notion requires that all the probability mass of the system state remain bounded, even if we are not requiring any moment to remain bounded. Definition 2.4. We say the controller can keep the system S in (2) tight there exists a causal control strategy U [0], U [1], · · · , such that for every  > 0, there exist M , N < ∞ such that for n > N , P(|Xn | < M ) ≥ 1 −  Logarithmic stability implies that the system can be kept tight (by Markov’s inequality), but the reverse is not necessarily true. A further connection between these notions will be developed in Thm. 3.8, which gives a control counterpart to the strong-converse in the information theory of communication channels. With these definitions, we move to understanding the corresponding notions of control capacity. We start with logarithmic stability and the corresponding notion of control capacity as the simplest case. 3. “S HANNON ” CONTROL CAPACITY In this section, we introduce the Shannon notion of control capacity in Def. 3.1. After this definition, we first state and prove Thm. 3.1, which connects the control capacity of the actuation channel S to the growth and decay of the system Sa . Then, Thm. 3.4 discusses explicitly calculating the capacity through a single-letterization whenever the random variables B[n] are distributed i.i.d.. Theorem 3.8, the last in this section, connects logarithmic stability to the tightness of a system. We define “Shannon” control capacity in the context of the system, S , with no system gain (a = 1). Once we understand the decay rate of this simple system, it can be translated to understand the stabilizability of system Sa . Definition 3.1. The Shannon control capacity of the system S in (2) is defined as   |X[n]| 1 . Csh (S) = lim inf max − E log n→∞ U [0],··· ,U [n−1] n |X[0]| (5) 10 Theorem 3.1. The system Sa in (3) is stabilizable in a logarithmic sense if the Shannon-control capacity of the associated system S in (2) Csh (S) > log |a|. Conversely, if the system Sa is stabilizable in a logarithmic sense, then Csh (S) ≥ log |a|. The following Lemma, which shows that S and Sa can be made to track each other, is used to prove the theorem. Lemma 3.2. Let U [0], U [1], · · · be a control strategy applied to S in (2). Set Ua [k] = ak U [k] as the controls applied to Sa in (3). Then, Ua [k] is computable as a function of observations Ya [0], · · · , Ya [k] for system Sa , and for all k ≥ 0 we have that Xa [k] = ak X[k]. Similarly, if we start with Ua [0], Ua [1], · · · as a control strategy applied to Sa , and we set U [k] = a−k Ua [k] as the controls to be applied to S in (2), then each U [k] is computable as a function of the observations Y [0], · · · , Y [k], and for all k ≥ 0 we have that X[k] = a−k Xa [k]. Proof: The proof is a consequence of linearity and proceeds by induction. X[0] = Xa [0] = x0 serves as the base case. Further, Ua [0] is computable as a function of Ya [0], since Ya [0] = x0 . Now, using the controls Ua [k] and applying the induction hypothesis gives: Xa [k + 1] = a(Xa [k] + B[k]Ua [k]) = a(ak X[k] + ak B[k]U [k]). = ak+1 (X[k] + B[k]U [k]) = ak+1 X[k + 1]. Furthermore, since Ya [j] = aj Y [j] for all j ≤ k , we know that Ua [k] is function of Ya [0] to Ya [k]. The reverse direction follows by a similar argument. Proof of Thm. 3.1: We first use Lemma 3.2 to construct an achievable scheme and show sufficiency of the Shannon control capacity. Since Csh (S) > log |a|, we know that there exists a control strategy U [0], U [1], · · · and an N ≥ 0 such that for all n > N ,   1 |X[n]| − E log ≥ log |a|. n |X[0]| Since |a| > 1, this can be re-written as:   |an X[n]| E log ≤ 0. |X[0]| Now, choose Ua [k] = ak U [k]. Then we know from Lemma 3.2 that an X[n] = Xa [n], and we can write: E [log |Xa [n]|] ≤ E [log |x0 |] < ∞. Hence Sa is logarithmically stabilizable. 11 Now to show the necessity of Shannon control capacity, assume there exists an N, M and control law Ua [0], Ua [1] · · · such that E [log |Xa [n]|] < M for all n > N . Hence   |Xa [n]| < M − E [log |x0 |] . E log x0 Applying Lemma 3.2 (|Xa [n]| = |an X[n]|), and dividing by n gives:   1 |X[n]| M − E [log |x0 |] log |a| + E log < , n |x0 | n or   |X[n]| 1 M − E [log |x0 |] > log |a| − . − E log n |x0 | n Thus, taking a limit, since E [log |x0 |] is a constant,   |X[n]| 1 ≥ log |a|, lim inf − E log n→∞ n |X[0]| which implies that the Shannon control capacity Csh (S) ≥ log |a|. Thm. 3.1 provides us with an operational meaning for Shannon control capacity. However, this notion of control capacity is only valuable if we can actually compute it. The definition of control capacity involves an optimization over an infinite sequence of potential control laws, which could potentially be hard to evaluate. However, Thm. 3.4 shows that this reduces to a single-letter optimization in the case where the B[n]’s are distributed i.i.d. with distribution pB . We parameterize the system with this distribution to indicate this, and denote it by S(pB ). Before we get to the main result, we take care of the trivial case. Theorem 3.3. The Shannon control capacity is ∞ for the system S(pB ) in (2), with the B[n]’s distributed i.i.d. according to pB if the pB has an atom not at 0. Proof: Let pB have an atom at β 6= 0. Then consider the strategy U [k] = − β1 X[k]. In this case, X[n] X[0] can be 0 with positive probability, and hence the negative log can be infinite, which implies that the Shannon control capacity is infinite. This captures the idea that betting on the atom will eventually pay off if we wait long enough. Theorem 3.4. The Shannon control capacity of the system S(pB ) in (2), where pB is a distribution with no atoms (except possibly at zero), is given as: Csh (S(pB )) = max E [− log |1 + B · d|] , d∈R where B ∼ pB . (6) 12 The proof of Theorem 3.4 relies on the following lemma: Lemma 3.5. Suppose the system state at time n is x[n] ∈ R, x[n] 6= 0. Then, for the system S in (2) define the one-step Shannon control capacity   |X[n + 1]| . C1,sh (x[n]) = max − E log |x[n]| U [n] where U [n] is any function of x[n]. Here, the expectation is taken over the random realization of B[n] ∼ pB . Hence, X[n + 1] is a random variable even though X[n] = x[n] has been realized and fixed. Then, C1,sh (x[n]) does not depend on x[n] or n, and is given by C1,sh (x[n]) = C1,sh = max E [− log |1 + B · d|] , d∈R where B ∼ pB . Hence, there exists a scalar d so that U [n] = d · Y [n] = d · x[n] such that   X[n + 1] = C1,sh . −E log x[n] Proof: We can write   |X[n + 1]| C1,sh (x[n]) = max − E log |x[n]| U [n]   U [n] = max − E log 1 + B[n] · . x[n] U [n] Now, since U [n] is a function of x[n], we can replace U [n] x[n] by the parameter d ∈ R and optimize over that instead. Hence, C1,sh = max E [− log |1 + B[n] · d|] . The proportionality constant d in the lemma statement is just the d d we have found in the optimization. Lemma 3.6. If the distribution pB has no atoms (except possibly at zero), then the distribution of X[n], pX[n] , cannot have an atom at 0. Proof: We use induction to show this. Since X[0] = x0 6= 0, it serves as the base case. Assume the statement is true for X[n], i.e. pX[n] has no atoms at zero. First, consider the case U [n] = 0 is applied. Then, X[n + 1] = X[n], and pX[n+1] cannot have an atom at 0 by the induction hypothesis. If U [n] 6= 0 is applied, then: P(X[n + 1] = 0) = P (X[n] + B[n]U [n] = 0)   X[n] = P B[n] = − . U [n] 13 But this probability is equal to zero since pB has no atoms except at zero and X[n] U [n] is a constant that is not equal to zero by the induction hypothesis. This brings us to the proof of Thm. 3.4. Proof of Thm. 3.4: Achievability: We know from Lemma 3.5 that there exists U [n] = dY [n] such that   X[n + 1] −E log = max E [− log |1 + B[n] · d|] d∈R x[n] (7) for every x[n]. Starting with X[0] = x0 we apply the sequence of controls generated by applying Lemma 3.5 at each time step 0 ≤ k ≤ n. We can rewrite the expression for control capacity by using a telescoping sum (division by X[k] is permitted due to Lemma 3.6) and linearity of expectation as:    n−1  |X[n]| 1X |X[k + 1]| 1 =− E log . − E log n |X[0]| n |X[k]| (8) i=0 Plugging in the control law U [n] = dY [n] tells us that (8) is equal to: −  n−1  n−1 1X |X[k](1 + dB[k]| 1X E log = E [− log |1 + dB[k]|] . n |X[k]| n i=0 (9) i=0 Since the B[k] are i.i.d., the terms inside are identical and by the choice of d in Lemma 3.5 we have the desired result. Converse: We will prove this using induction. Recall that we are allowed to divide by X[k] below due to the Lemma 3.6 above. We can bound the term of interest as: max U [0],··· ,U [n−1]       |X[n]| |X[n]| |X[n − 1]| 1 1 1 − E log ≤ max − E log + max − E log . n |X[0]| n |X[n − 1]| n |X[0]| U [0],··· ,U [n−1] U [0],··· ,U [n−2] (10) We condition the first term on the RHS in (10) on X[n − 1] so that the inner expectation is over B[n − 1], and the outer is over X[n − 1]. This gives:  E log    |X[n]| |X[n]| = E E log |X[n − 1]| |X[n − 1]|  X[n − 1] . We can now bound this by looking at the maximizing realization of X[n − 1] = x[n − 1]. Hence, max U [0],··· ,U [n−1]   − E E log |X[n]| |X[n − 1]|  X[n − 1] ≤ max max x[n−1]6=0 U [0],··· ,U [n−1]   |X[n]| E − log . |x[n − 1]| 14 Clearly, on the RHS, the control laws before time n − 1 no longer matter and so by Lemma 3.5, we can write   |X[n]| = max E [− log |1 + B[n − 1] · d|] . max max E − log d |x[n − 1]| x[n−1]6=0 U [n−1] Now, using the induction hypothesis for the second term in (10) gives the result. Remark 3.1. As a consequence of the proof we see that linear memoryless strategies are optimal for calculating the Shannon control capacity. Theorem 3.4 allows us to relate this notion of Shannon control capacity to the tightness of systems as in Definition 2.4 through a strong converse style result. To show this we first prove a lemma that bounds relevant random variables. Lemma 3.7. Consider a random variable B with a bounded density pB (except possibly with an atom at B = 0)   ξ . Then, there exists a universal exponential such that there exist γ, ξ ≥ 1 so that the density pB (b) ≤ γ min 1, |b| tail bound for the left tail of the random variable Zd = ln |1 + Bd| for all possible values of d, i.e. there exists KB such that for all t > 0, we know P(Zd < −t) ≤ KB e−t .   If B furthermore has finite first and second moments E [|B|] and E |B|2 , then there also exists a universal upper bound σ 2B that bounds the variance Var [Zd ] ≤ σ 2B . Proof: We first establish the tail bound on Zd . Let Zd = Zd+ +Zd− where Zd+ = Zd whenever Zd ≥ 0 and Zd− = Zd whenever Zd < 0. Consequently Zd+ Zd− = 0 and as a result, the second moment E[Zd2 ] = E[(Zd+ )2 ] + E[(Zd− )2 ]. The event Zd− ≤ −t is the same as |1 + Bd| ≤ e−t . This implies that B must belong to an interval of length 2 −t |d| e , and that if d > 0, then d1 (1 − e−t ) ≤ B ≤ d1 (1 + e−t ). If d < 0, then d1 (1 − e−t ) ≥ B ≥ d1 (1 + e−t ). Notice that if t > 0, such an interval cannot include B = 0. Now consider t ≥ ln 2 so that all points in the interval are at a distance of at least 1 2|d| from the origin. Because of this, we know from the tail bound on the density pB , we know that the probability P(Zd− ≤ t) ≤ 2 −t e γ min (1, 2|d|ξ) |d| ≤ γ4ξe−t , where we use min (1, 2|d|ξ) ≤ 2|d|ξ. Putting everything together, we know    1 if t < ln 2 − P(Zd ≤ −t) ≤   4γξe−t if t > ln 2. (11) (12) This establishes the tail bound on Zd− since we can choose KB = 4γξ as 4e− ln 2 = 2 > 1 is a trivially valid bound. 15 To show the variance bound, we consider the cases d ≤ 1 and d > 1 separately. If d ≤ 1, we bound the variance by the second moment. We integrate (12) to get the bound E[(Zd− )2 ] Z ∞ Z0 ∞ = P((Zd− )2 ≥ x) dx √ P(Zd− ≤ − x) dx 0 Z ∞ √ 2 ≤ (ln 2) + 4γξe− x dx = (ln 2)2 = (ln 2)2 + 4(1 + ln 2)γξ. (13)   It remains to bound E (Zd+ )2 . We know that Zd > 0 implies that |1 + Bd| > 1. Now for x > 1, we know that ln(x) ≤ x − 1 and hence Zd ≤ |1 + Bd| − 1 ≤ |Bd| ≤ |B|, where the second inequality second inequality follows by applying the triangle inequality. The last inequality follows     form the assumption |d| ≤ 1. Consequently E (Zd+ )2 ≤ E |B|2 which is bounded by assumption. Combing this with (13) implies that that there is a universal upper bound k1 such that Var[Zd ] ≤ k1 for all |d| ≤ 1. Now consider the case when |d| > 1. We have that 1 Var[Zd ] = Var[ln |d| + ln | + B|] d 1 = Var[ln | + B|] d (14) Let Zed = ln | d1 + B|. We can essentially repeat the same style of arguments as in the case d ≤ 1, except with some minor variations. Split Zed = Zed+ + Zed− where Zed+ = Zed whenever Zed ≥ 0 and Zed− = Zed whenever Zed < 0. As before, E[Zed2 ] = E[(Zed+ )2 ] + E[(Zed− )2 ]. Consider the negative case first. If Zed− ≤ −t, then we must have | d1 + B| ≤ e−t and this implies that B is in an interval of length 2e−t that begins at − d1 − e−t and extends to − d1 + e−t . As above, the upper bound γ on the density of B tells us that P(Zed− ≤ −t) ≤ 2γe−t for all t > 0. Integrating this bound gives E[(Zed− )2 ] ≤ 4γ . For the positive side, if Zed > 0, we know that | d1 + B| > 1. Again, using the fact that ln(x) ≤ x − 1 for x ≥ 1, we know that Zed ≤ | d1 + B| − 1 ≤ |B| since d > 1 by assumption here. Consequently E[(Zed+ )2 ] ≤ E[|B|2 ] which is bounded by assumption. Combining the bounds on E[(Zed− )2 ] and E[(Zed+ )2 ] we obtain the desired bound on Var[Zd ] ≤ k2 when d > 1. Thus the maximum over k1 and k2 gives a universal bound on the variance of Zd . With that lemma in hand, we are ready to prove a counterpart of the strong converse in channel coding for control 16 capacity. If there is not sufficient Shannon capacity, then the system state eventually blows up with probability 1. Notice that the technical condition imposed on the bounded density is very mild since the density has to integrate ξ ) is just ruling out densities with ever shortening bursts to 1 anyway and so the condition that pB (b) ≤ γ min(1, |b| of wild oscillations. Theorem 3.8. Let pB (·) have a bounded density (except possibly for an atom at zero) such that there exists γ, ξ > 1   ξ so that the density pB (b) ≤ γ min 1, |b| . If Csh (S(pB )) > log |a|, then the system Sa (pB ) in (3) with the B[k]’s i.i.d. according to pB can be kept tight. Furthermore, if Csh (S(pB )) < log |a|, then for all causal control strategies, and all bounds M > 0, the limiting probability lim P(|Xa | ≥ M ) = 1. n→∞ (15) Proof: If Csh (S(pB )) > log |a|, then we know that the system Sa (pB ) can be logarithmically stabilized, which implies that it can be kept tight. Now, consider an actuation channel whose Shannon control capacity is not big enough, Csh (S(pB )) = log |a| −  where  > 0. For convenience, throughout this proof we will take all logarithms to be natural logarithms and thus work in base e instead of 2. Let U be an arbitrary control law. For n > 1, if X[n] = 0 then by choosing U [n] = 0, the controller can ensure the minimum possible |X[n + 1]| = 0, which is the optimal action since it will keep the state at 0 forever. Consequently, without loss of generality we restrict attention to control strategies that apply a 0 control when faced with a 0 state. These are sample-path by sample-path as good as or better than other strategies when it comes to keeping the state within bounds. Because the initial condition Xa [0] = x0 is assumed to be known and because the controller can recall all past observations and controls, the control law U [n] can be interpreted as being a function of all the random gains B[0], B[1], . . . , B[n − 1]. Let Fn−1 be the sigma field generated by B[0], B[1], . . . , B[n − 1]. Because the controller applies a zero control to a zero state, we can re-interpret the control law as being U [k] = D[k]Xa [k] where D[k] = U [k] Xa [k] and hence a deterministic function of B[0], B[1], . . . , B[n − 1]. 17 Using this to expand (3), we see that |Xa [n]| = |a (1 + D[n − 1] · B[n − 1]) Xa [n − 1]| = |x0 | n−1 Y |a| |1 + D[k] · B[k]| k=0 = |x0 | en n−1 Y |a|e− |1 + D[k] · B[k]| (16) k=0 Take the natural log to get ln |Xa [n]| = ln |x0 | + n + n−1 X ln(|a|e− |1 + D[k] · B[k]|). (17) k=0 Let J[k] = ln(|a|e− |1 + D[k] · B[k]|) = ln |a| −  + ln |1 + D[k] · B[k]|. It turns out that {(J[k], Fk )}∞ k=0 is a sub-martingale difference sequence.   E [J[k]|Fk−1 ] = ln |a| −  + E ln |1 + D[k] · B[k]| Fk−1 ≥ ln |a| −  − (ln |a| − ) (18) ≥0 where (18) comes from the fact that D[k] is a deterministic function of B[0], B[1], . . . , B[k − 1] and hence a constant in that expectation, and Shannon control capacity is the maximum that −E[ln |1 + dB|] can be over the choice of constants d. Define a process of strictly non-negative random variables H[k] = E [J[k]|Fk−1 ] ≥ 0, and consider J[k] = H[k] + (J[k] − H[k]). Clearly, {((J[k] − H[k]), Fk )}∞ k=0 is a martingale difference sequence. Furthermore, because H[k] is a constant relative to Fk−1 as are ln |a| and , we know that Var[(J[k] − H[k])|Fk−1 ] = Var[J[k]|Fk−1 ]   = Var ln |1 + D[k]B[k]| Fk−1 ≤ σ 2B . (19) where (19) comes from Lemma 3.7. Taking expectations on both sides gives us that Var[(J[k] − H[k])] ≤ σ 2B . (20) 18 Now, we can use J[k] and H[k] ≥ 0 to rewrite (17) as ln |Xa [n]| = ln |x0 | + n + n−1 X H[k] + k=0 n−1 X (J[k] − H[k]). (21) k=0 The first term is a constant and the second and third terms are non-negative and growing at least linearly. The P martingale n−1 k=0 (J[k] − H[k]) is the only one that could possibly be negative. However, a simple application of Chebyshev’s inequality tells us that this is not likely. ! ! n−1 n−1 X X n n (J[k] − H[k])| ≥ P (J[k] − H[k] ≤ − ) ≤ P | 2 2 k=0 k=0 hP i n−1 4Var k=0 (J[k] − H[k]) ≤ 2 n2 Pn−1 4 k=0 Var [(J[k] − H[k])] = 2 n2 2 4σ ≤ 2B .  n (22) (23) where (22) follows inductively from the property of martingales and in particular, the uncorrelatedness of the successive martingale difference terms and from (20). The above bound in (23) goes to zero as n → ∞. P n Consequently, we know that with a probability tending to 1 that n−1 i=0 (J[k] − H[k]) > − 2 . Hence from (21) and the fact that the H[k] ≥ 0, we know that ! n−1 X    lim P ln |Xa [n]| > ln |x0 | + n ≥ lim P ln |Xa [n]| > ln |x0 | + n + H[k] n→∞ n→∞ 2 2 k=0 ! n−1 X n = lim P (J[k] − H[k]) > − n→∞ 2  k=0 = 1. Since the log of the absolute value of the state is growing unboundedly with probability approaching 1, so is the absolute value of the state itself and the theorem is proved. Remark 3.2. The theorem also holds trivially true in the case where pB has atoms not at zero, since Csh (pB ) = ∞ in that case. It is interesting to recall that Burnashev’s converse argument for the reliability function of a communication channel with feedback also had a martingale argument embedded in it to deal with the entropy reduction in the posterior of the message [62], [63]. Here, the role of the entropy is played by the log of the state itself. 19 4. Z ERO - ERROR CONTROL CAPACITY We now move to understanding control capacity for the strictest sense of stability: zero-error control capacity. Theorem 4.1 connects the control capacity of the actuation channel S to stability of the system Sa . Theorem 4.2 calculates zero-error control capacity for the system S(pB ) with i.i.d. B[n]’s. Definition 4.1. The zero-error control capacity of the system S is defined as  Cze (S) := max C  exists N such that for all n > N, max U [0],··· ,U [n−1] |X[n]| 1 ≥C P − log n |X[0]|   =1 . (24) This is well defined since X[0] 6= 0 and log 0 = −∞ by definition. Theorem 4.1. The system Sa in (3) is stabilizable in a zero-error sense if and only if the zero-error control capacity of the associated system S in (2) is Cze (S) ≥ log |a|. As in the case of Shannon control capacity, we use Lemma 3.2 to prove Thm. 4.1. Proof of Thm. 4.1: Achievability: First we show that Sa is stabilizable in a zero-error sense if Cze (S) ≥ log |a|. Hence, there exists N and a causal control strategy U [0], U [1], · · · such that for all n > N we have that  |X[n]| 1 ≥ log |a| 1 = P − log n |X[0]|  = P (|a|n · |X[n]| ≤ x0 ) . (25) Choose Ua [k] = ak U [k]. Then, Lemma 3.2 implies that |Xa [n]| = |a|n ·|X[n]|, which combined with (25) completes the proof. Converse: To show necessity, we assume that Sa is zero-error stabilizable. Let Ua [0], · · · , Ua [n] be a causal control law that stabilizes the system. There exist N and M for n > N , such that: P (|Xa [n]| < M ) = 1. Choosing U [k] = a−k Ua [k], and using Lemma 3.2 we have that |Xa [n]| = |a|n · |X[n]|, and hence  P |X[n]| < |a|−n M = 1. Dividing by |X[0]| = x0 6= 0 and rearranging this gives:  1 |X[n]| 1 M P − log > log |a| − n |X[0]| n |X[0]|  = 1. 20 As n → ∞, we see that the lower bound on − n1 log |X[n]| |X[0]| will get arbitrarily close to log |a|, which gives that: Cze (S) ≥ log |a|. The operational definition for zero-error control capacity involves an optimization over an infinite sequence of potential control laws. In this section, we show that in fact this quantity can be easily computed for the system S(pB ) where the B[n]’s are distributed i.i.d. with distribution pB . We first focus on the case where pB has bounded support. We will later show (Theorem 4.4) that when the support of pB is unbounded, the zero-error control capacity is zero. Theorem 4.2. Consider the system S(pB ) in (2) with B[n]’s drawn from pBn , each with essential support on [b1 , b2 ]. Then the zero-error control capacity of the system is Cze (S(pB )) = − log min max |1 + b · d| d b∈[b1 ,b2 ]   log |b2 −b1 | if 0 6∈ [b , b ],  1 2 |b2 +b1 | =   0 if 0 ∈ [b1 , b2 ]. (26) (27) As in the Shannon control capacity case, the proof relies on showing that a simple greedy strategy is optimal. This is captured in the following lemma. Lemma 4.3. Suppose the system state at time n is x[n] ∈ R, x[n] 6= 0. For the system S(pB ) in Thm. 4.2, define the one-step zero-error control capacity as  C1,ze (x[n]) = sup C  max P − log U [n] |X[n+1]| |x[n]|  ≥C =1 .  Then, C1,ze (x[n]) does not depend on x[n], and is given by − log mind maxb∈[b1 ,b2 ] |1 + b · d| which simplifies to    log |b2 +b1 | if 0 6∈ [b1 , b2 ] |b2 −b1 | C1,ze (x[n]) =   0 if 0 ∈ [b1 , b2 ]. The achievability part of this lemma implies that there exists a linear memoryless stationary control law such that  P |X[n + 1]| − log ≥ Cze |x[n]|  = 1. 21 The converse implies that for any δ > 0, for all U [n],  P |X[n + 1]| > Cze + δ − log |x[n]|  < 1. As was the case for Shannon control capacity, the key observation in proving Lemma 4.3 is to notice that X[n+1] x[n] [n] = 1 + B[n] Ux[n] . Then, we observe that U [n] is a function of x[n], and what remains to be understood is the quantity: min max 1 + B · d , d∈R B∈[b1 ,b2 ] where B ∼ pB . The full proof is deferred to Appendix B. Proof of Thm. 4.2: Achievability: First, note that if for any k , X[k] = 0 for 0 ≤ k ≤ n we are done, since with X[k] = 0 we can guarantee X[k + 1] = 0 with the choice U [k] = 0. (Here, we define 0 0 = 1.) Consequently, we focus on the case where X[k] 6= 0 for any 0 ≤ k ≤ n. Now consider: n−1 X ! |X[k + 1]| =P ≥ n · Cze , (28) − log |X[k]| k=0     |X[n]| |X[1]| ≥ Cze , · · · , − log > Cze . (29) ≥P − log |X[0]| |X[n − 1]| o n ≥ C to give us a bound on the probability on the Hence, we can focus on each of the events − log |X[k+1]| ze |X[k]|  |X[n]| P − n1 log ≥ Cze |X[0]|  LHS of (28). For every realization x[k] of X[k], Lemma 4.3 provides a U [k] that ensures that   |X[k + 1]| P − log ≥ Cze | X[k] = x[k] = 1. |X[k]| Since the controller has access to a perfect observation Y [k] = X[k] to generate U [k], we can guarantee that the   unconditional probability, P − log |X[k+1]| ≥ C is also equal to 1. Hence, the controller can causally generate ze |X[k]| a sequence of controls U [0] to U [n] such that the probability in (29) is equal to 1, which completes the proof.   Converse: To prove the converse, we would like to show that for all δ > 0, P − n1 log |X[n]| > C + δ < 1. This ze |X[0]| is equivalent to showing that for all sequences of applied controls up to time n − 1,   1 |X[n]| P − log ≤ Cze + δ > 0. n |X[0]| (30) We will use induction to show this. n = 1 is the base case. We know from Lemma 4.3 that (30) is true for n = 1. Now, log |X[n]| |X[n − 1]| |X[n]| = log + log . |X[0]| |X[0]| |X[n − 1]| (31) 22 Let G = o n o n |X[n]| 1 ≤ C + δ , and the event H = − log ≤ C + δ . Then, using (31), we log |X[n−1]| − n−1 ze ze |X[0]| |X[n−1]| can lower bound the probability in (30) by P(G ∩ H). The induction hypothesis implies that P(G) > 0. 1 Now, consider P(H | G). If the event G occurred then we can infer that X[n−1] 6= 0, since − n−1 log |X[n−1]| |X[0]| = ∞ if X[n − 1] = 0. Hence, we can apply Lemma 4.3 to get that P(H | G) > 0. Thus, P(G ∩ H) = P(H | G)P(G) > 0, which completes the proof. Remark 4.1. As in the case of Shannon control capacity, this proof reveals that there is nothing lost by going to linear memoryless strategies for the zero-error control capacity problem. Furthermore, this immediately generalizes to the non-stationary case as well. Finally, the last theorem of this section shows that when pB is unbounded, the zero-error control capacity is zero. Theorem 4.4. The zero-error control capacity of the system S in (2) with B[i] distributed i.i.d according to pB , where pB has unbounded support, is zero. Proof: First, we note that a trivial “do nothing” strategy is useless since if U [i] = 0 for 0 ≤ i ≤ n, then X[0] = X[n]. Now, consider any strategy U [0], · · · , U [n − 1] with not all controls zero. Say U [n − 1] = u 6= 0 and without loss of generality suppose u > 0. Then, for every value of X[n] and chosen U [n] 6= 0, whatever bound M < ∞   S  M −X[n] we may try to claim, P (|X[n] + B[n]u| > M ) = P B[n] ∈ −∞, −M −X[n] , +∞ > 0. The same u u argument works for u < 0. 5. η - TH MOMENT CONTROL CAPACITY Finally, we consider η -th moment stability. Theorem 5.1 shows that Sa is stabilizable in the η -th moment sense if and only if the η -th moment control capacity of S is greater than log |a|. Theorem 5.2 shows how to single-letterize the expression for η -th moment control capacity. As η ranges from 0 to ∞ it captures a range of stabilities from the weaker “Shannon” sense as η → 0, to the zero-error notions of stability as η → ∞ — this is justified by Theorem 5.5. Definition 5.1. The η -th moment control capacity of the system S as in (2) is defined as " # 1 1 X[n] η Cη (S) = lim inf max − log E . n→∞ n η X[0] U [0],··· ,U [n−1] (32) Theorem 5.1. Consider the system Sa from (3), and the associated system S as in (2). Sa is η -th moment stabilizable if Cη (S) > log |a|. Conversely, if the system Sa is η -th moment stabilizable, then Cη (S) ≥ log |a|. 23 Proof of Thm. 5.1: Achievability: Since Cη (S) > log |a|, we know that for the system S there exists a control strategy U [0], U [1], · · · and N < ∞ such that for n > N : " # " # 1 1 1 1 X[n] η a−n Xa [n] η log E =− log E . log |a| ≤ − n η X[0] n η X[0] The equality follows from Lemma 3.2, using Ua [k] = ak U [k]. This can be rewritten as: " # Xa [n] η E ≤ 1, X[0]   which gives the required bound E |Xa [n]|η ≤ xη0 to show that Sa is η -th moment stabilizable. Converse: There exists a control strategy Ua [0], Ua [1], · · · and N, M < ∞ such that for ∀n > N , we have that E[|Xa [n]|η ] < M . We rewrite this using Lemma 3.2 and divide by |X[0]| = x0 , to get: # " M an X[n] η < η. E X[0] x0 This can be further manipulated to give: 11 − log E nη " X[n] X[0] η # > log |a| − 11 M log η . nη x0 Hence, 11 log E lim inf − n→∞ nη " X[n] X[0] η # ≥ log |a|, which gives the desired result. The next theorem shows how to calculate the η -th moment control capacity in the case of i.i.d. B[n]’s. Theorem 5.2. The η -th moment control capacity of the system S(pB ), parameterized with a single distribution pB with B[n]s are i.i.d. is given by: Cη (S(pB )) = max − d∈R   1 log E |1 + B · d|η η (33) where B ∼ pB . The proof uses a one-step lemma, just as in the Shannon and zero-error cases. Lemma 5.3. Suppose the system state at time n is x[n] ∈ R, x[n] 6= 0. Then, for system S in (2) define the one-step η -control capacity as " # 1 X[n + 1] η C1,η (x[n]) = max − log E . η x[n] U [n] where U [n] is any function of x[n]. Here, the expectation is taken over the random realization of B[n] ∼ pB i.i.d., 24 and X[n] = x[n] 6= 0 has been realized and fixed. Then, C1,η (x[n]) does not depend on x[n] or n, and is given by C1,η (x[n]) = C1,η = max − d∈R   1 log E |1 + B[n] · d|η , η where B[n] ∼ pB . Hence, there exists a constant d such that if U [n] = d · X[n], then " # X[n + 1] η − log E = C1,η . x[n] Proof: This proof is essentially identical to the proof of Lemma 3.5 in the Shannon case and is omitted here. Proof of Thm. 5.2: Achievability: The argument here is very similar to that of the Shannon case. We use the linear law from Lemma 5.3 and take advantage of the independence of the B[k]’s to turn an expectation of a product into a product of expectations. Since each of the terms is identical, the result follows. Converse: We will use induction to prove the converse. The base case for n = 1 follows immediately. For n > 1, if X[n] = 0 then by choosing U [n] = 0, the controller can ensure the minimum possible |X[n+1]| = 0, which is the optimal action. Consequently, we restrict attention to control strategies that apply a 0 control when faced with a 0 state. These are sample-path by sample-path as good as or better than other strategies when it comes to minimizing |X[n]|. Let Qn := 0 if X[n − 1] = 0 and Qn := X[n] X[n−1] X[n] x0 η otherwise. If X[n − 1] 6= 0, then we can write X[n] = X[n − 1] η X[n − 1] x0 η . (34) Using (34) and the definition of Qn we can write:  E X[n] x0 η  η η X[n − 1] = E |Qn | . x0 Ideally we would like to separate the two terms above to use induction, but since the terms are not necessarily independent, this is not directly possible. B[n − 1] is the new term in Qn , and we condition on B[0] to B[n − 2] to focus on this. We have that "  " # η X[n − 1] X[n − 1] E E |Qn |η B[0], . . . , B[n − 2] = E x0 x0 η  E |Qn |η # B[0], . . . , B[n − 2] . The equality in (35) follows because X[n−1] is a constant when conditioned on B[0], . . . , B[n − 2]. x0 η   Let Q := E |Qn |η B[0], . . . , B[n − 2] and R := X[n−1] . If X[n − 1] = 0, then Q = 0 and R = 0. x0 (35) 25 If X[n − 1] = x[n − 1] 6= 0, then by Lemma 5.3 we have that  min E U [n−1] X[n] x[n − 1] η = min E [|1 + B[n − 1]d|η ] . d Let Q := mind E [|1 + B[n − 1]d|η ] . Hence Q ≥ Q if X[n − 1] 6= 0, i.e., whenever Q and R are non-zero 0 0 themselves. Hence, RQ ≥ RQ0 whenever R 6= 0. Thus (35) is lower-bounded by #  # "  " X[n − 1] η X[n − 1] η η η min E [|1 + B[n − 1]d| ] = min E [|1 + B[n − 1]d| ] E . E d d x0 x0 (36) From (36), induction and Lemma 5.3 give the desired converse. Once again we see that there is no loss of optimality in restricting to linear memoryless stationary strategies for the purposes of calculating the η -th moment control capacity of the system S(pB ). 2 . Then Corollary 5.4. Consider the system S(pB ) from (2), with B[n] ∼ pB i.i.d. with mean µB and variance σB   µ2B 1 C2 (S(pB )) = log 1 + 2 . 2 σB (37) Proof: We know that C2 (S(pB )) = max − d∈R   1 log E |1 + B · d|2 2 B We can compute the optimum d = − µ2µ+σ 2 by taking derivatives. B B Substituting d back into the equation gives the desired result. This recovers the second-moment result that was known from [10]. Remark 5.1. This optimality of linear strategies for the second moment case was seen in the classical uncertainty threshold principle, but we can now say they are optimal from a control capacity perspective for all moments. Remark 5.2. The similarity of this expression to the 1 2 log(1 + SN R) formula for communication capacity in the AWGN case is notable. Previous work by Elia [23] as well as Martins and co-authors [29], [39] noticed similar patterns in related systems. Our goal here is to develop a unifying theory for these observations. The last theorem of this section shows how the η -th moment control capacity is really the broadest sense of capacity. As η → 0 this tends to the Shannon notion of capacity and as η → ∞ this tends to the zero error notion of capacity. Theorem 5.5. Consider the system S in (2). If the B[k] are i.i.d continuous random variables with no atoms, except   ξ possibly at B = 0, with a bounded density pB such that there exist γ, ξ > 1 so that pB (b) ≤ γ min 1, |b| , and have 26 finite first and second moments E[|B|] and E[|B|2 ], then if limη→0 Cη (S(pB )) exists and is finite, limη→0 Cη (S) = Csh (S(pB )) . If limη→0 Cη (S) = ∞, then Csh (S) = ∞ as well. Similarly, if B[k] are i.i.d. with essential support on [b1 , b2 ] and Cze (S(pB )) > 0, then limη→∞ Cη (S(pB )) = Cze (S(pB )). If limη→∞ Cη (S(pB )) = 0, then Cze (S(pB )) = 0 as well. Proof: The case limη→0 Cη (S) = ∞ follows immediately from the operational meaning of the control capacities. Since the Shannon sense is weaker than any η -th moment sense of stability, the Shannon control capacity will at least be limη→0 Cη (S). Similarly, the case limη→∞ Cη (S) = 0, also follows since the zero-error sense is operationally stronger than any η -th moment sense of stability. For η → ∞ we see that the inner expectation in − log p η E [|1 + Bd|η ] will be dominated by the maximum possible values that |1 + Bd| can take. This means that lim gη (u) = − lim log η→∞ r η→∞ η max |1 + bd|η b∈[b1 ,b2 ] = − log max |1 + bd|, b∈[b1 ,b2 ] which agrees with the optimization characterization (26) of the zero-error control capacity, proving the result. The nontrivial case is η → 0 when the limits are finite. For convenience of differentiating, in this section we will use nats (base e) instead of bits (base 2) to measure control information. Let Zd := ln |1 + B · d| be a family of random variables parametrized by the scalar d. The dependence on the random variable B is suppressed for notational convenience.   Consider Zd ’s log-moment-generating function F (d, s) = ln E eZd s = ln E [|1 + Bd|s ]. By the standard properties of log-moment-generating functions, this is a convex function of s. Since the log-moment-generating function is also the cumulant generating function, the first two terms of the Taylor expansion around s = 0 are given by the first two cumulants of Zd , the mean and the variance. Thus F (d, s) = sE[Zd ] + Now, consider the expression G(d, s) = −F (d,s) . s s2 Var[Zd ] + · · · 2 (38) From (38), we know s G(d, s) = −E[Zd ] − Var[Zd ] + · · · . 2 Computing the derivative of G(d, s) we have that: ∂ (ln E [|1 + Bd|s ])E [|1 + Bd|s ] − sE [|1 + Bd|s ln |1 + Bd|] G(d, s) = ∂s s2 E [|1 + Bd|s ] (39) 27 We note that f (x) = x ln(x) is convex, and hence Jensen’s inequality implies that f (E[x]) ≤ E [f (x)] . Choosing x = |1 + Bd| gives us that the numerator in (39) must be ≤ 0, and hence ∂ ∂s G(d, s) ≤ 0, which implies that G(d, s) must be a decreasing function of s. Now, from (33) we know that the control capacity Cη (S) = G(d∗η , η) where d∗η := arg maxd G(d, η). Furthermore, looking at the Shannon control capacity expression in (6), we can define J(d) := −E [Zd ] = G(d, 0). Let arg maxd J(d) := d∗sh , then we have J(d∗sh ) = Csh (S). Finally, since G(d, s) is a decreasing function of s, J(d) is an upper bound on G(d, s) for all s ≥ 0. We note now that lim Cη (S) = lim sup G(d, η). η→0 η→0 d (40) Since, supd limη→0 G(d, η) = supd J(d) = Csh (S), we are done if we can show that the limit and sup can be interchanged in (40). To show this, we need to establish that G(d, η) is uniformly continuous in η . However, this is not clear when d is unbounded. Hence, we will show that the optimizing d∗η and d∗sh are attained in a bounded interval around 0, and establish uniform continuity in that interval. We show that there is a bound dm (B) that depends on the distribution of B for which we know that −dm (B) ≤ d∗ (η) ≤ +dm (B) and also −dm (B) ≤ d∗sh ≤ +dm (B). Note that G(0, η) = J(0) = 0. Hence it suffices to show that the functions G(d, η) and J(d) are both bounded above by zero outside this interval for d. Since J(d) > G(d, η) for all η > 0, we focus on J(d) and show that it is bounded above by 0 outside an interval [−dm (B), +dm (B)]. The function Lk (x), parametrized by k > 1 serves as the requisite lower bound on the natural logarithm function ln for this purpose. For x > 0: Lk (x) :=     ln(x) if x < 1     0       ln k if 1 ≤ x < k . (41) if x ≥ k Because ln is an increasing function, Lk (x) as defined in (41) is valid lower-bound to ln(x) by inspection. Applying this lower bound by expanding the definitions of J(d) and Zd , we know that J(d) = −E [ln |1 + Bd|] ≤ E [−Lk (|1 + Bd|)] . We split the random variable −Lk (|1 + Bd|) into its positive component J + ≥ 0 and its negative component J − < 0 so that J + + J − = −Lk (|1 + Bd|) and J + J − = 0 ensuring that both cannot simultaneously be nonzero. 28 First we upper bound the expectation Z + E[J ] = ∞ P(J + > t) dt. 0 As in Lemma 3.7 let Zd = ln |1 + Bd|. Since Lk (·) = ln(·) in the interval (0, 1), we know that J + = −Zd− from Lemma 3.7. Applying the lemma, we know that for all t > 0, P(J + > t) = P(Zd < −t) ≤ KB e−t . Integrating this gives us that for all d: E[J + ] ≤ KB . (42) Now we must bound E[J − ]. From (41) we have that Lk (|1 + Bd|) is an indicator random variable that equals − ln k whenever |1 + Bd| ≥ ek . Consequently we know that   E[J − ] ≤ − (ln k) P |1 + Bd| ≥ ek .  We know by an argument parallel to the one for Lemma 3.7 that since γ bounds the density, P |1 + Bd| ≤ ek ≤  k and so P |1 + Bd| ≥ ek ≥ 1 − 2γ |d| e . Hence we have that 2γ k |d| e  2γ k E[J ] ≤ − (ln k) 1 − e . |d| −  Choose parameter k = e2KB so − ln k = −2KB . Then, let dm = 4γek be our bound on |d| so that E[J − ] ≤ −KB . Combining this with (42) tells us that for all |d| > dm , the function J(d) is upper-bounded by zero. Since J(0) = 0, we focus our attention on the interval [−dm , +dm ]. Now it remains to show show uniform continuity of G(d, s) within the interval [−dm , +dm ] for s in the neighborhood of s = 0. For this, we notice that G(d, s) is monotone in s, and both G(d, s) and J(d) are continuous in d. Hence, by Dini’s theorem, the convergence must be uniform, which completes the proof. 6. C OMPUTING C ONTROL C APACITY Fig. 2 plots the zero-error, Shannon and second-moment control capacities for an actuation channel with a B (the multiplicative noise) having a Gaussian distribution, a Bernoulli-(p) distribution (erasure channel) and a Uniform distribution. These distributions are normalized so that they all have the same ratio of the mean to the standard deviation. The x-axis is the log of this ratio, which is all that matters for the second-moment control capacity as seen in Corollary 5.4. Consequently, the second moment control capacities for all three distributions line up 29 Infinity   5 Gaussian   “Shannon”   4 Control Capacity (bits) 3 Uniform   “Shannon”   2 Erasure   “Shannon”   Gaussian,  Unif.,   Erasure   Mean-­‐squared   Zero-­‐error   Uniform   1 0 -1 -3 Fig. 2. -2 -1 0 log2(mean/std) 1 2 3 Zero-­‐error   Erasure,   Gaussian   Examples of control capacity as we vary different distributions for B parametrized by the ratio of mean to standard deviation. exactly. We see that the Shannon sense control capacity for both the Gaussian and the Uniform are larger than the second-moment capacity as expected. The Shannon capacity for the Bernoulli actuation channel is infinity since it has an atom at 1, while the zero-error capacity is zero because it has an atom at 0. The zero-error capacity for the Gaussian channel is zero because it is unbounded. The Uniform distribution follows the zero-error capacity line for bounded distributions, and has slope 1. Notice that as the ratio of the mean to the standard deviation goes to infinity, all of the lines approach slope 1. We conjecture that in this “high SNR” regime, this ratio is essentially what dictates the scaling of control capacity. This is predicted by the carry-free models discussed in the Appendix since the capacity in both the zero-error and Shannon senses depends only on the number of deterministic bits in the control channel gain gdet − gran . Fig. 3 allows us to explore the behavior of η -th moment capacities for the same three channels. The plot presents the η -th moment capacities for Gaussian, Erasure and Uniform control channels. We chose the three distributions such that their second-moment capacities are 2, and all three curves intersect there. As expected, from Thm. 5.5, as η → 0, the curves approach the Shannon capacities and as η → ∞ the curves asymptote at the zero-error control capacity. The results in this paper help us characterize this entire space, while previously only the (2, 2) point was really known. 7. A DDITIVE SYSTEM NOISE The development of control capacity in the previous sections ignored additive noise and focused on the multiplicative uncertainty in the actuation channel. The results in this section show that nothing was lost by this focus. 30 6 Gaussian Uniform Erasure Erasure   Control capacity (bits) 5 4 (2,2)   Uniform   3 Gaussian   2 1 0 0 5 10 15 20 Moment 25 30 35 40 Fig. 3. The relationship between the different moment-senses of control capacity. For the Uniform, the zero-error control capacity is 1.2075 which is the asymptote as η → ∞. As η → 0 the η-th moment capacity converges to the Shannon sense. Here the Shannon control capacity for the Uniform is 2.7635 and for the Gaussian is 2.9586, which are the two small points seen on the extreme left (i.e. green and purple on the y-axis). Consider the system Sea , with additive observation noise V [n] and additive system disturbance W [n]. e + 1] = a(X[n] e + B[n]U e [n]) + W [n], X[n (43) e + V [n]. Ye [n] = X[n] The multiplicative noise B[n] in (43) is distributed according to pB as in system Sa in (3), with finite η -th moment. V [n] and W [n] are independent random variables at each time n, with finite η -th moments. Let Mη < ∞ be such that E [|V [n]|η ] ≤ Mη , E [|W [n]|η ] ≤ Mη , E [|B[n]|η ] ≤ Mη < ∞. h i e to be a random variable such that E |X[0]| e η ≤ Mη < ∞. Further, in this section we allow X[0] Theorem 7.1 will show that this system is indeed η -th moment stabilizable if the η -control capacity is large enough — the same condition that tells us that the system Sa in (3) is η -th moment stabilizable. Theorem 7.1. Suppose that Sa in (3) is η -th moment stabilizable, and that the η -th moment control capacity of the actuation channel S in (2), Cη (S) > log |a|. Let U [n] = d · Y [n] be the linear memoryless stationary strategy that achieves this control capacity, and also η -th moment stabilizes the system Sa . Then, the control strategy e [n] = d · Ye [n] also stabilizes system Sea (43) in the η -th moment sense. U Proof: We know that when we apply the control strategy U [n] = d · Y [n] to system (3) we get: E [|X[n + 1]|η ] = E [|a(1 + d · B)|η ] E [|X[n]|η ] = E [|a(1 + d · B)|η ]n+1 E [|X[0]|η ] , (44) 31 where B ∼ pB (·). We will use (44) to prove the theorem. First, consider the case when η > 1. Let Qk := a(1 + dB[k]). Also, let E [|Qk |η ] = L, where L is not indexed by k since the Qk ’s are i.i.d.. Since the d achieves Cη > log |a|, we have that L < 1. e [n] = d · Ye [n]. Now, consider the evolution of the system (43), under the control strategy U e [n + 1] = (a(1 + dB[n])) X[n] e + adB[n]V [n] + W [n] X   e − 1] + adB[n − 1]V [n − 1] + W [n − 1] + adB[n]V [n] + W [n] = Qn Qn−1 X[n     n n n n n Y X Y X Y e = X[0] Qk + ad B[k]V [k]  Qj  + W [k]  Qj  . k=0 k=0 j=k+1 k=0 j=k+1 e + 1], Consider the η -th norm of X[n  n Y 1 η e e + 1]|η ] = E  X[0] E[|X[n ! Qk + ad k=0 n X  B[k]V [k]  k=0  n Y Qj  + j=k+1 n X  W [k]  k=0 n Y  1 η η Qj   . j=k+1 Minkowski’s inequality states that for ak , bk ∈ R, n X !1 n X η |ak + bk |η ≤ k=0 !1 n X η |ak |η + k=0 !1 η |bk |η . k=0 Applying this gives: " η 1 η e + 1]| ] ≤ E E[|X[n e X[0] ! #1 n Y η η Qk + ad k=0 =L ≤ n+1 η 1 ! L n−k η 1 Mηη + k=−1 < 1 1  E  B[k]V [k]  n X L k=0 n X n−k η  1 n Y η η Qj   + j=k+1 n X 1  E |B[k]V [k]|η η + L n X  E  W [k]  k=0 n−k η  n Y  1 η Qj   j=k+1 1  E |W [k]|η η k=0 L n−k η !  2 adMηη k=0 1 η 1 − Lη  k=0 E [|X[0]|η ] η + ad n X n X Mη  1 η  1 + adMη , where we use L < 1 in the last step above. Hence for all n, h i e + 1]|η < E |X[n  η 1 1 η Mη 1 + adMη < ∞. (1 − L1/η )η (45) Now we consider the case where η ≤ 1. From above, we know that     n n n n n Y Y X Y X e + 1] = X[0] e W [k]  Qj  . X[n Qk + ad B[k]V [k]  Qj  + k=0 k=0 j=k+1 k=0 j=k+1 η 32 Notice that for η ≤ 1, concavity tells us that we can upperbound the η -th power of a sum by the sum of the η -th powers of the individual terms: " e + 1]|η ] ≤ E E[|X[n e X[0] n Y ! # η Qk + ad k=0 ≤ Ln+1 E [|X[0]|η ] + ad n X   E  B[k]V [k]  k=0 n X Ln−k E [|B[k]V [k]|η ] + k=0 n Y   η Qj   + j=k+1 n X n−k L n X k=0   E  W [k]  n Y   η Qj   j=i+1 E [|W [k]|η ] k=0 1 Mη (1 + adMη ) < ∞. < 1−L Thus, in both cases the system Sea is η -th moment stabilizable using the same memoryless linear stationary strategy that stabilized Sa . Note the controls applied are not the same, because they are based on the observations Ye [·], but the control gain d is the same. Although this section has talked exclusively about η -moment stability, Theorem 5.5 tells us that we get essentially the same result for the Shannon sense of stability as well. This is because if Csh (S(pB )) > log |a|, we know since limη→0 Cη (S(pB )) = Csh that there must exist an η > 0 for which Cη > log |a| as well. The corresponding control law gives the desired result. To understand zero-error control capacity with additive noise, a proof that exactly parallels the proof above can be given. Instead of expectations, maximizations can be used along with assuming bounds on all the additive disturbances as well as the initial condition. 8. C ONTROL CAPACITY WITH SIDE INFORMATION This final section allows us to take advantage of the informational perspective on uncertainty in control systems developed in the earlier sections, and we can understand the impact of side information in systems. We provide a definition for the notion of control capacity with side information. Theorem 8.1 provides an operational meaning for the definition. Theorem 8.2 and 8.3 allow us to calculate the control capacity with side information in the i.i.d. case. We consider the same system S as in (2), however, consider that the controller has access to additional side information T [n] in addition to the observations Y [n] at time n. X[n + 1] = X[n] + B[n]U [n] Y [n] = X[n], The pair (B[k], T [k]) for 0 ≤ k ≤ n is drawn from a joint distribution pB,T (·, ·) at each time. The applied control signal U [n] can causally depend on Y [k], 0 ≤ k ≤ n as well as on the side information T [k], 0 ≤ k ≤ n. Now, we can naturally extend the definition in [1] to define control capacity with side information. 33 Definition 8.1. The Shannon control capacity of the system S with side information T is defined as Csh (S|T ) = lim inf max n→∞ U [0],··· ,U [n]   |X[0]| 1 E log , n |X[n]| (46) where each U [n] is a causal function of (Y [k], T [k]) for 0 ≤ k ≤ n. The control capacity with side information is the maximum uncertainty (in bits) that can be dissipated on average from the state using both the observation and the side information. Parallel to Thm 3.1 we can immediately characterize the logarithmic stabilizability of the system Sa when given access to the same side information. Theorem 8.1. Consider the system Sa as in (3) but with access to the additional side information T [n] at time n. Then, system Sa is logarithmically stabilizable with side information T [k] received by the controller at time k if Csh (S|T ) > log |a|. Conversely, if the system Sa is logarithmically stabilizable with side information T [k] received by the controller at time k , then Csh (S|T ) ≥ log |a|. The proof of this theorem follows that of Thm. 3.1 and is omitted here. The next theorem shows that the value of the side information is computable and can be thought of as a conditional expectation when (B[n], T [n]) are distributed i.i.d. according to a joint distribution pB,T . Theorem 8.2. The Shannon control capacity of the system S(pB,T ) with side information T [n] at time n is given by   Csh (S|T ) = E max E − log 1 + B · d(T )  T d(T ) . (47) The maximization allows d to depend on the side-information T . The proof of this theorem also follows the proof of Thm. 3.4 and is not provided. It is discussed in [2], [9]. An η -th moment control capacity with side information for the system S also makes sense. Definition 8.2. The η -th moment control capacity of the system S with side information T is defined as Cη (S|T ) = lim max n→∞ U [0],···U [n] 11 log E nη  X[0] X[n] η , (48) where each U [n] is a causal function of (Y [k], T [k]) for 0 ≤ k ≤ n. Theorem 8.3. Let (B[n], T [n]) be distributed i.i.d. according to a joint distribution pB,T . Then, the η -th moment control capacity of the system S(pB,T ) is given by   −1 Cη (S|T ) = log E min E 1 + B · d(T ) η d(T ) η  T . 34 The proof of this theorem follows the proof of the corresponding theorem without side information and is omitted. A. Control capacity with side information: an example 8 SNR = 1/100 (Shannon) SNR = 1 (Shannon) SNR = 100 (Shannon) SNR = 1/100 (2nd-mom) SNR = 1 (2nd-mom) SNR = 100 (2nd-mom) 7 Control capacity (bits) 6 5 4 3 2 1 0 0 0.5 1 1.5 2 2.5 3 3.5 4 Bits of side information Fig. 4. This plot shows the increase in control capacity with side information. The actuation channels considered have a uniform distribution with different mean/standard deviation ratios (SNR) as in the legend. As an example, we plot the change in Shannon and second-moment control capacities with zero to four bits of side information for a set of actuation channels in Fig. 4. As in earlier figures, we focus on the “SNR” of the actuation channel, i.e. µ2B 2 , σB as we know this is the critical parameter to compute second-moment control capacity from Corollary 5.4. We plot the control capacities for actuation channels with base “SNR” mean to standard deviation ratios of 1 10 , 1 1 100 , 1 and 100, and thus and 10. We consider a uniform distribution on the unreliability in the actuation channel. B ∼ Uniform [b1 , b2 ]. The controller is provided one bit of side information in the form of knowledge of the half-interval into which the    2 2 realization of B falls. i.e. the controller is told whether the realization of B is in b1 , b1 +b or in b1 +b 2 2 , b2 . Two bits of side information resolves the interval into four equal-sized subintervals, and so on. The green curves represent the second-moment (solid) and Shannon (dashed) control capacity for the uniform distribution with SNR = 100. For both these curves, as the number of bits of side information increases the slope of both these curves approaches 1 but are a shade below 1 in the region close to 0. On the other hand, consider the pink lines that represent the second moment (solid) and Shannon (dashed) control capacities when the SNR = 1 100 . The slope of the dashed line (Shannon) between 0 and 1 is actually slightly greater than 1! In this case, half the time, the first bit of side information reveals perfectly the sign of the distribution and 35 can increase the control capacity by more than one bit. This can been seen in the carry-free models in the Appendix, where the value of a bit of side-information can be more than a bit! Of course, as the side information increases the capacity steadily increases and eventually, one bit of side information only increases the control capacity by one bit — we can see that the slope of the curve tends to 1. The slope of the second-moment control capacity (for SNR = 1/100) between 0 and 1 is still less than 1, but we see here that the value of the first bit of side information (that reveals the sign) is still more valuable than the second bit of side information. This curve also converges to slope 1 as the controller gets more side information. Finally, we come to the control capacities of the distributions with SNR = 1 with the yellow curves. (Note here that the values for both the Shannon and second-moment control capacities with one bit of side information (i.e. the points corresponding to x-coordinate 1) are slightly higher than the points for SNR = 1/100 even though it is not apparent in this figure). These curves shows a very intriguing phenomenon — the first bit of side information is actually worth less than a bit, and the first bit of side information is worth less than the second bit that is received. This is certainly something we plan to investigate further. 9. ACKNOWLEDGEMENTS The authors would like to thank the NSF for a GRF and CNS-0932410, CNS-1321155, and ECCS-1343398. Thanks also to Yuval Peres and Miklos Racz for helpful discussions. 36 A PPENDIX A B IT- LEVEL MODELS FOR UNCERTAINTY IN CONTROL This appendix describes bit-level models for unknown dynamical systems. These simple models motivated the definitions and theorems in the paper, and this appendix is included to share the insights from these models with the reader. The carry-free bit level models described here build on previous bit-level models developed in wireless network information theory, i.e. the deterministic models developed by Avestimehr, Diggavi and Tse (ADT models) [59], and lower-triangular or carry-free models developed by Niesen and Maddah-Ali [60]. We previously used these models [61] to understand the log log SN R result for communication over channels with unknown fading [42] and then to explore noncoherent relay networks. We call these models “carry-free” to indicate that the addition operation is defined without carry-overs from one bit level to the next. We will discuss this in more detail in below and in Figure 6. A. Bit-level models for rate-limited control First, we will describe how the data-rate theorems [11], [64], [65] can be understood using bit-level models. Consider the system: X[n + 1] = a · X[n] + U [n] + W [n], (49) where a is a fixed scalar, and the additive noise W [n] is drawn i.i.d. Unif[0, 1].The controller must generate U [n] based on observations over an R-bit channel. The data-rate theorems show that a rate of R > log |a| is necessary and sufficient to stabilize the system. It turns out we can understand this result pictorially through bit-level models. Let us represent the system state X[n] by its binary expansion as: xm [n]xm−1 [n] · · · x1 [n]x0 [n].x−1 [n]x−2 [n] · · · , where xi [n] ∈ {0, 1}. The index m ∈ Z represents the highest non-zero bit level of the state. To recover the value of the state we can consider the polynomial-like formal series: x[n](z) = xm [n]z m + xm−1 [n]z m−1 + · · · + x0 [n] + x−1 z −1 · · · . Substituting z = 2 will give back X[n]. Let us also consider also the system gain a > 0 as expressed in binary. For simplicity, let us assume that a ≥ 1 37 is a power of two, and hence we can write it as a monomial of degree ga = log a: a[n](z) = a(z) = 1 · z ga . These bit-level models are particularly conducive to modeling explicit rate constraints, since a rate limit simply caps the number of levels that are visible to the estimator or controller at any given time. We can construct a bit-level model of the system in (49) as below: x[n + 1](z) = a(z)x[n](z) + u[n](z) + w[n](z), (50) where u[n](z) is the control signal in binary that is based on observations received over an R bit channel at each time. w[n](z) is an additive binary noise sequence. We restrict this to be below the decimal level and so the highest power in the formal series representation is −1. w[n](z) = w−1 [n]z −1 + x−2 [n]z −2 + · · · , Each w−i is drawn i.i.d. Bernoulli- 1 2  . Time  n+2   Time  n+1   Time  n   x2 [n] = 1 x1 [n] x0 [n] x Fig. 5. 1 [n] . . . . . . . . . The open-loop system state can be thought of as a stack of bits marching upward with the gain a. Figure 5 represents how the system state in (50) is growing. Consider the bits that represent the state arranged as a vertical stack, with the most significant bit at the top. Multiplication by the gain a(z) causes the stack to increase in height by ga levels each time. As the bit-levels rise, the bits that are below the decimal point at the noise level rise above the noise level and bring added uncertainty to the system. To avoid this stack growing unboundedly, the controller must cancel at least ga bits at each time step, and to do this it must know their value. Hence, the minimum communication rate required for estimation is log a = ga . 38 B. Carry-free models Carry-free models generalize the idea of bit-level multiplication in the previous subsection to the case where the gain might not be a power-of-two. Our primary interest is in modeling the impact of randomness in system parameters, and thus we want to capture multiplication by random binary bit strings. Before introducing randomness into the picture, we first generalize to the case when a(z) is not a power of two. First, we define carry-free addition and multiplication between two binary strings in a manner that parallels those operations for formal power series. Definition A.1. Let a(z) = am ...a1 a0 a−1 ... and b(z) = bn ...b1 b0 b−1 ... be two binary strings. Then, their carry-free sum is defined as cm ...c1 c0 c−1 ... := an ...a1 a0 a−1 ... ⊕c bn ...b1 b0 b−1 ... where ci = ai + bi (mod 2). The addition operation involves no carryovers unlike in real addition. Bit interactions at one level do not affect higher level bits. We derive the name “carry-free” from this property. Definition A.2. Let a(z) = am ...a1 a0 a−1 ... and b(z) = bn ...b1 b0 b−1 ... be two binary strings. Then, their carry-free P multiplication is defined as c2m ...c1 c0 c−1 ... := am ...a1 a0 a−1 ... ⊗c bm ...b1 b0 b−1 ..., where ci = ak bi−k (mod 2). k Thus, carry-free multiplication of the bit-levels is like convolution of the signals represented by the bit levels in time, where the bit-level corresponds to the time index (Figure 6) [60], [61]. We note that it is commutative and associative. Bit multiplication Convolution in time 1101 11 1101 1101X 10111 …. 1 1 Fig. 6. 1 0 1 1 1 time Carry-free multiplication as “convolution” in time of the signal represented by the bit-levels. Let a(z) be a(z) = 1 · z ga + aga −1 z ga −1 + · · · , so a in (49) is not restricted to being a power of two. Now, we can model the same bit-level state evolution as in (50), but using carry-free multiplication and addition. Figure 7 shows a bubble-picture for the rate-limited bit-level system. This figure captures the effect of growth similar to Figure 5 for one time-step, except with carry-free multiplication. C. Carry-free actuation channels We build on these ideas to model the system in (3), with a random actuation gain B[n]. We will use these models to understand the zero-error sense of stability as well the Shannon notion of stability (stability in expectation). For this, we introduce the notion of carry-free multiplication by a random gain to capture the i.i.d. nature of the B[n]’s. 39 + x3 [n + 1] + x2 [n + 1] 1 + x1 [n + 1] 2 + 3 x0 [n + 1] + x a1 x2 [n] = 1 a0 a x1 [n] a x0 [n] x Fig. 7. a 1 [n] 1 [n + 1] Carry-free for models with highest bit at level 3, and power ga = 1. We consider the binary expansion for a random actuation gain B[n]. gb is the highest non-zero bit level. The high-order bits are deterministic, and we define gdet as the highest deterministic level. There are a total of gdet −gran  deterministic bits, with gran are the first random (Bernoulli− 12 ) bit level. Thus, b[n](z) = bgb [n] · z gb + bgb −1 [n] · z gb −1 + · · · = 1 · z gdet + 0 · z gdet −1 + 0 · z gdet −2 + · · · + bgran [n] · z gran + bgran −1 [n] · z gran −1 + · · · , (51) and we have  gran = max i|bi ∼ Bernoulli 1 2  , gb ≥ i ≥ −∞ . Since the B[n] are identically distributed, gdet and gran do not vary with n, but the realizations of random bits are drawn identically at each time. bi [n] ∼ Bernoulli( 21 ) for i ≤ gran . The realizations of these bits are unknown to the controller. Also we can write gdet =    max{i | bi = 1} if gran < gb   gran , otherwise. Without loss of generality, we fix all the bits from bgdet −1 to bgran +1 to be 0, and these bits are known to the controller. Our arguments extend to any other set of deterministic bits, with a leading 1. This is illustrated in Figure 8. Now we introduce the carry-free system model for system (3). We restrict attention to the case where the gain on the state is a known constant a(z) = 1 · z ga for all n. Consider the system SaCF : x[n + 1](z) = a(z) · x[n](z) + b[n](z) · u[n](z) + w[n](z) (52) Let dn be the degree of x[n](z). Our aim is to understand the stability of this system, which is captured by the 40 + a1 a0 x2 [n] = 1 a x1 [n] x0 [n] x 1 [n] ? + a 2 a + 3 + ? ? + ? ? + ? + x[n] + ? ? 1 + X + b1 [n] = 1 u[n] b[n]u[n] x[n + 1] Fig. 8. This figure shows a carry-free model for system (52). The solid orange lines represent deterministic bits and the dotted green lines represent random bits. The system gain has ga = 1, gdet = 1 and gran = 0. So b1 [n] = 1 is a deterministic value that is the same at each time step. gran [n] = 1, so bits b0 [n], b−1 [n], b−2 [n], · · · are all random Bernoulli- 21 random bits. As a result the controller can only influence the top bit of the control going in. behavior of the degree dn . Pictorially, the illustration in Figure 8 shows us that dn will be bounded with probability 1 only when gdet −gran ≥ ga for ga > 0. (The system is self-stabilizing when ga ≤ 0.) In all of the figures, the solid orange lines represent deterministic bits and the dotted green lines represent random bits. Since at every time step the magnitude of the system state increases by exactly ga bits, as long as the controller can dissipate ga bits, it can stabilize the system. Remark A.1. Unlike the case with deterministic system gains, ADT models would not suffice to understand systems with random control gains, since they only capture bit shifts. The loss of information due to multiplicative scrambling by the random gains is essential to understand the bottleneck due to the uncertainty. We now formalize some notions of stability for carry-free models and define control capacity. D. Zero-error stability For the zero-error stability of a carry-free system, we require that the degree of the state be bounded with probability 1. Definition A.3. The system (53) is stablizable in the zero-error sense if there exists a control strategy u[·](z) such that there exists M < ∞ and N > 0 such that for all n ≥ N , we know P(dn < M ) = 1. Now let us consider the system S CF below, with a = 1 and ga = 0. This parallels the system in (2), and is illustrated in Figure 9. x[n + 1](z) = x[n](z) + b[n](z) · u[n](z) + w[n](z) (53) The maximum gain ga that can be tolerated for the system (52) is related to the maximum rate at which uncertainty can be dissipated in (52). Thus, we define as the zero-error control capacity, Cze , as the maximum possible decay 41 in the degree of the system per unit time. Definition A.4. The zero-error control capacity of the system S CF from (53) is defined as the largest constant  Cze S CF for which there exists a control strategy u[0](z), . . . , u[n](z) such that  P    1 CF d0 − dn ≥ Cze S = 1. n for all time steps n. x2 [n] = 1 + + b1 [n] = 1 ? x1 [n] + x0 [n] + x 1 [n] + ? ? + ? ? + ? + u[n] x[n] b[n]u[n] Fig. 9. This figure depicts the system in (53)), with random control gain b[n] but system growth a fixed at 1, so the system is not growing. The orange solid lines represent deterministic bits and the green dotted lines represent random bits in the control gain. Theorem A.1. Consider the system SaCF from (52) and the affiliated system S CF from (53), such that the actuation gains b[n](z) are drawn identically in both cases. Then, SaCF is stabilizable in a zero-error sense if and only if Cze (S CF ) ≥ ga . Proof: This theorem follows naturally from the definition. We can calculate the zero-error control capacity this using the following theorem that is intuitively illustrated in Figure 9. Theorem A.2. The zero-error control capacity for the system S CF in (53) is equal to Cze (S) = gdet − gran . The heart of argument lies in the illustrations in Figure 9. Once the pictorial representation is clear, the formalism of the proof is just counting. Before we prove this theorem, here is a key lemma that bounds the decay that can happen in one step, regardless of the system state x[n]. Lemma A.3. For the system defined by eq. (53), for any state x[n], the largest constant Cze,n such that P (dn − dn+1 ≥ Cze,n ) = 1, 42 is Cze,n = gdet − gran . Proof: Achievability: The achievability follows naturally by solving the appropriate set of linear equations to calculate controls to cancel the bits of the state. Converse: To show the converse, we must show that for any x[n] and for u[n] that depends on x[n] and its history we cannot beat gdet − gran , P (dn − dn+1 < gdet − gran + 1) > 0. Consider any x[n] = z dn + xdn −1 z dn −1 + . . ., with degree dn . Let u[n] = umn n[]z mn + umn −1 [n]z mn −1 + . . . be any control action. The leading coefficients for both the state and the control must be 1, else we could just reduce the degree, so we have that umn [n] = 1. x[n + 1] =(xdn [n]z dn + xdn −1 [n]z dn −1 + . . .)+ (z gdet + bgran [n]z gran + bgran −1 [n] · z gran −1 + . . .) · (umn [n]z mn + umn −1 [n]z mn −1 + . . .) We recall that gdet − gran ≥ 0 by definition of gdet and gran . First we consider the case where gdet + mn > dn . Then, the degree at time n + 1 is given as dn+1 = gdet + mn . So dn − dn+1 = dn − (gdet + mn ) ≤ 0 < gdet − gran + 1. Next, assume gdet + mn < dn . Then, we must have that the degree of the state does not change after the control is applied, i.e. dn+1 = dn . So we have that dn − dn+1 = 0 < gdet − gran + 1. Finally, we consider the case when gdet + mn = dn . To calculate dn+1 , we first consider the coefficient of z dn −gran +gdet in x[n + 1] as below: xdn −gran +gdet [n] + bgran [n] · umn [n] + bgdet [n] · ugran +dn −2gdet [n] Recall that that gdet + mn = dn , and umn [n] = 1, and all coefficients of b between z gdet and z gran are zero, which gives the second and third terms above. 43 Now consider the term below. Recall bgdet [n] = 1. xdn −gran +gdet [n] + bgran [n] · 1 + 1 · ugran +dn −2gdet [n] =xdn −gran +gdet [n] + bgran [n] + ugran +dn −2gdet [n] (54) Since here bgran [n] is a Bernoulli−( 21 ), this term will be zero exactly with probability 12 . Hence, with probability 21 , dn+1 ≥ dn −gran +gdet . Hence, with probability 21 , dn −dn+1 ≤ gran −gdet . Thus P (dn − dn+1 < 1 + gran − gdet ) ≥ 1 2, which gives the converse. Lemma A.3 is the key ingredient that gives Theorem A.2. This proof follows easily since the lemma decouples the controls at different time steps. The proofs of the real-valued notions of control capacity were inspired by this structure. The lemma frees us from considering time-varying or state-history dependent control strategies, which generally makes this style of converse difficult. Proof of Thm. A.2: The lemma above bounds the decrease in degree of the state at any given time n, regardless of the control u[n](z) or the state of the system x[n](z). We have that n−1 1 1X (d0 − dn ) = (di − di+1 ) n n i=0 Now, we know from Lemma A.3 that, P n−1 n−1 i=0 i=0 X 1X (di − di+1 ) > (gdet − gran ) n ! = 1. Hence, we must have n−1 Cze (S) = 1X (gdet − gran ) = gdet − gran , n i=0 which concludes the proof. E. Stability in expectation Zero-error control capacity considers stability of the carry-free system with probability 1. A weaker notion of stability is “stability in expectation.” This parallels the Shannon notion of capacity for real-valued systems. Since the definitions and theorems for this notion of stability are very similar to that of zero-error stability in the earlier section, we only state them here and omit details and proofs, which can be found in [9]. Definition A.5. The system (53) is stablizable in expectation if there exists a control strategy u[·](z) such that for some M < ∞ we have that that lim supn→∞ E [dn ] < M . 44 We can also define a related notion of control capacity. Definition A.6. The “Shannon” control capacity of the system S CF from (53), Csh (S), is defined as max lim u[0](z),··· ,u[n](z) n→∞ 1 E[d0 − dn ]. n We can connect the stability of system S CF to SaCF as in zero-error case through the following theorem. Theorem A.4. Consider the system SaCF from (52) and the affiliated system S CF from (53), such that the actuation channels, i.e. the b[n](z) are drawn identically in both cases. SaCF is stabilizable in expectation if and only if Csh (S) ≥ ga . Proof: The proof follows naturally from the definition. The last theorem in this section explicitly calculates the carry-free Shannon control capacity in terms of the parameters of the random gain in the carry-free model. Theorem A.5. The Shannon control capacity for the system S is given by  Csh S CF = gdet − gran + 1. This proof is similar to the proof of Theorem A.2. The extra bit of capacity is gained because the control only needs to cancel it “in expectation”. Consider the bit at level dn + gran − 1. The controller can only cancel this bit with probability 1 2 (see Figure 9. Thus, the bit at level dn + gran − i for gran > −i is set to zero by the controller with probability 2−i , and summing the geometric terms gives the result. F. Carry-free model with side information Carry-free models easily allow us to illustrate how bits of side-information impact the system. We can count the non-random bits in the output and “compute” the value of a piece of side-information. We illustrate this here with an example. In Figure 10, we consider a simple bit-level carry-free model that is the counterpart of system (1). Say  the control gain B[n] has one deterministic bit, so that gdet = 1, but all lower bits are random Bernoulli − 12 bits. Thus, the controller can only cancel 1 bit of the state each time with probability 1 and the system has zero-error control capacity of 1. If two bits (the most significant bit and the bit after that) of B[n] were deterministic, the zero-error control capacity would be 2. For instance, if the value of the bit at level 0, i.e. b0 , were also known, then we could tolerate a growth through a of two bits at a time. We can think of this as the value of the side information b0 for this problem. 45 Ber(.5) u[n] X + b1 [n] = 1 b1 [n] = 1 X X + b0 [n] = 0+ + ? + ? + ? + ? + ? + ? + ? b[n]u[n] x[n + 1] u[n] b[n]u[n] (a) x[n + 1] (b) Fig. 10. This system has the highest deterministic link at level gdet = 1 and the highest unknown link at gran = 0. Bits b−1 [n], b−2 [n], · · · are all random Bernoulli-( 12 ). As a result the controller can only influence the top bits of the control going in, and can only cancel one bit of the state. If one extra bit b0 were known to the controller, it could cancel a second bit of the state. G. A carry-free counterexample for the value of side information In the portfolio theory literature, it is known that the maximum increase in doubling rate due to side information Z for a set of stocks distributed as Q is upper bounded by I (Q; Z). In this case, a bit buys a bit. It is tempting to conjecture a similar result in the case of control systems, however this turns out not to be true. Ber(.5) b u[n] X + b1 [n] = 1 b1 [n] = 1 + ? 1 [n] = + ? + b0 [n] = 0+ b 1 1 [n] + =1 + ? + ? + ? + ? b[n]u[n] x[n + 1] u[n] (a) b[n]u[n] X X X x[n + 1] (b) Fig. 11. Consider the following gain for the controller in (a): b1 [n] = 1, b−1 [n] = 1 are deterministically known, but all other links are Bernoulli-( 21 ). Only a gain of log a = 1 can be tolerated in this case. Now, say side information regarding the value of b0 [n] is received as in (b). This suddenly buys the controller not just one, but two bits of growth. To see a counter example, consider the carry-free model in Figure 11. Here u[n] is the control action, and b[n]u[n] = z[n] is the control effect. In Figure 11(a) the uncertainty in b0 [n] does not allow the controller to utilize the knowledge that b−1 [n] = 1. However, one bit of information b0 [n] in Figure 11(b), lets the controller buy two bits of gain in the tolerable growth rate as explained in the caption. This carry-free model represents a real system where B[n] is drawn from a mixture of disjoint uniform dis- 46 tributions, as in Figure 12(a). The first most significant bit and the third most significant bit are known, but the second most significant bit is not known. The first bit tells us whether B[n] comes from group A-B or group C-D. The third bit only discriminates to the level that is shown in Figure 12(b), i.e. the controller only knows that B[n] belongs to one of the two orange boxes. So the variance of the distribution isn’t actually lowered by much due to the side information. The side information containing the second bit finally lowers the variance, as in Figure 12(c). Thus, the gain this one-bit of information provides is worth more than a bit. A B 0 C D A (a) 0 B C D (b) A B 0 C D (c) Fig. 12. (a) The distribution of B[n] for the carry-free model. (b) The first and the third bit together tell the controller that B[n] comes from one of the orange parts of the distribution. Since there are two orange sections that are far away, the effective variance of B[n] is not reduced. (c) Once the second bit is also known, the fact that the controller already knew the third bit becomes useful. H. A communication aside b1 [n] = 1 u2 Ber(.5) b + u2 + ? 1 [n] = 1 0 + u0 + u2 + u0 + u[n] z[n] Fig. 13. With two known bits on the gain, the decoder can decode two additional bits about the message u[n] from the received signal z[n]. However, these bits are decoded at specific positions. It is not possible to get information out of the received signal position z2 . If the problem was that of pure communication, we could still decode two bits of information about u[n] from b[n]u[n] = z[n]. See Figure 13. Let u2 and u0 be the information carrying bits, and set u1 = 0 to zero. Then z3 = u2 and z1 = u2 + u0 . With two equations and two unknowns, both u2 [n] and u0 [n] can be recovered at the decoder. In the control problem, this is not possible because of the contamination that is introduced by b0 at z2 . While communication systems can choose which bits contain relevant information, control systems do not have that flexibility. A bit at a predetermined position must be cancelled or moved by the control action. In the case of portfolio theory, it is possible to hedge across uncertainty in the system and get “partial-credit” for uncertain quantities. This is not possible in control systems since it is not possible to hedge a control signal in the same way one can hedge a bet. 47 A PPENDIX B Z ERO - ERROR CONTROL CAPACITY A PPENDIX Lemma B.1. min max 1 + B · d = d∈R B∈[b1 ,b2 ]     |b2 −b1 | if 0 6∈ [b1 , b2 ] |b2 +b1 | (55)   1 if 0 ∈ [b1 , b2 ]. Thus, if B is a random variable with essential infimum b1 and essential supremum b2 , we know that ∀d, ∀ > 0,  P  b2 − b1 −  < 1 if 0 6∈ [b1 , b2 ]. log 1 + B · d < log b1 + b2 (56) and  P log 1 + B · d < − < 1 if 0 ∈ [b1 , b2 ]. (57) Proof: First, we consider the case where 0 < b1 < b2 . The case where b1 < b2 < 0 follows similarly. To −1 2 show that the bound in (55) is achievable, choose d∗ = − b1 +b . We claim this is the minimizing d. Then, the 2 maximum value of 1 + B · d∗ is attained when B is realized as B = b2 or B = b1 .  1 − b2 · b1 + b2 2 −1  = 1 − b1 · b1 + b2 2 −1 Now, suppose ∃d 6= d∗ ∈ R that such that ∀B ∈ [b1 , b2 ], |1 + B · d| < This implies for B = b1 that |1 + b1 · d| < b2 −b1 b1 +b2 .. b2 − b1 b2 − b1 = . b1 + b2 b1 + b2 This can be written as: b1 − b2 b2 − b1 < 1 + b1 · d < b1 + b2 b1 + b2 −2 ⇒d < . b1 + b2 Further, we also have for B = b2 that |1 + b2 · d| < b2 −b1 b1 +b2 . This gives b1 − b2 b2 − b1 < 1 + b2 · d < b1 + b2 b1 + b2 −2 ⇒d > , b1 + b2 = b2 − b1 b1 + b2 48 which gives us a contradiction. Hence, ∀d ∈ R, ∃B ∈ [b1 , b2 ], |1 + B · d| ≥ Given the minmax of |1 + B · d| is b2 −b1 b1 +b2 b2 − b1 . b1 + b2 , then for any bounded random variable B with essential supremum b2 and essential infimum b1 , we know by the definition of essential suprema and infima that:   b2 − b1 P log 1 + B · d < log −  < 1. b1 + b2 (58) Now, we consider the case where b1 ≤ 0 < b2 . Here, choose d∗ = 0 to show that the bound is achievable. Then |1 + Bd| = 1 for all B . Suppose there exists d 6= d∗ ∈ R such that ∀B ∈ [b1 , b2 ], |1 + B · d| < 1. This implies that for B = b1 : − 1 < 1 + b1 · d < 1 ⇒ −2 < b1 · d < 0 Thus, b1 cannot be equal to zero. If b1 < 0, then since b1 · d < 0, we must have d > 0. Now, we also know that |1 + b2 · d| < 1 ⇒ − 1 < 1 + b2 · d < 1 ⇒ − 2 < b2 · d < 0 b2 · d < 0 implies d < 0, which again gives us a contradiction. Hence, for all d ∈ R, there exists B ∈ {b1 , b2 } such that |1 + B · d| ≥ 1. Consequently, for any bounded random variable B with essential supremum b2 and essential infimum b1 we have that:   P log 1 + B[n] · d < − < 1. (59) Lemma 4.3. Suppose the system state at time n is x[n] ∈ R, x[n] 6= 0. For the system S(pB ) in Thm. 4.2, define the one-step zero-error control capacity as  C1,ze (x[n]) = sup C  max P − log U [n] |X[n+1]| |x[n]|  ≥C =1 .  Then, C1,ze (x[n]) does not depend on x[n], and is given by − log mind maxb∈[b1 ,b2 ] |1 + b · d| which simplifies to    log |b2 +b1 | if 0 6∈ [b1 , b2 ] |b2 −b1 | C1,ze (x[n]) =   0 if 0 ∈ [b1 , b2 ]. 49 Proof: Achievability: The case where X[n + 1] = 0 is trivial, so we focus on the case where |X[n + 1]| > 0. Further, we see that if 0 ∈ [b1 , b2 ], choosing U [n] = 0 gives the result.  Let 0 6∈ [b1 , b2 ]. We would like to show that P − log −1 2 x[n]. Then, U [n] = − b1 +b 2 X[n+1] x[n] ≥ log  b1 + b2 X[n + 1] = x[n] − B[n] 2   2B[n] . = x[n] 1 − b1 + b2 b1 +b2 b2 −b1  = 1. For any x[n] 6= 0, choose −1 x[n] Now, note that the following inequalities are equivalent. X[n + 1] b1 + b2 ≥ log x[n] b2 − b2 b2 − b1 X[n + 1] ≤ log ⇐⇒ log x[n] b1 + b2 2B[n] b2 − b1 ⇐⇒ 1 − ≤ . b1 + b2 b1 + b2    X[n+1] b1 +b2 Hence, the event E1 = − log x[n] ≥ log b2 −b1 , is identical to the event E2 = 1 − − log But we know from Lemma B.1 that the maximum of 1 − 2B[n] b1 +b2 is b2 −b1 b1 +b2 2B[n] b1 +b2 ≤ Converse: Here, we must show ∀x[n] 6= 0, ∀ > 0, for any U [n],   X[n + 1] b1 + b2 P − log > log +  < 1. x[n] b2 − b1 First, consider the case 0 < b1 < b2 or b1 < b2 < 0. Then,     b2 − b1 X[n + 1] |b2 + b1 | x[n] + B[n]U [n] > log +  = P log < log − P − log x[n] |b2 − b1 | x[n] b1 + b2 U [n] x[n] = d, for any strategy U [n]. Then the above display must equal:   b2 − b1 = P log 1 + B[n] · d < log − b1 + b2 < 1. (by Lemma B.1) Next if b1 ≤ 0 < b2 or b1 < 0 ≤ b2 then   . . Hence, the event E2 occurs with probability 1, which implies E1 occurs with probability 1, which proves achievability. Let b2 −b1 b1 +b2    X[n + 1] X[n] + B[n]U [n] P − log >  = P log < − x[n] X[n] 50 Let U [n] x[n] = d, for any strategy U [n]. Then the above display must equal:   = P log 1 + B[n] · d < − < 1, which is less than 1 by Lemma B.1. This concludes the proof. R EFERENCES [1] G. Ranade and A. Sahai, “Control capacity,” in International Symposium on Information Theory (ISIT). [2] ——, “Control with side information,” in Indian Control Conference. IEEE, 2015. IEEE, 2016. [3] C. Shannon, “A mathematical theory of communication,” Bell System Technical Journal, 1948. [4] K. Zhou and J. C. Doyle, Essentials of robust control. Prentice hall Upper Saddle River, NJ, 1998, vol. 104. [5] L. El Ghaoui, “State-feedback control of systems with multiplicative noise via linear matrix inequalities,” Systems & Control Letters, vol. 24, no. 3, pp. 223–228, 1995. [6] H. S. Witsenhausen, “Separation of estimation and control for discrete time systems,” Proceedings of the IEEE, vol. 59, no. 11, pp. 1557–1566, 1971. [7] S. Yuksel and T. Basar, “Stochastic networked control systems,” 2013. [8] S. Fang, J. Chen, and H. Ishii, Towards Integrating Control and Information Theories. Springer, 2016. [9] G. Ranade, “Active systems with uncertain parameters: an information-theoretic perspective,” Ph.D. dissertation, University of California, Berkeley, 2014. [10] M. Athans, R. Ku, and S. Gershwin, “The uncertainty threshold principle: Some fundamental limitations of optimal decision making under dynamic uncertainty,” IEEE Transactions on Automatic Control, vol. 22, no. 3, pp. 491–495, 1977. [11] W. S. Wong and R. W. Brockett, “Systems with finite communication bandwidth constraints I: State estimation problems,” IEEE Transactions on Automatic Control, vol. 42, no. 9, pp. 1294–1299, 1997. [12] S. Tatikonda and S. Mitter, “Control under communication constraints,” IEEE Transactions on Automatic Control, vol. 49, no. 7, pp. 1056–1068, 2004. [13] G. Nair and R. Evans, “Stabilizability of stochastic linear systems with finite feedback data rates,” SIAM Journal on Control and Optimization., vol. 43, no. 2, pp. 413–436, 2004. [14] G. N. Nair, F. Fagnani, S. Zampieri, and R. J. Evans, “Feedback control under data rate constraints: An overview,” Proceedings of the IEEE, vol. 95, no. 1, pp. 108–137, 2007. [15] P. Minero, M. Franceschetti, S. Dey, and G. N. Nair, “Data-rate theorem for stabilization over time-varying feedback channels,” IEEE Transactions on Automatic Control, vol. 54, no. 2, pp. 243–255, 2009. [16] V. Kostina, Y. Peres, M. Rácz, and G. Ranade, “Rate-limited control of systems with uncertain gain,” Allerton Conference on Communication, Control, and Computing, 2016. [17] A. Sahai and S. Mitter, “The necessity and sufficiency of anytime capacity for stabilization of a linear system over a noisy communication link part I: scalar systems,” IEEE Transactions on Information Theory, vol. 52, no. 8, pp. 3369–3395, 2006. [18] N. Elia, “When bode meets shannon: control-oriented feedback communication schemes,” IEEE Transactions on Automatic Control, vol. 49, no. 9, pp. 1477–1488, Sept 2004. [19] J. Schalkwijk and T. Kailath, “A coding scheme for additive noise channels with feedback–I: No bandwidth constraint,” IEEE Transactions on Information Theory, vol. 12, no. 2, pp. 172–182, Apr 1966. [20] J. Schalkwijk, “A coding scheme for additive noise channels with feedback–II: Band-limited signals,” IEEE Transactions on Information Theory, vol. 12, no. 2, pp. 183–189, Apr 1966. 51 [21] S. K. Mitter and N. J. Newton, “Information and entropy flow in the Kalman–Bucy filter,” Journal of Statistical Physics, vol. 118, no. 1-2, pp. 145–176, 2005. [22] N. Elia and J. N. Eisenbeis, “Limitations of linear remote control over packet drop networks,” in IEEE Conference on Decision and Control (CDC), vol. 5. IEEE, 2004, pp. 5152–5157. [23] N. Elia, “Remote stabilization over fading channels,” Systems & Control Letters, vol. 54, no. 3, pp. 237–249, 2005. [24] N. Elia and J. N. Eisenbeis, “Limitations of linear control over packet drop networks,” IEEE Transactions on Automatic Control, vol. 56, no. 4, pp. 826–841, 2011. [25] L. Schenato, B. Sinopoli, M. Franceschetti, K. Poolla, and S. S. Sastry, “Foundations of control and estimation over lossy networks,” Proceedings of the IEEE, vol. 95, no. 1, pp. 163–187, 2007. [26] O. C. Imer, S. Yüksel, and T. Başar, “Optimal control of LTI systems over unreliable communication links,” Automatica, vol. 42, no. 9, pp. 1429–1439, 2006. [27] E. Garone, B. Sinopoli, A. Goldsmith, and A. Casavola, “LQG control for MIMO systems over multiple erasure channels with perfect acknowledgment,” IEEE Transactions on Automatic Control, vol. 57, no. 2, pp. 450–456, 2012. [28] A. Matveev and A. Savkin, “The problem of LQG optimal control via a limited capacity communication channel,” Systems & Control Letters, vol. 53, no. 1, 2004. [29] N. Martins, M. Dahleh, and N. Elia, “Feedback stabilization of uncertain systems in the presence of a direct link,” IEEE Transactions on Automatic Control, vol. 51, no. 3, pp. 438–447, 2006. [30] K. Okano and H. Ishii, “Minimum data rate for stabilization of linear systems with parametric uncertainties,” 2014. [31] M. Davis, “Anticipative LQG control,” IMA Journal of Mathematical Control and Information., vol. 6, no. 3, pp. 259–265, 1989. [32] R. T. Rockafellar and R. B. Wets, “Nonanticipativity and L1-martingales in stochastic optimization problems,” in Stochastic Systems: Modeling, Identification and Optimization, II. Springer, 1976, pp. 170–187. [33] S. Flåm, “Nonanticipativity in stochastic programming,” Journal of optimization theory and applications., vol. 46, no. 1, pp. 23–30, 1985. [34] M. A. H. Dempster, The expected value of perfect information in the optimal evolution of stochastic systems. Springer, 1981. [35] K. Back and S. R. Pliska, “The shadow price of information in continuous time decision problems,” Stochastics: An International Journal of Probability and Stochastic Processes., vol. 22, no. 2, pp. 151–186, 1987. [36] G. Tadmor and L. Mirkin, “H-infinity control and estimation with preview part II: fixed-size ARE solutions in discrete time,” IEEE Transactions on Automatic Control, vol. 50, no. 1, pp. 29–40, 2005. [37] R. H. Middleton, J. Chen, and J. S. Freudenberg, “Tracking sensitivity and achievable H-infinity performance in preview control,” Automatica., vol. 40, no. 8, pp. 1297–1306, 2004. [38] J. Chen, Z. Ren, S. Hara, and L. Qin, “Optimal tracking performance: preview control and exponential signals,” IEEE Transactions on Automatic Control, vol. 46, no. 10, pp. 1647–1653, 2001. [39] N. C. Martins, M. A. Dahleh, and J. C. Doyle, “Fundamental limitations of disturbance attenuation in the presence of side information,” IEEE Transactions on Automatic Control, vol. 52, no. 1, pp. 56–66, 2007. [40] A. Lapidoth and P. Narayan, “Reliable communication under channel uncertainty,” IEEE Transactions on Information Theory, vol. 44, no. 6, pp. 2148–2177, 1998. [41] A. Lapidoth and S. Shamai, “Fading channels: how perfect need perfect side information be?” IEEE Transactions on Information Theory, vol. 48, no. 5, pp. 1118–1134, 2002. [42] A. Lapidoth and S. Moser, “Capacity bounds via duality with applications to multiple-antenna systems on flat-fading channels,” IEEE Transactions on Information Theory, vol. 49, no. 10, pp. 2426–2467, 2003. [43] J. Wolfowitz, Coding theorems of information theory. Springer, 1961, no. 31. 52 [44] A. Goldsmith and P. Varaiya, “Capacity of fading channels with channel side information,” IEEE Transactions on Information Theory, vol. 43, no. 6, pp. 1986–1992, 1997. [45] G. Caire and S. Shamai, “On the capacity of some channels with channel state information,” IEEE Transactions on Information Theory, vol. 45, no. 6, pp. 2007–2019, 1999. [46] M. Medard, “The effect upon channel capacity in wireless communications of perfect and imperfect knowledge of the channel,” IEEE Transactions on Information Theory, vol. 46, no. 3, pp. 933–946, 2000. [47] A. J. Goldsmith and M. Medard, “Capacity of time-varying channels with causal channel side information,” IEEE Transactions on Information Theory, vol. 53, no. 3, pp. 881–899, 2007. [48] S. Kotagiri and J. Laneman, “Multiaccess channels with state known to some encoders and independent messages,” EURASIP Journal on Wireless Communications and Networking., vol. 2008, pp. 1–14, 2008. [49] M. A. Maddah-Ali and D. Tse, “Completely stale transmitter channel state information is still very useful,” IEEE Transactions on Information Theory, vol. 58, no. 7, pp. 4418–4431, 2012. [50] T. Cover and J. Thomas, Elements of information theory, 2nd ed. Wiley, 2006. [51] S. S. Pradhan, J. Chou, and K. Ramchandran, “Duality between source coding and channel coding and its extension to the side information case,” IEEE Transactions on Information Theory, vol. 49, no. 5, pp. 1181–1203, 2003. [52] E. Martinian and G. W. Wornell, “Source coding with fixed lag side information,” arXiv preprint cs/0410008, 2004. [53] E. Martinian, G. W. Wornell, and R. Zamir, “Source coding with distortion side information at the encoder,” in Data Compression Conference (DCC). IEEE, 2004, pp. 172–181. [54] ——, “Source coding with distortion side information,” IEEE Transactions on Information Theory, vol. 54, no. 10, pp. 4638–4665, 2008. [55] Y. Wu and S. Verdú, “MMSE dimension,” IEEE Transactions on Information Theory, vol. 57, no. 8, pp. 4857–4879, 2011. [56] J. Kelly Jr, “A new interpretation of information rate,” IEEE Transactions on Information Theory, vol. 2, no. 3, pp. 185–189, 1956. [57] H. H. Permuter, Y.-H. Kim, and T. Weissman, “On directed information and gambling,” in IEEE International Symposium on Information Theory (ISIT). IEEE, 2008, pp. 1403–1407. [58] ——, “Interpretations of directed information in portfolio theory, data compression, and hypothesis testing,” IEEE Transactions on Information Theory, vol. 57, no. 6, pp. 3248–3259, 2011. [59] A. Avestimehr, S. Diggavi, and D. Tse, “Wireless network information flow: A deterministic approach,” IEEE Transactions on Information Theory, vol. 57, no. 4, pp. 1872–1905, 2011. [60] U. Niesen and M. Maddah-Ali, “Interference alignment: From degrees-of-freedom to constant-gap capacity approximations,” in IEEE International Symposium on Information Theory (ISIT), 2012, pp. 2077–2081. [61] S. Park, G. Ranade, and A. Sahai, “Carry-free models and beyond,” in Information Theory, IEEE International Symposium on., 2012, pp. 1927–1931. [62] M. V. Burnashev, “Data transmission over a discrete channel with feedback: Random transmission time,” Problemy peredachi informatsii, vol. 12, no. 4, pp. 10–30, 1976. [63] P. Berlin, B. Nakiboglu, B. Rimoldi, and E. Telatar, “A simple converse of Burnashev’s reliability function,” IEEE Transactions on Information Theory, vol. 55, no. 7, pp. 3074–3080, 2009. [64] G. N. Nair and R. J. Evans, “Stabilization with data-rate-limited feedback: tightest attainable bounds,” Systems & Control Letters., vol. 41, no. 1, pp. 49–56, 2000. [65] S. Tatikonda, A. Sahai, and S. Mitter, “Control of LQG systems under communication constraints,” in Conference on Decision and Control, vol. 1. IEEE, 1998, pp. 1165–1170.
3cs.SY
Certifying 3-Edge-Connectivity Kurt Mehlhorn Adrian Neumann Jens M. Schmidt arXiv:1211.6553v3 [cs.DS] 7 Oct 2015 October 8, 2015 We present a certifying algorithm that tests graphs for 3-edge-connectivity; the algorithm works in linear time. If the input graph is not 3-edge-connected, the algorithm returns a 2-edge-cut. If it is 3-edge-connected, it returns a construction sequence that constructs the input graph from the graph with two vertices and three parallel edges using only operations that (obviously) preserve 3-edge-connectivity. Additionally, we show how to compute and certify the 3-edge-connected components and a cactus representation of the 2-cuts in linear time. For 3-vertexconnectivity, we show how to compute the 3-vertex-connected components of a 2-connected graph. 1. Introduction Advanced graph algorithms answer complex yes-no questions such as “Is this graph planar?” or “Is this graph k-vertex-connected?”. These algorithms are not only nontrivial to implement, it is also difficult to test their implementations extensively, as usually only small test sets are available. It is hence possible that bugs persist unrecognized for a long time. An example is the implementation of the linear time planarity test of Hopcroft and Tarjan [10] in LEDA [18]. A bug in the implementation was discovered only after two years of intensive use. Certifying algorithms [16] approach this problem by computing an additional certificate that proves the correctness of the answer. This may, e.g., be either a 2-coloring or an odd cycle for testing bipartiteness, or either a planar embedding or a Kuratowski subgraph for testing planarity. Certifying algorithms are designed such that checking the correctness of the certificate is substantially simpler than solving the original problem. Ideally, checking the correctness is so simple that the implementation of the checking routine allows for a formal verification [1, 22]. Our main result is a linear time certifying algorithm for 3-edge-connectivity based on a result of Mader [15]. He showed that every 3-edge-connected graph can be obtained from K23 , the graph consisting of two vertices and three parallel edges, by a sequence of three simple operations that each introduce one edge and, trivially, preserve 3-edge-connectivity. We show how to compute such a sequence in linear time for 3-edge-connected graphs. If the input graph is not 3-edge-connected, a 2-edge-cut is computed. The previous algorithms [8, 19, 28–30] for deciding 3-edge-connectivity are not certifying; they deliver a 2-edge-cut for graphs that are not 3-edge-connected but no certificate in the yes-case. 1 Our algorithm is path-based [7]. It uses the concept of a chain decomposition of a graph introduced in [25] and used for certifying 1- and 2-vertex and 2-edge-connectivity in [27] and for certifying 3-vertex connectivity in [26]. A chain decomposition is a special ear decomposition [14]. We use chain decompositions to certify 3-edge-connectivity in linear time. Thus, chain decompositions form a common framework for certifying k-vertex- and k-edge-connectivity for k ≤ 3 in linear time. We use many techniques from [26], but in a simpler form. Hence our paper may also be used as a gentle introduction to the 3-vertex-connectivity algorithm in [26]. We state Mader’s result in Section 3 and introduce chain decompositions in Section 4. In Section 5 we show that chain decompositions can be used as a basis for Mader’s construction. This immediately leads to an O((m + n) log(m + n)) certifying algorithm (Section 6). The linear time algorithm is then presented in Sections 7 and 8. In Section 9 we discuss the verification of Mader construction sequences. The mincuts in a graph can be represented succinctly by a cactus representation [5, 6, 20]; see Section 10. The 3-edge-connected components of a graph are the maximal subsets of the vertex set such that any two vertices in the subset are connected by three edge-disjoint paths. These paths are not necessarily contained in the subset. Our algorithm can be used to turn any algorithm for computing 3-edge-connected components into a certifying algorithm for computing 3-edge-connected components and the cactus representation of 2-cuts (Section 10). An extension of our algorithm computes the 3-edgeconnected components and the cactus representation directly (Section 11). A similar technique can be used to extend the 3-vertex-connectivity algorithm in [26] to an algorithm for computing 3-vertex-connected components. 2. Related Work Deciding 3-edge-connectivity is a well researched problem, with applications in diverse fields such as bioinformatics [4] and quantum chemistry [3]. Consequently, there are many different linear time solutions known [8, 19, 20, 28–30]. None of them is certifying. All but the first algorithm also compute the 3-edge-connected components. The cactus representation of a 2-edgeconnected, but not 3-edge-connected graph G, can be obtained from G by repeatedly contracting the 3-edge-connected components to single vertices [20]. The paper [16] is a recent survey on certifying algorithms. For a linear time certifying algorithm for 3-vertex-connectivity, see [26] (implemented in [21]). For general k, there is a randomized certifying algorithm for k-vertex connectivity in [13] with expected running time O(kn2.5 + nk3.5 ). There is a non-certifying algorithm [12] for deciding k-edge-connectivity in time O(m log3 n) with high probability. In [8], a linear time algorithm is described that transforms a graph G into a graph G0 such that G is 3-edge-connected if and only if G0 is 3-vertex-connected. Combined with this transformation, the certifying 3-vertex-connectivity algorithm from [26] certifies 3-edge-connectivity in linear time. However, that algorithm is much more complex than the algorithm given here. Moreover, we were unable to find an elegant method for transforming the certificate obtained for the 3-vertex-connectivity of G0 into a certificate for 3-edge-connectivity of G. 2 3. Preliminaries We consider finite undirected graphs G with n = |V (G)| vertices, m = |E(G)| edges, no self-loops, and minimum degree three, and use standard graph-theoretic terminology from [2], unless stated otherwise. We use u v to denote an edge with endpoints u and v. A set of edges that leaves a disconnected graph upon deletion is called edge cut. For k ≥ 1, let a graph G be k-edge-connected if n ≥ 2 and there is no edge cut X ⊆ E(G) with |X| < k. Let v →G w denote a path P between two vertices v and w in G and let s(P) = v and t(P) = w be the source and target vertex of P, respectively (as G is undirected, the direction of P is given by s(P) and t(P)). Every vertex in P \ {s(P),t(P)} is called an inner vertex of P and every vertex in P is said to lie on P. Let T be an undirected tree rooted at vertex r. For two vertices x and y in T , x is an ancestor of y and y is a descendant of x if x ∈ V (r →T y), where V (r →T y) denotes the vertex set of the path from r to y in T . If additionally x 6= y, x is a proper ancestor and y is a proper descendant. We write x ≤ y (x < y) if x is an ancestor (proper ancestor) of y. The parent p(v) of a vertex v is its immediate proper ancestor. The parent function is undefined for r. Let K2m be the graph on 2 vertices that contains exactly m parallel edges. Let subdividing an edge u v of a graph G be the operation that replaces u v with a path uzv, where z was not previously in G. All 3-edge-connected graphs can be constructed using a small set of operations starting from a K23 . Figure 1: Two ways of constructing the 3-edge-connected graph shown in the rightmost column. The upper row shows the construction according to Theorem 1. The lower row shows the construction according to Corollary 1. Branch (non-branch) vertices are depicted as filled (non-filled) circles. The black edges exist already, while dotted gray vertices and edges do not exist yet. Theorem 1 (Mader [15]) Every 3-edge-connected graph (and no other graph) can be constructed from a K23 using the following three operations: • Adding an edge (possibly parallel or a loop). • Subdividing an edge x y and connecting the new vertex to any existing vertex. • Subdividing two distinct edges w x, y z and connecting the two new vertices. A subdivision G0 of a graph G is a graph obtained by subdividing edges of G zero or more times. The branch vertices of a subdivision are the vertices with degree at least three (we call the other vertices non-branch-vertices) and the links of a subdivision are the maximal paths 3 whose inner vertices have degree two. If G has no vertex of degree two, the links of G0 are in one-to-one correspondence to the edges of G. Theorem 1 readily generalizes to subdivisions of 3-edge-connected graphs. Corollary 1 Every subdivision of a 3-edge-connected graph (and no other graph) can be constructed from a subdivision of a K23 using the following three operations: • Adding a path connecting two branch vertices. • Adding a path connecting a branch vertex and a non-branch vertex. • Adding a path connecting two non-branch vertices lying on distinct links. In all three cases, the inner vertices of the path added are new vertices. Each path that is added to a graph H in the process of Corollary 1 is called a Mader-path (with respect to H). Note that an ear is always a Mader-path unless both endpoints lie on the same link. Figure 1 shows two constructions of a 3-edge-connected graph, one according to Theorem 1 and one according to Corollary 1. In this paper, we show how to find the Mader construction sequence according to Corollary 1 for a 3-edge-connected graph in linear time. Such a construction is readily turned into one according to Theorem 1. 4. Chain Decompositions We use a very simple decomposition of graphs into cycles and paths. The decomposition was previously used for linear-time tests of 2-vertex- and 2-edge-connectivity [27] and 3-vertexconnectivity [26]. In this paper we show that it can also be used to find a Mader’s construction for a 3-edge-connected graph. We define the decomposition algorithmically; a similar procedure that serves for the computation of low-points can be found in [24]. Let G be a connected graph without self-loops and let T be a depth-first search tree of G. Let r be the root of T . We orient tree-edges towards the root and back-edges away from the root, i.e., v < u for an oriented tree-edge u v and x < y for an oriented back-edge x y. We decompose G into a set C = {C1 , . . . ,C|C | } of cycles and paths, called chains, by applying the following procedure for each vertex v in the order in which they were discovered during the DFS: First, we declare v visited (initially, no vertex is visited), if not already visited before. Then, for every back-edge v w, we traverse the path w →T r until a vertex x is encountered that was visited before; x is a descendant of v. The traversed subgraph v w ∪ (w →T x) forms a new chain C with s(C) = v and t(C) = x. All inner vertices of C are declared visited. Observe that s(C) and t(C) are already visited when the construction of the chain starts. Figure 2 illustrates these definitions. Since every back-edge defines one chain, there are precisely m − n + 1 chains. We number the chains in the order of their construction. We call C a chain decomposition. It can be computed in time O(n + m). For 2-edge-connected graphs the term decomposition is justified by Lemma 1. Lemma 1 ([27]) Let C be a chain decomposition of a graph G. Then G is 2-edge-connected if and only if G is connected and the chains in C partition E(G). 4 C1 C1 C3 nested 1 2 3 5 4 6 nested 7 C2 C5 C3 C5 interlacing C4 C4 C2 Figure 2: The left side of the figure shows a DFS tree with a chain decomposition; tree-edges are solid and back-edges are dashed. C1 is (1 6,6 5,5 4,4 3,3 2,2 1), C2 is (1 7,7 6), C3 is (2 4), C4 is (3 7), and C5 is (4 5). C3 and C5 are nested children of C1 and C4 is an interlacing child of C2 . Also, s(C4 ) s-belongs to C1 . Since the condition of Lemma 1 is easily checked during the chain decomposition, we assume from now on that G is 2-edge-connected. Then C partitions E(G) and the first chain C1 is a cycle containing r (since there is a back-edge incident to r). We say that r strongly belongs (s-belongs) to the first chain and any vertex v 6= r s-belongs to the chain containing the edge v p(v). We use s-belongs instead of belongs since a vertex can belong to many chains when chains are viewed as sets of vertices. We can now define a parent-tree on chains. The first chain C1 is the root. For any chain C 6= C1 , let the parent p(C) of C be the chain to which t(C) s-belongs. We write C ≤ D (C < D) for chains C and D if C is an ancestor (proper ancestor) of D in the parent-tree on chains. The following lemma summarizes important properties of chain decompositions. Lemma 2 Let {C1 , . . . ,Cm−n+1 } be a chain decomposition of a 2-edge-connected graph G and let r be the root of the DFS-tree. Then (1) For every chain Ci , s(Ci ) ≤ t(Ci ). (2) Every chain Ci , i ≥ 2, has a parent chain p(Ci ). We have s(p(Ci )) ≤ s(Ci ) and p(Ci ) = C j for some j < i. (3) For i ≥ 2: If t(Ci ) 6= r, t(p(Ci )) < t(Ci ). If t(Ci ) = r, t(p(Ci )) = t(Ci ). (4) If u ≤ v, u s-belongs to C, and v s-belongs to D then C ≤ D. (5) If u ≤ t(D) and u s-belongs to C, then C ≤ D. (6) For i ≥ 2: s(Ci ) s-belongs to a chain C j with j < i. Proof: (1) to (3) follow from the discussion preceding the Lemma and the construction of the chains. We turn to (4). Consider two vertices u and v with u ≤ v and let u s-belong to C and let v s-belong to D. Then C ≤ D, as the following simple induction on the length of the tree path from u to v shows. If u = v, C = D by the definition of s-belongs. So assume u is a proper ancestor of v. Since v s-belongs to D, by definition v 6= t(D) and v p(v) is contained in D. Let D0 be the chain to which p(v) s-belongs. By induction hypothesis, C ≤ D0 . Also, either D = D0 (if p(v) s-belongs to D) or D0 = p(D) (if p(v) = t(D)) and hence p(v) s-belongs to p(D). In either case C ≤ D. Claim (5) is an easy consequence of (4). If t(D) = r, C = C1 , and the claim follows. If t(D) 6= r, t(D) s-belongs to p(D). Thus, C ≤ p(D) by (4). 5 The final claim is certainly true for each Ci with s(Ci ) = r. So assume s(Ci ) > r and let y = p(s(Ci )). Since G is 2-edge-connected, there is a back-edge u v with u ≤ y and s(Ci ) ≤ v. It induces a chain Ck with k < i and hence s(Ci )y is contained in a chain C j with j ≤ k.  5. Chains as Mader-paths We show that, assuming that the input graph is 3-edge-connected, there are two chains that form a subdivision of a K23 , and that the other chains of the chain decomposition can be added one by one such that each chain is a Mader-path with respect to the union of the previously added chains. We will also show that chains can be added parent-first, i.e., when a chain is added, its parent was already added. In this way the current graph Gc consisting of the already added chains is always parent-closed. We will later show how to compute this ordering efficiently. We will first give an O((n + m) log(n + m)) algorithm and then a linear time algorithm. Using the chain decomposition, we can identify a K23 subdivision in the graph as follows. We may assume that the first two back-edges explored from r in the DFS have their other endpoint in the same subtree T 0 rooted at some child of r. The first chain C1 forms a cycle. The vertices in C1 \ r are then contained in T 0 . By assumption, the second chain is constructed by another back-edge that connects r with a vertex in T 0 . If there is no such back-edge, the tree edge connecting r and the root of T 0 and the back edge from r into T 0 form a 2-edge cut. Let x = t(C2 ). Then C1 ∪ C2 forms a K23 subdivision with branch vertices r and x. The next lemma derives properties of parent-closed unions of chains. Lemma 3 Let Gc be a parent-closed union of chains that contains C1 and C2 . Then (1) For any vertex v 6= r of Gc , the edge v p(v) is contained in Gc , i.e., the set of vertices of Gc is a parent-closed subset of the DFS-tree. (2) s(C) and t(C) are branch vertices of Gc for every chain C contained in Gc . (3) Let C be a chain that is not in Gc but a child of some chain in Gc . Then C is an ear with respect to Gc and the path t(C) →T s(C) is contained in Gc . C is a Mader-path (i.e., the endpoints of C are not inner vertices of the same link of Gc ) with respect to Gc if and only if there is a branch vertex on t(C) →T s(C). Proof: (1): Let v 6= r be any vertex of Gc . Let C be a chain in Gc containing the vertex v. If C also contains v p(v) we are done. Otherwise, v = t(C) or v = s(C). In the first case, v s-belongs to p(C), in the second case v s-belongs to some C0 ≤ C by Lemma 2.(4). Hence, by parent-closedness, v p(v) is an edge of Gc . (2): Let C be any chain in Gc . Since C1 and C2 form a K23 , r and x = t(C2 ) are branch vertices. If s(C) 6= r, the edge s(C) p(s(C)) is in Gc by (1), the back-edge s(C) v inducing C is in Gc , and the path v →T s(C) is in Gc by (1). Thus s(C) has degree at least three. If t(C) 6∈ {r, x}, let Cb be the chain to which t(C) s-belongs, i.e. Cb is the parent of C. As Gc is parent-closed Cb is contained b Further, it has degree in Gc . By the definition of s-belongs, t(C) has degree two on the chain C. one on the chain C. Since chains are edge-disjoint, it has degree at least three in Gc . (3) We first observe that t(C) and s(C) belong to Gc . For t(C), this holds since t(C) s-belongs to p(C) and p(C) is part of Gc by assumption. For s(C), this follows from s(C) ≤ t(C) and (1). 6 No inner vertex u of C belongs to Gc , because otherwise the edge u p(u) would belong to Gc by (1), which implies that C would belong to Gc , as Gc is a union of chains. Thus C is an ear with respect to Gc , i.e., it is disjoint from Gc except for its endpoints. Moreover, the path t(C) →T s(C) belongs to Gc by (1). If there is no branch vertex on t(C) →T s(C), the vertices t(C) and s(C) are inner vertices of the same link of Gc and hence C is not a Mader-path with respect to Gc . If there is a branch vertex on t(C) →T s(C), the vertices t(C) and s(C) are inner vertices of two distinct links of Gc and hence C is a Mader-path with respect to Gc .  We can now prove that chains can always be added in parent-first order. For a link L, each edge in L that is incident to an end vertex of L is called an extremal edge of L. Theorem 2 Let G be a graph and let Gc be a parent-closed union of chains such that no child of a chain C ∈ Gc is a Mader-path with respect to Gc and there is at least one such chain. Then the extremal edges of every link of length at least two in Gc are a 2-cut in G. Proof: Assume otherwise. Then there is a parent-closed union Gc of chains such that no child of a chain in Gc is a Mader-path with respect to Gc and there is at least one such chain outside of Gc , but for every link in Gc the extremal edges are not a cut in G. Consider any link L of Gc . Since the extremal edges of L do not form a 2-cut, there is a path in G − Gc connecting an inner vertex on L with a vertex that is either a branch vertex of Gc or a vertex on a link of Gc different from L. Let P be such a path of minimum length. By minimality, no inner vertex of P belongs to Gc . Note that P is a Mader-path with respect to Gc . We will show that at least one edge of P belongs to a chain C with p(C) ∈ Gc and that C can be added, contradicting our choice of Gc . Let a and b be the endpoints of P, and let z be the lowest common ancestor of all points in P. Since a DFS generates only tree- and back-edges, z lies on P. Since z ≤ a and the vertex set of Gc is a parent-closed subset of the DFS-tree, z belongs to Gc . Thus z cannot be an inner vertex of P and hence is equal to a or b. Assume w.l.o.g. that z = a. All vertices of P are descendants of a. We view P as oriented from a to b. Since b is a vertex of Gc , the path b →T a is part of Gc by Lemma 2 and hence no inner vertex of P lies on this path. Let a v be the first edge on P. The vertex v must be a descendant of b as otherwise the path v →P b would contain a cross-edge, i.e. an edge between different subtrees. Hence a v is a back-edge. Let D be the chain that starts with the edge a v. D does not belong to Gc , as no edge of P belongs to Gc . We claim that t(D) is a proper descendant of b or D is a Mader-path with respect to Gc . Since v is a descendant of b and t(D) is an ancestor of v, t(D) is either a proper descendant of b, equal to b, or a proper ancestor of b. We consider each case separately. If t(D) were a proper ancestor of b the edge b p(b) would belong to D and hence D would be part of Gc , contradicting our choice of P. If t(D) is equal to b then D is a Mader-path with respect to Gc . This leaves the case that t(D) is a proper descendant of b. Let y x be the last edge on the path t(D) →T b that is not in Gc and let D∗ be the chain containing y x. Then D∗ ≤ D by Lemma 2.(5) (applied with C = D∗ and u = y) and hence s(D∗ ) ≤ s(D) ≤ a by part (4) of the same lemma. Also t(D∗ ) = x. Since x = t(D∗ ) ∈ Gc , p(D∗ ) ∈ Gc . 7 As a and b are not inner vertices of the same link, the path x = t(D∗ ) →T b →T a →T s(D∗ ) contains a branch vertex. Thus D∗ is a Mader-path by Lemma 3.  Corollary 2 If G is 3-edge-connected, chains can be greedily added in parent-first order. Proof: If we reach a point where not all chains are added, but we can not proceed in a greedy fashion, by Theorem 2 we find a cut in G.  6. A First Algorithm Corollary 2 gives rise to an O((n + m) log(n + m)) algorithm, the Greedy-Chain-Addition Algorithm. In addition to G, we maintain the following data structures: • The current graph Gc . Each link is maintained as a doubly linked list of vertices. Observe that all inner vertices of a link lie on the same tree path and hence are numbered in decreasing order. The vertices in G are labeled inactive, branch, or non-branch. The vertices in G \ Gc are called inactive. Every non-branch vertex stores a pointer to the link on which it lies and a list of all chains incident to it and having the other endpoint as an inner vertex of the same link. • A list L of addable chains. A chain is addable if it is a Mader-path with respect to the current graph. • For each chain its list of children. We initialize Gc to C1 ∪C2 . It has three links, t(C2 ) →T r, r →C1 t(C2 ), and r →C2 t(C2 ). We then iterate over the children of C1 and C2 . For each child, we check in constant time whether its endpoints are inner vertices of the same link. If so, we associate the chain with the link by inserting it into the lists of both endpoints. If not, we add the chain to the list of addable chains. The initialization process takes time O(n + m). As long as the list of addable chains is non-empty, we add a chain, say C. Let u and v be the endpoints of C. We perform the following actions: • If u is a non-branch vertex, we make it a branch vertex. This splits the link containing it and entails some processing of the chains having both endpoints on this link. • If v is a non-branch vertex, we make it a branch vertex. This splits the link containing it, and entails some processing of the chains having both endpoints on this link. • We add C as a new link to Gc . • We process the children of C. We next give the details for each action. If u is a non-branch vertex, it becomes a branch vertex. Let L be the link of Gc containing u; L is split into links L1 and L2 and the set S of chains having both endpoints on L is split into sets S1 , S2 and Sadd , where Si is the set of chains having both endpoints on Li , i = 1, 2, and Sadd is the set of chains that become addable (because they are incident to u or have one endpoint each in L1 and L2 ). We show that we can perform the split of L in time O(1 + |Sadd | + min(|L1 | + |S1 |, |L2 | + |S2 |)). We walk from both ends of L towards u in lockstep fashion. In each step we either move to the 8 next vertex or consider one chain. Once we reach u we stop. Observe that this strategy guarantees the time bound claimed above. When we consider a chain, we check whether we can move it to the set of addable chains. If so, we do it and delete the chain from the lists of both endpoints. Once, we have reached u, we split the list representing the link into two. The longer part of the list retains its identity, for the shorter part we create a new list header and redirect all pointers of its elements. Adding C to Gc is easy. We establish a list for the new link and let all inner vertices of C point to it. The inner vertices become active non-branch vertices. Processing the children of C is also easy. For each child, we check whether both endpoints are inner vertices of C. If so, we insert the child into the list of its endpoints. If not, we add the child to the list of addable chains. If L becomes empty, we stop. If all chains have been added, we have constructed a Mader sequence. If not all chains have been processed, there must be a link having at least one inner vertex. The first and the last edge of this link form a 2-edge-cut. It remains to argue that the algorithm runs in time O((n + m) log(n + m)). We only need to argue about the splitting process. We distribute the cost O(1+|Sadd |+min(|L1 |+|S1 |, |L2 |+|S2 |)) as follows: O(1) is charged to the vertex that becomes a branch vertex. All such charges add up to O(n). O(|Sadd |) is charged to the chains that become addable. All such charges add up to O(m). O(min(|L1 | + |S1 |, |L2 | + |S2 |)) is charged to the vertices and chains that define the minimum. We account for these charges with the following token scheme inspired by the analysis of the corresponding recurrence relation in [17]. Consider a link L with k chains having both endpoints on L. We maintain the invariant that each vertex and chain owns at least log(|L| + k) tokens. When a link is newly created we give log(n+m) tokens to each vertex of the link and to each chain having both endpoints on the link. In total we create O((n + m) log(n + m)) tokens. Assume now that we split a link L with k chains into links L1 and L2 with k1 and k2 chains respectively. Then min(|L1 | + k1 , |L2 | + k2 ) ≤ (|L| + k)/2 and hence we may take one token away from each vertex and chain of the sublink that is charged without violating the token invariant. Theorem 3 The Greedy-Chain-Addition algorithm runs in time O((n + m) log(n + m)). 7. A Classification of Chains When we add a chain in the Greedy-Chain-Addition algorithm, we also process its children. Children that do not have both endpoints as inner vertices of the chain can be added to the list of addable chains immediately. However, children that have both endpoints as inner vertices of the chain cannot be added immediately and need to be observed further until they become addable. We now make this distinction explicit by classifying chains into two types, interlacing and nested. We classify the chains {C3 , . . .Cm−n+1 } into two types. Let C be a chain with parent Cb = p(C). We distinguish two cases1 for C. 1 In [26], three types of chains are distinguished. What we call nested is called Type 1 there and what we call interlacing is split into Types 2 and 3 there. We do not need this finer distinction. 9 b and a descendant of s(C), b C is interlacing. We have s(C) b ≤ • If s(C) is an ancestor of t(C) b s(C) ≤ t(C) ≤ t(C). b C is nested. We have s(C) b ≤ t(C) b < s(C) ≤ t(C) • If s(C) is a proper descendant of t(C), b and t(C) →T s(C) is contained in C. b By b v be the first edge on C. These cases are exhaustive as the following argument shows. Let s(C) b ≤ s(C) ≤ v. We split the path v →T s(C) b into t(C) b →T s(C) b and (v →T t(C))\t( b b Lemma 2, s(C) C). Depending on which of these paths s(C) lies on, C is interlacing or nested. b If C The following simple observations are useful. For any chain C 6= C1 , t(C) s-belongs to C. b If C is interlacing, s(C) s-belongs to a chain which is a is nested, s(C) and t(C) s-belong to C. b b proper ancestor of C or C = C1 . The next lemma confirms that interlacing chains can be added once their parent belongs to Gc . Lemma 4 Let Gc be a parent-closed union of chains that contains C1 and C2 , let C be any chain contained in Gc , and let D be an interlacing child of C not contained in Gc . Then D is a Mader-path with respect to Gc . Proof: We have already shown in Lemma 3 that D is an ear with respect to Gc , that the path t(D) →T s(D) is part of Gc , and that s(C) and t(C) are branching vertices of Gc . Since D is interlacing, we have s(C) ≤ s(D) ≤ t(C) ≤ t(D). Thus t(D) →T s(D) contains a branching vertex and hence D is a Mader-path by Lemma 3.(3).  8. A Linear Time Algorithm According to Lemma 4, interlacing chains whose parent belongs to the current graph are always Mader-paths and can be added. Nested chains have both endpoints on their parent chain and can only be added once the tree-path connecting its endpoints contains a branching point. Consider a chain nested in chain Ci . Which chains can help its addition by creating branching points on Ci ? First, interlacing chains having their source on some C j with j ≤ i, and second, chains nested in Ci and their interlacing offspring having their source on Ci . Chains having their source on some C j with j > i cannot help because they have no endpoint on Ci . This observation shows that chains can be added in phases. In the i-th phase, we try to add all chains having their source vertex on Ci . The overall structure of the linear-time algorithm is given in Algorithm 1. An implementation in Python is available at https://github.com/adrianN/edge-connectivity. The algorithm operates in phases and maintains a current graph Gc . Let C1 , C2 , . . . , Cm−n+1 be the chains of the chain decomposition in the order of creation. We initialize Gc to C1 ∪C2 . In phase i, i ∈ [1, m − n + 1], we consider the i-th chain Ci and either add all chains C to Gc for which the source vertex s(C) s-belongs to Ci to Gc or exhibit a 2-edge-cut. As already mentioned, chains are added parent-first and hence Gc is always parent-closed. We maintain the following invariant: Invariant: After phase i, Gc consists of all chains for which the source vertex s-belongs to one of the chains C1 to Ci . 10 Algorithm 1 Certifying linear-time algorithm for 3-edge connectivity. procedure C ONNECTIVITY(G=(V,E)) Let {C1 ,C2 , . . . ,Cm−n+1 } be a chain decomposition of G as described in Sect. 4; Initialize Gc to C1 ∪C2 ; for i from 1 to m − n + 1 do . Phase i: add all chains whose source s-belongs to Ci Group the chains C for which s(C) s-belongs to Ci into segments; Part I of Phase i: Add all segments to Gc whose minimal chain is interlacing; Part II of Phase i: Either find an insertion order S1 , . . . , Sk of the segments having a nested minimal chain or exhibit a 2-edge-cut and stop; for j from 1 to k do Add the chains contained in S j parent-first; end for end for end procedure Lemma 5 For all i, the current chain Ci is part of the current graph Gc at the beginning of phase i or the algorithm has exhibited a 2-edge-cut before phase i. Proof: The initial current graph consists of chains C1 and C2 and hence the claim is true for the first and the second phase. Consider i > 2. The source vertex s(Ci ) s-belongs to a chain C j with j < i (Lemma 2.(6)) and hence Ci is added in phase j.  The next lemma gives information about the chains for which the source vertex s-belongs to Ci . None of them belongs to Gc at the beginning of phase i (except for chain C2 that belongs to Gc at the beginning of phase 1) and they form subtrees of the chain tree. Only the roots of these subtrees can be nested. All other chains are interlacing. Lemma 6 Assume that the algorithm reaches phase i without exhibiting a 2-edge-cut. Let C 6= C2 be a chain for which s(C) s-belongs to Ci . Then C is not part of Gc at the beginning of phase i. Let D be any ancestor of C that is not in Gc . Then: (1) s(D) s-belongs to Ci . (2) If D is nested, it is a child of Ci . (3) If p(D) is not part of the current graph, D is interlacing. Proof: We use induction on i. Consider the i-th phase and let C 6= C2 be chains whose source vertex s(C) s-belongs to Ci . We first prove that C is not in Gc . This is obvious, since in the j-th phase we add exactly the chains whose source vertex s-belongs to C j . (1): Let D be any ancestor of C which is not part of Gc . By Lemma 2, we have s(D) ≤ s(C) and hence s(D) belongs to C j for some j ≤ i. If j < i, D would have been added in phase j, a contradiction to the assumption that D does not belong to Gc at the beginning of phase i. (2): s(D) s-belongs to Ci by (1). If D is nested, s(D) and t(D) s-belong to the same chain. Thus D is a child of Ci . 11 (3): If p(D) is not part of the current graph, p(D) 6= Ci by Lemma 5 and hence D is not a child of Ci . Hence by (2), D is interlacing.  We can now define the segments with respect to Ci by means of an equivalence relation. Consider the set S of chains whose source vertex s-belongs to Ci . For a chain C ∈ S , let C∗ be the minimal ancestor of C that does not belong to Gc . Two chains C and D in S belong to the same segment if and only if C∗ = D∗ . In Figure 2 on page 5, if we start with Gc = C1 ∪C2 , we form three segments in the first phase, namely {C4 }, {C3 }, and {C5 }. The first segment can be added according to Lemma 4. Then C3 can be added and then C5 . Consider any C ∈ S . By part (1) of the preceding lemma either p(C) ∈ S or p(C) is part of Gc . Moreover, C and p(C) belong to the same segment in the first case. Thus segments correspond to subtrees in the chain tree. In any segment only the minimal chain can be nested by Lemma 6. If it is nested, it is a child of Ci (parts (2) and (3) of the preceding lemma). Since only the root of a segment may be a nested chain, once it is added to the current graph all other chains in the segment can be added in parent-first order by Lemma 4. All that remains is to find the proper ordering of the segments faster than in the previous section. We do so in Lemma 10. If no proper ordering exists, we exhibit a 2-edge-cut. Lemma 7 All chains in a segment S can be added in parent-first order if its minimal chain can be added. Proof: By Lemma 6 all but the minimal chain in a segment are interlacing. Thus the claim follows from Lemma 4.  We come to part I of phase i, the addition of all segments whose minimal chain is interlacing. As a byproduct, we will also determine all segments with nested minimal chain. We iterate over all chains C whose source s(C) s-belongs to Ci . For each such chain, we traverse the path C, p(C), p(p(C)), . . . until we reach a chain that belongs to Gc or is already marked (initially, all chains are unmarked). We now distinguish cases. If the last chain on the path is nested we mark all chains on the path with the nested chain. If we hit a marked chain we copy the marker to all chains in the path. Otherwise, i.e., all chains are interlacing and unmarked, we add all chains in the path to Gc in parent-first order, as these segments can be added according to Corollary 7. It remains to compute a proper ordering of the segments in which the minimal chain is nested or to exhibit a 2-edge-cut. We do so in part II of phase i. For simplicity, we will say ‘segment’ instead of ‘segment with nested minimal chain’ from now on. For a segment S let the attachment points of S be all vertices in S that are in Gc . Note that the attachment points must necessarily be endpoints of chains in S and hence adding the chains of S makes the attachment points branch vertices. Nested children C of Ci can be added if there are branch vertices on t(C) →T s(C), therefore adding a segment can make it possible to add further segments. Lemma 8 Let C be a nested child of Ci and let S be the segment containing C. The attachment points of S consist of s(C), t(C), and the vertices s(D) of the other chains in the segment. All such points lie on the path t(C) →T s(C) and hence on Ci . 12 Proof: Let D be any chain in S different from C. By Lemma 6, C is the minimal chain in S. Since S is a subtree of the chain tree, we have C < D and hence by Lemma 2 t(C) ≤ t(D). Since none of the chains in S is part of Gc , parent-closedness implies that no vertex on the path (t(D) →T t(C)) \ t(C) belongs to Gc . In particular, either t(D) = t(C) or t(D) is not a vertex of Gc and hence not an attachment point of S. It remains to show s(C) ≤ s(D) ≤ t(C). Since C ≤ D, we have s(C) ≤ s(D) by Lemma 2. Since s(D) ≤ t(D) and t(C) ≤ t(D) we have either s(D) ≤ t(C) ≤ t(D) or t(C) < s(D) ≤ t(D). In the former case, we are done. In the latter case, s(D) is not a vertex of Gc by the preceding paragraph, a contradiction, since s(D) s-belongs to Ci by Lemma 6.  For a set of segments S1 , . . . , Sk , let the overlap graph be the graph on the segments and a special vertex R for the branch vertices on Ci . In the overlap graph, there is an edge between R and a vertex Si , if there are attachment points a1 ≤ a2 of Si such that there is a branch vertex on the tree path a2 →T a1 . Further, between two vertices Si and S j there is an edge if there are attachment points a1 , a2 in Si and b1 , b2 in S j , such that a1 ≤ b1 ≤ a2 ≤ b2 or b1 ≤ a1 ≤ b2 ≤ a2 . We say that Si and S j overlap. Lemma 9 Let C be a connected component of the overlap graph H and let S be any segment with respect to Ci whose minimal chain C is nested. Then S ∈ C if and only if (i) R ∈ C and there is a branch vertex on t(C) →T s(C) or (ii) there are attachments a1 and a2 of S and attachments b1 and b2 of segments in C with a1 ≤ b1 ≤ a2 ≤ b2 or b1 ≤ a1 ≤ b2 ≤ a2 . Proof: We first show S ∈ C if (i) or (ii) holds. For (i) the claim follows directly from the definition of the overlap graph. For (ii), assume S 6∈ C for the sake of a contradiction. Then either R 6∈ C or there is no branch vertex in t(C) →T s(C) by (i). Further, no segment in C overlaps with S and hence any segment in C has its attachments points either strictly between a1 and a2 or outside the path a2 →T a1 . Moreover, both classes of segments are non-empty. However, segments in the two classes do not overlap and R cannot be connected to the segments in the former class. Thus C is not connected, a contradiction. If neither (i) nor (ii) hold, there can be no segment in C overlapping S and either S is not connected to R or no segment in C is connected to R.  Lemma 10 Assume the algorithm reaches phase i. If the overlap graph H induced by the segments with respect to Ci is connected, we can add all segments of Ci . If H is not connected, we can exhibit a 2-edge-cut for any component of H that does not contain R. Proof: Assume first that H is connected. Let R, S1 , . . . , Sk be the vertices of H in a preorder, e.g. the order they are explored by a DFS, starting at R, the vertex corresponding to the branch vertices on Ci . An easy inductive argument shows that we can add all segments in this order. Namely, let k ≥ 1 and let C be the minimal chain of Sk . All attachment points of Sk lie on the path t(C) →T s(C) by Lemma 8, and there is either an edge between R and Sk or an edge between S j and Sk for some j < k. In the former case, there is a branch vertex on t(C) →T s(C) at the 13 beginning of the phase, in the latter case there is one after adding S j . Thus the minimal chain of Sk can be added and then all other chains by Lemma 7. On the other hand, suppose H is not connected. Let C be any connected component of H that does not contain R, and let CR be the connected component that contains R. Let x and y be the minimal and maximal attachment points of the segments in C , and let Gc be the current graph after adding all chains in CR . We first show that there is no branch vertex of Gc on the path y →T x. Assume otherwise and let w be any such branch vertex. Observe first that there must be a chain C ∈ C with s(C) ≤ w ≤ t(C). Otherwise, every chain in C has all its attachment points at proper ancestors of w or at proper descendants of w and hence C is not connected. Let S be the segment containing C. By Lemma 8, we may assume that C is the minimal chain of S. Since S 6∈ CR , R S is not an edge of H and hence no branch vertex exists on the path t(C) →T s(C) at the beginning of part II of the phase. Hence w is an attachment point of a segment in CR . In particular CR contains at least one segment. We claim that CR must also have an attachment point outside t(C) →T s(C). This holds since all initial branch vertices are outside the path and since CR is connected. Thus S ∈ CR by Lemma 9, a contradiction. We show next that the tree-edge x p(x) and the edge z y from y’s predecessor z on Ci to y form a 2-edge-cut; z y may be a tree-edge or a back-edge. The following argument is similar to the argument in Theorem 2, but more refined. Assume otherwise. Then, as in the proof of Theorem 2, there is a path P = a → b such that a ≤ u for all u ∈ P, and either a lies on y →T x and b does not, or vice versa, and no inner vertex of P is in Gc . Moreover, the first edge a v of P is a back-edge and v is a descendant of b. Note that unlike in the proof of Theorem 2, a and b need not lie on different links, as we want to show that x p(x) and z y form a cut and these might be different from the last edges on the link containing x and y. Let D be the chain that starts with the edge a v. D does not belong to Gc , as no edge of P belongs to Gc . In particular, a does not s-belong to C j for j < i (as otherwise, D would already be added). Since a ≤ b and one of a and b lies on y →T x (which is a subpath of Ci ), a s-belongs to Ci . By the argument from the proof of Theorem 2, t(D) is a descendant of b. Let D∗ be the chain that contains the last edge of P. If t(D) = b, D = D∗ . Otherwise, t(D) is a proper descendant of b. Let u b be the last edge on the path t(D) →T b. We claim that u b is also the last edge of P. This holds since the last edge of P must come from a descendant of b (as ancestors of b belong to Gc ) and since it cannot come from a child different from y as otherwise P would have to contains a cross-edge. Thus D∗ ≤ D by Lemma 2.(5) and hence s(D∗ ) ≤ s(D) ≤ a by part (4) of the same lemma. D and D∗ belong to the same segment with respect to Ci , say S, and a and b are vertices in S ∩ Gc . This can be seen easily. Since a s-belongs to Ci , D belongs to some segment with respect to Ci and since D∗ ≤ D, D∗ belongs to the same segment. Since t(D∗ ) = b and b is a vertex of Gc , D∗ is the minimal chain in S. Thus D∗ is nested and hence b s-belongs to Ci . Hence a and b are attachment points of S. Thus S overlaps with C and hence S ∈ C by Lemma 9. Therefore x and y are not the extremal attachment points, that is the minimal (or maximal) vertices in S ∩ Gc , of C , a contradiction.  It remains to show that we can find an order as required in Lemma 10, or a 2-edge-cut, in 14 1 2 3 0 4 1 2 3 4 Figure 3: Intervals for the solid segment with respect to the dashed chain. It has the attachment points 1,2,4. Filled vertices are branching points. linear time. We reduce the problem of finding an order on the segments to a problem on intervals. W.l.o.g. assume that the vertices of Ci are numbered consecutively from 1 to |Ci |. Consider any segment S, and let a0 ≤ a1 ≤ . . . ≤ ak be the set of attachment points of S, i.e., the set of vertices that S has in common with Ci . By Lemma 8, a0 and ak are the endpoints of the minimal chain in S and each ai , 0 < i < k, is equal to s(D) for some other chain in S. We associate the intervals {[a0 , a` ]|1 ≤ ` ≤ k} ∪ {[a` , ak ]|1 ≤ ` < k}, with S and for every branch vertex v on Ci we define an interval [0, v]. See Figure 3 for an example. We say two intervals [a, a0 ], [b, b0 ] overlap if a ≤ b ≤ a0 ≤ b0 . Note that overlapping is different from intersecting; an interval does not overlap intervals in which it is properly contained or which it properly contains. This relation naturally induces a graph H 0 on the intervals. Contracting all intervals that are associated to the same segment into one vertex makes H 0 isomorphic to the overlap graph as required for Lemma 10. Hence we can use H 0 to find the order on the segments. Note that the interval set {[a0 , a` ]|1 ≤ ` ≤ k} for each segment does not suffice without employing a clever tie-breaking rule: If there are two segments with attachments a < b < c and a < b0 < c, respectively, such that b0 6= b, no interval of the first segment overlaps with one of the second. A naive approach that constructs H 0 , contracts intervals, and runs a DFS will fail, since the overlap graph can have a quadratic number of edges. However, using a method developed by Olariu and Zomaya [23], we can compute a spanning forest of H 0 in time linear in the number of intervals. The presentation in [23] is for the PRAM and thus needlessly complicated for our purposes. A simpler explanation can be found in the appendix. The number of intervals created for a chain Ci is bounded by |NestedChildren(Ci )| + 2|Interlacing(Ci )| + |Vbranch (Ci )|, where NestedChildren(Ci ) are the nested children of Ci , Interlacing(Ci ) are the interlacing chains that start on Ci , and Vbranch (Ci ) is the set of branch vertices on Ci . Note that we generate the interval [s(C),t(C)] for each nested child C, and the intervals [s(C), s(D)] and [s(D),t(C)] for each interlacing chain D belonging to a segment with nested minimal chain C. Thus the total time spend the ordering procedure is O(m). From the above discussion, we get: Theorem 4 For a 3-edge-connected graph, a Mader construction sequence can be found in time O(n + m). 15 9. Verifying the Mader Sequence The certificate is either a 2-edge-cut, or a sequence of Mader-paths. For a 2-edge-cut, we simply remove the two edges and verify that G is no longer connected. For checking the Mader sequence, we doubly-link each edge in a Mader-path to the corresponding edge in G. Let G0 be a copy of G. We remove the Mader-paths, in reverse order of the sequence, suppressing vertices of degree two as they occur. This can create multiple edges and loops. Let G0i be the multi-graph before we remove the i-th path Pi . We need to verify the following: • G must have minimum degree three. • The union of Mader-paths must be isomorphic to G and the Mader-paths must partition the edges of G. This is easy to check using the links between the edges of the paths and the edges of G. • The paths we remove must be ears. More precisely, at step i, Pi must have been reduced to a single edge in G0i , as inner vertices of Pi must have been suppressed if Pi is an ear for G0i . • The Pi must not subdivide the same link twice. That is, after deleting the edge corresponding to Pi , it must not be the case that both endpoints are still adjacent (or equal, i.e. Pi is a loop) but have degree two. • When only two paths are left, the graph must be a K23 . 10. The Cactus Representation of 2-Cuts We review the cactus representation of 2-cuts in a 2-connected but not 3-connected graph and show how to certify it. A cactus is a graph in which every edge is contained in exactly one cycle. Dinits, Karzanov, and Lomonsov [5] showed that the set of mincuts of any graph has a cactus representation, i.e., for any graph G there is a cactus C and a mapping φ : V (G) → V (C) such that the mincuts of G are exactly the preimages of the mincuts of C, i.e., for every mincut2 A ⊆ V (C), φ −1 (A) is a mincut of G, and all mincuts of G can be obtained in this way. The pair (C, φ ) is called a cactus representation of G. Fleiner and Frank [6] provide a simplified proof for the existence of a cactus representation. We will call the elements of V (G) vertices, the elements of V (C) nodes, and the preimages of nodes of C blobs. In general, a cactus representation needs to include nodes with empty preimages. This happens for example for the K4 ; its cactus is a star with double edges where the central node has an empty preimage and the remaining nodes correspond to the vertices of the K4 . For graphs whose mincuts have size two, nodes with empty preimages are not needed, and a cactus representation can be obtained by contracting the 3-edge-connected components into a single node. Lemma 11 ([20, Section 2.3.5]) Let G be a 2-edge-connected graph that is not 3-edge-connected. Contracting each 3-edge-connected components of G into a node yields a cactus representation (C, φ ) of G with the following properties: 2 For this theorem, a cut is specified by a set of vertices, and the edges in the cut are the edges with exactly one endpoint in the vertex set. 16 i) The edges of C are in one-to-one correspondence to the edges of G that are contained in a 2-cut. ii) For every node c ∈ V (c), φ −1 (c) is a 3-edge-connected component of G. 10.1. Verifying a Cactus Representation Let G be a graph and let (C, φ ) be an alleged cactus-representation of its 2-cuts in the sense of Lemma 11. We show how to verify a cactus representation in linear time. We need to check two things. First, we need to ensure that C is indeed a cactus graph, that is, every edge of C is contained in exactly one cycle, that φ is a surjective mapping and hence there are no empty blobs, and that every edge of G either connects two vertices in the same blob or is also present in C. Second, we need to verify that the blobs of C are 3-edge-connected components of G. For this purpose, the cactus representation is augmented by a Mader construction sequence for each blob B. The verification procedure from Sect. 9 can then be applied. We first verify that C is a cactus. We compute a chain decomposition of C and verify that every chain is a cycle. We label all edges in the i-th cycle by i. We have now verified that C is a cactus. Surjectivity of φ is easy to check. We then iterate over the edges u v of G. If its endpoints belong to the same blob, we associate the edge with the blob. If its endpoints do not belong to the same blob, we add the pair φ (u) φ (v) to a list. Having processed all edges, we check whether the constructed list and the edge list of C are identical by first sorting both lists using radix sort and then comparing them for identity. We finally have to check that the blobs of C correspond to 3-edge-connected components of G. Our goal is to use the certifying algorithm for 3-edge-connectivity on the substructures of G that represent 3-edge-connected components. Let B be any blob. We already collected the edges having both endpoints in B. We also have to account for the paths using edges outside B. We do so by creating an edge u v for a every path in G leaving B at vertex u and returning to B at vertex v. It is straightforward to compute these edges; we look at all edges having exactly one endpoint in the blob. Each such edge corresponds to an edge in C. For each such edge, we know to which cycle it belongs. The outgoing edges pair up so that the two edges of each pair belong to the same cycle. The maximality of each blob B is given by the fact that every edge of C is contained in a 2-edge-cut of C and hence contained in a 2-edge-cut of G. Every algorithm for computing the 3-edge-connected components of a graph, e.g. [19, 20, 28– 30], can be turned into a certifying algorithm for computing the cactus representation of 2-cuts. We obtain the cactus C and the mapping φ by contraction of the 3-edge-connected components (Lemma 11). Then one applies our certifying algorithm for 3-edge-connectivity to each 3-edgeconnected component. The drawback of this approach is that it requires two algorithms that check 3-connectivity. In the next section we will show how to extend our algorithm so that it computes the 3-edge-connected components and the cactus representation of 2-cuts of a graph directly. 17 11. Computing a Cactus Representation We discuss how to extend the algorithm to construct a cactus representation. We begin by examining the structure of the 2-cuts of G more closely to extend our algorithm such that it finds all 2-cuts of the graph and encodes them efficiently. We will first show that the two edges of every 2-edge-cut of G are contained in a common chain. This restriction allows us to focus on the 2-edge-cuts that are contained in the currently processed chain Ci only. In the subsequent section, we show how to maintain a cactus for every phase i of the algorithm that represents all 2-edge-cuts of the graph of the branch vertices and links of C1 ∪ . . . ∪Ci in linear space. The final cactus will therefore represent all 2-edge-cuts in G. There is one technical detail regarding the computation of overlap graphs: For the computation of a Mader-sequence in Section 8, we stopped the algorithm when the first 2-edge-cut occurred, as then a Mader-sequence does not exist anymore. Here, we simply continue the algorithm with processing the next chain Ci+1 . This does not harm the search for cuts in subsequent chains, as the fact that 2-edge-cuts are only contained in common chains guarantees that every 2-edge-cut that contains an edge e in Ci has its second edge also in Ci . For simplicity, we assume that G is 2-edge-connected and has minimum degree three from now on. Then all 3-edge-connected components contain at least two vertices. 11.1. 2-Edge-Cuts are Contained in Chains and an Efficient Representation of All Cuts in a Chain In phase i of the algorithm, using Lemma 10, we can find a 2-edge-cut for each connected component of the overlap graph H that does not contain R (R is the special vertex in H that represents the branch vertices on Ci ). Lemma 13 shows that the set of edges contained in these cuts is equal to the set of edges contained in any cut on Ci . Lemma 12 states easy facts about 2-edge-cuts, in particular, that the edges of any 2-edge-cut are contained in a common chain. The proofs can be found in many 3-connectivity papers, e.g. [19, 28–30]. As in the previous sections, all DFS-tree-edges are oriented towards the root, while back-edges are oriented away from the root. Lemma 12 Let T be a DFS-tree of a 2-edge-connected graph G. Every 2-edge-cut (u v, x y) of G satisfies the following: (1) At least one of u v and x y is a tree-edge, say x y. (2) G − u v − x y has exactly two components. Moreover, the edges u v and x y have exactly one endpoint in each component. (3) The vertices u, v, x, and y are contained in the same leaf-to-root path of T . (4) If u v and x y are tree-edges and w.l.o.g. u ≤ y, the vertices in y →T u and {x, v} are in different components of G − u v − x y. (5) If u v is a back-edge, then x y ∈ (v →T u) and, additionally, the vertices in v →T x and y →T u are in different components of G − u v − x y. Moreover, let C be a chain decomposition of G. For every 2-edge-cut {u v, x y} of G, u v and x y are contained in a common chain C ∈ C . 18 Lemma 13 Let E be the set of edges that are contained in the 2-edge cuts induced by the connected components of the overlap graph H at the beginning of part II of phase i. Then any 2-edge-cut {x y, u v} on Ci is a subset of E . Proof: Assume for the sake of contradiction that there is an edge u v in the 2-edge-cut that is not in E . We distinguish the following cases. First assume that both u v and x y are tree-edges and w.l.o.g. v < u ≤ y < x. Since G has minimal degree three, every vertex on Ci has an incident edge that is not on Ci . Hence it is either a branch vertex, or belongs to some segment with respect to Ci (incident back-edges start chains in segments w.r.t. Ci , incident tree edges are the last edges of chains in segments w.r.t. Ci ). As s(Ci ) ≤ v is a branch vertex, by Lemma 12.(4) the path y →T u can not contain a branch vertex. In particular, u is not a branch vertex. Let Su be any segment having u as attachment vertex. All segments in the connected component of Su in H must have their attachment vertices on y →T u and the connected component does not contain R. Hence this connected component induces a cut containing u v. Now assume that one of u v and x y is a back-edge. If u v is the back-edge, then u = s(Ci ) and we have u < y < x < v by Lemma 12. The path v →T x cannot contain a branch vertex. Let Sv be any segment that has v as attachment vertex. All segments in the connected component of Sv must have their attachment vertices on v →T x and the connected component does not contain R. Hence u v is contained in a cut induced by this connected component. If on the other hand u v is the tree-edge we have y < v < u < x basically the same argument applies when we replace Sv by a segment Su containing u.  We next show how to compute a space efficient representation of all 2-cuts on the chain Ci . Using this technique we can store all 2-cuts in G in linear space. In the next section we will then use this to construct the cactus-representation of all 2-cuts in G. Number the edges in Ci as e1 , e2 , . . . , ek . Here e1 is a back edge and e2 to ek are tree edges. We start with a simple observation. Let h < i < j. If (eh , ei ) and (ei , e j ) are 2-edge-cuts, then (ei , e j ) is a 2-edge-cut. Using this observation, we want to group the edges of 2-edge-cuts of Ci such that (i) every two edges in a group form a 2-edge-cut and (ii) no two edges of different groups form a 2-edge-cut. The existence of such a grouping has already been observed in [19, 28, 30]. We show how to find it using the data structures we have on hand during the execution of our algorithm. Consider the overlap graph H in phase i of our algorithm. We need some notation. Let I be the set of intervals on Ci that contains for every component of H (except the component representing the branch vertices on Ci ) with extremal attachment vertices a and b the interval [a, b]. Since the connected components of H are maximal sets of overlapping intervals, I is a laminar family, i.e. every two intervals in I are either disjoint or properly contained in each other. In particular, no two intervals in I share an endpoint. The layers of this laminar family encode which edges form pairwise 2-cuts in G, see Figure 4. We define an equivalence relation to capture this intuition. For an interval [a, b], a < b, let `([a, b]) and r([a, b]) be the edges of Ci directly before and after a and b, respectively. We call {`([a, b]), r([a, b])} the interval-cut of [a, b]. For a subset S ⊆ I of intervals, let ES be the union of edges that are contained in interval-cuts of intervals in S. According to Lemma 13, every 2-edge-cut in Ci consists of edges in EI . 19 1 1 2 2 3 3 3 2 Figure 4: The intervals induced by the connected components of the overlap graph H form a laminar family. The levels of this family encode which edges form pairwise 2-cuts. Two edges in the figure are labeled with the same number if they form a cut. Filled vertices are branch vertices. We now group the edges of EI using the observation above. Let two intervals I1 ∈ I and I2 ∈ I contact if r(I1 ) = `(I2 ) or `(I1 ) = r(I2 ). Clearly, the transitive closure ≡ of the contact relation is an equivalence relation. Every block B of ≡ is a set of pairwise disjoint intervals which are contacting consecutively. This allows us to compute the blocks of ≡ efficiently. We can compute them in time |I| and store them in space |I| by using a greedy algorithm that iteratively extracts the inclusion-wise maximal intervals in I that are contacting consecutively. Lemma 14 ([19, 28, 30]) Two edges e and e0 in Ci form a 2-edge-cut if and only if e and e0 are both contained in EB for some block B of ≡. 11.2. An Incremental Cactus Construction In this section we show how to construct a cactus representation incrementally along our algorithm for constructing a Mader sequence. At the beginning of each phase i, we will have a cactus for the graph Gi whose vertices are the branch vertices that exist at this time and whose edges are the links between these branch vertices. We assume that G is 2-edge-connected but not 3-edge connected and that G has minimum degree three. This ensures that in phase i every vertex on the current chain Ci belongs to some segment or is a branch vertex. We will maintain a cactus representation (C, φ ), i.e., for every node v of C, the blob B = φ −1 (v) is the vertex-set of a 3-edge-connected component in Gi . We begin with a single blob that consists of the two branch vertices of the initial K23 , which clearly are connected by three edge-disjoint paths. Consider phase i, in which we add all chains whose source s-belongs to Ci . At the beginning of the phase, the endpoints of Ci and some branch vertices on Ci already exist in Gi . We have a cactus representation of the current graph. The endpoints of Ci are branch vertices and belong to the same blob B, since 2-edge-cuts are contained in chains. We add all segments that do not induce cut edges and tentatively assign all vertices of Ci to B. If the algorithm determines that Ci does not contain any 2-edge-cut, the assignment becomes permanent, the phase is over and we proceed to phase i + 1. Otherwise we calculate the efficient representation of 2-edge-cuts on Ci from Sect. 11.1. Let e1 be the first edge on Ci in a 2-edge-cut, let A be a block of the contact equivalence relation described in the last section containing e1 and let EA = {e1 , e2 , . . . , e` } such that e j comes before 20 Ci : 0 1 a 3 2 b 5 4 c d 7 6 e f g 8 h 2, 3 d b f 1, 4, 5 a 6, 7 h 0, 8 Figure 5: The segments attached to chain Ci and the corresponding part of the cactus. We first tentatively assign vertices 1–7 to the blob containing the endpoints {0, 8} of Ci . The top level cuts are the pairs in the block {a, f , h}. So we create a cycle with three edges and attach it to the blob containing 0 and 8. We move vertices 1–5 to the blob between a and f , vertices 6–7 to the blob between f and h, and keep vertices 0 and 8 in the parent blob. We then recurse into the first blob. The second level cuts are the pairs in the block {b, d}. So we create a cycle with two edges and move vertices 2 and 3 to the new blob. e j+1 in Ci for all j. Then every two edges in EA form a 2-edge-cut. We add a cycle with ` − 1 empty blobs B2 , . . . , B` to B in C. The ` new edges correspond to the ` edges in EA . For every pair e j = (a, b), e j+1 = (c, d) in EA we remove the vertices between these edges from B. Since the edges in Ci are linearly ordered, removing the vertices in a subpath takes constant time. We place the end vertices b and c of the path between e j and e j+1 in the blob B j , add the segments that induced this cut and recurse on the path between b and c. That is, we add all vertices on the path from b to c to B j , check for cut edges on this path, and, should some exist, add more blobs to the cactus. The construction takes constant time per blob. Figure 5 shows an example. Graphs that contain nodes of degree two can be handled in the same way, if we add a cycle to each degree two node u. This cycle creates a segment w.r.t. the chain to which u s-belongs and hence the algorithm correctly identifies the two incident edges as cut edges. Lemma 15 The above incremental procedure constructs a cactus representation of the 2-edgecuts in G in linear time. Proof: Each vertex in G s-belongs to some chain. In the phase in which that chain is treated, all its vertices are added to a blob. Whenever we move a vertex to different blob, we remove it from its previous blob. Therefore each vertex of G is contained in exactly one blob. Whenever we add edges to the cactus, we do so by adding a cycle that shares exactly one node with the existing cactus. Hence every edge in the cactus lies on exactly one cycle. 21 Let {e1 , e2 } be a 2-edge-cut in G. The two edges must lie on a common cycle in the cactus, since the edges in the cactus are in one-to-one correspondence with edges of G and cutting a cycle in only one place cannot disconnect a graph. As the cycles of the cactus touch in at most one vertex, e1 and e2 are a cut in the cactus as well. Conversely let e01 , e02 be a cut in the cactus and let e1 , e2 be the corresponding edges in G. Then 0 e1 , e02 must lie on some common cycle which, upon their removal, is split into two nonempty parts H1 , and H2 . Assume that G − e1 − e2 is still connected, then there must be a path from a vertex in the preimage of H1 to a vertex in the preimage of H2 in G − e1 − e2 . This path must contain at least one edge u v that does not participate in any 2-edge-cut, as otherwise it would be a path in the cactus as well. Moreover, u and v must lie in different blobs Bu and Bv of the cactus. The one that was created last, say Bu , must be different from the initial blob. Consider the time when Bu was created in the incremental construction of the cactus. We introduced a cycle to some preexisting blob B∗ on which all edges were cut edges, in particular the two cut edges incident to Bu . However, the edge u v still connects Bu to the rest of graph, since Bv also exists at this time, a contradiction.  By applying the techniques of this section, the certifying algorithm for 3-vertex-connectivity [26] (which is also based on chain decompositions) can be used to compute the 3-vertex-connected components of a graph. This has been conjectured in [25, p. 18] and yields a linear-time certifying algorithm to construct a SPQR-tree of a graph; we refer to [9, 11] for details about 3-vertexconnected components and SPQR-trees. The full construction can be found in the appendix, section B. 12. Conclusion We presented a certifying linear time algorithm for 3-edge-connectivity based on chain decompositions of graphs. It is simple enough for use in a classroom setting and can serve as a gentle introduction to the certifying 3-vertex-connectivity algorithm of [26]. We also provide an implementation in Python, available at https://github.com/adrianN/edge-connectivity. We also show how to extend the algorithm to construct and certify a cactus representation of all 2-edge-cuts in the graph. From this representation the 3-edge-connected components can be readily read off. The same techniques are used to find the 3-vertex-connected components using the algorithm from [26], and thus present a certifying construction of SPQR-trees. Mader’s construction sequence is general enough to construct k-edge-connected graphs for any k ≥ 3, and can thus be used in certifying algorithms for larger k. So far, though, it is unclear how to compute these more complicated construction sequences. We hope that the chain decomposition framework can be adapted to work in these cases too. References [1] E. Alkassar, S. Böhme, K. Mehlhorn, and Ch. Rizkallah. A framework for the verification of certifying computations. Journal of Automated Reasoning (JAR), 52(3):241–273, 2014. 22 [2] J. A. Bondy and U. S. R. Murty. Graph Theory. Springer, 2008. [3] J. N. Corcoran, U. Schneider, and H.-B. Schüttler. Perfect stochastic summation in high order feynman graph expansions. International Journal of Modern Physics C, 17(11):1527–1549, 2006. [4] F. Dehne, M. Langston, X. Luo, S. Pitre, P. Shaw, and Y. Zhang. The cluster editing problem: Implementations and experiments. Parameterized and Exact Computation, pages 13–24, 2006. [5] E.A. Dinits, A.V. Karzanov, and M.V. Lomonosov. On the structure of a family of minimal weighted cuts in graphs. In Studies in Discrete Mathematics (in Russian), pages 290–306. 1976. [6] T. Fleiner and A. Frank. A quick proof for the cactus representation of mincuts. Technical Report QP-2009-03, Egerváry Research Group, Budapest, 2009. [7] H. N. Gabow. Path-based depth-first search for strong and biconnected components. Inf. Process. Lett., 74(3-4):107–114, 2000. [8] Z. Galil and G. F. Italiano. Reducing edge connectivity to vertex connectivity. SIGACT News, 22(1):57–61, 1991. [9] C. Gutwenger and P. Mutzel. A linear time implementation of SPQR-trees. In Proceedings of the 8th International Symposium on Graph Drawing (GD’00), pages 77–90, 2001. [10] J. Hopcroft and R. Tarjan. Efficient planarity testing. Journal of the ACM (JACM), 21(4):549– 568, 1974. [11] J. E. Hopcroft and R. E. Tarjan. Dividing a graph into triconnected components. SIAM J. Comput., 2(3):135–158, 1973. [12] D. R. Karger. Minimum cuts in near-linear time. J. ACM, 47(1):46–76, 2000. [13] N. Linial, L. Lovász, and A. Wigderson. Rubber bands, convex embeddings and graph connectivity. Combinatorica, 8(1):91–102, 1988. [14] L. Lovász. Computing ears and branchings in parallel. In Proceedings of the 26th Annual Symposium on Foundations of Computer Science (FOCS’85), 1985. [15] W. Mader. A reduction method for edge-connectivity in graphs. In B. Bollobás, editor, Advances in Graph Theory, volume 3 of Annals of Discrete Mathematics, pages 145–164. 1978. [16] R. M. McConnell, K. Mehlhorn, S. Näher, and P. Schweitzer. Certifying algorithms. Computer Science Review, 5(2):119–161, 2011. [17] K. Mehlhorn. Nearly optimal binary search trees. Acta Informatica, 5:287–295, 1975. 23 [18] K. Mehlhorn, S. Näher, and C. Uhrig. The LEDA Platform of Combinatorial and Geometric Computing. Cambridge University Press, 1999. [19] H. Nagamochi and T. Ibaraki. A linear time algorithm for computing 3-edge-connected components in a multigraph. Japan Journal of Industrial and Applied Mathematics, 9:163– 180, 1992. [20] H. Nagamochi and T. Ibaraki. Algorithmic Aspects of Graph Connectivity (Encyclopedia of Mathematics and its Applications). Cambridge University Press, 2008. [21] A. Neumann. Implementation of Schmidt’s algorithm for certifying triconnectivity testing. Master’s thesis, Universität des Saarlandes and Graduate School of CS, Germany, 2011. [22] Lars Noschinski, Christine Rizkallah, and Kurt Mehlhorn. Verification of certifying computations through Autocorres and Simpl. In NASA Formal Methods, volume 8430 of LNCS, pages 46–61. 2014. [23] S. Olariu and A. Y. Zomaya. A time- and cost-optimal algorithm for interlocking sets – With applications. IEEE Trans. Parallel Distrib. Syst., 7(10):1009–1025, 1996. [24] V. Ramachandran. Parallel open ear decomposition with applications to graph biconnectivity and triconnectivity. In Synthesis of Parallel Algorithms, pages 275–340, 1993. [25] J. M. Schmidt. Contractions, removals and certifying 3-connectivity in linear time. Tech. Report B 10-04, Freie Universität Berlin, Germany, May 2010. [26] J. M. Schmidt. Contractions, removals and certifying 3-connectivity in linear time. SIAM Journal on Computing, 42(2):494–535, 2013. [27] J. M. Schmidt. A simple test on 2-vertex- and 2-edge-connectivity. Information Processing Letters, 113(7):241–244, 2013. [28] S. Taoka, T. Watanabe, and K. Onaga. A linear time algorithm for computing all 3-edgeconnected components of a multigraph. IEICE Trans. Fundamentals E75, 3:410–424, 1992. [29] Y. H. Tsin. A simple 3-edge-connected component algorithm. Theor. Comp. Sys., 40(2):125– 142, 2007. [30] Y. H. Tsin. Yet another optimal algorithm for 3-edge-connectivity. J. of Discrete Algorithms, 7(1):130–146, 2009. [31] K.-P. Vo. Finding triconnected components of graphs. Linear and Multilinear Algebra, 13:143–165, 1983. [32] K.-P. Vo. Segment graphs, depth-first cycle bases, 3-connectivity, and planarity of graphs. Linear and Multilinear Algebra, 13:119–141, 1983. 24 A. Computing a Spanning Subgraph of an Overlap Graph We first assume that all endpoints are pairwise distinct. We will later show how to remove this assumption by perturbation. For every interval I = [a, b] define its set of left and right neighbors: L(I) = {I 0 = [a0 , b0 ]; a0 < a < b0 < b}, R(I) = {I 0 = [a0 , b0 ]; a < a0 < b < b0 }. If the set of left neighbors is nonempty, let the interval I 0 ∈ L(I) with the rightmost right endpoint be the immediate left neighbor of I. Similarly, if the set of right neighbors is nonempty, the immediate right neighbor of I is the interval in R(I) with the leftmost left endpoint. Lemma 16 The graph G0 formed by connecting each interval to its immediate left and right neighbor (if any) forms a spanning subgraph of the overlap graph G and has exactly the same connected components. Proof: Clearly, every edge of G0 is also an edge of G and hence connected components of G0 are subsets of connected components of G. For the other direction, assume I and I 0 are overlapping intervals that are not connected in 0 G . Then a < a0 < b < b0 , where I = [a, b] =: I0 and I 0 = [a0 , b0 ]. Let I0 , I1 , I2 , . . . be such that I` = [a` , b` ] is the immediate right neighbor of I`−1 for all ` ≥ 1. Consider the last I` in this sequence such that a` < a0 < b` < b0 ; clearly, such an interval exists, as I0 is such an interval. Then I 0 is a right neighbor of I` , but not the immediate right neighbor of I` , as otherwise I and I 0 would be connected in G0 . Hence, the immediate right neighbor I`+1 =: U =: [c, d] of I` exists, is different from I 0 , and must contain I 0 . Thus a < c < a0 < b < b0 < d. Starting from I 0 and going to immediate left neighbors, we obtain in the same fashion an interval U 0 = [c0 , d 0 ] with c0 < a < a0 < b < d 0 < b0 . We conclude that U 0 and U overlap, but are not connected in G0 . Consider now a particular choice for the overlapping intervals I and I 0 . We choose them such that the left endpoint of I is as small as possible. However, the left endpoint of U 0 is to the left of the left endpoint of I, and we have derived a contradiction.  It is easy to determine all immediate right neighbors by a linear time sweep over all intervals. We sort the intervals in decreasing order of left endpoint and then sweep over the intervals starting with the interval with rightmost left endpoint. We maintain a stack S of intervals, initially empty. If I1 = [a1 , b1 ], . . . , Ik = [ak , bk ] are the intervals on the stack with I1 being on the top of the stack, then a1 < a2 < . . . < ak and b1 < b2 < . . . < bk , I1 is the last interval processed, and I`+1 is the immediate right neighbor of I` if I` has right neighbors. If I` does not have right neighbors, a`+1 > b` . Let I = [a, b] be the next interval to be processed. Its immediate right neighbor is the 25 Algorithm 2 Finding a spanning forest of a overlap graph procedure SP(I = {[a0 , a00 ], . . . , [a` , a0` ]}) stack = [ ] sort I lexicographically in descending order for [l, r] in I do while stack not empty and r > top(stack) right endpoint do pop(stack) end while if stack not empty and r ≥ top(stack) left endpoint then connect [l, r], top(stack) end if push(stack, [l, r]) end for stack = [ ] sort I lexicographically in ascending order where the key for [l, r] is [r, l] for [l, r] in I do while stack not empty and l<top(stack) left endpoint do pop(stack) end while if stack not empty and l ≤ top(stack) right endpoint then connect [l, r], top(stack) end if push(stack, [l, r]) end for end procedure topmost interval I` on the stack with b` > b (if any). Hence we pop intervals I` from the stack while b > b` and then connect I to the topmost interval if b > a` , and push I. The determination of immediate left neighbors is symmetric. It remains to deal with intervals with equal endpoints. We do so by perturbation. It is easy to see that the following rules preserve the reachability by overlaps and eliminate equal endpoints. E.g., in (4), the two intervals are forced to overlap, so reaching one of the two intervals gives a path to the other; the same reasoning motivates (2) and (3). (1) if a left and a right endpoint are at the same coordinate, then the left endpoint is smaller than the right endpoint. (2) if two left endpoints are equal, the one belonging to the shorter interval is smaller. (3) if two right endpoints are equal, the one belonging to the shorter interval is larger. (4) if two intervals are equal, one is slightly shifted to the right. In other words, the endpoints of an interval Ii = [a, b] are replaced by ((a, −1, b − a, i) and (b, 1, b − a, i)) and comparisons are lexicographic. The perturbation need not be made explicitly, it can be incorporated into the sorting order and the conditions under which edges are added, as described in Algorithm 2. 26 B. Computing all 3-Vertex-Connected Components A pair of vertices {x, y} is a separation pair of G if G − x − y is disconnected. Similar to the edge-connectivity case, it suffices to compute all vertices that are contained in separation pairs of G in order to compute all 3-vertex-connected components of G. We assume that G is 2-vertex-connected and has minimum degree 3. For a rooted tree T of G and a vertex x ∈ G, let T (x) be the subtree of T rooted at x. The following lemmas show that separation pairs can only occur in chains. Weaker variants of Lemma 17 can be found in [11, 31, 32]. Lemma 17 Let T be a DFS-tree of a 2-connected graph G and C be a chain decomposition of G. For every separation pair {x, y} of G, x and y are contained in a common chain C ∈ C . Proof: The following simple observation will be useful. Let r be the root of T and let x 6= r be any vertex. Then for every t ∈ T (x) − x, there is a path P from t to a vertex s ∈ G − T (x) such that P consists only of vertices in T (x) − x ∪ s. We first prove that x and y are comparable in T , i.e., contained in a leaf-to-root path of T . Assume they are not. Then G − x − y consists of at most three connected components: one connected component containing the least common ancestor of x and y in T , and the at most two connected components that contain the proper descendants of x and y, respectively. According to the observation above, these components coincide, contradicting that {x, y} is a separation pair. Let x0 be the child of x in T that lies on the path y →T x. Clearly, if x0 = y, the chain containing the edge xy is a common chain containing x and y. Otherwise, x0 6= y. If x = r, then there is a back-edge rt such that t ∈ T (y), according to the fact that G − r is connected by T − r and due to the observation above. This back-edge rt implies that the first chain C that traverses a vertex of T (y) starts at r and, hence, contains x and y. In the remaining case, x0 6= y and x 6= r. Let st be a back-edge that connects an ancestor s of x with a descendant t of x0 (possibly x0 itself) such that s is minimal; this edge st exists, since G is 2-vertex-connected. According to [27], C1 is the only cycle in C and it follows that s < x. If t ∈ T (y), the first chain C in C that contains such a back-edge contains x and y and, hence, satisfies the claim. Otherwise, t is a vertex in T (x0 ) − T (y). Due to the back-edge st, G − x − T (y) is contained in one connected component of G − x − y. According to the observation above (applied on y), {x, y} can form a separation pair only if y has a child y0 such that all back-edges that end in T (y0 ) start either in T (y) or at x. Since G is 2-connected, there must be a back-edge from x to T (y0 ). The first chain C in C containing such a back-edge gives the claim, as it contains x and y.  Similar to edge-connectivity, the connected components of the overlap graph for Ci represent all vertices in separation pairs that are contained in Ci . The connected components of the overlap graph can be computed efficiently [26, Lemma 51]. After finding all these vertices for Ci , a simple modification allows the algorithm in [26, p. 508] to continue, ignoring all previously found separation pairs: For every separation pair {x, y}, x < y, that has been found when processing Ci , there is a vertex v strictly between x and y in Ci . Furthermore, by doing a preprocessing [26, Property B, p. 508] one can assume that t(Ci ) →T s(Ci ) also has an inner 27 vertex w. We eliminate every separation pair {x, y} after processing Ci by simply adding the new back-edge vw to G. As the new chain containing vw is just an edge, this does not harm future processing steps. According to Lemma 17, this gives all vertices in the graph that are contained in separation pairs. The 3-vertex-connected components can then be computed in linear time by iteratively splitting separation pairs and gluing together certain remaining structures, as shown in [9, 11]. 28
8cs.DS
1 Multi-Objective Weighted Sampling arXiv:1509.07445v6 [cs.DB] 13 Jun 2017 Edith Cohen Google Research Mountain View, CA, USA [email protected] 1 Abstract— Multi-objective samples are powerful and versatile summaries of large data sets. For a set of keys x ∈ X and associated P values fx ≥ 0, a weighted sample taken with respect to f allows us to approximate segment-sum statistics sum(f ; H) = x∈H fx , for any subset H of the keys, with statistically-guaranteed quality that depends on sample size and the relative weight of H . When estimating sum(g; H) for g 6= f , however, quality guarantees are lost. A multi-objective sample with respect to a set of functions F provides for each f ∈ F the same statistical guarantees as a dedicated weighted sample while minimizing the summary size. We analyze properties of multi-objective samples and present sampling schemes and meta-algortithms for estimation and optimization while showcasing two important application domains. The first are key-value data sets, where different functions f ∈ F applied to the values correspond to different statistics such as moments, thresholds, capping, and sum. A multi-objective sample allows us to approximate all statistics in F . The second is metric spaces, where keys are points, and each f ∈ F is defined by a set of points C with fx being the service cost of x by C , and sum(f ; X) models centrality or clustering cost of C . A multi-objective sample allows us to estimate costs for each f ∈ F . In these domains, multi-objective samples are often of small size, are efficiently to construct, and enable scalable estimation and optimization. We aim here to facilitate further applications of this powerful technique. F I NTRODUCTION Random sampling is a powerful tool for working with very large data sets on which exact computation, even of simple statistics, can be time and resource consuming. A small sample of the data allows us to efficiently obtain approximate answers. Consider data in the form of key value pairs {(x, fx )}, where keys x are from some universe X , fx ≥ 0, and we define fx ≡ 0 for keys x ∈ X that are not present in the data. Very common statistics over such data are segment sum statistics X fx , sum(f ; H) = x∈H 1 where H ⊂ X is a segment of X . Examples of such data sets are IP flow keys and bytes, users and activity, or customers and distance to the nearest facility. Segments may correspond to a certain demographic or location or other meta data of keys. Segment statistics in these example correspond respectively to total traffic, activity, or service cost of the segment. When the data set is large, we can compute a weighted sample which includes each key x with probability (roughly) proportional to fx and allows us to estimate segment sum statistics d (f ; H) for query segments H . Popular weighted sampling sum schemes [30], [32] include Poisson Probability Proportional to Size (pps) [21], VarOpt [5], [12], and the bottom-k schemes [28], [14], [15] Sequential Poisson (priority) [24], [17] and PPS without replacement (ppswor) [27]. These weighted samples provide us with nonnegative unbiased d (g; H) for any segment and g ≥ 0 (provided estimates sum that fx > 0 when gx > 0). For all statistics sum(f ; H) we obtain statistical guarantees on estimation quality: The error, measured by the coefficient of variation (CV), which is the standard deviation divided by the mean, is at most the inverse 1. The alternative term selection is used in the DB literature and the term domain is used in the statistics literature. of the square root of the size of the sample multiplied by the fraction sum(f ; H)/ sum(f, X ) of “ weight” that is due to the segment H . This trade-off of quality (across segments) and sample size are (worst-case) optimal. Moreover, the estimates are wellconcentrated in the Chernoff-Bernstein sense: The probability of an error that is c times the CV decreases exponentially in c. In many applications, such as the following examples, there are multiple sets of values f ∈ F that are associated with the keys: (i) Data records can come with explicit multiple weights, as with activity summaries of customers/jobs that specify both bandwidth and computation consumption. (ii) Metric objectives, such as our service cost example, where each configuration of facility locations induces a different set of distances and hence service costs. (iii) The raw data can be specified in terms of a set of key value pairs {(x, wx )} but we are interested in different functions fx ≡ f (wx ) of the values that correspond to different statistics such as function f (w) Statistics count f (w) = 1 for w > 0 sum f (w) = w threshold with T > 0 threshT (w) = Iw≥T moment with p > 0 f (w) = wp capping with T > 0 capT = min{T, w} Example 1.1. Consider a toy data set D: (u1, 5), (u3, 100), (u10, 23), (u12, 7), (u17, 1), (u24, 5), (u31, 220), (u42, 19), (u43, 3), (u55, 2) For a segment H with H ∩ D = {u3, u12, u42, u55}, we have sum(H) = 128, count(H) = 4, thresh10 (H) = 2, cap5 (H) = 17, and 2-moment(H) = 10414. For these applications, we are interested in a summary that can provide us with estimates with statistically guaranteed quality for each f ∈ F . The naive solutions are not satisfactory: We can compute a weighted sample taken with respect to a particular f ∈ F , but the quality of the estimates sum(g; H) rapidly 2 degrades with the dissimilarity between g and f . We can compute a dedicated sample for each f ∈ F , but the total summary size can be much larger than necessary. Multi-objective samples, a notion crystallized in [16]2 , provide us with the desired statistical guarantees on quality with minimal summary size. Multi-objective samples build on the classic notion of sample coordination [23], [4], [29], [7], [28], [25]. In a nutshell, coordinated samples are locality sensitive hashes of f , mapping similar f to similar samples. A multi-objective sample is (roughly) the S union S (F ) = f ∈F S (f ) of all the keys that are included in coordinated weighted samples S (f ) for f ∈ F . Because the samples are coordinated, the number of distinct keys included and hence the size of S (F ) is (roughly) as small as possible. Since for each f ∈ F , the sample S (F ) “includes” the dedicated sample S (f ) , the estimate quality from S (F ) dominates that of S (f ) . In this paper, we review the definition of multi-objective samples, study their properties, and present efficient sampling schemes. We consider both general sets F of objectives and families F with special structure. By exploiting special structure, we can bound the overhead, which is the increase factor in sample size necessary to meet multi-objective quality guarantees, and obtain efficient sampling schemes that avoid dependence of the computation on |F |. 1.1 Organization In Section 2 we review (single-objective) weighted sampling focusing on the Poisson pps and bottom-k sampling schemes. We then review the definitions [16] and establish properties of multi-objective samples. In Section 3 we study multi-objective pps samples. We show that the multi-objective sample size is also necessary for meeting the quality guarantees for segment statistics for all f ∈ F . We also show that the guarantees are met when we use upper bounds on the multi-objective pps sampling probabilities instead of working with the exact values. In Section 4 we study multi-objective bottom-k samples. In Section 5 we establish a fundamental property of multiobjective samples: We define the sampling closure F of a set of objectives F , as all functions f for which a multi-objective sample S (F ) meets the quality guarantees for segment statistics. Clearly F ⊂ F but we show that the closure F also includes every f that is a non-negative linear combination of functions from F . In Section 6, we consider data sets in the form of key value pairs and the family M of all monotone non-decreasing functions of the values. This family includes most natural statistics, such as our examples of count, sum, threshold, moments, and capping. Since M is infinite, it is inefficient to apply a generic multi-objective sampling algorithm to compute S (M ) . We present efficient near-linear sampling schemes for S (M ) which also apply over streamed or distributed data. Moreover, we establish a bound on the sample size of E[|S (M ) |] ≤ k ln n, where n is the number of keys in our data set and k is the reference size of the singleobjective samples S (f ) for each f ∈ M . The design is based on a surprising relation to All-Distances Sketches [7], [8]. Furthermore, we establish that (when key weights are unique), a sample of size Ω(k ln n) is necessary: Intuitively, the “hardness” stems from the need to support all threshold functions. In Section 7 we study the set C = {capT | T > 0} of all capping functions. The closure C includes all concave f ∈ M 2. The collocated model 0 00 with at most a linear growth (satisfy f (x) ≤ 1 and f (x) ≤ 0). Since C ⊂ M , the multi-objective sample S (M ) includes S (C) and provides estimates with statistical guarantees for all f ∈ C . The more specialized sample S (C) , however, can be much smaller than S (M ) . We design an efficient algorithm for computing S (C) samples. In Section 8 we discuss metric objectives and multi-objective samples as summaries of a set of points that allows us to approximate such objectives. In Section 9 we discuss different types of statistical guarantees across functions f in settings where we are only interested in statistics sum(f ; X ) over the full data. Our basic multi-objective samples analyzes the sample size required for ForEach, where d (f ; H) in the statistical guarantees apply to each estimate sum isolation. In particular, also to each estimate over the full data set. ForAll is much stronger and bounds the (distribution of) the d (f ; X ) for all f ∈ F . maximum relative error of estimates sum Meeting ForAll typically necessitates a larger multi-objective sample size than meeting ForEach. In section 10 we present a meta-algorithm for optimization over samples. The goal is to maximize a (smooth) function of sum(f ; X ) over f ∈ F . When X is large, we can instead perform the optimization over a small multi-objective sample of X . This framework has important applications to metric objectives and estimating loss of a model from examples. The ForOpt guarantee is for a sample size that facilitates such optimization, that is, the approximate maximizer over the sample is an approximate maximizer over the data set. This guarantee is stronger than ForEach but generally weaker than ForAll. We make a key observation that with a ForEach sample we are only prone to testable onesided errors on the optimization result. Based on that, we present an adaptive algorithm where the sample size is increased until ForOpt is met. This framework unifies and generalizes previous work of optimization over coordinated samples [13], [11]. We conclude in Section 11. 2 W EIGHTED SAMPLING ( SINGLE OBJECTIVE ) We review weighted sampling schemes with respect to a set of values fx , focusing on preparation for the multi-objective generalization. The schemes are specified in terms of a samplesize parameter k which allows us to trade-off representation size and estimation quality. 2.1 Poisson Probability Proportional to Size (pps) The pps sample S (f,k) includes each key x independently with probability fx p(f,k) = min{1, k P }. (1) x y fy Example 2.1. The table below lists pps sampling probabilities (f,3) px (k = 3, rounded to the nearest hundredth) for keys in our example data for sum (fx = wx ), thresh10 (fx = Iwx ≥10 ), and cap5 (fx = P min{5, wx }). The number in parenthesis is sum(f, X ) = x fx . We can see that sampling probabilities highly vary between functions f . key wx sum (385) thresh10 (4) cap5 (41) u1 5 0.04 0.00 0.37 u3 100 0.78 0.75 0.37 u10 23 0.18 0.75 0.37 u12 7 0.05 0.00 0.37 u17 1 0.01 0.00 0.07 u24 5 0.04 0.00 0.37 u31 220 1.00 0.75 0.37 u42 19 0.15 0.75 0.37 u43 3 0.02 0.00 0.22 u55 2 0.02 0.00 0.15 PPS samples can be computed by association a random value ux ∼ U [0, 1] with each key x and including the key in the sample 3 (f,k) px . if ux ≤ This formulation to us when there are multiple objectives as it facilitates the coordination of samples taken with respect to the different objectives. Coordination is achieved using the same set ux . 2.2 Bottom-k (order) sampling Bottom-k sampling unifies priority (sequential Poisson) [24], [17] and pps without replacement (ppswor) sampling [27]. To obtain a bottom-k sample for f we associate a random value ux ∼ U [0, 1] with each key. To obtain a ppswor sample we use rx ≡ − ln(1 − ux ) and to obtain a priority sample we use rx ≡ ux . The bottomk sample S (f,k) for f contains the k keys with minimum f -seed, where rx f -seed(x) ≡ . fx To support estimation, we also retain the threshold, τ (f,k) , which is defined to be the (k + 1)st smallest f -seed. 2.3 Theorem 2.1. For pps samples and the estimator (2), s ρ(f, g) d (g; H)] ≤ ∀g∀H, CV [sum . (g) q (H)k For bottom-k samples, we replace k by k − 1. The proof for ρ = 1 is standard for pps, provided in [7], [8] for ppswor, and in [31] for priority samples. The proof for ρ ≥ 1 for ppswor is provided in Theorem A.1. The proof for pps is simpler, using a subset of the arguments. The proof for priority can be obtained by generalizing [31]. Moreover, the estimates obtained from these weighted sample are concentrated in the Chernoff-Hoeffding-Bernstein sense. We provide the proof for the multiplicative form of the bound and for Poisson pps samples: Theorem 2.2. For δ ≤ 1, Estimators We estimate a statistics sum(g; H) from a weighted sample S (f,k) using the inverse probability estimator [22]: X gx d (g; H) = . (2) sum (f,k) x∈H∩S px The estimate is always nonnegative and is unbiased when the functions satisfy gx > 0 =⇒ fx > 0 (which ensures that any key x with gx > 0 is sampled with positive probability). To (f,k) apply this estimator, we need to compute px Pfor x ∈ S . To do so with pps samples (1) we include the sum x fx with S as auxiliary information. For bottom-k samples, inclusion probabilities of keys are not readily available. We therefore use the inverse probability (f,k) estimator (2) with conditional probabilities px [17], [15]: A key x, fixing the randomization uy for all other keys, is sampled if and only if f -seed(x) < t, where t is the k th smallest f seed among keys y 6= x. For x ∈ S (f,k) , the k th smallest f -seed among other keys is t = τ (f,k) , and thus   rx (f,k) p(f,k) = Pr < τ . (3) x ux ∼U [0,1] fx Note that the right hand side expression for probability is equal to 1−e−fx t with ppswor and to min{1, fx t} with priority sampling. 2.4 The disparity always satisfies ρ(f, g) ≥ 1 and we have equality ρ(f, g) = 1 only when g is a scaling of f , that is, equal to g = cf for some c > 0. We obtain the following upper bound: Estimation quality We consider the variance and concentration of our estimates. A natural measure of estimation quality of our unbiased estimates is the coefficient of variation (CV), which is the ratio of the standard deviation to the mean. We can upper bound the CV of our estimates (2) of sum(g; H) in terms of the (expected) sample size k and the relative g -weight of the segment H , defined as q (g) (H) = sum(g; H) . sum(g; X ) To be able to express a bound on the CV when we estimate a statistics sum(g; H) using a weighted sample taken with respect to f , we define the disparity between f and g as ρ(f, g) = max x fx gx max . gx x fx d (g; H) − sum(g; H)| > δ sum(g; H)] Pr[|sum ≤ 2 exp(−q (g) (H)kρ−2 δ 2 /3) . For δ > 1, d (g; H) − sum(g; H) > δ sum(g; H)] Pr[sum ≤ exp(−q (g) (H)kρ−2 δ/3) . Proof. Consider Poisson pps sampling and the inverse probability (f,k) estimator. The contribution of keys that are sampled with px = 1 is computed exactly. Let the contribution of these keys be (1 − α) sum(g; H), for some α ∈ [0, 1]). If α = 0, the estimate is the exact sum and we are done. Otherwise, it suffices to estimate the remaining α sum(g; H) with relative error δ 0 = δ/α. Consider the remaining keys, which have inclusion probabili(f,k) ties px ≥ kfx / sum(f ). The contribution of such a key x to the estimate is 0 if x is not sampled and is gx ≤ ρ(f, g) sum(f )/k (f,k) px when x is sampled. Note that by definition sum(g; H) = q (g) (H) sum(g) ≥ q (g) (H) sum(f )/ρ(f, g) . We apply the concentration bounds to the sum of random variables in the range [0, ρ(f, g) sum(f )/k]. To use the standard form, we can normalize our random variables and to have range [0, 1] and accordingly normalize the expectation α sum(g; H) to obtain µ=α sum(g; H) ≥ αq (g) (H)ρ(f, g)−2 k . ρ(f, g) sum(f )/k] We can now apply multiplicative Chernoff bounds for random variables in the range [0, 1] with δ 0 = δ/α and expectation µ. The formula bounds the probability of relative error that exceeds δ by 2 exp(−δ 2 µ/3 when δ < 1 and by exp(−δµ/3 when δ > 1. 2.5 Computing the sample Consider data presented as streamed or distributed elements of the form of key-value pairs (x, fx ), where x ∈ X and fx > 0. We define fx ≡ 0 for keys x that are not in the data. An important property of our samples (bottom-k or pps) is that they are composable (mergeable). Meaning that a sample of 4 the union of two data sets can be computed from the samples of the data sets. Composability facilitates efficient streamed or distributed computation. The sampling algorithms can use a random hash function applied to key x to generate ux – so seed values can be computed on the fly from (x, fx ) and do not need to be stored. With bottom-k sampling we permit keys x to occur in multiple elements, in which case we define fx to be the maximum value of elements with key x. The sample S(D) of a set D of elements contains the pair (x, fx ) for the k + 1 (unique) keys with smallest S fS-seeds 3 The sample of the union i Di is obtained from i S(Di ) by first replacing multiple occurrences of a key with the one with largest f (w) and then returning the pairs for the k + 1 keys with smallest f -seeds. With pps sampling, the informationPwe store with our sample S(D) includes the sum sum(f ; D) ≡ x∈D fx and the sampled pairs (x, fx ), which are those with ux ≤ kfx / sum(f ; D). Because we need to accurately track the sum, we require S that elements have unique keys. The sample P of a union D = i Di is obtained using theSsum sum(f ; D) = i sum(f ; Di ), and retaining only keys in i S(Di ) that satisfy ux ≤ kfx / sum(f ; D). 3 M ULTI - OBJECTIVE PPS SAMPLES Our objectives are specified as pairs (f, kf ) where f ∈ F is a function and kf specifies a desired estimation quality for sum(f ; H) statistics, stated in terms of the quality (Theorem 2.1 and Theorem 2.2) provided by a single-objective sample for f with size parameter kf . To simplify notation, we sometimes omit kf when clear from context. A multi-objective sample S (F ) [16] is defined by considering dedicated samples S (f,kf ) for each objective that are coordinated. The dedicated samples are coordinating by using the same randomization, which is the association ofSux ∼ U [0, 1] with keys. The multi-objective sample S (F ) = f ∈F S (f,kf ) contains all keys that are included in at least one of the coordinated dedicated samples. In the remaining part of this section we study pps samples. Multi-objective bottom-k samples are studied in the next section. (F ) (F ) x px P is |S | = = 4.68. The naive solution of maintaining a separate dedicated sample for each objective would have total expected size 8.29 (Note that the dedicated expected sample size for sum is 2.29 and for thresh10 , and cap5 it is 3. To estimate a statistics sum(g; H) from S (F ) , we apply the inverse probability estimator X gx d (g; H) = sum . (5) (F ) x∈S (F ) ∩H px (F ) using the probabilities px (4). (F ) To compute the estimator (5), we need to know px when (F ) x ∈ S . These probabilities can be computed if we maintain P the sums sum(f ) = x fx for f ∈ F as auxiliary information and we have fx available to us when x ∈ S (f,kf ) . (F ) In some settings it is easier to obtain upper bounds πx ≥ px on the multi-objective pps inclusion probabilities, compute a Poisson sample using πx , and apply the respective inverse-probability estimator X gx d (g; H) = sum . (6) π x∈S∩H x Side note: It is sometime useful to use other sampling schemes, in particular, VarOpt (dependent) sampling [5], [20], [12] to obtain a fixed sample size. The estimation quality bounds on the CV and concentration also hold with VarOpt (which has negative covariances). 3.1 Multi-objective pps estimation quality Lemma 3.1. A multi-objective pps sample for F includes each key x independently with probability We show that the estimation quality, in terms of the bounds on the CV and concentration, of the estimator (5) is at least as good as that of the estimate we obtain from the dedicated samples. To do so we prove a more general claim that holds for any Poisson sampling scheme that includes each key x in the sample S with probability πx ≥ p(f,kf ) and the respective inverse probability estimator (6). The following lemma shows that estimate quality can only improve when inclusion probabilities increase: kf fx ) }. p(F = min{1, max P x f ∈F y fy d (g; H)] of (6) and hence Lemma 3.3. The variance var[sum d (g; H)] are non-increasing in πx . CV [sum (4) Proof. Consider coordinated dedicated pps samples for f ∈ F obtained using the same set {ux }. The key x is included in at least one of the samples if and only if the value ux is at most the maximum over objectives (f, kf ) of the pps inclusion probability for that objective: ux kf fx f) ≤ max p(f,k = max min{1, P } x f ∈F f ∈F y fy kf fx = min{1, max P }. f ∈F y fy Since ux are independent, so are the inclusion probabilities of different keys. Example 3.2. Consider the three objectives: sum, thresh10 , and cap5 all with k = 3 as in Example 2.1. The expected size of S (F ) 3. When keys are unique to elements it suffices to keep only the (k + 1)st smallest f -seed without the pair (x, fx ). Proof. For each key x consider the inverse probability estimator ĝx = gx /πx when x is sampled and ĝx = 0 otherwise. Note that var[ĝx ] = gx2 (1/π Px − 1), which is decreasing with πx . We d (g; H)] = have sum x∈H ĝx . When covariances between ĝx are nonpositive, which is the case in particular with independet P d (g; H)] = x∈H var[ĝx ] and the inclusions, we have var[sum claim follows as it applies to each summand. We next consider concentration of the estimates. Lemma 3.4. The concentration claim of Theorem 2.2 carries over when we use the inverse probability estimator with any sampling (f,k) probabilities that satisfy πx ≥ px for all x. Proof. The generalization of the proof is immediate, as the range of the random variables fˆx can only decrease when we increase the inclusion probability. 5 3.2 Uniform guarantees across objectives An important special case is when kf = k for all f ∈ F , that is, we seek uniform statistical guarantees for all our objectives. We use the notation S (F,k) for the respective multi-objective sample. We can write the multi-objective pps probabilities (4) as fx p(F,k) = min{1, k max P } = min{1, kp(F,1) }. x x f ∈F y fy The P last equality follows when recalling the definitions of fx / y fy and hence must be 0. When it is, uniform estimate minimize the variance. If the key is included with probability p, the CV of the estimate is d (f ; {x})] = (1/p − 1)0.5 . CV [sum From the requirement (1/p − 1)0.5 ≤ 1/(qk)0.5 , we obtain that qk p ≥ qk+1 . (7) (f,1) px 4 = fx . p(F,1) = max p(f,1) = max P x x f ∈F f ∈F y fy (f,1) We refer to px as the base pps probabilities for f . Note that the base pps probabilities are rescaling of f and pps probabilities (F,1) are invariant to this scaling. We refer to px as the multiobjective base pps probabilities for F . Finally, for a reason that will soon be clear, we refer to the sum X p(F,1) h(pps) (F ) ≡ x x as the multi-objective pps overhead of F . It is easy to see that h(F ) ∈ [1, |F |] and h(F ) is closer to 1 when all objectives in F are more similar. We can write (F,1) px kp(F,1) = (kh(F )) P (F,1) . x x px That is, the multi-objective pps probabilities (7) are equivalent to single-objective pps probabilities with size parameter kh(F ) (F,1) computed with respect to base probability “weights” gx = px . M ULTI - OBJECTIVE BOTTOM -k SAMPLES The sample S (F ) is defined with respect to random {ux }. Each dedicated sample S (f,kf ) includes the kf lowest f -seeds, computed using {ux }. S (F ) accordingly includes all keys that have one of the kf lowest f -seeds for at least one f ∈ F . To estimate statistics sum(g; H) from bottom-k S (F ) , we again apply the inverse probability estimator (5) but here we use (F ) the conditional inclusion probability px for each key x [16]. This is the probability (over ux ∼ U [0, 1]) that x ∈ S (F ) , when fixing uy for all y 6= x to be as in the current sample. Note that ) ) p(F = max p(f x x , f ∈F (f ) where px are as defined in (3). (F ) In order to compute the probabilities px for x ∈ (F ) S , it always suffices to maintain the slightly larger sample S (f,kf +1) S . For completeness, we show that it suffices to f ∈F S instead maintain with S (F ) ≡ f ∈F S (f,kf ) a smaller (possibly S empty) set Z ⊂ f ∈F S (f,kf +1) \ S (F ) of auxiliary keys. We now define the set Z and show how inclusion probabilities can be computed from S (F ) ∪ Z . For a key x ∈ S (F ) , we denote by g (x) = arg max f ∈F |x∈S (f ) ) p(f x (g (x) ) Side note: We can apply any single-objective weighted sampling (F,1) scheme such as VarOpt or bottom-k to the weights px , or to (F,1) upper-bounds πx ≥ px P on these weights while adjusting the sample size parameter to k x πx . the objective with the most forgiving threshold for x. If px < 1, let yx be the key with (k + 1) smallest g -seed (otherwise yx is not defined). The auxiliary keys are then Z = {yx | x ∈ S (F ) } \ S (F ) . We use the sample and auxiliary keys S (F ) ∪Z as follows to compute the inclusion probabilities: We first compute for each f ∈ F , τf0 , which is the kf + 1 smallest f -seed of keys in S (F ) ∪ Z . 3.3 For each x ∈ S (F ) , we then use px Lower bound on multi-objective sample size The following theorem shows that any multi-objective sample for F that meets the quality guarantees on all domain queries for (f, kf ) must include each key x with probability at least p(f,1) kf x (f,1) px kf +1 ≥ 1 (f,kf ) . 2 px (f,1) Moreover, when px kf  1, then (f,k ) the lower bound on inclusion probability is close to px f . This implies the multi-objective pps sample size is necessary to meet the quality guarantees we seek (Theorem 2.1). Theorem 3.1. Consider a sampling scheme that for weights f supports estimators that satisfy for each segment H q d (f ; H)] ≤ 1/ q (f ) (H)k . CV [sum Then the inclusion probability of a key x must be at least px ≥ p(f,1) k 1 ≥ min{1, p(f,1) k} . 2 p(f,1) k + 1 Proof. Consider a segment P of a single key H = {x}. Then p(f,1) ≡ q (f ) (H) = fx / y fy ≡ q . The best nonnegative unbiased sum estimator is the HT estimator: When the key is not sampled, there is no evidence of the segment and the estimate priority) or (F ) = maxf ∈F f (wx )τf0 (for (F ) px = 1 − exp(− maxf ∈F f (wx )τf0 ) (for ppswor). (F ) px are correctly computed, note that while we can (f,kf ) To see that have τf0 > τ for some f ∈ F (Z may not include the threshold keys of all the dedicated samples S (f,kf ) ), our definition of Z ensures that τf0 = τ (f,kf ) for f such that there is at least one (g (x) ) < 1. x where f = g (x) and px Composability: Note that multi-objective samples S (F ) are composable, since they are a union of (composable) single-objective samples S (f ) . It is not hard to see that composability applies with the auxiliary keys: The set of auxiliary keys in the composed sample must be a subset of sampled and auxiliary keys in the components. Therefore, the sample itself includes all the necessary state for streaming or distributed computation. Estimate quality: We can verify that for any f ∈ F and x, for (F ) (f ) any random assignment {uy } for y 6= x, we have px ≥ px . Therefore (applying Lemma 3.3 and noting zero covariances[15]) the variance and the CV are at most that of the estimator (2) applied to the bottom-kf sample S (f ) . To summarize, we obtain the following statistical guarantees on estimate quality with multiobjective samples: 6 Theorem 4.1. For each H and g , the inverse-probability estimator applied to a multi-objective pps sample S (F ) has s ρ(f, g) d (g; H)] ≤ min CV [sum . f ∈F q (g) (H)kf The estimator applied to a multi-objective bottom-k samples has the same guarantee but with (kf − 1) replacing kf . P Sample size overhead: We must have E[|S (F ) |] ≤ f ∈F kf . The worst-case, where the size of S (F ) is the sum of the sizes of the dedicated samples, materializes when functions f ∈ F have disjoint supports. The sample size, however, can be much smaller when functions are more related. With uniform guarantees (kf ≡ k ), we define the multiobjective bottom-k overhead to be (2) g ). For convenience denote α = g can write (1) fx f (X ) (2) (X )/g (1) (X ). Then we (2) = gx + gx g (1) (X ) + g (2) (X ) = (1 + cα)gx 1 + cα gx = (1) 1 + α g (1) (X ) (1 + α)g (X ) ≤ gx gx gx = max{ (1) , }. g (1) (X ) g (X ) g (2) (X ) (1) (1) (1) (1) (g (1) ,k) (f,k) (g (2) ,k) (2) (F,k) Therefore px ≤ max{px , px } ≤ px . The proof for multi-objective bottom-k samples is more involved, and deferred to the full version. Note that the multiobjective bottom-k sample S (F,k) may not include a bottom-k sample S (f,k) , but it is still possible to bound the CV. h(botk) (F ) ≡ E[|S (F ) |]/k . This is the sample size overhead of a multi-objective versus a dedicated bottom-k sample. pps versus bottom-k multi-objective sample size: For some sets F , with the same parameter k , we can have much larger multiobjective overhead with bottom-k than with pps. A multi-objective pps samples is the smallest sample that can include a pps sample for each f . A multi-objective bottom-k sample must include a bottom-kf sample for each f . Consider a set of n > k keys. For each subset of n/2 keys we define a function f that is uniform on the subset and 0 elsewhere. It is easy to see that in this case h(pps) (F ) = 2 whereas h(botk) (F ) ≥ (n/2 + k)/k Computation: When the data has the form of elements (x, wx ) with unique keys and fx = f (wx ) for a set of functions F , then short of further structural assumptions on F , the sampling algorithm that computes S (F ) must apply all functions f ∈ F to all elements. The computation is thus Ω(|F |n) and can be O(|F |n + |S (F ) | log k) time by identifying for each f ∈ F , the k keys with smallest f -seed(x). In the sequel we will see examples of large or infinite sets F but with special structure that allows us to efficiently compute a multi-objective sample. 6 T HE S AMPLING C LOSURE We define the sampling closure F of a set of functions F to be the set of all functions f such that for all k and for all H , the estimate of sum(f ; H) from S (F,k) has the CV bound of Theorem 2.1. Note that this definitions is with respect to uniform guarantees (same size parameter k for all objectives). We show that the closure of F contains all non-negative linear combinations of functions from F . P Theorem 5.1. Any f = g∈F αg g where αg ≥ 0 is in F . Proof. We first consider pps samples, where we establish the stronger claim S (F ∪{f },k) = S (F,k) , or equivalently, for all keys x, p(f,k) ≤ p(F,k) . (8) x x P For a function g , we use the notation g(X ) = y gy , and recall (g,k) that px gx = min{1, k g(X ) }. We first consider f = cg for some (f,k) (g,k) (F,k) g ∈ F . In this case, px = px ≤ px and (8) follows. To complete the proof, it suffices to establish (8) for f = g (1) + g (2) g (2) g (1) such that g (1) , g (2) ∈ F . Let c be such that g(2)x(X ) = c g(1)x(X ) we can assume WLOG that c ≤ 1 (otherwise reverse g (1) and UNIVERSAL SAMPLE FOR MONOTONE STATISTICS In this section we consider the (infinite) set M of all monotone non-decreasing functions and the objectives (f, k) for all f ∈ M . We show that the multi-objective pps and bottom-k samples S (M,k) , which we refer to as the universal monotone sample, are larger than a single dedicated weighted sample by at most a logarithmic factor in the number of keys. We will also show that this is tight. We will also present efficient universal monotone bottom-k sampling scheme for streamed or distributed data. We take the following steps. We consider the multi-objective sample S (thresh,k) for the set thresh of all threshold functions (recall that threshT (x) = 1 if x ≥ T and threshT = 0 (thresh,k) otherwise). We express the inclusion probabilities px and bound the sample size. Since all threshold functions are monotone, thresh ⊂ M . We will establish that S (thresh,k) = S (M,k) .4 We start with the simpler case of pps and then move on to bottom-k samples. 6.1 5 T HE Universal monotone pps Theorem 6.1. Consider a data set D = {(x, wx )} of n keys and the sorted order of keys x by non-increasing wx . Then a key x that is in position i in the sorted order has base multi-objective pps probability p(xthresh,1) = px(M,1) ≤ 1/i . When all keys have unique weights, equality holds. Proof. Consider the function threshwx . The function has weight 1 on all the ≥ i keys with weight ≥ wx . Therefore, the base (threshwx ,1) pps probability is px ≤ 1/i. When the keys have unique weights then there are exactly i keys y with weight wy ≥ wx (threshwx ,1) and we have px = 1/i. If we consider all threshold 4. We observe that M = thresh. This follows from Theorem 5.1, after noticing that any f ∈ M can be expressed as a non-negative combination of threshold functions Z ∞ f (y) = α(T ) thresh(y)dT , 0 T for some function α(T ) ≥ 0. We establish here the stronger relation S (thresh,k) = S (M,k) . 7 (threshT ,1) px functions, then = 0 when T > wx and 1/i when T ≤ wx . Therefore, (threshT ,1) px ≤ x ,1) p(xthresh,1) = max p(xthreshT ,1) = p(w = 1/i . x T We now consider an arbitrary monotone function fx = f (wx ). From monotonicity there are at least i keys with fy ≥ fx P P (f,1) therefore, fx / y fy ≤ 1/i. Thus, px = fx / y fy ≤ 1/i and p(M,1) = max p(f,1) ≤ 1/i . x x f ∈M There is a simple main-memory sampling scheme where we sort the keys, compute the probabilities p(M,1) and then p(M,k) = min{1, kp(M,1) } and compute a sample accordingly. We next present universal monotone bottom-k samples and sampling schemes that are efficient on streamed or distributed data. 6.2 Universal monotone bottom-k Theorem 6.2. Consider a data set D = {(x, wx )} of n keys. The universal monotone bottom-k sample has expected size E[|S (M,k) |] ≤ k ln n and can be computed using O(n + k log n log k) operations. For a particular T , the bottom-k sample S (threshT ,k) is the set of k keys with smallest ux among keys with wx ≥ T . The set of keys in the multi-objective sample is S (thresh,k) = S (threshT ,k) . We show that a key x is in the multi-objective T >0 S sample for thresh if and only if it is in the bottom-k sample for threshwx : Lemma 6.1. Fixing {uy }, for any key x, x ∈ S (thresh,k) ⇐⇒ x ∈ S (threshwx ,k) . Proof. Consider the position t(x, T ) of x in an ordering of keys y induced by threshT -seed(y). We claim that if for a key y we have threshT -seed(x) < threshT -seed(y) for some T > 0, this must hold for T = wx . The claim can be established by separately considering wy ≥ wx and wy < wx . The claim implies that t(x, T ) is minimized for T = wx . We now consider the auxiliary keys Z associated with this sample. Recall that these keys are not technically part of the sample but the information (ux , wx ) for x ∈ Z is needed in (thresh,k) order to compute the conditional inclusion probabilities px for x ∈ S . Note that it follows from Lemma 6.1 that for all keys x, (threshwx ,k) (thresh,k) px = px . For a key x, let Yx = {y 6= x | wy ≥ wx } be the set of keys other than x that have weight that is at least that of x. Let yx be the key with k th smallest ux in Yx , when |Yx | ≥ k . The auxiliary keys are Z = {yx | x ∈ S} \ S . A key x is included in the sample with probability 1 if yx is not defined (which means it has one of the k largest weights). Otherwise, it is (conditionally) included if and only if ux < uyx . To compute (thresh,k) the inclusion probability px from S ∪ Z , we do as follows. If there are k or fewer keys in S ∪ Z with weight that is at most (thresh,k) wx , then px = 1 (For correctness, note that in this case all keys with weight ≥ wx would be in S .) Otherwise, observe that yx is the key with (k + 1)th smallest u value in S ∪ Z among all keys y with wy ≥ wx . We compute yx from the sample and use (thresh,k) px = uyx . Note that when weights are unique, Z = ∅. (thresh,k) The definition of S is equivalent to that of an AllDistances Sketch (ADS) computed with respect to weights wx (as inverse distances) [7], [8], and we can apply some algorithms and analysis. In particular, we obtain that E[|S (thresh,k) |] ≤ k ln n and the size is well-concentrated around this expectation. The argument is simple: Consider keys ordered by decreasing weight. The probability that the ith key has one of the k smallest ux values, and thus is a member of S (thresh,k) is at most min{1, k/i}. Summing the expectations over all keys we obtain Pn min{1, k/i} < k ln n. We shall see that the bound is i=1 asymptotically tight when weights are unique. With repeated weights, however, the sample size can be much smaller.5 Lemma 6.2. For any data set {(x, wx )}, when using the same randomization {ux } to generate both samples, S (M,k) = S (thresh,k) . Proof. Consider f ∈ M and the samples obtained for some fixed randomization uy for all keys y . Suppose that a key x is in the bottom-k sample S (f,k) . By definition, we have that f seed(x) = rx /f (wx ) is among the k smallest f -seeds of all keys. Therefore, it must be among the k smallest f -seeds in the set Y of keys with wy ≥ wx . From monotonicity of f , this implies that rx must be one of the k smallest in {ry | y ∈ Y }, which is the same as ux being one of the k smallest in {uy | y ∈ Y }. This implies that x ∈ S (threshwx ,k) . 6.3 Estimation quality The estimator (5) with the conditional inclusion probabilities (M,k) px generalizes the HIP estimator of [8] to sketches computed for non-unique weights. Theorem 4.1 implies that for any f ∈ M 1 d (f ; H)] ≤ √ and H , CV [sum . When weights are (f ) q (H)(k−1) unique and we estimate statistics over all keys, we have the tighter d (f ; X )] ≤ √ 1 [8]. bound CV [sum 2k−1 6.4 Sampling algorithms The samples, including the auxiliary information, are composable. Composability holds even when we allow multiple elements to have the same key x and interpret wx to be the maximum weight over elements with key x. To do so, we use a random hash function to generate ux consistently for multiple elements with the same key. To compose multiple samples, we take a union of the elements, replace multiple elements with same key with the one of maximum weight, and apply a sampling algorithm to the set of remaining elements. The updated inclusion probabilities can be computed from the composed sample. We present two algorithms that compute the sample S (M,k) along with the auxiliary keys Z and the inclusion probabilities (M,k) for x ∈ S (M,k) . The algorithms process the elements px either in order of decreasing wx or in order of increasing ux . These two orderings may be suitable for different applications and it is worthwhile to present both: In the related context of alldistances sketches, both ordering on distances were used [7], [26], [3], [8]. The algorithms are correct when applied to any set of n elements that includes S ∪ Z . Recall that the inclusion probability (M,k) px is the k th smallest ux among keys with wx ≤ w. Therefore, all keys with the same weight have the same inclusion 5. The sample we would obtain with repeated weights is always a subset of the sample we would have obtained with tie breaking. In particular, the sample size can be at most k times the number of unique weights. 8 probability. For convenience, we thus express the probabilities as a function p(w) of the weights. Algorithm 1 Universal monotone sampling: Scan by weight Initialize empty max heap H of size k ; // k smallest uy values processed so far ptau ← +∞; ; // ** omit with unique weights for (x, wx ) by decreasing wx then increasing ux order do if |H| < k then S ← S ∪ {x}; Insert ux to H ; p(wx ) ← 1; Continue if ux < max(H) then S ← S ∪ {x}; p(wx ) ← max(H) ; // x is sampled ptau ← max(H); prevw ← wx ; // ** Delete max(H) from H Insert ux to H else // ** if ux < ptau and wx = prevw then Z ← Z ∪ {x}; p(wx ) ← ux Algorithm 1 processes keys by order of decreasing weight, breaking ties by increasing ux . We maintain a max-heap H of the k smallest uy values processed so far. When processing a current key x, we include x ∈ S if ux < max(H). If including x, we delete max(H) and insert ux into H . Correctness follows from H being the k smallest u values of keys with weight at least wx . When weights are unique, the probability p(wx ) is the k th largest u value in H just before x is inserted. When weights are not unique, we also need to compute Z . To do so, we track the previous max(H), which we call ptau. If the current key x has ux ∈ (max(H), ptau), we include x ∈ Z . It is easy to verify that in this case, p(wx ) = ux . Note that the algorithm may overwrite p(w) multiple times, as keys with weight w are inserted to the sample or to Z . Algorithm 2 processes keys in order of increasing ux . The algorithm maintains a min heap H of the k largest weights processed so far. With unique weights, the current key x is included in the sample if and only if wx > min(H). If x is included, we delete from the heap H the key with weight min(H) and insert x. When weights are not unique, we also track the weight w of the previous removed key from H . When processing a key x then if wx = min(H) and wx > prevw then x is inserted to Z . The computed inclusion probabilities p(w) with unique weights is uy , were y is the key whose processing triggered the deletion of the key x with weight w from H . To establish correctness, consider the set H , just after x is deleted. By construction, H contains the k keys with weight wy < wx that have smallest u values. Therefore, p(wx ) = maxy∈H uy . Since we process keys by increasing uy , this maximum u value in H is the value of the most recent inserted key, that is, the key y which triggered the removal of x. Finally, the keys that remain in H in the end are those with the k largest weights. The algorithms correctly assigns p(wx ) = 1 for these keys. When multiple keys can have the same weight, then p(w) is the minimum of maxy∈H uy after the first key of weight w is evicted, and the minimum uz of a key z with wz = w that was not sampled. If the minimum is realized at such a key z , that key is included in Z , and the algorithm set p(w) accordingly when z is processed. If p(w) is not set already when the first key of weight w is deleted from H , the algorithm correctly assigns p(w) to be maxy∈H uy . After all keys are processed, p(wx ) is set for remaining keys x ∈ H where a key with the same weight was previously deleted from H . Other keys are assigned p(w) = 1. We now analyze the number of operations. With both algorithms, the cost of processing a key is O(1) if the key is not inserted and O(log k) if the key is included in the sample. Using the bound on sample size, we obtain a bound of O(n + k ln n log k) on processing cost. The sorting requires O(n log n) computation, which dominates the computation (since typically k  n). When ux are assigned randomly, however, we can generate them with a sorted order by ux in O(n) time, enabling a faster O(n + k log k log n) computation. Algorithm 2 Universal monotone sampling: Scan by u H ←⊥ ; // min heap of size k, prioritized by lex order on (wy , −uy ), containing keys with largest priorities processed so far prevw ←⊥ for x by increasing ux order do if |H| < k then S ← S ∪ {x}; Insert x to H ; Continue y ← arg minz∈H (wz , −uz ) ; // The min weight key in H with largest uz if wx > wy then S ← S ∪ {x} ; // Add x to sample prevw ← wy if p(prevw) =⊥ then p(prevw) ← ux Delete y from H Insert x to H ; else // ** if wx = wy and wx > prevw then Z ← Z ∪ {x}; p(wx ) ← ux for x ∈ H do // keys with largest weights if p(wx ) =⊥ then p(wx ) ← 1 6.5 Lower bound on sample size We now show that the worst-case factor of ln n on the size of universal monotone sample is in a sense necessary. It suffices to show this for threshold functions: Theorem 6.3. Consider data sets where all keys have unique weights. Any sampling scheme with a nonnegative unbiased estimator that for all T > 0 and H has q d (thresh; H)] ≤ 1/ q (threshT ) (H)k , CV [sum T must have samples of expected size Ω(k ln n). Proof. We will use Theorem 3.1 which relates estimation quality to sampling probabilities. Consider the key x with the ith heaviest weight. Applying Theorem 3.1 to x and threshwx we obtain that k px ≥ k+i Summing the sampling probabilities over all keys P i ∈ [n]Pto bound the expected sample size we obtain x px ≥ 1 k ni=1 k+i = k(Hn − Hk ) ≈ k(ln n − ln k) . 7 T HE UNIVERSAL CAPPING SAMPLE An important strict subset of monotone functions is the set C = {capT | T > 0} of capping functions. We study the multi-objective bottom-k sample S (C,k) , which we refer to as the 9 universal capping sample. From TheoremR 5.1, the closure of C ∞ includes all functions of the form f (y) = 0 α(T ) capT (y)dT , for some α(T ) ≥ 0. This is the set of all non-decreasing concave functions with at most a linear growth, that is f (w) that satisfy df d2 f dw ≤ 1 and dw ≤ 0. We show that the sample S (C,k) can be computed using O(n+ k log n log k) operaions from any D0 ⊂ D that is superset of the keys in S (C,k) . We start with properties of S (C,k) which we will use to design our sampling algorithm. For a key x, let hx be the number h of keys with wy ≥ wx and uy < ux . Let `x be the number of keys y with wy < wx and ry /wy < rx /wx . For a key x and T > 0 and fixing the assignment {uy } for all keys y , let t(x, T ) be the position of capT -seed(x) in the list of values capT -seed(y) for all y . The function t has the following properties: Lemma 7.1. For a key x, t(x, T ) is minimized for T = wx . Moreover, t(x, T ) is non-decreasing for T ≥ wx and nonincreasing for T ≤ wx . Proof. We can verify that for any key y such that there is a T > 0 such that the capT -seed(x) < capT -seed(y), we must have capwx -seed(x) < capwx -seed(y). Moreover, the set of T values where capT -seed(x) < capT -seed(y) is an interval which contains T = wx . We can establish the claim by separately considering the cases wy ≥ wx and wy < wx . As a corollary, we obtain that a key is in the universal capping sample only if it is in the bottom-k sample for capwx : Corollary 7.2. Fixing {uy }, for any key x, x ∈ S (C,k) ⇐⇒ x ∈ S (capwx ,k) . Lemma 7.3. Fixing the assignment {ux }, x ∈ S (C,k) ⇐⇒ `x + hx < k . Proof. From Lemma 7.1, a key x is in a bottom-k capT sample for some T if and only if it is in the bottom-k sample for capwx . The keys with a lower capwx -seed than x are those with wy ≥ wx and uy < ux , which are counted in hx , and those with wy < wx and ry /wy < rx /wx , which are counted in `x . Therefore, a key x is in S (capwx ,k) if and only if there are fewer than k keys with a lower capwx -seed, which is the same as having hx + `x < k . For reference, a key x is in the universal monotone sample S (M,k) if and only if it satisfies the weaker condition hx < k . Lemma 7.4. A key x can be auxiliary only if `x + hx = k Proof. A key x is auxiliary (in the set Z ) only if for some y ∈ S , it has the k th smallest capwy -seed among all keys other than y . This means it has the (k + 1)th smallest capwy -seed. The number of keys with seed smaller than seed(x) is minimized for T = wx . If the capwx -seed of x is one of the k smallest ones, it is included in the sample. Therefore, to be auxiliary, it must have the (k + 1)th smallest seed. 7.1 Sampling algorithm We are ready to present our sampling algorithm. We first process the data so that multiple elements with the same key are replaced with with the one with maximum weight. The next step is to identify all keys x with hx ≤ k . It suffices to compute S (M,k) of the data with the auxiliary keys. We can apply a variant of Algorithm 1: We process the keys in order of decreasing weight, breaking ties by increasing rank, while maintaining a binary search tree H of size k which contains the k lowest u values of processed keys. When processing x, if ux > max(H) then hx > k , and the key x is removed. Otherwise, hx is the position of ux in H , and ux is inserted to H and max(H) removed from H . We now only consider keys with hx ≤ k . Note that in expectation there are at most k ln n such keys. The algorithm then computes `x for all keys with `x ≤ k . This is done by scanning keys in order of increasing weight, tracking in a binary search tree structure H the (at most) k smallest ry /wy values. When processing x, if rx /wx < max(H), then `x is the position of rx /wx in H . We then delete max(H) and insert rx /wx . Keys that have `x + hx < k then constitute the sample S and keys with `x + hx = k are retained as potentially being auxiliary. Finally, we perform another pass on the sampled and potentially auxiliary keys. For each key x, we determine the k + 1th smallest capwx -seed, which is τ (capwx ,k) . Using Corollary 7.2, (cap ,k) (C,k) we can use (3) to compute px wx = px . At the same time we can also determine the precise set of auxiliary keys by removing those that are not the (k + 1)th smallest seed for any capwx for x ∈ S . 7.2 Size of S (C,k) The sample S (C,k) is contained in S (M,k) , but can be much smaller. Intuitively, this is because two keys with similar, but not necessarily identical, weights are likely to have the same relation between their f -seeds across all f ∈ C . This is not true for M : For a threshold T between the two weights, the threshT -seed would always be lower for the higher weight key whereas the relation for lower T value can be either one with almost equal probabilities. In particular, we obtain a bound on |S (C,k) | which does not depend on n: Theorem 7.1. E[|S (C,k) |] ≤ ek ln maxx wx . minx wx x∈Y wx Proof. Consider a set of keys Y such that max minx∈Y wx = ρ. We show that the expected number of keys x ∈ Y that for at least one T > 0 have one of the bottom-k capT -seeds is at most ρk . x wx The claim then follows by partitioning keys to ln max minx wx groups where weights within each group vary by at most a factor of e and then noticing that the bottom-k across all groups must be a subset of the union of bottom-k sets within each group. We now prove the claim for Y . Denote by τ the (k + 1)th smallest rx value of x ∈ Y . The set of k keys with rx < τ are the bottom-k sample for cap T ≤ minx∈Y wx . Consider a key y . (capwy ,k) From Lemma 7.1, we have y ∈ S (C,k) only if y ∈ S .A necessary condition for the latter is that ry /wy < τ / minx∈Y wx . This probability is at most   ry τ Pr < uy ∼U [0,1] wy minx∈Y wx wy k ≤ Pr [ry < τ ] ≤ ρ minx∈Y wx ux ∼U [0,1] |Y | Thus, the expected number of keys that satisfy this condition is at most ρk . 10 8 M ETRIC OBJECTIVES and the ForAll NMSE: In this section we discuss the application of multi-objective sampling to additive cost objectives. The formulation has a set of keys X , a set of models Q, and a nonnegative cost function c(Q, x) of servicing x ∈ X by Q ∈ Q. In metric settings, the keys X are points in a metric space M , Q ∈ Q is a configuration of facilities (that can also be points Q ⊂ M ), and c(Q, x) is distance-based and is the cost of servicing x by Q. For each Q ∈ Q we are interested in the total cost of servicing X which is X c(Q, X) = c(Q, x) . x∈X A concrete example is the k -means clustering cost function, where Q is a set of points (centers) of size k and c(Q, x) = minq∈Q d(q, x)2 . In this formulation, we are interested in computing a small summary of X that would allow us to estimate c(Q, X) for each Q ∈ Q. Such summaries in a metric setting are sometimes referred to as coresets [1]. Multi-objective samples can be used as such a summary. Each Q ∈ Q has a corresponding function fx ≡ c(Q, x). A multi-objective sample for the set F of all the functions for Q ∈ Q allows us to estimate sum(f ) = c(Q, X) for each Q. In particular, a sample of size h(F )−2 allows us to estimate c(Q, X) for each Q ∈ Q with CV at most  and good concentration. The challenges, for a domain of such problems, are to • • Upper-bound the multi-objective overhead h(F ) as a function of parameters of the domain (|X|, c, structure of Q ∈ Q). The overhead is a fundamental property of the problem domain. Efficiently compute upper bounds µx on the multiobjective sampling probabilities p(F,1) so that the sum P µ is not much larger than h(F ). We are interested in x x obtaining these bounds without enumerating over Q ∈ Q (which can be infinite or very large). Recently, we [6] applied multi-objective sampling to the problem of centrality estimation in metric spaces. Here M is a general metric space, X ⊂ M is a set of points, each Q is a single point in p M , and the cost P functions is c(Q, x) = d(Q, x) . The centrality Q is the sum x c(Q, x). We established that the multi-objective overhead is constant and that upper bound probabilities (with constant overhead) can be computed very efficiently using O(|X|) distance computations. More recently [10], we generalized the result to the k -means objective where Q are subsest of size at most k and establish that the overhead is O(k). 9 F OR E ACH , F OR A LL Our multi-objective sampling probabilities provide statistical guarantees that hold for each f and H : Theorem 4.1 states that the d (f ; H) has the CV and concentration bounds over estimate sum the sample distribution S ∼ p (sample S that includes each x ∈ X independently (or VarOpt) with probability px ). In this section we focus on uniform per-objective guarantees (kf = k for all f ∈ F ) and statistics sum(f ; X ) = sum(f ) over the full data set. For F and probabilities p, we define the ForEach Normalized Mean Squared Error (NMSE): NMSEe (F, p) = max ES∼p ( f ∈F d (f ) sum − 1)2 , sum(f ) (9) NMSEa (F, p) = ES∼p max( f ∈F d (f ) sum − 1)2 . sum(f ) (10) The respective normalized root MSE (NRMSE) are the squared roots of the NMSE. Note that ForAll is stronger than ForEach as it requires a simultaneous good approximation of sum(f ) for all f ∈ F: ∀p, NMSEe (F, p) ≤ NMSEa (F, p) . We are interested in the tradeoffPbetween the expected size of a sample, which is sum(p) ≡ x px , and the NRMSE. The multi-objective pps probabilities are such that for all ` > 1, NMSEe (F, p(F,`) ) ≤ 1/`. For a parameter ` ≥ 1, we can also consider the ForAll error NMSEa (F, p(F,`) ) and ask for a bound on ` so that the NRMSEa ≤ . A union-bound argument established that ` = −2 log |F | always suffices. Moreover, when F is the sampling closure of a smaller subset F 0 , then ` = −2 log |F 0 | suffices. If we only bound the maximum error on any subset of F of size m, we can use ` = −2 log m. When F is the set of all monotone functions over n keys, then ` = O(−2 log log n) suffices. To see this intuitively, recall that it suffices to consider all threshold functions since all monotone functions are nonnegative combinations of threshold functions. There are n threshold functions but these functions have O(log n) points where the value significantly changes by a factor. We provide an example of a family F where the sample-size gap between NMSEe and NMSEa is linear in the support size. Consider a set of n keys and define f for each subset of n/2 keys so that f is uniform on the subset and 0 outside it. The (F,1) multi-objective base pps sampling probabilities are px = 2/n for all x and hence the overhead is h(F ) = 2. Therefore, p of size 2−2 has NRMSEe (F, p) ≤ . In contrast, any p with NRMSEa (F, p) ≤ 1/2 must contain at least one key from the support of each f in (almost) all samples, implying expected sample size that is at least n/2. When we seek to bound NRMSEe , probabilities of the form p(F,`) essentially optimize the size-quality tradeoff. For NRMSEa , however, the minimum size p that meets a certain error NRMSEa (F, p) ≤  can be much smaller than the minimum size p that is restricted to the form p(F,`) . Consider  > 0 and a set F that has k parts Fi with disjoint supports of equal sizes n/k . All the parts Fi except F1 have a single f that is uniform on the support, which means that with uniform p of size −2 we have, NRMSEe (Fi , p) = NRMSEa (Fi , p) = . The part F1 has similar structure to our previous example which means that any p that has NRMSEa (F1 , p) ≤ 1/2 has size at least n/(2k) wheras a uniform p of size 2−2 has NRMSEe (F1 , p) = . The multiobjective base sampling probabilities are therefore p(F,1) = k/n for keys in the supports of Fi where i > 1 and p(F,1) = 2k/n for keys in the support of F1 and thus the overhead is k + 1. The minimum size p for NRMSEa (F, p) = 1/2 must have value at least 1/2 for keys in the support of F1 and value about (k/n) log(k) for other keys (having ForAll requirement for each part and a logarithmic factor due to a (tight) union bound). Therefore the sample size is O(n/k + k log k). In contrast, To have NRMSEa (F, p(F,`) ) = 1/2, we have to use ` = Ω(n/k), obtaining a sample size of Ω(n). 11 10 O PTIMIZATION OVER MULTI - OBJECTIVE SAM - PLES In this section we consider optimization problems where we have keys X , nonnegative functions f ∈ F where f : X and we seek to maximize M (sum(f )) over f ∈ F : f = arg max M (sum(g)) . g∈F (11) We will assume here that the function M is smooth with bounded rate of change: |M (v) − M (v 0 )|/M (v) ≤ c|v − v 0 |/v , so that when v 0 ≈ v then M (v 0 ) ≈ M (v). Optimization over the large set X can be costly or infeasible and we therefore aim to instead compute an approximate maximizer over a multi-objective sample S of X . We propose a framework that adaptively increases the sample size until the approximate optimization goal is satisfied with the desired statistical guarantee. We work with a slightly more general formulation where we allow the keys to have importance weights P mx ≥ 0 and consider the weighted sums sum(f ; X , m) = x∈X fx mx . Note that for the purpose of defining the problem, we can without loss of generality “fold” the weights mx into the functions f ∈ F to obtain the set F 0 ≡ mF which has uniform importance weights so that f 0 ∈ F 0 is defined from f ∈ F using ∀x fx0 = fx mx . When estimating from a sample, however, keys get re-weighted and therefore it is useful to separate out F , which may have a particular structure we need to preserve, and the importance weights m. Two example problem domains of such optimizations are clustering (where X are points, each f ∈ F corresponds to a set of centers, fx depend on the distance from x to the centers, and sum(f ) is the cost of clustering with f ) and empirical risk minimization (where X are examples and sum(f ) is the loss of model f ). In these settings we seek to minimize (M (v) = −v ) or maximize (M (v) = v ) sum(f ). We present a meta-algorithm for approximate optimization that uses the following: • • (mF,1) Upper bounds πx ≥ px on the base Pmulti-objective pps probabilities. We would like h = x πx to be not P (F,1) much larger than px . (Here we denote by mF the importance weights m folded into F ). Algorithm A that for input S ⊂ X and positive weights ax for x ∈ S returns f ∈ F that (approximately) optimizes M (sum(f ; S, a)). By approximate optimum, we allow well-concentrated relative error with respect to the optimum maxg∈F M (sum(g; S, a)) or with respect to the optimum maxg∈G M (sum(g; S, a)) on a more restricted set G ⊂ F . We apply this algorithm to samples S obtained with probabilities px = min{1, kπx }. The keys x ∈ S have importance P weights ax = mx /px . Note that sum(g; S, a) = x∈S mx gx /px , is the estimate of sum(g; X , m) we obtain from S . Optimization over the sample requires that an (approximate) maximizer f that meets our quality guarantees over the sample distribution is an approximate maximizer of (11). Intuitively, we would need that at least one approximate maximizer f of (11) is approximated well by the sample M (sum(f ; S)) ≈ M (sum(f ; X )) and that all f that are far from being approximate maximizers are not approximate maximizers over the sample. An ForAll sample is sufficient but pessimistic. Moreover, meeting ForAll typically necessitates worst-case non-adaptive bounds on sample size. An ForEach sample, obtained with k ≥ −2 , is not sufficient in and off itself, but a key observation is that maximization over a ForEach sample can only err (within our ForEach statistical guarantees) by over-estimating the maximum, that is, returning f such that M (sum(f ; S, a))  M (sum(f ; X , m). Therefore, if sum(f ; X , m) ≥ (1 − ) sum(f ; S, a) (12) we can certify, within the statistical guarantees provided by A and ForEach), that the sample maximizer f is an approximate maximizer of (11). Otherwise, we obtain a lower and approximate upper bounds [M (sum(f ; X , m)), (1 + )M (sum(f ; S, a))] on the optimum. Finally, this certification can be done by exact computation of sum(f ; X , m), but it can be performed much more efficiently with statistical guarantees using independent “validation” samples from the same distribution. Algorithm 3 exploits this property to perform approximate optimization with an adaptive sample size. The algorithm starts with an ForEach sample. It iterates approximate optimization over the sample, testing (12), and doubling the sample size parameter k , until the condition (12) holds. Note that since the sample size is doubled, the ForEach guarantees tighten with iterations, thus, from concentration we get confidence for test results over the iterations. The algorithm uses the smallest sample size where probabilities are of the form min{1, kπx }. Note (see example in the previous section) that the optimization might be supported by a much smaller sample of a different form. An interesting open question is whether we can devise an algorithm that increases sampling probabilities in a more targeted way and can perform the approximate optimization using a smaller sample size. Algorithm 3 Optimization over multi-objective samples Input: points X with weights m, M , functions F : X , upper bounds πx ≥ p(mF,1) , algorithm A which for input S ⊂ X and weights a performs -approximate maximization of M (sum(f ; S, a)) over f ∈ F . foreach x ∈ X do // for sample coordination ux ∼ U [0, 1] k ← −2 // Initialize with ForEach guarantee repeat S ←⊥ // Initialize empty sample foreach x ∈ X such that ux ≤ min{1, kπx } do // build sample S ← S ∪ {x}, ax ← mx / min{1, kπx }) // Optimization over S Compute f such that M (sum(f ; S, a)) ≥ (1 − ) max M (sum(g; S, a)) g∈F k ← 2k // Double the sample size until M (sum(f ; X )) ≥ (1 − )M (sum(f ; S)) // Exact or approx using a validation sample return f 11 C ONCLUSION Multi-objectives samples had been studied and applied for nearly five decades. We present a unified review and extended analysis 12 of multi-objective sampling schemes, geared towards efficient computation over very large data sets. We lay some foundations for further exploration and additional applications. A natural extension is the design of efficient multi-objective sampling schemes for unaggregated data [19], [2] presented in a streamed or distributed form. The data here consists of data elements that are key value pairs, where multiple elements can share the same key x, and the weight wx is the sum of the values of elements with key x. We are interested again in summaries that support queries of the form sum(f ; H), where fx = f (wx ) for some function f ∈ F . To sample unaggregated data, we can first aggregate it and then apply sampling schemes designed for aggregated data. Aggregation, however, of streamed or distributed data, requires state (memory or communication) of size proportional to the number of unique keys. This number can be large, so instead, we aim for efficient sampling without aggregation, using state of size proportional to the sample size. We recently proposed such a sampling framework for capping statistics [9], which also can be used to for all statistics in their span. R EFERENCES [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] P. K. Agarwal, S. Har-Peled, and K. R. Varadarajan. Geometric approximation via coresets. In Combinatorial and computational geometry, MSRI. University Press, 2005. N. Alon, Y. Matias, and M. Szegedy. The space complexity of approximating the frequency moments. J. Comput. System Sci., 58:137–147, 1999. P. Boldi, M. Rosa, and S. Vigna. HyperANF: Approximating the neighbourhood function of very large graphs on a budget. In WWW, 2011. K. R. W. Brewer, L. J. Early, and S. F. Joyce. Selecting several samples from a single population. Australian Journal of Statistics, 14(3):231–239, 1972. M. T. Chao. A general purpose unequal probability sampling plan. Biometrika, 69(3):653–656, 1982. S. Chechik, E. Cohen, and H. Kaplan. Average distance queries through weighted samples in graphs and metric spaces: High scalability with tight statistical guarantees. In RANDOM. ACM, 2015. E. Cohen. Size-estimation framework with applications to transitive closure and reachability. J. Comput. System Sci., 55:441–453, 1997. E. Cohen. All-distances sketches, revisited: HIP estimators for massive graphs analysis. TKDE, 2015. E. Cohen. Stream sampling for frequency cap statistics. In KDD. ACM, 2015. full version: http://arxiv.org/abs/1502.05955. E. Cohen, S. Chechik, and H. Kaplan. Clustering over multi-objective samples: The one2all sample. CoRR, abs/1706.03607, 2017. E. Cohen, D. Delling, T. Pajor, and R. F. Werneck. Sketch-based influence maximization and computation: Scaling up with guarantees. In CIKM. ACM, 2014. E. Cohen, N. Duffield, C. Lund, M. Thorup, and H. Kaplan. Efficient stream sampling for variance-optimal estimation of subset sums. SIAM J. Comput., 40(5), 2011. E. Cohen, N. Grossuag, and H. Kaplan. Processing Top-k Queries from Samples. In Proceedings of the 2006 ACM conference on Emerging network experiment and technology (CoNext). ACM, 2006. E. Cohen and H. Kaplan. Summarizing data using bottom-k sketches. In ACM PODC, 2007. E. Cohen and H. Kaplan. Tighter estimation using bottom-k sketches. In Proceedings of the 34th VLDB Conference, 2008. E. Cohen, H. Kaplan, and S. Sen. Coordinated weighted sampling for estimating aggregates over multiple weight assignments. VLDB, 2(1–2), 2009. full: http://arxiv.org/abs/0906.4560. N. Duffield, M. Thorup, and C. Lund. Priority sampling for estimating arbitrary subset sums. J. Assoc. Comput. Mach., 54(6), 2007. W. Feller. An introduction to probability theory and its applications, volume 2. John Wiley & Sons, New York, 1971. P. Flajolet and G. N. Martin. Probabilistic counting algorithms for data base applications. J. Comput. System Sci., 31:182–209, 1985. R. Gandhi, S. Khuller, S. Parthasarathy, and A. Srinivasan. Dependent rounding and its applications to approximation algorithms. J. Assoc. Comput. Mach., 53(3):324–360, 2006. [21] M. H. Hansen and W. N. Hurwitz. On the theory of sampling from finite populations. Ann. Math. Statist., 14(4), 1943. [22] D. G. Horvitz and D. J. Thompson. A generalization of sampling without replacement from a finite universe. Journal of the American Statistical Association, 47(260):663–685, 1952. [23] L. Kish and A. Scott. Retaining units after changing strata and probabilities. Journal of the American Statistical Association, 66(335):pp. 461–470, 1971. [24] E. Ohlsson. Sequential poisson sampling. J. Official Statistics, 14(2):149–162, 1998. [25] E. Ohlsson. Coordination of pps samples over time. In The 2nd International Conference on Establishment Surveys, pages 255–264. American Statistical Association, 2000. [26] C. R. Palmer, P. B. Gibbons, and C. Faloutsos. ANF: A fast and scalable tool for data mining in massive graphs. In KDD, 2002. [27] B. Rosén. Asymptotic theory for successive sampling with varying probabilities without replacement, I. The Annals of Mathematical Statistics, 43(2):373–397, 1972. [28] B. Rosén. Asymptotic theory for order sampling. J. Statistical Planning and Inference, 62(2):135–158, 1997. [29] P. J. Saavedra. Fixed sample size pps approximations with a permanent random number. In Proc. of the Section on Survey Research Methods, pages 697–700, Alexandria, VA, 1995. American Statistical Association. [30] C-E. Särndal, B. Swensson, and J. Wretman. Model Assisted Survey Sampling. Springer, 1992. [31] M. Szegedy. The DLT priority sampling is essentially optimal. In Proc. 38th Annual ACM Symposium on Theory of Computing. ACM, 2006. [32] Y. Tillé. Sampling Algorithms. Springer-Verlag, New York, 2006. A PPENDIX Theorem A.1. Consider ppswor sampling with respect to weights fx and the estimator (2) computed using q (3). Then for any g ≥ 0 ρ(f,g) d (g; H)] ≤ and segment H , CV [sum . (g) q (H)(k−1) Proof. We adapt a proof technique in [9] (which builds P on [7], [8]). To simplify notation, we use W = sum(f, X ) = x∈X fx for the total f -weight of the population. We first consider the variance of the inverse probability estimate for a key x with weight gx , conditioned on the (τ ) threshold τ . We use the notation ĝx for the estimate that is gx / Pr[f -seed(x) < τ ] when f -seed(x) < τ and 0 otherwise. Using p = Pr[f -seed(x) < τ ] = 1 − e−fx τ , we have var[ĝx(τ ) ] = ≤ 1−p 2 e−τ fx gx = gx2 p 1 − e−τ fx 2 gx gy gx ≤ max , y fx τ fy τ (13) using the relation e−z /(1 − e−z ) ≤ 1/z . (τ ) We now consider the variance of the estimator ĝx when τ 0 is the k th smallest seed value τ in X \ x. We denote by Bx the distribution of τ 0 . We will bound the variance of the estimate using the relation 0 var[ĝx ] = Eτ 0 ∼Bx var[ĝx(τ ) ] . The distribution of τ 0 is the k th smallest of independent exponential random variables with parameters fy for y ∈ X \ x. From properties of the exponential distribution, the minimum seed is exponentially distributed with parameter W − fx , the difference between the minimum and second smallest is exponentially distributed with parameter W − fx − w1 , where w1 is the weight fy of the key y with minimum seed, and so on. Therefore, the distribution on τ 0 conditioned on the ordered set of smallest-seed keys is a sum of k exponential random variables with parameters at most W . The distribution Bx is a convex combination of such distributions. We use the notation sW,k for the density function of the Erlang distribution Erlang(W, k), which is a sum of k 13 independent exponential distribution with parameter W . What we obtained is that the distribution Bx (for any x) is dominated by Erlang(W, k). (τ 0 ) Since our bound on the conditioned variance var[ĝx ] is nonincreasing with τ 0 , domination implies that Eτ 0 ∼Bx var[ĝx(τ 0 ) 0 ≤ Eτ 0 ∼Erlang(W,k) var[ĝx(τ ) ] , where var is our upper bound (13). We now use the Erlang density function [18] W k z k−1 −W z sW,k (z) = e (k − 1)! R∞ and the relation 0 z a e−bz dz = a!/ba+1 to bound the variance: Z ∞ var[ĝx ] ≤ sW,k (z)var[ĝx(z) ]dz 0 Z ∞ k k−1 W z gx gy ≤ e−W z max dz (k − 1)! z y fy 0 Z ∞ gy Wk z k−2 e−W z dz ≤ max gx y fy (k − 1)! 0 gy gx W = max . y fy k − 1 P d (g; H) = By definition, sum x∈H ĝx . Since covarid (g; H)] = ances between different keys are zero [15], var[sum P gy sum(g;H)W . x∈H var[ĝx ] ≤ maxy fy k−1 d (g; H)] gy var[sum sum(g; H)W ≤ max y fy (k − 1) sum(g; H)2 sum(g; H)2 1 W k − 1 sum(g; H) ρ 1 sum(g; X ) W ≤ . k − 1 sum(g; H) sum(g; X ) q(k − 1) d (g; H)]2 = CV [sum ≤ ≤ gy fy gy max y fy max y
8cs.DS
Faster than Classical Quantum Algorithm for dense Formulas of Exact Satisfiability and Occupation Problems Salvatore Mandrà,∗ Gian Giacomo Guerreschi,† and Alán Aspuru-Guzik‡ Department of Chemistry and Chemical Biology, arXiv:1512.00859v2 [quant-ph] 29 Aug 2016 Harvard University, 12 Oxford Street, 02138 Cambridge (MA) Abstract We present an exact quantum algorithm for solving the Exact Satisfiability problem, which belongs to the important NP-complete complexity class. The algorithm is based on an intuitive approach that can be divided into two parts: The first step consists in the identification and efficient characterization of a restricted subspace that contains all the valid assignments of the Exact Satisfiability; while the second part performs a quantum search in such restricted subspace. The quantum algorithm can be used either to find a valid assignment (or to certify that no solution exists) or to count the total number of valid assignments. The query complexities for the worst-case √    0 are respectively bounded by O 2n−M 0 and O 2n−M , where n is the number of variables and M 0 the number of linearly independent clauses. Remarkably, the proposed quantum algorithm results to be faster than any known exact classical algorithm to solve dense formulas of Exact Satisfiability. As a concrete application, we provide the worst-case complexity for the Hamiltonian cycle problem obtained after mapping it to a suitable Occupation problem. Specifically, we show  that the time complexity for the proposed quantum algorithm is bounded by O 2n/4 for 3-regular undirected graphs, where n is the number of nodes. The same worst-case complexity holds for (3, 3)-regular bipartite graphs. As a reference, the current best classical algorithm has a (worst-case)  running time bounded by O 231n/96 . Finally, when compared to heuristic techniques for Exact Satisfiability problems, the proposed quantum algorithm is faster than the classical WalkSAT and Adiabatic Quantum Optimization for random instances with a density of constraints close to the satisfiability threshold, the regime in which instances are typically the hardest to solve. The proposed quantum algorithm can be straightforwardly extended to the generalized version of the Exact Satisfiability known as Occupation problem. The general version of the algorithm is presented and analyzed. ∗ [email protected] 1 † [email protected][email protected] 2 I. INTRODUCTION Constraint satisfaction problems (CSPs) play a fundamental role in both theoretical and applied computer science. Even though the specific formulation of such problems may vary, all CSPs are characterized by a certain number M of clauses (or constraints) involving n boolean variables: An assignment is valid if and only if all the clauses are satisfied. The central question of many CSPs is either to exhibit a valid assignment or to prove that there is none. Despite its simplicity, answering this question is a hard task. Accordingly, many CSPs belong to the class of NP-complete problems [1, 2], namely the class of the hardest decision problems whose solution can be efficiently verified. The first problem proved to belong to the NP-complete class was the Satisfiability (SAT) problem [3]. In SAT problems, clauses are composed by variables which may appear either negated or not, and each clause is satisfied if it contains at least one true literal. The problem remains NP-complete even if any clause contains only three variables (3SAT) [1]. Although no theorem has yet confirmed this assumption, it is widely believed that no polynomial time algorithm exists to solve NP-complete problems: This is the famous question of P being different from NP. Indeed, the computational time for either heuristics (namely those algorithms which may provide a valid assignment in case of success, but without certifying that there is none in case of their failure) or exact algorithms (which always provide such certification) is expected to scale exponentially with the system size n. Quantum computing can be used to solve classical problems and, in particular, CSPs. In general, quantum algorithms are believed to have a better scaling than their classical counterparts. A few remarkable examples, like integer factorization [4], pattern matching [5] or solving systems of linear equations [6, 7], achieve an exponential speedup over the known best classical alternative. However, it seems that only a polynomial speedup can be reached by quantum algorithms in the context of NP-complete problems, meaning that NP-complete problems remain hard to solve for both classical and quantum computers. The Occupation problem (also called q-in-p-SAT) is a variant of the general Satisfiability (SAT) problem [8]. In this case, clauses are satisfied if and only if they contain exactly q ≥ 1 true literal. The case of q = 1 is also known as Exact Satisfiability (XSAT) and has been extensively studied [2]. Both Occupation and XSAT problems belong to the NP-Complete complexity class, even in the restricted case in which all the literals occur only unnegated [2]. 3 XORSAT XSAT FIG. 1. A necessary condition for a given assignment to satisfy a generic XSAT or Occupation problem clause is that the same assignment satisfies the corresponding XORSAT clause. Here, for example, R(x̄, y, z) represents a 1in3-SAT clause that is true if and only if exactly one between x̄, y and z is true. As a consequence, inside the set of all the possible 2n assignments for the n variables, there is an intermediate set that contains all the solutions of a specific XSAT instance and that represents all the solutions to a related XORSAT instance. Recently, 1in3-SAT (also known as X3SAT or Exact Cover) and 2in4-SAT problems have been used for the benchmark of both classical and quantum optimization algorithms [9–12] and for the theoretical understanding of the satisfiability transition in correspondence to the critical density of constraints αSAT [13] (specifically, αSAT is the maximum α = M/n such that randomly chosen instances have, with high probability, a solution in the limit of large number of variables). Indeed, the definition of NP-completeness regards the worst-case scenario while it has been shown that the randomly chosen instances are typically hard only close to the satisfiability transition αSAT [14–16]. In the last three decades, the upper bound for the computational time of exact algorithms for both XSAT and 1in3-SAT have progressively improved. The first algorithm proved to be faster than the trivial 2n scaling (corresponding to the exhaustive enumeration of all the possible assignments) was provided by Schroeppel and Shamir [17]. Their algorithm solves a class of problems, of which XSAT is the most relevant, in time O(2n/2 ) but in exponential space O(2n/4 ). In the same year, a better result was provided by Monien, Speckenmeyer and Vornberger with an algorithm which runs in time O(20.2441n ) and requires polynomial space [18]. Later on, the upper bound for the computational complexity for both XSAT and 1in3-SAT has further lowered [19, 20]. Currently, the best exact algorithm has been proposed by Byskov, Madsen and Skjerna, which solves XSAT and 1in3-SAT respectively 4 in time O(20.2325n ) and O(20.1379n ) [21] and polynomial space. The better scaling has been achieved by branching only on those variables which appears in at least three clauses and solving the remaining problem as a perfect matching problem. Since the perfect matching is in the P-Class, what remains after the branching can then be solved in polynomial time. Surprisingly, there are only few algorithms for which the complexity is computed in terms of the number of clauses M . Among them, Skjernaa presented an algorithm for XSAT with a time bound O(2M ), but using exponential space [22]. A better algorithm which uses polynomial space and time O(20.2123M ) has been provided by Zhou and Yin [23]. Excluding the algorithm by Schroeppel and Shamir [17], all the algorithms mentioned above are branchand-reduce algorithms, which means that the variables (or alternatively the clauses) are iteratively removed before a reduction step [24, 25]. While algorithms for many NP-Complete problems are well studied little is known for the case of their #P-Complete counterparts [26], namely the problem of counting the number of valid assignments. The counting version of many satisfiability problems is not only interesting from the mathematical point of view, but it has important applications in other fields like artificial intelligence [27, 28] and simulation of physical systems (see, for example, the recent problem of boson sampling [29–31]). At the moment, the fastest algorithm for #XSAT and #1in3-SAT are respectively bounded by O(20.262n ) [32] and O(20.197n ) [33]. In this work, we present an exact algorithm for the XSAT and Occupation problems 0 which runs, in the worst-case, in a time bounded by O(2n−M ) on classical computer and √ by O( 2n−M 0 ) on a quantum computer, while using only polynomial space. Here, M 0 ≤ min {n, M } is the number of linearly independent clauses. In the quantum case, with the term exact we do not intend that the algorithm is deterministic, but rather that the quantum algorithm has a bounded error to either provide a solution or certify that none exists which decreases exponentially with the number of repetitions. For the corresponding counting problem, our classical and quantum algorithms are, √ 0 0 respectively, bounded by O(2n−M ) and O( V 2n−M 0 ), where V ≤ 2n−M is the number of valid assignments not known a priori. We arrived to this result by introducing a novel reduction of the Occupation problem in order to identify a subset of assignments that is guaranteed to contain all the solutions (see Figure 1). Such reduction, that we refer to with the name XOR-Reduction, differs from the branch-and-reduce approach used in the past and leads to an efficient way to find and characterize the appropriate subset. The 5 quadratic speedup for the quantum version of the algorithm is achieved by performing a Grover-type search [34–37] among the candidate solutions. As the main result, we found that our quantum algorithm is faster than the (known) best exact classical algorithms for dense formulas. For specific problems, it is even possible to find a lower bound for M 0 expressed as a function of n only. As a concrete example, we consider the Hamiltonian cycle problem, namely the problem to find a closed and non-intersecting path that explores all the nodes of a given graph. Specifically, we show that the worst-case complexity for 3-regular undirected  graphs is bounded by O 2n/4 , where n is the number of nodes of the graph. The same bound holds for (3, 3)-regular bipartite graphs. As a comparison, the (known) best classical  algorithm is bounded by O 231n/96 [38]. In addition, we analyze the performance of the proposed algorithm on random instances of Occupation problems to evaluate its computational cost for the typical-case. This analysis is particularly significant to estimate the actual advantage of our quantum algorithm in real world situations which, arguably, is represented by typical, rather than worst-case, instances. We observe that, differently from the worst-case complexity, the typical computational cost is reduced when additional strategies inspired by the classical backtracking technique are applied [39, 40]. Thus, we show that the proposed quantum algorithm still remains the fastest one (compared to classical heuristics like WalkSAT or quantum heuristics like Adiabatic Quantum Optimization) for random instances of 1in3-SAT and 2in4-SAT problems close to the satisfiability threshold [11, 12], where the instances are typically the hardest ones to solve. The paper is organized as follows: In Section II we present and characterize our XORReduction algorithm. Section III is dedicated to the analysis of the worst-case complexity and includes the explicit construction of the quantum oracle involved in the Grover search. The explicit application of our algorithm to the Hamiltonian cycle problem is the topic of Section IV, while in Section V we discuss classical and quantum backtracking techniques and evaluate the typical computational cost of the proposed algorithm. Finally, in the last Section we provide additional discussions and draw conclusions. 6 II. REDUCTION METHOD FOR XSAT AND OCCUPATION PROBLEMS Any Occupation (q-in-p-SAT) problem instance is composed of n variables and M constraints, whereas each constraint accepts exactly p variables as input. More specifically, let R(x1 , x2 , . . . , xp ) be a boolean function that is true if and only if exactly q among all the p literals xi are true. An arbitrary instance I of the Occupation problem can be written as I (x1 , . . . , xn ) = M ^  R x̃a1 , x̃a2 , . . . , x̃ap , (1) a=1 where {a1 , a2 , . . . , ap } indicates what variables are involved in the constraint a, and the symbol ∼ means that the variable may appear either negated or unnegated. In the rest of the paper, we will focus on locked instances of the Occupation problem, where all the variables appear in at least two clauses. Indeed, variables which appear in only one clause can be iteratively removed from the problem, while locked instances are typically hard to solve [13, 41]. At the core of both the classical and quantum algorithms that we propose lies the observation that R is satisfied only if the corresponding XORSAT clause is also satisfied:  RXOR x̃a1 , x̃a2 , . . . , x̃ap = x̃a1 ⊕ x̃a2 ⊕ . . . ⊕ x̃ap ⊕ r, (2) where ⊕ represents the XOR sum (namely, the sum of integer modulo 2 using the convention 0 ≡ f alse and 1 ≡ true) and r = (q + 1)mod 2 . Therefore, any valid assignment {x1 , . . . , xn } for I must be a valid assignment for the corresponding XORSAT instances, namely: IXOR (x1 , . . . , xn ) = M ^  x̃a1 ⊕ x̃a2 ⊕ . . . ⊕ x̃ap ⊕ r . (3) a=1 It is important to observe that, unlike the original q-in-p-SAT problem, there exists a classical algorithm which solves the XORSAT problem in polynomial time. Indeed, any valid assignment for IXOR is also a solution of the following non-homogeneous linear problem [42, 43]: (Ax ≡ b)mod 2 , (4) where A is a M × n binary-matrix, for which Aai = 1 if and only if variable i appears (either negated or not) in clause a, and is zero otherwise. Here, ba = (νa + q)mod 2 with νa being the number of negations that appear in the clause a. To make the description more concrete, for 7 k 5/n FIG. 2. The number k of linearly independent vectors of the kernel quickly converges to (n − M ), where n and M are respectively the number of variables and constraints. The figure shows the excess of the number of linearly independent vectors for locked 1in3-SAT instances, namely ∆k = k − (n − M ). As one can see, ∆k/n goes to zero by increasing the number of variables. The analysis is based on 1000 random realization of locked 1in3-SAT instances for each n and α. Points and error bars represent respectively the average and the minimum/maximum of the numerical distribution of ∆k/n. Notice that, as clearly indicated by the comparison with the dashed black line, we obtain ∆k ≤ 5 independently of n and even for α = 1. the locked 1in3-SAT class of instances, the matrix A results to be sparse with exactly three ones in each row and at least two ones in each column. Let us define {ξ1 , ξ2 , . . . , ξk } as the set of k−independent vectors which solve the following kernel equation (Aξk ≡ 0)mod 2 , (5) and denote by M 0 = (n − k) ≤ min {n, M } the number of linearly independent (with arithmetic modulo 2) rows of the matrix A. Therefore, M 0 represents the number of independent clauses. It is important to stress that all the theorems of linear algebra are still valid in arithmetic modulo 2. Hence, the set {ξ1 , ξ2 , . . . , ξk } can be found in polynomial time using a classical computer (for example, via Gaussian elimination [42]). Moreover, all the solutions of Equation (4), i.e. all the valid assignment for IXOR , can be expressed as ¯ x (v1 , . . . , vk ) = v1 ξ1 ⊕ v2 ξ2 ⊕ . . . ⊕ vk ξk ⊕ ξ, (6) where vi ∈ {0, 1} and ξ¯ is a particular solution (of the inhomogeneous part) of Equation (4), that is to say Aξ¯ = b. This implies that the number of valid assignment for IXOR is 8 0 2k = 2n−M . Observe that, given the rank-nullity theorem, the number of independent rows M 0 is always smaller or equal to the total number of clauses M . Moreover, if A is a sparse random matrix, it happens that M 0 /M = O(1) in the limit of large n and fixed α = M/n [43–45] (see Figure 2 for a numerical confirmation for locked instances of the 1in3-SAT problem). III. WORST-CASE ANALYSIS FOR THE PROPOSED CLASSICAL AND QUAN- TUM ALGORITHMS The classical algorithm that we introduce with this work relies on the fact that the configuration space of all the valid assignments for IXOR , which is given by Equation (6), is actually much smaller than the whole configuration space associated with n variables. Consequently, it is possible to find a valid assignment for any specific instance I of the Occupation problem by (i) enumerating all the possible valid assignments for IXOR and (ii) checking which of these is also a valid assignment for I. Since ξ¯ and all the ξi can be find in polynomial time and stored in polynomial space, the classical algorithm uses polynomial space and its run-time is determined by the cost of the search. Even in the worst-case scenario of an exhaustive search, the number of operations is bound by the dimension of the configuration space of the valid assignments for IXOR . Therefore, our algorithm requires at 0 most O(2n−M ) calls of the oracle that distinguishes invalid assignments from actual solutions, where we use the previous definition of M 0 ≤ min {n, M } as the number of independent clauses for the XORSAT problem. Finally, it is straightforward to verify that the proposed algorithm is exact, since a valid assignment for I must also be a valid assignment for IXOR , 0 and that the complexity for the corresponding counting problem remains O(2n−M ). The proposed exact quantum algorithm for the Occupation problem is obtained by substituting the exhaustive check of all valid assignments of IXOR with a Grover-type quantum search [34]. This search actually takes place in the smaller register of k qubits in which all the candidate solutions of I are identified by the corresponding k bits {v1 , . . . , vk }. Due to this abstract representation, the initial state preparation (superposition of all valid assignments of IXOR ) and the Grover diffusion operator coincide with the original prescription of the Grover algorithm and are easily implemented, for example, with O (k) Hadamard gates and a single k-qubit phase gate. Finally, one has to implement an oracle for I that requires 9 Given the assignment x, count the number of unsatisfied clauses for the 1in3-SAT problem Oracular Phase Shift { { { Quantum Oracle Map index v to a 3-XORSAT solution x II X X X X U-1 X UPG I III IV FIG. 3. Example of our quantum algorithm applied to solve an instance of the 1in3SAT problem R(x1 , x̄2 , x3 ) ∧ R(x2 , x̄3 , x4 ) ∧ R(x3 , x4 , x5 ), where R(a, b, c) is true if and only if exactly one between a, b and c is true. A detailed description of the quantum algorithm is reported in the main text. only a polynomial number of operations, which is always possible since the Occupation problem belongs to the NP class (we provide an explicit construction in Figure 3 and analyze the number of gates required at the end of this Section). More specifically, the quantum oracle Ô corresponds to the operator defined by   − |vi if I (x(v)) is true Ô |vi = ,  + |vi otherwise (7) with x given by Equation (6). The oracle Ô is central to the application of the Grover algorithm that finds a valid assignment for I and, as we show below, it can be implemented with only a polynomial overhead. Therefore, the Grover algorithm results to be quadratically faster than a classical exhaustive search in the reduced XORSAT solution space [34]. The same speedup holds even in the presence of multiple valid assignments [46–49] and represents the optimal speedup achievable for unstructured searches. Therefore, the prosed quantum √ algorithm uses only polynomial space and it is bounded in time by O( 2n−M 0 ) gate operations. It is important to stress that the proposed quantum algorithm is exact, namely it is possible to certify that no valid assignments exist: This property is based on the possibility of running a generalized Grover quantum algorithm that preserves the quadratic speedup even if the number of target states (i.e. our valid assignments) is not known a priori, but larger then zero [48]. The case in which no solution is actually present can be included by slightly modifying 10 Worst-Case Phase Diagram 20.05·n M'/n 20.10·n Fas ter t han Fa clas sica l ste r th 20.15·n an -S A T cla ss ica 20.20·n Faster than classical #1in3-SAT 1in3 Faster than classical #XSAT 20.30·n lX SA T 20.40·n 20.25·n 20.50·n 20.30·n 20.60·n n≥3/n n≥3/n FIG. 4. The proposed quantum XOR-Reduction algorithm is faster than the known best exact classical algorithms for dense formulas. The figure shows the phase diagram (based on the worst-case scenario) that identifies the regions in which the proposed quantum algorithm outperforms the best classical algorithms known to date, either to solve XSAT and 1in3-SAT instances (left panel) or to count the number of valid assignments (right panel). Here and in the main text, n is the number of variables, n≥3 is the number of variables which enter in at least three clauses and M 0 is the number of independent clauses (as defined in the main text). In gray, the complexity for the proposed quantum algorithm (represented by horizontal lines since it does not depend on n≥3 ). the quantum oracle Ô and forcing it to accept a specific configuration as a valid assignment and verifying that this represents the only (in this case “artificial”) solution. The Grover algorithm, with the same quantum oracle Ô, can also be applied for counting the number of valid assignments [47, 48]. In this case, the number of calls of Ô is bounded √ 0 by O( V 2n−M 0 ), where V ≤ 2n−M is the number of solutions of the Occupation problem. Unfortunately, in the trivial but worst-case scenario when all assignments are solutions, the 0 complexity for the #P problem of the proposed quantum algorithm is bounded by O(2n−M ), as for its classical counterpart. In order to provide an explicit example, in Figure 4 we compare the complexity of the proposed quantum to the (known) best classical algorithms for XSAT/1in3-SAT [21] (left panel) and #XSAT/#1in3-SAT [32, 33] (right panel). In the comparison, we also take into account that the complexity for the best classical XSAT/1in3-SAT algorithm depends only in 11 the number of variables which enter in at least three clauses n≥3 , namely O(20.1379 n≥3 ). As it has been originally shown by Cheeseman et al. [14] for the SAT problem (and successively for many other satisfiability problems including the Exact Satisfiability problem [13]), random instances are actually hard only when the problems’ parameters are chosen so that instances have a similar probability to either have a valid assignment or not. In most cases, the relevant parameter is the density of constraints α = M/n: Indeed, for small α, random instances are likely to have a valid assignment while, for large α, random instances most likely do not have any valid assignment. On the contrary, at the satisfiability threshold αSAT , random instances might have or not a valid assignment with comparable probability. Interestingly, our quantum algorithm has a better scaling for dense formulas characterized by a sufficiently large density of independent constraints M 0 /n, far away from the simple case of low α. Our algorithm results particularly fast for those instances which are, instead, expected to be hard for the classical XSAT/1in3-SAT algorithms (see Section V for the analysis of the proposed quantum algorithm by using random instances extracted at the satisfiability threshold). Also the vice-versa seems true, as indicated by the apparent complexity of the trivial case in which the density of constraints is small. We discuss this fact more extensively in the final discussions. A careful reader could observe that the computational complexity of the (known) best classical algorithm for the XSAT/1in3-SAT is expressed only in terms of number of variables n and then, it might have a better computational complexity if the number of linearly independent clauses M 0 would be taken into account. However, the classical algorithm is expected to perform the worse when the density n≥3 /n becomes large, which is exactly the region where the proposed quantum algorithm performs the best. To conclude this Section, we provide an explicit construction for the quantum oracle Ô that is polynomial in both space (i.e. number of ancilla qubits) and time (i.e. number of gates). The quantum oracle accepts k qubits as input {|v1 i , . . . , |vk i} (see Figure 3 for a graphical representation), so that a computational basis state represents a specific valid assignment for IXOR as described in Equation (6)). The oracle Ô per se is composed by four modules, as depicted in Figure 3. Their action is best described in the computational basis, even if they can (and obviously will) be applied to an initial superposition: (I) A module to construct the n-qubit state |xi as given in Equation (6) from the corresponding valid assignments for IXOR , (II) a module to verify if clauses of I are satisfied, (III) a repeated module to count the number of unsatisfied clauses for I and, finally, (IV) a multi-qubit phase gate that add a 12 multiplicative phase (−1) if and only if the number of satisfied clauses for I is M . All the modules require only the use of C-NOT gates and X gates. The suggested implementation of the quantum oracle requires dlog M 0 e ancilla qubits, while the total number of gates is bounded by O (n2 ) since (I) has k blocks with O (n) gates each, (II) has M 0 blocks with O (1) gates each and (III) has M 0 blocks with O (log2 M 0 ) gates each. IV. APPLICATION TO THE HAMILTONIAN CYCLE PROBLEM The Hamiltonian cycle (HC) problem, together with the SAT problem, can be considered one of the fundamental and most studied NP-complete problem [50]. The HC problem consists in finding a closed path (namely, an Hamiltonian cycle) which “visits” once, and only once, all the nodes of a given n-nodes graph G. Unlike the SAT problem, which is called a subset problem whose configuration space is 2n , HC is a permutation problem whose configuration space is n! [38]. Compared to SAT, HC results much harder to solve and, at the moment, no algorithm has been found to obtain Hamiltonian cycles for arbitrary graphs with worst-case complexity better than O (2n ) [51]. However, improved scalings have been obtained for bounded degree graphs [38, 52]. For example, for 3-regular graphs, the (known)  best classical algorithm has the worst-case complexity bounded by O 231n/96 [38]. In this Section we show that our quantum algorithm can find a Hamiltonian cycle in a time bounded  by O 2(K−2) n/4 , where K is the maximum degree of G. This result can be achieved by reducing the HC problem to an Occupation problem. In case of bounded graphs with K = 3,  the worst-case complexity is given by O 2n/4 . The same worst-case complexity holds for (3, 3)-regular bipartite graphs. For the rest of the Section, it is assumed that the graph G is an undirected graph with a single connected component and all the nodes having the same degree equals to K (to avoid trivial cases, we consider K ≥ 3). Results for bipartite graphs follow directly. As a first step to apply the proposed XOR-Reduction, it is necessary to reduce the HC problem to an Occupation problem. The simplest way to achieve this is to define a variable eij for any of the M edges of G such that eij = eji = 1 if and only if a given path passes through the edge which connects node i and j, and zero otherwise. Therefore, any possible path in G can be expressed as a specific assignment of {eij } = {0, 1}M . Recalling that an Hamiltonian cycle must visit once and only once each node of G, the given path satisfies the 13 HC problem if it also satisfies the set of extra constraints X eij = 2, ∀i ∈ G, (8) j∈∂i where ∂i represents the set of nodes connected to i. Clearly, the constraints in Eq. (8) represent 2inK-SAT clauses, one for each node. Therefore, given a graph G, all valid Hamiltonian cycles must be the solution of a 2inK-SAT instance with M variables and n clauses (please, notice the different notation in which n refers to the number of clauses and not, as in all other Sections, of variables). Also, observe that the related 2inK-SAT instance may have solutions which do not correspond to any Hamiltonian cycle (for example, a collection of separate cycles rather than a single long cycle). However, it suffices to change the quantum oracle Ô so that it can check if a solution of the 2inK-SAT instance is also a Hamiltonian cycle, with only a polynomial overhead. Hence, following the results of Section III, the proposed quantum algorithm can either find an Hamiltonian cycle or certify  √ p K  0 that none exists in a time bounded by O 2M −n0 = O 2 2 n−n , where n0 is the number of “linearly independent” nodes. The rest of the Section is dedicated to the proof that n0 = n − 1. In general, a set of vectors is linearly dependent if their sum (modulo 2) gives a vector of all zeros. However, if a vector of the set has at least one unmatched component set to 1, namely none of other vectors has a 1 in the same position, such vector is trivially linearly independent from the others. Therefore, in the search for linearly dependent vectors, it can be “removed” from the set since none of the other vectors can linearly depend on it. For a given a graph G, the corresponding matrix A of the 2inK-SAT instance corresponds to a n × M matrix with exactly K ones each row (since exactly K edges are connected to each node) and 2 ones each column (every edge connects two nodes). In order to prove that n0 = n − 1, we will show that all the rows of A except one are trivially linearly independent. Indeed, given that all columns contain exactly two ones, the matrix A has at least one linearly dependent row (this can be verified since the sum modulo 2 of all rows gives the null vector). Once such linearly dependent row is removed from A, it is straightforward to see that K rows will have an unmatched ones that can be removed since trivially linearly independent. The iterative process to remove rows from A with unmatched ones proceeds until all the rows associated to nodes in a connected component are removed. Hence, recalling that G has single connected 14 component, the process stops only after the matrix A is empty. Consequently, all the rows of A must be linearly independent expect for the first one, namely n0 = n − 1. V. TYPICAL CASE ANALYSIS FOR THE QUANTUM ALGORITHM In Section III, we have provided upper bounds for the worst-case complexity of the proposed quantum XOR-Reduction algorithm in two situations: Either as a decision problem in which the algorithm exhibits a valid assignment (or certifies that none exists), or as a counting problem in which the algorithm provides the number of solutions. More precisely, we used the Grover algorithm to show that the number of query calls are bounded by √  0 O 2n−M 0 and by O 2n−M respectively, where n is the number of variables and M 0 the number of independent clauses. It is important to observe that the Grover algorithm is completely insensitive to any structure of the underlying problem. In many cases, there exist correlations between variables and clauses of a specific instance which can effectively reduce the size of the configuration space to explore. Classical algorithms are constructed to take advantage of such sort of information with the result that their typical performance is better than what the worst-case upper bound would suggest. One of the most important and successful classical techniques to solve satisfiability problems is the backtracking algorithm [39]. This technique has a very broad applicability and can be used whenever it is possible to efficiently verify, using an oracle P (x), if a partial assignment x is compatible with a solution or not. If such P (x) exists, the algorithm provides an efficient way to extend partial configurations to valid assignments, with the effect of drastically reducing the total number of the configurations to actually check. In the backtracking technique, each variable can assume not only the values true/1 or f alse/0, but also the value indeterminate/∗: If a variable is indeterminate, it does not participate in determining the satisfiability of a clause. Thus, a clause is indeterminate if it is not possible to decide with certainty if it is satisfied or not. To make this point clearer, consider the following 1in3-SAT clause R (x1 , x2 , x3 ) that is satisfied when exactly one variable among xj is true. In this case, configurations like {∗, ∗, ∗}, {0, ∗, ∗} or {1, 0, ∗} make the clause R indeterminate. On the contrary, the clause R cannot be satisfied whenever the configuration has already two ones, like for example {1, 1, ∗}, {1, ∗, 1} and {∗, 1, 1}. The backtracking algorithm starts by setting the initial configuration x as completely indeterminate {∗, ∗, . . . , ∗}. Then, following 15 False Not Satisfiable True Satisfiable Indeterminate Branching FIG. 5. Graphical representation of the classical backtracking algorithm. The figure shows an example of backtracking algorithm where each element of x can assume three values: {f alse/0, true/1, indeterminate/∗}. Here P (x) is an oracle which returns false if the assignment x (either partial or not) violates any clause. Otherwise, P (x) returns true if x is complete assignment and it satisfies all the clauses, or indeterminate if x is partial and it does not violate any clause. The oracle h(x) return the position of the next variable to explore in the decision tree given a partial configuration x. a heuristic h(x) which gives the position j of an indeterminate variable, the configuration x is expanded by fixing xj to either true or f alse. At this point, if P (x) returns that the partial configuration x can lead to a valid assignment, then another branching is made to the next indeterminate variable. Otherwise, if an unsatisfied clause already exists, the branch is “cut” and the algorithm starts to explore another branch. The set of partial configurations that the backtracking algorithms explores is called “decision tree”. The computational complexity of the backtracking algorithm is therefore bounded by the size T (n) of the decision tree. In general, for satisfiability problems, T (n) is expected to be exponential with the number of variables n. In Figure 5, a graphical illustration of the logic behind the backtracking algorithm is depicted. Recently, an approach analogous to the backtracking algorithm has been applied in the context of quantum computation [40]. The central idea of the quantum backtracking algorithm consists in using a quantum walker [53–56] to explore the tree of partial configurations and then “mark” a valid assignment for the satisfiability problem. More precisely, given the two oracles P (x) and h(x) that can be evaluated in poly(n) operations, the quantum backtracking p algorithm exhibits a valid assignment in a number of oracle calls bounded by O( T (n)), which is quadratically faster than its classical counterpart. Observe that the quantum backtracking 16 algorithm provides the same quantum speedup as the Grover algorithm. However, the quantum backtracking algorithm can take advantage of the underlying structure of the satisfiability problem, having an overall better performance since T (n) ≤ 2n and usually much smaller. In the rest of the Section, we show how to apply the quantum backtracking algorithm to the proposed quantum XOR-Reduction. We also compare the quantum XORReduction algorithm with the classical WalkSAT heuristic [12] and the quantum Adiabatic Quantum Optimization [11] to solve random instances of both 1in3-SAT and 2in4-SAT at the satisfiability transition [13], and provide numerical evidence that our algorithm remains the fastest one. As described in Section II, the proposed XOR-Reduction algorithm is based on a nontrivial (but polynomial in both space and time) reduction so that any valid assignment x of an Occupation problem is the combination (modulo 2) of {ξ1 , ξ2 , . . . , ξk } linearly independent vectors plus the inhomogeneous solution ξ¯ (see Eq. (6) for more details), namely: ¯ x (v1 , . . . , vk ) = v1 ξ1 ⊕ v2 ξ2 ⊕ . . . ⊕ vk ξk ⊕ ξ, (9) with {ξ1 , ξ2 , . . . , ξk } and ξ¯ depending on the specific instance I of the Occupation problem. The size of the configuration space spanned by v is 2k and, since k = n − M 0 (with M 0 representing the number of independent clauses), it results to be effectively smaller than 2n . In Section III we show that the worst-case complexity is bounded by O(2k/2 ). Nevertheless, we expect that the application of the quantum backtracking algorithm to the space spanned by ν would lead, on average, to a better performance. However, in order to apply the quantum backtracking technique to the proposed XOR-Reduction algorithm, it is necessary to rewrite the assignment x in Eq. (9) in a form suitable to verify whether a partial assignment can be extended to a solution or not. To achieve this goal, let us observe that one can always construct (in polynomial time and space) a linear transformation U acting on the vector v such that Eq. (9) can be rewritten as  x (v1 , . . . , vk ) = KU −1 U v ⊕ ξ¯ = P  1 H    U v ⊕ ξ¯ = P  v0 Hv 0 ⊕ ξ¯0  , (10) with P an appropriate permutation matrix that reorders the rows of K. More precisely, the application of U reduces the matrix K to a standard form comprising two blocks: The first k rows constitute the k × k identity matrix 1 while the lower block corresponds to the 17 (n − k) × k matrix H. Since v is arbitrary, we can directly express Eq. (10) in terms of v 0 as  xP (v10 , . . . , vk0 ) =  v0 Hv ⊕ ξ¯0 0  , (11) where xP and x differ only by the permutation P , namely only by a reorder of the variables. It is important to observe that, after the transformation given by U , the assignment xP of the Occupation problem is divided in two parts: The first k variables correspond exactly to the arbitrary reduced configuration v 0 , while the last (n − k) variables are a linear combination of the reduced configuration. The proposed quantum algorithm remains exact even if it is combined with the quantum backtracking technique [40]. In addition, the use of the quantum backtracking technique may give a better scaling on average than for the worst-case: Indeed, if no bounds on T (n) are known, the computational complexity in the worst-case remains the same obtained by using the Grover algorithm. In Figure 6, we show the scaling of the proposed quantum XOR-Reduction, when the quantum backtracking technique is used, for random instances of locked 1in3-SAT and 2in4SAT at the satisfiability threshold (which are respectively αSAT = 0.789 and αSAT = 0.707), where typical instances are the hardest to solve. In the implementation of the backtracking procedure, we have not optimized over the order of exploration of the decision tree. Therefore, a better performance might be reached by considering heuristics able to exploit the tree structure. In the figure, we also compare the quantum XOR-Reduction to the numerical results for the classical WalkSAT heuristic (numerical data have been extracted from Ref. [12]) and for the Adiabatic Quantum Optimization (AQO) (numerical data have been extracted from Ref. [11]). Unlike in [11, 12], random instances are not pre-selected to have a unique solution and may or may not have any solution. In the figure, γ(n) is either the E Dp computational time scaling (for WalkSAT and AQO) or γ(n) = n1 log2 T (n) . The mean Dp E value of T (n) has been computed by averaging over 1000 random instances. For each random instance, the permutation matrix P in Eq. (10) has also been optimized in order to maximize the number of clauses in which the v 0 variables appears, by running 100 time an optimization heuristic. The aforementioned reduction in Eq. (11) can be done in polynomial time and space before exploring the decision tree. As one can see, for both the satisfiability problems the quantum XOR-Reduction is the fastest among classical WalkSAT and AQO. In principle, the quantum amplitude amplification can be applied to the classical WalkSAT 18 FIG. 6. The proposed quantum XOR-Reduction algorithm is faster than both the classical WalkSAT heuristic and the Adiabatic Quantum Optimization (AQO) at the satisfiability threshold. Comparison of the proposed quantum algorithm to both the well known WalkSAT heuristic and Adiabatic Quantum Optimization (AQO), for locked 1in3-SAT and 2in4SAT random instances at the satisfiability threshold (which are respectively αSAT = 0.789 and αSAT = 0.707). Numerical results for the classical WalkSAT and AQO have been extracted from Ref. [12] and Ref. [11], respectively. Results for the quantum WalkSAT have been obtained by assuming that a quantum amplitude amplification [57] would give a quadratic speedup with respect to the classical results. Here, γ(n) is either the computational time scaling (for WalkSAT and AQO) Dp E or γ(n) = n1 log2 T (n) , with T (n) the size of the decision tree at fixed number of variables n. The average h·i is computed by sampling 1000 instances for each n. The scaling has been computed by fitting the numerical data (dashed lines intersects the data points actually used in the fit). Error bars for the proposed model represent the 10% − 90% interval of confidence. As one can see, the quantum version of the WalkSAT has a slightly better performance than the proposed quantum algorithm. However, numerical results in [11, 12] have been obtained by pre-selecting instances with at least a valid assignment. Therefore, a worse performance is expected for both the classical and quantum WalKSAT heuristics when instances with no valid assignments are taken into account. as well [57], obtaining a quadratic speedup with respect to the classical performance. To have an idea of the performance of the quantum WalkSAT (without explicitly running the quantum algorithm), we simply divide the computational time scaling γ(n) of the classical 19 WalkSAT by a factor 2. In this case, as shown in Figure 6, the proposed quantum algorithm performs slightly worse. However, it is important to stress that the WalkSAT is a widely used and hence well optimized algorithm while, for the proposed quantum algorithm, there is still space for improvement (for example, by proposing a better heuristic for exploring the decision tree). Moreover, it is important to mention that, whereas both WalkSAT and AQO are not exact and may potentially run forever if the instance does not admit any valid assignment, the proposed quantum XOR-SAT reduction either provides a solution or certifies that no solutions exist in the given bound. In addition, the scaling proposed in Ref. [12] is obtained by pre-selecting instances with at least one ground states. A worse scaling is expected when instances are randomly chosen with an α close to the transition threshold, value for which many instances do not have any valid assignment. Finally, we want to stress that the proposed XOR-Reduction explores the XSAT configuration space in a non-local fashion. Hence, it can potentially exploit long-range structures that are, instead, precluded to local search algorithms like WalkSAT and AQO. VI. CONCLUSIONS In this work we have presented an exact quantum algorithm to solve instances of Exact Satisfiability or, more generally, of Occupation problems. The proposed quantum algorithm is based on a novel approach which consists to identify a restricted subspace in which all the valid assignments of an Occupation problem are contained (in our case, the solution space of an appropriate XORSAT problem) and whose elements can be efficiently enumerated. This approach led us to the development of an algorithm able to solve a great variety of different Occupation problems, as opposed to dedicated solvers that address specific problems. Moreover, it can be potentially used to reduce the computational cost of other satisfiability problems. Regarding the worst-case scenario, we show that the proposed quantum algorithm finds a valid assignment (or certify that none exists) using only polynomial space and a number √ of oracle calls which is bounded by O( 2n−M 0 ), where M 0 ≤ min {n, M } is the number of independent clauses. The proposed quantum algorithm can also be extended to count the total number of valid assignments. In this case, despite it still requires a polynomial number 0 of resources, the number of calls is bounded by O(2n−M ) instead. We compare the worst-case 20 scenario to the (known) best classical algorithms for XSAT/1in3-SAT problems. Remarkably, we show that the proposed quantum algorithm is the fastest one for sufficiently dense formula. It is also interesting to observe that the proposed quantum algorithm monotonically improves the performance by increasing the density of clauses. However, this is not in contradiction with the naı̈ve idea that instances of satisfiability problems are (typically) easy to solve for either very low or very dense formulas and hard to solve in the overlapping region, since the worst-case bound is strictly algorithmic dependent rather than problem dependent. As a concrete example, we provide the worst-case bound to solve the Hamiltonian cycle by directly applying our algorithm. More precisely, the quantum algorithm proposed in this work can find a Hamiltonian cycle (or certify that none exists) for 3-regular graphs in a time bounded  by O 2n/4 , where n is the number of nodes in the graph. The same worst-case bound holds for (3, 3)-regular bipartite graphs. In addition, we showed that our quantum algorithm can be modified to include techniques as the quantum backtracking algorithm. We verified with numerical simulations that, on the typical instance, the performance is indeed better than the expected worst-case bound. Noteworthy, the proposed quantum algorithm remains the fastest solver (compared to the classical WalkSAT heuristic and Adiabatic Quantum Optimization) close to the satisfiability transition for the locked 1in3-SAT and 2in4-SAT random instances. VII. ACKNOWLEDGMENT The authors thank Eleanor G. Rieffel, Sergio Boixo, Ryan Babbush and Itay Hen for the critical reading of the manuscript and several helpful discussions. S.M and A.A-G were supported by NASA (Sponsor Award Number: NNX14AF62G). G.G.G. and A.A-G acknowledge support from the Air Force Office of Scientific Research through the grant 10323836-SUB. [1] R. M. Karp, Reducibility among combinatorial problems (Springer, 1972). [2] T. J. Schaefer, in Proceedings of the tenth annual ACM symposium on Theory of computing (ACM, 1978), pp. 216–226. 21 [3] S. A. Cook, in Proceedings of the third annual ACM symposium on Theory of computing (ACM, 1971), pp. 151–158. [4] P. W. Shor, Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer, SIAM journal on computing 26, 1484 (1997). [5] A. Montanaro, Quantum pattern matching fast on average, Algorithmica pp. 1–24 (2014). [6] A. W. Harrow, A. Hassidim, and S. Lloyd, Quantum algorithm for linear systems of equations, Physical review letters 103, 150502 (2009). [7] A. Ambainis, in STACS’12 (29th Symposium on Theoretical Aspects of Computer Science) (LIPIcs, 2012), vol. 14, pp. 636–647. [8] M. R. Garey and D. S. Johnson, Computers and intractability: a guide to the theory of NP-completeness, San Francisco, LA: Freeman (1979). [9] A. P. Young, S. Knysh, and V. N. Smelyanskiy, Size dependence of the minimum excitation gap in the quantum adiabatic algorithm, Physical review letters 101, 170503 (2008). [10] E. Farhi, J. Goldstone, S. Gutmann, J. Lapan, A. Lundgren, and D. Preda, A quantum adiabatic evolution algorithm applied to random instances of an NP-complete problem, Science 292, 472 (2001). [11] I. Hen and A. Young, Exponential complexity of the quantum adiabatic algorithm for certain satisfiability problems, Physical Review E 84, 061152 (2011). [12] M. Guidetti and A. Young, Complexity of several constraint-satisfaction problems using the heuristic classical algorithm WalkSAT, Physical Review E 84, 011102 (2011). [13] L. Zdeborová and M. Mézard, Constraint satisfaction problems with isolated solutions are hard, Journal of Statistical Mechanics: Theory and Experiment 2008, P12004 (2008). [14] P. Cheeseman, B. Kanefsky, and W. M. Taylor, in IJCAI (1991), vol. 91, pp. 331–340. [15] M. Mézard, G. Parisi, and R. Zecchina, Analytic and algorithmic solution of random satisfiability problems, Science 297, 812 (2002). [16] F. Krzakala, A. Montanari, F. Ricci-Tersenghi, G. Semerjian, and L. Zdeborová, Gibbs states and the set of solutions of random constraint satisfaction problems, Proceedings of the National Academy of Sciences 104, 10318 (2007). [17] R. Schroeppel and A. Shamir, A T=O(2ˆn/2), S=O(2ˆn/4) Algorithm for Certain NPComplete Problems, SIAM journal on Computing 10, 456 (1981). 22 [18] B. Monien, E. Speckenmeyer, and O. Vornberger, Upper bounds for covering problems, Methods of operations research 43, 419 (1981). [19] S. Porschen, B. Randerath, and E. Speckenmeyer, Exact 3-satisfiability is decidable in time O (20.16254 n), Annals of Mathematics and Artificial Intelligence 43, 173 (2005). [20] A. S. Kulikov, An upper bound O(2ˆ0.16254n) for Exact 3-Satisfiability: a simpler proof, Zapiski nauchnykh seminarov POMI 293, 118 (2002). [21] J. M. Byskov, B. A. Madsen, and B. Skjernaa, New algorithms for exact satisfiability, Theoretical Computer Science 332, 515 (2005). [22] B. Skjernaa, Ph.D. thesis, BRICS (2004). [23] J. Zhou and M. Yin, The worst-case upper bound for exact 3-satisfiability with the number of clauses as the parameter, in Frontiers in Algorithmics and Algorithmic Aspects in Information and Management (Springer, 2012), pp. 212–223. [24] M. Davis and H. Putnam, A computing procedure for quantification theory, Journal of the ACM (JACM) 7, 201 (1960). [25] M. Davis, G. Logemann, and D. Loveland, A machine program for theorem-proving, Communications of the ACM 5, 394 (1962). [26] L. G. Valiant, The complexity of computing the permanent, Theoretical computer science 8, 189 (1979). [27] E. Birnbaum and E. L. Lozinskii, The good old Davis-Putnam procedure helps counting models, Journal of Artificial Intelligence Research pp. 457–477 (1999). [28] D. Roth, On the hardness of approximate reasoning, Artificial Intelligence 82, 273 (1996). [29] S. Aaronson and A. Arkhipov, in Proceedings of the forty-third annual ACM symposium on Theory of computing (ACM, 2011), pp. 333–342. [30] M. Tillmann, S.-H. Tan, S. E. Stoeckl, B. C. Sanders, H. de Guise, R. Heilmann, S. Nolte, A. Szameit, and P. Walther, Generalized Multiphoton Quantum Interference, Physical Review X 57, 041015 (2015). [31] J. Huh, G. G. Guerreschi, B. Peropadre, J. R. McClean, and A. Aspuru-Guzik, Boson Sampling for Molecular Vibronic Spectra, Nature Photonics 9, 615 (2015). [32] J. Zhou, W. Su, and J. Wang, New Worst-Case Upper Bound for Counting Exact Satisfiability, International Journal of Foundations of Computer Science 25, 667 (2014). 23 [33] V. Dahllöf, P. Jonsson, and R. Beigel, Algorithms for four variants of the exact satisfiability problem, Theoretical Computer Science 320, 373 (2004). [34] L. K. Grover, in Proceedings of the twenty-eighth annual ACM symposium on Theory of computing (ACM, 1996), pp. 212–219. [35] E. Farhi and S. Gutmann, Analog analogue of a digital quantum computation, Physical Review A 57, 2403 (1998). [36] J. Roland and N. J. Cerf, Quantum search by local adiabatic evolution, Physical Review A 65, 042308 (2002). [37] S. Mandrà, G. G. Guerreschi, and A. Aspuru-Guzik, Adiabatic quantum optimization in the presence of discrete noise: Reducing the problem dimensionality, Physical Review A 92, 062320 (2015). [38] K. Iwama and T. Nakashima, in COCOON, edited by G. Lin (Springer, 2007), vol. 4598 of Lecture Notes in Computer Science, pp. 108–117, ISBN 978-3-540-73544-1, URL http://dblp.uni-trier.de/db/conf/cocoon/cocoon2007.html#IwamaN07;http: //dx.doi.org/10.1007/978-3-540-73545-8_13;http://www.bibsonomy.org/bibtex/ 249222c9f95fbb59886462ca359a895ae/dblp. [39] P. Van Beek, Backtracking search algorithms, Handbook of constraint programming pp. 85–134 (2006). [40] A. Montanaro, Quantum walk speedup of backtracking algorithms, arXiv preprint arXiv:1509.02374 (2015). [41] L. Zdeborová and M. Mézard, Locked constraint satisfaction problems, Physical review letters 101, 078702 (2008). [42] R. Lidl and H. Niederreiter, Finite fields, vol. 20 (Cambridge university press, 1997). [43] V. F. Kolchin, Random graphs, 53 (Cambridge University Press, 1999). [44] R. C. Alamino and D. Saad, Typical kernel size and number of sparse random matrices over Galois fields: A statistical physics approach, Physical Review E 77, 061123 (2008). [45] R. C. Alamino and D. Saad, Properties of sparse random matrices over finite fields, Journal of Statistical Mechanics: Theory and Experiment 2009, P04017 (2009). [46] M. Boyer, G. Brassard, P. Hoeyer, and A. Tapp, Tight Bounds on Quantum Searching, Progress of Physics 46, 493 (1998). 24 [47] G. Brassard, P. Høyer, and A. Tapp, Quantum counting, in Automata, Languages and Programming (Springer, 1998), pp. 820–831. [48] G. Brassard, P. Hoyer, M. Mosca, and A. Tapp, Quantum amplitude amplification and estimation, Contemporary Mathematics 305, 53 (2002). [49] M. Hayashi, S. Ishizaka, A. Kawachi, G. Kimura, and T. Ogawa, Introduction to Quantum Information Science (Springer, 2014). [50] M. R. Garey and D. S. Johnson, Computers and intractability: a guide to the theory of NP-completeness. 1979, San Francisco, LA: Freeman (1979). [51] M. Held and R. M. Karp, A dynamic programming approach to sequencing problems, Journal of the Society for Industrial and Applied Mathematics pp. 196–210 (1962). [52] D. Eppstein, The Traveling Salesman Problem for Cubic Graphs., J. Graph Algorithms Appl. 11, 61 (2007). [53] A. M. Childs, R. Cleve, E. Deotto, E. Farhi, S. Gutmann, and D. A. Spielman, in Proceedings of the thirty-fifth annual ACM symposium on Theory of computing (ACM, 2003), pp. 59–68. [54] A. Ambainis, Quantum walk algorithm for element distinctness, SIAM Journal on Computing 37, 210 (2007). [55] M. Szegedy, in Foundations of Computer Science, 2004. Proceedings. 45th Annual IEEE Symposium on (IEEE, 2004), pp. 32–41. [56] F. Magniez, A. Nayak, J. Roland, and M. Santha, Search via quantum walk, SIAM Journal on Computing 40, 142 (2011). [57] A. Ambainis, Quantum search algorithms, ACM SIGACT News 35, 22 (2004). 25
8cs.DS
Geometry of Information Integration arXiv:1709.02050v1 [cs.IT] 7 Sep 2017 Shun-ichi Amari1,2 , Naotsugu Tsuchiya3 , and Masafumi Oizumi1,2 1 RIKEN Brain Science Institute 2 3 Araya Inc. School of Psychological Sciences, Monash University Abstract Information geometry is used to quantify the amount of information integration within multiple terminals of a causal dynamical system. Integrated information quantifies how much information is lost when a system is split into parts and information transmission between the parts is removed. Multiple measures have been proposed as a measure of integrated information. Here, we analyze four of the previously proposed measures and elucidate their relations from a viewpoint of information geometry. Two of them use dually flat manifolds and the other two use curved manifolds to define a split model. We show that there are hierarchical structures among the measures. We provide explicit expressions of these measures. 1 Introduction It is an interesting problem to quantify how much information is integrated in a multi-terminal causal system. The concept of information integration was introduced by Tononi and colleagues in Integrated Information Theory (IIT), which attempts to quantify the levels and contents of consciousness [1, 2, 3]. Inspired by Tononi’s idea, many variants of integrated information have been proposed [4, 5, 6, 7]. From a different perspective from IIT, Ay independently derived the same measure as integrated information proposed in [4] to quantify complexity in a system [8, 9]. 1 In this paper, we use information geometry [10] to clarify the nature of various measures of integrated information as well as the relations among them. Consider a joint probability distribution p(x, y) of sender X and receiver Y , where x and y are vectors consisting of n components, denoting actual values of X and Y . Here, y is stochastically generated depending on x. That is, information is sent from the sender X to the receiver Y . We consider a Markov model, where xt+1 (=y) is generated from xt (=x) stochastically by transition probability matrix p (xt+1 |xt ). In this way, we quantify how much information is integrated within a system through one step of state transition. To quantify the amount of integrated information, we need to consider a split version of the system in which information transmission between different elements are removed, so that we can compare the original joint probability with the split one. The joint probability distribution of a split model is denoted by q(x, y). We define the amount of information integration by the minimized Kullback-Leibler (KL) divergence between the original distribution p(x, y) and the split distribution q(x, y), Φ = min DKL [p(x, y) : q(x, y)] , q (1) which quantifies to what extent p(x, y) and q(x, y) are different. Minimizing KL-divergence means selecting the best approximation of the original distribution p(x, y) among the split distributions q(x, y). We need to search for a reasonable split model. For each distinct version of of split models, corresponding measure of integrated information can be derived [8, 9, 4, 6, 7]. The present paper studies four reasonable split models and the respective measures of integrated information. Among the four integrated information, ΦG , the geometric Φ defined in [7], is what we believe the most reasonable measure for information integration in a sense that it purely quantifies causal influences between parts, although the others have their own meanings and useful characteristics. 2 2 Markovian Dynamical Systems We consider a Markovian dynamical system xt+1 = T xt (2) where xt is the state of the system at time t and xt+1 is the state at the next time step t + 1, which are vectors consisting of n elements. T is a state transition operator, which is represented by the conditional probability distribution of the next state xt+1 given the current state xt , p(xt+1 |xt ). p(xt+1 |xt ) is called a transition probability matrix. Throughout this paper, we will use x for xt and y for xt+1 for the ease of notation. Given the probability distribution of x at time t, p(x), the probability distribution of the next state, p(y), is given by p(y) = X p (y|x) p(x), (3) x and the joint probability distribution is given by p(x, y) = p(y|x)p(x). (4) Throughout the paper, we will use p(x) and p(y) to mean pX (x) and pY (y), which explicitly and accurately denote X and Y . The state x is supported by n terminals and information at terminals x1 , x2 , · · · , xn are integrated to give information in the next state y = (y1 , · · · , yn ), so that each yi depends on all of x1 , · · · , xn . We quantify how much information is integrated among different terminals through state transition. All such information is contained in the form of the joint probability distribution p(x, y). We use a general model M to represent p(x, y), called a full model, which is a graphical model where all the terminals of sender X and receiver Y are fully connected. We consider the discrete case, in particular the binary case, in which xi and yi are binary taking values of 0 or 1, although generalization to other cases (e.g., continuous, more discretization steps than binary) is not difficult. We also study the case where random continuous variables are subject to Gaussian distributions. In order to quantify the amount of information integration, we consider a “split model” MS , where information transmission from one terminal xi to the other terminals yj (j 6= i) is 3 Figure 1: Full model p(x, y). removed. Let q(x, y) be the joint probability distribution of x and y in a split model. The amount of information integration in p(x, y) is measured by the KL-divergence from p(x, y) to MS , that is, the KL-divergence from p(x, y) to q ∗ (x, y), which is a particular instantiation of the split model and is the one that is closest to p(x, y). Integrated information is defined as the minimized KL-divergence between the full model p and the split model q [7], Φ = min DKL [p(x, y) : q(x, y)] , q∈MS = DKL [p(x, y) : q ∗ (x, y)] . Depending on various definitions of “split” model MS , different measures of integrated information can be defined. Below, we elucidate the nature of the other three candidate integrated information and their relations. 3 3.1 Stochastic Models of Causal Systems Full model A full model M, p(x, y), is a graphical model in which all the nodes (terminals) are connected (Fig. 1). We consider the binary case. In that case, p(x, y) is an exponential family and can be expanded as p(x, y) = exp X θiX xi + + X X θjY yj + YY θij yi yj 4 + X X XX θij xi xj XY θij xi y j  + h(x, y) − ψ , (5) Figure 2: Fully split model q(x, y). XX , θ Y Y , θ XY . where we show linear and quadratic terms explicitly by using parameters θiX , θjY , θij ij ij h(x, y) is the higher order terms of x and y and the last term ψ is the free energy term (or cumulant generating function) corresponding to the normalizing factor. The set of distributions in the full model form a dually flat statistical manifold [10]. We hereafter neglect higher-order terms, since they disappear in split models we consider. Then, parameters XY XX Y Y , θij , θij θ = θiX , θjY , θij  (6) form an e-coordinate system to specify a distribution p(x, y). The dual coordinate system, m-coordinate system, is denoted by η,  XX Y Y XY η = ηiX , ηjY , ηij , ηij , ηij . (7) The components of η are expectations of corresponding random variables. For example, XX ηij = E [xi xj ] , (8) XY ηij = E [xi yj ] , (9) where E is the expectation. In the followings, we consider the case where the number of elements is 2 (n = 2) for the explanatory purpose, but generalization for larger n is straightforward. 5 3.2 Fully split model Ay considered a split model from the viewpoint of complexity of a system[8, 9]. The split model q(y|x) is given by q(y|x) = Y q(yi |xi ), (10) i where the conditional probability distribution of the whole system q(y|x) is fully split into that of each part. We call this model “fully split model” MF S . The corresponding measure was also introduced by Barrett and Seth [4] following the measure of integrated information proposed by Balduzzi and Tononi [2]. This split model deletes branches connecting Xi and Yj (i 6= j) and also deletes the branches connecting different Yi and Yj (i 6= j) (Here, we use capital letters X and Y to emphasize random variables, not their values.). This split model is reasonable because when terminals Yi are split, all the branches connecting Yi and the other nodes should be deleted except for branches connecting Xi and Yi . Branches connecting Xi and Xj remain as they are (Fig. 2). However, even though branches connecting Yi and Yj are deleted, this does not imply that Yi and Yj (i 6= j) are independent, because when input Xi and Xj are correlated, Yi and Yj are also correlated even though no branches exist connecting Xi and Yj and Yi and Yj . Even if branches connecting Yi and Yj are deleted, however, it does not imply that Yi and Yj (i 6= j) are independent; when input Xi and Xj are correlated, Yi and Yj are also correlated without any branches connecting Xi and Yj and Yi and Yj . When n = 2, the random variables Xi and Yj have a Markovian structure, Y1 − X1 − X2 − Y2 , (11) so that Y1 and Y2 are conditionally independent when (X1 , X2 ) is fixed. Also X2 and Y1 (or X1 and Y2 ) are conditionally independent when X1 (or X2 ) are fixed. These constraints correspond to putting XY XY YY θ12 = θ21 = θ12 =0 (12) in the θ-coordinates. They are linear constraints in the θ-coordinates. Thus, the fully split model MF S is an exponential family. It is an e-flat submanifold of M. Given p(x, y) ∈ M, 6 let q ∗ (x, y) be the m-projection of p to MF S . Then, q ∗ (x, y) is given by the minimizer of KL-divergence, q ∗ (x, y) = arg min DKL [p(x, y) : q(x, y)]. (13) q(x,y)∈MF S We use the mixed coordinate system of M,  XX Y Y XY XY XY XY YY ξ = ηiX , ηjY , ηij , ηij , η11 , η22 ; θ12 , θ21 , θ12 . (14) Then MF S is specified by (12). Because of the Pythagorean theorem, the m-projection of p to MF S that minimizes the KL-divergence DKL [p : MF S ] is explicitly given by  XX Y Y XY XY ξ ∗ = ηiX , ηjY , ηij , ηij , η11 , η22 ; 0 (15) in the ξ-coordinate system, where η-part is the same as that of the mixed coordinates of p(x, y). By simple calculations, we obtain q ∗ (x, y) = p(x)p (y1 |x1 ) p (y2 |x2 ) , (16) q ∗ (x) = p(x), Y q ∗ (y|x) = p (yi |xi ) . (17) which means (18) The corresponding measure of integrated information is given by ΦF S = X H [Yi |Xi ] − H[Y |X], (19) where H [Yi |Xi ] and H[Y |X] are the conditional entropies corresponding to the random variables. This measure was termed “stochastic interaction” by Ay [8]. While ΦF S is straightforward in derivation and its concept, it has an undesirable property as a measure of integrated information. Specifically, as we proposed in [6, 7], any measure of integrated information Φ, is expected to satisfy the following constraint, 0 ≤ Φ ≤ I(X; Y ), 7 (20) Figure 3: Diagonally split graphical model q(x, y). where I(X; Y ) is the mutual information between X and Y . This requirement is natural because Φ should quantify the “loss of information” caused by splitting a system into parts, i.e., removing information transmission between parts. The loss of information should not exceed the total amount of information in the whole system, I(X; Y ), and should be always positive or 0. Φ should be 0 only when X and Y are independent. However, ΦF S does not satisfy the requirement of the upper bound, as was pointed by [6, 7]. This is because MF S does not include the submanifold MI consisting of the independent distributions of X and Y , MI = {q(x)q(y)} . (21) XY θij = 0 (for ∀ i,j). (22) MI is characterized by It is an e-flat submanifold of M. The minimized KL-divergence between p(x, y) and MI is mutual information, I(X; Y ) = min DKL (p(x, y) : q(x, y)) q∈MI (23) Thus, while stochastic interaction, derived from the submanifold MF S , has a simple expression (Eq. 19) and nice properties on its own, it may not be an ideal measure of integrated information due to its violation of the upper-bound requirement. 3.3 Diagonally split graphical model In order to overcome the above difficulties, we consider an undirected graphical model in which all the branches connecting xi and yj (i 6= j) are deleted but all the other branches remain as 8 shown in Fig. 3. We call this model “diagonally split graphical model” MDS . The model is defined by XY XY θ12 = θ21 = 0, (24) It is also an e-flat submanifold of M. The branches connecting different yi exist so that Y Y 6= 0. The model does not remove direct interactions among y , which can be caused by θij i correlated noises directly applied to the output nodes (not through causal influences from x). The fully split model MF S introduced in the previous section is an e-flat submanifold of MDS , Y Y = 0 (i 6= j) is further required for M since θij F S. In the case of n = 2, the full model M is 10-dimensional (excluding higher-order interactions), MF S is 7-dimensional and MDS is 8-dimensional. MDS satisfies the conditions that x1 and y2 as well as x2 and y1 are conditionally independent when (x2 , y1 ) and (x1 , y2 ) are fixed, respectively. However, no Markovian type relations hold because the graph is cyclic. The model is characterized by q(x, y) = f (x)g(y) Y h (xi , yi ) . (25) i We use the following mixed coordinates  XX Y Y XY XY ξ = ηiX , ηjY , ηij , ηij ; θ12 , θ21 . (26) Then, the m-projection of p(x, y) to MSG is given by  XX Y Y ξ ∗ = ηiX , ηjY , ηij , ηij ; 0, 0 (27) in these coordinates. This implies that q ∗ (x) = p(x), (28) q ∗ (y) = p(y), (29) q ∗ (yi |xi ) = p (yi |xi ) , ∀i. (30) The corresponding measure of integrated information is ΦDS = DKL [p(x, y) : q ∗ (x, y)] . 9 (31) It satisfies the natural requirement for integrated information (Eq. 20). Thus, it resolves the shortcomings of ΦF S . However, there still remains a problem to take into consideration. To illustrate it, let us consider the two terminal Gaussian case (autoregressive (AR) model), in which x is linearly transformed to y by the connectivity matrix A and the Gaussian noise ǫ is added, y = Ax + ǫ. (32) Here, in the two terminals case, A is given by,    A11 A12  A= , A21 A22 (33) and ǫ is zero mean Gaussian noise whose covariance matrix is given by   2  σ1 σ12  Σ(E) =  . σ21 σ22 (34) Let Σ(X) be the covariance matrix of x. Then, the joint probability distribution is written as    1 p(x, y) = exp − xT Σ(X)−1 x + (y − Ax)T Σ(E)−1 (y − Ax) − ψ , (35) 2 where the means of all random variables are assumed to be equal to 0. The θ-coordinates consist of three matrices, θ = (θXX , θY Y , θXY ) , θXX = Σ(X)−1 , θXY = −AΣ(E)−1 (36) θY Y = Σ(E)−1 , (37) (38) and the corresponding η-coordinates are η = (ηXX , ηY Y , ηXY ) , ηXX = Σ(X), ηY Y = AΣ(X)A, (39) ηXY = AΣ(X). (40) We project p(x, y) (Eq. 35) to MDS . The closest point q ∗ (x, y) is again given by an AR model, y = A∗ x + ε∗ . 10 (41) where A∗ and the covariance matrix of ε∗ , Σ(E ∗ ), are determined from A, Σ(X) and Σ(E). However, the off-diagonal elements of A∗ is not zero. Therefore, the deletion of the diagonal branches in a graphical model is not equivalent to the deletion of the off-diagonal elements of A in the Gaussian case. The off-diagonal elements of A, Aij , determines causal influences from xi to yj . In the diagonal split model MDS , the causal influences are non-zero because the off-diagonal elements of A∗ , A∗ij , are non-zero. Thus, the corresponding measure of integrated information ΦDS (Eq. 31) does not purely quantify causal influences between the elements. In IIT, integrated information is designed to quantify causal influences [2, 3]. In this sense, it is desirable to have a split model, which results in a diagonal connectivity matrix A. 3.4 Causally split model (Geometric model) To derive a split model where only causal influences between elements are removed, we consider that the essential part is to remove branches connecting xi and yj (i 6= j), without destroying other constituents. The minimal requirement to remove the effect of the branch (i, j) is to let xi and yj be conditionally independent, when all the other elements are fixed. In our case of n = 2, we should have two Markovian conditions X1 —X2 —Y2 , (42) X2 —X1 —Y1 . (43) The split model that satisfies the above conditions was introduced by Oizumi, Tsuchiya and Amari [7] and was called “geometric model” MG , because information geometry was used as a guiding principle to obtain the model. We can also call it “causally split model” because causal influences between elements are removed. The model MG is a 8-dimensional submanifold of M in the case of n = 2, because there are two constraints (Eqs. 42 and 43). These constraints are expressed as q (x1 , y2 |x2 ) = q (x1 |x2 ) q (y2 |x2 ) , (44) q (x2 , y1 |x1 ) = q (x2 |x1 ) q (y1 |x1 ) . (45) 11 We can write down the constraints in terms of θ-coordinates, but they are nonlinear. They are also nonlinear in the η-coordinates. Thus, MG is a curved submanifold and it is not easy to give an explicit solution of the m-projection of p(x, y) to MG . We can solve the Gaussian case explicitly [7]. It is not difficult to prove that, when the Markovian conditions in Eqs. 42 and 43 are satisfied, the connectivity matrix A′ of an AR model in MG , y = A′ x + E ′ , (46) is a diagonal matrix. From (38), we have A′ = −θY−1Y θXY . (47) Thus, the constraints in Eqs. 42 and 43 expressed in terms of θ-coordinates are equivalent to the off-diagonal elements of matrix θY−1Y θXY being 0. Thus, the constraints are nonlinear in the θ-coordinates. The corresponding measure of integrated information, ΦG (geometric integrated information), is given explicitly by ΦG = 1 |Σ(E)| log , 2 |Σ(E ′ )| (48) where Σ(E) is the noise covariance of p(x, y), Σ(E ′ ) is that of projected q ∗ (x, y), |Σ(E)| is the determinant of Σ(E). By construction, it is easy to see that ΦG satisfies the requirements for integrated information, 0 ≤ ΦG ≤ I(X; Y ), (49) because the causally split model MG includes the submanifold MI consisting of the independent distributions of X and Y (Eq. 21). We believe that ΦG is the best candidate measure in the sense that it is closest to the original philosophy of integrated information in IIT. In IIT, integrated information is designed to quantify causal influences between elements [2, 3]. Note that in IIT, “causal” influences are quantified by Pearl’s intervention framework [11, 2, 12] attempting to quantify the “actual” causation. On the other hand, causal influences quantified in this paper do not necessarily mean actual causation. ΦG is related to observational measures of causation such as Granger causality or Transfer entropy [7]. 12 3.5 Mismatched decoding model As a different direction from the above measures of integrated information, we can consider another model, called a mismatched decoding model MM D . We use the concept of mismatched decoding in information theory proposed by Merhav et al [13]. We have utilized this concept in the context of neuroscience [14, 15, 16, 6, 17]. To introduce the decoding perspective, let us consider a situation where we try to estimate the input x when the output y is observed. When we know the correct joint probability distribution p(x, y), we can estimate x by using the true distribution p(x|y). This is the optimal matched decoding. However, when we use a split model q(x, y) for decoding, there is always loss of information. This type of decoding is called mismatched decoding because the decoding model q(x, y) is different from the actual probability distribution p(x, y). We previously considered the fully split model as a mismatched decoding model [6] q(y|x) = Y q(yi |xi ). (50) i By using the Merhav’s framework, the information loss when q(y|x) is used for decoding can be quantified by [13, 6] ΦM D = minDKL [p(x, y)||q(x, y; β)] . β (51) where Q p(x)p(y) i p (yi |xi )β q(x, y; β) = P . Q ′ β ′ i p (yi |xi ) x′ p(x ) (52) To quantify the information loss ΦM D , the KL-divergence needs to be minimized with respect to the one-dimensional parameter β. We call q(x, y; β) “mismatched decoding model” MM D . The mismatched decoding model MM D forms one-dimensional submanifold. As can be seen in Eq. 52, no interaction terms are included between xi and yj (i 6= j). Thus, MDM is included in the diagonally split graphical model MDS . The optimal β ∗ , which minimizes the KL-divergence, is given by projecting p(x, y) to MM D . Since MM D is not an e-flat submanifold, it is difficult to obtain the analytical expression of q ∗ (x, y). However, the minimization of KL-divergence is a convex problem and thus, the optimal β ∗ can be easily found by numerical calculations such as gradient descent [18, 6]. 13 4 Comparison of various measures of integrated information We have derived four measures of integrated information from four different definitions of the split model. We elucidate their relations in this section. First, MF S and MDS are e-flat submanifolds, forming exponential families. Therefore, we can directly apply the Pythagorean projection theorem and the projected q ∗ (x, y) is explicitly obtained by using the mixed coordinates. However, MG and MM D are curved submanifolds and thus, it is difficult to analytically obtain the projected q ∗ (x, y) in general. The natural requirements for integrated information, 0 ≤ Φ ≤ I(X, Y ), (53) are satisfied for all the measures of integrated information except for MF S . This is because MF S does not include MI (Eq. 21) while the other split models include MI . In general, when M1 ⊃ M2 , min DKL [p : q] ≤ min DKL [p : q] (54) Φ2 ≥ Φ1 . (55) q∈M1 q∈M2 and therefore, We have proved MDS ⊃ MF S , MDS ⊃ MM D , (56) MG ⊃ MF S . (57) From these relations between the split models, we have the relations between the corresponding measures of integrated information, ΦF S ≥ ΦDS , ΦM D ≥ ΦDS , ΦF S ≥ ΦG . (58) MF S is included in the intersection of MDS and MG . MI is included in MDS , MG , and MM D . The relations among four different measures of integrated information are schematically summarized in Fig. 4. 14 Figure 4: Relations among four different split models. Fully split model MF S and diagonally split graphical model MDS are dually flat manifolds. MF S is represented by a magenta line on XX XY XX , θ XY . M the axis of θ12 DS is represented by a blue square spanned by the two axes θ12 , θii ii Y Y . Causally split model (geometric model) M and mismatched decoding model M and θ12 G MD are curved manifolds. MG is represented by a curved green surface. MM D is represented by a curved red line inside the surface of MDS . Pind is an independent distribution of x and y, Pind = p(x)p(y), which is represented by a black point. Pind is included in MDS , MM D , and MG but is not included in MF S . 5 Conclusions We studied four different measures of integrated information in a causal stochastic dynamical system from the unified viewpoint of information geometry. The four measures have their own meanings and characteristics. We elucidated their relations and a hierarchical structure of the measures (Fig. 4). We can define a measure of information transfer for each branch, but their effects are not additive but subadditive. Therefore, we need to study further collective behaviors of deleting branches [19]. This remains a future problem to be studied. 15 References [1] Tononi G. An information integration theory of consciousness. BMC Neurosci. 2004;5:42. doi:10.1186/1471-2202-5-42. [2] Balduzzi D, Tononi G. Integrated information in discrete dynamical systems: motivation and theoretical framework. PLoS Comput Biol. 2008;4(6):e1000091. doi:10.1371/journal.pcbi.1000091. [3] Oizumi M, Albantakis L, Tononi G. From the phenomenology to the mechanisms of consciousness: integrated information theory 3.0. PLoS Comput Biol. 2014;10(5):e1003588. doi:10.1371/journal.pcbi.1003588. [4] Barrett AB, Barnett L, Seth AK. Multivariate Granger causality and generalized variance. Phys Rev E. 2010;81(4):041907. doi:10.1103/PhysRevE.81.041907. [5] Tegmark M. Improved measures of integrated information. PLoS computational biology. 2016;12(11):e1005123. [6] Oizumi M, Amari S, Yanagawa T, Fujii N, Tsuchiya N. formation from the decoding perspective. Measuring integrated in- PLoS Comput Biol. 2016;12(1):e1004654. doi:10.1371/journal.pcbi.1004654. [7] Oizumi M, Tsuchiya N, Amari S. based on information geometry. Unified framework for information integration Proceedings of the National Academy of Sciences. 2016;113(51):14817–14822. [8] Ay N. Information geometry on complexity and stochastic interaction. MPI MIS PREPRINT 95. 2001;. [9] Ay N. Information geometry on complexity and stochastic interaction. 2015;17(4):2432–2458. doi:10.3390/e17042432. [10] Amari S. Information geometry and its applications. Springer; 2016. 16 Entropy. [11] Pearl J. Causality. Cambridge university press; 2009. [12] Ay N, Polani D. Information flows in causal networks. Advances in complex systems. 2008;11(01):17–41. [13] Merhav N, Kaplan G, Lapidoth A, Shitz SS. On information rates for mismatched decoders. IEEE Transactions on Information Theory. 1994;40(6):1953–1967. [14] Oizumi M, Ishii T, Ishibashi K, Hosoya T, Okada M. Mismatched decoding in the brain. Journal of Neuroscience. 2010;30(13):4815–4826. [15] Oizumi M, Okada M, Amari S. Information loss associated with imperfect observation and mismatched decoding. Frontiers in computational neuroscience. 2011;5. [16] Boly M, Sasai S, Gosseries O, Oizumi M, Casali A, Massimini M, et al. Stimulus set meaningfulness and neurophysiological differentiation: a functional magnetic resonance imaging study. PLoS One. 2015;10(5):e0125337. doi:10.1371/journal.pone.0125337. [17] Haun AM, Oizumi M, Kovach CK, Kawasaki H, Oya H, Howard MA, et al. Contents of consciousness investigated as integrated information in direct human brain recordings. eNeuro. 2017;in press. [18] Latham PE, Nirenberg S. Synergy, redundancy, and independence in population codes, revisited. Journal of Neuroscience. 2005;25(21):5195–5206. [19] Jost J, Bertschinger N, Olbrich E, Ay N, Frankel S. An information theoretic approach to system differentiation on the basis of statistical dependencies between subsystems. Physica A: Statistical Mechanics and its Applications. 2007;378(1):1–10. 17
7cs.IT
arXiv:1803.05768v2 [cs.AI] 17 Mar 2018 PAC-Reasoning in Relational Domains Ondřej Kuželka Department of CS KU Leuven Leuven, Belgium Yuyi Wang Disco Group ETH Zurich Zurich, Switzerland Abstract We consider the problem of predicting plausible missing facts in relational data, given a set of imperfect logical rules. In particular, our aim is to provide bounds on the (expected) number of incorrect inferences that are made in this way. Since for classical inference it is in general impossible to bound this number in a non-trivial way, we consider two inference relations that weaken, but remain close in spirit to classical inference. 1 INTRODUCTION In this paper we study several forms of logical inference for predicting plausible missing facts in relational data. While a variety of approaches have already been studied for this task, ranging from (relational versions of) probabilistic graphical models [17, 4] to neural network architectures [22, 18] and graph based methods [13, 14], logic-based inference has several advantages over these other forms of inference. For example, logic-based inference is explainable: there is a proof for any derived statement, which can, in principle, be shown to a human user. It is also more transparent than most other methods, in the sense that a knowledge base as a whole can be understood and modified by domain experts. On the other hand, classic logical inference can be very brittle when some of the rules which are used are imperfect, or some of the initial facts may be incorrect. Statistical relational learning approaches, such as Markov logic networks [17] or probabilistic logic programming [4], offer a solution to this latter problem, but they require learning a joint probability distribution over the set of possible worlds. This distribution is typically estimated from one or several large examples using maximum likelihood, which essentially corresponds to find- Jesse Davis Department of CS KU Leuven Leuven, Belgium Steven Schockaert School of CS & Informatics Cardiff University Cardiff, UK ing a maximum-entropy distribution given by a set of sufficient statistics. However, there are usually no guarantees on the learned distributions beyond guarantees for the sufficient statistics (see, e.g., [11]), which means that we do not have much control on the quality of the predictions. Moreover, these models are not easy to modify, and are not always easy to explain because the way in which probabilities are computed can simply be too complex. In this paper we focus on forms of inference that stay as close to classical logic as possible while not breaking completely when the given theory happens to be “mildly” inconsistent with the data. This problem of reasoning under inconsistency has a long tradition in the field of artificial intelligence, with common solutions including the use of paraconsistent logics [3, 16], belief revision [7] (and related inconsistency repair mechanisms [10]), and argumentation-based inference [6, 2]. In contrast to these approaches, however, our specific aim is to study forms of inference that can allow us to bound the (expected) number of mistakes that are made. To this end, we introduce two inference relations called k-entailment and voting entailment, both of which are close to classical logic, and in particular do not require rules to be weighted. We define them such that errors produced by imperfect rules would not necessarily propagate too much in the given relational data. As our main contribution, we are able to show that in a relational learning scenario from [11], in which a (large) training example and a test example are sampled from a hidden relational structure, there are non-trivial PACtype bounds on the number of errors that a theory learned on the training example produces on the test example. From this perspective, our work can also be seen as a relational-learning counterpart of PAC semantics [21]. Technical contributions. The results presented in this paper rest mainly on the following two technical contributions: (i) introduction of bounds on the worst case behavior of the considered inference relations, and (ii) new concentration inequalities for sampling from relational data without replacement that allow us to bound (expected) test error as a function of the training error, in the spirit of classical PAC-learning results [20]. 2 PRELIMINARIES In this paper we consider a function-free first-order logic language L, which is built from a setSof constants Const, variables Var and predicates Rel = i Reli , where Reli contains the predicates of arity i. We assume an untyped language. For a1 , ..., ak ∈ Const ∪ Var and R ∈ Relk , we call R(a1 , ..., ak ) an atom. If a1 , .., ak ∈ Const, this atom is called ground. A literal is an atom or its negation. The formula α0 is called a grounding of α if α0 can be obtained by replacing each variable in α with a constant from Const. A formula is called closed if all variables are bound by a quantifier. A possible world ω is defined as a set of ground atoms. The satisfaction relation |= is defined in the usual way. A substitution is a mapping from variables to terms. 3 PROBLEM SETTING First we describe the learning setting considered in this paper. It follows the setting from [11],which was used to study the estimation of relational marginals. An example is a pair (A, C), with C a set of constants and A a set of ground atoms which only use constants from C. An example is intended to provide a complete description of the world, hence any ground atom over C which is not contained in A is implicitly assumed to be false. Note that this is why we have to explicitly specify C, as opposed to simply considering the set of constants appearing in A. In practice, we usually only have partial information about some example of interest. The problems we consider in this paper relate to how we can then reason about the probability that a given ground atom is true (i.e. belongs to the example). To estimate such probabilities, we assume that we are given a fragment of the example, which we can use as training data. Specifically, let Υ = (A, C) be an example and S ⊆ C. The fragment ΥhSi = (B, S) is defined as the restriction of Υ to the constants in S, i.e. B is the set of all atoms from A which only contain constants from S. In a given example, any closed formula α is either true or false. To assign probabilities to formulas in a meaningful way, we consider how often the formula is satisfied in small fragments of the given example. Definition 1 (Probability of a formula [11]). Let Υ = (A, C) be an example and k ∈ N. For a closed formula α without constants, we define its probability as follows1 : QΥ,k (α) = PS∼Unif(C,k) [ΥhSi |= α] where Unif(C, k) denotes uniform distribution on size-k subsets of C. P Clearly QΥ,k (α) = |C1k | · S∈Ck 1(ΥhSi |= α) where Ck is the set of all size-k subsets of C. The above definition is also extended straightforwardly to probabilities of sets of formulas (which we will also call theories interchangeably). V If Φ is aVset of formulas, we set QΥ,k (Φ) = QΥ,k ( Φ) where Φ denotes the conjunction of all formulas in Φ. Example 1. Let sm/1 be a unary predicate denoting that someone is a smoker, e.g. sm(alice) means that alice is a smoker. Let us have an example Υ = ({fr(alice, bob), sm(alice), sm(eve)}, {alice, bob, eve}), and formulas α = ∀X : sm(X) and β = ∃X, Y : fr(X, Y ). Then, for instance, QΥ,1 (α) = 2/3, QΥ,2 (α) = 1/3 and QΥ,2 (β) = 1/3. Definition 2 (Masking). A masking process is a function κ from examples to ground conjunctions that assigns to any Υ = (A, C) a conjunction of ground literals β such that Υ |= β. We also define κ(Υ)hSi to be the conjunction consisting of all literals from κ(Υ) that contain only constants from S. Unlike examples, masked examples only encode partial information about the world. This is why they are encoded using conjunctions of literals, so we can explicitly encode which atoms we know to be false. Example 2. Let Υ = {sm(alice), fr(alice, bob), {alice, bob}}. Then a masking process κ may, for instance, yield κ(Υ) = ¬sm(bob) ∧ sm(alice). In this case κ(Υ) retains the information that alice is a smoker and bob is not, but it no longer contains any information about their friendship relation. Next we introduce the statistical setting considered in this paper. Definition 3 (Learning setting). Let ℵ = (Aℵ , Cℵ ) be an example and κ be a masking function. Let CΥ ⊆ Cℵ and CΓ ⊆ Cℵ be uniformly sampled subsets of size n and u, respectively. We call Υ = ℵhCΥ i the training example and Γ = ℵhCΓ i the test example. We assume that the learner receives Υ in the training phase and κ(Γ) in the test phase. 1 We will use Q for probabilities of formulas as defined in this section, to avoid confusion with other “probabilities” we deal with in the text. With slight abuse of terminology, we will sometimes say that Υ and Γ are sampled from ℵ. In addition to the training example Υ and masked test example κ(Γ), we will assume that we are given a set of formulas Φ (which we will also refer to as rules). Our main focus will be on how these formulas can be used to recover as much of Γ as possible. Rather than specifying a loss function that should be minimized, we want to find a form of inference which allows us to provide bounds on the (expected) number of incorrect literals that can be inferred from {κ(Γ)}∪Φ. Note that in this case, the training example Υ is used to estimate the accuracy of the set of formulas. We also analyze the case where the rules are learned from the training example Υ (in the spirit of classical PAC-learning results). Among others, the setting from Definition 3 is close to how Markov logic networks are typically used. For instance, when training Markov logic networks, one typically starts with a training example that contains all facts (i.e. nothing is unknown about the training set), on which a model is trained. This model is then used to predict unknown facts about a test example. However, unlike for Markov logic networks, we do not attempt to learn a probability distribution. It was shown in [12] that models based on classic logical inference, like those considered in this paper, work well in practice for relational inference from small evidence sets. Thus, such models are also of considerable practical interest. 4 REASONING WITH INACCURATE RULES When reasoning with imperfect rules, using classical inference can have drastic consequences, as we will illustrate in Section 4.1. Even a single mistake can lead to many errors, since an incorrectly derived literal can be used as the basis for further inferences. This means that classical inference is not suitable for the considered setting, even in cases where the given rules have perfect accuracy on the training example. Intuitively, to allow for any meaningful bounds to be derived, we need to prevent arbitrarily long chains of inference. To this end, we propose and motivate the use of a restricted form of inference, called k-entailment, in Section 4.2. A further restriction on inferences, based on a form of voting, is subsequently discussed in Section 4.3. In Section 5 we will then show which bounds can be derived for these two restricted forms of inference. 4.1 WHEN CLASSICAL REASONING LEADS TO ERRORS The next example, which is related to label propagation as studied e.g. in [24], shows that classic logical reasoning on the obtained relational sample may produce many mistakes even when all the available rules are very accurate. Example 3. Let k = 2, Γ = {{rare(c1 )}, {c1 , c2 , . . . , c1000000 }, and α = ∀X, Y : rare(X) ⇒ rare(Y ). While the rule does not intuitively make sense, its accuracy is actually very high QΓ,k (α) = 1 − 999999/(0.5 · 1000000 · 999999) = 0.999998. When we apply this rule with the evidence rare(c1 ), we derive rare(c2 ), . . . , rare(c1000000 ), all of which are incorrect (i.e. not included in Γ). Note that in this paper, we are interested in worst-case behavior, in the sense that the masking process which is used may be seen as adversarial. The next example further illustrates how adversarial masking processes can lead to problems, even for rules with near-perfect accuracy. Example 4. Let k = 2, Γ = {{rare(c1 ), e(c1 , c2 ), e(c2 , c3 ), . . . , e(c999999 , c1000000 ) }, {c1 , c2 , . . . , c1000000 }, and α = ∀X, Y : rare(X) ∧ e(X, Y ) ⇒ rare(Y ). In this case, there is only one size-k subset of CΓ where the formula α does not hold, so the accuracy is even higher than in the previous example. Yet the adversarial masking process can select evidence consisting of all true positive literals from Γ, i.e. the evidence will consist of the rare(c1 ) literal and all the e/2 literals from Γ. Then the set of errors that are made when using the formula α will be the same as in Example 3, despite the fact that the rule is almost perfect on Γ. Note that in the examples above, we had perfect knowledge of the accuracy of the rule α on the test example (i.e. we knew the value of QΓ,k (α)). In practice, this accuracy needs to be estimated from the training example. In such cases, it can thus happen that a rule α has accuracy 1 on the training example Υ, but still produces many errors on κ(Γ). We will provide PAC-type bounds for this setting with estimated accuracies in Sections 5. First, however, in Section 4.2 and 4.3 we will look at how bounds can be provided on the number of incorrectly derived literals in the case where QΓ,k (α) is known. As the above examples illustrate, to obtain reasonable bounds, we will need to consider forms of inference which are weaker than classical entailment. 4.2 BOUNDED REASONING USING k-ENTAILMENT We saw that even for formulas which hold for almost all subsets of Γ, the result of using them for inference can be quite disastrous. This was to a large extent due to the fact that we had inference chains involving a large number of domain elements (constants). This observation suggests a natural way to restrict the kinds of inferences that can be made when imperfect rules are involved. Definition 4 (k-entailment). Let k be a non-negative integer, Υ = (A, C) be an example, κ be a masking process, and Φ be a set of closed formulas. We say that a ground formula ϕ is k-entailed by Φ and κ(Υ), denoted {κ(Υ)} ∪ Φ |=k ϕ, if there is a C ′ ⊆ C such that |C ′ | ≤ k, const(ϕ) ⊆ C ′ , {κ(Υ)hC ′ i} ∪ Φ is consistent and {κ(Υ)hC ′ i} ∪ Φ |= ϕ. In other words, a formula φ is k-entailed by Υ and Φ if it can be proved using Φ together with a fragment of κ(Υ) induced by no more than k constants, with the additional condition that Φ and this fragment are not contradictory. Example 5. Let Υ = ({fr(alice, bob), sm(alice)}, {alice, bob, eve}) κ(Υ) = fr(alice ∧ bob) ∧ sm(alice) Φ = {∀X, Y : fr(X, Y ) ∧ sm(X) ⇒ sm(Y )}. Then ϕ = sm(bob) is 2-entailed from κ(Υ) and Φ but not 1-entailed. Note that, in the setting of Example 4, k-entailment would make at most k − 1 mistakes. However, 2entailment would already produce many mistakes in the case of Example 3. So there are cases where kentailment produces fewer errors than classical logic entailment but, quite naturally, also cases where both produce the same number of errors. Importantly, however, for k-entailment, we can obtain non-trivial bounds on the number of errors. Next we state two lemmas that follow immediatelly from the respective definitions. Lemma 1. Let Υ = (A, C) be an example, Φ be a set of constant-free formulas and κ be a masking function. Let Cl be the set of all size-k subsets of C. Let HX denote the set of all ground literals which can be derived using kentailment from {κ(Υ)} S ∪ Φ and only contain constants from X . Then HC = S∈Cl HS . Lemma 2. When ΓhSi |= Φ then all ground literals that only contain constants from S and that are entailed by {κ(ΓhSi)} ∪ Φ must be true in ΓhSi. We now provide a bound on the number of ground literals wrongly k-entailed by a given Φ, assuming that we know its accuracy QΓ,k (Φ) on the example Γ. Proposition 6. Let Γ = (A, C) be an example, Φ be a set of constant-free formulas and κ be a masking process. Next let F (Γ) be the set of all ground literals of a predicate p/a, a ≤ k, which are k-entailed by {κ(Γ)} ∪ Φ but are false in Γ. Then |F (Γ)| ≤ (1 − QΓ,k (Φ))|C|k k a . Proof. First, we note that the number of size-k subsets is bounded by |C|k and the number of different ground p/a atoms in each of these subsets is k a . It follows from Lemma 2 and Lemma 1 that for any literal δ ∈ F there must be a size-k set S ⊆ C such that ΓhSi 6|= Φ. The number of all such S’s that satisfy ΓhSi 6|= Φ is bounded by (1 − QΓ,k (Φ))|C|k . Hence, we have |F (Γ)| ≤ (1 − QΓ,k (Φ))|C|k k a . We can notice that when we increase the domain size |C|, keeping QΓ,k (Φ) fixed and non-zero, the bound eventually becomes vacuous for predicates whose arity a is strictly smaller than k. This is because the number of all ground literals grows only as |C|a whereas the bound grows as |C|k . However, if a = k, the bound stays fixed when we increase the domain size. We will come back to consequences of this fact in Section 6. 4.3 BOUNDED REASONING USING VOTING To further restrict the set of entailed ground literals, we next introduce voting entailment. Definition 5 (Voting Entailment). Let k be an integer and γ ∈ [0; 1]. Let Υ = (A, C) be an example, Φ be a set of constant-free formulas, and κ be a masking process. A ground literal l of arity a, a ≤ k, is said to be entailed from Φ and κ(Υ) by voting with parameters k and γ if there are at least max{1, γ · |C|k−a } size-k sets S ⊆ C such that l is k-entailed by κ(Υ)hSi. The next example illustrates the use of voting entailment. Example 7. Let Υ = (A, C), where C = {alice, bob, eve}, and let κ(Υ) = fr(alice, bob) ∧ fr(eve, bob) ∧ sm(eve). Next, let Φ = {∀X, Y : fr(X, Y ) ∧ sm(X) ⇒ sm(Y )}. Then sm(bob) is entailed from Φ and κ(Υ) by voting with the parameters k = 2 and γ = 2/3, as γ · |C|k−a = 2/3 · 32−1 = 2 and there are two size-2 subsets of C that 2-entail sm(bob). In the previous section, we saw that for predicates of arity k, we have non-vacuous bounds on the number of errors produced by k-entailment. The next observation is important in light of this as it shows that predictions of voting entailment agree with predictions of k-entailment for literals of arity k. Remark 8. Any literal that has arity k and is k-entailed by given {κ(Γ)} ∪ Φ is also entailed from {κ(Γ)} ∪ Φ by voting (with parameters k ′ ≥ k and γ ≥ 0). with probability at least 1 − δ, where δ is a confidence parameter. Note that the case where the theory Φ is given, rather than learned, corresponds H = {Φ}. We now show how the bound from Proposition 6 can be strengthened in the case of voting entailment. We start by proving general concentration inequalities in Section 5.1 which we then use to prove bounds for kentailment. These bounds are studied for the realizable case in Section 5.2 and for the general case in Section 5.3. Bounds for voting entailment are studied in Section 5.4 Proposition 9. Let k be an integer and γ ∈ [0; 1]. Let Γ = (A, C) be an example, Φ be a set of constant-free formulas, and κ be a masking process. Let F (Γ) be the set of all ground literals of a predicate p/a, a ≤ k, that are entailed by voting from {κ(Γ)} ∪ Φ with parameters k and γ but are false in Γ. If γ · |C|k−a ≥ 1 then |F (Γ)| ≤ (1 − QΓ,k (Φ)) We will need to bound the difference between the “accuracy” of given sets of logic formulas Φ on the training sample Υ and their accuracy on a test sample Γ (i.e. the difference between QΥ,k (Φ) and QΓ,k (Φ)). To prove the concentration inequalities in this section, we will utilize the following lemma. |C|a k a γ and otherwise |F (Γ)| ≤ (1 − QΓ,k (Φ)) |C|k k a . Proof. First we define the number of “votes” for a ground literal l as #κ(Γ),Φ (l) = | {S ⊆ C ||S|=k, {κ(Γ)hSi} ∪ Φ |=k l } |. Let L be the set of all ground p/a literals l such that Γ |= ¬l. Then, since any size-k subset of C can only contribute k a votes to literals based on the predicate p/a, we have X #κ(Γ),Φ (l) ≤ (1 − QΓ,k (Φ)) |C|k k a . l∈L (1−QΓ,k (Φ))|C|k ka Hence |F (Γ)| ≤ max{1,γ·|C| k−a } . If a a then |F (Γ)| ≤ (1 − QΓ,k (Φ)) |C|γ k . k−a γ · |C| γ · |C| 5.1 CONCENTRATION INEQUALITIES k−a ≥ 1 The case when < 1 follows from Theorem 6. Unlike for k-entailment, the fraction of “wrong” ground p/a literals entailed by voting entailment does not grow with an increasing domain size as long as γ · |C|k−a ≥ 1. 5 PROBABILISTIC BOUNDS We now turn to the setting where the accuracy of the formulas needs to be estimated from a training example Υ. More generally, we also cover the case where the formulas themselves are learned from the training example. In such cases, to account for over-fitting, we need to consider the (size of the) hypothesis class that was used for learning these formulas. Specifically, we prove probabilistic bounds for variants of the following learning problem. We are given a hypothesis set H of constantfree theories, and we want to compute bounds on the number of incorrectly predicted literals which simultaneously hold for all Φ ∈ H (as a function of QΥ,k (Φ)) Lemma 3 (Kuželka et al. [11]). Let ℵ = (Aℵ , Cℵ ) be an example. Let 0 ≤ n ≤ |Cℵ | and 0 ≤ k ≤ n be integers. Let X = (S1 , S2 , . . . , S⌊ nk ⌋ ) be a vector of subsets of Cℵ , each sampled uniformly and independently of the others from all size-k subsets of Cℵ . Next let I ′ = {1, 2, . . . , |Cℵ |} and let Y = (S1′ , S2′ , . . . , S⌊′ n ⌋ ) k be a vector sampled by the following process: 1. Sample CΥ uniformly from all size-n subsets of Cℵ . 2. Sample subsets I1′ , . . . , I⌊′ n ⌋ of size k from I ′ . k 3. Sample an injective function g : uniformly from all such functions. S⌊n/k⌋ i=1 Ii′ → CΥ 4. Define Si′ = g(Ii′ ) for all 0 ≤ i ≤ ⌊ nk ⌋. Then X and Y have the same distribution. The next example illustrates the intuition behind the proof of this lemma, which can be found in [11]. Example 10. Let Cℵ = {1, 2, . . . , 106 }. Let us sample ⌊m/k⌋ size-k subsets of Cℵ uniformly. If this was the process that generates the data from which we estimate parameters, we could readily apply Hoeffding’s inequality to get the confidence bounds. However, in typical SRL settings (e.g. with MLNs), we are given a complete example on some set of constants (objects), rather than a set of small sampled fragments. So we instead need to assume that the whole training example is sampled at once, uniformly from all size-m subsets of Cℵ . However, when we then estimate the probabilities of formulas from this example, we cannot use Hoeffding’s bound or any other bound expecting independent samples. What we can do2 2 Note that we do not need to do this in practice which will is to mimic sampling from Cℵ by sampling from an auxiliary set of constants of the same size as Cℵ and then specialising these constants to constants from a sampled size-m subset. Hence the first ⌊m/k⌋ sampled sets will be distributed exactly as the first ⌊m/k⌋ subsets sampled i.i.d. directly from Cℵ . Lemma 3 was used in [11] to prove a bound on expected error. Here we extend that result and use Lemma 3 to prove the concentration inequalities stated in the next two theorems. Theorem 11. Let ℵ = (Aℵ , Cℵ ) be an example and let 0 ≤ n ≤ |Cℵ | and 0 ≤ k ≤ n be integers. Let CΥ be sampled uniformly from all size-n subsets of Cℵ and let Υ = ℵhCΥ i. Let α be a closed and constant-free formula and let Ck denote all size-k subsets of CΥ . Let bΥ = QΥ,k (α) and let Aℵ = Qℵ,k (α). Then we have A    bΥ − Aℵ ≥ ε] ≤ exp −2 n ε2 , P [Aℵ − A bΥ ≥ P [A kh i  n  2 bΥ − Aℵ ≥ ε ≤ ε] ≤ exp −2 k ε , and P A    2 exp −2 nk ε2 . e(q) . Proof. First we define an auxiliary estimator A Υ (q) Let Y be a vector of ⌊n/k⌋ · q size-k subsets of CΥ where the subsets of CΥ in each of the q non(q) (q) (q) overlapping size-⌊n/k⌋ segments Y1 , Y2 , . . . , Yq (q) of Y are sampled in the same way as the elements of the vector Y in Lemma 3, all with the same CΥ (i.e. Y(q) is the concatenation of the vec(q) (q) (q) e(q) = tors Y1 , Y2 , . . . , Yq ). Let us define A Υ P 1 e(q) as 1(ΥhSi |= α). We can rewrite A (q) S∈Y Υ q·⌊n/k⌋ P P 1 e(q) = 1 q A (q) 1(ΥhSi |= α). Υ i=1 ⌊n/k⌋ q S∈Yi Then we can use the following fact (Hoeffding [8], Section Pq 5): If T = a1 · T1 + a2 · T2 + · · · + aq · Tn , ai ≥ 0, i=1 ai = 1 and each of the terms Ti is a sum of in(i) dependent random zero-mean variables Xj such that (i) P [a ≤ Xj h > 0, ≤ b] = 1 and b − a ≤ 1, then, for any P [T ≥ ε] ≤ n X ai · E [exp (h(Ti − ε))] i=1 Note that the Ti ’s do not have to be independent. According to Hoeffding’s lemma (Lemma 1 in [8]), assuming ai = 1/q: P [T ≥ ε] ≤ q X 1 i=1 ≤ e−hε exp  q · E [exp (h(Ti − ε))] m · h2 8    m · h2 = exp −hε + 8 follow from Theorem 11; we only need this mimicking process to prove that theorem. where m denotes the number of summands of Ti (which, in our case, is the same for all Ti ’s). Note that this func4ε tion P achieves its minimum at h = m . We set Ti := (q) (1(ΥhSi |= α) − Aℵ ) (note that E [Ti ] = 0 S∈Yi and m = ⌊n/k⌋). Thus, we get  j k  e(q) − Aℵ ≥ ε] ≤ exp −2 n ε2 , P [A Υ k e(q) ≥ ε] symmetrically  n  2 also P [Aℵ − AΥ exp −2 k ε , and, using union bound, we get ≤  j k  e(q) − Aℵ | ≥ ε] ≤ 2 exp −2 n ε2 . P [|A Υ k It follows from the strong law of large numbers (which e(q) = A bΥ ] = 1. Since holds for any Υ) that P [limq→∞ A Υ q was arbitrary, the statement of the proposition follows. As the next theorem shows, the above result can be generalized to the case where we need to bound the difference between the estimations obtained from two samples. Theorem 12. Let ℵ = (Aℵ , Cℵ ) be an example and let 0 ≤ n, u ≤ |Cℵ | and 0 ≤ k ≤ n be integers. Let CΥ and CΓ be sampled uniformly from all size-n and size-u subsets of Cℵ and let Υ = ℵhCΥ i, Γ = ℵhCΓ i. Let α be a bΥ = QΥ,k (α), closed and constant-free formula. Let A bΓ = QΓ,k (α), and let Aℵ = Qℵ,k (α). Then we A   −2ε2 bΥ − A bΓ ≥ ε] ≤ exp , and have P [A h i  1/⌊n/k⌋+1/⌊u/k⌋  2 −2ε bΥ − A bΓ ≥ ε ≤ 2 exp P A 1/⌊n/k⌋+1/⌊u/k⌋ . Proof. See the appendix. We note that the concentration inequality derived in Theorem 11 improves upon a concentration inequality derived in [15] (Chapter 10) that contains n/k 2 (in our notation) instead of ⌊n/k⌋ in the exponential3. Next we prove an inequality for the special case where the probability of a formula α on Υ is 0. Since we can also take negations of formulas, this theorem will be useful to prove bounds for formulas that are perfectly accurate on training data. As the following theorem shows, in this case we obtain stronger guarantees, where we have ε instead of ε2 in the exponential. Theorem 13. Let ℵ = (Aℵ , Cℵ ) be an example and let 0 ≤ n ≤ |Cℵ | and 0 ≤ k ≤ n be integers. Let CΥ be sampled uniformly from all size-n subsets of Cℵ and let Υ = ℵhCΥ i. Let α be a closed and constant-free 3 This is essentially due to the fact that we use Hoeffding’s decomposition whereas Lovasz relies on Azuma’s inequality, leading to a looser bound compared to our bound. formula and let Ck denote all size-k subsets of CΥ . Let bΥ = QΥ,k (α) and let Aℵ = Qℵ,k (α) ≥ ε. Then we A have h i bΥ = 0 ≤ exp (− ⌊n/k⌋ ε) . P A Proof. Let Y be sampled as in Lemma 3 (i.e. Y is sampled only using Υ and not directly ℵ). Then using Lemma 3 we know that the elements of Y are distributed like ⌊n/k⌋ independent samples (size-k subsets) from Cℵ . Hence we can bound the probability P [AΥ = 0] ≤ (1 − ε)⌊n/k⌋ ≤ exp (−⌊n/k⌋ε). Obviously, adding the rest of the information from size-k subsets of CΥ that are not contained in Y cannot increase the bound. 5.2 ZERO TRAINING ERROR CASE We start by proving a bound for the realizable (i.e. zero training error) case. Theorem 14. Let ℵ, Υ, Γ, n, u and κ be as in Definition 3 (i.e. Υ and Γ are sampled from ℵ and n, u are sizes of Υ’s and Γ’s domains). Let H be a finite hypothesis class of constant-free formulas. Let F (Γ, Φ) denote the set of all ground literals of a predicate p/a that are k-entailed by {κ(Γ)} ∪ Φ but are false in Γ4 . With probability at least 1 − δ, the following holds for all Φ ∈ H that satisfy QΥ,k (Φ) = 1: E [|F (Γ, Φ)|] ≤ ln |H| + ln 1/δ k a u k . ⌊n/k⌋ Proof. It follows from linearity of expectation and from Proposition 6 that, for any Φ, E [|F (Γ, Φ)|] ≤ (1 − Qℵ,k (Φ))uk k a . Next, it follows from Theorem 13 and from union bound taken over all Φ ∈ H that the probability that there exists Φ ∈ H such that QΥ,k (Φ) = 1 and ε ≤ 1 − Qℵ,k (Φ) is at most |H| · exp (−⌊n/k⌋ε). If 1/δ then |H| · exp (−⌊n/k⌋ε) ≤ δ. Hence, ε ≥ ln |H|+ln ⌊n/k⌋ with probability at least 1 − δ, the following holds for all Φ ∈ H such that QΥ,k (Φ) = 1: E [|F (Γ, Φ)|] ≤ ln |H|+ln 1/δ k a u k . ⌊n/k⌋ by {κ(Γ)}∪Φ but are false in Γ. With probability at least 1 − δ, for all Φ ∈ H: s ! ln (|H|/δ) E [|F (Γ, Φ)|] ≤ 1 − QΥ,k (Φ) + uk k a . 2⌊n/k⌋ Proof. First, as in the proof of Theorem 14, we find that, for any Φ ∈ H, E [|F (Γ)|] ≤ (1 − Qℵ,k (Φ))uk k a . Next, it follows from Theorem 11 and from union bound that P [∃Φ ∈ H : QΥ,k (Φ) − Qℵ,k (Φ) ≥ ε] It follows that "  ≤ |H| exp −2⌊n/k⌋ε2 . P ∃Φ ∈ H : QΥ,k (Φ) ≥ Qℵ,k (α) + s # ln (|H|/δ) ≤ δ. 2⌊n/k⌋ The theorem then follows straightforwardly from the above and from Proposition 6. The previous two theorems provided bounds on the expected number of errors on the sampled test examples. The next theorem is different in that it provides a bound on the actual number of errors. Theorem 16. Let ℵ, Υ, Γ, and κ be as in Definition 3 (i.e. Υ and Γ are sampled from ℵ and n, u are sizes of Υ’s and Γ’s domains). Let H be a finite hypothesis class of constant-free formulas. Let F (Γ, Φ) denote the set of all ground literals of a predicate p/a that are k-entailed by {κ(Γ)}∪Φ but are false in Γ. With probability at least 1 − δ, for all Φ ∈ H : |F (Γ, Φ)| ≤ 1 − QΥ,k (Φ)+ s ≤ ! (⌊n/k⌋ + ⌊u/k⌋) ln (2|H|/δ) k a u k 2⌊n/k⌋⌊u/k⌋ s ! ln (2|H|/δ) uk k a . 1 − QΥ,k (Φ) + min(⌊n/k⌋, ⌊u/k⌋) 5.3 GENERAL CASE Next we prove a bound for the general case when the training error is non-zero. b = QΥ,k (Φ), B b = QΓ,k (Φ). UsProof. Let us denote A ing Theorem 12 and the union bound over Φ ∈ H, we get Theorem 15. Let ℵ, Υ, Γ, n, u and κ be as in Definition 3 (i.e. Υ and Γ are sampled from ℵ and n, u are sizes of Υ’s and Γ’s domains). Let H be a finite hypothesis class of constant-free formulas. Let F (Γ, Φ) denote the set of all ground literals of a predicate p/a that are k-entailed b B| b ≥ ε] ≤ 2|H| exp P [∃Φ ∈ H : |A− 4 Note that here, as well as in the rest of the theorems in the paper, F(Γ, Φ) is a set-valued random variable.   −2ε2 ⌊n/k⌋⌊u/k⌋ . ⌊n/k⌋ + ⌊u/k⌋ Solving the above for ε that achieves the 1−δ bound, we obtain that, with probability at least 1 − δ, we have for all q (⌊n/k⌋+⌊u/k⌋) ln (2|H|/δ) b b . Hence, Φ ∈ H: |A − B| ≤ 2⌊n/k⌋⌊u/k⌋ with probability at least 1 − δ, for all Φ ∈ H it holds q ln (2|H|/δ) . 1−QΓ,k (Φ) ≤ 1−QΥ,k (Φ)+ (⌊n/k⌋+⌊u/k⌋) 2⌊n/k⌋⌊u/k⌋ The validity of the theorem then follows from the above ab and from Proposition 6 and the fact that a+b ≥ min(a,b) 2 for any nonnegative a and b. 6.1 SMALL TEST EXAMPLES Next we prove a bound for voting entailment, which, unsurprisingly, is tighter than the respective bound for kentailment. One case where we have non-vacuous bounds for the expected number of incorrectly predicted literals with kentailment is when the domain of the test examples Γ is small. Naturally a necessary condition is also that the given (or learned) theory Φ is sufficiently accurate. The only way to be confident that Φ is indeed sufficiently accurate, given that this accuracy needs to be estimated, is by estimating it on a sufficiently large training example. This is essentially what Theorems 14 and 15 imply. Theorem 17. Let k be an integer and γ ∈ [0; 1]. Let further ℵ, Υ, Γ and κ be as in Definition 3 (i.e. Υ and Γ are sampled from ℵ and n, u are sizes of Υ’s and Γ’s domains). Let H be a finite hypothesis class of constantfree formulas. Let F (Γ, Φ) denote the set of all ground literals of a predicate p/a that are entailed by voting from {κ(Γ)} ∪ Φ with parameters k and γ but are false in Γ. Then, with probability at least 1 − δ, for all Φ ∈ H: Interestingly, this finding agrees with some experimental observations in the literature. For instance, it has been observed in [12] that classical reasoning in a relational setting close to ours worked well for small-size test-set evidence but was not competitive with other methods for larger evidence sizes. The analysis that we performed in this paper thus sheds light on experimental observations like these. 5.4 BOUNDS FOR VOTING ENTAILMENT |F (Γ)| ≤ 1 − QΥ,k (Φ) + s ln (2|H|/δ) min {⌊u/k⌋, ⌊n/k⌋} ! ua k a . γ Proof. This follows from the same reasoning as in the proof of Theorem 16, which gives us the bound on the difference of QΥ,k (Φ) and QΓ,k (Φ), combined with Theorem 9. Remark 18. The fraction of “wrong” ground p/a literals does not grow with increasing test-set size (u), since, by rewriting the bound from Theorem 17, we get, with probability at least 1 − δ, for all Φ ∈ H: |F(Γ)| ≤ ua 1 − QΥ,k (Φ) + s ln (2|H|/δ) min {⌊u/k⌋, ⌊n/k⌋} ! ka . γ We note here that one can also easily obtain counterparts of Theorems 14 and 15 for voting entailment. Note that the bounds from Theorems 14 and 15 are for the expected value of the number of errors. Bounds on the actual number of errors are provided in Theorem 16. In this case, to obtain non-vacuous bounds, we also need to require that the domain of the test example Γ be sufficiently large. This is not unexpected, however, as it is a known property of statistical bounds for transductive settings (see e.g., [19]) that the size of the test set affects confidence bounds, similarly to how the size of the Γ’s domain affects the bound in Theorem 16. 6.2 PREDICATES OF ARITY K Another case where we have non-vacuous bounds for kentailment is when the arity of the predicted literals is equal to the parameter k. In this case both the bounds for the expected error and for the actual error |F (Γ, Φ)| are non-vacuous. This means that our results cover important special cases. One such special case is classical attribute-value learning when k = 1 and we represent attributes by unary predicates. Another case is link prediction when k = 2 and higher-arity versions thereof. In link prediction, we have rules such as, for instance, ∀X, Y : CoensFan(X) ∧ CoensFilm(Y ) ⇒ likes(X, Y ). 6 SUMMARY OF RESULTS 6.3 REALIZABLE SETTING In this section we discuss positive and negative results that follow from the theorems presented in the preceding sections. Here, bounds are considered vacuous if they are not lower than the total number of ground literals. We first focus on k-entailment in Sections 6.1–6.3, and then discuss the results for voting entailment in Section 6.4. Finally, we also make a connection to MAP-entailment in Section 6.5. We can get stronger guarantees when the given (or learned) theory Φ has zero training error. Keeping the fraction of the domain-sizes |CΓ |k−a /|CΥ | small, Theorem 14 implies non-vacuous bounds for predicates of arity a for any size of the domain of Γ. Intuitively, this means that we can use theories that are completely accurate on training data for inference using k-entailment. However, the required size of the domain of the training example Υ, to guarantee that we will not produce too many errors, grows exponentially with k (for a fixed arity a) and polynomially with |CΓ |. 6.4 VOTING When using voting entailment, we can always obtain nontrivial bounds by making γ large; obviously this comes at the price of making the inferences more cautious. Voting entailment is a natural inference method in domains where one proof is not enough, i.e. where the support from several proofs is needed before we can be sufficiently confident in the conclusion; an example of such a domain is the well-known smokers domain, where knowing that one friend smokes does not provide enough evidence to conclude that somebody smokes; only if we have evidence of several smoker friends is the conclusion warranted that this person smokes. 6.5 RELATIONSHIP TO MAP INFERENCE A popular approach to collective classification in relational domains is MAP-inference in Markov logic networks. Therefore a natural question is how this approach performs in our setting. Perhaps surprisingly, it might produce as many errors as classical logic reasoning in the examples from Section 4.1, if the Markov logic network contains the same rules, all with positive weights, as we had in these examples. This is because MAP-inference will predict the same literals as classical logic inference when the rules from the Markov logic network are consistent with the given evidence. Thus, we can see that our guarantees for both k-entailment and voting entailment are better than guarantees one could get for MAPinference. This is also in agreement with the well-known observations that, for instance, in the smokers domain, MAP inference often predicts everyone to be a smoker or everyone to be a non-smoker if there is only a small amount of evidence about the smoking behavior of the considered individuals. 7 RELATED WORK Our main inspiration comes from the works on PACsemantics by Valiant [21] and Juba [9]. Our work differs mainly in the fact that we have one large relational structure ℵ, and a training example Υ and a test example Γ, both sampled from ℵ, whereas it is assumed in these existing approaches that learning examples are sampled i.i.d. from some distribution. This has two important consequences. First, they could use statistical techniques developed for i.i.d. data whereas we had to first derive concentration inequalities for sampling without replace- ment in the relational setting. Second, since they only needed to bound the error on the independently sampled examples, they did not have to consider the number of the incorrectly inferred facts. In contrast, in the relational setting that we considered here, the number of errors made on one relational example is the quantity that needs to be bounded. It follows that completely different techniques are needed in our case. Another difference is that, in their case, the training examples are also masked. In principle, we could modify our results to accommodate for masked examples by replacing “accurate” formulas by sufficiently-often “witnessed” formulas (see [9] for a definition). Dhurandhar and Dobra [5] derived Hoeffding-type inequalities for classifiers trained with relational data, but these inequalities, which are based on the restriction on the independent interactions of data points, cannot be applied to solve the problems considered in the present paper. Their setting is also more restricted than ours. Certain other statistical properties of learning have also been studied for SRL models. For instance, Xiang and Neville [23] studied consistency of estimation. However, guaranteeing convergence to the correct distribution does not mean that the model would not generate many errors when used, e.g., for MAP-inference. In [24], they further studied errors in label propagation in collective classification. In their setting, however, the relational graph is fixed and one only predicts labels of vertices exploiting the relational structure for making the predictions. Here we also note that it is not always possible or desirable in practice to sample sets of domain elements uniformly as we assumed to be the case in our analysis. Other sampling designs for relational data were studied e.g. in [1]. A study of PAC guarantees for such other sampling designs is left as a topic for future work. 8 CONCLUSIONS We have studied the problem of predicting plausible missing facts in relational data, given a set of imperfect logical rules, in a PAC reasoning setting. As for the considered inference methods, one of our main objectives was for the inference methods to stay close to classical logic. The first inference method, k-entailment, is a restricted form of classical logic inference and hence satisfies this objective. The second inference method, voting entailment, is based on a form of voting that combines results from inferences made by k-entailment on subsets of the relational data. Importantly, the voting is not weighted which makes voting entailment is easier to understand. We were able to obtain non-trivial bounds for the number of literals incorrectly predicted by a learned (or given) theory for both k-entailment and voting entailment. Prob- ably the most useful results of our analysis lie in the identification of cases in which the bounds for learning and reasoning in relational data are non-vacuous, which we discussed in detail in Section 6. [8] Wassily Hoeffding. Probability inequalities for sums of bounded random variables. Journal of the American statistical association, 58(301):13– 30, 1963. There are many interesting directions in which one could extend the results presented in this paper. For instance, as practical means to improve the explainability of inferences made by voting entailment, we could first find representatives of isomorphism classes of “proofs” that are aggregated by voting entailment, and only show these to the user. Another direction is to extend the notion of implicit learning from [9] into the relational setting. It would also be interesting to exploit explicit sparsity constraints and to study other sampling designs. [9] Brendan Juba. Implicit learning of common sense for reasoning. In IJCAI 2013, Proceedings of the 23rd International Joint Conference on Artificial Intelligence, pages 939–946, 2013. Acknowledgments OK’s work was partially supported by the Research Foundation - Flanders (project G.0428.15). SS is supported by ERC Starting Grant 637277. JD is partially supported by the KU Leuven Research Fund (C14/17/070,C22/15/015,C32/17/036), and FWOVlaanderen (G.0356.12, SBO-150033). References [1] Nesreen K Ahmed, Jennifer Neville, and Ramana Rao Kompella. Network sampling designs for relational classification. In ICWSM, 2012. [2] Leila Amgoud. Postulates for logic-based argumentation systems. International Journal of Approximate Reasoning, 55(9):2028–2048, 2014. [3] Newton CA Da Costa et al. On the theory of inconsistent formal systems. Notre dame journal of formal logic, 15(4):497–510, 1974. [4] Luc De Raedt, Angelika Kimmig, and Hannu Toivonen. Problog: a probabilistic prolog and its application in link discovery. In Proceedings of the 20th international joint conference on Artifical intelligence, pages 2468–2473. Morgan Kaufmann Publishers Inc., 2007. [5] Amit Dhurandhar and Alin Dobra. Distributionfree bounds for relational classification. Knowledge and information systems, 31(1):55–78, 2012. [6] Morten Elvang-Gøransson and Anthony Hunter. Argumentative logics: Reasoning with classically inconsistent information. Data & Knowledge Engineering, 16(2):125–145, 1995. [7] P. Gärdenfors. Knowledge in Flux. MIT Press, 1988. [10] Sébastien Konieczny and Ramón Pino Pérez. Merging information under constraints: a logical framework. Journal of Logic and computation, 12(5):773–808, 2002. [11] Ondřej Kuželka, Yuyi Wang, Jesse Davis, and Steven Schockaert. Relational marginal problems: Theory and estimation. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence (AAAI-18). AAAI Press, 2018. [12] Ondřej Kuželka, Jesse Davis, and Steven Schockaert. Induction of interpretable possibilistic logic theories from relational data. In Proceedings of the 26th International Joint Conference on Artificial Intelligence, pages 1153–1159. AAAI Press, 2017. [13] Ni Lao, Tom Mitchell, and William W Cohen. Random walk inference and learning in a large scale knowledge base. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, pages 529–539, 2011. [14] Qiao Liu, Liuyi Jiang, Minghao Han, Yao Liu, and Zhiguang Qin. Hierarchical random walk inference in knowledge graphs. In Proceedings of the 39th International ACM SIGIR conference on Research and Development in Information Retrieval, pages 445–454, 2016. [15] László Lovász. Large networks and graph limits, volume 60. American Mathematical Soc., 2012. [16] Graham Priest. The logic of paradox. Journal of Philosophical logic, 8(1):219–241, 1979. [17] Matthew Richardson and Pedro Domingos. Markov logic networks. Machine Learning, 62(1-2):107– 136, 2006. [18] Tim Rocktäschel and Sebastian Riedel. End-to-end differentiable proving. In Proceedings of the Annual Conference on Neural Information Processing Systems, pages 3791–3803, 2017. [19] Ilya Tolstikhin and David Lopez-Paz. Minimax lower bounds for realizable transductive classification. arXiv preprint arXiv:1602.03027, 2016. [20] Leslie G Valiant. A theory of the learnable. Communications of the ACM, 27(11):1134–1142, 1984. [21] Leslie G. Valiant. Knowledge infusion. In Proceedings of the 21st National Conference on Artificial Intelligence - Volume 2, AAAI’06, pages 1546– 1551. AAAI Press, 2006. [22] Gustav Šourek, Suresh Manandhar, Filip Železný, Steven Schockaert, and Ondřej Kuželka. Learning predictive categories using lifted relational neural networks. In Proceedings of the 26th International Conference on Inductive Logic Programming, pages 108–119, 2016. [23] Rongjing Xiang and Jennifer Neville. Relational learning with one network: An asymptotic analysis. In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, pages 779–788, 2011. [24] Rongjing Xiang and Jennifer Neville. Understanding propagation error and its effect on collective classification. In Data Mining (ICDM), 2011 IEEE 11th International Conference on, pages 834–843. IEEE, 2011. Then we can use the following fact (Hoeffding [8], Section Pq 5): If T = a1 · T1 + a2 · T2 + · · · + aq · Tq , ai ≥ 0, i=1 ai = 1 and each of the terms Ti is a sum of in(i) dependent random zero-mean variables Xj such that (i) P [a ≤ Xj h > 0, P [T ≥ ε] ≤ S∈Y e(q) = A Γ X 1 1(ΓhSi |= α). q · ⌊u/k⌋ (q) S∈Zi We can rewrite them as q X X 1 e(q) = 1 A 1(ΥhSi |= α), Υ q i=1 ⌊n/k⌋ (q) S∈Yi e(q) = 1 A Γ q q X i=1 X 1 1(ΓhSi |= α). ⌊u/k⌋ (q) S∈Zi q X ai · E [exp (h(Ti − ε))] i=1 Note that the Ti ’s do not have to be independent and e(q) A Υ − = − e(q) A Γ q 1X q 1 q i=1 q X i=1 X 1 [1(ΥhSi |= α) − Aℵ ] ⌊n/k⌋ (q) S∈Yi X 1 [1(ΓhSi |= α) − Aℵ ] ⌊u/k⌋ (q) S∈Zi According to Hoeffding’s lemma (Lemma 1 in [8]): e(q) P [A Υ Appendix Proof of Theorem 12. First we define two auxiliary ese(q) . Let Y(q) be a vector of e(q) and A timators A Γ Υ ⌊n/k⌋ · q size-k subsets of CΥ where the subsets of CΥ in each of the q non-overlapping size-⌊n/k⌋ segments (q) (q) (q) Y1 , Y2 , . . . , Yq of Y(q) are sampled in the same way as the elements of the vector Y in Lemma 3, all with the same CΥ (i.e. Y(q) is the concatenation of the vec(q) (q) (q) tors Y1 , Y2 , . . . , Yq ). Another vector Z(q) which contains ⌊u/k⌋ · q size-k subsets of CΓ is sampled in the same way. Note that Z(q) is independent of Y(q) . Let us define X 1 e(q) = 1(ΥhSi |= α) and, A Υ q · ⌊n/k⌋ (q) ≤ b] = 1 and b − a ≤ 1, then, for any e(q) ≥ ε] − A Γ q X 1 ≤ · E [exp (h(Ti − ε))] q i=1  2   2  h h −hε exp ≤ e exp 8m1 8m2   m1 + m2 2 = exp −hε + ·h 8m1 m2 where m1 = ⌊n/k⌋ and m2 = ⌊u/k⌋. Note that this 1 m2 function achieves its minimum at h = 4εm m1 +m2 . We P 1 set Ti := ⌊n/k⌋ (q) (1(ΥhSi |= α) − Aℵ ) − S∈Yi P 1 and note that (q) (1(ΓhSi |= α) − Aℵ ) ⌊u/k⌋ S∈Zi E [Ti ] = 0. Thus, we get   −2ε2 (q) (q) e e , P [AΥ − AΓ ≥ ε] ≤ exp 1/⌊n/k⌋ + 1/⌊u/k⌋ e(q) − A e(q) symmetrically also P [A ≥ ε] ≤ Γ Υ  2 −2ε exp 1/⌊n/k⌋+1/⌊u/k⌋ , and, using union bound, we get (q) (q) e −A e | ≥ ε] ≤ 2 exp P [|A Υ Γ  −2ε2 1/⌊n/k⌋ + 1/⌊u/k⌋  . It follows from the strong law of large numbers (which e(q) = holds for any Υ and Γ) that P [limq→∞ A Υ bΓ ] = 1. Since q was arbitrary, the bΥ and A e(q) = A A Γ statement of the proposition follows.
2cs.AI
PoseTrack: A Benchmark for Human Pose Estimation and Tracking Mykhaylo Andriluka1 Umar Iqbal2 Anton Milan3 Eldar Insafutdinov1 Juergen Gall2 Bernt Schiele1 Leonid Pishchulin1 1 MPI for Informatics, Saarbrücken, Germany Department of Computer Science, University of Bonn, Germany 3 School of Computer Science, University of Adelaide, Australia arXiv:1710.10000v1 [cs.CV] 27 Oct 2017 2 Abstract ing of deep learning based approaches, but also established detailed metrics for direct and fair performance comparison across numerous competing approaches. Despite significant progress of single frame based multiperson pose estimation, the problem of articulated multiperson body joint tracking in monocular video remains largely unaddressed. Although there exist training sets for special scenarios, such as sports [37, 18] and upright frontal people [5], these benchmarks focus on single isolated individuals and are still limited in their scope and variability of represented activities and body motions. In this work, we aim to fill this gap by establishing a new large-scale, highquality benchmark for video-based multi-person pose estimation and articulated tracking. We collect, annotate and release a new large-scale dataset that features videos with multiple people labeled with person tracks as well as articulated body pose. The dataset is organized around a challenge with three competition tracks focusing on single-frame multi-person pose estimation, multi-person pose estimation in video, and multi-person articulated tracking. While the main focus of the dataset is on multi-person articulated tracking, progress in the single-frame setting will inevitably improve overall tracking quality. We thus make the single frame multiperson setting part of the overall challenge. In order to enable timely and scalable evaluation on the held-out test set, we provide a centralized evaluation server. We envision that the proposed benchmark will stimulate productive research both by providing a large and representative training dataset, as well as providing a platform to objectively evaluate and compare the proposed methods. Human poses and motions are important cues for analysis of videos with people and there is strong evidence that representations based on body pose are highly effective for a variety of tasks such as activity recognition, content retrieval and social signal processing. In this work, we aim to further advance the state of the art by establishing “PoseTrack” , a new large-scale benchmark for video-based human pose estimation and articulated tracking, and bringing together the community of researchers working on visual human analysis. The benchmark encompasses three competition tracks focusing on i) single-frame multi-person pose estimation, ii) multi-person pose estimation in videos, and iii) multi-person articulated tracking. To facilitate the benchmark and challenge we collect, annotate and release a new dataset that features videos with multiple people labeled with person tracks and articulated pose. A centralized evaluation server is provided to allow participants to evaluate on a held-out test set. We envision that the proposed benchmark will stimulate productive research both by providing a large and representative training dataset as well as providing a platform to objectively evaluate and compare the proposed methods. The benchmark is freely accessible at https://posetrack.net. 1. Introduction Human pose estimation has recently made significant progress on the tasks of single person pose estimation in individual frames [34, 33, 32, 4, 35, 11, 13, 23, 2, 27] and videos [25, 5, 16, 9] and multi-person pose estimation in monocular images [26, 13, 15, 3, 24]. This progress has been facilitated by the use of deep learning-based architectures [31, 10] and by the availability of large-scale benchmark datasets such as “MPII Human Pose” [1] and “MS COCO” [21]. Importantly, these benchmark datasets not only have provided extensive training sets required for train- 2. Related Datasets The commonly used publicly available datasets for evaluation of 2D human pose estimation are summarized in Tab. 2. We note the total number of annotated body poses, availability of video pose labels and multiple annotated persons per frame, and types of data. 1 Dataset # Poses Multi- Video-labeled person poses LSP [19] LSP Extended [20] MPII Single Person [1] FLIC [28] FashionPose [7] 2,000 10,000 26,429 5,003 7,305 We are family [8] MPII Multi-Person [1] MS COCO Keypoints [21] 3,131 14,993 105,698 Penn Action [37] JHMDB [18] YouTube Pose [5] Video Pose 2.0 [29] 159,633 31,838 5,000 1,286 Multi-Person PoseTrack [17] 16,219 Proposed 153,615 estimation. While it contains over 100, 000 annotated poses it includes many images of non-challenging isolated individuals. All these datasets are only limited to single-frame based body pose estimation. In contrast, our datasets also focuses on a more challenging task of multi-person pose estimation in video sequences containing highly articulated people in dense crowds. This not only requires annotations of body keypoints, but also a unique identity for every person appearing the video. Our dataset is based on the MPII Multi-Person benchmark, from which we carefully select challenging key frames and for each central key frame include up to 150 neighboring frames from the corresponding publicly available video sequences. We provide dense annotations of video sequences with person tracking and body pose annotations. Furthermore, we adapt a completely unconstrained evaluation setup where the scale and location of the persons is completely unknown. This is in contrast to MPII dataset that is restricted to evaluation on group crops and provides rough group location and scale. Additionally, we provide ignore regions to identify the regions containing very large crowds of people that are extremely hard to annotate. Recently, [17] and [12] also provide datasets for multiperson pose estimation in videos. However, both are at a very small scale. [17] provides only 60 videos with most sequences containing only 41 frames, and [12] provides 30 videos containing only 20 frames each. While these datasets provide a first step toward solving the problem at hand, they are certainly not enough to cover a large range of testing scenarios and to learn stronger pose estimation models. We on the other hand provide a large-scale benchmark with a much broader variety and well defined evaluation setup. The proposed dataset contains over 150, 000 annotated poses and over 22,000 labeled frames. Our dataset is complementary to recent video datasets, such as J-HMDB [18], Penn Action [37] and YouTube Pose [5]. Similar to these datasets, we provide dense annotations of video sequences. However, in contrast to [18, 37, 5] that focus on single isolated individuals we target a much more challenging task of multiple people in dynamic crowded scenarios. In contrast to YouTube Pose that focus on frontal upright people, our dataset includes a wide variety of body poses and motions, and captures people at different scales from a wide range of viewpoints. In contrast to sports-focused Penn Action and J-HMDB that focuses on a few simple actions, the proposed dataset captures a wide variety of everyday human activities while being at least 3x larger compared to J-HMDB. Our dataset also addresses a different set of challenges compared to the datasets such as “HumanEva” [30] and “Human3.6M” [14] that include images and 3D poses of people but are captured in the controlled indoor environments, whereas our dataset includes real-world video se- Data type sports (8 act.) sports (11 act.) diverse (491 act.) feature movies fashion blogs X X X X X group photos diverse (491 act.) diverse X X X X sports (15 act.) diverse (21 act.) diverse TV series X X diverse diverse Table 1. Overview of the publicly available datasets for articulated human pose estimation in single frames and video. For each dataset we report the number of annotated poses, availability of video pose labels and multiple annotated persons per frame, and types of data. The most popular benchmarks to date for evaluation of single person pose estimation are “LSP” [19] (+ “LSP Extended” [20]) and “MPII Human Pose (Single Person)” [1]. LSP and LSP Extended datasets focus on sports scenes featuring a few sport types. Although a combination of both datasets results in 11, 000 training poses, the evaluation set of 1, 000 is rather small. FLIC [28] targets a simpler task of upper body pose estimation of frontal upright individuals in feature movies. In contrast to LSP and FLIC datasets, MPII Single-Person benchmark covers a much wider variety of everyday human activities including various recreational, occupational and householding activities and consists of over 26, 000 annotated poses with 7, 000 poses hold out for evaluation. Both benchmarks focus on single person pose estimation task and provide rough location scale of a person in question. In contrast, our dataset addresses a much more challenging task of body tracking of multiple highly articulated individuals where neither number of people, nor their locations and scales are known. The single-frame multi-person pose estimation setting was introduced in [8] along with “We Are Family (WAF)” dataset. While this benchmark is an important step towards more challenging multi-person scenarios, it focuses on a simplified setting of upper body pose estimation of multiple upright individuals in group photo collections. “MPII Human Pose (Multi-Person)” dataset [1] has significantly advanced multi-person pose estimation task in terms of diversity and difficulty of multi-person scenes that show highlyarticulated people involved in hundreds of every day activities. More recently, MS COCO Keypoints Challenge [21] has been introduced as an attempt to provide a new largescale benchmark for single frame based multi-person pose 2 quences but provides 2D poses only. performed by in-house workers. The annotators were provided with a clearly defined protocol, detailed instructions containing several examples and video tutorials, and the authors were always accessible to resolve any annotation ambiguity. Figure 1 shows example frames from the dataset. Overall, the dataset contains 514 video sequences including 66, 374 frames. We split them into 300, 50, 208 videos for training, validation and testing, respectively. In order to reduce the annotation effort while also including more diverse scenarios, we annotated training and validation/testing videos in different manners. The length of the training videos ranges between 41-151 frames and we densely annotate 30 frames from the center of the video. Whereas, the number of frames in validation/testing videos ranges between 65 to 298 frames. In this case, we densely annotated 30 frames around the keyframe from MPII Pose dataset and afterwards annotate every fourth frame. This strategy allows us to evaluate more diverse body pose articulations and also long range articulated tracking, while having significantly fewer annotations. In total, this constitutes roughly 23, 000 labeled frames and 153, 615 pose annotations which to-this-date is the highest number of pose annotations for any multi-person pose dataset. The already available data in [17, 12] comprises approximately 100 video sequences totaling around 4, 500 labeled frames and 20, 000 annotated humans. However, in order to be consistent across the dataset and have same skeleton structure for all annotations, we re-annotated all videos. The testing set remains unpublished to avoid over-fitting, and no information about the test set is revealed including the information about which frames are labeled. 3. The PoseTrack Dataset and Challenge In this work we introduce a new large-scale video dataset and challenge for articulated human pose tracking in the wild. We build on and extend the newly introduced datasets for pose tracking in the wild [17, 12]. To that end, we use the raw videos provided by the popular MPII Human Pose dataset. For each frame in MPII Human Pose dataset we include 41-298 neighboring frames from the corresponding raw videos, and then selected sequences that represent crowded scenes with multiple articulated people engaging in various dynamic activities. The video sequences are chosen such that they contain a large amount of body motion and body pose and appearance variations. They also contain severe body part occlusion and truncation, i.e., due to occlusions with other people or objects, persons often disappear partially or completely and re-appear again. The scale of the persons also vary across the video due to the movement of persons and/or camera zooming. Therefore, the number of visible persons and body parts also varies across the video. 3.1. Data Annotation We annotated the selected video sequences with person locations, identities, body pose and ignore regions. The annotations were performed in four steps. First, we annotated the ignore regions to identify people the are extremely hard to annotate. This allows us to not penalize methods on estimating poses in those regions during training as well as evaluation. Afterwards, the head bounding boxes for each person across the videos were annotated and a track-id was assigned to every person. The head bounding boxes provide an estimate of the absolute scale of the person required for evaluation. We assign a unique track-id to each person appearing in the video until the person moves out of the camera field-of-view. Since a video can contain multiple video shots, we found that person re-identification between different shots can sometimes be very difficult even for the human annotators. We, therefore, assign a new ID to a person if they reappear in the video or appear in multiple shots. Since, in this work we do not target person re-identifcation, having different ID for the same person in different shots is not very crucial. Afterwards, the pose for every person with a track-id is separately annotated in the complete video. We annotate 15 body parts for each body pose including head, nose, neck, shoulders, elbows, wrists, hips, knees and ankles. All pose annotations were performed using the VATIC tool that allows one to speed-up the annotations by interpolating annotations between two frames. All interpolation errors were manually removed by visualizing the annotations multiple times. Finally, we performed two additional iterations of data cleaning to remove any annotation errors and obtain high quality annotations. All annotations were 3.2. Challenges The dataset accompanies three different challenges. 1. Single-frame Pose Estimation. This task is similar to the ones covered by existing datasets like MPII Poses and MS COCO Keypoints Challenge, but on our new large-scale dataset. 2. Pose Estimation in Videos. The evaluation of this challenge is performed on single frames, however, the data will also include video frames before and after the annotated ones, allowing methods to exploit video information for a more robust single-frame pose estimation. 3. Pose Tracking in the Wild. Finally, this new challenge will require to provide temporally consistent poses for all people visible in the videos. Our evaluation include both individual pose accuracy as well as temporal consistency measured by identity switches. 3 Figure 1. Example frames and annotations from the new PoseTrack dataset. 3.3. Evaluation Server for videos. We, therefore, propose not to use any groundtruth information during testing and evaluate the predictions without rescaling or selecting a specific group of people for evaluation. Video-based pose tracking. To evaluate multi-person pose tracking, we use Multiple Object Tracking (MOT) metrics [22]. The metrics require predicted body poses with tracklet IDs. First, for each frame, for each body joint class, distances between predicted locations and GT locations are computed. Then, predicted tracklet IDs and GT tracklet IDs are taken into account and all (prediction, GT) pairs with distances not exceeding PCKh threshold are considered during global matching of predicted tracklets to GT tracklets for each particular body joint. Global matching minimizes the total assignment distance. Finally, Multiple Object Tracker Accuracy (MOTA), Multiple Object Tracker Precision (MOTP), Precision, and Recall metrics are computed. We report MOTA metric for each body joint class and average over all body joints, while for MOTP, Precision, and Recall we report averages only. The source code for evaluation metrics is available publicly on the benchmark website. We provide an online evaluation server to evaluate the performance of different methods on thr held-out test set. This will not only prevent over-fitting to the test data but also ensures that all methods are evaluated in the exact same way, using the same ground truth and evaluation scripts, making the quantitative comparison meaningful. Additionally, it can also serve as a central directory of all available results and methods. 3.4. Experimental Setup and Evaluation Metrics Since we need to evaluate both the accuracy of multiperson pose estimation in individual frames and articulated tracking in videos, we follow the best practices followed in both multi-person pose estimation [26] and multi-target tracking [22]. In order to evaluate whether a body part is predicted correctly, we use the PCKh (head-normalized probability of correct keypoint) metric [1], which considers a body joint to be correctly localized if the predicted location of the joint is within a certain threshold from the true location. Due to the large scale variation of people across videos and even within a frame, this threshold needs to be selected adaptively, based on the person’s size. To that end, we follow [1] and use 50% of the head length where the head length corresponds to the 60% of the diagonal of ground-truth head bounding box. Given the joint localization threshold for each person, we compute two sets of evaluation metrics, one which is commonly used for evaluating multi-person pose estimation [26], and one from the multitarget tracking literature [36, 6, 22] to evaluate multi-person pose tracking. Per-frame multi-person pose estimation. For measuring frame-wise multi-person pose accuracy, we use Mean Average Precision (mAP) as is done in [26]. The protocol to evaluate multi-person pose estimation in [26] requires that the location of a group of persons and their rough scale is known during evaluation [26]. This information, however, is almost never available in realistic scenarios particularly References [1] M. Andriluka, L. Pishchulin, P. Gehler, and B. Schiele. 2d human pose estimation: New benchmark and state of the art analysis. In CVPR, 2014. [2] A. Bulat and G. Tzimiropoulos. Human pose estimation via convolutional part heatmap regression. In ECCV, 2016. [3] Z. Cao, T. Simon, S.-E. Wei, and Y. Sheikh. Realtime multiperson 2d pose estimation using part affinity fields. In CVPR, 2017. [4] J. Carreira, P. Agrawal, K. Fragkiadaki, and J. Malik. Human pose estimation with iterative error feedback. In CVPR, 2016. [5] J. Charles, T. Pfister, D. Magee, and A. Hogg, D. Zisserman. Personalizing human video pose estimation. In CVPR, 2016. [6] W. Choi. Near-online multi-target tracking with aggregated local flow descriptor. In ICCV 2015. 4 [28] B. Sapp and B. Taskar. Multimodal decomposable models for human pose estimation. In CVPR, 2013. [29] B. Sapp, D. Weiss, and B. Taskar. Parsing human motion with stretchable models. In CVPR, 2011. [30] L. Sigal, A. Balan, and M. J. Black. Humaneva: Synchronized video and motion capture dataset and baseline algorithm for evaluation of articulated human motion. International Journal of Computer Vision, 87, 2010. [31] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, 2014. [32] J. Tompson, R. Goroshin, A. Jain, Y. LeCun, and C. Bregler. Efficient object localization using convolutional networks. In CVPR, 2015. [33] J. J. Tompson, A. Jain, Y. LeCun, and C. Bregler. Joint training of a convolutional network and a graphical model for human pose estimation. In NIPS, 2014. [34] A. Toshev and C. Szegedy. Deeppose: Human pose estimation via deep neural networks. In CVPR, 2014. [35] S.-E. Wei, V. Ramakrishna, T. Kanade, and Y. Sheikh. Convolutional pose machines. In CVPR, 2016. [36] B. Yang and R. Nevatia. An online learned CRF model for multi-target tracking. In CVPR 2012, pages 2034–2041. [37] W. Zhang, M. Zhu, and K. G. Derpanis. From actemes to action: A strongly-supervised representation for detailed action understanding. In CVPR, 2013. [7] M. Dantone, J. Gall, C. Leistner, and L. V. Gool. Human pose estimation using body parts dependent joint regressors. In CVPR, 2013. [8] M. Eichner and V. Ferrari. We are family: Joint pose estimation of multiple persons. In ECCV, 2010. [9] G. Gkioxari, A. Toshev, and N. Jaitly. Chained predictions using convolutional neural networks. In ECCV, 2016. [10] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015. [11] P. Hu and D. Ramanan. Bottom-up and top-down reasoning with hierarchical rectified gaussians. In CVPR, 2016. [12] E. Insafutdinov, M. Andriluka, L. Pishchulin, S. Tang, E. Levinkov, B. Andres, and B. Schiele. Arttrack: Articulated multi-person tracking in the wild. In CVPR, Dec. 2017. arXiv: 1612.01465. [13] E. Insafutdinov, L. Pishchulin, B. Andres, M. Andriluka, and B. Schiele. Deepercut: A deeper, stronger, and faster multiperson pose estimation model. In ECCV, 2016. [14] C. Ionescu, D. Papava, V. Olaru, and C. Sminchisescu. Human3.6M: Large Scale Datasets and Predictive Methods for 3D Human Sensing in Natural Environments. PAMI, 2014. [15] U. Iqbal and J. Gall. Multi-person pose estimation with local joint-to-person associations. In ECCVw, 2016. [16] U. Iqbal, M. Garbade, and J. Gall. Pose for action - action for pose. In FG, 2017. [17] U. Iqbal, A. Milan, and J. Gall. Posetrack: Joint multi-person pose estimation and tracking. In CVPR, 2017. [18] H. Jhuang, J. Gall, S. Zuffi, C. Schmid, and M. J. Black. Towards understanding action recognition. In ICCV, 2013. [19] S. Johnson and M. Everingham. Clustered pose and nonlinear appearance models for human pose estimation. In BMVC, 2010. [20] S. Johnson and M. Everingham. Learning Effective Human Pose Estimation from Inaccurate Annotation. In CVPR, 2011. [21] 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. [22] A. Milan, L. Leal-Taixé, I. Reid, S. Roth, and K. Schindler. Mot16: A benchmark for multi-object tracking. arXiv:1603.00831 [cs], 2016. [23] A. Newell, K. Yang, and J. Deng. Stacked hourglass networks for human pose estimation. In ECCV, 2016. [24] G. Papandreou, T. Zhu, N. Kanazawa, A. Toshev, J. Tompson, C. Bregler, and K. Murphy. Towards accurate multiperson pose estimation in the wild. In CVPR, 2017. [25] T. Pfister, J. Charles, and A. Zisserman. Flowing convnets for human pose estimation in videos. In ICCV, 2015. [26] L. Pishchulin, E. Insafutdinov, S. Tang, B. Andres, M. Andriluka, P. Gehler, and B. Schiele. Deepcut: Joint subset partition and labeling for multi person pose estimation. In CVPR, 2016. [27] U. Rafi, I.Kostrikov, J. Gall, and B. Leibe. An efficient convolutional network for human pose estimation. In BMVC, 2016. 5
7cs.IT
arXiv:1802.06985v2 [math.CO] 23 Feb 2018 Binary linear complementary dual codes Masaaki Harada∗and Ken Saito† Dedicated to Professor Masahiko Miyamoto on His 65th Birthday Abstract Linear complementary dual codes (or codes with complementary duals) are codes whose intersections with their dual codes are trivial. We study binary linear complementary dual [n, k] codes with the largest minimum weight among all binary linear complementary dual [n, k] codes. We characterize binary linear complementary dual codes with the largest minimum weight for small dimensions. A complete classification of binary linear complementary dual [n, k] codes with the largest minimum weight is also given for 1 ≤ k ≤ n ≤ 16. 1 Introduction An [n, k] code C over Fq is a k-dimensional vector subspace of Fnq , where Fq denotes the finite field of order q and q is a prime power. A code over F2 is called binary. The parameters n and k are called the length and dimension of C, respectively. The weight wt(x) of a vector x ∈ Fnq is the number of nonzero components of x. A vector of C is called a codeword of C. The minimum non-zero weight of all codewords in C is called the minimum weight d(C) of C and an [n, k] code with minimum weight d is called an [n, k, d] code. Two [n, k] codes C and C ′ over Fq are equivalent, denoted C ∼ = C ′ , if there is an n × n monomial matrix P over Fq with C ′ = C · P = {xP | x ∈ C}. ∗ Research Center for Pure and Applied Mathematics, Graduate School of Information Sciences, Tohoku University, Sendai 980–8579, Japan. email: [email protected]. † Research Center for Pure and Applied Mathematics, Graduate School of Information Sciences, Tohoku University, Sendai 980–8579, Japan. email: [email protected]. 1 The dual code C ⊥ of a code C of length n is defined as C ⊥ = {x ∈ Fnq | x · y = 0 for all y ∈ C}, where x · y is the standard inner product. A code C is called linear complementary dual (or a linear code with complementary dual) if C ∩ C ⊥ = {0n }, where 0n denotes the zero vector of length n. We say that such a code is LCD for short. LCD codes were introduced by Massey [12] and gave an optimum linear coding solution for the two user binary adder channel. LCD codes are an important class of codes for both theoretical and practical reasons (see [2], [3], [4], [7], [8], [10], [11], [12], [13], [14]). It is a fundamental problem to classify LCD [n, k] codes and determine the largest minimum weight among all LCD [n, k] codes. Recently, much work has been done concerning this fundamental problem (see [3], [4], [7], [8], [11], [13]). In particular, we emphasize the recent work by Carlet, Mesnager, Tang and Qi [4]. It has been shown in [4] that any code over Fq is equivalent to some LCD code for q ≥ 4. This motivates us to study binary LCD codes. Throughout this paper, let d(n, k) denote the largest minimum weight among all binary LCD [n, k] codes. Recently, some bounds on the minimum weights of binary LCD [n, k] codes have been established in [8]. More precisely, d(n, 2) has been determined and the values d(n, k) have been calculated for 1 ≤ k ≤ n ≤ 12. In this paper, we characterize binary LCD [n, k, d(n, k)] codes for small k. The concept of k-covers of m-sets plays an important role in the study of such codes. Using the characterization, we give a classification of binary LCD [n, 2, d(n, 2)] codes and we determine d(n, 3). In this paper, a complete classification of binary LCD [n, k] codes having the minimum weight d(n, k) is also given for 1 ≤ k ≤ n ≤ 16. The paper is organized as follows. In Section 2, definitions, notations and basic results are given. We also give a classification of binary LCD [n, k, d(n, k)] codes for k = 1, n − 1. In Section 3, we give some characterization of binary LCD codes using k-covers of m-sets. This characterization is used in Sections 4, 5 and 6. In Section 4, we study binary LCD codes of dimension 2. We give a classification of binary LCD [n, 2, d(n, 2)] codes for n = 6t (t ≥ 1), 6t + 1 (t ≥ 1), 6t + 2 (t ≥ 0), 6t + 3 (t ≥ 1), 6t + 4 (t ≥ 0) and 6t + 5 (t ≥ 1) (Theorems 4.5 and 4.8). In Sections 5 and 6, we study   binary LCD codes of dimension 3. In Section 5, we show that d(n, 3) = 4n 7  if n ≡ 3, 5, 10, 12 (mod 14) and 4n − 1 otherwise, for n ≥ 3 (Theorem 5.1). 7 In Section 6, we establish the uniqueness of binary LCD [n, 3, d(n, 3)] codes for n ≡ 0, 2, 3, 5, 7, 9, 10, 12 (mod 14). In Section 7, we give a complete classification of binary LCD [n, k] codes having the minimum weight d(n, k) for 2 2 ≤ k ≤ n−1 ≤ 15. Finally, in Section 8, we give constructions of LCD codes over Fq from self-orthogonal codes. As a consequence, the values d(n, 4) are determined for n = 17, 18, 21, 25. All computer calculations in this paper were done with the help of Magma [1]. 2 Preliminaries 2.1 Definitions, notations and basic results Throughout this paper, 0s and 1s denote the zero vector and the all-one vector of length s, respectively. Let Ik denote the identity matrix of order k and let AT denote the transpose of a matrix A. PnLet Ci be an [n, k] code over Fq . The weight enumerator of C is given by i=0 Ai y , where Ai is the number of codewords of weight i in C. It is trivial that two codes with distinct weight enumerators are inequivalent. The dual code C ⊥ of C is defined as C ⊥ = {x ∈ Fnq | x · y = 0 for all y ∈ C}, where x · y is the standard inner product. A code C is called linear complementary dual (or a linear code with complementary dual) if C ∩ C ⊥ = {0n }. We say that such a code is LCD for short. A generator matrix of C is a k × n matrix whose rows are a set of basis vectors of C. A parity-check matrix of C is a generator matrix of C ⊥ . The following characterization is due to Massey [12]. Proposition 2.1. Let C be a code over Fq . Let G and H be a generator matrix and a parity-check matrix of C, respectively. Then the following properties are equivalent: (i) C is LCD, (ii) C ⊥ is LCD, (iii) GGT is nonsingular, (iv) HH T is nonsingular. From now on, all codes mean binary unless otherwise specified. Throughout this paper, let d(n, k) denote the largest minimum weight among all LCD [n, k] codes. Lemma 2.2. Let G (resp. H) be a generator matrix (resp. a parity-check matrix) of an LCD code. 3 (i) Suppose that some two columns of G are identical. Let G′ be the matrix obtained from G by deleting the two columns. Then the code with generator matrix G′ is LCD. (ii) Suppose that some two columns of H are identical. Let H ′ be the matrix obtained from H by deleting the two columns. Then the code with parity-check matrix H ′ is LCD. Proof. Since GGT = G′ G′ T and HH T = H ′ H ′T , the new codes are also LCD. Lemma 2.3. Suppose that there is an LCD [n, k, d] code C. If d(n − 1, k) ≤ d − 1, then d(C ⊥ ) ≥ 2. Proof. Suppose that d(C ⊥ ) = 1. Then some column of a generator matrix of C is 0k . By deleting the column, an LCD [n−1, k, d] code is constructed. Lemma 2.4. Suppose that there is an LCD [n, k, d] code C with d(C ⊥ ) ≥ 2. If n − k ≥ 2k , then there is an LCD [n − 2, k] code D with d(D ⊥ ) ≥ 2. Proof. We may assume without loss of generality that C has generator matrix  of the form G = Ik M , where M is a k × (n − k) matrix. Since d(C ⊥ ) ≥ 2, no column of M is 0k . Since n − k ≥ 2k , some two columns of M are identical. By Lemma 2.2, D is LCD. Let C be an [n + 1, k, d] code with d(C ⊥ ) = 1. Then we may assume without loss of generality that C = {(x1 , x2 , . . . , xn , 0) | (x1 , x2 , . . . , xn ) ∈ C ∗ }, where C ∗ is a punctured [n, k, d] code of C. Lemma 2.5. C is LCD if and only if C ∗ is LCD. In this way, every LCD [n + 1, k, d] code C with d(C ⊥ ) = 1 is constructed from some LCD [n, k, d] code C ∗ . In addition, two LCD [n + 1, k, d] codes C with d(C ⊥ ) = 1 are equivalent if and only if two LCD [n, k, d] codes C ∗ are equivalent. Hence, all LCD [n + 1, k, d] codes C with d(C ⊥ ) = 1, which must be checked to achieve a complete classification, can be obtained from all inequivalent LCD [n, k, d] codes C ∗ . 4 2.2 LCD codes of dimensions 1, n − 1 It is trivial that Fn2 is an LCD [n, n, 1] code. It is known [7] that ( (n, 2) if n is odd, (d(n, 1), d(n, n − 1)) = (n − 1, 1) if n is even. Proposition 2.6. There is a unique LCD [n, 1, d(n, 1)] code, up to equivalence. Proof. Let C be an LCD [n, 1, d(n, 1)] code. We may assume without loss of generality that C has generator matrix of the following form:   1 1 · · · 1 1 and 1 1 · · · 1 0 , if n is odd and even, respectively. The result follows. Proposition 2.7. (i) Suppose that n is odd. Then there is a unique LCD [n, n − 1, 2] code, up to equivalence. (ii) Suppose that n is even. Then there are n/2 inequivalent LCD [n, n−1, 1] codes. Proof. Let C be an LCD [n, n − 1, d(n, n − 1)] code. We may assume without loss of generality that C has generator matrix of the following form:   a1  ..  , G((a1 , . . . , an−1 )) =  In−1 .  an−1 where ai ∈ F2 (i = 1, 2, . . . , n − 1). Then H= a1 a2 · · · an−1 1 is a parity-check matrix of C.  (i) Suppose that n is odd. Since  d(C) = 2, ai = 1 (i = 1, 2, . . . , n − 1). T Since n is odd, HH = 1 . Hence, there is a unique LCD [n, n−1, 2] code, up to equivalence. (ii) Suppose that n is even. Since C is LCD, the weight of (a1 , . . . , an−1 ) is even. Let C(x) denote the code with generator matrix of the form G(x), where x ∈ F2n−1 and wt(x) is even. It is easy to see that C(x) and C(y) are equivalent if and only if wt(x) = wt(y). Hence, there are n/2 LCD [n, n − 1, 1] codes, up to equivalence. This completes the proof. 5 3 Constructions of LCD codes from k-covers In this section, we study LCD codes constructed from k-covers of m-sets. We give a characterization of LCD codes of dimensions 2 and 3 using k-covers. 3.1 LCD codes from k-covers Let m and k be positive integers. Let X be a set with m elements (for short m-set). A k-cover of X is a collection of k not necessarily distinct subsets of X whose union is X [5]. This concept plays an important role in the study of LCD codes for small dimensions. We define a generator matrix from a k-cover {Y1 , Y2, . . . , Yk } of an mset X = {1, 2, . . . , m} as follow. Since the matrix depends on the ordering chosen for Y1 , Y2 , . . . , Yk , in this paper, we fix the order. More precisely, we define a k-cover as a sequence Y = (Y1 , Y2 , . . . , Yk ). Let Y = (Y1 , Y2 , . . . , Yk ) be a k-cover of X. We define the following subsets of {1, 2, . . . , k + ℓm}: Z1 = {1} ∪ (k + Y1 ) ∪ (k + m + Y1 ) ∪ · · · ∪ (k + (ℓ − 1)m + Y1 ), Z2 = {2} ∪ (k + Y2 ) ∪ (k + m + Y2 ) ∪ · · · ∪ (k + (ℓ − 1)m + Y2 ), .. . Zk = {k} ∪ (k + Yk ) ∪ (k + m + Yk ) ∪ · · · ∪ (k + (ℓ − 1)m + Yk ), where ℓ is an even positive integer and a + Yi = {a + y | y ∈ Yi } for a positive integer a. Let zi be the characteristic vector of Zi (i = 1, 2, . . . , k). Then define the k × (k + ℓm) matrix G(Y) such that zi is the i-th row. We denote the code with generator matrix of the form G(Y) by C(Y). Proposition 3.1. The code C(Y) is an LCD [ℓm+k, k] code with d(C(Y)⊥ ) = 2. Proof. Since ℓ is even, G(Y)G(Y)T = Ik . Thus, C(Y) is LCD. Since Y is a k-cover of X, no column of G(Y) is 0k and some two columns of G(Y) are identical. This implies that d(C(Y)⊥ ) = 2. Now we consider the case k = 2, 3 and ℓ = 2. Let Y be a 2-cover and a 3-cover of X, respectively. Let C(Y) be a [2m + 2, 2] code and a [2m + 3, 3] code with generator matrix of the form G(Y), respectively. Let C ′ (Y) denote the [2m + 3, 2] code and the [2m + 4, 3] code with generator matrix of the 6 following form: G′ (Y) =  G(Y) 1 1  respectively.  and  G(Y)  0 1 , 1 Proposition 3.2. The code C ′ (Y) is LCD. Proof. For k = 2 and 3, the result follows from     1 0 0 0 1 G′ (Y)G′ (Y)T = and  0 0 1  , 1 0 0 1 0 respectively. 3.2 LCD codes from 2-covers Proposition 3.3. Suppose that m ≥ 1. Let C be an LCD [2m + 2, 2] code with d(C ⊥ ) ≥ 2. Then there is a 2-cover (Y1 , Y2 ) such that C ∼ = C((Y1 , Y2)). Proof. We may assume without loss of generality that C has generator matrix of the following form:   1 0 M , (1) 0 1 where M is a 2 × 2m matrix such that no column is 02 . If 2m ≥ 4, then an LCD [2m, 2] code is constructed by Lemma 2.4. By continuing this process, an LCD [4, 2] code with generator matrix of the form (1) is constructed. Hence, we show that such a code is constructed from a 2-cover. Since no column of M is 02 , it is sufficient to consider the codes with generator matrices:         1 0 1 1 1 0 0 1 1 0 0 1 1 0 0 0 . , , , 0 1 1 1 0 1 1 1 0 1 1 0 0 1 1 1 Only the first code and the last two codes are LCD. It can be seen by hand that the last two LCD codes are equivalent. This means that the first code and the last code are C((Y1 , Y2 )) and C((Y1′ , Y2′ )), respectively, where Y1 = ∅, Y2 = Y1′ = Y2′ = {1}. 7 Proposition 3.4. Suppose that m ≥ 1. Let C be an LCD [2m + 3, 2] code with d(C ⊥ ) ≥ 2. Then there is a 2-cover (Y1 , Y2 ) such that C ∼ = C ′ ((Y1 , Y2 )). Proof. We may assume without loss of generality that C has generator matrix of the following form:   1 0 ′ M , (2) 0 1 where M ′ is a 2 × (2m + 1) matrix such that no column is 02 . If 2m + 1 ≥ 4, then an LCD [2m + 1, 2] code is constructed by Lemma 2.4. By continuing this process, an LCD [5, 2] code with generator matrix of the form (2) is constructed. Since no column of M ′ is 02 , it is sufficient to consider the [5, 2] codes with generator matrices (2), where ′ M =  0 0 0 1 1 1     0 0 0 1 , , 1 1 1 0  0 1 1 0  0 1 , 1 1      1 1 1 0 1 1 1 . , , 1 1 1 1 1 1 1 Only the third code and the last code are LCD. It can be seen by hand that the two LCD codes are equivalent. In addition, the last code is C ′ ((Y1 , Y2 )), where Y1 = Y2 = {1}. This completes the proof. 3.3 LCD codes from 3-covers Proposition 3.5. Suppose that m ≥ 1. Let C be an LCD [2m+3, 3] code with d(C ⊥ ) ≥ 2. Then there is a 3-cover (Y1 , Y2 , Y3 ) such that C ∼ = C((Y1, Y2 , Y3 )). Proof. We may assume without loss of generality that C has generator matrix of the following form:   1 0 0  0 1 0 M , (3) 0 0 1 where M is a 3 × 2m matrix such that no column is 03 . If 2m ≥ 8, then an LCD [2m + 1, 3] code is constructed by Lemma 2.4. By continuing this process, an LCD [n, 3] code with generator matrix of the form (3) is constructed, where n = 5, 7, 9. Hence, we show that such a code is constructed from a 3-cover. 8 Let C9 be an LCD [9, 3] code with generator matrix of the form (3) satisfying that all columns of M are distinct. Our computer search shows that C9 is equivalent to the code D9 with generator matrix   1 0 0 1 0 1 0 1 1  0 1 0 0 1 1 0 0 1 . 0 0 1 0 0 0 1 1 1 In addition, our computer with generator matrix  1  0 0 search shows that D9 is equivalent to the code  0 0 1 1 1 1 1 1 1 0 1 0 1 1 0 1 . 0 1 1 1 0 1 1 0 This means that the code is C((Y1 , Y2, Y3 )), where Y1 = {1, 2, 3}, Y2 = {1, 3} and Y3 = {1, 2}. Let C7 be an LCD [7, 3] code with generator matrix of the form (3) satisfying that all columns of M are distinct. Our computer search shows that C7 is equivalent to one of the codes D7,1 and D7,2 with generator matrices     1 0 0 1 0 1 1 1 0 0 1 0 1 0  0 1 0 0 1 1 0  and  0 1 0 0 1 0 1  , 0 0 1 0 0 0 1 0 0 1 0 0 1 1 respectively. In addition, our computer search shows that equivalent to the codes with generator matrices    1 0 0 1 1 1 1 1 0 0 1 1  0 1 0 1 1 1 1  and  0 1 0 0 1 0 0 1 1 0 1 0 0 0 1 1 0 D7,1 and D7,2 are  1 1 0 1 , 1 0 respectively. This means that the codes are C((Y1 , Y2 , Y3 )) and C((Y1′ , Y2′ , Y3′ )), respectively, where Y1 = Y2 = Y1′ = {1, 2}, Y3 = Y3′ = {1} and Y2′ = {2}. Our computer search shows that an LCD [5, 3] code is equivalent to one of the codes C5,1 , C5,2 and C5,3 with generator matrices       1 0 0 1 1 1 0 0 1 1 1 0 0 1 1  0 1 0 0 0  ,  0 1 0 1 1  and  0 1 0 1 1  , 0 0 1 0 0 0 0 1 0 0 0 0 1 1 1 9 respectively. This means that the codes are C((Y1 , Y2 , Y3)), C((Y1′ , Y2′ , Y3′ )) and C((Y1′′ , Y2′′ , Y3′′ )), respectively, where Y1 = Y1′ = Y2′ = Y1′′ = Y2′′ = Y3′′ = {1} and Y2 = Y3 = Y3′ = ∅. Proposition 3.6. Suppose that m ≥ 1. Let C be an LCD [2m+4, 3] code with d(C ⊥ ) ≥ 2. Then there is a 3-cover (Y1 , Y2 , Y3 ) such that C ∼ = C ′ ((Y1, Y2 , Y3 )). Proof. We may assume without loss of generality that C has generator matrix of the following form:   1 0 0  0 1 0 (4) M′  , 0 0 1 where M ′ is a 3 × (2m + 1) matrix such that no column is 03 . If 2m + 1 ≥ 8, then an LCD [2m + 2, 3] code is constructed by Lemma 2.4. By continuing this process, an LCD [n, 3] code with generator matrix of the form (4) is constructed, where n = 6, 8, 10. Let C10 be an LCD [10, 3] code with generator matrix of the form (4) satisfying that all columns of M ′ are distinct. Then C10 is equivalent to the code D10 with generator matrix   1 0 0 1 0 1 0 1 0 1  0 1 0 0 1 1 0 0 1 1 . 0 0 1 0 0 0 1 1 1 1 Our computer search shows that D10 is equivalent to the code with generator matrix   1 0 0 1 1 1 1 1 1 0  0 1 0 1 0 1 1 0 1 1 . 0 0 1 1 1 0 1 1 0 1 This means that the code is C ′ ((Y1 , Y2, Y3 )), where Y1 = {1, 2, 3}, Y2 = {1, 3} and Y3 = {1, 2}. Let C8 be an LCD [8, 3] code with generator matrix of the form (4) satisfying that all columns of M ′ are distinct. Our computer search shows that C8 is equivalent to the code D8 with generator matrix   1 0 0 1 0 1 1 0  0 1 0 0 1 1 0 1 . 0 0 1 0 0 0 1 1 10 In addition, our computer search with generator matrix  1 0 0  0 1 0 0 0 1 shows that D8 is equivalent to the code  1 1 1 1 0 1 1 1 1 1 . 1 0 1 0 1 This means that the code is C ′ ((Y1, Y2 , Y3 )), where Y1 = Y2 = {1, 2} and Y3 = {1}. Our computer search shows that an LCD [6, 3] code with generator is equivalent  to one of the codes C6,1 , C6,2 and C6,3 with generator matrices I3 A , where       0 0 0 1 1 0 1 1 0 A =  1 1 1  ,  0 0 1  and  1 1 1  , 1 1 1 0 0 1 1 1 1 respectively, In addition, these codes are C ′ ((Y1 , Y2 , Y3)), C ′ ((Y1′ , Y2′ , Y3′ )) and C ′ ((Y1′′ , Y2′′ , Y3′′ )), respectively, where Y1 = Y2′ = Y3′ = ∅ and Y2 = Y3 = Y1′ = Y1′′ = Y2′′ = Y3′′ = {1}. 3.4 Remarks The elements of an m-set X may be taken to be identical. In this case, X is called unlabelled. Let Y = (Y1 , Y2 , . . . , Yk ) be a k-cover of X. The order of the sets Y1 , Y2, . . . , Yk may not be material. In this case, Y is called disordered [5]. Proposition 3.7. Let Y be a k-cover of an m-set X. Let Y ′ be the k-cover obtained from Y by a permutation of Y1 , Y2 , . . . , Yk and a permutation of the elements of X. Then C(Y) ∼ = C(Y ′ ). Proof. Consider a generator matrix G of the LCD code C(Y) constructed from a k-cover Y = (Y1 , Y2, . . . , Yk ). A permutation of Y1 , Y2 , . . . , Yk implies a permutation of rows of G. A permutation of the elements of X implies a permutation of columns of G. The result follows. 11 By the above proposition, when we consider codes C(Y) constructed from all k-covers Y, which must be checked to achieve a complete classification, it is sufficient to consider only disordered k-covers of unlabelled m-sets. Now let us consider LCD codes constructed from 4-covers. Our computer search shows that there are six inequivalent LCD [6, 4] codes D6,i ⊥ (i = 1, 2, . . . , 6) with d(D6,i ) ≥ 2. These codes D6,i have generator matrices  I4 A , where             1 0 1 0 1 1 1 1 1 1 1 1  0 0   1 1   1 1   1 1   1 0   1 0             A=  0 0 , 0 0 , 1 1 , 1 1 , 0 1 , 0 1 , 1 1 0 1 1 1 0 0 0 0 0 0 respectively. The weight enumerators W6,i of the codes D6,i are listed in Table 1. It is easy to see that the number of disordered 4-covers of an unlabelled 1-set is 4 [5, Table 1]. Only the codes D6,i (i = 1, 2, 3, 4) are constructed from 4-covers. Table 1: W6,i (i = 1, 2, . . . , 6) i 1 2 3 4 W6,i 1 + 3y + 3y 2 + 2y 3 + 3y 4 + 3y 5 + y 6 1 + 2y + 2y 2 + 4y 3 + 5y 4 + 2y 5 1 + y + 3y 2 + 6y 3 + 3y 4 + y 5 + y 6 i 4 5 6 W6,i 1 + 6y 2 + 4y 3 + y 4 + 4y 5 1 + 6y 2 + 9y 4 1 + 4y 2 + 6y 3 + 3y 4 + 2y 5 LCD codes of dimension 2 It was shown in [8] that ( ⌋ ⌊ 2n 3 d(n, 2) = 2n ⌊ 3 ⌋−1 if n ≡ 1, 2, 3, 4 (mod 6), otherwise, for n ≥ 2. Throughout this section, we denote d(n, 2) by dn . In this section, we give a classification of LCD [n, 2, dn ] codes for n = 6t (t ≥ 1), 6t + 1 (t ≥ 1), 6t + 2 (t ≥ 0), 6t + 3 (t ≥ 1), 6t + 4 (t ≥ 0) and 6t + 5 (t ≥ 1). In Section 3, we gave some observation of LCD codes of dimension 2, which is 12 established from the concept of 2-covers of m-sets. The observation is useful to complete the classification. Lemma 4.1. Suppose that n ≥ 2 and n ≡ 0, 1, 2, 3 (mod 6). If there is an LCD [n, 2, dn ] code C then d(C ⊥ ) ≥ 2. Proof. Write n = 6t + s, where 0 ≤ s ≤ 5. For s and dn , we have the following: s 0 1 dn 4t − 1 4t s dn 2 4t + 1 3 4t + 2 s dn 4 4t + 2 5 4t + 2 The result follows by Lemma 2.3. Now suppose that C and C ′ are an LCD [2m + 2, 2] code and an LCD [2m + 3, 2] code with d(C ⊥ ) ≥ 2 and d(C ′⊥ ) ≥ 2, respectively, for m ≥ 1. By Propositions 3.3 and 3.4, we may assume without loss of generality that C and C ′ have generator matrices of the following form:   1 0 0 M(a, b, c) M(a, b, c) G (a, b, c) = and 0 1   1 1 0 1 M(a, b, c) M(a, b, c) , G (a, b, c) = 1 0 1 respectively, where M(a, b, c) =  1a 1b 0c 1a 0b 1c  . (5) We denote the codes by C 0 (a, b, c) and C 1 (a, b, c), respectively. Then the codes C δ (a, b, c) have the following weight enumerators for δ ∈ {0, 1}: 1 + y 1+2(a+b)+δ + y 1+2(a+c)+δ + y 2+2(b+c) (6) For nonnegative integers a, b, c, n and δ ∈ {0, 1}, we consider the following conditions: dn ≤ 1 + 2(a + b) + δ, dn ≤ 1 + 2(a + c) + δ, dn ≤ 2 + 2(b + c), 2(a + b + c) + 2 + δ = n, b ≤ c. 13 (7) (8) (9) (10) (11) Lemma 4.2. (i) Let S be the set of (a, b, c) satisfying the conditions (7)– (11), where δ = 1. (1) If n = 6t + 1 (t ≥ 1), then S = {(t − 1, t, t), (t, t − 1, t)}. (2) If n = 6t + 3 (t ≥ 1), then S = {(t, t, t)}. (3) If n = 6t + 5 (t ≥ 1), then   (t − 1, t + 1, t + 1), (t, t, t + 1), S= . (t + 1, t − 1, t + 1), (t + 1, t, t) (ii) Let S be the set of (a, b, c) satisfying the conditions (7)–(11), where δ = 0. (1) If n = 6t (t ≥ 1), then S = {(t − 1, t, t), (t, t − 1, t)}. (2) If n = 6t + 2 (t ≥ 1), then S = {(t, t, t)}. (3) If n = 6t + 4 (t ≥ 0), then S = {(t + 1, t, t)}. Proof. All cases are similar, and we only give the details for n = 6t + 1. From (9) and (10), we have a ≤ t. From (7), (8) and (10), we have t − 1 ≤ a. Thus, we have a ∈ {t − 1, t}. Suppose that a = t − 1. From (7), we have t ≤ b. From (8), we have t ≤ c. From (10), we have b + c = 2t. Hence, we have b = c = t. Suppose that a = t. From (7), we have t − 1 ≤ b. From (8), we have t − 1 ≤ c. From (10), we have b + c = 2t − 1. From (11), we have (b, c) = (t − 1, t). Lemma 4.3. C δ (a, b, c) ∼ = C δ (a, c, b) for δ ∈ {0, 1}. Proof. The matrix Gδ (a, c, b) is obtained from Gδ (a, c, b) by permutations of rows and columns. Lemma 4.4. C 1 (a, b, c) ∼ = C 1 (b, a, c) ∼ = C 1 (c, b, a). Proof. We denote the code with generator matrix of the form M(a, b, c) in (5) by  row of M(a, b, c). By considering the matrices  Let ri be the i-th  D(a, b, c). r1 + r2 r1 , we have D(a, b, c) = D(b, a, c) = D(c, b, a). and r2 r1 + r2 Since C 1 (a, b, c) ∼ = D(2a + 1, 2b + 1, 2c + 1), the result follows. 14 Theorem 4.5. codes. (i) For t ≥ 1, there are two inequivalent LCD [6t, 2, 4t − 1] (ii) For t ≥ 1, there is a unique LCD [6t + 1, 2, 4t] code, up to equivalence. (iii) For t ≥ 1, there is a unique LCD [6t+2, 2, 4t+1] code, up to equivalence. (iv) For t ≥ 1, there is a unique LCD [6t+3, 2, 4t+2] code, up to equivalence. Proof. Let C be an LCD [n, 2] code with n ≥ 4. For the parameters [6t, 2, 4t− 1], [6t + 1, 2, 4t], [6t + 2, 2, 4t + 1] and [6t + 3, 2, 4t + 2] (t ≥ 1), by Lemma 4.1, we may assume without loss of generality that C has generator matrix of the form Gδ (a, b, c) for δ = 0, 1, 0, 1, respectively. In addition, C satisfies (7)– (10). By Lemma 4.3, we may assume without loss of generality that C satisfies (11). (i) Assume that n = 6t (t ≥ 1). By Lemma 4.2 (ii), (a, b, c) is (t−1, t, t) or (t, t − 1, t). Let C1 and C2 be the LCD codes with generator matrices G0 (a, b, c) for these (a, b, c), respectively. By (6), the codes C1 and C2 have the following weight enumerators: 1 + 2y 4t−1 + y 4t+2 and 1 + y 4t−1 + y 4t + y 4t+1 , respectively. Hence, the two codes are inequivalent. (ii) Assume that n = 6t+ 1 (t ≥ 1). By Lemma 4.2 (i), (a, b, c) is (t−1, t, t) or (t, t−1, t). Let C1 and C2 be the LCD codes with generator matrices G1 (a, b, c) for these (a, b, c), respectively. By Lemma 4.4, C1 and C2 are equivalent. (iii) For n = 6t + 2 (t ≥ 1), the uniqueness follows from Lemma 4.2 (ii). (iv) For n = 6t + 3 (t ≥ 1), the uniqueness follows from Lemma 4.2 (i). This completes the proof. We remark that there is a unique LCD [3, 2, 2] code, up to equivalence, by Proposition 2.7. Lemma 4.6. (i) For t ≥ 0, there is a unique LCD [6t + 4, 2, 4t + 2] code C with d(C ⊥ ) ≥ 2, up to equivalence. 15 (ii) For t ≥ 1, there are two inequivalent LCD [6t + 5, 2, 4t + 2] codes C with d(C ⊥ ) ≥ 2. Proof. Let C be an LCD [n, 2] code with d(C ⊥ ) ≥ 2 and n ≥ 4. For the parameters [6t+4, 2, 4t+2] (t ≥ 0) and [6t+5, 2, 4t+2] (t ≥ 1), since d(C ⊥ ) ≥ 2, we may assume without loss of generality that C has generator matrix of the form Gδ (a, b, c) for δ = 0, 1, respectively. In addition, C satisfies (7)–(10). By Lemma 4.3, we may assume without loss of generality that C satisfies (11). (i) For n = 6t + 4 (t ≥ 0), the uniqueness follows from Lemma 4.2 (ii). (ii) Assume that n = 6t + 5 (t ≥ 1). By Lemma 4.2 (i), (a, b, c) is (t − 1, t + 1, t + 1), (t, t, t + 1), (t + 1, t − 1, t + 1) or (t + 1, t, t). Let Ci (i = 1, 2, 3, 4) be the LCD code with generator matrix G1 (a, b, c) for these (a, b, c), respectively. By Lemma 4.4, C1 ∼ = C4 . = C3 and C2 ∼ By (6), the codes C1 and C2 have the following weight enumerators: 1 + 2y 4t+2 + y 4t+4 and 1 + y 4t+2 + 2y 4t+4 , respectively. Hence, the two codes are inequivalent. This completes the proof. Remark 4.7. By [8, Theorem 3], the dual codes of the codes given in the above lemma have minimum weight 2. Theorem 4.8. 2] codes. (i) For t ≥ 0, there are two inequivalent LCD [6t+4, 2, 4t+ (ii) For t ≥ 1, there are four inequivalent LCD [6t + 5, 2, 4t + 2] codes. Proof. By Lemma 2.5, all LCD [n + 1, k, d] codes C with d(C ⊥ ) = 1, which must be checked to achieve a complete classification, can be obtained from all inequivalent LCD [n, k, d] codes. (i) By Theorem 4.5, there is a unique LCD [6t + 3, 2, 4t + 2] code, up to equivalence, for t ≥ 1. The result follows from Lemma 4.6. (ii) The result follows from Lemma 4.6 and the part (i). This completes the proof. We remark that there are three inequivalent LCD [5, 2, 2] codes (see Table 3). 16 5 LCD codes of dimension 3: d(n, 3) The aim of this section is to show the following theorem. In Section 3, we gave some observation of LCD codes of dimension 3, which is established from the concept of 3-covers of m-sets. The observation is useful to do this. Theorem 5.1. For n ≥ 3, (  4n d(n, 3) = 7   4n 7 −1 if n ≡ 3, 5, 10, 12 (mod 14), otherwise.  4n  Throughout this section, we denote 7 by αn . Lemma 5.2. There is no LCD [n, 3, αn ] code for n ≡ 2 (mod 7). Proof. Suppose that there is an (unrestricted) [n, 3, d] code. By the Griesmer bound, we have     d d + . n≥d+ 2 4 Hence, we have d(n, 3) ≤ ( αn − 1 αn if n ≡ 2 (mod 7), otherwise. The result follows. Lemma 5.3. Suppose that n ≥ 3 and n ≡ 0, 4, 6, 7, 11, 13 (mod 14). If there is an LCD [n, 3, αn ] code C, then d(C ⊥ ) ≥ 2. Proof. Write n = 14t + s, where 0 ≤ s ≤ 13. For s and αn , we have the following: s 0 1 2 αn s 8t 3 8t 4 8t + 1 5 αn s 8t + 1 6 8t + 2 7 8t + 2 8 αn s αn s αn 8t + 3 9 8t + 5 12 8t + 6 8t + 4 10 8t + 5 13 8t + 7 8t + 4 11 8t + 6 The result follows by Lemma 2.3. 17 For nonnegative integers a, b, c, d, e, f, g, m, α and δ ∈ {0, 1}, we consider the following conditions: α ≤ 1 + 2(a + b + f + g), α ≤ 1 + 2(a + c + e + g) + δ, α ≤ 1 + 2(a + d + e + f ) + δ, α ≤ 2 + 2(b + c + e + f ) + δ, α ≤ 2 + 2(b + d + e + g) + δ, α ≤ 2 + 2(c + d + f + g), α ≤ 3 + 2(a + b + c + d), a + b + c + d + e + f + g = m. Define the following sets:  3+δ R1 = r ∈ Z | α − m − ≤r ≤m− 2  4+δ ≤r ≤m− R2 = r ∈ Z | α − m − 2 (12) (13) (14) (15) (16) (17) (18) (19)  3 3+δ , α+ 4 2  3 2+δ . α+ 4 2 Lemma 5.4. Let a, b, c, d, e, f, g be nonnegative integers satisfying the conditions (12)–(19). (i) If δ = 0, then a, e, f, g ∈ R1 and b, c, d ∈ R2 . (ii) If δ = 1, then a, f, g ∈ R1 and b, c, d, e ∈ R2 . Proof. All cases are similar, and we only give the details for a ∈ R1 and b ∈ R2 . From (15), (16), (17) and (19), we have a ≤ m − 34 α + 3+δ . From (12), 2 (13), (14), (18) and (19), we have α − m − 3+δ ≤ a. Similarly, from (13), 2 3 4+δ (14), (17) and (19), we have b ≤ m − 4 α + 2 . From (12), (15), (16), (18) and (19), we have α − m − 4+δ ≤ b. The result follows. 2 Now suppose that C and C ′ are an LCD [2m + 3, 3] code and an LCD [2m + 4, 3] code with d(C ⊥ ) ≥ 2 and d(C ′⊥ ) ≥ 2, respectively for m ≥ 1. By Propositions 3.5 and 3.6, we may assume without loss of generality that C 18 and C ′ have generator matrices of the following form:  1 0 0  0 1 0 M(a, b, c, d, e, f, g) M(a, b, c, d, e, f, g) 0 0 1  1 0 0  0 1 0 M(a, b, c, d, e, f, g) M(a, b, c, d, e, f, g) 0 0 1 respectively, where   and  0 1 , 1   1a 1b 0 c 0d 0e 1f 1g M(a, b, c, d, e, f, g) =  1a 0b 1c 0d 1e 0f 1g  . 1a 0b 0 c 1d 1e 1f 0g (20) We denote the codes by C 0 (a, b, c, d, e, f, g) and C 1 (a, b, c, d, e, f, g), respectively. Then the codes C δ (a, b, c, d, e, f, g) have the following weight enumerators for δ ∈ {0, 1}: 1 + y 1+2(a+b+f +g) + y 1+2(a+c+e+g)+δ + y 1+2(a+d+e+f )+δ + y 2+2(b+c+e+f )+δ + y 2+2(b+d+e+g)+δ + y 2+2(c+d+f +g) + y 3+2(a+b+c+d) . (21) Lemma 5.5. There is an LCD [n, 3, αn ] code for n ≡ 3, 5, 10, 12 (mod 14). Proof. F32 is the LCD [3, 3, 1] code. Suppose that n ≥ 5. Consider the following codes: C 0 (t + 1, t, t, t, t, t, t), C 1(t + 1, t, t, t, t, t + 1, t + 1), C 1 (t + 1, t + 1, t, t, t, t + 1, t + 1) and C 0 (t + 1, t + 1, t + 1, t + 1, t + 1, t + 1, t + 1), for t ≥ 0. These codes have lengths 14t + 5, 14t + 10, 14t + 12 and 14t + 17, respectively. By (21), these codes have the following weight enumerators: 1 + 3y 8t+2 + 3y 8t+3 + y 8t+5 , 1 + 3y 8t+5 + 3y 8t+6 + y 8t+7 , 1 + y 8t+5 + y 8t+6 + 3y 8t+7 + 2y 8t+8 and 1 + 3y 8t+9 + 3y 8t+10 + y 8t+11 , respectively. The result follows. 19 For the above parameters, the uniqueness of LCD codes is established in Section 6. Lemma 5.6. There is no LCD [n, 3, αn ] code for n ≡ 0, 4, 6, 7, 11, 13 (mod 14). Proof. There is no LCD [4, 3, 2] code (see [8, Table 1]). Assume that n ≡ 0, 4, 6, 7, 11, 13 (mod 14) and n ≥ 6. Suppose that there is an LCD [n, 3, αn ] code C. By Lemma 5.3, d(C ⊥ ) ≥ 2. Hence, C ∼ = C 0 (a, b, c, d, e, f, g) if 1 ∼ n ≡ 7, 11, 13 (mod 14) and C = C (a, b, c, d, e, f, g) if n ≡ 0, 4, 6 (mod 14) for some (a, b, c, d, e, f, g). Since C has minimum weight αn , (a, b, c, d, e, f, g) satisfies (12)–(19) with n = 3 + 2m + δ and α = αn . • (n, αn ) = (14t, 8t) (t ≥ 1): We have R2 = ∅, which is a contradiction. • (n, αn ) = (14t + 4, 8t + 2) (t ≥ 1), (14t + 6, 8t + 3) (t ≥ 0): We have (a, b, c, d, e, f, g) = (t, t, t, t, t, t, t) by Lemma 5.4. These contradict (12) and (19), respectively. • (n, αn ) = (14t + 7, 8t + 4) (t ≥ 0): We have R1 = ∅, which is a contradiction. • (n, αn ) = (14t + 11, 8t + 6), (14t + 13, 8t + 7) (t ≥ 0): We have (a, b, c, d, e, f, g) = (t + 1, t, t, t, t + 1, t + 1, t + 1) by Lemma 5.4. These contradict (18) and (19), respectively. This completes the proof. Lemma 5.7. There is no LCD [n, 3, αn ] code for n ≡ 1, 8 (mod 14). Proof. Assume that n ≡ 1, 8 (mod 14) and n ≥ 8. Suppose that there is an LCD [n, 3, αn ] code C. Since n − 1 ≡ 0, 7 (mod 14) and αn = αn−1 , we have d(n − 1, 3) ≤ αn−1 − 1 = αn − 1 by Lemma 5.6. By Lemma 2.3, d(C ⊥ ) ≥ 2. Hence, C ∼ = C 0 (a, b, c, d, e, f, g) if n ≡ 1 (mod 14) and C ∼ = C 1 (a, b, c, d, e, f, g) if n ≡ 8 (mod 14) for some (a, b, c, d, e, f, g). Since C has minimum weight αn , (a, b, c, d, e, f, g) satisfies (12)–(19) with n = 3 + 2m + δ and α = αn . 20 • (n, αn ) = (14t + 1, 8t) (t ≥ 1): We have (a, e, f, g) = (t, t, t, t) and b, c, d ∈ {t − 1, t} by Lemma 5.4. From (19), b + c + d = 3t − 1. Hence, (b, c, d) = (t − 1, t, t), (t, t − 1, t) and (t, t, t − 1). These contradict (12), (13) and (14), respectively. • (n, αn ) = (14t + 8, 8t + 4) (t ≥ 0): We have a, f, g ∈ {t, t + 1} and (b, c, d, e) = (t, t, t, t) by Lemma 5.4. From (19), a + f + g = 3t + 2. Hence, (a, f, g) = (t, t + 1, t + 1), (t + 1, t, t + 1) and (t + 1, t + 1, t). These contradict (18), (15) and (16), respectively. This completes the proof. Lemma 5.8. There is an LCD [n, 3, αn −1] code for n ≡ 0, 1, 2, 4, 6, 7, 8, 9, 11, 13 (mod 14) and n ≥ 4. Proof. There is an LCD [4, 3, 2] code (see [8, Table 1]). Suppose that n ≥ 6. Consider the following codes: C 1 (t + 1, t, t, t, t, t, t), C 0(t, t, t, t, t, t + 1, t + 1), C 1 (t, t, t, t, t, t + 1, t + 1), C 0 (t + 1, t, t, t, t, t + 1, t + 1), C 0 (t + 1, t, t, t, t + 1, t + 1, t + 1), C 0 (t + 1, t + 1, t, t, t + 1, t + 1, t + 1), C 1 (t + 1, t, t, t + 1, t + 1, t + 1, t + 1), C 0 (t + 1, t + 1, t, t + 1, t + 1, t + 1, t + 1), C 1 (t + 1, t + 1, t, t + 1, t + 1, t + 1, t + 1) and C 1 (t + 1, t + 1, t + 1, t + 1, t + 1, t + 1, t + 1), for t ≥ 0. We denote these codes by Ci (i = 1, 2, . . . , 10), respectively. The codes Ci have lengths 14t+6, 14t+7, 14t+8, 14t+9, 14t+11, 14t+13, 14t+14, 14t + 15, 14t + 16 and 14t + 18, respectively. The weight enumerators Wi of Ci (i = 1, 2, . . . , 10) are obtained by (21), where Wi are listed in Table 2. The result follows. Lemmas 5.2, 5.5, 5.6, 5.7 and 5.8 complete the proof of Theorem 5.1. 21 Table 2: Wi (i = 1, 2, . . . , 10) i 1 2 3 4 5 6 Wi 1 + y 8t+2 + 3y 8t+3 + 2y 8t+4 + y 8t+5 1 + 3y 8t+3 + 2y 8t+4 + y 8t+5 + y 8t+6 1 + y 8t+3 + 2y 8t+4 + 3y 8t+5 + y 8t+6 1 + 2y 8t+4 + 3y 8t+5 + y 8t+6 + y 8t+7 1 + y 8t+5 + 3y 8t+6 + 3y 8t+7 i 6 7 8 9 10 Wi 1 + y 8t+6 + 3y 8t+7 + 2y 8t+8 + y 8t+9 1 + 3y 8t+7 + 2y 8t+8 + y 8t+9 + y 8t+10 1 + y 8t+7 + 2y 8t+8 + 3y 8t+9 + y 8t+10 1 + 2y 8t+8 + 3y 8t+9 + y 8t+10 + y 8t+11 1 + y 8t+9 + 3y 8t+10 + 3y 8t+11 LCD codes of dimension 3: uniqueness In this section, we establish the uniqueness of LCD [n, 3, d(n, 3)] codes C for n ≡ 0, 2, 3, 5, 7, 9, 10, 12 (mod 14) and n ≥ 5. By Lemma 2.3 and Theorem 5.1, d(C ⊥ ) ≥ 2. By Propositions 3.5 and 3.6, C ∼ = C 0 (a, b, c, d, e, f, g) if n ≡ 3, 5, 7, 9 (mod 14) and C ∼ = C 1 (a, b, c, d, e, f, g) if n ≡ 0, 2, 10, 14 (mod 14) for some (a, b, c, d, e, f, g) Lemma 6.1. (i) C 0 (a, b, c, d, e, f, g) ∼ = C 0 (a, b, d, c, e, g, f ) 0 0 ∼ ∼ = C 0 (a, d, b, c, g, e, f ) = C (a, c, b, d, f, e, g) = C (a, c, d, b, f, g, e) ∼ ∼ = C 0 (a, d, c, b, g, f, e). (ii) C 1 (a, b, c, d, e, f, g) ∼ = C 1 (a, b, d, c, e, g, f ). Proof. The result follows by considering permutations of rows and columns of the generator matrices of C 0 (a, b, c, d, e, f, g) and C 1 (a, b, c, d, e, f, g). By the above lemma, we may assume without loss of generality that b≤c≤d c≤d if if δ = 0, δ = 1. (22) Lemma 6.2. Let S be the set of (a, b, c, d, e, f, g) satisfying (12)–(19) and (22). (i) If (n, α) = (14t + 3, 8t + 1) (t ≥ 1), then S = {(t, t, t, t, t, t, t)}. (ii) If (n, α) = (14t + 5, 8t + 2) (t ≥ 0), then S = {(t + 1, t, t, t, t, t, t)}. (iii) If (n, α) = (14t+10, 8t+5) (t ≥ 0), then S = {(t+1, t, t, t, t, t+1, t+1)}. 22 (iv) If (n, α) = (14t + 12, 8t + 6) (t ≥ 0), then S = {(t + 1, t + 1, t, t, t, t + 1, t + 1)}. Proof. All cases are similar, and we only give the details for (iv), which is the complicated case. Suppose that n = 14t + 12 and α = 8t + 6 (t ≥ 0). By Lemma 5.4, R1 = R2 = {t, t + 1}. From (12), 4t + 25 ≤ a + b + f + g. Hence, we have |{s ∈ {a, b, f, g} | s = t + 1}| ≥ 3. From (19), a + b + c + d + e + f + g = 7t + 4. Hence, we have |{s ∈ {a, b, c, d, e, f, g} | s = t + 1}| = 4. Therefore, we have    (t + 1, t + 1, t + 1, t), (t + 1, t + 1, t, t + 1),  (t + 1, t, t + 1, t + 1), (t, t + 1, t + 1, t + 1), . (a, b, f, g) ∈   (t + 1, t + 1, t + 1, t + 1) Here, we remark that |{s ∈ {c, d, e} | s = t + 1}| ≤ 1. • (a, b, f, g) = (t + 1, t + 1, t + 1, t): From (13), (16) and (17), 2t + 1 ≤ c + e, 2t + 1 ≤ d + e and 2t + 1 ≤ c + d, 2 respectively. This contradicts (23). • (a, b, f, g) = (t + 1, t + 1, t, t + 1): From (14), (15) and (17), 2t + 1 ≤ d + e, 2t + 1 ≤ c + e and 2t + 1 ≤ c + d, 2 respectively. This contradicts (23). • (a, b, f, g) = (t + 1, t, t + 1, t + 1): From (15), (16) and (18), 2t + 1 1 1 ≤ c + e, 2t + ≤ d + e and 2t + ≤ c + d, 2 2 2 respectively. This contradicts (23). 23 (23) • (a, b, f, g) = (t, t + 1, t + 1, t + 1): From (13), (14) and (18), 2t + 1 ≤ c + e, 2t + 1 ≤ d + e and 2t + 1 ≤ c + d, 2 respectively. This contradicts (23). The result follows. Therefore, we have the following theorem. Theorem 6.3. (i) For t ≥ 1, there is a unique LCD [14t + 3, 3, 8t + 1] code, up to equivalence. (ii) For t ≥ 0, there is a unique LCD [14t + 5, 3, 8t + 2] code, up to equivalence. (iii) For t ≥ 0, there is a unique LCD [14t + 10, 3, 8t + 5] code, up to equivalence. (iv) For t ≥ 0, there is a unique LCD [14t + 12, 3, 8t + 6] code, up to equivalence. Now we consider LCD [n, 3, d(n, 3)] codes for n ≡ 0, 2, 7, 9 (mod 14) and n ≥ 7. Lemma 6.4. Let S be the set of (a, b, c, d, e, f, g) satisfying (12)–(19) and (22). (i) If (n, α) = (14t, 8t − 1) (t ≥ 1), then S = {(t, t − 1, t, t, t − 1, t, t), (t, t − 1, t − 1, t, t, t, t)}. (ii) If (n, α) = (14t + 2, 8t) (t ≥ 1), then S = {(t, t, t, t, t − 1, t, t), (t, t, t − 1, t, t, t, t)}. (iii) If (n, α) = (14t + 7, 8t + 3) (t ≥ 0), then   (t, t, t, t, t + 1, t, t + 1), (t, t, t, t, t + 1, t + 1, t), . S= (t, t, t, t, t, t + 1, t + 1) 24 (iv) If (n, α) = (14t + 9, 8t + 4) (t ≥ 0), then   (t + 1, t, t, t, t + 1, t, t + 1), (t + 1, t, t, t, t + 1, t + 1, t), . S= (t + 1, t, t, t, t, t + 1, t + 1) Proof. All cases are similar, and we only give the details for (i). Suppose that n = 14t and α = 8t − 1 (t ≥ 1). By Lemma 5.4, R1 = R2 = {t − 1, t}. From (19), a + b + c + d + e + f + g = 7t − 2. Hence, we have |{s ∈ {a, b, c, d, e, f, g} | s = t − 1}| = 2. (24) From (12), (13) and (14), 4t − 1 ≤ a + b + f + g, 4t − 32 ≤ a + c + e + g and 4t − 1 ≤ a + d + e + f, (25) respectively. Now suppose that a = t − 1. From (25), we have b = c = d = e = f = g = t. Since this contradicts (24), we have a = t. Suppose that g = t − 1. From (25), we have b = c = d = e = f = t. Since this contradicts (24), we have g = t. From (17), 4t − 3 ≤ c + d + f + g. 2 (26) Suppose that f = t − 1. From (25) and (26), we have b = c = d = e = t. Since this contradicts (24), we have f = t. Suppose that d = t−1. From (26), we have c = t, which contradicts (22). Therefore, we have (b, c, e) ∈ {(t − 1, t − 1, t), (t − 1, t, t − 1)}. The result follows. We denote the code with generator matrix of the form M(a, b, c, d, e, f, g) in (20) by D(a, b, c, d, e, f, g). It is trivial that C 0 (a, b, c, d, e, f, g) ∼ = D(2a, 2b+ 1, 2c + 1, 2d + 1, 2e, 2f, 2g) and C 1 (a, b, c, d, e, f, g) ∼ = D(2a, 2b + 1, 2c + 1, 2d + 1, 2e + 1, 2f, 2g). Lemma 6.5. (i) For t ≥ 1, D(2t, 2t − 1, 2t + 1, 2t + 1, 2t − 1, 2t, 2t) ∼ = D(2t, 2t − 1, 2t − 1, 2t + 1, 2t + 1, 2t, 2t). 25 (ii) For t ≥ 1, D(2t, 2t + 1, 2t − 1, 2t + 1, 2t + 1, 2t, 2t) ∼ = D(2t, 2t + 1, 2t + 1, 2t + 1, 2t − 1, 2t, 2t). Proof. Let ri be the i-th row of M(a, b, c, d, e, f, g). Consider the following matrices:     r1 r1  r3  and  r2  r2 + r3 r2 + r3 for (i) and (ii), respectively. The result follows. Theorem 6.6. (i) For t ≥ 1, there is a unique LCD [14t, 3, 8t − 1] code, up to equivalence. (ii) For t ≥ 1, there is a unique LCD [14t + 2, 3, 8t] code, up to equivalence. (iii) For t ≥ 0, there is a unique LCD [14t + 7, 3, 8t + 3] code, up to equivalence. (iv) For t ≥ 0, there is a unique LCD [14t + 9, 3, 8t + 4] code, up to equivalence. Proof. For (i) and (ii), the result follows from Lemmas 6.4 and 6.5. For (iii) and (iv), the result follows from Lemmas 6.1 and 6.4. For the parameters [4, 3, 1], [6, 3, 2], [8, 3, 3], [11, 3, 5], [13, 3, 6] and [15, 3, 7], a number of inequivalent LCD codes are known (see Table 3). 7 Classification of LCD codes for small parameters In this section, we give a complete classification of LCD [n, k] codes having minimum weight d(n, k) for 2 ≤ k ≤ n − 1 ≤ 15. We describe how LCD [n, k] codes having minimum weight d(n, k) were classified. Let dall (n, k) denote the largest minimum weight among all (unrestricted) [n, k] codes. The values dall (n, k) can be found in [9]. For a fixed pair (n, k), we found all inequivalent [n, k] codes by one of the following methods. If there is no LCD [n, k, dall (n, k)] code, then we consider the case dall (n, k) − 1. 26 Let C be an [n, k, d] code with parity-check matrix H. Let D be a code with parity-check matrix obtained from H by deleting a column. The code D is an [n − 1, k − 1, d′ ] code with d′ ≥ d. By considering the inverse operation, all [n, k, d] codes are obtained from [n−1, k−1, d′ ] codes with d′ ≥ d. Starting from [n, 1, d′ ] codes with d′ ≥ d, all [n + t, 1 + t, d] codes are found for a given t ≥ 1. This was done one column at a time, and complete equivalence tests are carried out for each new column added. It is obvious that all codes, which must be checked to achieve a complete classification, can be obtained. For some parameters, we employ the following method, due to the computational complexity. Every [n, k, d] code is equivalent to a code with generator matrix of the form Ik A , where A is a k × (n − k) matrix. The set of matrices A was constructed, row by row. Permuting the rows and columns of A gives rise to different generator matrices which generate equivalent codes. Here, we consider a natural (lexicographical) order < on the set of the vectors of length n − k. Let ri be the i-th row of A. We consider only matrices A, satisfying the condition r1 < r2 < · · · < rk and wt(ri ) ≥ d − 1. It is obvious that all codes, which must be checked to achieve a complete classification, can be obtained. For 2 ≤ k ≤ n−1 ≤ 15, the numbers N(n, k, d(n, k)) of inequivalent LCD [n, k, d(n, k)] codes are listed in Table 3, along with the values d(n, k). All generator matrices of the codes in the table can be obtained electronically from http://www.math.is.tohoku.ac.jp/~ mharada/LCD/. We continue a classification of LCD codes with parameters [2m+3, 2m, 2] and [2m+4, 2m+1, 2]. In Proposition 3.5, for an LCD [2m+3, 2m, 2] code C, there is a 3-cover (Y1 , Y2 , Y3 ) such that C ⊥ ∼ = C((Y1 , Y2, Y3 )). In addition, by Proposition 3.7, when we consider codes C(Y) constructed from all k-covers Y, which must be checked to achieve a complete classification, it is sufficient to consider only disordered k-covers of unlabelled m-sets. According to [5], let Tdu(m, k) denote the number of disordered k-covers of an unlabelled mset. The formula Tdu(m, k) is given in [5, Theorem 2]. For m ≤ 7 and k ≤ 8, Tdu(m, k) is numerically determined in [5, Table 1] (see also A005783 in [15]). Our computer search shows the following: Proposition 7.1. If 1 ≤ m ≤ 11, then N(2m + 3, 2m, 2) = N(2m + 4, 2m + 1, 2) = Tdu(m, 3). 27 Table 3: (d(n, k), N(n, k, d(n, k))) n\k 3 4 5 6 7 8 9 10 11 12 13 14 15 16 n\k 10 11 12 13 14 15 16 8 2 (2, 1) (2, 2) (2, 3) (3, 2) (4, 1) (5, 1) (6, 1) (6, 2) (6, 4) (7, 2) (8, 1) (9, 1) (10, 1) (10, 2) 9 (1, 5) (2, 4) (2, 51) (2, 619) (3, 31) (4, 2) (4, 1772) 3 4 5 6 7 8 (1, 2) (2, 1) (2, 3) (3, 1) (3, 3) (4, 1) (5, 1) (5, 6) (6, 1) (6, 6) (7, 1) (7, 8) (8, 1) 10 (2, 1) (2, 4) (2, 9) (3, 1) (4, 1) (4, 5) (4, 20) (5, 6) (6, 2) (6, 16) (6, 89) (7, 7) 11 (1, 3) (2, 2) (2, 9) (3, 2) (3, 11) (4, 4) (4, 37) (5, 5) (5, 101) (6, 10) (6, 283) 12 (2, 1) (2, 6) (2, 23) (3, 2) (4, 1) (4, 11) (4, 146) (5, 4) (6, 2) (6, 60) 13 (1, 4) (2, 3) (2, 23) (3, 1) (3, 22) (4, 4) (4, 301) (5, 1) (5, 1596) 14 (2, 1) (2, 9) (2, 51) (2, 396) (3, 27) (4, 8) (4, 985) (5, 1) 15 (2, 1) (2, 12) (2, 103) (2, 1370) (3, 34) (4, 7) (1, 6) (2, 5) (2, 103) (2, 2143) (3, 34) (2, 1) (2, 16) (2, 196) (2, 4389) (1, 7) (2, 7) (2, 196) (2, 1) (2, 20) (1, 8) A construction of LCD codes over Fq using self-orthogonal codes A code C over Fq is called self-orthogonal and self-dual if C ⊂ C ⊥ and C = C ⊥ , respectively. In this section, we give a construction of LCD codes over Fq using self-orthogonal codes. Proposition 8.1. Suppose that there is a self-orthogonal [n1 , k, d1 ] code over Fq and there is an LCD [n2 , k, d2 ] code over Fq . Then there is an LCD [n1 + n2 , k, d′ ] code over Fq with d′ ≥ d1 + d2 . Proof. Let G1 and G2 be generator matrices of a self-orthogonal [n1 , k, d1 ] code C1 over Fq and an LCD [n2 , k, d2] code C2 over Fq , respectively. Consider  an [n1 + n2 , k, d′ ] code C with generator matrix of the form G = G1 G2 . 28 Since GGT = G2 GT2 , C is LCD. The minimum weight of C follows from the minimum weights of C1 and C2 . Remark 8.2. Theorem 18 in [13] corresponds to the case G2 = Ik . By considering the case q = 2, the above proposition yields lower bounds on d(n, k) as follow. There is a self-dual [2k, k, 2] code and there is selforthogonal [2k + 1, k, 2] code for k ≥ 1. Hence, Proposition 8.1 gives d(n + 2k, k) ≥ d(n, k) + 2 for k ≥ 1, d(n + 2k + 1, k) ≥ d(n, k) + 2 for k ≥ 1. In addition, it is known that there is a self-orthogonal code for the parameters [7, 3, 4], [8, 4, 4], [11, 5, 4]. Hence, Proposition 8.1 gives d(n + 7, 3) ≥ d(n, 3) + 4, d(n + 8, 4) ≥ d(n, 4) + 4, d(n + 11, 5) ≥ d(n, 5) + 4. It is known that there is a self-dual [n, n/2, d] code: d=4 d=6 d=8 d = 10 if if if if and and and and only only only only if if if if n = 8, n ≥ 12, n ≥ 22, n = 24, 32, n ≥ 36, n ≥ 46, (see [6]). Hence, Proposition 8.1 gives d(n + 2k, k) ≥ d(n, k) + 4 for k ≥ 6, d(n + 2k, k) ≥ d(n, k) + 6 for k ≥ 11, d(n + 2k, k) ≥ d(n, k) + 8 for k = 12, 16, k ≥ 18, d(n + 2k, k) ≥ d(n, k) + 10 for k ≥ 23. As a consequence, we determine d(n, 4) for n = 17, 18, 21, 25. Proposition 8.3. d(17, 4) = 8, d(18, 4) = 8, d(21, 4) = 10, d(25, 4) = 12. 29 (27) Proof. From Table 3, d(n, 4) = d for (n, d) = (9, 4), (10, 4), (13, 6). From (27), we have d(17, 4) ≥ 8, d(18, 4) ≥ 8 and d(21, 4) ≥ 10. Again, applying (27) to d(17, 4) ≥ 8, we have d(25, 4) ≥ 12. It is known that dall (17, 4) = 8, dall (18, 4) = 8, dall (21, 4) = 10 and dall (25, 4) = 12 (see [9]). The result follows. Similarly, we have the following: d(19, 4) = 8 or 9, d(20, 4) = 9 or 10, d(22, 4) = 10 or 11, d(23, 4) = 11 or 12, d(24, 4) = 11 or 12, d(26, 4) = 12 or 13, d(27, 4) = 12, 13 or 14, d(28, 4) = 13 or 14, d(29, 4) = 14 or 15. We remark that an LCD [19, 4, 9] code is constructed in [13, Table 1]. Hence, d(19, 4) = 9. Acknowledgment. This work was supported by JSPS KAKENHI Grant Number 15H03633. The authors would like to thank Makoto Araya for his useful discussions. References [1] W. Bosma, J. Cannon and C. Playoust, The Magma algebra system I: The user language, J. Symbolic Comput. 24 (1997), 235–265. [2] C. Carlet and S. Guilley, Complementary dual codes for countermeasures to side-channel attacks, In: E.R. Pinto et al. (eds.), Coding Theory and Applications, CIM Series in Mathematical Sciences, vol. 3, pp. 97–105, Springer, 2014. [3] C. Carlet, S. Mesnager, C. Tang and Y. Qi, Euclidean and Hermitian LCD MDS codes, Des. Codes Cryptogr., (to appear), arXiv:1702.08033. [4] C. Carlet, S. Mesnager, C. Tang and Y. Qi, Linear codes over Fq which are equivalent to LCD codes, IEEE Trans. Inform. Theory, (to appear), arXiv:1703.04346. [5] R.J. Clarke, Covering a set by subsets, Discrete Math. 81 (1990), 147– 152. 30 [6] J.H. Conway and N.J.A. Sloane, A new upper bound on the minimal distance of self-dual codes, IEEE Trans. Inform. Theory 36 (1990), 1319– 1333. [7] S.T. Dougherty, J.-L. Kim, B. Ozkaya, L. Sok and P. Solé, The combinatorics of LCD codes: linear programming bound and orthogonal matrices, Int. J. Inf. Coding Theory 4 (2017), 116–128. [8] L. Galvez, J.-L. Kim, N. Lee, Y.G. Roe and B.-S. Won, Some bounds on binary LCD codes, Cryptogr. Commun., (to appear), arXiv:1701.04165. [9] M. Grassl, Code tables: Bounds on the parameters of various types of codes, Available online at http://www.codetables.de/, Accessed on 2018-01-22. [10] C. G̈uneri, B. Özkaya and P. Solé, Quasi-cyclic complementary dual codes, Finite Fields Appl. 42 (2016), 67–80. [11] L. Jin, Construction of MDS codes with complementary duals, IEEE Trans. Inform. Theory 63 (2017), 2843–2847. [12] J.L. Massey, Linear codes with complementary duals, Discrete Math. 106/107 (1992), 337–342. [13] E.R. Lina, Jr. and E.G. Nocon, On the construction of some LCD codes over finite fields, Manila J. Science 9 (2016), 67–82. [14] M. Sendrier, Linear codes with complementary duals meet the Gilbert– Varshamov bound, Discrete Math. 285 (2004), 345–347. [15] N. Sloane and S. Plouffe, The Encyclopedia of Integer Sequences, Academic Press, San Diego, CA, 1995 (Available online at https://oeis.org). 31
7cs.IT
An Effectful Treatment of Dependent Types∗ Matthijs Vákár1 1 University of Oxford, Dept. Computer Science, [email protected] arXiv:1603.04298v1 [cs.PL] 14 Mar 2016 Abstract We extend Levy’s call-by-push-value (CBPV) analysis from simple to dependent type theory (DTT) in order to study the interaction between computational effects and dependent types. We define the naive system of dependently typed CBPV, dCBPV-, and its extension with a principle of Kleisli extensions for dependent functions, dCBPV+. We investigate these systems from the points of view of syntax, categorical semantics, concrete models and operational semantics, in presence of a range of effects. We observe that, while the expressive power of dCBPV+ is needed if we want well-defined call-by-value (CBV) and call-by-name (CBN) translations of DTT, it is a less straightforward system than dCBPV-, in presence of some effects. Indeed, to be able to construct specific models and to retain the subject reduction property in the operational semantics, we are required to impose certain subtyping conditions, the idea being that the type of a computation may only become more (not less) specified as certain effects are executed. 1998 ACM Subject Classification F.3.2 Semantics of Programming Languages Keywords and phrases Dependent types, effects, call-by-push-value, linear dependent types Digital Object Identifier 10.4230/LIPIcs.xxx.yyy.p 1 Introduction Dependent types [1] are slowly being taking up by the functional programming community and are in the transition from a quirky academic hobby to a practical approach to building certified software. Purely functional dependently typed languages like Coq [2] and Agda [3] have existed for a long time. If the technology is to become more widely used in practice, however, it is crucial that dependent types can be smoothly combined with the wide range of effects that programmers make use of in their day to day work, like non-termination and recursion, mutable state, input and output, non-determinism, probability and non-local control. Although some languages exist which combine dependent types and effects, like Cayenne [4], ΠΣ [5], Zombie [6], Idris [7], Dependent ML [8] and F? [9], there have always been some strict limitations. For instance, the first four only combine dependent types with first class recursion (although Idris has good support for emulating other effects), Dependent ML constrains types to depend only on static natural numbers and F? does not allow types to depend on effectful terms at all (including non-termination). Somewhat different is Hoare Type Theory (HTT) [10], which defines a programming language for writing effectful programs as well as a separation logic encoded in a system of dependent types for reasoning about these programs. We note that the programming fragment is not merely an extension of the logical one, which would be the elegant solution suggested by the Curry-Howard correspondence. The sentiment of most papers discussing the marriage of these ideas seems to be that dependent types and effects form a difficult though not impossible combination. However, as far as we are aware, treatment has so far been on a case-by-case basis and no general theoretical analysis has been given which discusses, on a conceptual level, the possibilities, difficulties and impossibilities of combining general computational effects and dependent types. ∗ Data types, that is. The applicability of the results of this paper to the care of individuals with a dependent personality disorder may be rather limited. © Matthijs Vákár; licensed under Creative Commons License CC-BY Conference title on which this volume is based on. Editors: Billy Editor and Bill Editors; pp. 1–15 Leibniz International Proceedings in Informatics Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany 2 An Effectful Treatment of Dependent Types In a somewhat different vein, there has long been an interest in combining linearity and dependent types. This was first done in Cervesato and Pfenning’s LLF [11]. Recently, a semantic analysis of LLF was given by the author in [12, 13] which has proved important e.g. in the development of a game semantics for dependent types. One aspect that this abstract semantics as well as the study of particular models highlight is - more so than in the simply typed case - the added insight and flexibility obtained by decomposing the !-comonad into an adjunction1 . This corresponds to working with dependently typed version of Benton’s LNL-calculus [14] rather than Barber and Plotkin’s DILL [15], as was done in [16]. Similarly, it has proved problematic to give a dependently typed version of Moggi’s monadic metalanguage [17]. We hope that this paper illustrates that also in this case a decomposed adjunction perspective, like that of CBPV [18], is more flexible than a monadic perspective. Recall from [19] that if we decompose both linear logic and the monadic metalanguage into an adjunction, we can see the former to be a restricted case of the latter which only describes (certain) commutative effects. In this paper, we show that the analysis of linear DTT of [13, 16, 12] generalises straightforwardly to general (non-commutative) effects to give a dependently typed CBPV calculus that we call dCBPV-, which allows types to depend on values (including thunks of computations) but which lacks a Kleisli extension (or sequencing) principle for dependent functions. This calculus is closely related to Harper and Licata’s dependently typed polarized intuitionistic logic [20]. Its categorical semantics is obtained from that for linear dependent types, by relaxing a condition on the adjunction which would normally imply, among other things, the commutativity of the effects described. It straightforwardly generalises Levy’s adjunction models for CBPV [21] (from locally indexed categories to more general comprehension categories [22]) and, in a way, simplifies Moggi’s strong monad models for the monadic metalanguage [17], as was already anticipated by Plotkin in the late 80s: in a dependently typed setting the monad strength follows straightforwardly from the natural demand that its adjunction is compatible with substitution and, similarly, the distributivity of coproducts follows from their compatibility with substitution. In fact, we believe the categorical semantics of CBPV is most naturally understood as a special case of a that of dCBPV-. Particular examples of models are given by models of linear DTT and by Eilenberg-Moore adjunctions for strict2 indexed monads on models of pure DTT. The small-step operational semantics for CBPV of [18] transfers to dCBPV- without any difficulties with the expected subject reduction and (depending on the effects considered) strong normalization and determinacy results. When formulating candidate CBV- and CBN-translations of DTT into dCBPV-, it becomes apparent that the latter is only well-defined if we work with the weak (non-dependent) elimination rules for positive connectives, while the former is ill-defined altogether. To obtain a CBV-translation and the CBN-translation in all its glory, we have to add a principle of Kleisli extensions (or sequencing) for dependent functions to dCBPV-. We call the resulting calculus dCBPV+, to which we can easily extend our categorical and operational semantics. Normalization and determinacy results for the operational semantics remain the same. However, depending on the effects we consider, we may need to add extra coercion rules to the calculus to salvage subject reduction. These embody the idea that a computation can only obtain a more (not less) precise type after certain effects, like non-deterministic branching, 1 2 Indeed, connectives seem to be most naturally formulated one either the linear or cartesian side: Σ- and Id-constructors operate on cartesian types while Π-constructors operate on linear types. For brevity, from now on we shall drop the modifier "strict" for indexed structures. For instance, if we mention an indexed honey badger, we shall really mean a strict indexed honey badger. M. Vákár are executed. We analyse on a case-by-case basis the principle of dependent Kleisli extensions in dCBPV- models of a range of effects. This leads us to the same subtyping conditions. Before concluding, we discuss of the possibility of adding some additional connectives. In particular, we address the matter of a dependently typed enriched effect calculus (EEC) [23]. One the one hand, we hope this analysis gives a helpful theoretical framework in which we can study various combinations of dependent types and effects from an algebraic, denotational and operational point of view. It gives a robust motivation for the equations we should expect to hold in both CBV- and CBN-versions of effectful DTT, through their translations into dCBPV, and it guides us in modelling dependent types in effectful settings like game semantics. Moreover, it explains why combinations of dependent types and effects are slightly more straightforward in CBN than in CBV, as dependent Kleisli extensions are not required. On the other, noting that not all effects correspond to sound logical principles, an expressive system like CBPV or a monadic language, with fine control over where effects occur, is an excellent combination with dependent types as it allows us to use the language both for writing effectful programs and pure logical proofs about these programs. Similar to HTT in aim, but different in implementation, we hope that dCBPV can be expanded in future to an elegant language, serving both for writing effectful programs and for reasoning about them. 2 A Very Brief Recap of Simple Call-by-Push-Value We briefly recall the spirit of Levy’s CBPV analysis of simple type theory [18, 24, 21]. The long version of this paper [25] includes a detailed exposition, aimed at generalising smoothly to dependent types. CBPV roughly gives an adjunction decomposition of Moggi’s monadic metalanguage [17]. This allows one to not only fully and faithfully encode Moggi’s metalanguage and with that CBV λ-calculi, but also CBN ones. CBPV has a natural small-step operational semantics, satisfying subject reduction and, depending on the effects considered, determinism at each step and strong normalization. For terms of ground type, this reproduces the usual CBV and CBN operational semantics in presence of a wide range of effects. CBPV makes a clear distinction between the worlds of value types (inhabited by values) and computation types (the home of stacks and, in particular, computations), between which we have an adjunction of half-modalities F a U , which yield as special cases Moggi’s modality T = U F and the linear logic exponential ! = F U . F A can be read as the type of computations that can return values of type A and U B as the type of thunks of computations of type B. By only including positive type formers like inductive types on value types and negative ones like coinductive types on computation types, one is able to retain the entire βη-equational theory even in the presence of effects. As a consequence, we obtain an elegant categorical semantics in terms of adjunctions of locally indexed categories. 3 A Syntax for Dependently Typed Call-by-Push-Value (dCBPV) We generalise CBPV, allowing types to depend on values, but not computations (cf. linear [11] or polarised [20] DTT, where types can only depend on cartesian or positive terms, respectively). dCBPV makes the following judgements: well-formedness of contexts ` Γ; ∆ ctxt, where Γ is a list of distinct identifier declarations of value types and ∆ is a list of declarations of computation type (writing · for the empty list and Γ as a shorthand for Γ; ·), well-formedness of value types Γ ` A vtype and computation types Γ ` B ctype (sometimes underlined to be explicit), typing of values Γ `v V : A, computations Γ `c M : B and stacks Γ; ∆ `k K : B, equality judgements for contexts, types (in context) and (typed) terms (in context). As types can depend on terms in a dependently typed system, we define both in one inductive definition. A discussion of the syntactic subtleties of DTT can be found in [1]. 3 4 An Effectful Treatment of Dependent Types To start with, we have rules, which we shall not list, stating that all judgemental equalities are equivalence relations and that all term, type and context constructors as well as substitutions respect judgemental equality. In similar vein, we have conversion rules, stating that we may swap contexts and types for judgementally equal ones in all judgements. To form contexts, we have the rules of figure 1 and, to form types, those of figure 2. ` Γ; · ctxt Γ ` B ctype ` Γ; B ctxt ` Γ; ∆ ctxt Γ ` A vtype ` Γ, x : A; ∆ ctxt ·; · ctxt Figure 1 Rules for contexts of dCBPV, where x is assumed to be a fresh identifier. Γ, x : A, Γ0 ` A0 vtype Γ `v V : A Γ, Γ0 [V /x] ` A0 [V /x] vtype Γ ` B ctype Γ ` U B vtype Γ `v V : A Γ `v V 0 : A 0 Γ ` IdA (V, V ) vtype ` Γ ctxt Γ ` 1 vtype {Γ ` Ai vtype}1≤i≤n Γ ` Σ1≤i≤n Ai vtype Γ, x : A ` A0 vtype Γ ` Σx:A A0 vtype Γ, x : A, Γ0 ` B ctype Γ ` A vtype Γ ` F A ctype {Γ ` Bi ctype}1≤i≤n Γ, x : A ` B ctype Γ ` Πx:A B ctype Γ `v V : A Γ, Γ0 [V /x] ` B[V /x] ctype Γ ` Π1≤i≤n Bi ctype Figure 2 Rules for forming the types of dCBPV. For these types, we consider the values and computations formed using the rules of figure 3, to which we could add the obvious admissible weakening and exchange rules. ` Γ, x : A, Γ0 ctxt Γ, x : A, Γ0 `v x : A Γ, x : A, Γ0 `v/c R : B Γ `v V : A 0 Γ, Γ [V /x] ` Γ, z : U F A, Γ0 ` B ctype 0 Γ `c M : F A v/c let x be V in R : B[V /x] Γ, x : A, Γ0 [tr x/z] `c N : B[tr x/z] c Γ, Γ [thunk M/z] ` M to x in N : B[thunk M/z]. Γ `c M : B Γ ` thunk M : U B v Γ `v V : U B Γ `c force V : B Γ `v V : 1 ` Γ ctxt Γ `v hi : 1 Γ` Γ `v Vi : Ai Γ ` hi, Vi i : Σ1≤i≤n Ai Γ `v V : Σ1≤i≤n Ai Γ `v V1 : A1 Γ `v V2 : A2 [V1 /x] Γ `v hV1 , V2 i : Σx:A1 A2 Γ `v V : Σx:A1 A2 Γ `v V : A Γ `v refl V : IdA (V, V ) Γ `v V : IdA (V1 , V2 ) v v/c Γ `v/c R : B[hi/z] pm V as hi in R : B[V /z] {Γ, x : Ai `v/c Ri : B[hi, xi/z]}1≤i≤n Γ `v/c pm V as hi, xi in Ri : B[V /z] v/c Γ` v/c Γ` {Γ `c Mi : Bi }1≤i≤n Γ `c M : Π1≤i≤n Bi Γ `c λi Mi : Π1≤i≤n Bi Γ `c i‘M : Bi Γ, x : A1 , y : A2 `v/c R : B[hx, yi/z] pm V as hx, yi in R : B[V /z] Γ, x : A `v/c R : B[x/x0 , refl x/p] pm V as (refl x) in R : B[V1 /x, V2 /x0 , V /p] Γ, x : A `c M : B Γ `c λx M : Πx:A B Γ `v V : A Γ `c M : Πx:A B Γ `c V ‘M : B[V /x] Figure 3 Values and computations of dCBPV+. Those of dCBPV- are obtained by demanding the side condition that z is not free in Γ0 ; B in the rule for forming M to x in N . A rule involving `v/c is a shorthand for two rules: one with `v and one with `c in both the hypothesis and conclusion. Indices i are a slight abuse of notation: e.g. λi Mi is an abbreviation for λ(1,...,n) (M1 , . . . , Mn ). As anticipated by Levy [18], the only rule that requires care is that for forming a sequenced computation M to x in N . He suggested that z should not be free in the context Γ0 ; B. We call the resulting system with this restriction dCBPV- and the more permissive system where we drop this restriction and allow Kleisli extensions of dependent functions dCBPV+. We leave the discussion of stacks until section 6. M. Vákár 5 We generate judgemental equalities for values and computations through the rules of figure 4. Note that we are using extensional Id-types, in the sense of Id-types with an η-rule. This is only done for the aesthetics of the categorical semantics. They may not be suitable for an implementation, however, as they make type checking undecidable for the usual reasons [1]. The syntax and semantics can just as easily be adapted to intensional Id-types, the obvious choice to for an implementation. (return V ) to x in M = M [V /x] force thunk M = M M = M to x in return x V = thunk force V pm hi, V i as hi, xi in Ri = Ri [V /x] pm hi as hi in R = R R[V /z] = pm V as hi, xi in R[hi, xi/z] R[V /z] = pm V as hi in R[hi/z] pm hV, V 0 i as hx, yi in R = R[V /x, V 0 /y] R[V /z] = pm V as hx, yi in R[hx, yi/z] pm (refl V ) as (refl x) in R = R[V /x] i‘λj Mj = Mi R[V1 /x, V2 /y, V /z] = pm V as (refl w) in R[w/x, w/y, (refl w)/z] M = λi i‘M V ‘λx M = M [V /x] M = λx x‘M let x be V in R = R[V /x] (M to x in N ) to y in N 0 = M to x in (N to y in N 0 ) M to x in λi Ni = λi (M to x in Ni ) #x #x,y #w #x #x #y M to x in λy N = λy (M to x in N ) Figure 4 Equations of dCBPV. These should be read as equations of typed terms: we impose them if we can derive that both sides of the equation are terms of the same type (in context). We #x1 ,...,xn write = to indicate that for the equation to hold, the identifiers x1 , . . . , xn should, in both terms being equated, be replaced by fresh identifiers, in order to avoid unwanted variable bindings. Figures 5 and 6 show the natural candidate CBV- and CBN-translations of DTT with some of the usual connectives into dCBPV: we treat sums, projection products, pattern matching dependent products and unit types, dependent function types and identity types. We can define the translations for projection dependent products as we have for their simple relatives, if we add projection dependent products to dCBPV as is sketched in section 8. It turns out that without Kleisli extensions for dependent functions, the CBV-translation is not well-defined as it results in untypable terms. The CBN-translation is, but only if we restrict to the weak (non-dependent) elimination rules for Σ1≤i≤n -, 1-, Σ- and Idtypes, meaning that the type we are eliminating into does not depend on the type being eliminated from. One would expect the CBV-translation to factorise as a translation into a dependently typed version of Moggi’s monadic metalanguage without dependent Kleisli extensions, followed by a translation of this into dCBPV-. While the latter is definable, the former is ill-defined3 . Perhaps this is a (partial) explanation of why all (CBV) dependently typed languages with effects have encapsulated the effects in a monad. The exceptions are non-termination and recursion. As we shall see in section 6, dependent Kleisli extensions are straightforward in that case without imposing subtyping conditions, which means we can treat these as a first class effects and do not have to encapsulate them in a monad. It seems likely that one could obtain soundness and completeness results for these translations with respect to the correct equational theories for CBV- and CBN-DTT. As we are not aware of any such equational theories being described in literature, we propose to define these through their translations into dCBPV. Both translations might result in a broken η-law for Id-types, in presence of effects, even if we assume one in dCBPV. 3 Although, this may remind the reader of the situation of dependently typed dual intuitionistic linear logic (a comonadic language), where the Girard translation (essentially the CBN-translation) from DTT fails, we appear to be observing a qualitatively different phenomenon rather than a mere mirror image. 6 An Effectful Treatment of Dependent Types CBV type Γ ` A type CBPV type U F Γv ` Av vtype Σ1≤i≤n Ai Σ1≤i≤n Avi Π1≤i≤n Ai U Π1≤i≤n F Avi Πx:A A0 U (Πx:Av F A0v [tr x/z]) 1 1 Σx:A A0 Σx:Av A0v [tr x/z] IdA (M, N ) IdU F Av (thunk M v , thunk N v ) CBV term x1 : A1 , . . . , xm : Am `M :A x let x be M in N hi, M i pm M as hi, xi in Ni λi Mi i‘N λx M M ‘N hi pm M as hi in N hM, N i pm M as hx, yi in N refl M pm M as (refl x) in N CBPV term x1 : Av1 , . . . , xm : Avm [. . . tr xi /zi . . .] `c M v : F (Av [tr x1 /z1 , . . . , tr xn /zn ]) return x M v to x in N v M v to x in return hi, xi M v to z in (pm z as hi, xi in Niv ) return thunk (λi Miv ) N v to z in (i‘force z) return thunk λx M v M v to x in (N v to z in (x‘force z)) return hi M v to z in (pm z as hi in N v ) M v to x in (N v to y in return hx, yi) M v to z in (pm z as hx, yi in N v ) M v to z in return refl tr z M v to z in (pm z as (refl y) in (force y to x in N v )) Figure 5 A translation of dependently typed CBV into dCBPV. We write tr as an abbreviation for thunk return and U F Γ := z1 : U F A1 , . . . , zn : U F An for a context Γ = x1 : A1 , . . . , xn : An . CBN type Γ ` B type CBPV type U Γn ` B n ctype Σ1≤i≤n B i F Σ1≤i≤n U B n i Π1≤i≤n B i Π1≤i≤n B n i Πx:B B 0 Πx:U B n B 0 1 F1 Σx:B B 0 F (Σx:U B n U B 0 ) IdB (M, M 0 ) F (IdU B (thunk M n , thunk M 0n )) n n CBN term x1 : B 1 , . . . , x m : B m ` M : B x let x be M in N hi, M i pm M as hi, xi in Ni λ i Mi i‘M λx M N ‘M hi pm M as hi in N hM, N i pm M as hx, yi in N refl M pm M as (refl x) in N CBPV term n c n n x1 : U B n 1 , . . . , xm : U B m ` M : B force x let x be (thunk M n ) in N n return hi, thunk M n i M n to z in (pm z as hi, xi in Nin ) λi Min i‘M n λx M n (thunk N n )‘M n return hi M n to z in (pm z as hi in N n ) return hthunk M n , thunk N n i M n to z in (pm z as hx, yi in N n ) return refl thunk M n M n to z in (pm z as (refl x) in N n ) Figure 6 A translation of dependently typed CBN into dCBPV. We write U Γ := x1 : U A1 , . . . , xn : U An for a context Γ = x1 : A1 , . . . , xn : An . 4 Abstract Categorical Semantics We have reached the point in the story that was our initial motivation to study dCBPV: its very natural categorical semantics. To formulate our dCBPV models, we recall the notion of an indexed category with full and faithful democratic comprehension, which is equivalent to Jacobs’ notion of a split full democratic comprehension category with unit [22]. C I Definition 1 (Comprehension Axiom). Let B op −→ Cat be an indexed category (a functor f to the category Cat of small categories). Given B 0 −→ B in B, let us write the change of base functor C(B) −→ C(B 0 ) as −{f }. Recall that C satisfies the comprehension axiom if B has a terminal object · and all fibres C(B) have terminal objects 1B that are stable under change of base; M. Vákár 7 f the presheaves (B 0 −→ B) - C(B 0 )(1, C{f }) on B/B are representable: we have rephf,−i pB,C resenting objects B.C −→ B and natural bijections C(B 0 )(1, C{f }) −→ B/B(f, pB,C ). Write vB,C for the (universal) element of C(B.C)(1, C{pB,C }) corresponding to idpB,C . Define B.C diagB,C := hidB.C , vB,C i C(B)(C 0 , C) pB,− }i - B.C.C{pB,C }, B 0 .C{f } qf,C := hpB ,C{f } ; f, vB ,C{fB.C and := hpB,C 0 , vB,C 0 ; −{pB,C 0}i B/B(pB,C 0 , pB,C ). When these last maps pB,− 0 0 are full and faithful for all B, we call the comprehension full and faithful, respectively. When ∼ B, we call it democratic. the comprehension induces an equivalence C(·) = I Definition 2 (dCBPV- Model). By a dCBPV- model, we shall mean the following data. C An indexed category B op −→ Cat with full and faithful democratic comprehension; D An indexed category B op −→ Cat; An indexed adjunction F a U : D  C (adjunctions compatible with change of base); Π-types in D: right adjoints −{pA,B } a ΠB : D(A.B)  D(A) satisfying the right Beck-Chevalley condition (a technical condition, compatibility with substitution [22]); Finite products (Π1≤i≤n Di ) in the fibres of D, stable under change of base; Σ-types in C: objects ΣC D of C(B) such that pB,ΣC D = pB.C,D ; pB,C ; Id-types in C: objects IdC of C(B.C.C) such that pB.C.C,IdC = diagB,C ; 0, +-types in C: finite coproducts (Σ1≤i≤n Ci ) in the fibres of C, stable under change of base, such that the following canonical morphisms are bijections, for E ∈ {C, D}, E(C.Σ1≤i≤n Ci )(X, Y ) −→ Π1≤i≤n E(C.Ci )(X{pC,hi,idCi i }, Y {pC,hi,idCi i }); I Definition 3 (dCBPV+ Model). By a dCBPV+ model, we mean a dCBPV- model with (−)∗ specified maps C(Γ.A.Γ0 {pΓ,ηA })(1, U B{qpΓ,ηA ,Γ0 }) −→ C(Γ.U F A.Γ0 )(1, U B), called dependent Kleisli extensions, where η is the unit of F a U , such that (−)∗ agrees with the usual Kleisli extensions of F a U and is compatible with η and −{−} in the obvious sense. I Remark. Note that, for both notion of model, we retrieve (up to equivalence) Levy’s adjunction models for CBPV if we restrict to C = self(B), where self(B)(B)(B 0 , B 00 ) := B(B × B 0 , B 00 ), and D that are locally B-indexed in the sense that change of base is the identity on objects and we drop the requirement of identity types (which then corresponds to objects 1/B such that 1/B × B ∼ = 1). In particular, stability of the adjunction under change of base then implies the strength of the monad T = U F and stability of coproducts becomes distributivity. sA,B More generally, in a dCBPV- model, we can define a strength ΣA T B −→ T ΣA B, while a s0A,B tA,B costrength ΣT A B −→ T ΣA T B{pΓ,ηA } (hence a pairing ΣT A T B −→ T ΣA B{pΓ,ηA }) can only be defined in dCBPV+ models. This semantics is sound and complete. I Theorem 4 (dCBPV Semantics). We have a sound interpretation of dCBPV- in a dCBPVmodel and of dCBPV+ in a dCBPV+ model, where we also give the interpretation of the stack judgement of section 6 (together with the obvious interpretation of terms, e.g. interpreting M to x in N using Kleisli extensions, which we leave to the imagination of the reader): [[·]] = · [[Γ, x : A]] = [[Γ]].[[A]] [[Γ `v A]] = C([[Γ]])(1, [[A]]) [[Γ `c B]] = D([[Γ]])(F 1, [[B]]) [[Γ; B `k C]] = D([[Γ]])([[B]], [[C]]) [[A[V /x]]] = [[A]]{hhid[[Γ]] , [[V ]]i, id[[Γ0 [V /x]]] i} [[B[V /x]]] = [[B]]{hhid[[Γ]] , [[V ]]i, id[[Γ0 [V /x]]] i} [[IdA (V, V 0 )]] = Id[[A]] {hhid[[Γ]] , [[V ]]i, [[V 0 ]]i} [[Σ1≤i≤n Ai ]] = Σ1≤i≤n [[Ai ]] [[Σx:A A0 ]] = Σ[[A]] [[A0 ]] [[1]] = 1 [[Π1≤i≤n B i ]] = Π1≤i≤n [[B i ]] [[Πx:A B]] = Π[[A]] [[B]] [[F A]] = F [[A]] [[U B]] = U [[B]]. The interpretations in such categories are complete: an equality of values or computations holds in all interpretations iff it is provable in the syntax of dCBPV. In fact, if we add the obvious (admissible) weakening and exchange rules to dCBPV, the interpretation defines 8 An Effectful Treatment of Dependent Types an onto correspondence between categorical models and syntactic theories in dCBPV which satisfy mutual soundness and completeness results. This correspondence becomes 1-1 and we obtain completeness for the stack judgement if we include complex stacks. Proof (sketch). The proof goes almost entirely along the lines of the soundness and completeness proofs for linear DTT in [12]. For completeness result, we build a syntactic category, after conservatively extending our syntax with complex stacks as in [21]. J 5 Concrete Models We can first note that if we restrict to the identity adjunction, both dCBPV- and dCBPV+ reduce to a reformulation of Jacobs’ notion of a full split democratic comprehension category with Σ-, Σ1≤i≤n -, Π- and extensional Id-types, which is a standard notion of model of pure DTT [22]. An example is the usual families of sets model Fam(Set) of pure DTT. (Recall that Fam(Set) is defined as the restriction to Setop ⊆ Catop of the Cat-enriched hom-functor into Set.) In particular, this shows consistency of the calculi. I Theorem 5. Both dCBPV- and dCBPV+ are consistent. More interestingly, any model of linear DTT supporting the appropriate connectives [12, 13] gives rise to a model of dCBPV-, modelling commutative effects. I Theorem 6. The notion of a model given by [12] for the dependently typed linear-nonlinear logic of [16] with the additional connectives of finite additive disjunctions is precisely a dCBPV- model such that we have symmetric monoidal closed structures on the fibres of D, stable under change of base, s.t. F consists of strong monoidal functors (sending nullary and binary products in C to I and ⊗ in D) and which supports Σ⊗ F − -types (see section 8). By analogy with the simply typed case, models of DTT on which we have an indexed monad are again a source of dCBPV- models (indexing of the monad corresponding to a strength). C I Theorem 7. Let B op −→ Cat be a model of pure DTT (as above) on which we have an indexed monad T (a family of monads, stable under change of base). Then, the indexed Eilenberg-Moore adjunction C  C T gives a model of dCBPV-. Proof (sketch). As in the simply typed setting, a product of algebras is just the product of their carriers equipped with the obvious algebra structure. Indeed, it is a basic fact from category theory that the forgetful functor from the Eilenberg-Moore category creates limits. k Given an object T B −→ B of C T (Γ.A), we note that we also obtain a canonical T -algebra structure on Π-types of carriers (starting from the identity on ΠA B), our definition of ΠA k: T C(Γ)(ΠA B, ΠA B) ∼ = C(Γ.A)((ΠA B){pΓ,A }, B) −→ C(Γ.A)(T ((ΠA B){pΓ,A }), T B) −;k ∼ = C(Γ.A)((T ΠA B){pΓ,A }, T B) −→ C(Γ.A)((T ΠA B){pΓ,A }, B) ∼ = C(Γ)(T ΠA B, ΠA B). We leave the verification of the T -algebra axioms to the reader. J A concrete example to which we can apply the previous theorem is obtained for any monad T on Set. Indeed, we can lift T (pointwise) to an indexed monad on Fam(Set). In a different vein, given a model C of pure DTT, the usual exception, global state, reader, writer and continuation monads (which we form using objects of C(·)) give rise to indexed monads, hence we obtain models of dCBPV-. More exotic examples are the many indexed monads that arise from homotopy type theory, like truncation and cohesion (shape and sharp) M. Vákár modalities [26, 27, 28]. A caveat there is that the identity types are intensional and that many equations are often only assumed up to propositional rather than judgemental equality. Models of dCBPV+ are harder to come by. Not every dCBPV- model generated by theorem 7 admits dependent Kleisli extensions. Their existence needs to be assessed on a case-by-case basis. Moreover, one indexed monad might be given dependent Kleisli extensions in several inequivalent ways. Therefore, we treat some dCBPV- models for common effects and discuss the (im)possibility of dependent Kleisli extensions. Fortunately, the exceptions (and divergence) monads (−) + E on Set admit dependent Kleisli extensions, hence give rise to models of dCBPV+. Indeed, for a dependent function f ∈ Πa∈A B(a) + E, we can define f ∗ ∈ Πx∈A+E B(x) + E by setting f ∗ (a) := f (a) for a ∈ A and else f ∗ (e) := e. (Generally, it suffices to give dependent Kleisli extensions for B = F A0 .) Similarly, the domain semantics of DTT with recursion of [29] yields a model of dCBPV+ with intensional Id-types. C is defined to be an indexed category of continuous families of Scott predomains (disjoint unions of Scott domains) with continuous functions. Σ-types are interpreted as the usual set theoretic way and are endowed with the product order, Σ1≤i≤n -types are disjoint unions and IdA (x, y) := {z ∈ A | z ≤ x, y} with the induced order from A. D is defined to be the indexed category over the category of Scott predomains of continuous families of Scott domains with strict continuous functions. U is defined to be the usual inclusion, while F is the lift. ΠA B is defined to be the set of continuous sections pA,U B of ΣA U B −→ A with the pointwise order. We note that for f ∈ ΠA U B, we can define f ∗ (a) := f (a) for a ∈ A and f ∗ (⊥) = ⊥. By contrast, a non-trivial writer monad M × − (for a monoid M ) on Set does not admit dependent Kleisli extensions. Indeed, we could take B to be a predicate on M × A such that B(1M , a) = {∗} and otherwise B(m, a) = ∅ (which expresses that nothing is being written). ∗ ∈ Πa∈A B(1m , a) does not have a dependent Kleisli extension unless A = ∅. Similarly, a non-trivial reader monad (−)S on Set does not admit dependent Kleisli extensions. Indeed, we can define predicates B to specify that all s ∈ S yield the same value. An analogous argument applies to non-trivial global state monads (S × −)S on Set. − For a continuation monad R(R ) on Set, one would hope to define dependent Kleisli B(eva ) ) extensions for f ∈ Πa∈A R(R as f ∗ (t)(k) := t(λa f (a)(k)). However, this is only wellB(c,t) defined if we have ∀a∈A(c) R ⊆ RB(c,eva ) . In particular, we would have that B(c, evA ) = 0 B(c, evA0 ) for all a, a ∈ A(c). Somewhat dubiously, we can define dependent Kleisli extensions for the erratic choice S monad P on Set as f ∗ (t) := ( a∈t f (a)) ∩ B(t), for f ∈ Πa∈A PB(a). This might not correspond to the desired operational behaviour: indeed, non-deterministic branching is not accumulated if it contradicts typing. Many of the non-examples above of dCBPV+ models, could be mended by restricting the class of predicates we consider, which would involve passing to a less simplistic model of dependent types than mere families of sets. For example, for the writer monad, we want to demand for types B depending on M × A the inclusion B(1M , a) ⊆ B(m, a). We will see this idea reflected in the subject reduction property of the operational semantics of dCBPV+. 6 Operational Semantics Importantly, CBPV admits a natural operational semantics that, for ground terms, reproduces the usual operational semantics of CBV and CBN under the specified translations into CBPV [18]. This can easily be extended to dCBPV. We define the operational semantics on dCBPV terms not involving complex values which unnecessarily complicate the presentation of the operational semantics. Complex values are 9 10 An Effectful Treatment of Dependent Types defined to be values containing pm as in - and let be in -constructs. As the normalization of values do not produce effects, all reasonable evaluation strategies for them are observationally indistinguishable and we could choose our favourite. However, we may still want to allow complex values to occur in types, as this greatly increases the expressivity of our type system. To make sure we lose no expressive power while expressive power when excluding complex values, we add the rule of figure 7 to dCBPV. We note that this rule introduces no new terms to dCBPV, at least up to judgemental equality, as M to x in N = return V to x in N = let x be V in N . This means that it is invisible to the categorical semantics. It allows us to define the operational semantics for a wider range of terms, however. It allows us to eliminate complex values from computations (even at types built with complex values!). Γ `c M = return V : F A Γ, x : A, Γ0 `c N : B Γ, Γ0 [V /x] `c M to x in N : B[V /x] Figure 7 An extra rule to add to dCBPV which does not introduce any new terms. I Theorem 8 (Redundancy of Complex Values for Computations). For any dCBPV- or f : B (of dCBPV- or dCBPV+ computation Γ `c M : B, there is a computation Γ `c M f : B. dCBPV+, respectively) which does not contain complex values, such that Γ `c M = M Moreover, both the CBV- and CBN-translations only produce complex-value-free computations. We present a small-step operational semantics for (complex value-free) dCBPV computations in terms of a simple abstract machine that Levy calls the CK-machine. The configuration of such a machine consists of a pair M, K where Γ `c M : B is a complex value-free computation and Γ; B `k K : C is a compatible (simple) stack. We call C the type of the configuration. Stacks4 are formed according to the rules of figure 8. ` Γ; C ctxt k Γ; C ` nil : C Γ, x : A `c M : B k Γ; Bj `k K : C Γ; B `k K : C Γ; F A ` [·] to x in M :: K : C k Γ; Π1≤i≤n Bi ` j :: K : C Γ `v V : A Γ; B[V /x] `k K : C Γ; Πx:A B `k V :: K : C Figure 8 The rules for forming (simple) stacks. The initial configurations, transitions (which embody directed versions of the β-rules of our equational theory) and terminal configurations in the evaluation of a computation Γ `c M : C on the CK-machine are specified by figure 9. The operational semantics of dCBPV- and dCBPV+ satisfy the following basic properties. I Theorem 9 (Pure dCBPV Operational Properties). For every configuration of the CKmachine, at most one transition applies. No transition applies precisely when the configuration is terminal. Every configuration of type C reduces, in a finite number of transitions, to a unique terminal configuration of type C. Proof (sketch). The proof for dCBPV- is no different from the simply typed situation [18], as the transitions are defined on untyped configurations and are easily seen to preserve types. Note that types only depend on values, which never get reduced in our transitions. Only the subject reduction property for dCBPV+ requires some thought. Suppose we start from a configuration M, K with Γ `c M : B and Γ; B `k K : C. What could conceivably 4 To be precise, these are what Levy calls simple stacks [18]. Analogous to complex values, one can also conservatively extend the calculus with so-called complex stacks, e.g. by allowing pattern matching into stacks. This gives us a 1-1 correspondence between categorical models and syntactic theories. M. Vákár Initial Configuration M , nil Terminal Configurations return V , nil λi Mi , nil λx M , nil force z , K pm z as hi, xi in Mi , K pm z as hi in M , K pm z as hx, yi in M , K pm z as (refl x) in M , K 11 Transitions let V be x in M M to x in N return V force thunk M pm hj, V i as hi, xi in Mi pm hi as hi in M pm hV, W i as hx, yi in M pm (refl V ) as (refl x) in M j‘M λi Mi V ‘M λx M , , , , , , , , , , , , K K [·] to x in N :: K K K K K K K j :: K K V :: K M [V /x] M N [V /x] M Mj [V /x] M M [V /x, W/y] M [V /x] M Mj M M [V /x] , , , , , , , , , , , , K [·] to x in N :: K K K K K K K j :: K K V :: K K Figure 9 The behaviour of the CK-machine in the evaluation of a computation Γ `c M : C. happen during a transition is that the resulting configuration M 0 , K 0 can be given types Γ `c M 0 : B 0 and Γ0 ; B 00 `k K 0 : C, but not Γ ` B 0 = B 00 . The only transition that can possibly cause this problem is the one for initial computation return V (see figure 9). Indeed, what could have happened is that we started from a configuration M to x in N, K, with Γ `c M to x in N : B[thunk M/z], which transitions to M, [·] to x in N :: K. After this, we continue reducing M , until we end up in a configuration return V, [·] to x in N :: K. It is now critical when we apply one more transition (the dangerous one) that for the resulting configuration N [V /x], K we again have that Γ ` N [V /x] : B[thunk M/z], while we know that Γ ` N [V /x] : B[tr V /z]. This is indeed the case in pure dCBPV+, as all minimal sequences of transitions of the shape M, K M 0 , K just consist of an application of a directed version (left to right) of one of the judgemental equalities of figure 4, hence M = return V so Γ ` N [V /x] : B[thunk M/z]. J 7 Adding Effects We show by example how one adds effects to dCBPV, focussing on the operational semantics. Figure 10 gives examples of effects one could consider: divergence, recursion, printing elements m of some monoid M, erratic choice from finitely many alternatives, errors e from some set E, writing a global states s ∈ S and reading a global state to s. The framework fits many more examples like probabilistic erratic choice, local references and control operators [18]. Γ `c diverge : B Γ `c error e : B Γ, z : U B `c M : B Γ ` c µz M : B Γ `c M : B Γ `c print m . M : B {Γ `c Mi : B}1≤i≤n Γ `c choosei (Mi ) : B Γ `c M : B Γ `c write s . M : B {Γ `c Ms : B}s∈S Γ `c readtos (Ms ) : B Figure 10 Some examples of effects we could add to CBPV. For the operational semantics of printing and state, we need to add some hardware to our machine. Therefore, a configuration will now consist of a quadruple M, K, m, s where M, K are as before, m is an element of a printing monoid (M, , ∗) modelling some channel for output and s is an element of a finite pointed set of states (S, s0 ) holding the current value of our storage cell. We lift the operational semantics of all existing language constructs to this setting by specifying that they do not modify m and s, that terminal configurations can have any value of m and s and that initial configurations always have value m =  and s = s0 for the fixed initial state s0 . Figure 11 specifies the operational semantics for our effects. We extend the results of the previous section to this effectful setting. While we will have to add some extra rules to dCBPV+, dCBPV- satisfies theorem 10 without any further rules. 12 An Effectful Treatment of Dependent Types Transitions diverge µz M choosei (Mi ) print n . M write s0 . M readtos0 (Ms0 ) , , , , , , K K K K K K , , , , , , m m m m m m , , , , , , s s s s s s diverge M [thunk µz M/z] Mj M M Ms , , , , , , K K K K K K , , , , , , m m m m∗n m m , , , , , , s s s s s0 s Terminal Configurations error e , K , m , s Figure 11 The operational semantics for divergence, recursion, erratic choice, errors, printing and writing and reading global state. I Theorem 10 (Effectful dCBPV Operational Properties). Transitions respect the type of the configuration. None applies precisely if we are in a terminal configuration. In absence of erratic choice, at most one transition applies to each configuration. In absence of divergence and recursion, every configuration reduces to a terminal one in a finite number of steps. As highlighted by the proof of theorem 9, to guarantee subject reduction for dCBPV+, we again need to establish that for every transition M, K, m, s M 0 , K, m0 , s0 of figure 10, c 0 c Γ ` N : B[thunk M /z] implies that Γ ` N : B[thunk M/z]. A sufficient condition, would be to add equations M = M 0 . For divergence and errors, these equations would be vacuous, and for recursion, it gives us the usual equation µz M = M [thunk µz M/z]. For printing, erratic choice and global state, however, these equations are not reasonable to demand. Γ `c N : B[thunk M 0 /z] Instead, for these effects, we suggest to add explicitly the rules . c 0 Γ ` N : B[thunk (M )/z] Specifically, we see that a computation type in which we substitute (the thunk of) a computation with multiple branches (erratic choice, reading state) has to contain each of the types obtained by substituting any of the branches instead. Similarly, a type in which we substitute (the thunk of) a computation which writes (printing, writing a state) and then performs a computation M has to contain the type obtained by just substituting M . In short: a type can only shrink as the computation unfolds. As anticipated, these rules restore the subject reduction property for effectful dCBPV+ and make theorem 10 hold for it too. We can extend the CBV- and CBN-translations to the effectful setting following figure 12. By analogy with the simply typed situation, this should induce the expected operational semantics, at least for terms of ground type, although we are not aware of such an operational semantics ever being outlined in literature. CBV Term M op(M1 , . . . , Mm ) µx M CBPV Term M v v op(M1v , . . . , Mm ) µz (force z to x in M v ) CBN Term M op(M1 , . . . , Mm ) µz M CBPV Term M n n op(M1n , . . . , Mm ) n µz M Figure 12 The CBV- and CBN-translations for effectful terms. Here, we treat all algebraic effects (in particular, divergence, errors, erratic choice, printing and global state) uniformly by letting op range over their operations. z is assumed to be fresh in the CBV-translation µx M . I Remark (Type Checking). One could argue that a type checker is as important an operational aspect to the implementation of a DTT as a small-step semantics. We leave the description of a type checking algorithm to future work. We note that the core step in the implementation of a type checker is a normalization algorithm for directed versions (from left to right) of the judgemental equalities, as this would give us a normalization procedure for types. We hope to be able to construct such an algorithm for dCBPV- using normalization by evaluation by combining the techniques of [30] and [31]. Our hope is that this will lead to a proof of decidable type checking of the system at least in absence of the η-law for Id-types and without recursion. We note that the complexity of a type checking algorithm can vary widely M. Vákár 13 depending on which equations we include for effects. The idea is that one only includes a basic set of program equations (perhaps including algebraicity equations for effects) as judgemental equalities to be able to decide type checking and to postulate other equations (like the Plotkin-Power equations for state) as propositional equalities, which can be used for manual or tactic-aided reasoning about effectful programs. Type checking for effectful dCBPV+ seems more challenging, as the system essentially features a form of subtyping. 8 More Connectives? We very briefly outline how to add more connectives to dCBPV. A first class of connectives we consider are projection dependent products, or Σ-types on computations. Given a context Γ, z1 : U B1 , . . . , zn : U Bn , we can form these types Γ ` Πdep 1≤i≤n Bi ctype and we construct and destruct their terms using the rules of figure 13. {Γ `c Mi : Bi [thunk M1 /z1 , . . . , thunk Mi−1 /zi−1 ]}1≤i≤n c Γ ` λi Mi : Πdep 1≤i≤n Bi Γ `c M : Πdep 1≤i≤n Bi c Γ ` i‘M : Bi [thunk 1‘M/z1 , . . . , thunk (i − 1)‘M/zi−1 ] Figure 13 Rules for projection dependent products, to which we add the obvious β- and η-laws. Their categorical semantics corresponds to having strong n-ary Σ-types in D in the sense of objects Πdep 1≤i≤n Bi such that pΓ,U Πdep Bi = pΓ.U B1 .··· .U Bn−1 ,U Bn ; . . . ; pΓ,U B1 . In particular, 1≤i≤n ∼ we see that U Πdep 1≤i≤2 B i = ΣU B 1 U B 2 . Similarly, we can define equivalents of the other positive connectives R like Σ1≤i≤n - and Id-types on computation types in the sense of connectives R0 (B 1 , . . . , B n ) such that U R0 (B 1 , . . . , B n ) ∼ = R(U B 1 , . . . , U B n ). These correspond to e.g. additive Σ- and Id-types in linear DTT. In all cases, we give an operational semantics where destructors push to the stack and constructors pop the stack and substitute. Another connective from linear DTT that generalizes to dCBPV is the multiplicative Σ-type Γ ` Σ⊗ F A B ctype, for Γ, x : A ` B ctype. These type formers are dependently typed generalizations of the F (−) ⊗ −-connective of the EEC (there written !(−) ⊗ −). Their categorical semantics, as in linear DTT, is given by left adjoint functors Σ⊗ F A a −{pΓ,A } to change of base in D, satisfying the left Beck-Chevalley condition. In particular, they satisfy the equation F ΣA A0 ∼ = ΣF A F A0 . Finally, to build a practically useful system, strong type forming mechanisms like inductive families and induction-recursion (including universes) should probably be added to dCBPV as constructions on value types. While it seems believable that we then still get a CBVand CBN-translation in dCBPV+ for inductive families, the situation for universes is less straightforward. Another question is if such translations are desirable or if we are better off working with the simpler system dCBPV- in the first place. 9 Future Work In this paper, we gave an extension to the realm of dependent types of Levy’s CBPV analysis of CBV- and CBN-λ-calculi. We hope, one the one hand, that this can shed some light on the theoretical puzzle of how the relationship between effects and dependent types can be understood. On the other hand, we hope it can provide some guidance in the daunting but worthwhile challenge of combining dependent types with effects in a system which is simultaneously mathematically elegant and practically useful for writing certified real world software. To further achieve these two goals, we have the following future work in mind. A first priority is the implementation of a type checker for dCBPV- (and perhaps dCBPV+). A second question to be addressed is what needs to be done to make dCBPV into 14 An Effectful Treatment of Dependent Types a practically useful language for certified effectful programming. Does dCBPV- suffice for this or do we need to turn to dCBPV+? Thirdly, the recent CBN game semantics for DTT of [32], which can be extended to model recursion, local ground store and control operators, should give rise to a model of dCBPV+. Fourthly, we want to investigate if the CBV- and CBN-translations into dCBPV+ extend to more expressive type forming mechanisms like inductive families and inductive-recursive definitions like type universes. In particular, we hope this will lead to a better understanding of the rather enigmatic nature of CBV-type dependency. Finally, it remains to be seen what the status is of subject reduction in dCBPV+ in presence of other effects like control operators, local state and general references. We hope the game semantics of DTT can be of use here. Related Work This paper is based on the preprint [25], which provides more context, proofs and discussion. Since this appeared, independent work by Ahman, Ghani and Plotkin [33] has been made public which partly overlaps with sections 3 and 4 of this paper. It describes a dependently typed EEC, closely related to dCBPV- extended with complex stacks and Σ⊗ F −types, and its categorical semantics which - modulo details - is a fibrational reformulation of our semantics for this calculus. Additionally, our sections 3 and 4 consider a more expressive calculus dCBPV+ where we can substitute effectful computations in dependent functions. This allows us to define CBV- and CBN-translations into it. Also relevant is the work on linear [16, 13] and polarised [20] DTT and on domain and game semantics for DTT [29, 32]. Acknowledgements I want to thank Tim Zakian, Alex Kavvos and Sam Staton for many interesting discussions and Paul Blain Levy for his explanations. I am grateful to Samson Abramsky for his support. The author is funded by the EPSRC and the Clarendon Fund. References 1 2 3 4 5 6 7 8 9 10 Martin Hofmann. Extensional Constructs in Intensional Type Theory. Springer, 1997. The Coq development team. The Coq proof assistant reference manual. LogiCal Project, 2004. Version 8.0. Ulf Norell. Towards a practical programming language based on dependent type theory, volume 32. Chalmers University of Technology, 2007. Lennart Augustsson. Cayenne — a language with dependent types. In ACM SIGPLAN Notices, volume 34, pages 239–250. ACM, 1998. Thorsten Altenkirch, Nils Anders Danielsson, Andres Löh, and Nicolas Oury. πσ: Dependent types without the sugar. In Functional and Logic Programming, pages 40–55. Springer Berlin Heidelberg, 2010. Chris Casinghino, Vilhelm Sjöberg, and Stephanie Weirich. Combining proofs and programs in a dependently typed language. ACM SIGPLAN Notices, 49(1):33–45, 2014. Edwin Brady. Idris, a general-purpose dependently typed programming language: Design and implementation. Journal of Functional Programming, 23(05):552–593, 2013. Hongwei Xi and Frank Pfenning. Dependent types in practical programming. In Proceedings of the 26th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 214–227. ACM, 1999. Nikhil Swamy, Catalin Hritcu, Chantal Keller, Aseem Rastogi, Antoine Delignat-Lavaud, Simon Forest, Karthikeyan Bhargavan, Cédric Fournet, Pierre-Yves Strub, Markulf Kohlweiss, et al. Dependent types and multi-monadic effects in f*, 2015. Aleksandar Nanevski, Greg Morrisett, and Lars Birkedal. Polymorphism and separation in hoare type theory. In ACM SIGPLAN Notices, volume 41, pages 62–73. ACM, 2006. M. Vákár 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 Iliano Cervesato and Frank Pfenning. A linear logical framework. In LICS’96. Proceedings., pages 264–275. IEEE, 1996. Matthijs Vákár. Syntax and semantics of linear dependent types. arXiv preprint arXiv:1405.0033, 2014. Matthijs Vákár. A categorical semantics for linear logical frameworks. pages 102–116, 2015. P Nick Benton. A mixed linear and non-linear logic: Proofs, terms and models. In Computer Science Logic, pages 121–135. Springer, 1995. Andrew Barber and Gordon Plotkin. Dual intuitionistic linear logic. University of Edinburgh, Department of Computer Science, 1996. Neelakantan R Krishnaswami, Pierre Pradic, and Nick Benton. Integrating linear and dependent types. In Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 17–30. ACM, 2015. Eugenio Moggi. Notions of computation and monads. Information and computation, 93(1):55–92, 1991. Paul Blain Levy. Call-by-push-value: A Functional/imperative Synthesis, volume 2. Springer Science & Business Media, 2012. Nick Benton and Philip Wadler. Linear logic, monads and the lambda calculus. In Logic in Computer Science, 1996. LICS’96. Proceedings., Eleventh Annual IEEE Symposium on, pages 420–431. IEEE, 1996. Daniel R Licata and Robert Harper. Positively dependent types. In Proceedings of the 3rd workshop on Programming languages meets program verification, pages 3–14. ACM, 2009. Paul Blain Levy. Adjunction models for call-by-push-value with stacks. Theory and Applications of Categories, 14(5):75–110, 2005. Bart Jacobs. Comprehension categories and the semantics of type dependency. Theoretical Computer Science, 107(2):169–207, 1993. Jeff Egger, Rasmus Ejlers Møgelberg, and Alex Simpson. Enriching an effect calculus with linear types. In CSL, volume 5771, pages 240–254. Springer, 2009. Paul Blain Levy. Call-by-push-value: Decomposing call-by-value and call-by-name. HigherOrder and Symbolic Computation, 19(4):377–414, 2006. Matthijs Vákár. A framework for dependent types and effects. arXiv preprint arXiv:1512.08009, 2015. U HoTTbaki. Homotopy Type Theory: Univalent Foundations of Mathematics. http://homotopytypetheory.org/book, Institute for Advanced Study, 2013. Michael Shulman. Brouwer’s fixed-point theorem in real-cohesive homotopy type theory. arXiv preprint arXiv:1509.07584, 2015. Urs Schreiber and Michael Shulman. Quantum gauge field theory in cohesive homotopy type theory. arXiv preprint arXiv:1408.0054, 2014. Erik Palmgren and Viggo Stoltenberg-Hansen. Domain interpretations of Martin-Löf’s partial type theory. Annals of Pure and Applied Logic, 48(2):135–196, 1990. Andreas Abel, Klaus Aehlig, and Peter Dybjer. Normalization by evaluation for martin-löf type theory with one universe. Electronic Notes in Theoretical Computer Science, 173:17– 39, 2007. Danel Ahman and Sam Staton. Normalization by evaluation and algebraic effects. Electronic Notes in Theoretical Computer Science, 298:51–69, 2013. Samson Abramsky, Radha Jagadeesan, and Matthijs Vákár. Games for dependent types. In Automata, Languages, and Programming, pages 31–43. Springer, 2015. Danel Ahman, Neil Ghani, and Gordon Plotkin. Dependent types and fibred computational effects. Springer, 2016. To appear in Foundations of Software Science and Computation Structures, available at http://homepages.inf.ed.ac.uk/s1225336/. 15
6cs.PL
ANGULAR ACCURACY OF STEERABLE FEATURE DETECTORS 1 Angular Accuracy of Steerable Feature Detectors arXiv:1710.03631v1 [cs.IT] 10 Oct 2017 Zsuzsanna Püspöki, Arash Amini, Julien Fageot, John Paul Ward, and Michael Unser, Fellow, IEEE Abstract— The detection of landmarks or patterns is of interest for extracting features in biological images. Hence, algorithms for finding these keypoints have been extensively investigated in the literature, and their localization and detection properties are well known. In this paper, we study the complementary topic of local orientation estimation, which has not received similar attention. Simply stated, the problem that we address is the following: estimate the angle of rotation of a pattern with steerable filters centered at the same location, where the image is corrupted by colored isotropic Gaussian noise. For this problem, we use a statistical framework based on the Cramér-Rao lower bound (CRLB) that sets a fundamental limit on the accuracy of the corresponding class of estimators. We propose a scheme to measure the performance of estimators based on steerable filters (as a lower bound), while considering the connection to maximum likelihood estimation. Beyond the general results, we analyze the asymptotic behaviour of the lower bound in terms of the order of steerablility and propose an optimal subset of components that minimizes the bound. We define a mechanism for selecting optimal subspaces of the span of the detectors. These are characterized by the most relevant angular frequencies. Finally, we project our template to a basis of steerable functions and experimentally show that the prediction accuracy achieves the predicted CRLB. As an extension, we also consider steerable wavelet detectors. Index Terms—Cramér-Rao lower bounds, estimation of orientation, steerable filters, steerable wavelets I. I NTRODUCTION Steerable feature detectors [1] are popular tools for the quantitative analysis of images where the information that corresponds to the notions of rotation, directionality, and orientation is a key component. Their application area is continuously growing: from nano to macro, from biomedical imaging [2] to astronomy [3], from material sciences [4] to aerial and satellite imaging [5], and so on. The analysis of local directional patterns also includes the detection of ridges and junctions of any order; applications can be found in [6]– [10]. Typically, concerning steerable detectors, a two-step algorithm is used for identifying features of interest and determine their orientation. The first step is to find their location in an image. Then, the second step is to steer the detector centred The research leading to these results has received funding from the European Research Council under the European Union’s Seventh Framework Programme (FP7/2007-2013) ERC grant agreement N°267439 and the Hasler Foundation. Z. Püspöki, J. Fageot and M. Unser are with the Biomedical Imaging Group, École polytechnique fédérale de Lausanne (EPFL), Station 17, CH– 1015 Lausanne VD, Switzerland. A. Amini is with the department of Electrical Engineering and Advanced Communications Research Institute (ACRI), Sharif University of Technology, Tehran, Iran. J.P. Ward contributed to this work while affiliated each of the following: Department of Mathematics, University of Central Florida, Orlando, FL 32816, USA and Department of Mathematics, North Carolina A&T State University, Greensboro, NC 27411, USA. at the given keypoints to identify their exact orientation. In this paper, we focus on the second step only, studying the problem of extracting the local orientation of patterns in images. These local patterns, in particular, include junctions or crossing points with N -fold angular symmetry of any order. In this paper, we examine the behavior of steerable filters in orientation detection, providing a lower bound on the performance of any detector that is in the span of a given family of steerable functions. In particular, we focus on steerable filters that are linear combinations of circular harmonics with given radial profiles. We formulate the problem in a statistical framework using the Cramér-Rao lower bound (CRLB) that gives a limit on the error of the estimation. We investigate the connection to maximum likelihood estimation and show that, under some assumptions, our measurement functions correspond to the maximum likelihood estimator. We define the best subset of harmonics as the one that minimizes the CRLB for a given class of detectors and we provide a criterion for obtaining it. We also analyze the asymptotic behaviour of the lower bound in terms of the number of harmonics. This gives a theoretical limit on the precision of the estimation one can obtain with a given class of estimators. We experimentally show that the actual performance of the given steerable detectors follows the predicted theoretical bounds. A. State of the Art Classical methods to detect orientations are based on gradient information (e.g., Canny edge detector [11]), on directional derivatives [8], and on the structure tensor [12]. Variations of the latter method can be found in [13] and [14]. To capture higher-order directional structures, the Hessian and higherorder derivatives can be used [15], [16]. While simple and computationally efficient, these methods have drawbacks: they only take into account one specific scale and the estimation of the orientation can be overly sensitive to noise. Alternatively, directional pattern matching is also commonly used. It often relies on the discretization of the orientation and thus demands a tradeoff between accurate results and computational cost. An important exception to this are the steerable filters, where one may perform arbitrary (continuous) rotations and optimizations with a substantially reduced computational overhead. The basics of steerability were formulated by Freeman and Adelson in the early nineties [17] and developed further by Perona [18], Portilla and Simoncelli [19], and Ward and Unser [20]. Applications of steerable filters were presented in [21]–[23]. In [24], multisteerable filters were designed and adjusted to the patterns of interest to determine the precise angular distribution of coinciding branches. There, the detection and classification of polarseparable patterns (including junctions) rely on a classical 2 ANGULAR ACCURACY OF STEERABLE FEATURE DETECTORS structure-tensor scheme, complemented by the multisteerable filters. The authors are not aware of any previous studies that thoroughly address the angular accuracy of steerable feature detectors. Over the past decades, multiresolution methods have attracted a lot of interest. In particular, the design of directional wavelets has become a popular way to construct robust filters. This approach has made it possible to process oriented features independently at different scales. In [25], Unser and Chenouard proposed a unifying parametric framework for 2D steerable wavelet transforms. The goal of [25] was to combine steerability with tight wavelet frames and propose a general scheme to design such wavelets. In [26] and [27], the authors designed wavelets that can serve as a basis to detect features such as junctions and local symmetry points. An application of steerable wavelets for texture learning was presented in [28]. Here, steerable templates are represented in the Fourier domain using circular harmonics. The order of the detector is given by the number of harmonics, which also affects the performance of the detection. B. Roadmap The paper is organized as follows: In Section II-B, we provide a description of our directional pattern model and formulate the estimation problem. In Section II-C, we discuss our estimation strategy and propose a reference class of estimators. In Section II-D, we identify the probability law of the measurement vector and introduce the Cramér-Rao lower bound (CRLB). In Section II-E, we consider the connection to maximum likelihood estimation. In Section III, we provide the CRLB for orientation estimation based on steerable filters. We consider the case when the number of angular frequencies is finite (Section III-A) and also the asymptotic case for a fixed radial profile (Section III-C). In Section III-B, we examine the question of how to choose the best subset of harmonics to achieve the lowest CRLB. Section IV contains experiments related to the CRLB. In Section V, we extend our results to wavelets. II. T HE E STIMATION P ROBLEM AT A G LANCE A. Notations We use f (x) with x ∈ R2 and f (r, θ) with r ∈ R+ , θ ∈ [0, 2π) to denote the Cartesian and polar representations of the same 2D function f , respectively. Corresponding notations in the Fourier domain are fˆ(ω) and fˆ(ω, ϕ) with ω ∈ R2 and ω ∈ R+ , ϕ ∈ [0, 2π). The Fourier transform of  a Lebesgue integrable, finite-energy function f ∈ L1 R2 ∩ L2 R2 is denoted by F{f } = fˆ and computed according to Z fˆ(ω) = f (x)e−jhx,ωi dx, (1) R2 where hx, ωi = x1 ω1 + x2 ω2 is the usual scalar product on R2 . The 2D matrix of rotation by θ0 is denoted by   cos(θ0 ) − sin(θ0 ) Rθ 0 = . (2) sin(θ0 ) cos(θ0 ) TABLE I C ONSTRUCTION OF MEASUREMENT FUNCTIONS . qα Conventional detector α=n∈Z Wavelet detector α = (n, i) ∈ Z2 General detector α ∈ Zd radial profile harmonics ξ̂n (ω) = ĥ(ω) fixed ejnθ ξ̂(n,i) (ω) = 2i ĥ(2i ω) fixed ejnθ ξ̂α (ω) = ĥ(ω) adaptive ejnα θ B. The Estimation Problem Our interest in this paper lies in detecting a rotated pattern J(x) from a noisy signal of the form I(x) = J(R−θ∗ (x − x0 )) + S(x) (3) using a steerable filter bank. Here, J denotes the general shape of the pattern of interest and J(R−θ∗ (x − x0 )) its rotated version around location x0 with an unknown angle θ∗ . S is the background signal, modeled as the realization of an isotropic Gaussian self-similar random field. The motivation behind this choice is that the power spectrum of many natural images is isotropic with an 1/kωkγ type of decay, which is consistent with long-range dependencies [29], [30]. Also, this model of background signal fits fluorescence microscopy images well [31], which is relevant to many practical applications of orientation-estimation methods. Further details on our noise model are given in Appendix A. We shall perform the correlations between measurement filters and the image I in a sliding fashion, and we are interested in determining the performance of this detection method in terms of angular accuracy. To that end, we shall only examine the position where the detector hits the target. Thus, without loss of generality, we set x0 = 0 in (3). We analyze the image I through a family of measurement filters ξα parameterized by a (multi)-index α. The measurements at location x0 = 0 are then given by qα = hI, ξα i = hJ(R−θ∗ ·), ξα i + hS, ξα i. (4) We also set uα = hJ, ξα i and sα = hS, ξα i. We distinguish three different cases related to the construction of qα with ξˆα (ω) = ĥα (ω)ejnα ϕ (cf. Table I). In this paper, we address the question of angular accuracy of measurement filters constructed as conventional as well as wavelet detectors. The local orientation angle θ∗ is estimated from the vector of measurements q = (qα ). Any estimator based on this framework is then a mapping E that takes the measurements q and returns an estimate θ̃ of θ∗ . C. Steerable Filterbanks and Estimation Strategy We perform the estimation of the unknown angle θ∗ by selecting a suitable filter ξ that is a linear combination of the measurement filters ξα , and by selecting θ̃ as the solution of θ̃ = argmaxθ0 ∈[0,2π) hI, ξ(Rθ0 ·)i . (5) In order to define an estimator that meets the requirements of Section II-B, ξ needs to satisfy three properties. PÜSPÖKI, AMINI, FAGEOT, WARD, AND UNSER • • • 3 The filter ξ has to be a good approximation of the pattern of interest J, with the consequence that (5) corresponds to the detection of this pattern at the correct orientation. We note that angular (quasi) symmetries in J might lead to mis-detection of the angle. The filter ξ has to be robust to the background signal S, such that the estimation θ̃ mostly depends on the pattern J. The estimator θ̃ in (5) should be computable only based on the knowledge of the measurements (qα ). We now identify the filters ξα and ξ that allow us to achieve these three goals. To do so, we rely on steerable filters. We briefly introduce the concepts of steerability and refer the reader to Appendix B for more details. We consider filters ξα ∈ L2 (R2 ) that are polar-separable and have the form ξα (r, θ) = ηα (r)ejnα θ (6) with ηα the radial profile and nα ∈ Z the harmonic of ξα . We assume that ξα is normalized such that kξα k2 = 1. The polar separability of the ξα ’s implies that ∞ 2π dθ ηα (r)ηβ (r)rdr ej(nα −nβ )θ 2π 0 0 Z ∞ = δ[nα − nβ ] ηα (r)ηβ (r)rdr Z Z hξα , ξβ i = (7) 0 with δ[·] the Kronecker delta. This shows that the system (ξα ) is orthonormal when the nα are all distinct. The measurement function ξα being polar-separable, its Fourier transform is also polar-separable as ξˆα (ω, ϕ) = ĥα (ω)ejnα ϕ . (8) The function ĥα is related to ηα and nα by the Hankel transform (see, e.g., [26, Proposition 2]). We remark that the rotated version of ξα satisfies ξα (Rθ0 x) = ξα (r, θ + θ0 ) = ejnα θ0 ξα (x), (9) and is therefore steerable in the sense of Definition P 1 in Appendix B. We then select a filter of the form ξ = α cα ξα , where the vector c = (cα ) determines the shape of the filter. The way of selecting c adequately is discussed in Proposition 1. Hence, ξ is the best possible filter for the pattern J in the mean-square sense, once the measurement functions are given. As a linear combination of steerable filters (see (9)), the filter ξ is steerable with ξ(Rθ0 x) = X cα e jnα θ0 ξα (x). (10) α This means that it is sufficient to apply the filtering with ξα only once. Then, the rotated filter for any arbitrary angle can be determined by a systematic and linear transformation of the initial basis filters. D. The Law of Measurement Vector and the Cramér-Rao Lower Bound We aim at evaluating the performance of the estimators of θ∗ depending on the measurement vectors q = (qα ). In this section, we only consider estimators θ̃ = θ̃(q) that are unbiaised; that is, E[θ̃(q)] = θ∗ . (11) The performance of the estimator is then measured by the mean-square error E[(θ̃(q) − θ∗ )2 ]. (12) As is well-known, there is a theoretical bound for the mean-square error that cannot be surpassed by an unbiaised estimator, called the Cramer-Rao lower bound (CRLB). The latter is given by (see [32]) E[(θ̃(q) − θ∗ )2 ] ≥ 1/FI(θ∗ ) = CRLB(θ∗ ), (13) where FI(θ∗ ) is the Fisher information of the measurement vector q. In Theorem 1, we provide the mean vector, the covariance matrix and the Gaussian measurement vector and deduce its Fisher information. We recall here that the measurement filters ξα are polar-separable of the form (6). Theorem 1. Consider measurement filters of the form (6). We assume that the ξα are such that Z ∞ ω 1−2γ |ĥα (ω)|2 dω < ∞, (14) 0 where the ĥα are defined in (8). Then, the measurement vector q is Gaussian with mean vector   ∗ µ = µ(θ∗ ) = ejnα θ hJ, ξα i (15) α and covariance matrix  Z C = δ[nα − nβ ] 0 ∞ ω 1−2γ  ĥα (ω)ĥβ (ω)dω , (16) α,β where the hα are given in (8) and γ is the order of the whitening operator of S. The Fisher information is then !  H dµ ∗ −1 dµ FI(θ ) = 2Re C , (17) dθ∗ dθ∗ where xH = (x∗ )T is the Hermitian transpose of x. The proof of Theorem 1 is postponed to Appendix C. The condition (14) is necessary to make the problem wellposed, because hS, ξα i is well-defined under this condition. It is related to the existence of vanishing moments for ξα (see Appendix A). It is important to notice that the mean µ(θ∗ ) of q depends on θ∗ , while the covariance C does not. This is due to the assumption that the background signal is statistically isotropic. 4 ANGULAR ACCURACY OF STEERABLE FEATURE DETECTORS E. Maximum Likelihood Estimator In this paper, we consider estimators ofPthe form (5), where ξ is a steerable filter given by ξ = α cα ξα . We show here that, under some assumptions, this corresponds to the maximum likelihood estimator for an adequate choice of the cα . More precisely, one selects the cα such that ξ corresponds to the orthogonal projection of the pattern J to the basis filters (ξα ). Proposition 1. We assume that the filters ξα have distinct harmonics (nα 6= nβ for α 6= β) and identical radial profile (ηα = η for every α). Then, the maximum likelihood estimator θMLE = argmax P(q|θ0 ) and, in the Fourier domain, (19) We recall that for n 6= m, ξn and ξm are orthogonal, due to the orthogonality of their angular factors (see (7)). Moreover, we have that, for a real image I, Proof. According to Theorem 1, conditionally to θ∗ = θ0 , the vector q is Gaussian with mean µ(θ0 ) and co-variance matrix C. Therefore, P(q|θ0 ) is proportional to exp(− 21 (q − µ(θ0 ))H C−1 (q − µ(θ0 )). Hence, (20) (25) q−n = hI, ξ−n i = hI, ξn i = hI, ξn i = qn , The harmonics of the ξα being distinct, C is diagonal. Moreover, C[nα , nα ] depends only on ηα = η, and is therefore independent of α. This means that θMLE = argmin (q − µ(θ0 ))H (q − µ(θ0 )). (21) θ0 ∈[0,2π) One can develop this latter We remark that q H q P expression. 2 and µ(θ0 )H µ(θ0 ) = hJ, ξ i are independent of θ0 . α α Therefore, we have finally, θ0 ∈[0,2π) X qα hJ, ξα iejnα θ0 . (22) θ0 ∈[0,2π) α Moreover, recalling that qα = hI, ξα i, we can rewrite (5) as * + X jnα θ0 θ̃ = argmax I, cα e ξα θ0 ∈[0,2π) (27) We further exclude n = 0 from consideration since the corresponding measurement does not depend on the rotation angle θ∗ . We remark that the correlation matrix C in (16) is diagonal due to the distinct nature of the harmonics. As a consequence, the CRLB does not depend on θ∗ , as is easily deduced from Proposition 1. We now calculate the CRLB for estimating the angle θ∗ of the pattern in (3). Theorem 2. For measurements using distinct harmonics n ∈ H, the exact form of the CRLB is θMLE = argmin (−2q H µ(θ0 )) = argmax (26) where we used the fact that ηn is real. Thus, q−n and qn essentially carry the same information, so that the CRLB based on qn , n ∈ H, is the same as the CRLB based on qn with harmonics n in the set H+ = {|n| : n ∈ H} . θ0 ∈[0,2π) = argmax In this section, we derive the CRLB in cases where the measurement functions defined in (6) have distinct harmonics nα . So that nα = n, we shall consequently index the measurement functions directly by their harmonics n ∈ H, where H ⊂ Z is the set of all used harmonics. Specifically, we write ξn (r, θ) = ηn (r)ejnθ (24) ξˆn (ω, ϕ) = ĥn (ω)ejnϕ . α θMLE = argmin (q − µ(θ0 ))H C−1 (q − µ(θ0 )). A. The Cramér-Rao Lower Bound (18) θ0 ∈[0,2π) of the image model (3) coincides with (5) with X ξ= hJ, ξα iξα . III. C RAM ÉR -R AO L OWER B OUND FOR AN E STIMATION WITH D ISTINCT H ARMONICS σ02 /4π CRLB = P n∈H+ R∞ 0 n2 |un |2 2 |ĥn (ω)| dω , (28) ω 1−2γ where we recall that un = hJ, ξn i. The proof of Theorem 2 is given in Appendix D. α X qα cα ejnα θ0 , (23) θ0 ∈[0,2π) α Hence, θ̃ = θMLE as soon as cα = hJ, ξα i, as expected. The angle θ̃ in (23) is numerically computed with standard optimization techniques or, simply, with a grid search. Finally, θ̃ is an estimator of the form (5), which depends only on the measurements qα , and is based on the steerable filter ξ that provides the best approximation of the pattern J in span {ξα }. We shall now use the CRLB (13) together with the Fisher information (17) to evaluate the optimal performance achievable by an unbiaised estimator. We shall give there empirical evidence that the proposed estimator θ̃ = θMLE is unbiaised and show that it empirically achieves the CRLB in simulations. B. Conventional Detector: Estimation From Best N Measurements In the case of conventional detectors, one chooses the same radial pattern ĥ for all measurement functions [25], which results in ξˆn (ω, ϕ) = ĥ(ω)ejnϕ . (29) This radial component is typically band-pass, given its vanishing moments and finite energy. In practice, the choice of the radial profile (bandpass filter ĥ) specifies the scale of the detector. Now we address the question of selecting the best steerable subspace for specifying our steerable matched-filter detector. Suppose we have at our disposal the finite number N of PÜSPÖKI, AMINI, FAGEOT, WARD, AND UNSER harmonics (i.e., a finite number of measurements). It is then natural to ask which harmonics to consider to reduce the CRLB as much as possible. This is obtained after an immediate corollary of Theorem 2. Corollary 1. The CRLB for the estimation problem in the case of a single common radial profile is Z 2 σ02 ∞ 1−2γ 1 ω ĥ(ω) dω. (30) CRLB = P 2 n2 |un | 4π 0 n∈H+ Corollary 1 simply exploits the fact that the ĥn are all equal to ĥ in (28). Considering (30), choosing the best measurements is equivalent to identifying the set H+ ⊂ Z+ with N members, for which the sum X n2 |un |2 (31) n∈H+ is maximized. C. Conventional Detector: Asymptotic Behavior Similarly to Section III-B, we fix the radial part of ξn as being independent of n and look at the asymptotic behavior in terms of the number of harmonics, by choosing the set H+ of harmonics as {1, . . . , N }, and letting N tend to infinity. Based on (30), we conclude that the asymptotic behavior of the CRLB depends on the asymptotic (decay) properties of the coefficients un = hJ, ξn i of the directional pattern. The question is whether the CRLB vanishes asymptotically as N → ∞, which would suggest the theoretical possibility of perfect estimation with infinitely many measurements. We now study this question. We start with a preliminary remark. By assumption, the pattern J has finite energy. Since the measurement functions {ξn }n∈Z are orthonormal, by the Bessel inequality, we have that X 2 2 |un | ≤ kJk2 < ∞, (32) n∈Z hence (un )n∈Z ∈ `2 (Z). We see now how to refine this latter condition to have a vanishing CRLB. Proposition 2. In the framework of conventional detectors, for a pattern J ∈ L2 (R2 ), the CRLB does not vanish when N → ∞ if and only if X n2 |un |22 < ∞. (33) n∈Z Moreover, the un are the Fourier coefficients of the function Z ∞ 1 ˆ ϕ)ĥ(ω)ωdω. G(ϕ) = J(ω, (34) 2π 0 Therefore, the CRLB does not vanish if and only if the function G is differentiable with its derivative being square integrable. 5 Proof. The CRLB is inversely proportional to (33), implying the first equivalence. We then remark that, using Parseval relation and polar coordinates, we have 1 ˆ ξˆn i hJ, un = hJ, ξn i = (2π)2 Z 2π Z ∞ 1 ˆ ϕ)ĥ(ω)ejnϕ ωdωdϕ = J(ω, (2π)2 0 0 Z 2π 1 = G(ϕ)ejnϕ dϕ. 2π 0 (35) The sequence (un ) is in `2 (Z), therefore G is square integrable. The Fourier coefficients of the (weak) derivative of G are then jnun . Hence, G is differentiable with a square integrable derivative if and only if the sequence (jnun ) is in `2 (Z), proving the second equivalence in Proposition 2. The convergence of the series in (30) therefore depends on the decay properties of the Fourier-series of G(ϕ), which in turn is related to its smoothness. In particular, if Jˆ has angular jump discontinuities that are inherited by G, un will decay slowly like 1/n, and the series will diverge. In this case, the CRLB will asymptotically vanish. This, for instance, happens if Jˆ has jump discontinuities along infinite radial lines, which typically goes along with a similar discontinuity in J (see [33]). This suggests that, for such patterns, the angular error of a steerable detector can be made arbitrarily small by selecting a sufficient number of harmonics. IV. E XPERIMENTS In practice, the radial profil ĥ is typically chosen as the Laplacian of a Gaussian (LoG) or a band-pass filter (even and compactly supported in the frequency domain). For the experiments, we use the LoG filter and the first scale of the Meyer-type profile [34]   sin ĥ(ω) = cos   0, 4ω π 2ν π 2ω π 2ν π  −1 ,  −1 , π 4 π 2 < ω ≤ π2 <ω≤π , otherwise (36) with the auxiliary function ν(t) = t4 (35 − 84t + 70t2 − 20t3 ), ν ∈ C 3 ([0, 1]). Other typical examples include Shannon-type [35], Simoncelli [19], Papadakis [36] and Held [37] wavelets. Similar results are obtained when using these radial profiles due to the fact that all these functions approximate the indicator function [π/4, π/2]. A. CRLB for Analytical Patterns In this section, we compute the CRLB associated with a few directional patterns for which explicit formulas are provided. 6 ANGULAR ACCURACY OF STEERABLE FEATURE DETECTORS Moreover, as expected, for the three-fold patterns, only every third component and for the four-fold patterns every fourth element plays a significant role in the estimation of the orientation. This can be seen in the almost flat CRLB curve between multiples of three (or four, respectively) in the “First N ” strategy. We also observe a difference in performance between generically choosing the first N k-fold symmetric coefficients (as a strategy for unknown k-fold patterns) and making our choice of harmonics based on maximizing (31). Finally, by looking at Figure 1, we observe that, with the right choice of harmonics, the CRLB can be much reduced, even with a small number of harmonics. B. Empirical Optimality of the Proposed Estimator Fig. 1. First column from top to bottom: illustration of the analytically defined patterns Jˆ1 (37), Jˆ2 (38), Jˆ3 (39) and Jˆ4 (40) in the Fourier domain. Second column: |un | and n|un | as a function of harmonics (n). Third column: The CRLB as a function of the number of harmonics. We study four different types of patterns. Specifically, ( 1, if cos(1.5ϕ)β > 0.8 Jˆ1 (ω, ϕ) = 0, otherwise   1 ˆ J2 (ω, ϕ) = cos(1.5ϕ)β 1 + ωλ ( 1, if cos(2ϕ)β > 0.8 Jˆ3 (ω, ϕ) = 0, otherwise (37) (38) (39) 1 Jˆ4 (ω, ϕ) = cos(2ϕ)β e− αω (40) within the support of ĥ(ω), with λ = 2.1, β = 28 and α = 2.5. We are interested in the following quantities: |un |, n|un | (as it determines the decay rate of the CRLB), and the CRLB for a fixed number of harmonics. For computing the CRLB, we apply three different strategies: “First N ”; “Best N ”; and “k-fold”. In the first case, we use the first N coefficients; in the Best N case, we select the harmonics that maximize (31). In the case of k-fold symmetric patterns we choose the first N multiples of k as harmonics. This latter choice accounts for the name “k-fold”. Related to (28), we have chosen the value σ0 = 1 since it provides only a scaling factor and does not influence the decay of the curve. Figure 1 contains an illustration of the results. In the case of sharp edges (Jˆ1 (37) and Jˆ3 (39)), the rate of decay of the circular-harmonic coefficients permits a theoretical vanishing limit for the CRLB. In the smooth angular cases (Jˆ2 (38) and Jˆ4 (40)), the CRLB converges to a theoretical positive value. In this section, we test the accuracy of the estimation of the proposed estimator (23) on two symmetric and two asymmetric patterns. For symmetric patterns, we have chosen the analytically defined junction J1 (37) and a sharp, drawn three-fold junction (Figure 2, J5 ). For asymmetric patterns, we have chosen a sharp, drawn T-shape junction (Figure 2, J6 ) and a sharp, drawn arrow-type junction (Figure 2, J7 ). The coefficients cα in (23) are obtained in each case as the orthogonal projection of the junction of interest on the measurement functions. We chose the variance of the noise such that it corresponds to an SNR of 17.22 dB. The typical SNR range of real images where the quality is still acceptable is 15-35 dB, so that our experimental conditions are representative of a noisy image. We built 1,000 different realizations to make the experiments statistically reliable. For the estimator, we used every third harmonic. For the radial part of our detector, we have chosen the first scale of the Meyer wavelet profile and the Laplacian of Gaussian (LoG) filter. The results for the patterns are illustrated in Figure 2. We first show experimentally that the estimator (23) is unbiased with more than one harmonic. The performances are therefore comparable to the CRLB. We then observe that the accuracy of the estimator follows closely the CRLB curve, while staying above, as expected. This proves empirically the almost optimality of the estimator (23) for the estimation of the angle θ∗ . V. E XTENSION TO WAVELETS A. Steerable Wavelets In this section, we extend our results on the CRLB to wavelet detectors. Steerable wavelet frames are adapted to capture the local orientation of features, or junctions, within a multiresolution hierarchy. To simplify the notations, we consider wavelets that are centered at the origin. Moreover, we apply the multiorder complex Riesz transform on a tight  wavelet frame of L2 R2 . Proposition 4.1 in [25] provides sufficient conditions on the isotropic profile that has to be defined to generate a desired wavelet system. There are various types of isotropic profiles satisfying the proposition; typical examples are given at the beginning of Section IV. For further details, we refer to [35]. PÜSPÖKI, AMINI, FAGEOT, WARD, AND UNSER 7 Fig. 2. Accuracy of the orientation estimation of the proposed estimator (dashed line) compared to the CRLB (continuous line), bias and variance of the proposed estimator. A.: Results on the analytically defined junction Jˆ1 (37); top: with Meyer radial detector profile, bottom: with LoG detector profile. B. Results on a three-fold symmetric junction (drawn), top: with Meyer radial detector profile, bottom: with LoG detector profile. C. Results on a T-shaped junction (drawn); top: with Meyer radial detector profile, bottom: with LoG detector profile. D. Results on an arrow-shaped junction (drawn); top: with Meyer radial detector profile, bottom: with LoG detector profile. Similarly to the design of conventional detectors, we take the values of n from the predefined set of harmonics H = {n0 , . . . , nN }. The wavelet schemes generated in such a way are often referred to as circular harmonic wavelets [25], [38]. In an extension of (24), the measurement functions are indexed here by the pair α = (n, i) of the harmonic n ∈ H and the scale i ∈ Z. In particular, the circular harmonic wavelet ξ at scale i and harmonic channel n takes the form  ξˆn,i (ω, ϕ) = 2i ĥ 2i ω ejnϕ . (41) We note that, in the case of wavelet measurements, we have multiple measurement functions (at different scales) for the same harmonic n. We make the additional assumption that ĥ is real-valued, which holds true for every aforementioned radial design. Finally, given that the radial patterns ĥ of interest are bandpass, we assume that ĥ(ω) = 0 for ω ∈ / (π/4, π] to set the fundamental scale. B. Multiple Scales: The Cramér-Rao Lower Bound We recall that the goal is to estimate θ∗ from the measurements qn,i = hI, ξn,i i. We also denote un,i = hJ, ξn,i i and sn,i = hS, ξn,i i. To simplify future formulas, we introduce the following notations: q̃n,i = 2−iγ qn,i , Z ∞ 1 bz = ω z ĥ(ω)2 ωdω, 2π 0 Z ∞ 1 dz = ω z ĥ (ω) ĥ (2ω) ωdω. 2π 0 We also set the two constants B = σ02 b−2γ , D = σ02 21−γ d−2γ . (42) (43) (44) (45) The angle θ∗ is estimated by steering the whole template, which can be seen as a sum of templates. The task of estimating θ∗ based on qn,i is the same as its estimation based on q̃n,i . In particular, the CRLB is the same. We first give the covariance matrix of the measurements q̃n,i . Proposition 3. The covariance matrix C of the random vector (q̃n,i )n∈Z,i∈Z is given by   B, if m = n, k = i C[(n, i), (m, k)] = D, if m = n, |k − i| = 1   0, otherwise. (46) Proof. First, C[(n, i), (m, k)] = 0 as soon as m 6= n because the functions ξn,i and ξm,k are orthogonal. Then, 8 ANGULAR ACCURACY OF STEERABLE FEATURE DETECTORS the assumption that b h(ω) = 0 for ω ∈ / (π/4, π] ensures that b h(2i ω) and b h(2k ω) do not overlap for |k − i| > 1, implying again that C[(n, i), (m, k)] = 0. We now assume that m = n and |k − i| ≤ 1. When k = i, we easily recognize the quantity (43) with z = −2γ in (16) and therefore deduce that C[(n, i), (n, i)] = σ02 b−2γ = B. Similarly, one shows using again (16) that C[(n, i), (n, k)] = D when |k − i| = 1. The main challenge in computing the Fisher information from (17) for wavelet measurements is that, unlike in context of Section III, the covariance matrix of the measurements {q̃n,i } is not diagonal, so it is not as straightforward to invert. But this challenge is still surmountable because, as we see from (46), we can rearrange the measurements such that the covariance matrix is (at most) tridiagonal. The exact rearrangement of the measurements is described in details in Appendix E. The key idea is to divide the set of measurement indices into as few disjoint sets Gr as possible (r = 1, . . . , g, where g denotes the total number of such sets). Then, each set Gr has some lr elements of the form (nr , ir ), . . . , (nr , ir +lr −1), for some harmonic nr ∈ H+ and minimum scale ir . We re-index all measurements as q̃r|e using the notation (r|e) := (nr , ir + e − 1), (47) with r = 1, . . . , g and e = 1, . . . , lr . Then, the covariance matrix of the measurements {q̃r|e } for each fixed r is Toepliztridiagonal of the form   B D 0 0 ... 0 D B D 0 . . . 0    0 D B D ... 0   . (48) Tr =  . .. .. .. ..  ..   .. . . . . .    0 0 . . . D B D 0 0 . . . 0 D B l ×l r r Moreover, the overall covariance matrix is block-diagonal, with Tr , r = 1, . . . , g, as its diagonal blocks. Using this reformulation of the problem, we are able to compute the CRLB explicitly. Theorem 3. For wavelet measurements qr|e , r = 1, . . . , g, e = 1, . . . , lr , the Fisher information is given by −1  g lr  X X tπ FI(θ∗ ) = 2 n2r B + 2D cos lr + 1 r=1 t=1 × lr X 2 −(ir +e−1)γ 2 e=1  tπ ur|e sin e lr + 1  . (49) The CRLB for the estimation problem is given by 1/FI(θ∗ ). It satisfies B − 2 |D| 2 P n,i n2 4−iγ 2 |un,i | ≤ CRLB ≤ B + 2 |D| 2 P n,i 2. n2 4−iγ |un,i | (50) The proof of Theorem 3 is given in Appendix F. The Fisher information is expressed as sums and inverses that are difficult to handle. However, we can give a fair estimate of the CRLB by narrowing it to a range (50). In the case of a conventional detector, the value of D is 0 (see (45)). Thus, the lower and upper bound of the range are equal and we arrive to the same exact CRLB that we computed for the case of conventional detectors (30). In the general case, it is crucial to remark that 0 < B − 2|D|, as demonstrated in Lemma 1 (see Appendix F); hence the lower bound in (50) is strictly positive. Finally, we remark that, as in the case of conventional detectors, the Fisher information, and therefore the CRLB, does not depend on θ∗ . C. Asymptotic Behavior for All Scales and Harmonics We now consider the case where we have access to each wavelet coefficient qn,i = hI, ξn,i i for n ∈ Z, i ∈ Z. Once again, for real-valued data, we can limit ourselves to n ∈ Z+ for computing the CRLB, due to Hermitian symmetry. Proposition 4. Assume γ is such that |db00 | 6= 21−γ + 21+γ . Then, by observing hI, ξn,i i, the CRLB does not vanish if and only if X X n2 4iγ |un,i |2 < ∞. (51) i∈Z n∈Z+ Moreover, if J has an expansion in terms of {ξn,i }, then this is also equivalent to (−∆)γ/2 ∂ J(r, θ) ∈ L2 (R2 ). ∂θ (52) The proof of Proposition 4 is provided in Appendix G. It is the multiscale version of Proposition 2. We interpret the fact that the CRLB vanishes as a possibility to perfectly detect the correct angle from the set of measurements, assuming all the harmonics and scales are available. The assumption on γ is technical and simply implies that one specific value of γ should be avoided for a given wavelet. The values of such γ for different wavelets are given in Appendix G. D. Experiments with Wavelets In this section, we compute the CRLB of the junction Jˆ2 (38) with λ = 2.1 and 4.5. These choises of λ correspond to two cases: first, where the background decays faster than the junction (in the Fourier domain); and second, where it is the junction that decays faster. The value of γ is fixed as 2.5. For the experiments, we have chosen the Meyer-type wavelet (36). We again choose σ0 = 1 since it provides a scaling factor that does not influence the rate of decay of the curve. Based on the graphs of Figure 3, we can observe the followings. For λ = 2.1, one wavelet scale was not enough for the CRLB to converge to a theoretical perfect estimation (like in Figure 1, second experiment). However, by increasing the number of scales, the 0 bound is asymptotically achievable. This illustrates the main result of Proposition 4, which shows that, by using finer scales, wavelets can improve the estimate, even in the case of junctions of a fixed size. For λ = 4.5, as expected, the CRLB converges to a positive theoretical value. PÜSPÖKI, AMINI, FAGEOT, WARD, AND UNSER 9 where W is a 2D continuous-domain Gaussian white noise of γ variance σ02 and (−∆) 2 is the fractional Laplacian operator γ associated with the isotropic Fourier-domain multiplier kωk , with γ ≥ 0. The intuitive idea here is to shape or “color” the white noise by an appropriately defined inverse fractional Laplacian, which gives to the solution an inverse-power-law spectrum. The field we obtain is the isotropic 2D generalization of the fractional Brownian motion [40]. The observation hS, f i of the random process S through a suitable test function f is a Gaussian random variable. The random process S is Gaussian with 0 mean (because W is) and correlation form i h (54) BS (f, g) = E hS, f ihS, gi . Fig. 3. First column: Illustration of the analytically defined junction J2 with λ = 2.1 and 4.5. Second column: The CRLB as a function of the number of the largest wavelet scale. VI. C ONCLUSION In this paper, we considered the problem of estimating the orientations of features in images. In particular, we examined the orientation of patterns with rotational symmetry. Within the framework of measurement functions composed of steerable filters, we derived Cramér-Rao lower bounds (CRLB) on the error of estimation. We provided results on the connections to maximum likelihood estimation. Moreover, we discussed the problem of selecting the parameters in the detector functions to achieve the lowest CRLB for a given reference template. In addition to the case of conventional detectors, we also studied the bounds on the performance of steerable wavelet estimators. We proposed an estimator for identifying orientations, and we compared its estimation error to the theoretical bounds. Finally, we provided several experiments on different realistic junctions and directional patterns that confirm the theory. The random variable hW, f i is well-defined for f ∈ L2 (R2 ) [39]. Therefore, hS, f i is well-defined when (−∆)−γ/2 f ∈ 2 L is equivalent, in the Fourier domain, to 2 (R ), which R∞ R 1−2γ 2π ˆ ω | f (ω, ϕ)|2 dϕdω < ∞. This condition yields 0 0 (14) when f = ξα . Assume that f has vanishing moments until order bγc − 1. This is, in particular, the case when f = (−∆)γ/2 φ with φ a smooth enough function in L1 (R2 )∩L2 (R2 ) [41, Proposition 5.1]. Then, hS, f i is a welldefined Gaussian random variable with mean 0 and variance σ02 k(−∆)−γ/2 f k22 = σ02 kφk22 . The conditions on f ensure that (−∆)−γ/2 f is square-integrable. More generally, if f and g have enough vanishing moments, then the correlation form (54) is evaluated as (55) BS (f, g) = σ02 h(−∆)−γ/2 f, (−∆)−γ/2 gi 2 Z ∞ Z 2π σ0 g (ω, ϕ)dϕωdω, = ω −2γ fb(ω, ϕ)b (2π)2 0 0 where we have used the Parseval relation and the polar Fourier coordinates for the last equality. We interpret (55) by saying that S is an isotropic random field with generalized power spectrum PS (ω) = PS (ω) = ω −2γ . ACKNOWLEDGMENTS The research leading to these results has received funding from the European Research Council under the European Union’s Seventh Framework Programme (FP7/20072013)/ERC grant agreement n◦ 267439. The work was also supported by the Hasler Foundation. A PPENDIX A. Background Noise Model For our background signal S to fulfil the requirements of self-similarity and isotropy, we define it as the (non-stationary) solution of a fractional stochastic differential equation. The general theory of such models and their non-Gaussian and sparse extensions is covered in [39]. We assume that our background signal corresponds to a stochastic process S on R2 that is defined as the solution of the stochastic differential equation γ (−∆) 2 S = W, (53) B. Complement on Steerability We briefly recap some basic notions and facts on steerable functions. Definition 1. A function ξ on the plane is steerable in the finite basis {ξα } if, for any rotation matrix Rθ0 , we can find coefficients {cα (θ0 )} such that X ξ(Rθ0 x) = cα (θ0 )ξα (x). (56) α A family of functions {ξα } is steerable if its linear span is invariant under arbitrary rotations. The last part of Definition 1 is equivalent to saying that, for each θ0 , a matrix L(θ0 ) exists such that     ξ1 (r, θ + θ0 ) ξ1 (r, θ)    .  .. (57)   = L(θ0 )  ..  . . ξn (r, θ + θ0 ) ξn (r, θ) 10 ANGULAR ACCURACY OF STEERABLE FEATURE DETECTORS An illustrative example of such a family is {cos(θ), sin(θ)}, whose rotations can be written as      cos(θ + θ0 ) cos(θ0 ) − sin(θ0 ) cos(θ) , (58) = sin(θ + θ0 ) sin(θ0 ) cos(θ0 ) sin(θ) Knowing that C is diagonal, we easily deduce, starting from (17), that the Fisher information is in this case X ∗ ∗ (jn)ejnθ un (C[n, n])−1 (−jn)e−jnθ un FI(θ∗ ) = n∈H + which is a weighted sum of the unrotated functions. If ξα is polar-separable as in (6), then its Fourier transform is also polar-separable as ξˆα (ω, ϕ) = ĥα (ω)ejnα ϕ (59) for some ĥα related to ηα and nα . We note that this formulation provides a direct connection with the nth-order complex Riesz transform and leads to a comprehensive theory for the design and analysis of steerable filters and wavelets [25], [26], [42], [43]. C. Proof of Theorem 1 The vector q is Gaussian as a result of the “integration” of the background noise S. As such, its law is characterized by its mean vector and covariance matrix. In the right part of (5), the first term is deterministic and the second is random with mean 0. Hence, we have ∗ E[qα ] = hJ(R−θ∗ ·), ξα i = hJ, ξα (Rθ∗ ·)i = ejnα θ hJ, ξα i, (60) where we used (9) for the last equality. For the covariance matrix, we have that i h C[α, β] = E (qα − E[qα ])(qβ − E[qβ ]) h i = E hS, ξα ihS, ξβ i . = as expected, where we have exploited the Fourier domain expression (59). Finally, the Fisher information of a Gaussian model is provided by the Slepian-Bangs formula [44, B.3.3]. In our case, however, we deal with complex Gaussian vectors, because the measurement functions are typically complex (see (6)). We therefore use a generalization of the Slepian-Bangs formula adapted to complex Gaussian random vectors [44, B.3.25]. Moreover, this formula simplifies because the covariance matrix does not depend on the parameter θ∗ , giving (17). D. Proof of Theorem 2 As already noted, the CRLBs based on the sets H and H+ are the same. We therefore restrict the decision to positive harmonics n ∈ H+ . The functions ξn are assumed to have distinct harmonics; therefore, the matrix (16) is diagonal with Z ∞ σ02 ω 1−2γ |ĥn (ω)|2 dω. (63) C[n, n] = (2π)2 0 (64) Knowing C[n, n], we deduce the Fisher information, and hence the CRLB which is the inverse of the Fisher information. We finally remark that the CRLB does not depend on θ∗ in that case. E. Construction of the Tridiagonal Covariance Matrix The measurements are rearranged in the following way to create a (at most) tridiagonal covariance matrix. Our starting point is an arbitrary set of unique measurement indices of the form (n, i), where n is the harmonic and i is the scale of the corresponding measurement. As before, since (n, i) and (−n, i) carry the same information for real-valued patterns, with q−n,i = qn,i and u−n,i = un,i , we can assume that all harmonics n are positive without loss of generality. We divide the set of measurement indices into as few disjoint sets Gr as possible, subject to three conditions (r = 1, . . . , g is an index for the sets). • Then, applying (55) to f = ξα and g = ξβ , we deduce that Z ∞  σ02 1−2γ c b C[α, β] = w h (ω) h (ω)dω δ[nα − nβ ], α β (2π)2 0 (62) n2 |un |2 (C[n, n])−1 . n∈H+ • (61) X • Each set Gr consists of indices with a single fixed harmonic nr . Each set Gr only contains indices with consecutive scales—it can also contain only a single element. If the two sets Gr , Gs share the same harmonic nr = ns , then the scales in Gr , Gs differ by a minimum of 2. The last condition is a consequence of the first two and requires one to have a minimal number of sets. Here, g denotes the total number of such sets. From the above conditions, it follows that each set Gr has some lr elements of the form (nr , ir ), . . . , (nr , ir +lr −1). We use the notation (47) and re-index all measurements as q̃r|e . The idea behind this re-indexing is that, following (46), the covariance matrix of the measurements {q̃r|e } for each fixed r is Toepliz-tridiagonal of the form (48). Moreover, the overall covariance matrix is block-diagonal, with Tr , r = 1, . . . , g, as its diagonal blocks. F. Proof of Theorem 3. We first start with a lemma that shows that the lower bound in (50) is strictly positive, and that will be used in the proof of Theorem 3. Lemma 1. Assume that ĥ is real-valued and that ĥ(ω) = 0 for ω ∈ / (π/4, π]. Then, for every z, we have that bz > 2z/2+2 |dz | . Consequently, we have the relation B > 2|D|. (65) PÜSPÖKI, AMINI, FAGEOT, WARD, AND UNSER 11 Proof. We have that Z π/2 1 |dz | = ω z ĥ(ω)ĥ(2ω)ωdω 2π π/4 sZ Z π/2 π/2 1 ≤ ω z ĥ(2ω)2 ωdω ω z ĥ(ω)2 ωdω 2π π/4 π/4 sZ Z π π/2 1 1 z 2 = ω ĥ(ω) ωdω ω z ĥ(ω)2 ωdω 2π 2z/2+1 π/4 π/2 ! Z π Z π/2 1 1 ≤ ω z ĥ(ω)2 ωdω ω z ĥ(ω)2 ωdω + 2π 2z/2+2 π/2 π/4 1 = z/2+2 bz , (66) 2 where we have used the Cauchy-Schwarz inequality, and the inequality of arithmetic and geometric means. By checking the equality conditions of the two inequalities, we see that they do not happen for the cases of interest. The equality happens only if ĥ(ω) = ĥ(2ω) almost everywhere, which is not the case here. Thus, the inequality in (66) is strict. Finally, by selecting z = −2γ, we deduce (65). Let us now prove Theorem 3. The estimation of θ∗ from {qn,i } is essentially the same as the estimation from {q̃r|e }. In particular, the CRLB is the same. The measurement vector q̃ is constructed by concatenating the vectors q̃r = (q̃r|1 , . . . , q̃r|lr ), r = 1, . . . , g. This is a normal vector, with its mean µ̃ given by concatenating the ∗ ∗ vectors µ̃r = (ejnr θ 2−ir γ ur|1 , . . . , ejnr θ 2−(ir +lr −1)γ ur|lr ), r = 1, . . . , g. The covariance of q̃, as already noted, is block-diagonal of the form   T1 0 . . . 0  0 T2 . . . 0    C̃ =  . (67) .. ..  , ..  .. . . .  0 0 . . . Tg where the form of Tr is given by (48). Each Tr is a Toeplitztridiagonal matrix (or the scalar B if lr = 1). Consequently, its eigenvalues are given by   tπ λ(t) = B + 2D cos , (68) r lr + 1 where 1 ≤ t ≤ lr . The corresponding eigenvectors are    sin lrtπ   +1  r   sin 2 lrtπ 2  +1  (t)  . vr = (69)  .. k+1   .    sin k lrtπ +1 For positive nr (which we can assume without loss of generality), we have, according to (17),  H  ! d d FI(θ∗ ) = 2 Re µ̃ C̃ −1 µ̃ dθ dθ =2 g X r=1 −1 ˜ ˜H n2r µ̃ r Tr µ̃r , (70) where ˜ r = (2−ir γ ur|1 , . . . , 2−(ir +lr −1)γ ur|l ). µ̃ r (71) Thus, the explicit formula for the Fisher information is  −1 g lr  X X tπ FI(θ∗ ) = 2 B + 2D cos n2r lr + 1 t=1 r=1 lr X ×  2 tπ . ur|e sin e lr + 1 −(ir +e−1)γ 2 e=1 (72) Also, g X 2 ˜r n2 µ̃ B + 2 |D| r=1 r g 2 2 ≤ FI(θ∗ ) ≤ X 2 ˜r 2 , n2r µ̃ 2 B − 2 |D| r=1 (73) where we have used the positivity of B − 2|D| demonstrated in Lemma 1. This shows that FI(θ∗ ) is finite if and only if Pg 2 ˜ 2 r=1 nr µ̃r 2 is finite. Going back to the original indices (n, i), the CRLB therefore satisfies (50). G. Proof of Proposition 4. The first equivalence directly follows from Theorem 3 and the fact that BP− 2|D| > 0 (Lemma 1). We now show 2 2 −iγ that the series |un,i | converges if and only if n,i n 4 γ/2 ∂ 2 (−∆) ∂θ J(r, θ) ∈ L2 (R ), implying the second equivalence. By assumption on J, we write X J(r, θ) = vn,i ξn,i (r, θ). (74) (n,i)∈Z2 We recall that, according to (53), h∂θ J, ξn i = −hJ, ∂θ ξn i. Therefore, ∂ J(r, θ) ∂θ (−∆)γ/2 2 2 2 = X ∂ vn,i (−∆)γ/2 ξn,i (r, θ) ∂θ 2 (n,i)∈Z 2 2 = X jnvn,i (−∆)γ/2 ξn,i (r, θ) (n,i)∈Z2 X = n1 n2 vn1 ,i1 vn∗ 2 ,i2 n1 ,n2 ,i1 ,i2 2 (−∆) γ/2 ξn1 ,i1 , (−∆)γ/2 ξn2 ,i2 . (75) With the same polar coordinate computation as in (55), we obtain that (−∆)γ/2 ξn1 ,i1 , (−∆)γ/2 ξn2 ,i2 is given by Z ∞ 2|i1 −i2 |−2 min(i1 ,i2 )γ δ[n1 − n2 ] ω 2γ ĥ(ω)ĥ(2|i1 −i2 | ω)ωdω. 2π 0 (76) This can be simplified as (−∆)γ/2 ξn1 ,i1 , (−∆)γ/2 ξn2 ,i2  −iγ  if n1 = n2 , i1 = i2 4 b−2γ , = 2 · 4− min(i1 ,i2 )γ d−2γ , if n1 = n2 , |i1 − i2 | = 1 (77)   0, otherwise. 12 ANGULAR ACCURACY OF STEERABLE FEATURE DETECTORS Therefore, (−∆)γ/2 ∂ J(r, θ) ∂θ TABLE II E XCLUDED γ VALUES 2 = 2 X n2 X n∈Z 2 4−iγ |vn,i | b−2γ ∗ ∗ + 2 · 4−iγ vn,i vn,i+1 d−2γ + 2 · 4−(i−1)γ vn,i vn,i−1 d−2γ  . (78) By employing the Cauchy-Schwarz inequality, X ∗ 4−iγ vn,i vn,i+1 and i    2−iγ un,i = 21−γ d0 2−(i−1)γ vn,i−1 + b0 2−iγ vn,i   + 21+γ d0 2−(i+1)γ vn,i+1 . (85) v ! ! u X u X 2 2 ≤t 4−iγ |vn,i | 4−iγ |vn,i+1 | i γ =2 X i 4 −iγ 2 |vn,i | . (79) i Also, we deduce X Excluded γ ∞ 0.736 1.978 1.476 1.443 Wavelet type Shannon [35] Simoncelli [19] Meyer [34] Papadakis [36] Held [37] i∈Z This  −iγ indicates that, for any given n, the sequence 2−iγ un,i i∈Z is the result of applying to the sequence 2 vn,i i the FIR filter with z transform ∗ 4−(i−1)γ vn,i vn,i−1 F (z) = 21−γ d0 z −1 + b0 + 21+γ d0 z. (86) i v ! ! u X u X 2 2 t −(i−1)γ −(i−1)γ 4 |vn,i−1 | 4 |vn,i | ≤ = 2γ b0 6= 21+γ + 21−γ , |d0 | i i X This filter has no poles on the unit circle. Moreover, if 2 4−iγ |vn,i | . (80) i We arrive at the inequalities   X  2 n2 4−iγ |vn,i |  b−2γ − 2−γ+2 |d−2γ |  ≤ b−2γ ∂ J(r, θ) ∂θ ω∈[0,2π) ≤ X −iγ 2 un,i 2 i∈Z (n,i)∈Z2  (81) Lemma 1 implies that b−2γ > 2−γ+2 |d−2γ |. Hence, (81) ∂ means that (−∆)γ/2 ∂θ J(r, θ) ∈ L2 (R2 ) if and only if P 2 2 −iγ |vn,i | < ∞. (n,i)∈Z2 n 4 The remaining part is to show that P 2 2 −iγ |vn,i | < ∞ if and only if (n,i)∈Z2 n 4 P 2 2 −iγ |un,i | < ∞, from which we deduce (n,i)∈Z2 n 4 the second part of Proposition 4. We therefore focus on the relationship between un,i and vn,i and remark that X un,i = hJ(r, θ), ξn,i i = vn0 ,i0 hξn0 ,i0 , ξn,i i . (82) ≤ max F e jω  2 X ω∈[0,2π) Thus,  min F e jω X ≤ 2 2−iγ vn,i .  2  X 2 n2 4−iγ |vn,i | (i,n)∈Z2 n2 4−iγ |un,i | 2 (i,n)∈Z2  ≤ max ω∈[0,2π) F e jω  2  X 2 n2 4−iγ |vn,i | . Hence, (84) n,i (90) (i,n)∈Z2 Consequently, X X 2 2 n2 4−iγ |vn,i | < ∞ ⇔ n2 4−iγ |un,i | < ∞, (83) (89) i∈Z ω∈[0,2π) n0 ,i0 un,i = 2d0 vn,i−1 + b0 vn,i + 2d0 vn,i+1 (88) i∈Z  X  2 + 2−γ+2 |d−2γ |  n2 4−iγ |vn,i |  . Again, it is straightforward to verify that   if n = n0 , i = i0 b0 , hξn0 ,i0 , ξi,n i = 2d0 , if n = n0 , |i − i0 | = 1   0, otherwise. ω∈[0,2π) The filtering relationship between the two sequences implies the following inequalities on their energies:    2 X −iγ 2 min F ejω 2 vn,i 2 2 then none of its zeros will lie on the unit circle. Thus, 2 2 0 < min F ejω ≤ max F ejω < ∞. ω∈[0,2π) (n,i)∈Z2 ≤ (−∆)γ/2 (87) (91) n,i as expected, and the proof is finished. We finally remark that value of γ that is excluded in the proof satisfies (87). We provide the corresponding values for different radial profiles in Table II. PÜSPÖKI, AMINI, FAGEOT, WARD, AND UNSER 13 R EFERENCES [22] N. Karssemeijer and G. te Brake, “Detection of stellate distortions in mammograms,” IEEE Transactions on Medical Imaging, vol. 15, pp. 611–619, October 1996. [23] D. Schmitter, R. Delgado-Gonzalo, G. Krueger, and M. Unser, “Atlasfree brain segmentation in 3D proton-density-like MRI images,” in Proceedings of the Eleventh IEEE International Symposium on Biomedical Imaging: From Nano to Macro (ISBI’14), (Beijing, People’s Republic of China), pp. 629–632, April 29-May 2, 2014. [24] M. Muehlich, D. Friedrich, and T. Aach, “Design and implementation of multisteerable matched filters,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 34, pp. 279–291, February 2012. [25] M. Unser and N. Chenouard, “A unifying parametric framework for 2D steerable wavelet transforms,” SIAM Journal on Imaging Sciences, vol. 6, no. 1, pp. 102–135, 2013. [26] Z. Püspöki, V. Uhlmann, C. Vonesch, and M. Unser, “Design of steerable wavelets to detect multifold junctions,” IEEE Transactions on Image Processing, vol. 25, pp. 643–657, February 2016. [27] Z. Püspöki, C. Vonesch, and M. Unser, “Detection of symmetric junctions in biological images using 2-D steerable wavelet transforms,” in Proceedings of the Tenth IEEE International Symposium on Biomedical Imaging: From Nano to Macro (ISBI’13), (San Francisco CA, USA), pp. 1488–1491, April 7-11, 2013. [28] A. Depeursinge, A. Foncubierta-Rodriguez, D. Van De Ville, and H. Müller, “Rotation-covariant texture learning using steerable Riesz wavelets,” IEEE Transactions on Image Processing, vol. 23, pp. 898– 908, February 2014. [29] B. Pesquet-Popescu and J. Vehel, “Stochastic fractal models for image processing,” IEEE Signal Processing Magazine, vol. 19, pp. 48–62, September 2002. [30] A. Pentland, “Fractal-based description of natural scenes,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. PAMI-6, pp. 661–674, November 1984. [31] D. Sage, F. Neumann, F. Hediger, S. Gasser, and M. Unser, “Automatic tracking of individual fluorescence particles: Application to the study of chromosome dynamics,” IEEE Transactions on Image Processing, vol. 14, pp. 1372–1383, September 2005. [32] S. M. Kay, “Fundamentals of statistical signal processing, volume i: estimation theory,” 1993. [33] P. R. Smith, T. M. Peters, and R. H. T. Bates, “Image reconstruction from finite numbers of projections,” Journal of Physics A: Mathematical, Nuclear and General, vol. 6, no. 3, p. 361, 1973. [34] I. Daubechies, Ten lectures on wavelets, vol. 61. SIAM, 1992. [35] M. Unser, N. Chenouard, and D. Van De Ville, “Steerable pyramids and tight wavelet frames in l2 (rd ),” IEEE Transactions on Image Processing, vol. 20, pp. 2705–2721, October 2011. [36] J. Romero, S. Alexander, S. Baid, S. Jain, and M. Papadakis, “The geometry and the analytic properties of isotropic multiresolution analysis,” Advances in Computational Mathematics, vol. 31, no. 1-3, pp. 283–328, 2009. [37] S. Held, M. Storath, P. Massopust, and B. Forster, “Steerable wavelet frames based on the Riesz transform,” IEEE Transactions on Image Processing, vol. 19, pp. 653–667, March 2010. [38] G. Jacovitti and A. Neri, “Multiresolution circular harmonic decomposition,” IEEE Transactions on Signal Processing, vol. 48, pp. 3242–3247, November 2000. [39] M. Unser and P. Tafti, An Introduction to Sparse Stochastic Processes. Cambridge, UK: Cambridge University Press, 2014. [40] B. B. Mandelbrot and J. W. Van Ness, “Fractional brownian motions, fractional noises and applications,” SIAM review, vol. 10, no. 4, pp. 422– 437, 1968. [41] J. Fageot, E. Bostan, and M. Unser, “Wavelet statistics of sparse and self-similar images,” SIAM Journal on Imaging Sciences, vol. 8, no. 4, pp. 2951–2975, 2015. [42] M. Felsberg and G. Sommer, “The monogenic signal,” IEEE Transactions on Signal Processing, vol. 49, pp. 3136–3144, December 2001. [43] U. Köthe, “Low-level feature detection using the boundary tensor,” in Visualization and Processing of Tensor Fields (J. Weickert and H. Hagen, eds.), Mathematics and Visualization, pp. 63–79, Springer Berlin Heidelberg, 2006. [44] P. Stoica and R. Moses, Spectral Analysis of Signals. Upper Saddle River, NJ, USA: Prentice-Hall, 2005. [1] Z. Püspöki, M. Storath, D. Sage, and M. Unser, “Transforms and operators for directional bioimage analysis: A survey,” in Focus on BioImage Informatics (W. De Vos, S. Munck, and J.-P. Timmermans, eds.), vol. 219 of Advances in Anatomy, Embryology and Cell Biology, ch. 3, pp. 69–93, Springer International Publishing, May 21, 2016. [2] N. Patton, T. Aslam, T. MacGillivray, I. Deary, B. Dhillon, R. Eikelboom, K. Yogesan, and I. Constable, “Retinal image analysis: Concepts, applications and potential,” Progress in Retinal and Eye Research, vol. 25, pp. 99–127, January 2006. [3] M. Schuh, J. Banda, P. Bernasconi, R. Angryk, and P. Martens, “A comparative evaluation of automated solar filament detection,” Solar Physics, vol. 289, pp. 2503–2524, July 2014. [4] B. Dan, A. W. K. Ma, E. H. Hároz, J. Kono, and M. Pasquali, “Nematiclike alignment in SWNT thin films from aqueous colloidal suspensions,” Industrial & Engineering Chemistry Research, vol. 51, pp. 10232– 10237, July 2012. [5] H. Jiuxiang, A. Razdan, J. Femiani, C. Ming, and P. Wonka, “Road network extraction and intersection detection from aerial images by tracking road footprints,” IEEE Transactions on Geoscience and Remote Sensing, vol. 45, pp. 4144–4157, December 2007. [6] B. S. and J.-C. Olivo-Marin, “Combining local filtering and multiscale analysis for edge, ridge, and curvilinear objects detection,” IEEE Transactions on Image Processing, vol. 19, pp. 74–84, January 2010. [7] F. Zhao, P. Mendonca, R. Bhotika, and J. Miller, “Model-based junction detection algorithm with applications to lung nodule detection,” in Proceedings of the Fourth IEEE International Symposium on Biomedical Imaging: From Nano to Macro ISBI’07, (Arlington VA, USA), pp. 504– 507, April 12-15 2007. [8] G.-S. Xia, J. Delon, and Y. Gousseau, “Accurate junction detection and characterization in natural images,” International Journal of Computer Vision, vol. 106, pp. 31–56, January 2014. [9] M. Maire, P. Arbelaez, C. Fowlkes, and J. Malik, “Using contours to detect and localize junctions in natural images,” in Proceedings of the 2008 IEEE Computer Society Conference on Computer Vision and Pattern Recognition CVPR’08, (Anchorage, Alaska, USA), pp. 1–8, June 24-26 2008. [10] T.-A. Pham, M. Delalandre, S. Barrat, and J.-Y. Ramel, “Accurate junction detection and reconstruction in line-drawing images,” in Proceedings of the 21st International Conference on Pattern Recognition ICPR’12, (Tsukuba Science City, Japan), pp. 693–696, November 1115 2012. [11] J. Canny, “A computational approach to edge detection,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 8, pp. 679–698, June 1986. [12] B. Jahne, Digital Image Processing: Concepts, Algorithms, and Scientific Applications. Secaucus, NJ, USA: Springer-Verlag New York, Inc., 4th ed., 1997. [13] U. Köthe, “Edge and junction detection with an improved structure tensor,” in Pattern Recognition, vol. 2781 of Lecture Notes in Computer Science, pp. 25–32, Springer, 2003. [14] J. Bigun, T. Bigun, and K. Nilsson, “Recognition by symmetry derivatives and the generalized structure tensor,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 26, pp. 1590–1605, December 2004. [15] W. Förstner, “A feature based correspondence algorithm for image matching,” International Archives of Photogrammetry and Remote Sensing, vol. 26, pp. 150–166, August 1986. [16] J. Bigun, “G.H.: Optimal orientation detection of linear symmetry,” in Proceedings of the First IEEE International Conference on Computer Vision, London, Great Britain, pp. 433–438, 1987. [17] W. Freeman and E. Adelson, “Steerable filters for early vision, image analysis, and wavelet decomposition,” in Proceedings of the Third International Conference on Computer Vision, pp. 406–415, IEEE, 1990. [18] P. Perona, “Steerable-scalable kernels for edge detection and junction analysis,” in Proceedings of the Second European Conference on Computer Vision (ECCV’92), pp. 663–672, December 1992. [19] J. Portilla and E. Simoncelli, “A parametric texture model based on joint statistics of complex wavelet coefficients,” International Journal of Computer Vision, vol. 40, pp. 49–70, October 2000. [20] J. Ward and M. Unser, “Harmonic singular integrals and steerable wavelets in l2 (rd ),” Applied and Computational Harmonic Analysis, vol. 36, pp. 183–197, March 2014. [21] M. Jacob and M. Unser, “Design of steerable filters for feature detection using Canny-like criteria,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 26, pp. 1007–1019, August 2004.
7cs.IT
arXiv:1312.5832v1 [math.AC] 20 Dec 2013 ON THE LOWEY LENGTH OF MODULES OF FINITE PROJECTIVE DIMENSION. TONY J. PUTHENPURAKAL Abstract. Let (A, m) be a local Gorenstein local ring and let M be an A module of finite length and finite projective dimension. We prove that the Lowey length of M is greater than or equal to order of A. This generalizes a result of Avramov, Buchweitz, Iyengar and Miller [2, 1.1]. 1. introduction Let (A, m) be a local Gorenstein local ring of dimension d ≥ 0 and embedding dimension c. If M is an A-module then we let λ(M ) denote its length. If A is singular then the order of A is given by the formula    n+c n+1 . ord(A) = min n ∈ N | λ(A/m )< n If A is regular we set ord A = 1. Note that if A is singular then ord(A) ≥ 2. Recall that Lowey length of an A-module M is defined to be the number ℓℓ(M ) = min{i ≥ 0 | mi M = 0}. When M is finitely generated ℓℓ(M ) is finite if and only if λ(M ) is finite. Often the Lowey length of M carries more structural information than does it length. L Let G(A) = n≥0 mn /mn+1 be the associated graded ring of A and let G(A)+ denotes its irrelevant maximal ideal. Let H i (G(A)) be the ith -local cohomology module of G(A) with respect to G(A)+ . The Castelnuovo-Mumford regularity of G(A) is reg G(A) = max{i + j | H i (G(A))j 6= 0} In the very nice paper [2, 1.1] the authors proved that if G(A) is Cohen-Macaulay then for each non-zero finitely generated A-module M of finite projective dimension ℓℓ(M ) ≥ reg G(A) + 1 ≥ ord(A). We should note that the real content of their result is that ℓℓ(M ) ≥ reg G(A) + 1. The fact that reg(G(A)) + 1 ≥ ord(A) is elementary, see [2, 1.6]. The hypotheses G(A) is Cohen-Macaulay is quite strong, for instance G(A) need not be CohenMacaulay even if A is a complete intersection. In this short paper we show Date: April 5, 2018. 1 2 TONY J. PUTHENPURAKAL Theorem 1.1. Let (A, m) be a Gorenstein local ring and let M be a non-zero finitely generated module of finite projective dimension. Then ℓℓ(M ) ≥ ord(A). The proof of Theorem 1.1 uses invariants of Gorenstein local rings defined by Auslander and studied by S. Ding. We also introduce a new invariant ϑ(A) which is useful in the case G(A) is not Cohen-Macaulay. We now describe the contents of this paper in brief. In section two we recall the notion of index of a local ring. In section three we introduce our invariant ϑ(A). In section four we prove Theorem 1.1. Acknowledgment: I thank Prof L. L. Avramov for many discussions. 2. The index of a Gorenstein local ring Let (A, m) be a Gorenstein local ring and let M be a finitely generated A-module. Let µ(M ) denote minimal number of generators of M . In this section we recall the definition of the delta invariant of M . Finally we recall the definition of index of A. A good reference for this topic is [5]. 2.1. A maximal Cohen-Macaulay approximation of M is a short exact sequence f → N → 0, 0 → YM → XM − where XM is a maximal Cohen-Macaulay A-module and projdim YM < ∞. If f can only be factored through itself by way of an automorphism of XM , then the approximation is said to be minimal. Any module has a minimal approximation and minimal approximations are unique upto non-unique isomorphisms. Suppose now that f is a minimal approximation. Let XM = XM ⊕ F where XM has no free summands and F is free. Then δA (M ) is defined to be the rank of F . 2.2. Alternate definitions of the delta invariant It can be shown that δA (M ) is the smallest integer n such that there is an epimorphism X ⊕ An → M with X a maximal Cohen-Macaulay module with no free summands, see [12, 4.2]. This definition of delta is used by Ding [3]. The stable CM-trace of M is the submodule τ (M ) of M generated by the homomorphic images in M of all MCM modules without a free summand. Then δA (M ) = µ(M/τ (M )), see [12, 4.8]. This is the definition of delta in [2]. 2.3. We collect some properties of the delta invariant that we need. Let M and N be finitely generated A-modules. (1) (2) (3) (4) If N is an epimorphic image of M then δA (M ) ≥ δA (N ). δA (M ⊕ N ) = δA (M ) + δA (N ). δA (M ) ≤ µ(M ). If projdim M < ∞ then δA (M ) = µ(M ). LOWEY LENGTH 3 (5) Let x ∈ m be A ⊕ M regular. Set B = A/(x). Then δA (M ) = δB (M/xM ). (6) If A is zero-dimensional Gorenstein local ring and I is an ideal in A then δA (A/I) 6= 0 if and only if I = 0. (7) If A is not regular then δA (ms ) = 0 for all s ≥ 1. (8) δA (k) = 1 if and only if A is regular. (9) δA (A/mn ) ≥ 1 for all n ≫ 0. Proofs and references For (1),(2),(4),(8),(9); see [2, 1.2]. Notice (3) follows easily from the second definition of delta. The assertion (5) is proved in [1, 5.1]. For (6) note that A/I is maximal Cohen-Macaulay. The assertion (7) is due to Auslander. Unfortunately this paper of Auslander is unpublished. However there is an extension of the delta invariant to all Noetherian local rings due to Martsinkovsky [6]. In a later paper he proves that δA (m) = 0. see [7, Theorem 6]. We prove by induction that δA (ms ) = 0 for all s ≥ 1. For s = 1 this is true. Assume for s = j. We prove it for s = j + 1. Let mj+1 =< a1 b1 , a2 b2 , . . . , am bm > where ai ∈ mj and bi ∈ m. Let Ii = ai m for i = 1, . . . , m. Note Ii ⊆ mj+1 and the natural Lm j+1 map φ : is surjective. By (1) and (2) it is enough to show that i=1 Ii → m δA (Ii ) = 0 for all i. But this is clear as Ii is a homomorphic image of m. 2.4. The index of A is defined by Auslander to be the number index(A) = min{n | δA (A/mn ) ≥ 1}. It is a positive integer by 2.3(9) and equals 1 if and only if A is regular, see 2.3(8). 2.5. By [2, 1.3] we have that if projdim M is finite then ℓℓ(M ) ≥ index(A). 3. The invariant ϑ(A) Throughout this section (A, m) is a Cohen-Macaulay local ring of dimension d. We assume that k, the residue field of A, is infinite. In this section we define an invariant ϑ(A). This will be useful when G(A) is not Cohen-Macaulay. 3.1. Let a ∈ A be non-zero. Then there exists n ≥ 0 such that a ∈ mn \ mn+1 . Set a∗ = image of a in mn /mn+1 and we consider it as a element in G(A). Also set 0∗ = 0. If a ∈ m is such that a∗ is G(A)-regular then G(A/(a)) = G(A)/(a∗ ). 3.2. Recall x ∈ m is said to be A-superficial if there exists integer c > 0 such that for n ≫ 0 we have (mn+1 : x) ∩ mc = mn−1 . Superficial elements exist if d > 0 as k is an infinite field. As A is Cohen-Macaulay, it is easily shown that a superficial element is a non-zero divisor of A. Furthermore we have (mn+1 : x) = mn for all n ≫ 0. This enables to define the following two invariants of A and x: ϑ(A, x) = inf{n | (mn+1 : x) 6= mn }, 4 TONY J. PUTHENPURAKAL ρ(A, x) = sup{n | (mn+1 : x) 6= mn }. 3.3. Notice (mn+1 : x) = mn for all n ≥ 0 if and only if x∗ is G(A)-regular. Thus in this case ϑ(A, x) = +∞ and ρ(A, x) = −∞. If depth G(A) > 0 then x∗ is G(A)-regular, see [4, 2.1]. Thus in this case ϑ(A, x) = +∞ and ρ(A, x) = −∞. If depth G(A) = 0 then (mn+1 : x) 6= mn for some n. In this case we have ϑ(A, x), ρ(A, x) are finite numbers and clearly ϑ(A, x) ≤ ρ(A, x). By [9, 2.7 and 5.1] we have ρ(A, x) ≤ reg G(A) − 1. 3.4. A sequence x = x1 , . . . , xr in m with r ≤ d is said to be an A-superficial sequence if xi is A/(x1 , . . . , xi−1 )-superficial for i = 1, . . . , r. As the residue field of A is infinite, superficial sequences exist for all r ≤ d. As A is Cohen-Macaulay it can be easily shown that superficial sequences are regular sequences. 3.5. Let x = x1 , . . . , xd be a maximal A-superficial sequence. Set A0 = A and Ai = A/(x1 , . . . , xi ) for i = 1, . . . , d. Define ϑ(A, x) = inf{ϑ(Ai , xi+1 ) | 0 ≤ i ≤ d − 1}. Note that G(A) is Cohen-Macaulay if and only if x∗1 , . . . , x∗d is a G(A)-regular sequence, see [4, 2.1]. It follows from 3.3 that ϑ(A, x) = +∞ if and only if G(A) is Cohen-Macaulay. We have Lemma 3.6. (with hypotheses as above). If G(A) is not Cohen-Macaulay then ϑ(A, x) ≤ reg G(A) − 1. Proof. Suppose depth G(A) = i < d. Then x∗1 , . . . , x∗i is G(A)-regular, see [4, 2.1]. Furthermore G(Ai ) = G(A)/(x∗1 , . . . , x∗i ). Thus depth G(Ai ) = 0. (Note the case i = 0 is also included). By 3.3 we have that ϑ(Ai , xi+1 ) ≤ reg(G(Ai )) − 1. It remains to note that as ∗ x1 , . . . , x∗i is a regular sequence of elements of degree 1 in G(A), we have reg G(Ai ) ≤ reg G(A).  3.7. We define ϑ(A) = sup{ϑ(A, x) | x is a maximal superficial sequence in A}. Note that if G(A) is not Cohen-Macaulay then ϑ(A) ≤ reg G(A) − 1, see 3.6. If G(A) is Cohen-Macaulay then ϑ(A) = +∞. 3.8. Let A be a singular ring and Let x ∈ m be an A-superficial element. Let t = ord(A). The following fact is well-known (for instance see [10, p. 295]) (mi+1 : x) = mi for i = 0, . . . , t − 1. LOWEY LENGTH 5 It follows that ϑ(A, x) ≥ ord(A) for any superficial element x of A. Notice ord(A/(x)) ≥ ord(A) for any superficial element x of A (for instance see [10, p. 296]). Thus if x = x1 , . . . , xd is a maximal A-superficial sequence we have that ϑ(Ai , xi+1 ) ≥ ord(Ai ) ≥ ord(A) for all i = 0, . . . , d − 1. It follows that (3.8.1) ϑ(A, x) ≥ ord(A). It is possible that for some rings strict inequality in 3.8.1 can hold. Example 3.9. Let (A, m) be an one dimensional stretched Gorenstein local ring, i.e., there exists an A-superficial element x such that if n is the maximal ideal of B = A/(x) then n2 is principal. For such rings ord(B) = 2, see [11, 1.2]. So ord(A) = 2. However for stretched Gorenstein rings (m3 : x) = m2 ; see [11, 2.5]. (Note (mi+1 : x) = mi for i ≤ 1 for any Cohen-Macaulay ring A). Thus ϑ(A, x) ≥ 3. See [11, Example 3] for an example of a stretched one dimensional stretched Gorenstein local ring A with G(A) not Cohen-Macaulay. The following result is crucial in the proof of our main result. By e(A) we denote the multiplicity of A with respect to m. Lemma 3.10. Let (A, m) be a d-dimensional Cohen-Macaulay local ring with infinite residue field. Let x = x1 , . . . , xd be a maximal superficial sequence. Assume G(A) is not Cohen-Macaulay. Let n ≤ ϑ(A, x). Then mn * (x). Proof. Suppose if possible mn ⊆ (x) for some n ≤ ϑ(A, x). Set Ad = A/(x) and Ad−1 = A/(x1 , . . . , xd−1 ). Let n be the maximal ideal of Ad−1 . Notice n ≤ ϑ(Ad−1 , xd ). We have an exact sequence 0→ Ad−1 α Ad−1 Ad−1 (nn : x) → n−1 − → → n → 0. n−1 n n n n (n , xd ) Here α(a + nn−1 ) = axd + nn . Note that as mn ⊆ (x) we have Ad−1 /(nn , xd ) = Ad . Recall (ni+1 : xd ) = ni for all i < ϑ(Ad−1 , xd ). In particular we have (nn : x) = nn−1 . Thus we have λ(nn−1 /nn ) = λ(Ad ). Notice e(A) = e(Ad−1 ) = e(Ad ) = λ(Ad ), cf., [8, Corollary 11]. Furthermore for all i ≥ 0 we have λ(ni /ni+1 ) = e(Ad−1 ) − λ(ni+1 /xni ), cf., [8, Proposition 13 ]. For i = n − 1 our result implies nn = xd nn−1 . It follows that nj = xd nj−1 for all j ≥ n. In particular we have (nj : xd ) = nj−1 for all j ≥ n. As n ≤ ϑ(Ad−1 , xd ) we have that (nj : xd ) = nj−1 for all j ≤ n. It follows that x∗d is G(Ad−1 )-regular. So depth G(Ad−1 ) = 1. By Sally descent, see [8, Theorem 8] we get G(A) is CohenMacaulay. This is a contradiction.  6 TONY J. PUTHENPURAKAL 4. Proof of Theorem 1.1 In this section we prove our main Theorem. We will use the invariant ϑ(A) which is defined only when the residue field of A is infinite. We first show that to prove our result we can assume that the residue field of A is infinite. 4.1. Suppose the residue field of A is finite. Consider the flat extension B = A[X]mA[X] . Note that n = mB is the maximal ideal of B and B/n = k(X) is an infinite field. Let M be a finitely generated A-module. The following facts can be easily proved: (1) (2) (3) (4) (5) (6) (7) λB (M ⊗A B) = λA (B). mi ⊗ B = ni for all i ≥ 1. λB (B/ni+1 ) = λA (A/mi+1 ) for all i ≥ 0. ord(B) = ord(A). projdimA M = projdimB M ⊗A B. mi M = 0 if and only if ni (M ⊗A B) = 0. ℓℓA (M ) = ℓℓB (M ⊗A B). We need the following result due to Ding, see [3, 2.2,2.3,1.5]. Lemma 4.2. Let (A, m) be a Noetherian local ring and s an integer. Suppose that x ∈ m \ m2 is A-regular and the induced map x : mi−1 /mi → mi /mi+1 is injective for 1 ≤ i ≤ s. Then (1) A/ms is an epimorphic image of (ms , x). (2) There is an A-module decomposition (ms , x) ∼ A (ms , x) ⊕ . = x(ms , x) (ms , x) (x) We now give Proof of Theorem 1.1. By 4.1 we may assume that the residue field of A is infinite. If G(A) is Cohen-Macaulay then the result holds by Theorem 1.1 in [2]. So assume that G(A) is not Cohen-Macaulay. We prove index(A) ≥ ϑ(A). By 3.8.1 and 2.5 this will imply the result. Let x = x1 , . . . , xd be an A-superficial sequence with ϑ(A) = ϑ(A, x). Suppose if possible index(A) < ϑ(A, x). Say δA (A/ms ) ≥ 1 for some s < ϑ(A, x). Set A0 = A and Ai = A/(x1 , . . . , xi ). Let mi be the maximal ideal of Ai . We prove by descending induction that δAi (Ai /msi ) ≥ 1 for all i. For i = 0 this is our assumption. Now assume this is true for i. We prove it for i + 1. We first note that s < ϑ(A, x) ≤ ϑ(Ai , xi+1 ). Therefore (mj+1 : xi+1 ) = mji i for all j ≤ s. So by 4.2 we have that Ai /msi is an epimorphic image of (msi , x). Thus LOWEY LENGTH 7 δAi ((msi , x)) ≥ 1. We also have an Ai -module decomposition (msi , xi+1 ) ∼ Ai (msi , xi+1 ) ⊕ . = xi+1 (msi , xi+1 ) (msi , xi+1 ) (xi+1 ) (†) By 2.3(5) we have that δAi+1  (msi , xi+1 ) xi+1 (msi , xi+1 )  = δAi ((msi , x)) ≥ 1. Also note that δAi+1  (msi , xi+1 ) (xi+1 )  = δAi+1 (msi+1 ) = 0, by 2.3(7). By (†) and 2.3(2) it follows that     Ai Ai+1 1 ≤ δAi+1 = δ . Ai+1 (msi , xi+1 ) msi+1 This proves our inductive step. So we have δAd (Ad /msd ) ≥ 1. By 2.3(6) we have that msd = 0. It follows that ms ⊆ (x). This contradicts 3.10.  References [1] M. Auslander, A. Ding, and O. Solberg, Liftings and weak liftings of modules, J. Algebra 156 (1993), no. 2, 273-317. [2] L. Avramov, R-O. Buchweitz, S. B. Iyengar, and C. Miller, Homology of perfect complexes, Adv. Math. 223 (2010), no. 5, 1731-1781. [3] S. Ding, The associated graded ring and the index of a Gorenstein local ring, Proc. Amer. Math. Soc. 120 (1994), no. 4, 1029-1033. [4] S. Huckaba and T. Marley, Hilbert coefficients and the depths of associated graded rings, J. London Math. Soc. (2) 56 (1997), no. 1, 64-76. [5] G. J. Leuschke and R. Wiegand, Cohen-Macaulay representations, Mathematical Surveys and Monographs, 181. American Mathematical Society, Providence, RI, 2012. [6] A. Martsinkovsky, New homological invariants for modules over local rings. I, J. Pure Appl. Algebra 110 (1996), no. 1, 1-8. [7] A. Martsinkovsky, A remarkable property of the (co) syzygy modules of the residue field of a nonregular local ring, J. Pure Appl. Algebra 110 (1996), no. 1, 9-13. [8] T. J. Puthenpurakal, Hilbert-coefficients of a Cohen-Macaulay module, J. Algebra 264 (2003), no. 1, 82-97. [9] , Ratliff-Rush filtration, regularity and depth of higher associated graded modules, J. Pure Appl. Algebra 208 (2007), no. 1, 159-176. [10] M. E. Rossi and G. Valla, Cohen-Macaulay local rings of dimension two and an extended version of a conjecture of J. Sally, J. Pure Appl. Algebra 122 (1997), no. 3, 293-311 [11] J. D. Sally, Stretched Gorenstein rings, J. London Math. Soc. (2) 20 (1979), no. 1, 19-26. [12] A-M. Simon and J. R. Strooker, Reduced Bass numbers, Auslander’s -invariant and certain homological conjectures, J. Reine Angew. Math. 551 (2002), 173-218. Department of Mathematics, IIT Bombay, Powai, Mumbai 400 076 E-mail address: [email protected]
0math.AC
Distributed Security Constrained Economic Dispatch M. Hadi Amini1,2,4, Rupamathi Jaddivada1,Sakshi Mishra3, and Orkun Karabasoglu2,4 1 Department of Electrical and Computer Engineering, Carnegie Mellon University, Pittsburgh, PA, USA 2 SYSU-CMU Joint Institute of Engineering, Guandong, China 3 Energy Science, Technology and Policy, CIT interdisciplinary, Carnegie Mellon University, Pittsburgh, PA, US 4 SYSU-CMU Shunde International Joint Research Institute, Guandong, China Emails: [email protected], [email protected], [email protected], [email protected] Abstract— In this paper, we investigate two decomposition methods for their convergence rate which are used to solve security constrained economic dispatch (SCED): 1) Lagrangian Relaxation (LR), and 2) Augmented Lagrangian Relaxation (ALR). First, the centralized SCED problem is posed for a 6-bus test network and then it is decomposed into subproblems using both of the methods. In order to model the tie-line between decomposed areas of the test network, a novel method is proposed. The advantages and drawbacks of each method are discussed in terms of accuracy and information privacy. We show that there is a tradeoff between the information privacy and the convergence rate. It has been found that ALR converges faster compared to LR, due to the large amount of shared data. Keywords—Decomposition theory; security constrained economic dispatch; Distributed optimization; DC power flow I. INTRODUCTION An optimization problem is required to be solved for conducting Security Constrained Economic Dispatch (SCED) of the power system. Currently it is solved via approaches in a centralized manner, which is performed by central coordinators. A key feature of future power systems is the utilization of minimal communication in order to ameliorate power systems’ performance [1]. In the SCED, the main objective is to find generation dispatch of generators which minimizes the total cost of generation, given a specific demand, denoted by , taking the physical constraints of a power network into account [2][3]. According to [1], one of the emergent requirements of future power systems is to utilize distributed algorithms by means of data exchange among several entities. Ilić et al provide a panorama of distributed power systems in order to model and simulate complex dynamic systems [4]. A comprehensive survey on the existing distributed algorithms to solve the power dispatch problems, i.e., Economic Dispatch and optimal power flow (OPF), is presented in [5]. Kar et al also present a novel nodalbased distributed algorithm to tackle the energy management and power dispatch problems [5]. Furthermore, [6] elaborates more on the convergence properties of the distributed method to solve OPF presented in [5]. The proposed method finds a distributed solution for the first order optimality conditions, which thus reduces the optimization problem into solving a coupled system of equations. In this regard, [7] improves the convergence of the method presented in [5] by adding a few additional communication links. Augmented Lagrangian The first three authors contributed equally to this work. Relaxation (ALR) decomposition is utilized in [8] to solve the security-constrained unit commitment in a decentralized manner. In [9], a system of systems framework is proposed to solve distributed AC optimal power flow for active distribution networks. The SCED optimization problem can be represented by a constrained optimization problem and can be solved utilizing Lagrange function, i.e. where is the cost function of generation unit i. Several mathematical approaches such as linear programming have been used to tackle this problem [10]. In addition, we consider the generation limits as well as maximum line flow limits to achieve feasible solution for SCED. In order to account for the maximum line flow limits, line flows have to be determined by conducting power flow study as the first step. In this project, we use DC power flow (DCPF). It is a simplified version of power flow, but still leads to fairly accurate results. There have been several studies, which concentrated on DC power systems and DC microgrids and their effects on the system parameters, such as voltage characteristics [11]. In [12], energy management in DC microgrids and hybrid DC microgrids is utilized as a means to facilitate renewable resources integration. Ref. [13], provides a comprehensive survey on DC microgrids. The advantages of DCPF include, but are not limited to simple implementation, capability to be represented as a linear model, being noniterative, having reliable and unique solutions, and providing reasonable accuracy for active power flows. Nonetheless, the size of problem in real world power systems is too large which creates a need to divide the problem into smaller sub-problems, which are easier to solve and have lower computational burden. Hug et al introduced methods and software for power system distributed management in [14]. We decompose the problem into r sub-problems. For sub-problem i (area) we have generators to be dispatched and total number of buses is . Figure 1 shows the test network which includes two areas connected via tie-line. In this paper we assume that there are no generators and loads connected at the boundary buses, which are joined by the tie-line. We investigate the convergence rate of both ALR and LR method via this test system. the system. Consequently, for each bus we can write where i represents the bus number. These set of equations represent power flow balance at each bus, i.e. . Furthermore, in the case of DCPF, the flow in the lines, denoted by , is given by Inequality constraints: The SCED problem formulation involves limits on the generation and line flows which can all be considered as inequality constraints. These inequalities can be formulated as (2). Figure.1. Test network The rest of this paper is organized as follows: section II provides the general centralized problem formulation of SCED. Section III elaborates each of the decomposition techniques. Afterwards, section IV considers the test network and implements both the decomposition techniques, the results of which are compared and analyzed in Section V. Finally, section VI concludes the paper. II. PROBLEM FORMULATION In this paper, we are interested in the Security Constrained economic dispatch problem, which is a standard minimization problem of the form which is shown is (1). , s.t. (1) where X is the vector of control variables and state variables, is the objective function, and are the equality and inequality constraints respectively. In general, the control variables are the active power outputs and reactive power outputs, the state variables are the voltage magnitudes and angles at each of the buses. The objective of SCED is to find out the generator outputs at each of the buses, which would minimize the total cost of generation subject to the physical constraints of the system. In order to obtain these physical constraints, we perform DCPF. Hereafter we use the following notations for the parameters and variables: (set of buses in the system), (set of buses to which a generator is connected), (set of lines in the system incident on ith bus), (set of buses to which load/ demand is connected), (output of generator at bus i), (Demand at bus i), (quadratic cost function of generator at bus i), (the element in the susceptance matrix in ith row and jth column), (voltage angle at the ith bus), and (flow in the line joining ith bus and jth bus). Objective function: The objective function for the SCED problem is the cost of generation of the entire system. The cost of the generator is modeled as a quadratic cost function given by ; where, , and are the cost coefficients of the ith generating unit. Hence, the objective function is represented by in Equality constraints: In the case of contingency, there might not be enough time to carry out the entire power flow. In such a situation, the DCPF method gives a solution, which could be utilized to stabilize the system in order to ensure security of (2) Decomposition into subproblems: The optimal solution of the entire power system in a centralized manner is not only computationally expensive but very time-consuming. It also requires different regions to exchange all the data required to solve the optimization problem. Owing to this and many other factors, there is a necessity to divide the entire system into sub systems such that the SCED problem can be solved for each of the sub systems separately in a distributed way. The constraints linking different sub-problems are then taken into account and the master problem is solved. There are many techniques discussed in the literature to utilize decomposition techniques to facilitate such optimization [17][18]. In [19], the discrete ED problem is formulated as a knapsack problem. Xu et al utilized a distributed dynamic programming to solve ED problem in a distributed manner. In order to apply any of the decomposition technique, there first arises the need to divide the system into sub systems and formulate SCED problem for each of the sub systems and define the complicating constraints (constraints which require information from multiple subsystems) for the problem as a whole. Perhaps, the easiest way to decompose the huge power system network is to divide it into regions which are interconnected by tie lines. This is not only because of weak coupling but also caused by the minimum communication requirement between these subsystems. Next section introduces the elaborate formulation of the two utilized decomposition techniques. III. DECOMPOSITION TECHNIQUES A. Lagrangian Relaxation Decomposition Method Lagrangian Relaxation (LR) decomposition technique is used for solving a non-linear problem with decomposable structure, which involves complicating constraints. Complicating constraints are constraints that if relaxed, the resulting problem decomposes into simpler problems [15]. For SCED, the problem formulation is described in the previous section. The non-complicating equality constraints written as ; . We formulate non-complicating inequality constraints as (3). (3) In addition, the complicating equality and complicating inequality constraints respectively are given by (4). , ; mismatch vector of coupling constraints at iteration (4) , i.e., . We update the multipliers using (10). We define Lagrangian function as shown in (5). (5) where and are the Lagrange Multiplier vectors for equality and inequality constraints respectively and and are set of complicating equality and complicating inequality constraints respectively. Under regularity and convexity assumptions, the dual function (DF) is defined as shown in (6). (6) s.t. ; The dual function is concave and in general non-differentiable. This fundamental fact is exploited in the Lagrangian Relaxation Decomposition algorithm. The dual problem is then defined as s.t. We formulate the subproblems as shown in (7). + (7) Formulation of the decomposed system: The primal SCED problem is decomposed into r sub-problems based on the geographical regions and utility ownership of the physical system. Let denote the set of buses in the rth subsystem that has a tie line incident on it. The SCED problem can be formulated for kth subproblem as shown in (8). (10) where . If then . B. Augmented Lagrangian Relaxation Method ALR decomposition technique is used for solving nonlinear problems with decomposable structure. This approach has been widely used in power system optimization problems, for instance, Beltran et al utilized ALR decomposition to solve unit commitment problem. According to [17], one of the drawbacks of ALR method is the introduction of a nonseparable quadratic term, which requires few additional methods such as auxiliary problem principle to deal with this non-separability of the corresponding Lagrangian function. An interesting study on the application of ALR in multi-area optimal power flow is performed by Conejo and his colleagues in 2003, which highlighted the advantages of this method. According to [18], utilizing ALR to solve OPF problem will ameliorate computation efficiency. For SCED, the problem formulation is described in the previous section. With the same equations, we only classified equality constraints into as non-coupling and as coupling constraints in addition. The Lagrangian function is defined as (11). (11) (8) In the decomposed formulation, the objective function comprises the cost functions for all the generators pertaining to kth region. The physical constraints comprising of parameters belonging to more than one sub-problem are the coupling constraints for the system. If there is a tie line between pth region and qth region, the coupling constraints can be taken into account as shown in (9). (9) Four steps of the algorithm [15][16]: 1) The Largrange Multiplier vector is initialized; 2) The subproblems are solved; 3) The values of Lagrange Multipliers are updated; and 4) If stopping condition is fulfilled, the procedure terminates, otherwise the subproblems are solved again by going to step 2. In this paper, we use subgradient method for updating the Lagrange Multipliers [15]. Assume that denotes the Considering the fact that we have two subproblems for our test system, can be shown as and which correspond to subproblems one and two, respectively. We can apply this to the noncoupling inequality constraints as well to determine the inequality constraint related to each subproblem. In this paper, we keep coupling equality constraints as it is in the Lagrange function and then use directly fixing variables approach, which is called the alternating direction method. The determined subproblems are shown in (12), by writing the objective function as combination of two separable objective functions of each of the subproblems. i.e., . Here is the sequence of solving subproblems: 1) minimize the first subproblem by assigning some initial value to the variables of other subproblems, 2) solve the second subproblem by substituting the variables of the first subproblem with the ones determined in the previous step, 3) update the Lagrange multipliers accordingly. Step1) + Step2) + Step3) + (12) , Modeling the coupling inequality constraints with ALR is not straightforward. Hence, we changed the topology of our problem formulation to convert the shared inequality constraint related to the tie-line which connects the two areas, to two non-coupling inequality constraints in each subproblem separately, i.e., we add the constraints shown in (13) to subproblem (1) and subproblem (2) respectively. 1) (13) 2) These additional constraints ensure that the tie-line flow does not exceed the limit. The flowchart of implementing ALR for a two-area network is shown in Fig. 2. Figure 2. Flowchart of ALR Decomposition IV. CASE STUDY then increased. As a result, we select a=2 as the best value among the tested values. Table I. Sensitivity analysis of the parameters Case a b 1 2 3 4 5 6 7 8 9 4 0.2 3 0.2 2 0.2 1 0.2 0.5 0.2 3 0.3 3 0.1 3 0.05 2 0.05 Iteration 246 281 225 130 672 867 79 63 48 Time (sec.) 8.4 10.5 8.3 4.4 23.6 31.0 2.8 2.3 2.0 Error 2.2 % 2% 2.0 % 1.9 % 2.2% 1.9% 1.8 % 1.9 % 2.2 % Afterwards, in cases 5-8, we fix the value of a and did a sensitivity analysis on the error values with respect to changes in b. Following a similar approach which is implemented for cases 1-4, we see that also doesn’t have a linear relation with the error. By decreasing b from 4 to 1, the error first reduced, then increased and eventually it reduced again. Additionally, we should also consider the number of iterations. Between our two candidates for b value, which are 0.05 and 0.3, we select the case which has less number of iterations. As the following figure shows, the number of iterations and run-time are directly related, i.e. by increasing the number of iterations, the run-time will increase proportionally. In this case, the number of iterations for b=0.05 is considerably less than that for b=0.3. Hence, we select this value as the best value for b among the tested values. A. LR Decomposition Results Total load of the test system is 1.2 MW distributed equally at buses 1, 2, 4, and 6. The results of solving the security constrained economic dispatch for two area, 6-bus test system considering a=3, b=0.2 , for using in the subgradient method of updating Lagrange multiplier as discussed in Section III, are: It takes 10.558829 seconds to solve this optimization problem in 281 iterations. Figure 4. Run time vs number of iterations required for convergence To validate this claim, we can eventually adjust the tuning parameter such that we achieve more accurate results in less time. We solve the optimization with the values determined by case 1-4 and cases 5-8 for a and b respectively. The results represents that both error value and the number of iteration in the last case is less than all previous cases (cases 1-8). B. Augmented Lagrangian Relaxation Method Figure 3. Solutions obtained through LR Sensitivity analysis to tune the optimization parameters: The effect of the tuning parameters on the number of iterations to converge, total run-time and error value are represented in the table I. According to this table, in cases 1-4 we fix the value of b and did a sensitivity analysis on the error values with respect to changes of a. We see that error does not vary linearly with . By decreasing a from 4 to 1, the error initially reduced and Taking the initial values of tuning parameters asα = 0.1, γ = 0.15 and the initial Lagrange multiplier vector to account for each of the coupling constraints as λ = , the following results were obtained: Sensitivity analysis to tune the optimization parameters: The selection of tuning parameters is an integral part of any optimization problem. In the following lines, the sensitivity analyses of the parameters are done via parameter tuning for α and γ. compare these two techniques, both the plots are superimposed and it is observed that the time taken by LR is always less than the time taken by ALR. This is because LR takes less time to carry out each iteration. B. Comparison of the error for a given number of iterations Figure 5. Solutions obtained through ALR  γ : γ is made to vary from 0.05 to 0.75 in steps of 0.05. The initial values of γ results in oscillations and it doesn’t converge to a feasible solution. As it is further increased, the values converge and there is more or less no change in the accuracy. Further, the number of iterations required for convergence decrease and then increase. The optimum value of γ thus obtained is 0.25, resulting in faster convergence and more accuracy. The aforementioned discussion will be clear through fig. 6. For the sake of comparison, error is defined as the difference between the total generation and the total load. It has been observed that as the number of iterations for which SCED is allowed to run increases, the error in both the decomposition techniques decreases. The convergence criteria is now changed to have the absolute value of the mismatch of the power generation and consumption at each time period smaller than 0.01. Both the methods converge with substantially different number of iterations and time. The time taken by LR to converge was 78.99 seconds with 225 iterations and an error of 0.0134. While, ALR converged within 18.7721 seconds, 51 iterations and an error of 0.0033. Figure 6. Sensitivity analysis of the parameter γ  α: This is the parameter used for the Lagrange multiplier update. Larger values beyond 0.2 results in more oscillations, hence resulting in larger number of iterations for convergence.  Figure 7. Comparison of LR and ALR in terms of convergence time for given number of iterations λ: These are made to vary from 2 to 20 at each of the buses. The number of iterations required for convergence reduces greatly from 102 to 36 and then slowly increase to 70. The least number of iterations are obtained for λ chosen between the values 5 and 6 at each of the buses. Also, it is discerned from the decentralized solution that the system’s LMPs are 5.74 and 5.11 respectively. Hence initialization of λ to the values between 5 and 6 converges faster. V. DISCUSSION AND ANALYSIS A. Comparison of execution time for a given number of iterations Both the methods are run for a fixed number of iterations and the time elapsed has been noted. We observe that the time taken by LR increases linearly with the number of iterations. On the other hand, the time taken by ALR decreases and then again increases as the number of iterations for which it is allowed to run is varied. In an attempt to Figure 8. Comparison of LR and ALR in terms of error for specific number of iterations VI. CONCLUSION We utilized two decomposition methods: Lagrangian Relaxation (LR) and Augmented Lagrangian Relaxation (ALR) to solve the Security Constrained Economic Dispatch problem. In order to compare the two methods, we applied both on the same test system which consists of two areas connected via a tie-line. The time taken for LR to converge increases linearly with the number of iterations it is allowed to run for. Moreover, convergence time taken by LR is always less than that of ALR. Additionally, we investigated the effect of parameter tuning in each of the evaluated decomposition techniques on the convergence rate. Through the analysis, we have shown that appropriate tuning of optimization parameter can effectively ameliorate the convergence rate for LR and ALR decomposition methods. As a corollary, we found out that the smaller values of γ in ALR can result in oscillations. From the information privacy perspective, we found that the decomposition techniques reduce the amount of shared information between subproblems (areas). The LR method requires the sharing of the data related to tie-line flow only, i.e., voltage magnitude and angles at the boundary buses. However, a larger amount of data is required to be shared in the case of ALR decomposition technique, i.e., in addition to the information shared in the case of LR method, we also need to share the variables related to the flow of the lines that are incident on the boundary buses in each of the areas. It has been noticed that ALR converges faster compared to LR, which is cause by the large amount of shared data. Consequently, we conclude that there is a tradeoff between the information privacy and the convergence rate, i.e., sharing more data leads to faster convergence. In order to choose appropriate decomposition technique for a specific problem, three factors play a pivotal role: 1) acceptable level of information privacy, 2) convergence rate, and 3) numerical computation cost. [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] ACKNOWLEDGMENT [16] We would like to acknowledge the valuable inputs, fruitful comments, and discussions of Prof. Gabriela Hug to this article. [17] REFERENCES [18] [1] [2] T. Erseghe, “Distributed Optimal Power Flow Using ADMM,” IEEE Transactions on Power Systems, vol. 29, no. 5, pp. 2370–2380, 2014. A. J. Wood, B. F. Wollengerb, Power generation, operation, and control. John Wiley & Sons, 2012. [19] J. Zhu, “Security‐Constrained Economic Dispatch,” Optimization of Power System Operation, pp. 141–210, Oct. 2008. M. D. Ilić, J. W. Black, and M. Prica. " Distributed electric power systems of the future: Institutional and technological drivers for nearoptimal performance, " Electric Power Systems Research, vol. 77, no. 9, pp. 1160-1177, 2007. S. Kar, G. Hug, J. Mohammadi, and J. Moura, " Distributed State Estimation and Energy Management in Smart Grids: A Consensus+ Innovations Approach, " IEEE Journal of Selected Topics in Signal Processing , vol. 8, no. 6, 1022 - 1038, 2014. J. Mohammadi, S. Kar, and G. Hug, “Distributed Approach for DC Optimal Power Flow Calculations”. Available online: http://arxiv.org/abs/1410.4236 J. Mohammadi, G. Hug, and S. Kar, " Role of communication on the convergence rate of fully distributed DC optimal power flow," Proceedings of the IEEE International Conference on Smart Grid Communications (SmartGridComm), pp. 43-48, 2014. A. Kargarian, Y. Fu, and Z. Li, “Distributed security-constrained unit commitment for large-scale power systems,” IEEE Transactions on Power Systems, no. 99, pp. 1-12, Sept. 2014. A. Kargarian, Y. Fu, S. DorMohammadi, and M. Rais-Rohani, “Optimal operation of active distribution grids: a system of systems framework,” IEEE Transaction on Smart Grid, vol. 5, no. 3, pp. 12281237, May 2014. R. A. Jabr, A. H. Coonick, and B. J. Cory, “A homogeneous linear programming algorithm for the security constrained economic dispatch problem,” IEEE Transactions on Power Systems, vol. 15, no. 3, pp. 930–936, Aug. 2002. M. Farhadi, A. Mohamed, and O. Mohammed, “Connectivity and Bidirectional Energy Transfer in DC Microgrid Featuring Different Voltage Characteristics,” in Proc. IEEE Green Technol. Conf., Apr. 2013, pp. 244–249. M. Farhadi, O. Mohammed, “Adaptive energy management in redundant hybrid DC microgrid for pulse load mitigation” IEEE Trans. on Smart Grid, vol.6, no.1, pp.54-62, Jan. 2015. Ahmed T. Elsayed, Ahmed A. Mohamed, and Osama A. Mohammed, “DC microgrids and distribution systems: An overview”, Electric Power Systems Research Journal, vol. 119, Febraury 2015, 407-417. G. Hug, S. Kar, and Jose Moura. "Distributed Methods and Software For Balancing Supply and Demand In An Electric Power Network." U.S. Patent No. 20,150,025,696. 22 Jan. 2015. A. J. Conejo, E. Castillo, R. Minguez, and R. Garcia-Bertrand, Decomposition Techniques in Mathematical Programming, Springer, 2006. Gabriela Hug ,”18-879 M: Special Topics in ECE: Optimization in Energy Networks” course slides, Spring 2015, Carnegie Mellon University. C. Beltran and F. J. Heredia. "Unit commitment by augmented Lagrangian relaxation: testing two decomposition approaches," Journal of Optimization Theory and Applications, vol. 112, no. 2, pp. 295-314. F. J. Nogales, F. J. Prieto, and A. J. Conejo, "A decomposition methodology applied to the multi-area optimal power flow problem." Annals of operations research, vol. 120, no.1-4, pp. 99-116, Apr. 2003. Y. Xu, W. Zhang, and W. Liu, "Distributed dynamic programming based approach for economic dispatch in smart grids," IEEE Trans. on Industrial Informatics, vol. 11, no.1, pp.166-175, Feb. 2015.
3cs.SY
Estimating covariance functions of multivariate skew-Gaussian random fields on the sphere Alegrı́a A. a Caro S.b , Bevilacqua M.c , Porcu E.a , Clarke J.a Departamento de Matemática, Universidad Técnica Federico Santa Marı́a, Valparaı́so, Chile b Departamento de Matemática y Computación, Universidad de Santiago, Santiago, Chile c arXiv:1612.03341v3 [math.ST] 26 Jul 2017 ∗a , Instituto de Estadı́stica, Universidad de Valparaı́so, Valparaı́so, Chile Abstract This paper considers a multivariate spatial random field, with each component having univariate marginal distributions of the skew-Gaussian type. We assume that the field is defined spatially on the unit sphere embedded in R3 , allowing for modeling data available over large portions of planet Earth. This model admits explicit expressions for the marginal and cross covariances. However, the n-dimensional distributions of the field are difficult to evaluate, because it requires the sum of 2n terms involving the cumulative and probability density functions of a n-dimensional Gaussian distribution. Since in this case inference based on the full likelihood is computationally unfeasible, we propose a composite likelihood approach based on pairs of spatial observations. This last being possible thanks to the fact that we have a closed form expression for the bivariate distribution. We illustrate the effectiveness of the method through simulation experiments and the analysis of a real data set of minimum and maximum surface air temperatures. Keywords: Composite likelihood, Geodesic distance, Global data 1. Introduction The Gaussian assumption is an appealing option to model spatial data. First, the Gaussian distribution is completely characterized by its first two moments. Another interesting property is the tractability of the Gaussian distribution under linear combinations and conditioning. However, in many geostatistical applications, including oceanography, environment and the study of natural resources, the Gaussian framework is unrealistic, because the observed data have different features, such as, positivity, skewness or heavy tails, among others. Transformations of Gaussian random fields (RFs) is the most common alternative to model nonGaussian fields. Consider a spatial domain D and {Z(s), s ∈ D} defined as Z(s) = ϕ(Y (s)), where ϕ is a real-valued mapping and {Y (s), s ∈ D} is Gaussian. Apparently the finite-dimensional distributions of Z depend on the choice of ϕ. In some cases, such mapping is one-to-one and admits an inverse simplifying the analysis. In this class, we can highlight the log-Gaussian RFs, ∗ Corresponding author. Email: [email protected] Preprint submitted to Elsevier July 27, 2017 which are generated as a particular example of the Box-Cox transformation (see De Oliveira et al., 1997). However, a one-to-one transformation is not appropriate in general. For instance, Stein (1992) considers a truncated Gaussian RF, taking ϕ as an indicator function, in order to model data sets with a given percentage of zeros (for instance, precipitations). On the other hand, wrapped-Gaussian RFs have been introduced in the literature for modeling directional spatial data, arising in the study of wave and wind directions (see Jona-Lasinio et al., 2012). In addition, Xu and Genton (2016a) propose a flexible class of fields named the Tukey g-and-h RFs. Another approach consists in taking advantage of the stochastic representations of random variables. For instance, Ma (2009) considers a general approach to construct elliptically contoured RFs through mixtures of Gaussian fields. These models have an explicit covariance structure and allow a wide range of finite-dimensional distributions. Other related works have been developed by Du et al. (2012), Ma (2013a) and Ma (2013b) including Hyperbolic, K and Student’s t distributed fields. Moreover, Kim and Mallick (2004), Gualtierotti (2005) and Allard and Naveau (2007) have introduced skew-Gaussian RFs for modeling data with skewed distributions. However, Minozzo and Ferracuti (2012) and Genton and Zhang (2012) show that all these models are not valid because they cannot be identified with probability one using a single realization, i.e., in practice it is impossible to make inference on the basis of these models. Such results do not prevent the existence of RFs having univariate marginal distributions belonging to a given family. In this paper, we consider multivariate stationary RFs, where each component has a univariate marginal distribution of the skew-Gaussian type. We follow the representation proposed in the univariate case by Zhang and El-Shaarawi (2010) and extend it to the multivariate case. This construction allows for modeling data with different degrees of skewness as well as explicit expressions for the covariance function. Estimation methods for this model are still unexplored. Maximum likelihood is certainly a useful tool, but it is impracticable, because the full likelihood does not have a simple form. Indeed, if n is the number of observations, it can be explicitly expressed as the sum of 2n terms depending on the probability density function (pdf) and the cumulative distribution function (cdf) of the n-variate Gaussian distribution. Direct maximization of the likelihood seems intractable from a computational and analytical point of view. Zhang and El-Shaarawi (2010) consider the EM algorithm to perform inference on the skew-Gaussian model. However, the iterations of the EM algorithm are difficult to evaluate because each step requires Monte Carlo simulations of a non-trivial conditional expectation. On the other hand, composite likelihood (CL) is an estimation procedure (Lindsay, 1988; Varin et al., 2011; Cox and Reid, 2004) based on the likelihood of marginal or conditional events. CL methods are an attractive option when the full likelihood is difficult to write and/or when the data sets are large. This approach has been used in several spatial and space-time contexts, mainly in the Gaussian case (Vecchia, 1988; Curriero and Lele, 1999; Stein et al., 2004; Bevilacqua et al., 2012; Bevilacqua and Gaetan, 2015; Bevilacqua et al., 2016). Outside the Gaussian scenario, Heagerty and Lele (1998) propose CL inference for binary spatial data. Moreover, Padoan et al. (2010) and Sang and Genton (2014) have used CL methods for the estimation of max-stable fields, whereas Alegrı́a et al. (2016) consider a truncated CL approach for wrapped-Gaussian fields. The implementation of the CL method on multivariate skew-Gaussian fields is still unexplored. Our goal consists in developing a CL approach based on pairs of observations for a multivariate skewGaussian RF. Our contribution provides a fast and accurate tool to make inference on skewed data. The main ingredient of the pairwise CL method is the characterization of the bivariate 2 distributions of the RF, that is, we derive a closed form expression for the joint distribution between two correlated skew-Gaussian random variables (possibly with different means, variances and degrees of skewness). In addition, in order to work with data collected over the whole planet Earth, we consider the spatial domain as the unit sphere D = S2 := {s ∈ R3 : ksk = 1}, where k · k denotes the Euclidean distance. We refer the reader to Marinucci and Peccati (2011) for a more detailed study about RFs on spheres. An important implication is that the covariance function depends on a different metric, called geodesic distance. In general, covariance models valid on Euclidean spaces are not valid on the sphere, and we refer the reader to Gneiting (2013) for a overview of the problem. The paper is organized as follows. In Section 2, the multivariate skew-Gaussian RF is introduced. The bivariate distributions of the skew-Gaussian field and the CL approach are discussed in Section 3. In section 4, simulation experiments are developed. Section 5 contains a real application for a bivariate data set of minimum and maximum surface air temperatures. Finally, Section 6 provides a brief discussion. 2. Skew-Gaussian RFs on the unit sphere In this section, we introduce a skew-Gaussian model generated as a mixture of two latent Gaussian RFs. Such construction is based on the stochastic representation of skew-Gaussian random variables. Let X and Y be two independent standard Gaussian random variables and −1 ≤ δ ≤ 1. Then, the distribution of p Z = δ|X| + 1 − δ 2 Y (1) √ is called skew-Gaussian, with pdf 2φ(z)Φ(αz), for z ∈ R, where α = δ/ 1 − δ 2 . Here, φ(·) and Φ(·) denote the pdf and cdf of the standard Gaussian distribution. If δ > 0, we say that Z is right-skewed, whereas for δ < 0, Z is left-skewed. Of course, for δ = 0 we have the Gaussian case. For a detailed study of the skew-Gaussian distribution, we refer the reader to Azzalini (1985, 1986), Azzalini and Dalla Valle (1996), Azzalini and Capitanio (1999), Arellano-Valle and Azzalini (2006) and Azzalini (2013). We work with the spatial counterpart of Equation (1). Let {X(s) = (X1 (s), . . . , Xm (s))> : s ∈ S2 } and {Y (s) = (Y1 (s), . . . , Ym (s))> : s ∈ S2 } be two stationary multivariate Gaussian RFs defined on S2 . Here, m ∈ N denotes the number of components of the fields and > is the transpose operator. In addition, we assume that X(s) and Y (s) are independent, with components having zero mean and unit variance. In the spherical framework, the covariances are given in terms of the geodesic distance, defined by θ := θ(s1 , s2 ) = arccos(s> 1 s2 ) ∈ [0, π], s1 , s2 ∈ S2 , which is the most natural metric on the spherical surface. Therefore, we suppose that there exists two matrix-valued mappings rx , ry : [0, π] → Rm×m such that y x cov{Xi (s), Xj (s0 )} = rij (θ(s, s0 )) and cov{Yi (s), Yj (s0 )} = rij (θ(s, s0 )), for all s, s0 ∈ S2 and i, j = 1, . . . , m. In such case, we say that the covariance function is spherically isotropic. In the univariate case (m = 1), Gneiting (2013) establishes that some classical covariances 3 such as the Cauchy, Matérn, Askey and Spherical models, given in the classical literature in terms of Euclidean metrics, can be coupled with the geodesic distance under specific constraints for the parameters. Furthermore, Porcu et al. (2016) propose several covariance models for space-time and multivariate RFs on spherical spatial domains. Next, we define a multivariate spatial RF with each component being skew-Gaussian distributed, according to Equation (1). It is a multivariate extension of the univariate skew-Gaussian field proposed by Zhang and El-Shaarawi (2010). This model allows different means, variances and skewness in the components of the RF. Definition 2.1. A multivariate field, {Z(s) = (Z1 (s), . . . , Zm (s))> : s ∈ S2 }, with components having skew-Gaussian marginal distributions, can be defined through s ∈ S2 , i = 1, . . . , m, (2) q where µi , ηi ∈ R and σi ∈ R+ . Note that (Zi (s) − µi )/ ηi2 + σi2 , for all s ∈ S2 , follows a skewGaussian distribution with pdf given by fZi (z) = 2φ (z) Φ ((ηi /σi )z) . Remark 2.1. Recent literature considers the latent fields Xi (s), i = 1, . . . , m, as single random variables Xi , being constants along the spatial domain. However, this approach has apparent identifiability problems, since in practice we only work with one realization and there is no information about the variability of Xi . Thus, this approach only produces a shift effect in the model. These considerations are studied by Minozzo and Ferracuti (2012) and Genton and Zhang (2012). Zi (s) = µi + ηi |Xi (s)| + σi Yi (s), Direct application of the results given by Zhang and El-Shaarawi (2010) provides the following proposition. Proposition 2.1. The field Z(s) defined through Equation (2) is stationary with expectations r 2 , s ∈ S2 , E(Zi (s)) = µi + ηi π and covariances 2ηi ηj y x g(rij (θ)) + σi σj rij (θ), π √ for all i, j = 1, . . . , m, where θ = θ(s, s0 ) and g(t) = 1 − t2 + t arcsin(t) − 1, for |t| ≤ 1. Cij (θ) := cov{Zi (s), Zj (s0 )} = (3) The proof is omitted because it is obtained by using the same arguments as in Zhang and ElShaarawi (2010). 3. Composite likelihood estimation 3.1. General framework We first introduce the CL approach from a general point of view. CL methods (Lindsay, 1988) are likelihood approximations for dealing with large data sets. In addition, in the last years, these techniques have been used to study data with intractable analytical expressions for the full likelihood. The objective function for CL methods is constructed through the likelihood of marginal or conditional events. Formally, let f (z; λ) be the pdf of a n-dimensional random vector, where 4 λ ∈ Λ ⊂ Rp is an unknown parameter vector, and Λ is the parametric space. We denote by {A1 , ..., AK } a set of marginal or conditional events with associated likelihoods Lk (λ; z). Then, the objective function for the composite likelihood method is defined as the weighted product LC (λ; z) := K Y Lk (λ; z)wk , k=1 where the non-negative weights wk must be chosen according to an appropriate criterion. In principle, the weights can improve the statistical and/or computational efficiency of the estimation. We use the notation `k (λ; z) = log Lk (λ; z), thus the log composite likelihood is given by CL(λ; z) := K X `k (λ; z)wk . k=1 The maximum CL estimator is defined as b n = argmax λ λ∈Λ CL(λ; z). By construction, the composite score ∇CL(λ) is an unbiased estimating equation, i.e., E(∇CL(λ)) = 0 ∈ Rp . This is an appealing property of CL methods, since it is a first order likelihood property. On the other hand, the second order properties are related to the Godambe information matrix, defined as Gn (λ) = Hn (λ)Jn (λ)−1 Hn (λ)> , where Hn (λ) = −E(∇2 CL(λ; z)) and Jn (λ) = E(∇CL(λ; z)∇CL(λ; z)> ). The inverse of Gn (λ) is an approximation of the asymptotic variance of the CL estimator. Under increasing domain and regularity assumptions, CL estimates are consistent and asymptotically Gaussian. 3.2. Pairwise CL approach for the multivariate skew-Gaussian model We now develop a CL method based on pairs of observations for the multivariate skew-Gaussian RF. We consider the m-variate field, {Z(s) = (Z1 (s), . . . , Zm (s))> , s ∈ S2 }, defined in (2), and a realization of Z(s) at n spatial locations, namely, (Z(s1 )> , . . . , Z(sn )> )> . Then, we define all possible pairs Zijkl = (Zi (sk ), Zj (sl ))> with associated log likelihood `ijkl (λ), where λ ∈ Rp is the parameter vector. Therefore, the corresponding log composite likelihood equation is defined by (see Bevilacqua et al., 2016) CL(λ) = m n−1 n X X X ωiikl `iikl (λ) + i=1 k=1 l=k+1 m−1 X m X n X n X ωijkl `ijkl (λ). i=1 j=i+1 k=1 l=1 Note that the order of computation of the method is O{mn(n−1)/2+m(m−1)n2 /2}. Throughout, we consider a cut-off weight function (0/1 weights): wijkl = 1 if θ(sk , sl ) ≤ dij , and 0 otherwise, for some cut-off distances dij . This choice has apparent computational advantages. Moreover, it can improve the efficiency as it has been shown in Joe and Lee (2009), Davis and Yau (2011) and Bevilacqua et al. (2012). The intuition behind this approach is that the correlations between pairs of distant observations are often nearly zero. Therefore, using all possible pairs can generate a loss of efficiency, since redundant pairs can produce bias in the results. 5 From now on, we use the notation  Ω(r) =  1 r . r 1 (4) The following result characterizes the pairwise distributions for the multivariate skew-Gaussian RF. We suppose that ηi 6= 0, for all i = 1, . . . , m. The case with zero skewness is reduced to the Gaussian scenario. Proposition 3.1. Consider two sites sk , sl ∈ S2 and θ = θ(sk , sl ). The log likelihood associated to the pair Zijkl = (Zi (sk ), Zj (sl ))> in the multivariate skew-Gaussian model (2) is given by `ijkl (λ) = log 2 2 X ! φ2 (Zijkl − µ; At )Φ2 (Lt ; Bt ) (5) t=1 where φ2 (y; Σ) denotes the bivariate Gaussian density function with zero mean and covariance matrix Σ. Similarly, Φ2 (l; Σ) denotes the corresponding Gaussian cdf. Here, µ = (µi , µj )> , x At = Ω2 + Υ−1 Ω[(−1)t rij (θ)]Υ−1 , x Bt = ([ΥΩ2 Υ]−1 + Ω[(−1)t rij (θ)]−1 )−1 , −1  t x −1 Lt = I2 + ΥΩ2 ΥΩ[(−1) rij (θ)] Υ(Zijkl − µ), where Υ = diag{1/ηi , 1/ηj }, I2 is the identity matrix of order (2 × 2) and  2  σi σi σj y Ω2 = ◦ Ω(rij (θ)), σi σj σj2 where ◦ denotes the Hadamard product. We have deduced a closed form expression for the bivariate distributions of the field. Note that x alternates its sign in each element of the sum. Evaluation of Equation the correlation function rij (5) requires the numerical calculation of the bivariate Gaussian cdf. The proof of Proposition 3.1 is deferred to Appendix A. 4. Simulation study This section assesses through simulation experiments the statistical and computational performance of the pairwise CL method. We pay attention to bivariate (m = 2) skew-Gaussian RFs on S2 . 4.1. Parameterization We believe that there are no strong arguments to consider different correlation structures rx (·) and ry (·) for the latent RFs. For example, the smoothness of the skew-Gaussian RF is the same as the smoothness of the roughest latent Gaussian field. Moreover, if both latent correlations are 6 compactly supported, thus the covariance generated has also compact support. We thus consider latent fields belonging to the same parametric family of correlation functions, x rij (θ) = ρxij r(θ; cxij ), y rij (θ) = ρyij r(θ; cyij ), i, j = 1, 2, θ ∈ [0, π], where ρxii = 1, ρx12 = ρx21 , |ρx12 | ≤ 1 and cxij > 0 (and similar conditions for ρyij and cyij ), with mapping θ 7→ r(θ; c) being any univariate correlation function on the sphere (see Gneiting, 2013). The particular choice of r(·; ·) produces additional restrictions on the parameters. Throughout, we work with   3θ , θ ∈ [0, π], (6) r(θ; c) = exp − c or   θ 4 , θ ∈ [0, π], (7) r(θ; c) = 1 − c + where c > 0 is a scale parameter and (a)+ = max{0, a}. Mappings (6) and (7) are known as Exponential and Askey models, respectively. The former decreases exponentially to zero and it takes values less than 0.05 for θ > c, whereas the second is compactly supported, that is, it is identically equal to zero beyond the cut-off distance c. Explicit parametric conditions for the validity of the bivariate Exponential model are provided by Porcu et al. (2016). On the other hand, Appendix B illustrates a construction principle that justify the use of bivariate Askey models on spheres. An interesting property is that the collocated correlation coefficient between the components of p a bivariate skew-Gaussian RF, C12 (0)/ C11 (0)C22 (0), with C12 (·) defined in (3), depends on the majority of the model parameters. Figure 1 shows the behavior of this coefficient in terms of the latent correlation coefficients ρxij and ρyij , with σ12 = σ22 = 1 and under two different settings for the skewness parameters: (η1 , η2 ) = (1, 3) and (η1 , η2 ) = (1, −3). Note that the correlation between left-skewed and right-skewed fields has a more restrictive upper bound and this case admits strong negative correlations. The following studies are based on the parsimonious parameterizations ρ12 := ρx12 = ρy12 , cij := cxij = cyij and c12 = (c11 + c22 )/2. The parameter vector is given by λ = (σ12 , σ22 , η1 , η2 , c11 , c22 , ρ12 , µ1 , µ2 )> . In addition, this parameterization avoids identifiability problems. Figure 2 shows the covariance C12 (θ), in Equation (3), generated from the latent correlation functions (6) and (7). The skew-Gaussian RF preserves the correlation shape of the latent fields. Figure 3 depicts a bivariate realization of a skew-Gaussian RF, over 15000 spatial locations, with latent fields having Exponential correlations. We have simulated using Cholesky decomposition with σ12 = 0.1, σ22 = 0.5, η1 = 2, η2 = 1, µ1 = µ2 = 0, ρ12 = 0.9 and c11 = c22 = 0.6. The skewness of the simulated data is illustrated through the corresponding histograms. 4.2. Results We illustrate the saving of the pairwise CL method in terms of computational burden. All experiments were carried out on a 2.7 GHz processor with 8 GB of memory and the estimation procedures were implemented coupling R functions and C routines. Table 1 provides the computational times (in seconds) in evaluating the weighted CL method, with cut-off distance equal 7 Figure 1: Collocated correlation coefficient between the components of a bivariate skew-Gaussian RF in terms of ρxij and ρyij . We consider σ12 = σ22 = 1 and two scenarios for the skewness parameters: (η1 , η2 ) = (1, 3) (left) and (η1 , η2 ) = (1, −3) (right). Figure 2: Covariance function associated to the skew-Gaussian RF, with latent correlations of Exponential (solid line) and Askey (dashed line) types. Figure 3: Bivariate simulation from the skew-Gaussian model with latent fields having Exponential correlation functions. Both variables are right-skewed and the empirical collocated correlation coefficient is approximately 0.7. 8 Table 1: Time (in seconds) in evaluating CL method, with 0/1 weights, considering different number of observations and cut-off distances dij = 0.25, 0.5, 0.75, 1 (in radians). dij = 0.25 dij = 0.5 dij = 0.75 dij = 1 250 0.003 0.005 0.007 0.008 500 0.007 0.012 0.017 0.022 Number of observations 1000 2000 4000 8000 0.016 0.068 0.254 0.954 0.033 0.134 0.498 1.910 0.050 0.205 0.796 3.020 0.066 0.290 1.139 4.357 16000 3.753 8.021 12.024 17.365 to dij = 0.25, 0.5, 0.75, 1 radians, for all i, j = 1, 2. These results show that CL has a moderate computational cost even for large data sets. Indeed, the most demanding part in the evaluation of the objective function is the repeated numerical calculation of the bivariate Gaussian cdf. We now study the statistical efficiency of the estimation method. We consider 289 spatial sites in a grid on S2 , which is generated with 17 equispaced longitude and latitude points. We use the latent correlation functions (6) and (7), with σ12 = σ22 = 1, µ1 = µ2 = 0, c11 = 0.15, c22 = 0.25 and ρ12 = 0.5, under the following choices for the skewness parameters: (A) We set η1 = 1 and η2 = 2. In this case, both components are right-skewed and the collocated correlation coefficient between the components of the field is approximately 0.45. (B) We set η1 = 1 and η2 = −2. The first component of the field is right-skewed, whereas the second one is left-skewed, and the collocated correlation coefficient between the components of the field is approximately 0.19. In total, we have four scenarios: • Scenario (I). Exponential model under choice (A). • Scenario (II). Askey model under choice (A). • Scenario (III). Exponential model under choice (B). • Scenario (IV). Askey model under choice (B). For each scenario, we simulate 500 independent realizations from the bivariate skew-Gaussian RF. Then, we estimate the parameters using the weighted pairwise CL method. We set dij = 0.5 radians for the 0/1 weights, for all i, j = 1, 2. Figure 4 reports the boxplots of the CL estimates. All studies show the effectiveness of our proposal. We have also applied CL estimation to other parametric models, such as, the Cauchy and Wendland correlation functions. For each case considered the pairwise CL performs well. Finally, we assess the performance of the pairwise CL method with increasing scale parameters cij as well as increasing sample sizes n. For simplicity, all the subsequent experiments consider a single scale parameter cij = c, for all i, j = 1, 2. In this case, the parameter vector reduces to λ = (σ12 , σ22 , η1 , η2 , c, ρ12 , µ1 , µ2 )> . We consider an Exponential latent correlation under the following parametric setting: σ12 = σ22 = η1 = 1, η2 = 2, µ1 = µ2 = 0 and ρ12 = 0.5. Figure 5 reports the centered boxplots of the CL estimates in three different cases: c = 0.15, 0.45, 0.75. The increase of the parameter c imply that the spatial dependence will be strengthened, and it produces 9 Figure 4: Boxplots of the CL estimates for the bivariate skew-Gaussian RF, under Scenarios (I)-(IV). Figure 5: Centered boxplots of the CL estimates, for the bivariate skew-Gaussian RF, using an Exponential latent correlation and different scale parameters: c = 0.15, 0.45, 0.75. 10 Figure 6: Centered boxplots of the CL estimates, for the bivariate skew-Gaussian RF, using an Exponential latent correlation and different sample sizes: n = 81, 169, 289. biased estimates of c and ρ12 . Our findings are consistent and add more evidence to the results reported in the previous literature (Zhang, 2004; Bevilacqua et al., 2012; Xu and Genton, 2016b). On the other hand, we set c = 0.15, and we consider increasing sample sizes: n = 81, 169, 289, in grids generated with 9, 13 and 17 equispaced longitude and latitude points, respectively. As expected, more observations produce better estimations in terms of variability and bias. 5. A bivariate data set We analyze a bivariate data set of Minimum (Variable 1) and Maximum (Variable 2) surface air temperatures. The spatial variability of temperatures is crucial for modeling hydrological and agricultural phenomena. These data outputs come from the Community Climate System Model (CCSM4.0) (see Gent et al., 2011) provided by NCAR (National Center for Atmospheric Research) located at Boulder, CO, USA. We have monthly data over a grid of 2.5×2.5 degrees of spatial resolution. The unit for temperatures is Kelvin degrees. We focus on July of 2015 and we subtract the historical location-wise July average (considering the previous 50 years). Figure 7 depicts the resulting residuals for the global data set. In order to ensure spherical isotropy, we only consider locations with latitudes between −30 and 30 degrees. The final data set consists of 3456 observations per each variable. These variables are strongly correlated, since the empirical correlation is 0.68. The histogram of each variable reflects a certain degree of right skewness (see Figure 8 below). Thus, the residuals can be modeled approximately with our proposal, considering planet Earth as a sphere of radius 6378 kilometers. We fit a bivariate skew-Gaussian RF with latent correlations of Exponential type. We use as benchmark a purely Gaussian model by taking Equation (2) with ηi = 0, for i = 1, 2. We have considered the parameterization introduced in the previous sections, so that, the skew-Gaussian 11 Figure 7: Residuals of the Minimum (left) and Maximum (right) surface air temperatures in July of 2015. model has 9 parameters, whereas the Gaussian model has 7 parameters. The CL estimation is carried out using only pairs of observations whose spatial distances are less than 1592.75 kilometers (equivalent to 0.25 radians on the unit sphere). Table 2 reports the CL estimates for the skewGaussian and Gaussian models. The units of the scale parameters are kilometers. The optimal values of the CL objective functions are given in Table 3. Note that the maximum CL value under the skew-Gaussian model is superior to the merely Gaussian model. It is clear that the incorporation of skewness produces improvements in goodness-of-fit. Figure 8 shows the histograms of each variable and the fitted skew-Gaussian and Gaussian density functions. In Figure 9, the marginal and cross empirical semi-variograms are compared to the theoretical models. Finally, we compare both models in terms of their predictive performance. Since the covariance structure of the skew-Gaussian field is known explicitly, we use the classical best linear unbiased predictor (cokriging), which is optimal for the Gaussian model, in terms of mean squared error. However, it is not optimal for the skew-Gaussian RF. In spite of this, we will show that the skewGaussian model provides better predictive results. We use a drop-one prediction strategy and quantify the discrepancy between the real and predicted values through the root mean squared prediction error (RMSPE) v u 2 X n u 1 X bi (sk ))2 RMSPE = t (Zi (sk ) − Z 2n i=1 k=1 and the Log-score (LSCORE) " # 2 n bi (sk ))2 1 X X log(2πb σi2 (sk )) (Zi (sk ) − Z LSCORE = + , 2n 2 2b σi2 (sk ) i=1 k=1 bi (sk ) is the drop-one prediction of Zi (sk ) at location where n is the number of spatial locations, Z 2 sk and σ bi (sk ) is the drop-one prediction variance (see Zhang and Wang, 2010). Note that the 12 Figure 8: Histograms for the residuals of the Minimum (left) and Maximum (right) surface air temperatures, considering observations with latitudes between −30 and 30 degrees, and the fitted skew-Gaussian (solid line) and Gaussian (dashed line) probability density functions. skew-Gaussian model generates better results since the mentioned indicators are smaller. In terms of RMSPE, the improvement in the prediction is approximately 3.1%. 6. Discussion Building models for non-Gaussian RFs has become a major challenge and more efforts should be devoted to such constructions. In particular, it seems that the main difficulties arise when trying to build models that are statistically identifiable. Another major problem, on the other hand, comes when building the finite dimensional distributions, which are analytically intractable in most cases. This paper has provided an approach that allows to avoid the identifiability problem in multivariate skew-Gaussian RFs, and that permits to implement a CL approach. Figure 9: Empirical semi-variograms versus fitted semi-variograms, using Exponential latent correlations, for the skew-Gaussian (solid line) and Gaussian (dashed line) models. 13 Table 2: CL estimates for the skew-Gaussian and Gaussian RFs, using Exponential latent correlations. Scale parameters are given in kilometers. skew-Gaussian Gaussian σ b12 0.223 0.310 σ c2 2 0.179 0.419 ηb1 0.487 - ηb2 0.769 - b c11 4995.9 3922.4 b c22 4867.1 3393.1 ρb12 0.819 0.743 µ b1 0.250 0.635 µ b2 0.079 0.674 Table 3: Prediction performance of the skew-Gaussian and Gaussian RFs, using Exponential latent correlations. skew-Gaussian Gaussian # parameters 9 7 CL −1095912 −1127334 RMSPE 0.219 0.226 LSCORE −0.101 0.028 We have shown that the pairwise CL method performs well under different correlation structures and parametric settings. We believe that CL approaches can be adapted to other families of nonGaussian fields, such as, Student’s t or Laplace RFs, among others. At the same time, the real data example illustrates that the incorporation of skewness can produce significant improvements in terms of prediction in comparison to a Gaussian model. Since the optimal predictor for the skew-Gaussian model, with respect to a squared error criterion, is non-linear and difficult to evaluate explicitly, a relevant research direction is the search for methods that approximate this predictor. Indeed, Monte Carlo methods are an appealing option (Zhang and El-Shaarawi, 2010). However, from a computational point of view, Monte Carlo samples are difficult to produce efficiently and such a method can be unfeasible for large data sets. Acknowledgments Alfredo Alegrı́a is supported by Beca CONICYT-PCHA/Doctorado Nacional/2016-21160371. Moreno Bevilacqua is partially supported by Proyecto Fondecyt 1160280. Emilio Porcu is supported by Proyecto Fondecyt Regular number 1130647. Jorge Clarke is supported by Proyecto Fondecyt PostDoctorado number 3150506. We also acknowledge the World Climate Research Programme’s Working Group on Coupled Modelling, which is responsible for Coupled Model Intercomparison Project (CMIP). Appendix A. Pairwise distributions for the multivariate skew-Gaussian RF Before we state the proof of Proposition 3.1, we need the following property of quadratic forms. Lemma Let A and B be two symmetric positive definite matrices of order (n × n) and x, a ∈ Rn . Then, we have the following identity: (a − x)> A−1 (a − x) + x> B −1 x = (x − c)> (A−1 + B −1 )(x − c) + a> (A + B)−1 a, where c = (A−1 + B −1 )−1 A−1 a. 14 (A.1) Proof of Proposition 3.1 Consider W = (|X1 |, |X2 |)> , V = (Y1 , Y2 )> , µ = (µ1 , µ2 )> , η = (η1 , η2 )> and σ = (σ1 , σ2 )> , where (X1 , X2 )> ∼ N2 (0, Ω(rx )) and (Y1 , Y2 )> ∼ N2 (0, Ω(ry )) are independent, with Ω(r) as defined in (4). Let Z = (Z1 , Z2 )> defined through Z =µ+η◦W +σ◦V, where ◦ denotes the Hadamard product. Therefore, the joint probability density function of Z is given by Z fZ (z) = fZ|(W =w) (z|w)fW (w)dw, (A.2) R2+ Here, fW (w) is the pdf of the random vector W and w = (w1 , w2 )> . Note that the cdf of the random vector W can be written as FW (w1 , w2 ) = Φ2 (w1 , w2 ; Ω(rx ))−Φ2 (−w1 , w2 ; Ω(rx ))−Φ2 (w1 , −w2 ; Ω(rx ))+Φ2 (−w1 , −w2 ; Ω(rx )) Then, we can obtain the pdf of W ,   x x fW (w1 , w2 ) = 2 φ2 (w1 , w2 ; Ω(r )) + φ2 (−w1 , w2 ; Ω(r )) ,   x x = 2 φ2 (w1 , w2 ; Ω(r )) + φ2 (w1 , w2 ; Ω(−r )) . On the other hand, fZ|W =w (z|w) is the pdf of the random vector Z|(W = w) ∼ N2 (µ+η ◦w; Ω2 ), with   2 σ1 σ1 σ2 ◦ Ω(ry ). Ω2 = σ1 σ2 σ22 Therefore, evaluation of the integral (A.2) requires the characterization of an integral of the form Z I = φ2 (z − µ − η ◦ w; Ω2 )φ2 (w; Ω1 )dw, R2+ with Ω1 being Ω(rx ) or Ω(−rx ). Moreover, I can be written as Z I = |Υ| φ2 (Υ(z − µ) − w; ΥΩ2 Υ)φ2 (w; Ω1 )dw R2+ where Υ = diag{1/η1 , 1/η2 }. Thus, using Equation (A.1) we have   Z  −1 −1 −1 I = |Υ|φ2 Υ(z − µ); ΥΩ2 Υ + Ω1 φ2 w − L; ([ΥΩ2 Υ] + Ω1 ) dw, R2  + −1 = |Υ|φ2 Υ(z − µ); ΥΩ2 Υ + Ω1 Φ2 (L; ([ΥΩ2 Υ]−1 + Ω−1 1 ) )   −1 −1 −1 = φ2 z − µ; Ω2 + Υ Ω1 Υ Φ2 (L; ([ΥΩ2 Υ]−1 + Ω−1 1 ) )   where L = I2 + ΥΩ2 ΥΩ−1 1 −1 Υ(z − µ). 15 Appendix B. Multivariate Askey model on the sphere We consider a multivariate Askey model for the sphere S2 , defined according to   θ 4 ρij r(θ; cij ) = ρij 1 − , cij + θ ∈ [0, π], i, j = 1, . . . , m, which has been used through Sections 4 and 5, considering cij = (cii + cjj )/2. We claim that such a model is positive definite using the following mixture (see Daley et al., 2015) Z ∞ r(θ; ξ)ξ 2 r(ξ; cij )dξ, θ ∈ [0, π]. r(θ; cij ) ∝ 0 The results of Gneiting (2013) for the univariate Askey model, coupled with the conditions developed by Daley et al. (2015) complete our assertion. References References Alegrı́a, A., Bevilacqua, M., Porcu, E., 2016. Likelihood-based inference for multivariate space-time wrappedGaussian fields. Journal of Statistical Computation and Simulation 86 (13), 2583–2597. Allard, D., Naveau, P., 2007. A New Spatial Skew-Normal Random Field Model. Communications in Statistics Theory and Methods 36 (9), 1821–1834. Arellano-Valle, R., Azzalini, A., 2006. On the unification of families of skew-normal distributions. Scandinavian Journal of Statistics 33, 561–574. Azzalini, A., 1985. A class of distributions which includes the normal ones. Scandinavian Journal of Statistics 12 (2), 171–178. Azzalini, A., 1986. Further results on a class of distributions which includes the normal ones. Statistica 46 (2), 199–208. Azzalini, A., 2013. The skew-normal and related families. Vol. 3. Cambridge University Press. Azzalini, A., Capitanio, A., 1999. Statistical applications of the multivariate skew normal distribution. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 61 (3), 579–602. Azzalini, A., Dalla Valle, A., 1996. The multivariate skew-normal distribution. Biometrika 83 (4), 715–726. Bevilacqua, M., Alegria, A., Velandia, D., Porcu, E., 2016. Composite likelihood inference for multivariate Gaussian random fields. Journal of Agricultural, Biological, and Environmental Statistics 21 (3), 448–469. Bevilacqua, M., Gaetan, C., 2015. Comparing composite likelihood methods based on pairs for spatial Gaussian random fields. Statistics and Computing 25 (5), 877–892. Bevilacqua, M., Gaetan, C., Mateu, J., Porcu, E., 2012. Estimating space and space-time covariance functions for large data sets: a weighted composite likelihood approach. Journal of the American Statistical Association 107, 268–280. Cox, D., Reid, N., 2004. Miscellanea: A note on pseudolikelihood constructed from marginal densities. Biometrika 91, 729–37. Curriero, F., Lele, S., 1999. A composite likelihood approach to semivariogram estimation. Journal of Agricultural, Biological and Environmental Statistics 4, 9–28. Daley, D., Porcu, E., Bevilacqua, M., 2015. Classes of compactly supported covariance functions for multivariate random fields. Stochastic Environmental Research and Risk Assessment 29 (4), 1249–1263. Davis, R., Yau, C.-Y., 2011. Comments on pairwise likelihood in time series models. Statistica Sinica 21, 255–277. De Oliveira, V., Kedem, B., Short, D., 1997. Bayesian prediction of transformed Gaussian random fields. Journal of the American Statistical Association 92, 1422–1433. Du, J., Leonenko, N., Ma, C., Shu, H., 2012. Hyperbolic vector random fields with hyperbolic direct and cross covariance functions. Stochastic Analysis and Applications 30 (4), 662–674. 16 Gent, P., Danabasoglu, G., Donner, L., Holland, M., Hunke, E., Jayne, S., Lawrence, D., Neale, R., Rasch, P., Vertenstein, M., Worley, P., Yang, Z.-L., Zhang, M., 2011. The Community Climate System Model Version 4. Journal of Climate 24 (19), 4973–4991. Genton, M. G., Zhang, H., 2012. Identifiability problems in some non-Gaussian spatial random fields. Chilean Journal of Statistics 3 (2). Gneiting, T., 2013. Strictly and non-strictly positive definite functions on spheres. Bernoulli 19 (4), 1327–1349. Gualtierotti, A., 2005. Skew-normal processes as models for random signals corrupted by Gaussian noise. International Journal of Pure and Applied Mathematics 20, 109–142. Heagerty, P., Lele, S., 1998. A composite likelihood approach to binary spatial data. Journal of the American Statistical Association 93, 1099–1111. Joe, H., Lee, Y., 2009. On weighting of bivariate margins in pairwise likelihood. Journal of Multivariate Analysis 100, 670–685. Jona-Lasinio, G., Gelfand, A., Jona-Lasinio, M., 12 2012. Spatial analysis of wave direction data using wrapped Gaussian processes. The Annals of Applied Statistics 6 (4), 1478–1498. Kim, H., Mallick, B., 2004. A bayesian prediction using the skew Gaussian distribution. Journal of Statistical Planning and Inference 120 (1-2), 85–101. Lindsay, B., 1988. Composite likelihood methods. Contemporary Mathematics 80, 221–239. Ma, C., 2009. Construction of non-Gaussian random fields with any given correlation structure. Journal of Statistical Planning and Inference 139, 780–787. Ma, C., 2013a. K-distributed vector random fields in space and time. Statistics & Probability Letters 83 (4), 1143– 1150. Ma, C., 2013b. Student’s t vector random fields with power-law and log-law decaying direct and cross covariances. Stochastic Analysis and Applications 31 (1), 167–182. Marinucci, D., Peccati, G., 2011. Random fields on the sphere: representation, limit theorems and cosmological applications. Vol. 389. Cambridge University Press. Minozzo, M., Ferracuti, L., 2012. On the existence of some skew-normal stationary processes. Chilean Journal of Statistics 3, 157. Padoan, S., Ribatet, M., Sisson, S., 2010. Likelihood-based inference for max-stable processes. Journal of the American Statistical Association 105, 263–277. Porcu, E., Bevilacqua, M., Genton, M., 2016. Spatio-Temporal Covariance and Cross-Covariance Functions of the Great Circle Distance on a Sphere. Journal of the American Statistical Association 111 (514), 888–898. Sang, H., Genton, M. G., 2014. Tapered composite likelihood for spatial max-stable models. Spatial Statistics 8, 86–103. Stein, M., 1992. Prediction and Inference for Truncated Spatial Data. Journal of Computational and Graphical Statistics 1, 91–110. Stein, M., Chi, Z., Welty, L., 2004. Approximating likelihoods for large spatial data sets. Journal of the Royal Statistical Society B 66, 275–296. Varin, C., Reid, N., Firth, D., 2011. An overview of composite likelihood methods. Statistica Sinica 21, 5–42. Vecchia, A., 1988. Estimation and model identification for continuous spatial processes. Journal of the Royal Statistical Society B 50, 297–312. Xu, G., Genton, M. G., 2016a. Tukey g-and-h Random Fields. Journal of the American Statistical Association (To appear). Xu, G., Genton, M. G., 2016b. Tukey max-stable processes for spatial extremes. Spatial Statistics 18, 431 – 443. Zhang, H., 2004. Inconsistent estimation and asymptotically equal interpolations in model-based geostatistics. Journal of the American Statistical Association 99 (465), 250–261. Zhang, H., El-Shaarawi, A., 2010. On spatial skew-Gaussian processes and applications. Environmetrics 21 (1), 33–47. Zhang, H., Wang, Y., 2010. Kriging and cross-validation for massive spatial data. Environmetrics 21 (3-4), 290–304. 17
10math.ST
Non-linear estimation is easy arXiv:0710.4486v1 [cs.CE] 24 Oct 2007 Michel Fliess Projet ALIEN, INRIA Futurs & Équipe MAX, LIX (CNRS, UMR 7161), École polytechnique, 91128 Palaiseau, France. E-mail : [email protected] Cédric Join Projet ALIEN, INRIA Futurs & CRAN (CNRS, UMR 7039), Université Henri Poincaré (Nancy I), BP 239, 54506 Vandœuvre-lès-Nancy, France. E-mail : [email protected] Hebertt Sira-Ramı́rez CINVESTAV-IPN, Sección de Mecatrónica, Departamento de Ingenierı́a Eléctrica, Avenida IPN, No. 2508, Col. San Pedro Zacatenco, AP 14740, 07300 México D.F., México. E-mail : [email protected] Abstract: Non-linear state estimation and some related topics, like parametric estimation, fault diagnosis, and perturbation attenuation, are tackled here via a new methodology in numerical differentiation. The corresponding basic system theoretic definitions and properties are presented within the framework of differential algebra, which permits to handle system variables and their derivatives of any order. Several academic examples and their computer simulations, with on-line estimations, are illustrating our viewpoint. Keywords: Non-linear systems, observability, parametric identifiability, closed-loop state estimation, closed-loop parametric identification, closed-loop fault diagnosis, closed-loop fault tolerant control, closed-loop perturbation attenuation, numerical differentiation, differential algebra. Biographical notes: M. Fliess is a Research Director at the Centre National de la Recherche Scientifique and works at the École Polytechnique (Palaiseau, France). He is the head of the INRIA project called ALIEN, which is devoted to the study and the development of new techniques in identification and estimation. In 1991 he invented with J. Lévine, P. Martin, and P. Rouchon, the notion of differentially flat systems which is playing a major rôle in control applications. C. Join received his Ph.D. degree from the University of Nancy, France, in 2002. He is now an Associate Professor at the University of Nancy and is a member of the INRIA project ALIEN. He is interested in the development of estimation technics for linear and non-linear systems with a peculiar emphasis in fault diagnosis and accommodation. His research involves also signal and image processing. H. Sira-Ramı́rez obtained the Electrical Engineer’s degree from the Universidad de Los Andes in Mérida (Venezuela) in 1970. He later obtained the MSc in EE and the Electrical Engineer degree, in 1974, and the PhD degree, also in EE, in 1977, all from the Massachusetts Institute of Technology (Cambridge, USA). Dr. Sira-Ramı́rez worked for 28 years at the Universidad de Los Andes where he held the positions of: Head of the Control Systems Department, Head of the Graduate Studies in Control Engineering and Vicepresident of the University. Currently, he is a Titular Researcher in the Centro de Investigación y Estudios Avanzados del Instituto Politécnico Nacional (CINVESTAV-IPN) in México City (México). Dr Sira-Ramı́rez is a Senior Member of the Institute of Electrical and Electronics Engineers (IEEE), a Distinguished Lecturer from the same Institute and a Member of the IEEE International Committee. He is also a member of the Society for Industrial and Applied Mathematics (SIAM), of the International Federation of Automatic Control (IFAC) and of the American Mathematical Society (AMS). He is a coauthor of the books, Passivity Based Control of Euler-Lagrange Systems published by Springer-Verlag, in 1998, Algebraic Methods in Flatness, Signal Processing and State Estimation, Lagares 2003, Differentially Flat Systems, Marcel Dekker, 2004, Control de Sistemas No Lineales Pearson-Prentice Hall 2006, and of Control Design Techniques in Power Electronics Devices, Springer, 2006. Dr. Sira-Ramı́rez is interested in the theoretical and practical aspects of feedback regulation of nonlinear dynamic systems with special emphasis in Variable Structure 1 Introduction 1.1 General overview Since fifteen years non-linear flatness-based control (Fliess, Lévine, Martin & Rouchon (1995, 1999)) has been quite effective in many concrete and industrial applications (see also Lamnabhi-Lagarrigue & Rouchon (2002b); Rudolph (2003); Sira-Ramı́rez & Agrawal (2004)). On the other hand, most of the problems pertaining to non-linear state estimation, and to related topics, like • parametric estimation, • fault diagnosis and fault tolerant control, • perturbation attenuation, title of this paper4 where non-linear asymptotic estimators are replaced by differentiators, which are easy to implement5 . Remark 1.1. This approach to non-linear estimation should be regarded as an extension of techniques for linear closed-loop parametric estimation (Fliess & Sira-Ramı́rez (2003, 2007)). Those techniques gave as a byproduct linear closed-loop fault diagnosis (Fliess, Join & Sira-Ramı́rez (2004)), and linear state reconstructors (Fliess & SiraRamı́rez (2004a)), which offer a promising alternative to linear asymptotic observers and to Kalman’s filtering. 1.2 Numerical differentiation: a short summary of our approach . Let us start with the first degree polynomial time funcremain largely open in spite of a huge literature1 . This tion p (t) = a + a t, t ≥ 0, a , a ∈ R. Rewrite thanks to 1 0 1 0 1 paper aims at providing simple and effective design classic operational calculus (see, e.g., Yosida (1984)) p as 1 methods for such questions. This is made possible by the P = a0 + a1 . Multiply both sides by s2 : 2 1 s s following facts: s2 P1 = a0 s + a1 (1) According to the definition given by Diop & Fliess (1991a,b), a non-linear input-output system is observable Take the derivative of both sides with respect to s, which if, and only if, any system variable, a state variable for corresponds in the time domain to the multiplication by instance, is a differential function of the control and −t: dP1 output variables, i.e., a function of those variables and s2 + 2sP1 = a0 (2) ds their derivatives up to some finite order. This definition is easily generalized to parametric identifiability and The coefficients a0 , a1 are obtained via the triangular sysfault isolability. We will say more generally that an tem of equations (1)-(2). We get rid of the time derivatives, 2 2 dP1 unknown quantity may be determined if, and only if, it i.e., of sP1 , s P1 , and s ds , by multiplying both sides of −n is expressible as a differential function of the control and Equations (1)-(2) by s , n ≥ 2. The corresponding iterated time integrals are low pass filters which attenuate the output variables. corrupting noises, which are viewed as highly fluctuating It follows from this conceptually simple and natural view- phenomena (cf. Fliess (2006)). A quite short time window point that non-linear estimation boils down to numerical is sufficient for obtaining accurate values of a0 , a1 . The extension to polynomial functions of higher degree differentiation, i.e., to the derivatives estimations of noisy 2 is straightforward. For derivatives estimates up to some time signals . This classic ill-posed mathematical prob3 finite order of a given smooth function f : [0, +∞) → R, lem has been already attacked by numerous means . We take a suitable truncated Taylor expansion around a given follow here another thread, which started in Fliess & Siratime instant t0 , and apply the previous computations. ReRamı́rez (2004b) and Fliess, Join, Mboup & Sira-Ramı́rez setting and utilizing sliding time windows permit to es(2004, 2005): derivatives estimates are obtained via intetimate derivatives of various orders at any sampled time grations. This is the explanation of the quite provocative instant. 1 See, e.g., the surveys and encyclopedia edited by Aström, Blanke, Isidori, Schaufelberger & Sanz (2001); Lamnabhi-Lagarrigue & Rouchon (2002a,b); Levine (1996); Menini, Zaccarian & Abdallah (2006); Nijmeijer & Fossen (1999); Zinober & Owens (2002), and the references therein. 2 The origin of flatness-based control may also be traced back to a fresh look at controllability (Fliess (2000)). 3 For some recent references in the control literature, see, e.g., Braci & Diop (2001); Busvelle & Gauthier (2003); Chitour (2002); Dabroom & Khalil (1999); Diop, Fromion & Grizzle (2001); Diop, Grizzle & Chaplais (2000); Diop, Grizzle, Moraal & Stefanopoulou (1994); Duncan, Madl & Pasik-Duncan (1996); Ibrir (2003, 2004); Ibrir & Diop (2004); Kelly, Ortega, Ailon & Loria (1994); Levant (1998, 2003); Su, Zheng, Mueller & Duan (2006). The literature on numerical differentiation might be even larger in signal processing and in other fields of engineering and applied mathematics. Copyright c 200x Inderscience Enterprises Ltd. Remark 1.2. Note that our differentiators are not of asymptotic nature, and do not require any statistical knowledge of the corrupting noises. Those two fundamental features remain therefore valid for our non-linear estimation6 . This is a change of paradigms when compared to most of today’s approaches7 . 4 There are of course situations, for instance with a very strong corrupting noise, where the present state of our techniques may be insufficient. See also Remark 2.5. 5 Other authors like Slotine (1991) had already noticed that “good” numerical differentiators would greatly simplify control synthesis. 6 They are also valid for the linear estimation questions listed in Remark 1.1. 7 See, e.g., Schweppe (1973); Jaulin, Kiefer, Didrit & Walter 1.3 3. Section 6 deals with closed-loop fault diagnosis and fault tolerant control. Analysis and organization of our paper Our paper is organized as follows. Section 2 deals with the differential algebraic setting for nonlinear systems, which 4. Perturbation attenuation is presented in Section 7, via was introduced in Fliess (1989, 1990). When compared linear and non-linear case-studies. to those expositions and to other ones like Fliess, Lévine, Martin & Rouchon (1995); Delaleau (2002); Rudolph We end with a brief conclusion. First drafts of various (2003); Sira-Ramı́rez & Agrawal (2004), the novelty lies parts of this paper were presented in Fliess & Sira-Ramı́rez (2004b); Fliess, Join & Sira-Ramı́rez (2005). in the two following points: 1. The definitions of observability and parametric identifiability are borrowed from Diop & Fliess (1991a,b). 2 Differential algebra 2. We provide simple and natural definitions related to non-linear diagnosis such as detectability, isolability, parity equations, and residuals, which are straightforward extensions of the module-theoretic approach in Fliess, Join & Sira-Ramı́rez (2004) for linear systems. Commutative algebra, which is mainly concerned with the study of commutative rings and fields, provides the right tools for understanding algebraic equations (see, e.g., Hartshorne (1977); Eisenbud (1995)). Differential algebra, which was mainly founded by Ritt (1950) and Kolchin concepts and reThe main reason if not the only one for utilizing differential (1973), extends to differential equations 11 sults from commutative algebra . algebra is the absolute necessity of considering derivatives of arbitrary order of the system variables. Note that this could have been also achieved with the differential geo- 2.1 Basic definitions metric language of infinite order prolongations (see, e.g., A differential ring R, or, more precisely, an ordinary difFliess, Lévine, Martin & Rouchon (1997, 1999))8 . ferential ring, (see, e.g., Kolchin (1973) and ChambertSection 3 details Subsection 1.2 on numerical differenti- Loir (2005)) will be here a commutative ring12 which is ation. d equipped with a single derivation dt : R → R such that, Illustrations are provided by several academic examples9 for any a, b ∈ R, and their numerical simulations10 which we wrote in a such d a style that they are easy to grasp without understanding (a + b) = ȧ + ḃ, • dt the algebraic subtleties of Section 2: d (ab) = ȧb + aḃ. • dt 1. Section 4 is adapting a paper by Fan & Arcak (2003) dν a (ν) , ν ≥ 0. A differential field, or, on a non-linear observer. We only need for closing the where da dt = ȧ, dtν = a loop derivatives of the output signal. We neverthe- more precisely, an ordinary differential field, is a differenless present also a state reconstructor of an important tial ring which is a field. A constant of R is an element c ∈ R such that ċ = 0. A (differential) ring (resp. field) physical variable. of constants is a differential ring (resp. field) which only 2. Closed-loop parametric identification is achieved in contains constants. The set of all constant elements of R Section 5. is a subring (resp. subfield), which is called the subring (2001), and the references therein, for other non-statistical ap- (resp.subfield) of constants. A differential ring (resp. field) extension is given by two proaches. 8 The choice between the algebraic and geometric languages is a differential rings (resp. fields) R1 , R2 , such that R1 ⊆ R2 , delicate matter. The formalism of differential algebra is perhaps supand qthe derivation of R1 is the restriction to R1 of the pler and more elegant, whereas infinite prolongations permit to take advantage of the integration of partial differential equations. This derivation of R2 . last point plays a crucial rôle in the theoretical study of flatness (see, Notation Let S be a subset of R2 . Write R1 {S} (resp. e.g., Chetverikov (2004); Martin & Rouchon (1994, 1995); van Nieuw- R hSi) the differential subring (resp. subfield) of R gen1 2 stadt, Rathinam & Murray (1998); Pomet (1997); Sastry (1999), and erated by R and S. 1 the references therein) but seems to be unimportant here. Differential algebra on the other hand permitted to introduce quasi-static state Notation Let k be a differential field and X = {xι |ι ∈ I} feedbacks (Delaleau & Pereira da Silva (1998a,b)), which are quite a set of differential indeterminates, i.e., of indeterminates helpful in feedback synthesis (see also Delaleau & Rudolph (1998); and their derivatives of any order. Write k{X} the differRudolph & Delaleau (1998)). The connection of differential algebra with constructive and computer algebra might be useful in control ential ring of differential polynomials, i.e., of polynomials (ν ) (see, e.g., Diop (1991, 1992); Glad (2006), and the references therein). belonging to k[xι ι |ι ∈ I; νι ≥ 0]. Any differential poly9 These examples happen to be flat, although our estimation techQ P (µ ) nomial is of the form finite c finite (xι ι )αµι , c ∈ k. niques are not at all restricted to such systems. We could have examined as well uncontrolled systems and/or non-flat systems. The Notation If R1 and R2 are differential fields, the correcontrol of non-flat systems, which is much more delicate (see, e.g., sponding field extension is often written R2 /R1 . Fliess, Lévine, Martin & Rouchon (1995); Sira-Ramı́rez & Agrawal (2004), and the references therein), is beyond the scope of this article. 10 Any interested reader may ask C. Join for the corresponding computer programs ([email protected]). 11 Algebraic equations are differential equations of order 0. e.g., Atiyah & Macdonald (1969); Chambert-Loir (2005) for basic notions in commutative algebra. 12 See, A differential ideal I of R is an ideal which is also a The next corollary is a direct consequence from Proposidifferential subring. It is said to be prime if, and only if, I tions 2.1 and 2.2. is prime in the usual sense. Corollary 2.1. The module ΩK/k satisfies the following properties: 2.2 Field extensions • The rank13 of ΩK/k is equal to the differential tranAll fields are assumed to be of characteristic zero. Assume scendence degree of K/k. also that the differential field extension K/k is finitely generated, i.e., there exists a finite subset S ⊂ K such that • ΩK/k is torsion14 if, and only if, K/k is differentially K = khSi. An element a of K is said to be differentially algebraic. algebraic over k if, and only if, it satisfies an algebraic dif• dimK (ΩK/k ) = tr deg(L/K). It is therefore finite if, ferential equation with coefficients in k: there exists a nonand only if, L/K is differentially algebraic. zero polynomial P over k, in several indeterminates, such that P (a, ȧ, . . . , a(ν) ) = 0. It is said to be differentially • ΩK/k = {0} if, and only if, L/K is algebraic. transcendental over k if, and only if, it is not differentially algebraic. The extension K/k is said to be differentially 2.4 Nonlinear systems algebraic if, and only if, any element of K is differentially algebraic over k. An extension which is not differentially 2.4.1 Generalities algebraic is said to be differentially transcendental. Let k be a given differential ground field. A (nonlinear) The following result is playing an important rôle: (input-output) system is a finitely generated differential exProposition 2.1. The extension K/k is differentially al- tension K/k. Set K = khS, W, πi where gebraic if, and only if, its transcendence degree is finite. 1. S is a finite set of system variables, which contains the A set {ξι | ι ∈ I} of elements in K is said to be difsets u = (u1 , . . . , um ) and y = (y1 , . . . , yp ) of control ferentially algebraically independent over k if, and only if, and output variables, (ν) the set {ξι | ι ∈ I, ν ≥ 0} of derivatives of any order is 2. W = {w1 , . . . , wq } denotes the fault variables, algebraically independent over k. If a set is not differentially algebraically independent over k, it is differentially 3. π = (π1 , . . . , πr ) denotes the perturbation, or disturalgebraically dependent over k. An independent set which bance, variables. is maximal with respect to inclusion is called a differential transcendence basis. The cardinalities, i.e., the numbers of They satisfy the following properties: elements, of two such bases are equal. This cardinality is • The control, fault and perturbation variables do not the differential transcendence degree of the extension K/k; “interact”, i.e., the differential extensions khui/k, it is written diff tr deg (K/k). Note that this degree is 0 khWi/k and khπi/k are linearly disjoint15 . if, and only if, K/k is differentially algebraic. 2.3 Kähler differentials Kähler differentials (see, e.g., Hartshorne (1977); Eisenbud (1995)) provide a kind of analogue of infinitesimal calculus in commutative algebra. They have been extended to differential algebra by Johnson (1969). Consider again the extension K/k. Denote by d ] • K[ dt P the set of linear differential operators dα a finite α dtα , aα ∈ K, which is a left and right principal ideal ring (see, e.g., McConnell & Robson (2000)); d ]-module of Kähler differentials of • ΩK/k the left K[ dt the extension K/k; • dK/k x ∈ ΩK/k the (Kähler) differential of x ∈ K. Proposition 2.2. The next two properties are equivalent: 1. The set {xι | ι ∈ I} ⊂ K is differentially algebraically dependent (resp. independent) over k. d ]-linearly dependent 2. The set {dK/k xι | ι ∈ I} is K[ dt (resp. independent). • The control (resp. fault) variables are assumed to be independent, i.e., u (resp. W) is a differential transcendence basis of khui/k (resp. khWi/k). • The extension K/khu, W, πi is differentially algebraic. • Assume that the differential ideal (π) ⊂ k{S, π, W} generated by π is prime16 . Write k{S nom , Wnom } = k{S, π, W}/(π) the quotient differential ring, where the nominal system and fault variables S nom , Wnom are the canonical images of S, W. To those nominal variables corresponds the nominal system17 K nom /k, 13 See, e.g., McConnell & Robson (2000). e.g., McConnell & Robson (2000). 15 See, e.g., Eisenbud (1995). 16 Any reader with a good algebraic background will notice a connection with the notion of differential specialization (see, e.g., Kolchin (1973)). 17 Let us explain those algebraic manipulations in plain words. Ignoring the perturbation variables in the original system yields the nominal system. 14 See, where K nom = khS nom , Wnom i is the quotient field of k{S nom , Wnom }, which is an integral domain, i.e., without zero divisors. The extension K nom /khunom , Wnom i is differentially algebraic. • Assume as above that the differential ideal (Wnom ) ⊂ k{S nom , Wnom } generated by Wnom is prime. Write k{S pure } = k{S nom , Wnom }/(Wnom ) where the pure system variables S pure are the canonical images of S nom . To those pure variables corresponds the pure system18 K pure /k, where K pure = khS pure i is the quotient field of k{S pure }. The extension K pure /khupure i is differentially algebraic. Remark 2.1. We make moreover the following natural assumptions: diff tr deg (khupure i/k) = nom diff tr deg (khu i/k) = diff tr deg (khui/k) = m, diff tr deg (khWnom i/k) = diff tr deg (khWi/k) = q Remark 2.2. Remember that differential algebra considers algebraic differential equations, i.e., differential equations which only contain polynomial functions of the variables and their derivatives up to some finite order. This is of course not always the case in practice. In the example of Section 4, for instance, appears the transcendental function sin θl . As already noted in Fliess, Lévine, Martin & Rouchon (1995), we recover algebraic differential equations by introducing tan θ2l . where Apure ∈ khupure i[ẋpure , xpure ], Bjpure ∈ i i pure pure pure khu i[yj , x ], i.e., the coefficients of Apure i and Bjpure depend only on the pure control variables and their derivatives. Remark 2.3. Two main differences, which are confirmed by concrete examples (see, e.g., Fliess & Hasler (1990); Fliess, Lévine & Rouchon (1993)), can be made with the usual state-variable representation ẋ = F (x, u) y = H(x) 1. The representations (3), (4), (5) are implicit. 2. The derivatives of the control variables in the equations of the dynamics cannot be in general removed (see Delaleau & Respondek (1995)). 2.5 Variational system19 Call ΩK/k (resp. ΩK nom /k , ΩK pure /k ) the variational, or linearized, system (resp. nominal system, pure system) of system K/k. Proposition 2.2 yields for pure systems     dK pure /k y1pure dK pure /k upure 1     .. .. A  (6) = B . . dK pure /k yppure dK pure /k upure m where 2.4.2 State-variable representation d p×p • A ∈ K[ dt ] is of full rank, We know, from proposition 2.1, that the transcendence d p×m degree of the extension K/khu, W, πi is finite, say n. Let • B ∈ K[ dt ] . x = (x1 , . . . , xn ) be a transcendence basis. Any derivative ẋi , i = 1, . . . , n, and any output variable yj , j = 1, . . . , p, The pure transfer matrix20 is the matrix A−1 B ∈ d , is the skew quotient field21 K(s)p×m , where K(s), s = dt are algebraically dependent over khu, W, πi on x: d of K[ dt ]. Ai (ẋi , x) = 0 i = 1, . . . , n (3) Bj (yj , x) = 0 j = 1, . . . , p 2.6 Differential flatness22 where Ai ∈ khu, W, πi[ẋi , x], Bj ∈ khu, W, πi[yj , x], (differentially) flat if, and i.e., the coefficients of the polynomials Ai , Bj depend on The system K/k is said to be pure only if, the pure system K /k is (differentially) flat the control, fault and perturbation variables and on their (Fliess, Lévine, Martin & Rouchon (1995)): the algebraic derivatives up to some finite order. pure pure closure K̄ of K is equal to the algebraic closure Eq. (3) becomes for the nominal system of a purely differentially transcendental extension of k. It means in other words that there exists a finite subset Anom (ẋnom , xnom ) = 0 i = 1, . . . , nnom ≤ n i i (4) pure nom nom z pure = {z1pure , . . . , zm } of K̄ pure such that Bj (yj , xnom ) = 0 j = 1, . . . , p where Anom ∈ khunom , Wnom i[ẋnom , xnom ], Bjnom ∈ i i nom nom nom nom khu ,W i[yj , x ], i.e., the coefficients of Anom i nom and Bj depend on the nominal control and fault variables and their derivatives and no more on the perturbation variables and their derivatives. We get for the pure system Apure (ẋpure , xpure ) = 0 i = 1, . . . , npure ≤ nnom i i pure pure Bj (yj , xpure ) = 0 j = 1, . . . , p (5) 18 Ignoring as above the fault variables in the nominal system yields the pure system. pure • z1pure , . . . , zm are differentially algebraically independent over k, pure • z1pure , . . . , zm are algebraic over K pure , 19 See Fliess, Lévine, Martin & Rouchon (1995) for more details. Fliess (1994) for more details on transfer matrices of timevarying linear systems, and, more generally, Fliess, Join & SiraRamı́rez (2004), Bourlès (2006) for the module-theoretic approach to linear systems. 21 See, e.g., McConnell & Robson (2000). 22 For more details see Fliess, Lévine, Martin & Rouchon (1995); Rudolph (2003); Sira-Ramı́rez & Agrawal (2004). 20 See • any pure system pure khz1pure , . . . , zm i. over Remark 2.5. In the case of algebraic determinability, the corresponding algebraic equation might possess several roots which are not easily discriminated (see, e.g., Li, Chiz pure is a (pure) flat, or linearizing, output. For a flat asson, Bodson & Tolbert (2006) for a concrete example). dynamics, it is known that the number m of its elements Remark 2.6. See Sedoglavic (2002) and Ollivier & Seis equal to the number of independent control variables. doglavic (2002) for efficient algorithms in order to test observability and identifiability. Those algorithms may cer2.7 Observability and identifiability tainly be extended to determinable variables and to various questions related to fault diagnosis in Section 2.8. Take a system K/k with control u and output y. 2.7.1 variable is algebraic Observability 2.8 Fundamental properties of fault variables26 According to Diop & Fliess (1991a,b) (see also Diop 2.8.1 Detectability (2002)), system K/k is said to be observable if, and only The fault variable wι , ι = 1, . . . , q, is said to be detectable if, the extension K pure /khupure , y pure i is algebraic. if, and only if, the field extension K nom /khunom , Wnom i, ι nom nom nom where W = W \{w }, is differentially transcenι ι Remark 2.4. This new definition23 of observability is dental. It means that w is indeed “influencing” the outι “roughly” equivalent (see Diop & Fliess (1991a,b) for de- put. When considering the variational nominal system, tails24 ) to its usual differential geometric counterpart due formula (6) yields to Hermann & Krener (1977) (see also Conte, Moog &     Perdon (1999); Gauthier & Kupka (2001); Isidori (1995); dK nom /k y1nom dK nom /k unom 1 Nijmeijer & van der Schaft (1990); Sontag (1998)).     .. ..   = Tu   . . 2.7.2 Identifiable parameters25 dK nom /k ypnom dK nom /k unom m   dK nom /k wnom 1   .. +TW   . nom dK nom /k wq Set k = k0 hΘi, where k0 is a differential field and Θ = {θ1 , . . . , θr } a finite set of unknown parameters, which might not be constant. According to Diop & Fliess (1991a,b), a parameter θι , ι = 1, . . . , r, is said to be alge- where Tu ∈ K(s)p×m , TW ∈ K(s)p×q . Call TW the fault braically (resp. rationally) identifiable if, and only if, it is transfer matrix. The next result is clear: algebraic over (resp. belongs to) k0 hu, yi: Proposition 2.3. The fault variable wι is detectable if, • θι is rationally identifiable if, and only if, it is equal to and only if, the ιth column of the fault transfer matrix TW a differential rational function over k0 of the variables is non-zero. u, y, i.e., to a rational function of u, y and their derivatives up to some finite order, with coefficients 2.8.2 Isolability, parity equations and residuals in k0 ; A subset W′ = (wι1 , . . . , wιq′ ) of the set W of fault vari• θι is algebraically identifiable if, and only if, it satisfies ables is said to be an algebraic equation with coefficients in k0 hu, yi. • Differentially algebraically isolable if, and only if, the extension khunom , y nom , W′nom i/khunom , y nom i is dif2.7.3 Determinable variables ferentially algebraic. It means that any component of W′nom satisfies a parity differential equation, i.e., an More generally, a variable Υ ∈ K is said to be rationally algebraic differential equations where the coefficients (resp. algebraically) determinable if, and only if, Υpure bebelong to khunom , y nom i. pure pure longs to (resp. is algebraic over) khu ,y i. A system variable χ is then said to be rationally (resp. algebraically) observable if, and only if, χpure belongs to (resp. is algebraic over) khupure , y pure i. 23 See Fliess & Rudolph (1997) for a definition via infinite prolon- gations. 24 The differential algebraic and the differential geometric languages are not equivalent. We cannot therefore hope for a “one-to-one bijection” between definitions and results which are expressed in those two settings. 25 Differential algebra has already been employed for parametric identifiability and identification but in a different context by several authors (see, e.g., Ljung & Glad (1994); Ollivier (1990); Saccomani, Audoly & D’Angio (2003)). • Algebraically isolable if, and only if, the extension khunom , y nom , W′nom i/khunom , y nom i is algebraic. It 26 See, e.g., Chen & Patton (1999); Blanke, Kinnaert, Lunze & Staroswiecki (2003); Gertler (1998); Vachtsevanos, Lewis, Roemer, Hess & Wu (2006) for introductions to this perhaps less well known subject. The definitions and properties below are clear-cut extensions of their linear counterparts in Fliess, Join & Sira-Ramı́rez (2004). Some of them might also be seen as a direct consequence of Section 2.7.3. Differential algebra has already been employed but in a different context by several authors (see, e.g., Martinez-Guerra & Diop (2004); Martı̀nez-Guerra, González-Galan, Luviano-Juárez & Cruz-Victoria (2007); Staroswiecki & Comtet-Varga (2001); Zhang, Basseville & Benveniste (1998)). means that the parity differential equation is of or- 3.2 Analytic time signals der 0, i.e., it is an algebraic equation with coefficients Consider a real-valued analytic time function defined by P∞ ν khunom , y nom i. the convergent power series x(t) = ν=0 x(ν) (0) tν! , where • Rationally isolable if, and only if, W′nom belongs to 0 ≤ t < ρ. Introduce its truncated Taylor expansion khunom , y nom i. It means that the parity equation is N X tν a linear algebraic equation, i.e., any component of x(t) = x(ν) (0) + O(tN +1 ) (8) ′nom ν! W may be expressed as a rational function over k ν=0 in the variables unom , y nom and their derivatives up Approximate x(t) in the interval (0, ε), 0 < ε ≤ ρ, by its to some finite order. PN ν truncated Taylor expansion xN (t) = ν=0 x(ν) (0) tν! of orThe next property is obvious: der N . Introduce the operational analogue of x(t), i.e., P x(ν) (0) ν≥0 sν+1 , which is an operationally converProposition 2.4. Rational isolability ⇒ algebraic isola- X(s) = gent series in the sense of Mikusinski (1983); Mikusinski & bility ⇒ differentially algebraic isolability. Boehme (1987). Denote by [x(ν) (0)]eN (t), 0 ≤ ν ≤ N , the When we will say for short that fault variables are numerical estimate of x(ν) (0), which is obtained by replacisolable, it will mean that they are differentially alge- ing XN (s) by X(s) in Eq. (7). The next result, which is elementary from an analytic standpoint, provides a mathbraically isolable. ematical justification for the computer implementations: Proposition 2.5. Assume that the fault variables belongProposition 3.1. For 0 < t < ε, ing to W′ are isolable. Then card(W′ ) ≤ card(y). lim[x(ν) (0)]eN (t) = lim [x(ν) (0)]eN (t) = x(ν) (0) (9) Proof. The differential transcendence degree of the extenN →+∞ t↓0 sion khunom , y nom , W′nom i/k (resp. khunom , y nom i/k) is equal to card(u) + card(W ′ ) (resp. is less than or equal Proof. Following (8) replace xN (t) by x(t) = xN (t) + to card(u) + card(y)). The equality of those two degrees O(tN +1 ). The quantity O(tN +1 ) becomes negligible if t ↓ 0 or N → +∞. implies our result thanks to the Remark 2.1. 3 Derivatives of a noisy signal 3.1 Polynomial time signals Consider the real-valued polynomial function xN (t) = PN ν (ν) (0) tν! ∈ R[t], t ≥ 0, of degree N . Rewrite it ν=0 x in the well known notations of operational calculus: XN (s) = N X x(ν) (0) sν+1 ν=0 d We know utilize ds , which is sometimes called the algebraic derivative (cf. Mikusinski (1983); Mikusinski & Boehme dα N +1 , α = 0, 1, . . . , N . (1987)). Multiply both sides by ds αs The quantities x(ν) (0), ν = 0, 1, . . . , N are given by the triangular system of linear equations27 : ! N dα sN +1 XN dα X (ν) = α x (0)sN −ν (7) dsα ds ν=0 Remark 3.2. See Mboup, Join & Fliess (2007)) for fundamental theoretical developments. See also Nöthen (2007) for most fruitful comparisons and discussions. 3.3 Noisy signals Assume that our signals are corrupted by additive noises. Those noises are viewed here as highly fluctuating, or oscillatory, phenomena. They may be therefore attenuated by low-pass filters, like iterated time integrals. Remember that those iterated time integrals do occur in Eq. (7) after multiplying both sides by s−N̄ , for N̄ > 0 large enough. Remark 3.3. The estimated value of x(0), which is obtained along those lines, should be viewed as a denoising of the corresponding signal. Remark 3.4. See Fliess (2006) for a precise mathematical foundation, which is based on nonstandard analysis. A highly fluctuating function of zero mean is then defined by the following property: its integral over a finite time interval is infinitesimal, i.e., “very small”. Let us emphasize that this approach28 , which has been confirmed by ι numerous computer simulations and several laboratory exXN The time derivatives, i.e., sµ d ds ι , µ = 1, . . . , N , 0 ≤ ι ≤ 29 N , are removed by multiplying both sides of Eq. (7) by periments in control and in signal processing , is independent of any probabilistic setting. No knowledge of the s−N̄ , N̄ > N . statistical properties of the noises is required. Remark 3.1. Remember (cf. Mikusinski (1983); Mikusin28 This approach applies as well to multiplicative noises (see Fliess d corresponds (2006)). The assumption on the noises being only additive is thereski & Boehme (1987); Yosida (1984)) that ds fore unnecessary. in the time domain to the multiplication by −t. 27 Following Fliess & Sira-Ramı́rez (2003, 2007), those quantities are said to be linearly identifiable. 29 For numerical simulations in signal processing, see Fliess, Join, Mboup & Sira-Ramı́rez (2004, 2005); Fliess, Join, Mboup & Sedoglavic (2005). Some of them are dealing with multiplicative noises. 1.6 θm θl motor u 1.4 1.2 torsional spring 1.0 0.8 0.6 Figure 1: A single link flexible joint manipulator 4 Feedback and state reconstructor 0.4 0.2 0.0 4.1 System description −0.2 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 Consider with Fan & Arcak (2003) the mechanical system, Time (s) depicted in Figure 1. It consists of a DC-motor joined to an inverted pendulum through a torsional spring: Figure 2: Output (–) and reference trajectory (- -)  Jm θ̈m (t) = κ θl (t) − θm (t) −  B θ̇m (t) + Kτ u(t) (10) 4.3 A state reconstructor30 Jl θ̈l (t) = −κ θl (t) − θm (t) − mgh sin(θl (t)) y(t) = θl (t) We might nevertheless be interested in obtaining an estiwhere mate [θm ]e (t) of the unmeasured state θm (t):  • θm and θl represent respectively the angular deviation 1 J ÿ (t) + mgh sin(y (t)) + ye (t) (13) [θ ] (t) = l e e m e of the motor shaft and the angular position of the κ inverted pendulum, 4.4 Numerical simulations • Jm , Jl , h, m, κ, B, Kτ and g are physical parameters The physical parameters have the same numerical values which are assumed to be constant and known. as in Fan & Arcak (2003): Jm = 3.7 × 10−3 kgm2 , Jl = System (10), which is linearizable by static state feedback, 9.3 × 10−3 kgm2 , h = 1.5 × 10−1 m, m = 0.21 kg, B = is flat; y = θl is a flat output. 4.6 × 10−2 m, Kτ = 8 × 10−2 NmV−1 . The numerical simulations are presented in Figures 2 - 9. Robustness has 4.2 Control design been tested with an additive white Gaussian noise N(0; ∗ Tracking of a given smooth reference trajectory y (t) = 0.01) on the output y. Note that the off-line estimations of ÿ and θm , where a “small” delay is allowed, are better θl∗ (t) is achieved via the linearizing feedback controller than the on-line estimation of ÿ.   u(t) = K1τ Jκm Jl v(t) + κÿe (t)  +mgh(ÿe (t) cos(ye (t)) − (ẏe (t))2 sin(ye (t))) 5 Parametric identification +Jl ÿe (t) + mgh sin(ye (t))    (3) B 5.1 A rigid body κ Jl ye (t) + κẏe (t) + mghẏe (t) cos(ye (t) (11) Consider the fully actuated rigid body, depicted in Figure where 10, which is given by the Euler equations (3) v(t) = y ∗(4) (t) − γ4 (ye (t) − y ∗(3) (t)) I1 ẇ1 (t) = (I2 − I3 )w2 (t)w3 (t) + u1 (t) (12) −γ3 (ÿe (t) − ÿ ∗ (t)) − γ2 (ẏe (t) − ẏ ∗ (t)) I2 ẇ2 (t) = (I3 − I1 )w3 (t)w1 (t) + u2 (t) (14) ∗ −γ1 (ye (t) − y (t)) I3 ẇ3 (t) = (I1 − I2 )w1 (t)w2 (t) + u3 (t) The subscript “e”denotes the estimated value. The dewhere w1 , w2 , w3 are the measured angular velocities, u1 , sign parameters γ1 , ..., γ4 are chosen so that the resulting u2 , u3 the applied control input torques, I1 , I2 , I3 the concharacteristic polynomial is Hurwitz. stant moments of inertia, which are poorly known. SysRemark 4.1. Feedback laws like (11)-(12) depend, as tem (14) is stabilized around the origin, for suitably chousual in flatness-based control (see, e.g., Fliess, Lévine, sen design parameters λ1ι , λ0ι , ι = 1, 2, 3, by the feedback Martin & Rouchon (1995, 1999); Sira-Ramı́rez & Agrawal 30 See Sira-Ramı́rez & Fliess (2006) and Reger, Mai & Sira-Ramı́rez (2004)), on the derivatives of the flat output and not on (2006) for other interesting examples of state reconstructors which are applied to chaotically encrypted messages. the state variables. 1.6 1.4 1.2 1.0 0.8 0.6 0.4 0.2 0.0 −0.2 0 0.2 0.4 0.6 0.8 Time (s) 1 1.2 1.4 Figure 5: y: (- -); on-line noise attenuation ye (–) 60 40 20 0 −20 −40 −60 0 0.2 0.4 0.6 0.8 Time (s) 1 1.2 Figure 6: ÿ (- -); on-line estimation ÿe (–) , 1.4 2.0 1.5 1.0 0.5 0.0 −0.5 0 0.2 0.4 0.6 0.8 Time (s) 1 1.2 1.4 Figure 7: θm (- -); on-line estimation [θm ]e (–) 60 40 20 0 −20 −40 −60 0 0.2 0.4 0.6 0.8 Time (s) 1 1.2 Figure 8: ÿ (- -); off-line estimation ÿe (–) 1.4 2.0 1.5 1.0 0.5 0.0 −0.5 0 0.2 0.4 0.6 0.8 Time (s) 1 1.2 1.4 Figure 9: θm (- -); off-line estimation [θm ]e (–) 10 0.04 0.03 8 0.02 6 0.01 4 0.00 −0.01 2 −0.02 0 −2 0.0 −0.03 0.2 0.4 0.6 0.8 Time (s) 1.0 1.2 1.4 −0.04 0 0.2 0.4 0.6 0.8 Time (s) 1 1.2 1.4 Figure 4: Output noise Figure 3: Control proportional-integral (PI) regulators, u1 (t) = u2 (t) = u3 (t) = controller, which is an obvious extension of the familiar −(I2− I3 )w2 (t)w3 (t) +I1 − λ11 w1 (t) − λ01 −(I3− I1 )w3 (t)w1 (t) Rt +I3 − λ13 w3 (t) − λ03 Rt +I2 − λ12 w2 (t) − λ02 −(I1− I2 )w1 (t)w2 (t) 0 Rt 0 0 w1 (σ)dσ w2 (σ)dσ w3 (σ)dσ    (15) w2 0.4 0.3 w1 u2 0.2 u3 w3 0.1 u1 0.0 −0.1 5.2 Figure 10: Rigid body −0.2 Identification of the moments of inertia −0.3 0 Write Eq. (14) in the following matrix form:   ẇ1 −w2 w3 w2 w2  w1 w3 ẇ2 −w1 w3  × −w w w w ẇ3 1 2  1 2   u1 I1 I2  = u2  u3 I3 2 4 6 8 10 12 Time (s) 14 16 18 20 Figure 13: Feedback stabilization without parametric estimation in fault diagnosis (see, e.g., Blanke, Kinnaert, Lunze & Staroswiecki (2003)). u It yields estimates [I1 ]e , [I2 ]e , [I3 ]e of I1 , I2 , I3 when we replace w1 , w2 , w3 , ẇ1 , ẇ2 , ẇ3 by their estimates31 . The control law (15) becomes u1 (t) = u2 (t) = u3 (t) = 5.3 −([I2 ]e“− [I3 ]e )[w2 ]e (t)[w3 ]e (t) ” Rt +[I1 ]e − λ11 [w1 ]e (t) − λ01 0 [w1 ]e (σ)dσ −([I3 ]e“− [I1 ]e )[w3 ]e (t)[w1 ]e (t) ” Rt +[I2 ]e − λ12 [w2 ]e (t) − λ02 0 [w2 ]e (σ)dσ −([I1 ]e“− [I2 ]e )[w1 ]e (t)[w2 ]e (t) ” Rt +[I3 ]e − λ13 [w3 ]e (t) − λ03 0 [w3 ]e (σ)dσ x1 (16) y = x2 Numerical simulations The output measurements are corrupted by an additive Gaussian white noise N (0; 0.005). Figure 11 shows an excellent on-line estimation of the three moments of inertia. Set for the design parameters in the controllers (15) and (16) λ1ι = 2ξ̟, λ0ι = ̟2 , ι = 1, 2, 3, where ξ = 0.707, Figure 14: A two tank system ̟ = 0.5. The stabilization with the above estimated values in Figure 12 is quite better than in Figure 13 where the following false values where utilized: I1 = 0.2, I2 = 0.1 Its mathematical description is given by and I3 = 0.1. 1 cp x1 (t) + u(t) (1 − w(t)) ẋ1 (t) = − A A +̟(t) 6 Fault diagnosis and accommodation cp cp x1 (t) − x2 (t) ẋ2 (t) = A A 32 6.1 A two tank system y(t) = x (t) (17) 2 Consider the cascade arrangement of two identical tank systems, shown in Figure 14, which is a popular example where: 31 See 32 See Remark 3.3. Mai, Join & Reger (2007) for another example. • The constant c and the area A of the tank’s bottom are known parameters. 2.0 1.5 1.0 0.5 0.0 −0.5 0 0.5 1 1.5 Time (s) 2 2.5 3 Figure 11: Zoom on the parametric estimation (–) and real values (- -) 0.4 0.3 0.2 0.1 0.0 −0.1 −0.2 −0.3 0 2 4 6 8 10 12 Time (s) 14 16 18 Figure 12: Feedback stabilization with parametric estimation 20 • The perturbation ̟(t) is constant but unknown, • ⋆ denotes the convolution product, • The actuator failure w(t), 0 ≤ w(t) ≤ 1, is constant but unknown. It starts at some unknown time tI >> 0 which is not “small”. • the transfer function of G is λ2 s2 + λ1 s + λ0 s(s + λ3 ) • Only the output y = x2 is available for measurement. The corresponding pure system, where we are ignoring the fault and perturbation variables (cf. Section 2.4.1), p pure 1 pure c x1 + p ẋpure = −p 1 A Au pure c c − x xpure = ẋpure 1 2 2 A A pure pure y = x2 where λ0 , λ1 , λ2 , λ3 ∈ R, • ye (t) is the on-line denoised estimate of y(t) (cf. Remark 3.3), • ẏe (t) is the on-line estimated value of ẏ(t). 6.3 Perturbation and fault estimation is flat. Its flat output is y pure = xpure . The state variable 2 The estimation of the constant perturbation ̟ is readily xpure and control variable upure are given by 1 accomplished from Eq. (17) before the occurrence of the failure w, which starts at time tI >> 0: A pure √ pure 2 (18) ẏ + y xpure = 1 c 1 cp x1 (t) + u(t) + ̟ if 0 < t < tI ẋ1 (t) = − ẏ pure  A pure √ pure  A pure pure A A + y ÿ + √ pure u = 2A ẏ c c 2 y Multiplying both sides by t and integrating by parts  √ A (19) yields33 +c ẏ pure + y pure c ( arbitrary h 0<t<ǫ i 6.2 Fault tolerant tracking controller √ R 1 c ̟ ˆ = x̂1 (σ)− A u(σ)) dσ tx̂1 (t)− 0t x̂1 (σ)−σ( A ǫ < t < tI 2 t2 It is desired that the output y tracks a given smooth reference trajectory y ∗ (t). Rewrite Formulae (18)-(19) by taking into account the perturbation variable ̟(t) and the actuator failure w(t): x1 (t) = u(t) = p 2 A ẏ(t) + y(t) c  1  − A̟ 1 − w(t) p  A +2A ẏ(t) + y(t) × c A ẏ(t)  ( ÿ(t) + p c 2 y(t) p  A +c ẏ(t) + y(t) c where ǫ > 0 is “very small”. The estimated value x̂1 (t) of x1 (t), which is obtained from Formula (20), needs as in Section 6.2 the on-line estimation ye (t) and ẏe (t). The estimated value ŵ of w, which is detectable and (20) algebraically isolable (cf. Section 2.8.2), follows from With reliable on-line estimates ŵ(t) and ̟(t) ˆ of the failure signal w(t) and of the perturbation ̟(t), we design a failure accommodating linearizing feedback controller. It incorporates a classical robustifying integral action: u(t) =  1  − A̟(t) ˆ 1 − ŵ(t) p  A A ẏe (t)  +2A ẏe (t) + ye (t) v(t) + p c c 2 ye (t) p  A +c ẏe (t) + ye (t) c ÿ ∗ (t) − G ⋆ (ye (t) − y ∗ (t)) ŵ 6.4 = p  1  A 2A ẏe (t) + ye (t) u(t) c A ẏe (t)  × ÿe (t) + p c 2 ye (t)  p  A +c ẏe (t) + ye (t) − A̟ ˆ c 1− Numerical simulations Figure 15 shows the closed-loop performance of our trajectory tracking controller. The simulation scenario is the following: • The actuator fault w = 0.7 occurs at time tI = 1.5s. • We estimate before the unknown constant perturbation ̟ = 0.2 and use it for estimating w. • The fault tolerant control becomes effective at time t = 2.5s. Robustness is checked via an additive Gaussian white noise N (0; 0.01). Comparison between Figures 16 and 15 conThis is a generalized proportional integral (GPI) controller firms the efficiency of our fault accommodation. 33 We are adapting here linear techniques stemming from Fliess & (cf. Fliess, Marquez, Delaleau & Sira-Ramı́rez (2002)) Sira-Ramı́rez (2003, 2007). where v(t) = 1.4 1.2 1.0 0.8 0.6 0.4 0.2 0.0 0 1 2 3 4 5 6 Time (s) 7 8 9 10 Figure 15: y ⋆ (t) (- -) and y(t) (–) with fault accommodation where 1.4 • z(t) is an unknown perturbation input, 1.2 • 1(t) is the Heaviside step function, i.e.,  0 if t < 0 1(t) = 1 if t ≥ 0 1.0 0.8 0.4 • C is an unknown constant and thus C1(t − tI ) is a constant bias, of unknown amplitude, starting at time tI ≥ 0. 0.2 Remark 7.1. The difference C1(t − tI ) − z(t) is a rationally determinable variable according to Section 2.7.3. 0.6 0.0 The estimate ze (t) of z(t) is given up to a piecewise con0 1 2 3 4 5 6 Time (s) 7 8 9 10 stant error by ze (t) = −ÿe (t) − ye (t) + u(t) Figure 16: y ⋆ (t) (- -) and y(t) (–) without fault accommowhere ye (t) and ÿe (t) are the on-line estimated values dation of y(t) and ÿ(t). We design a generalized-proportionalintegral (GPI) regulator, in order to track asymptotically 7 Perturbation attenuation a given output reference trajectory y ⋆ (t), i.e., 7.0.1 Linear case u(t) = ye (t) + ze (t) + ÿ ⋆ (t) + G ⋆ (ye (t) − y ∗ (t)) (22) Suppose we are given a linear perturbed second order sys- where tem • G 2is defined via its rational transfer function c2 s +c1 s+c0 ÿ(t) + y(t) = u(t) − z(t) + C1(t − tI ) (21) s(s+c3 ) • s4 + c3 s3 + c2 s2 + c1 s + c0 is the characteristic poly- is given by nomial of the unperturbed closed-loop system. The ze (t) = −ÿe (t) − ye ẏe (t) + u(t) coefficients c0 , c1 , c2 , c3 are chosen so that the imaginary parts of its roots are strictly negative. where ye (t), ẏe (t) and ÿe (t) are the estimates of y(t), ẏ(t) Like usual proportional-integral-derivative (PID) regula- and ÿ(t). The feedback law (22) becomes tors, this controller is robust with respect to un-modeled u = ye (t)ẏe (t) + ze (t) + ÿ ⋆ (t) + G ⋆ (ye (t) − y ∗ (t)) (24) piecewise constant errors The computer simulations were performed with Remark 7.3. Rewrite system (23) via the following state variable representation 10t3 sin(2t) z(t) =  1 + t2 + t3  ẋ1 (t) = x2 (t) The unknown constant perturbation suddenly appears at ẋ2 (t) = −x1 (t)x2 (t) + u(t) − z(t) + C1(t − tI )  time tI = 4 with a permanent value C = 1.25. The coefy(t) = x1 (t) ficients of the characteristic polynomial were forced to be those of the desired polynomial Pd (s) = (s2 +2ζωn s+ωn2 )2 , Applying the feedback law (24) amounts possessing good with ζ = 0.81, ωn = 4. We have set y ⋆ (t) = sin ωt, estimates of the two state variables. ω = 2.5[rad/s]. Figures 19 and 20 depict the computer simulations with Figure 17 (resp. 18) shows the reference signal y ⋆ (t) and the same numerical conditions as before. The results are again excellent. 2.0 1.5 2.0 1.0 1.5 0.5 1.0 0.0 0.5 −0.5 0.0 −1.0 −0.5 −1.5 −1.0 −1.5 −2.0 0 1 2 3 4 Time (s) 5 6 7 8 −2.0 0 1 ⋆ Figure 17: y (t) (- -) and y(t) (–) without perturbation attenuation the output signal y(t) without estimating ze (t) (resp. with the estimate ze (t)). We added in the simulations of Figure 18 a Gaussian white noise N (0; 0.025) to the measurement y(t). The results are quite remarkable. 2 3 4 Time (s) 5 6 7 8 Figure 19: y ⋆ (t) (- -) and y(t) (–) without perturbation attenuation 8 Conclusion Remark 7.2. The same technique yields an efficient solution to fault tolerant linear control, which completes Fliess, Join & Sira-Ramı́rez (2004). Just think at z(t) as a fault variable. We have proposed a new approach to non-linear estimation, which is not of asymptotic nature and does not necessitate any statistical knowledge of the corrupting noises34 . Promising results have already been obtained, which will be supplemented in a near future by other theo7.0.2 Non-linear extension retical advances (see, e.g., Barbot, Fliess & Floquet (2007) Replace the term y(t) in system (21) by the product on observers with unknown inputs) and several concrete y(t)ẏ(t): case-studies (see already Garcı́a-Rodrı́guez & Sira-Ramı́rez ÿ(t) + y(t)ẏ(t) = u(t) − z(t) + C1(t − tI ) (23) (2005); Nöthen (2007)). Further numerical improvements The perturbations z(t) and C1(t − tI ) are the same as above. The estimate ze (t) of z(t) up to a piecewise constant 34 Let us refer to a recent book by Smolin (2006), which contains an exciting description of the competition between various theories in today’s physics. Similar studies do not seem to exist in control. 2.0 1.5 1.0 0.5 0.0 −0.5 −1.0 −1.5 −2.0 0 1 2 3 4 Time (s) 5 6 7 8 Figure 18: y ⋆ (t) (- -) and y(t) (–) with perturbation attenuation will also be investigated (see already Mboup, Join & Fliess (2007)). ACKNOWLEDGMENT Two authors (MF & CJ) wish to thank M. Mboup for a most fruitful cooperation on numerical differentiation. REFERENCES Aström, K.J., Albertos, P., Blanke, M., Isidori, A., Schaufelberger, W., and Sanz, R. (2001) Control of Complex Systems, Springer. Atiyah, M.F., and Macdonald, I.G. (1969) Introduction to Commutative Algebra, Addison-Wesley. Braci, M., and Diop, S. (2001) ‘On numerical differentiation algorithms for nonlinear estimation’, Proc. 42nd IEEE Conf. Decision Control, Maui, Hawaii. Busvelle, E., and Gauthier, J.P. (2003) ‘On determining unknown functions in differential systems, with an application to biological reactors’, ESAIM Control Optimis. Calculus Variat., Vol. 9, pp. 509-552. Chambert-Loir, A. (2005) Algèbre corporelle, Éditions École Polytechnique. English translation (2005): A Field Guide to Algebra, Springer. Chen, J., and Patton, R. (1999). Robust Model-Based Fault Diagnosis for Dynamic Systems, Kluwer. Chetverikov, V.N. (2004) ‘A nonlinear Spencer complex for the group of invertible differential operators and its applications’, Acta Appl. Math., Vol. 83, pp. 1-23. Barbot, J.P., Fliess, M., and Floquet, T. (2007) Chitour, Y. (2002) ‘Time-varying high-gain observers for numerical differentiation’, IEEE Trans. Automat. Con‘An algebraic framework for the design of nonlinth trol, Vol. 47, pp. 1565-1569. ear observers with unknown inputs’, Proc. 46 IEEE Conf. Decision Control, New Orleans (available at Conte, G., Moog, C.H., and Perdon, A.M. (1999) Nonlinhttp://hal.inria.fr/inria-00172366). ear Control Systems – An Algebraic Setting, Lect. Notes Control Informat. Sci., Vol. 242, Springer. Blanke, M., Kinnaert, M., Lunze, J., and Staroswiecki, M. (2003) Diagnosis and Fault-Tolerant Control, Springer. Dabroom, A.M., and Khalil, H.K. (1999) ‘Discrete-time implementation of high-gain observers for numerical difBourlès, H. (2006) Systèmes linéaires : de la modélisation ferentiation’, Int. J. Control, Vol. 72, pp. 1523-1537. à la commande, Hermès. 2.0 1.5 1.0 0.5 0.0 −0.5 −1.0 −1.5 −2.0 0 1 2 3 4 Time (s) 5 6 7 8 Figure 20: y ⋆ (t) (- -) and y(t) (–) with perturbation attenuation. Delaleau, E. (2002) ‘Algèbre différentielle’, in J.P. Richard (Ed.): Mathématiques pour les Systèmes Dynamiques, Vol. 2, chap. 6, pp. 245-268, Hermès. nard, J.P. Gauthier, and F. Monroy-Perez (Eds.): Contemporary Trends in Nonlinear Geometric Control Theory and its Applications, pp. 305-345, World Scientific. Delaleau, E., and Pereira da Silva, P.S. (1998a) ‘Filtrations Diop, S., and Fliess, M. (1991a) ‘On nonlinear observabilin feedback synthesis: Part I - systems and feedbacks’, ity’, Proc. 1st Europ. Control Conf., Hermès, pp. 152Forum Math., Vol. 10, pp. 147-174. 157. Delaleau, E., and Pereira da Silva, P.S. (1998b) ‘Filtrations in feedback synthesis - Part II: input-output decoupling and disturbance decoupling’, Forum Math., Vol. 10, pp. 259-276. Diop S., and Fliess, M. (1991b) ‘Nonlinear observability, identifiability and persistent trajectories’, Proc. 36th IEEE Conf. Decision Control, Brighton, pp. 714-719. Delaleau, E., and Respondek, W. (1995) ‘Lowering the or- Diop, S., Fromion, V., and Grizzle, J.W. (2001) ‘A global exponential observer based on numerical differentiation’, ders of derivatives of control in generalized state space Proc. 40th IEEE Conf. Decision Control, Orlando. systems’ J. Math. Systems Estim. Control, Vol. 5, pp. 1-27. Diop, S., Grizzle, J.W., and Chaplais, F. (2000) ‘On nuDelaleau, E., and Rudolph, J. (1998) ‘Control of flat sysmerical differentiation for nonlinear estimation’, Proc. tems by quasi-static feedback of generalized states’, Int. 39th IEEE Conf. Decision Control, Sidney. J. Control, Vol. 71, pp. 745-765. Diop, S., Grizzle, J.W., Moraal, P.E., and Stefanopoulou, Diop, S. (1991) ‘Elimination in control theory’, Math. ConA. (1994) ‘Interpolation and numerical differentiation for trol Signals Systems, Vol. 4, pp. 17-32. observer design’, Proc. Amer. Control Conf., Baltimore, pp. 1329-1333. Diop, S. (1992) ‘Differential algebraic decision methods, and some applications to system theory’, Theoret. Comput. Sci., Vol. 98, pp. 137-161 Duncan, T.E., Mandl, P., and Pasik-Duncan, B. (1996) ‘Numerical differentiation and parameter estimation in Diop, S. (2002) ‘From the geometry to the algebra of nonhigher-order linear stochastic systems’, IEEE Trans. Aulinear observability’, in A. Anzaldo-Meneses, B. Bontomat. Control, Vol. 41, pp. 522-532. Eisenbud, D. (1995) Commutative Algebra with a View Toward Algebraic Geometry, Springer. Fliess, M., Lévine, J., Martin, P., and Rouchon, P. (1995) ‘Flatness and defect of non-linear systems: introductory theory and examples’, Int. J. Control, Vol. 61, pp. 1327Fan, X., and Arcak, M. (2003) ‘Observer design for sys1361. tems with multivariable monotone nonlinearities’, SysFliess, M., Lévine, J., Martin, P., and Rouchon, P. (1997) tems Control Lett., Vol. 50, pp. 319-330. ‘Deux applications de la géometrie locale des diffiétés’, Ann. Inst. H. Poincaré Phys., Vol. 66, pp. 275-292. Fliess, M. (1989) ‘Automatique et corps différentiels’, Forum Math., Vol. 1, pp. 227-238. Fliess, M., Lévine, J., Martin, P., and Rouchon, P. (1999) ‘A Lie-Bäcklund approach to equivalence and flatness of Fliess, M. (1990) ‘Controller canonical forms for linear and nonlinear systems’, IEEE Trans. Automat. Control, Vol. nonlinear dynamics’, IEEE Trans. Automat. Control, 44, pp. 922-937. Vol. 33, pp. 994-1001. Fliess, M. (1994) ‘Une inteprétation algébrique de la transformation de Laplace et des matrices de transfert’, Linear Algebra Appl., Vol. 203-204, pp. 429-442. Fliess, M. (2000) ‘Variations sur la notion de contrôlabilité’, Journée Soc. Math. France, Paris (available at http://hal.inria.fr/inria-00001042). Fliess, M., Lévine, J., and Rouchon, P. (1993) ‘Generalized state variable representation for a simplified crane description’, Int. J. Control, Vol. 58, pp. 277-283. Fliess, M., Marquez, R., Delaleau, E., and SiraRamı́rez, H. (2002) ‘Correcteurs proportionnelsintégraux généralisés’, ESAIM Control Optim. Calc. Variat., Vol. 7, pp. 23-41. Fliess, M. (2006) ‘Analyse non standard du bruit’, C.R. Acad. Sci. Paris Ser. I, Vol. 342, pp. 797-802. Fliess, M., and Rudolph, J. (1997) ‘Corps de Hardy et observateurs asymptotiques Iocaux pour systèmes différentiellement plats’, C.R. Acad. Sci. Paris Ser. II, Fliess, M., and Hasler M. (1990) ‘Questioning the classiVol. 324, pp. 513-519. cal state space description via circuit examples’, in M. Kashoek, J. van Schuppen and A. Ran (Eds.): Realiza- Fliess, M., and Sira-Ramı́rez, H. (2003) ‘An algebraic framework for linear identification’, ESAIM Control Option and Modelling in System Theory, MTNS-89, Vol 1, tim. Calc. Variat., Vol. 9, pp. 151-168. pp. 1-12, Birkhäuser. Fliess, M., Join, C., Mboup, M., and Sedoglavic, A. Fliess, M., and Sira-Ramı́rez, H. (2004a) ‘Reconstructeurs d’état’, C.R. Acad. Sci. Paris Ser. I, Vol. 338, pp. 91-96. (2005) ‘Estimation des dérivées d’un signal multidimensionnel avec applications aux images et aux vidéos’, Fliess, M., and Sira-Ramı́rez, H. (2004b) ‘Control via state Actes 20e Coll. GRETSI, Louvain-la-Neuve (available estimations of some nonlinear systems’, Proc. Symp. at http://hal.inria.fr/inria-00001116). Nonlinear Control Systems (NOLCOS 2004), Stuttgart (available at http://hal.inria.fr/inria-00001096). Fliess, M., Join, C., Mboup, M., and Sira-Ramı́rez, H. (2004) ‘Compression différentielle de transitoires Fliess, M., and Sira-Ramı́rez, H. (2007) ‘Closed-loop parabruités’, C.R. Acad. Sci. Paris Ser. I, Vol. 339, pp. metric identification for continuous-time linear systems’, 821-826. in H. Garnier & L. Wang (Eds.): Continuous-Time Model Identification from Sampled Data, Springer (availFliess, M., Join, C., Mboup, M., and Sira-Ramı́rez, able at http://hal.inria.fr/inria-00114958). H. (2005) ‘Analyse et représentation de signaux transitoires : application à la compression, au Garcı́a-Rodrı́guez, C., and Sira-Ramı́rez, H. (2005) ‘Trajectory tracking via algebraic methods for state estimadébruitage et à la détection de ruptures’, Actes tion’, in Proc. 3rd IEEE Int. Congress Innovation Tech20e Coll. GRETSI, Louvain-la-Neuve (available at nological Develop., Cuernavaca, Mexico. http://hal.inria.fr/inria-00001115). Fliess, M., Join, C., and Sira-Ramı́rez, H. (2004) ‘Robust Gauthier, J.-P, and Kupka, I.A.K. (2001) Deterministic Observation Theory and Applications, Cambridge Uniresidual generation for linear fault diagnosis: an algeversity Press. braic setting with examples’, Int. J. Control, Vol. 77, pp. 1223-1242. Gertler, J.J. (1998) Fault Detection and Diagnosis in Engineering Systems, Marcel Dekker. Fliess, M., Join, C., and Sira-Ramı́rez, H. (2005) ‘Closedloop fault-tolerant control for uncertain nonlinear sys- Glad, S.T. (2006) ‘Using differential algebra to determine the structure of control systems’, in B. Hanzon and M. tems’, in T. Meurer, K. Graichen, E.D. Gilles (Eds.): Hazewinkel (Eds.): Constructive Algebra and Systems Control and Observer Design for Nonlinear Finite and Theory, Royal Netherlands Academy of Arts and SciInfinite Dimensional Systems, Lect. Notes Control Inences, pp. 323-340. format. Sci., vol. 322, pp. 217-233, Springer. Hartshorne, R. (1977) Algebraic Geometry, Springer. Martin, P., and Rouchon, P. (1994) ‘Feedback linearization and driftless systems’, Math. Control Signal Syst., Vol. Hermann, R., and Krener, A.J. (1977) ‘Nonlinear con7, pp. 235-254, 1994. trollability and observability’, IEEE Trans. Automat. Control, Vol. 22, pp. 728-740. Martin, P., and Rouchon, P. (1995) ‘Any (controllable) driftless system with 3 inputs and 5 states is flat’, SysIbrir, S. (2003) ‘Online exact differentiation and notion of tems Control Lett., Vol. 25, pp. 167-173. asymptotic algebraic observers’, IEEE Trans. Automat. Control, Vol. 48, pp. 2055-2060. Martinez-Guerre, R., and Diop, S. (2004) ‘Diagnosis of nonlinear systems using an unknown-input observer: an Ibrir, S. (2004) ‘Linear time-derivatives trackers’, Autoalgebraic and differential approach’, IEE Proc. Control matica, Vol. 40, pp. 397-405. Theory Applications, Vol. 151, pp. 130-135. Ibrir, S., and Diop, S. (2004) ‘A numerical procedure for Martı́nez-Guerra, R., González-Galan, R., Luvianofiltering and efficient high-order signal differentiation’, Juárez, A., and Cruz-Victoria, J. (2007) ‘Diagnosis for a Int. J. Appl. Math. Comput. Sci., Vol. 14, pp. 201-208. class of non-differentially flat and Liouvillian systems’, IMA J. Math. Control. Informat., Vol. 24. Isidori, A. (1995) Nonlinear Control Systems, 3rd ed., Springer. Mboup, M., Join, C., and Fliess, M. (2007) ‘A revised look at numerical differentiation with an application to nonJaulin, L., Kieffer, M., Didrit, O., and Walter, E. (2001) linear feedback control’, Proc. 15th Mediterrean Conf. Applied Interval Analysis, Springer. Control Automation (MED’2007), Athens (available at Johnson J. (1969) ‘Kähler differentials and differential alhttp://hal.inria.fr/inria-00142588). gebra’, Annals Math. Vol. 89, pp. 92-98. McConnell J., Robson J. (2000) Noncommutative NoetheKelly, R., Ortega, R., Ailon, A., and Loria, A. (1994) rian Rings, American Mathematical Society. ‘Global regulation of flexible joint robots using approximate differentiation’, IEEE Trans. Automat. Control, Menini, L., Zaccarian, C., and Abdallah, C.T. (Eds.) Vol. 39, pp. 1222-1224. (2006) Current Trends in Nonlinear Systems and Control, Birkhäuser. Kolchin, E.R. (1973) Differential Algebra and Algebraic Groups, Academic Press. Mikusinski, J. (1983) Operational Calculus, 2nd ed., Vol. 1, PWN & Pergamon. Lamnabhi-Lagarrigue, F., and Rouchon P. (Eds.) (2002a) Systèmes non linéaires, Hermès. Mikusinski, J., and Boehme, T. (1987) Operational Calculus, 2nd ed., Vol. 2, PWN & Pergamon. Lamnabhi-Lagarrigue, F., and Rouchon P. (Eds.) (2002b) Commandes non linéaires, Hermès. Levant, A. (1998) ‘Robust exact differentiation via sliding mode technique’, Automatica, Vol. 34, pp. 379-384. van Nieuwstadt, M., Rathinam, M., and Murray, R.M. (1998) ‘Differential flatness and absolute equivalence of nonlinear control systems’, SIAM J. Control Optimiz., Vol. 36, pp. 1225-1239. Levant, A. (2003) ‘Higher-order sliding modes, differentiation and output-feedback control’, Int. J. Cpntrol, Vol. Nijmeijer, H., and Fossen, T.I. (Eds.) (1999) New Directions in Nonlinear Observer Design, Lect. Notes Control 76, pp. 924-941. Informat. Sci., Vol. 244, Springer. Levine, W. (Ed.) (1996) The Control Systems Handbook, Nijmeijer, H., and van der Schaft, A.J. (1990) Nonlinear CRC Press. Dynamical Control Systems, Springer. Ljung, L., and Glad, T. (1994) ‘On global identifiability for arbitrary model parametrizations’, Automatica, Vol. Nöthen, C. (2007) Beiträge zur Rekonstruktion nicht direkt gemessener Größen bei der Silizium-Einkristallzüchtung 30, pp. 265-276. nach dem Czochralski-Verfahren, Diplomarbeit, TechnisLi, M., Chiasson, J., Bodson, M., and Tolbert, L.M. (2006) che Universität Dresden. ‘A differential-algebraic approach to speed estimation in an induction motor’, IEEE Trans. Automat. Control, Ollivier, F. (1990) Le problème de l’identifiabilité structurelle globale : approche théorique, méthodes effectives Vol. 51, pp. 1172-1177. et bornes de complexité, Thèse, École Polytechnique, Mai, P., Join, C., and Reger, J. (2007) ‘Flatness-based Palaiseau, France. fault tolerant control of a nonlinear MIMO system using algebraic derivative estimation’, Proc. 3rd IFAC Symp. Ollivier, F., and Sedoglavic, A. (2002) ‘Algorithmes efficaces pour tester l’identifiabilité locale’, Actes Conf. Int. System Structure Control (SSSC07), Foz do Iguaçu, Francoph. Automatique (CIFA 2002), Nantes. Brazil. Pomet, J.-B. (1997) ‘On dynamic feedback linearization of Yosida, K. (1984) Operational Calculus: A Theory of Hyfour-dimensional affine control systems with two inputs’, perfunctions (translated from the Japanese), Springer. ESAIM Control Optimis. Calculus Variat., Vol. 2, pp. Zhang, Q., Basseville, M., and Benveniste, A. (1998) ‘Fault 151-230. detection and isolation in nonlinear dynamic systems: a Reger, J., Mai, P., and Sira Ramı́rez, H. (2006) ‘Robust alcombined input-output and local approach’, Automatgebraic state estimation of chaotic systems’, Proc. IEEE ica, Vol. 34, pp. 1359-1373. 2006 CCA/CACSD/ISIC, Munich. Zinober, A., and Owens, D.H. (Eds.) (2002) Nonlinear and Ritt, J.F. (1950) Differential Algebra, American MatheAdaptive Control, Lect. Notes Control Informat. Sci., matical Society. Vol. 281, Springer. Rudolph, J. (2003) Beiträge zur flacheitsbasierten Folgeregelung linearer und nichtlinearer Syteme endlicher und undendlicher Dimension, Shaker Verlag. Rudolph, J., and Delaleau, E. (1998) ‘Some examples and remarks on quasi-static feedback of generalized states’, Automatica, Vol. 34, pp. 993-999. Saccomania, M.P., Audoly, S., D’Angio, L. (2003) ‘Parameter identifiability of nonlinear systems: the role of initial conditions’, Automatica, Vol. 39, pp. 619-632. Sastry, S. (1999) Nonlinear Systems, Springer. Schweppe, F.C. (1973) Uncertain Dynamic Systems, Prentice Hall. Sedoglavic, A. (2002) ‘A probabilistic algorithm to test local algebraic observability in polynomial time’, J. Symbolic Computation, Vol. 33, pp. 735-755. Sira-Ramı́rez, H., and Agrawal, S.K. (2004) Differentially Flat Systems, Marcel Dekker. Sira-Ramı́rez, H., and Fliess, M. (2006) ‘An algebraic state estimation approach for the recovery of chaotically encrypted messages’, Int. J. Bifurcation Chaos, Vol. 16, pp. 295-309. Slotine, J.J. (1991) Applied Nonlinear Control, Prentice Hall. Smolin, L. (2006) The Trouble with Physics - The Rise of String Theory, the Fall of Science, and What Comes Next, Houghton Mifflin. Sontag, E.D. (1998) Mathematical Control Theory, 2nd ed., Springer. Staroswiecki, M., and Comtet-Varga, G. (2001) ‘Analytic redundancy for fault detection and isolation in algebraic dynamic system’, Automatica, Vol. 37, pp. 687699. Su, Y.X., Zheng, C.H., Mueller, P.C., and Duan, B.Y. (2006) ‘A simple improved velocity estimation for lowspeed regions based on position measurements only’, IEEE Trans. Control Systems Technology, Vol. 14, pp. 937-942. Vachtsevanos, G., Lewis, F.L., Roemer, M., Hess, A., and Wu, B. (2006) Intelligent Fault Diagnosis and Prognosis for Engineering Systems, Wiley.
5cs.CE
A Stochastic Geometry Approach to Asynchronous Aloha Full-Duplex Networks arXiv:1512.01478v2 [cs.NI] 22 Sep 2017 Andrea Munari, Member IEEE, Petri Mähönen, Senior Member IEEE, Marina Petrova, Member IEEE Abstract—In-band full-duplex is emerging as a promising solution to enhance throughput in wireless networks. Allowing nodes to simultaneously send and receive data over the same bandwidth can potentially double the system capacity, and a good degree of maturity has been reached for physical layer design, with practical demonstrations in simple topologies. However, the true potential of full-duplex at a system level is yet to be fully understood. In this paper, we introduce an analytical framework based on stochastic geometry that captures the behaviour of large full-duplex networks implementing an asynchronous random access policy based on Aloha. Via exact expressions we discuss the key tradeoffs that characterise these systems, exploring among the rest the role of transmission duration, imperfect selfinterference cancellation and fraction of full-duplex nodes in the network. We also provide protocol design principles, and our comparison with slotted systems sheds light on the performance loss induced by the lack of synchronism. Index Terms—Full-Duplex, Stochastic Geometry, Random Access, Aloha. T I. I NTRODUCTION HE inability for a radio to concurrently send and receive information over the same frequency band has represented for decades a cornerstone in the design of wireless communications systems. The conceptually simple task of cancelling a known radiated message superposed to an incoming waveform of interest has in fact long remained elusive for realtime implementations, due to the unbalance of several orders of magnitude between useful power and self-interference. This classical state of the art has witnessed a tremendous change of perspective in the past few years, driven by the compelling quest for higher spectral efficiency, and supported by steady improvements in signal processing and computational power. Resorting to advanced self-interference suppression techniques both in the analog and digital domain, in-band full-duplex was demonstrated for the first time in practical wireless scenarios in the early 2010s [1], [2], and has captured increasing attention within the research community ever since. While detailed implementation aspects are beyond the scope of this article A. Munari and P. Mähönen are with the Inst. for Networked Systems (iNETS) of RWTH University Aachen, Kackertstrasse 9, 52072 Aachen, Germany (e-mail: {andrea.munari, petri.mahonen}@inets.rwth-aachen.de). M. Petrova is with KTH Royal Institute of Technology, School of Information and Communication Technology, Department of Communication Systems, SE-100 44 Stockholm (email: [email protected]) c 2017 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. Digital Object Identifier 10.1109/TNET.2017.2750908. – the interested reader is referred to [3]–[5] for excellent surveys – most of the proposed solutions have been validated via software-defined radios or through prototypes employing off-the-shelf hardware, proving the viability of full-duplex for a large market of low-cost terminals. With this horizon in mind, information-theoretic tools helped in clarifying the potential of concurrent transmission and reception in toy topologies, exploring the achievable rate regions and the degrees of freedom in relation to the accuracy of self-interference cancellation and the number of available antennas [6]–[9]. Alongside with these efforts, a number of protocols at the medium access layer have been designed to bridge the gap with existing standards, showing by means of simulations and testbed results interesting improvements over a half-duplex configuration in centralised [10] and distributed ad hoc scenarios [11]–[14] based on IEEE 802.11. Despite the maturity reached in the design of a single link and the remarkable performance gains achieved in simple settings, a deep understanding of the role played by fullduplex in more complex ad hoc networks is however still elusive. In fact, when instantiated in large topologies, the novel paradigm triggers a non-trivial tradeoff between spatial reuse and aggregate interference. On the one hand, the ability to leverage simultaneous bidirectional data exchanges within node pairs allows more links to be active per unit area, potentially boosting performance. On the other hand, the additional amount of interference generated by a more aggressive access to the medium besets ongoing receptions, decreasing the probability of successfully retrieving information. The overall balance of such counterposed effects as well as the influence of more realistic traffic patterns on full-duplex connections are only a few of the open questions that still need to be addressed. Particularly, a clear theoretical perspective to derive some general design principles for next-generation wireless networks is yet to be completely grasped. A first relevant step in this direction was taken in [15], leaning on the well-known protocol model of Gupta and Kumar. Assuming that power only propagates within a circle area centred at the transmitter, [15] evaluated the throughput gain over half-duplex in linear and lattice topologies with centrally scheduled communications, and proved that the harsher interference level brought by full-duplex intrinsically prevents a network-wide throughput doubling. Further light on the achievable performance has been recently shed resorting to stochastic geometry, which lends itself excellently to characterise the tradeoff between spatial reuse and aggregate interference.1 Some preliminary insights were offered in [17], capturing the approximated behaviour of wireless full-duplex links affected by log-normal shadowing and Nakagami fading. These results were then significantly broadened by the contribution of Tong and Haenggi [18], which is particularly relevant to the present work. The paper focused on bipolar networks, where pairs of nodes distributed over the plane following a Poisson point process access the medium via a slotted Aloha policy. In this context, the probability distribution of the signal-to-noise-and-interference ratio experienced at a receiver subject to Rayleigh fading was derived, accounting for both half- and full-duplex transmissions within the system. The authors confirmed that a factor-two throughput improvement over a purely half-duplex configuration is not achievable in large distributed topologies, and identified the fraction of links that shall be operated in full-duplex mode to maximise performance. The role played by residual self-interference was also analytically captured, showing how the use of full-duplex becomes in fact detrimental for the aggregate network unless a minimum level of cancellation is granted. Similar trends were confirmed by [19] for a multi-tier network where different node pairs can employ distinct transmission power levels, and extended to characterise the stability of the system’s queues in [20]. While pivotal, the aforementioned results assume perfect synchronisation among all nodes to ensure a slotted medium contention. This condition, though, is hardly met in practical instances of distributed topologies, which resort instead to asynchronous random access strategies [21]. To tackle this gap, research has recently started to focus on listen-beforetalk access schemes, extending the vast body of literature on stochastic geometry models for CSMA (see, e.g. [22] and references therein) to account for full-duplex capable nodes. Along this line, [23] derived approximated performance expressions under the protocol- and a Rayleigh fadingmodel considering perfect self-interference cancellation. Most notably, the work showed how the larger exclusion regions induced by a bi-direction transmission between a node pair can indeed be beneficial to ease the hidden and exposed terminal problems. As a result, relevant aggregate throughput gains over a purely half-duplex counterparts were proven possible also in CSMA settings, particularly when the link distance is small compared to the carrier sense range. Research efforts carried out so far, however, have provided no insights on the potential of the novel paradigm in asynchronous random access topologies that do not resort to listen-before-talk. On the other hand, this domain is gaining renewed interest thanks to emerging market applications for machine-type communications (MTC), which aim at connecting a massive number of low-power/low-complexity devices possibly spread over a wide area and exchanging information in a fully decentralised and sporadic fashion [24]. For these systems CSMA is often not the access strategy of choice, due to its well-known inefficiencies under low channel loads and large propagation times, as well as to the additional energy 1 While the focus of this paper is on ad hoc networks, the concept of fullduplex is being explored also in cellular scenarios. The interested reader is referred to, e.g. [16]. consumption it entails for sensing the medium [21], [25]. In this perspective, the simpler unslotted Aloha solution can be more convenient, and is in fact being implemented again in a number of commercial solutions such as LoRa [26] or SigFox [27]. At the same time, simultaneous transmission and reception capabilities are regarded with increasing interest for MTC as well [24], due to the dramatic network capacity improvements they might bring. Understanding whether fullduplex can be effectively leveraged in such settings is thus paramount for proper system design, and represents a deciding element towards identifying applications that can truly benefit from the new technology. Motivated by this background, in the present article we tackle then a fundamental and still open question, offering the first study of in-band full-duplex for asynchronous random access networks that do not rely on carrier sensing. Our contributions can be summarised as follows: • • • • through stochastic geometry tools, we capture the behaviour of unslotted Aloha systems where a fraction of nodes are full-duplex capable. Exact expressions for the success probability at a link level as well as for the aggregate network throughput are derived, accounting for imperfect self-interference cancellation and clarifying the impact of design parameters such as transmission duration and distance between transmitter and receiver. In the discussion, similarities and differences with the seminal work in [18] for slotted systems are highlighted, stressing the peculiarities of asynchronous access; assuming all links to be of the same duration, we identify different optimal operating regions for the system. In particular, we show how full-duplex shall be preferred for short packet exchanges, whereas for transmissions longer than a specified threshold the whole network shall be operated in half-duplex to avoid throughput losses; we explore the additional degree of freedom of having transmissions of different duration in the network, and derive the optimal working configuration in this case, significantly extending the applicability of the analytical framework; we finally present a direct comparison with the results derived in [18] for slotted Aloha, and discuss the throughput degradation induced by the lack of synchronisation among nodes, offering a tool to approach a key costperformance tradeoff in system planning. We start our study in Section II introducing the system model and some preliminary results on stochastic geometry, later leveraged in Section III to derive the performance of an asynchronous full-duplex network. Sections IV and V extend the framework to account for different packet durations and offer a comparison with slotted schemes, eventually leading to the conclusions drawn in Section VI. II. S YSTEM M ODEL AND P RELIMINARIES Throughout this paper we focus on an infinite population of users spread over the plane that share a common medium to exchange information in the form of data packets. Nodes are Ui r ϕ wi Vi ui vi (0, 0) cluster Ci = {Ui , Vi } typical receiver Fig. 1: Reference geometry for the links between the typical receiver located at the origin and nodes within cluster Ci . organised in pairs or clusters,2 and only one-hop links between a terminal and its pair-companion are considered. We indicate the two users forming cluster Ci as Ui and Vi , and specify their location by means of the two-dimensional coordinate vectors ui and vi respectively, as shown in Fig. 1. For each pair, we assume nodes to be separated by a common distance r ≥ 1, i.e. kui −vi k = r, ∀i.3 Clusters can operate either in half-duplex or full-duplex mode. In the former case, one terminal transmits packets according to the underlying medium access strategy, while the other simply acts as receiver and does not generate any traffic. As to the latter mode, instead, both nodes in the pair access the channel simultaneously, leveraging in-band fullduplex capabilities to send and receive data at the same time over the same frequency. In order to cover a broad range of configurations, we assume that a fraction q of clusters resort to full-duplex operations, whereas the remaining perform halfduplex access. Communication parameters in terms of bitrate, modulation and coding are, unless otherwise specified, common to all terminals and set for every transmission to have a duration D. Medium contention is performed asynchronously via random access, following a simple unslotted Aloha protocol, and no feedback nor retransmission policy are considered. Following this approach, the channel is accessed without sensing the surrounding activity and without adhering to any slotted time structure. The only form of coordination we consider in the network is thus between users of the same pair, assuming the receiver to be always listening to the incoming transmission of its companion in a half-duplex cluster, or both nodes to simultaneously start a reciprocal transmission in the full-duplex configuration. In this perspective, while we abstract here any further details for the sake of generality and mathematical tractability, it is worth mentioning that different strategies have been proposed in the literature to bring such coordination into practice, see, e.g. [10], [11], [13]. In order to capture the behaviour of the system, we introduce an analytical framework based on stochastic geometry, and 2 The terms cluster and node pair will be used interchangeably. presented results can easily be extended to an arbitrary i.i.d. distribution for the pair distance. Having a single value for r, however, eases the mathematical discussion while prompting all the key tradeoffs. 3 The model links in the network via a homogeneous time-space Poisson point process (PPP) Λ = {(ui , Ti )} of intensity λ. With reference to the topology of Fig. 1, the spatial component ui of the process describes the location of terminal Ui , also referred to as the cluster centre, which, in case of a halfduplex pair, acts as transmitter. The companion node Vi is instead randomly scattered over a circle of radius r centred at Ui , allowing its position to be expressed as vi = ui +wi , where wi = rejϕi and ϕi ∼ U[0, 2π). In turn, the temporal component Ti of Λ identifies the start time of the transmission performed by cluster Ci . From this standpoint, it is important to stress that we do not focus on a spatial point process describing the distribution of nodes and track the evolution of their unslotted medium access over time, e.g. by resorting to a renewal process. Conversely, Λ jointly captures position and transmission time of a cluster, modelling the network as a population of node pairs that are born at a random time and a random location and occupy the channel for a predefined duration D before disappearing. This approach introduces a further level of abstraction, as it embeds in the sole parameter λ the spatial density of the population and the traffic generation pattern, as well as possible backoff strategies applied to the medium access contention. On the other hand, these working hypotheses will yield a compact mathematical formulation capable of identifying the key tradeoffs of full-duplex networks, and will be shown to offer a very accurate estimation of the performance of unslotted systems in Section III. Moreover, from a practical angle not only can the space-time process under consideration easily be mapped to mobile topologies, but also to scenarios with very large populations of terminals generating sporadic traffic, covering a case of strong interest for MTC applications. Within this framework, Λ characterises the number of links initiated in a region of area A over a time interval T , described as a Poisson r.v. of parameter λAT . The hybrid nature of clusters in the network is accounted for by having each pair independently decide whether to establish a half- or a fullduplex connection with probability 1−q and q, respectively. By virtue of the properties of thinning for PPPs (see, e.g. [28]), the original process can then be conveniently expressed as Λ = Λhd ∪Λfd , where Λhd and Λfd are two independent PPPs of intensity (1−q)λ and qλ. Wireless links are affected by path loss and Rayleigh fading, and the coherence time of the wireless channel is assumed long enough for fading coefficients to remain constant throughout the duration of a packet exchange. Accordingly, we model the power received by a node at position y from a transmission originated at location x as P L(x, y)ζ. Here, P is the transmission power common to all users, ζ is an exponential random variable with unit mean and pdf fζ (a) = e−a , a ≥ 0 describing fading, and L(x, y) accounts for the signal attenuation. With the aim of focussing on the key performance drivers, we do not explicitly address antenna gains or other propagation factors, and consider instead a simple path loss law based on the distance d = kx−yk, in the form L(d) = d−α , α > 2.4 4 Although rigorously the considered path loss law is only meaningful for d ≥ 1, extensive results have shown its capability of properly capturing the behaviour of large networks, see, e.g. [28]. The effectiveness of the presented system clearly lives on the tradeoff between the spatial reuse enabled by random access and the mutual interference that besets concurrent links. From this standpoint, it is relevant to stress that the asynchronous nature of the MAC layer under consideration can induce an interference level that is not constant even within the duration of a packet exchange. Starting from this remark, and leveraging the homogeneity of the PPP Λ, we focus without loss of generality on the typical receiver, i.e. a node at the origin of the plane whose incoming data unit starts at time 0, and derive the time-varying interference I(t) it perceives at a generic instant t ∈ [0, D]. To this aim, it is useful to resort to the indicator function I(·) and introduce the ancillary operator ι(t) = I(T ≤ t ≤ T +D), specifying whether cluster (u, T ) is active at time t. Moreover, we simplify without risk of confusion the notation for the path loss, setting for an arbitrary point x on the plane L(x) := L(x, 0). Leaning on these steps, it is possible to isolate the interference contributions Ihd (t) and Ifd (t) of half- and full-duplex pairs, with the former having only one terminal sending data, while the latter triggering two spatially disjoint and concurrent transmissions. The timevarying interference perceived at the typical receiver can thus be expressed as I(t) = Ihd (t)+Ifd (t), where X Ihd (t) = ι(t)·P L(u) ζu (u,T )∈Λhd Ifd (t) = X ι(t)·P L(u)ζu +L(v)ζv (u,T )∈Λfd  (1) and, in the second equation, ζu and ζv indicate the independent fading coefficients for the links between the receiver of interest and the two nodes in the full-duplex cluster (u, T ). Given the interference-limited nature of the networks under consideration, we disregard thermal noise and evaluate the performance of the system based on the signal-to-interference ratio (SIR). More specifically, in an effort to preserve the mathematical tractability of the problem, we are interested in the ratio between the incoming power of the desired signal at a receiver and the time-averaged value I of the interference it perceives over the packet.5 Within our framework, the latter quantity and its half- and full-duplex clusters induced components Ihd and Ifd can be expressed as Z Z 1 D 1 D Ihd (t) dt + Ifd (t) dt . (2) I = Ihd +Ifd = D 0 D 0 We thus introduce the signal-to-time-averaged-interference ratio for a half-duplex receiver as SIRhd = P L(r)ζ/I. On the other hand, decoding during a full-duplex connection is also hampered by a residual self-interference component S due to imperfect cancellation algorithms, so that SIRfd = P L(r)ζ/(I +S). Buttressed by experimental results [29], we assume a linear dependence of S to the emitted power, and relate it to a cancellation efficiency coefficient η ∈ [0, 1] as S = P (1−η). This working hypothesis is particularly handy, as it induces SIR values which are independent of P for both half- and full-duplex links, helping to identify broadly 5 The assumption of threshold decoding based on the introduced definition of SIR is representative of, e.g. systems using coding and interleaving. applicable tradeoffs. Accordingly, in the remainder of our discussion we will refer to the case of unit transmission power, and set P = 1 without loss of generality. A threshold model is considered for decoding, with a packet being retrieved if the SIR experienced at its receiver is above a reference value θ. Focussing first on a half-duplex cluster, the probability of its data exchange to be successful directly follows:   θ (Ihd +Ifd ) (hd) . (3) ps = P {SIRhd ≥ θ } = P ζ ≥ L(r) Starting from the exponential distribution of ζ and leveraging the law of total probability over the two independent processes Λhd and Λfd , (3) can be conveniently written as h i h i α α p(hd) = E e−Ihd θ r E e−Ifd θ r = LIhd (θrα ) LIfd (θrα ) s (4) where the second equality stems from the definition of Laplace transform of a random variable X, LX (s) := E[e−sX ]. Following a similar approach, it is straightforward to also derive the success probability for a full-duplex link as α ps(fd) = e−(1−η)θr ·LIhd (θrα ) LIfd (θrα ) = β p(hd) (5) s  where β := exp −(1−η)θ rα accounts for imperfect selfinterference cancellation. It is worth noting that the formulations of (4), (5) resemble the ones in [18]. The factorisation in terms of Laplace transforms, in fact, stems from the independent thinning of Λ in its half- and full-duplex components in combination with the underlying random access policy. On the other hand, the way interference affects ongoing links, i.e. the specific expression of LIhd and LIfd , is profoundly different in the asynchronous case under study and the slotted Aloha setting of [18], as will become clear in the next section. In order to complement our analysis, we evaluate the performance of the system in terms of the throughput density T , defined as the average number of information bits per second successfully exchanged in the network per unit area. Assuming an information bitrate of W bit/s common to all transmissions, a delivered packet contributes with W D bits to the throughput, so that   (fd) T = λD W (1−q)p(hd) +2q p . (6) s s Within (6), the first addend accounts for the fraction 1−q of half-duplex connections, whereas the second brings in the contribution of full-duplex clusters, potentially delivering up to two data units per link. III. T HE P ERFORMANCE OF A SYNCHRONOUS F ULL -D UPLEX NETWORKS The model of Section II highlighted how the performance of our asynchronous system can be characterised through the Laplace transforms LIhd (s) and LIfd (s). An elegant formulation of the former was devised by Błaszczyszyn et al. in the context of solely half-duplex Aloha networks [30]. For the sake of compactness we omit here the details of their derivation, and rather focus on a slightly modified version of the original outcome [30, (3.8)] obtained via simple mathematical manipulations. Accordingly, we express the Laplace transform of the where the ancillary function Ωhd is defined as     2 2 2 2α 2 α Ωhd (r, θ, α) = πr θ Γ 1+ Γ 1− (8) α α (α+2) R∞ and Γ(x) = 0 xt−1 e−x dt is the complete Gamma function. The result in (7) is particularly insightful, as it isolates the role of two key performance drivers. On the one hand, an exponential dependence of LIhd – and thus of the success probability – on the duration D of the active links is prompted, stressing the intrinsic weakness of longer transmissions to interference. On the other hand, the factor Ωhd summarises the impact of the system parameters r, θ and α, embedding the structure of the interference generated by half-duplex clusters. A. The Laplace transform of interference by full-duplex links A finer level of detail is needed instead to determine the impact of full-duplex pairs accounted for by LIfd (θrα ), which represents a fundamental and novel contribution of our framework. As a preliminary step, the value of the generated interference Ifd introduced in (2) can be conveniently simplified by recalling the definition in (1) to obtain X  Ifd = ω(T )· L(u) ζu +L(v) ζv (u,T )∈Λfd where the time averaging is captured by the function ( Z D D−|T | T ∈ [−D, D] ι(t) D dt = . ω(T ) , D 0 elsewhere 0 Taking the lead from this, we can set the calculation of the the Laplace transform LIfd (s), s ∈ R+ , in the form: " # h i Y −sIfd −s ω(T )(L(u)ζu +L(v)ζv ) LIfd (s) = E e =E e . (u,T )∈Λfd (9) The expectation in (9) operates over both fading and the PPP in its space and time components. As to fading, the independence of the involved Rayleigh channel coefficients allows to bring the expectation over random variables ζu and ζv inside the product, enabling the reformulation reported in (10) at the bottom of next page. With reference to this, equality (a) simply follows by the law of the unconscious statistician and by the exponential distribution of unit mean for the fading coefficients. On the other hand, step (b) stems from the probability generating functional of the homogeneous PPP Λfd of intensity λq [28], recalling that, for cluster Ci , Vi is uniformly distributed around the centre node Ui over a circle of radius r, i.e. vi = ui +rejϕ , ϕ ∼ U[0, 2π) (see Fig. 1). The formulation in (10) relates the Laplace transform to the averaging over the space and time components of a full-duplex cluster, and can be further simplified under the considered working assumptions. In particular, the linear trend and 4 1.6 3.5 decoding threshold, θ interference perceived at the typical receiver due to half-duplex pairs in the form   LIhd (θ rα ) = exp −λ(1−q) D Ωhd (7) 1.65 3 2.5 1.7 1.75 2 1.8 1.5 1.85 1 1.9 2.5 3 3.5 4 4.5 5 α Fig. 2: Values of δ(θ, α) = Ωfd (r, θ, α)/Ωhd (r, θ, α) as a function of the path loss exponent α and of the decoding threshold θ. limited support of ω(T ) lead via straightforward calculations to a closed-form expression for the inner integration: Z  Z  1 1 2π 1 1− dϕ dT 2π 0 1+sL(u)ω(T ) 1+sL(u +rejϕ )ω(T ) R Z = 2D 0   1 ln 1+sL(u) −ln 1+sL(u +rejϕ )  1− dϕ 2π s L(u)−L(u +rejϕ ) (11) 2π Plugging (11) into (10), the remaining spatial averaging can be expressed resorting to polar coordinates and observing that the overall integrand does not depend on the azimuthal component of the cluster centre due to symmetry, to obtain   LIfd (θrα ) = exp −λq D Ωfd (12) where Ωfd is reported by (13) at the bottom of next page. The presented result is remarkable, as we can once more isolate the effect of the key design parameters q and D from the factor Ωfd . The latter, in turn, is not affected by the fraction of full-duplex clusters in the network nor by the duration of the transmissions, and just characterises the interference contribution that each full-duplex link produces. Further insights are offered by the following, proven in Appendix A: Theorem 1: Within the considered system model, for any α > 2 and r ≥ 1, the ratio Ωfd (r, θ, α)/Ωhd (r, θ, α) is independent of the distance r between the nodes in a cluster. The statement entails some relevant remarks. Firstly, it confirms a similar trend exhibited in slotted systems [18, Cor. 5], prompting a non-trivial parallel given the deeply different structure of the interference in the two cases.6 Secondly, recalling the expression of Ωhd in (8), we infer that LIfd exhibits a quadratic dependence on r as well. Thus, the success probability (4) of a half-duplex data exchange is in the form of an exponential function of r2 regardless of the path loss exponent α. Even more interestingly, for β = 1 the same (fd) trend holds for ps , leading to the conclusion that the performance ratio between half- and full-duplex transmissions is not affected by the link distance under the assumption of perfect 6 An extensive comparison with slotted schemes will presented in Section V. self-interference cancellation. In asynchronous systems, this is a peculiar trend of Aloha-based access that contrasts with the behaviour of CSMA, for which the listen-before-talk mechanism was shown to favour full-duplex gains in short links even with β = 1 [23]. As we will see later, the sourcedestination distance starts playing a critical role for Aloha only in the presence of residual self-interference. From a different angle, Theorem 1 allows the factorisation Ωfd (r, θ, α) = δ(θ, α)·Ωhd (r, θ, α). This expression is particularly handy, prompting the computation of Ωfd as the product of Ωhd , for which a simple closed form expression is available, and a function δ which can readily be evaluated numerically. Furthermore, δ only depends on the decoding threshold and on the path loss exponent, so that it is sufficient to compute it once for a (θ, α) pair to readily get the success probabilities for any value of density λ, for any fraction of fullduplex clusters as well as for any link distance. The introduced framework thus offers a compact tool to easily characterise the performance of a variety of network configurations. Along this line of reasoning, Fig. 2 reports in contour form the values of δ(θ, α) for an extensive set of parameters. In order to get a deeper understanding of the plot, it is insightful to consider the two opposite scenarios of a purely half-duplex, i.e. q = 0, and a purely full-duplex, i.e. q = 1, network. Recalling (4), the success probability for a data exchange in the (hd) = exp(−λD Ωhd ). Similarly, former case simplifies to ps when q = 1, we get from (5) and under the hypothesis (fd) of ideal self-interference cancellation ps = exp(−λD Ωfd ). Assuming the same configuration in terms of traffic intensity λ and packet duration D, thus, the reliability loss undergone in a solely full-duplex system due to the higher interference triggered by concurrent communications between nodes of a cluster is driven exactly by the ratio δ. From this standpoint, Fig. 2 quantifies two interesting trends. On the one hand, larger path loss exponents are especially beneficial to fullduplex communications, by virtue of the stronger attenuation undergone by the aggregate network interference. On the other hand, for a given value of α, the same reduction in terms of θ, i.e. the same improvement in decoding schemes to tolerate lower SIR, pays off more in a completely half-duplex configuration. In purely full-duplex settings, the beneficial effect of more advanced receivers is counteracted by the additional interference that has to be faced. LIfd (s) = EΛfd "  Y h i h B. Aggregate network throughput The exact expressions derived for the packet retrieval probabilities allow us to evaluate the network throughput density, which captures the tradeoff between spatial reuse and additional interference triggered by in-band full-duplex. In particular, the general formulation of (6) can be further elaborated to obtain   T = W λD 1+q (2β −1) e−λD (1−q)Ωhd +qΩfd . (14) Within (14), we can conveniently introduce the network load G = λD, quantifying the average fraction of time the medium is occupied over a reference unit area. The definition prompts how, despite the non-trivial nature of the system under study, the throughput exhibits the trend of a typical Aloha-based MAC, mathematically described by the product of G to a negative exponential function of G itself. Throughout our analysis, however, we do not characterise performance in terms of network load, but rather investigate the behaviour of the network under a fixed traffic density λ and varying the duration of D of a data exchange. The rationale behind the choice is twofold. In the first place, this approach will offer insightful hints on how to optimise systems in which topology and traffic pattern cannot be controlled. A relevant example are MTC networks, where each node of a vast population only sporadically generates a packet, so that identifying the proper length of an information unit for a half- or full-duplex exchange can become of critical relevance. Secondly, capturing the dependence of the throughput on D will pave the road to the investigation of an additional degree of freedom typically missing in slotted systems, i.e. the transmission of packets of different durations. We begin our discussion assuming ideal self-interference cancellation (i.e. η = 1), and focus on the cases of a purely half-duplex and a purely full-duplex network. Unless otherwise specified, we refer to a system with parameters λ = 0.05, r = 1, α = 4, W = 1 and θ = 2. The analytically derived throughput density achievable in the two cases when varying the packet duration D is reported in Fig. 3 by solid lines. To validate the underlying rain-Poisson model, we ran dedicated simulations considering a network where the spatial and temporal component of medium access are decoupled. Specifically, node pairs were located on the plane via a PPP Λ0 ⊂ R2 of intensity λ0 . Following the pure Aloha Eζu e−sω(T )L(u)ζu Eζv e−sω(T )L(v)ζv (u,T )∈Λfd i # (a)  = EΛfd  Y (u,T )∈Λfd  1 1  · 1+sL(u)ω(T ) 1+sL(v)ω(T )   Z Z Z 2π 1 1 1 (b) = exp −λq du dT 1− dϕ 2π 0 1+sL(u)ω(T ) 1+sL(u +rejϕ )ω(T ) R2 R Z Ωfd (r, θ, α) = 0 ∞  Z 4u π − 0 π  − α   ln (1+θrα u−α )−ln 1+θrα u2 +r2 +2ru cos ϕ 2   dϕ du −α θrα u−α −(u2 +r2 +2ru cos ϕ) 2 (10) (13) 1 optimal fraction of FD clusters, q ∗ throughput density, T 0.05 q = 0 (HD only) q = 1 (FD only) q = 0.5 simulations 0.04 0.03 0.02 0.01 0 0 1 2 3 4 5 6 packet duration, D Fig. 3: Network throughput density vs packet duration for different fractions of full-duplex clusters. Lines indicate the analytical trends, whereas circled markers the results of Monte Carlo simulations. approach, after a transmission of duration D a cluster picks a random backoff uniformly drawn in [0, B] and then accesses the medium again. To ensure a fair comparison, the spatial density of Λ0 was set so to have the same average network load generated by the rain Poisson process Λ, i.e. imposing λD = λ0 D/(D +B). The outcome of the simulations are reported with their statistical confidence bars in Fig. 3 for B = 14. An excellent match with the analytical curves is shown for all values of D, buttressing the accuracy of the proposed framework relying on the rain Poisson assumption. Focussing then on the performance trends, the plot highlights how full-duplex capabilities indeed boost performance for short data units, thanks to the higher degree of spatial reuse they enable. On the other hand, when longer packets are considered, the detrimental effect of the additional interference generated by having two concurrent transmissions per cluster kicks in, leading to a steep decrease in the achievable throughput and eventually making a simple half-duplex setting more convenient. Leveraging the broad applicability of (14), Fig. 3 also depicts the behaviour of a hybrid system in which only half the pairs are capable of transmitting and receiving at the same time (q = 0.5, dashed line). As expected, such a configuration blends benefits and drawbacks identified for the q = 0 and q = 1 cases, improving over a purely halfduplex system for short communications and degrading more gently than the full-duplex only scheme for longer information units. More interestingly, the curves also prompt a third region in which an intermediate configuration outperforms in fact both its counterparts. This observation raises then the relevant question of what is the fraction q ∗ of full-duplex clusters one should aim for to maximise throughput given a certain value of D. On the one hand, if we naturally interpret q as the penetration level of more advanced terminals in a traditional half-duplex network, the optimisation problem can be seen as a driver in the decision on whether to undergo the costs to further upgrade an existing system. On the other hand, even when the capabilities of deployed nodes cannot be changed, q may still represent a key design parameter to tweak the fraction of links that shall in fact resort to full-duplex to leverage the non-trivial tradeoff between spatial reuse and additional interference at its 0.9 0.8 0.7 0.6 0.5 0.4 0.3 full-duplex only 0.2 hybrid half-duplex only 0.1 0 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 packet duration, D Fig. 4: Fraction of full-duplex clusters to maximise network throughput vs. packet duration (perfect self-interference cancellation). utmost. The question can be effectively addressed leaning on the simple structure of (14), and recalling that Ωhd and Ωfd do not depend on q. Setting then ∂T /∂q = 0, we obtain the optimal fraction of full-duplex clusters when varying D:  1 D ∈ [0, D1 )    1 1 q∗ = (15) − D ∈ [D1 , D2 )  λ(Ωfd −Ωhd ) 2β −1   0 D ≥ D2 where the switching boundaries are defined as   1 2β −1 2β −1 · 1− , D2 = D1 = λ(Ωfd −Ωhd ) 2β λ(Ωfd −Ωhd ) (16) Confirming the intuition prompted by Fig. 3, (15) identifies three optimal operating regions, reported graphically in Fig. 4 under the assumption of perfect self-interference cancellation. For sufficiently short packets (D ≤ D1 ), network throughput is indeed maximised by letting as many clusters as possible – ideally, all of them – operate in full-duplex mode. Conversely, when data units are longer than threshold D2 , even fullduplex capable nodes shall not take advantage of simultaneous transmission and reception in favour of unidirectional links. Remarkably, a closed form expression is available to also characterise the optimal value q ∗ in the intermediate region as a function of the ancillary functions Ωfd and Ωhd . The plot thus presents a first design takeaway, suggesting the use of in-band full-duplex for quick information exchanges between two nodes rather than for longer connections. Such traffic patterns in turn are of strong interest, being well matched by an increasing number of applications that embody the small-data paradigm [24], and representing a core aspect in the domain of machine-type and device-to-device communications which typically generate short and sporadic data units. Even more relevant is to stress that the optimal operating regions introduced in Fig. 4 describe the network behaviour assuming terminals capable of ideally removing any trace of self-interference. The performance deterioration undergone by full-duplex when exchanging long data units, thus, cannot be eased resorting to more advanced signal processing, but rather represents an 1.24 1.22 peak throughput gain, χ optimal fraction of FD clusters, q ∗ 1 0.9 perfect cancellation 0.8 0.7 η = 0.7 0.6 0.5 0.4 η = 0.8 η = 0.9 0.3 η = 0.95 0.2 θ=3 1.2 θ=2 1.18 1.16 1.14 θ=1 1.12 1.1 θ = 0.5 1.08 1.06 0.1 1.04 0 0 0.5 1 1.5 2 2.5 3 3.5 4 packet duration, D 2.5 3 3.5 4 4.5 5 path loss exponent, α Fig. 5: Optimal fraction of full-duplex clusters to maximise network throughput vs. packet duration. Imperfect self-interference cancellation is considered. Fig. 6: Peak throughput gain achievable by a purely full-duplex network over a solely half-duplex one vs path loss exponent. Perfect self-interference cancellation is assumed. intrinsic and fundamental limitation faced by this technology in large and asynchronous networks. In parallel to this general bound, the optimisation problem solved in (15)-(16) also offers a deeper understanding of the traffic patterns suitable for full-duplex in practical implementations, encompassing the impact of imperfect interference cancellation via the factor β. The outcome of the study is reported in Fig. 5, where the dashed line reproduces for completeness the regions under ideal cancellation discussed so far, whereas solid lines depict the q ∗ against D curve for different values of the efficiency parameter η. A critical role for residual selfinterference decidedly emerges from the plot, as lower values of η progressively limit the region of convenience for solely full-duplex systems to shorter communications. This trend eventually leads, for β ≥ 1/2, to a situation in which a simpler half-duplex network offers better performance regardless of the packet duration. Recalling the definition of β, this translates into a minimum requirement in terms of cancellation efficiency for full-duplex to be useful in a distributed asynchronous network in the form η ≥ 1− ln(2)r−α /θ. As a second remark, we notice that the presence of residual self-interference induces sharper transitions between the regions where only full- and only half-duplex are to be preferred. Such a trend is in general not desirable, as the operating condition of most interest is exactly the one where both kinds of link coexist. From this standpoint, not only can intermediate values of q be interpreted as representative of networks where a portion of the terminals have full-duplex capabilities, but also of topologies in which nodes within a cluster do not always have traffic for each other, failing the fundamental condition for a bidirectional connection to be established in the first place. simple dependence of T on the packet duration D reported in (14). Straightforward calculations allow to derive the optimal operating point D∗ = 1/ (λ ((1−q)Ωhd +q Ωfd )),7 and the corresponding throughput density as  W 1+q(2β −1) . T∗= (17) e (1−q)Ωhd +q Ωfd C. On the maximum achievable full-duplex gain The analysis carried out so far has clarified the importance of carefully selecting how many full-duplex links to trigger. We now extend our study to the complementary task of identifying how to tune the duration of data exchanges given a certain network configuration in terms of q so to maximise performance. The solution to this problem follows from the Remarkably, the expression does not depend on the efficiency of self-interference cancellation and on λ, showing how the peak performance is intrinsically limited by the nature of the interference generated by full-duplex links and does not scale with the density of the population. Leaning on (17), the maximum gain that bidirectional links can award when articulated topologies are considered can be computed. To this aim, we introduce the ratio χ of the peak throughput of a solely full-duplex network to the same quantity for a network operated in half-duplex mode, obtaining8  max T | q = 1 Ωhd  χ := = 2β · . Ωfd max T | q = 0 The metric is conveniently expressed as twice the correction factor Ωhd /Ωfd = 1/δ, which is lower than one even under the assumption of ideal self-interference cancellation. Not only does this confirms that full-duplex can in fact not double the network capacity in large asynchronous systems, but also readily quantifies the obtainable improvement. In fact, if we initially consider the ideal case β = 1, χ is completely defined by the ancillary function δ(θ, α) introduced and already discussed in Fig. 2. For the sake of readability, the behaviour of χ against α for different values of the decoding threshold θ is also explicitly reported in Fig. 6. Recalling the outcome of 7 Note that the maximisation could also be carried out over the network load, leading to a scaled result in the form G∗ = λD∗ . The outcomes of the following discussion thus also directly apply to load optimisation. 8 Not surprisingly, the metric has the same form that was obtained in [18] for slotted Aloha. Indeed, the structure of χ eventually derives from the factorisation of the success probability in terms of the Laplace transforms LIhd and LIfd , which, as discussed, holds in both settings. The intrinsic distinction emerges from the actual expressions of the functions that capture the different impact of the interference for synchronous and asynchronous MAC policies (see Section V). 1.2 peak throughput gain, χ perfect cancellation 1 0.8 η = 0.99 0.6 η = 0.95 0.4 η = 0.9 0.2 0 1 1.5 2 2.5 3 3.5 4 link distance, r Fig. 7: Peak throughput gain achievable by a purely full-duplex network over a solely half-duplex one vs link distance. Theorem 1 we can immediately infer that, with perfect selfinterference cancellation, χ is independent of the link distance r. The results being presented are thus broadly applicable and characterise the fundamental behaviour of full-duplex systems, whose increased spatial reuse can pay off with at most a 20% throughput gain over their half-duplex counterparts for the reference parameter set α = 4, θ = 2. On the other hand, the situation drastically changes when imperfect cancellation is brought into the picture. By virtue of the exponential dependence of β on the cluster radius, indeed, residual selfinterference induces a dramatic degradation of the throughput gain offered by spatial reuse. This aspect is highlighted in Fig. 7, which reports χ as a function of r, and shows how already small losses in η fundamentally limit the throughput of the full-duplex network. Even more interestingly, poorer interference cancellation levels (e.g. η ≤ 0.9 in our case) eventually lead to a condition in which a purely half-duplex network outperforms its full-duplex counterpart regardless of the proximity of the communicating nodes. This offers two relevant design take-aways. In the first place, not only shall full-duplex links be employed when short data units have to be exchanged, but also they shall carefully be triggered when source and addressee are sufficiently close to each other. Secondly, the potential improvement in terms of capacity shall not distract from the importance of achieving levels of selfinterference cancellation even stronger than what is desirable from an isolated-link viewpoint. In the quest for low-cost terminals, this may in fact constitute a crucial challenge. IV. T HE I MPACT OF DIFFERENT PACKET D URATIONS The framework developed in Section III extensively characterises the performance of an Aloha network with full-duplex capabilities when all transmissions occupy the channel for the same time. On the other hand, one of the key outcomes of the study has been exactly to stress how half- and full-duplex links exhibit quite distinct requirements in terms of packet duration to operate optimally, with the former supporting longer communications and the latter leveraging spatial reuse at its utmost when exchanging short information units. Such a remark triggers the natural question of whether and how the system may benefit from independently tuning the duration of links of different nature. Notably, not only would the answer pave the road for additional optimisations, but also it would shed further light on the differences between asynchronous full-duplex systems and their slotted counterparts, clarifying the role of the additional degree of freedom represented by variable packet durations for the former family. We tackle the problem focussing on networks where each half-duplex connection has duration D, while a full-duplex exchange occupies the medium for γD. For consistency, we evaluate performance in terms of the throughput density T introduced in (6), which readily extends in this case to   (fd) T = λW D (1−q)p(hd) +2γq p . (18) s s The key task is thus once again to study the decoding probability for the different types of data exchanges. From this standpoint, even though the computational approach followed in Section II still holds and allows to express the success rate as the product of two Laplace transforms, the new setting slightly modifies the meaning of the involved factors. If we focus on a bidirectional connection, reception of incoming data is in the first place hampered by concurrent transmissions of clusters also operating in full-duplex mode with the same packet time. The impact of this interference contribution on the success probability is exactly the one captured by the Laplace transform in (12), considering data transfers of duration γD. Conversely, the result derived in (7) does not accounts properly for the impact of half-duplex connections whose duration is different from the one of the information unit being decoded, and needs to be extended. A similar reasoning applies to the success probability of a half-duplex link, making it possible to rely on the Laplace transform of the interference generated by clusters of the same kind in (7) while requiring a new computation for the impact of full-duplex communications with different duration. In summary, we have   p(hd) = LIhd θrα , D LIfd,hd θrα (19) s   p(fd) = LIfd θrα , γD LIhd,fd θrα ·β (20) s where the first factors in (19) and (20) are the Laplace transforms derived in Section III with an additional argument specifying the packet duration that shall be accounted for in the corresponding exponential function; LIfd,hd accounts for the interference generated by full-duplex links of duration γD over a half-duplex reception; and LIhd,fd covers the interference affecting a full-duplex receiver due to half-duplex clusters transmitting for a time D. Let us initially focus on the last term. By definition, and following the same steps discussed for the derivation of (10), we can write for s ≥ 0 h Y i 0 LIhd,fd (s) = E e−sω (T,γ)L(u)ζu (u,T )∈Λhd  Z Z  = exp −λ(1−q) du 1− R2 R 1 1+sL(u)ω 0 (T, γ)  dT  (21) If we concentrate for the moment on the scenario γ ≤ 1, simple calculations show that ω 0 has support [−D, γD] and evaluates within it to  D +T T ∈ [−D, −D(1−γ)) 1  ω 0 (T, γ ≤ 1) = · γD T ∈ [−D(1−γ), 0) γD   γD −T T ∈ [0, γD] This outcome allows to explicitly solve the time integral in (21), which can be expressed as    1 ln(1+sL(u)) 1−γ + 1− (22) 2γD 1− sL(u) 2γ 1+sL(u) Finally, plugging (22) into (21) and observing that the integration over the spatial component is independent of the angular coordinate of the interfering half-duplex cluster, it is possible to derive a closed form expression for the sought Laplace transform:   LIhd,fd (θrα |γ ≤ 1) = exp −λ(1−q)γD Ω0hd (23) resorting once more to the auxiliary function Ω0hd (r, θ, α|γ ≤ 1)      2 2 2α 2(1−γ) 2 2 α Γ 1− + . = πr θ Γ 1+ α α 2+α γ (24) The achieved result is quite insightful, as it provides a neat extension of the reference case studied in Section III. Firstly, comparing (23) to the Laplace transform of half-duplex interference reported in (7), we infer that the role played by the packet duration D and the traffic density λ is decoupled from the the other system parameters even when links of different durations are allowed in the network. Even more interestingly, (24) captures the effect of longer half-duplex communications over a full-duplex data exchange with respect to its counterpart in (8) simply by means of an additive correction term embodied by 2(1−γ)/γ. To complete the performance characterisation in terms of success probability, the evaluation of the impact of interference generated by full-duplex pairs – quantified by LIfd,hd – is in order. Considering again the case γ ≤ 1, the definition of Laplace transform leads us to   Y 00 LIfd,hd (s) = E  e−sω (T,γ)(L(u)ζu +L(v)ζv )  (u,T )∈Λfd where s ∈ R+ and the auxiliary function ω 00 expresses the average fraction of the half-duplex reception interfered by the full-duplex transmissions in cluster (u, T ) as Z 1 D 00 ω (T, γ) := I(T ≤ t ≤ T +γD)dt . (25) D 0 0.05 throughput density, T where the ancillary function reporting for the fraction of the half-duplex transmission of cluster (u, T ) that overlaps with the bidirectional link of interest is slightly reformulated as Z γD 1 I(T ≤ t ≤ T +D)dt. ω 0 (T, γ) := γD 0 0.04 0.03 0.02 q q q q q q 0.01 0 0 1 = 0.2, = 0.2, = 0.5, = 0.5, = 0.8, = 0.8, γ=1 optimised γ γ=1 optimised γ γ=1 optimised γ 2 3 4 5 6 normalised network load, G/λ Fig. 8: Throughput density vs normalised network load G/λ. Dashed lines report the behaviour of a homogeneous system with all transmissions of the same duration (i.e. γ = 1), whereas solid ones indicate the performance achieved when optimising γ in the heterogeneous case. Different shades of grey indicate distinct values of q. (25) paves the road for the mathematical derivation of LIfd,hd , which proceeds along the same footsteps taken in Section III. While conceptually similar, the involved calculations are rather cumbersome, all the more so if we observe that for γ > 1 slightly different structures are obtained for the ω 0 and ω 00 functions, prompting further integrations to be tackled. For the sake of compactness we thus omit the details of the derivation, and report the key result, eventually expressing the success probabilities in a network with half- and full-duplex links of duration D and γD respectively as    p(hd) = exp −λD (1−q)Ωhd +q Ω0fd s    p(fd) = β ·exp −λγD (1−q)Ω0hd +q Ωfd . s Here, Ωhd and Ωfd are the functions already discussed in (8) and (13), whereas Ω0hd and Ω0fd are summarised for any value of γ in equations (27)-(28) at the bottom of next page. For completeness, we also include in (26) the explicit structure of the ancillary functions ω 0 (t, γ) and ω 00 (t, γ) which are used to solve the integrals leading to the Laplace transforms. The presented framework extension enables thus a direct comparison with the homogeneous-duration setting discussed in the initial part of the paper. A first question of interest is whether and how much one could gain in a heterogeneousduration case by letting half- and full-duplex connections have different durations Dhd and Dfd = γDhd . To gather a sound answer, we compare the two system configurations under the same channel occupancy conditions, i.e. G = λD in the homogeneous case and G = λDhd (1+q(γ −1)) in the heterogeneous case. Moreover, fixing the traffic intensity λ, for any value of G we operate the heterogeneous network under the (Dhd , γ) pair maximising the throughput density in (18), so to understand what is the utmost improvement that can be aimed for. The outcome of this study is reported in Fig. 8 in terms of T against the normalised load G/λ.9 The reference parameters λ, r, θ, α have been kept as in Section III, and perfect self-interference cancellation is assumed. Within the plot, dashed lines indicate the behaviour of the homogeneous system, whereas solid ones mark the performance of the optimised heterogeneous configuration. Moreover, three sets of curves are reported in different shades of grey, referring to distinct fractions of full-duplex clusters present in the network. The figure confirms the intuition that operating a hybrid system with a common duration for all communications is not optimal when a completely asynchronous medium access policy is employed. As expected, an heterogeneous setup is especially beneficial when the network is either experiencing low loads or facing congestion. In the former situation, in fact, throughput can be boosted by granting longer data exchanges to bidirectional links while shortening the less profitable halfduplex clusters. Conversely, when high loads are experienced, a reduction in the duration of full-duplex communications in favour of uni-directional ones maps into a lower level of aggregate interference and thus induces a more gentle degradation of the performance. As a result, the additional degree of freedom granted to the system can triggering throughput gains in the order of 15-20% for a broad range of q values. On the other hand, such an improvement comes at the cost of a potential unfairness among users, possibly constraining some of them to access the medium only for short information exchanges. From this standpoint it is thus also insightful to consider the 9 The normalised load G/λ maps to the packet duration D in homogeneousduration networks, so that the x-axis in the plot is conveniently equivalent to the ones characterising figures discussed in the first part of the paper.  D +T 1  0 · γD ω (T, γ ≤ 1) = γD   γD −T T ∈ [−D, −D(1−γ)) T ∈ [−D(1−γ), 0) T ∈ [0, γD]  γD +T 1  00 ω (T, γ ≤ 1) = · γD D   γD −T T ∈ [−γD, 0) T ∈ [0, D(γ −1)) T ∈ [D(γ −1), D] complementary scenario of an existing network characterised by a population of half-duplex clusters transmitting packets of duration Dhd , and investigate how to tune data transfers for advanced full-duplex capable nodes that are progressively introduced into the system. More formally, we are interested in determining the duration ratio γ ∗ maximising the aggregate throughput density for a certain penetration level q. The solution can be found via numerical optimisation of (18), and is shown in Fig. 9, where distinct lines indicate different configurations in terms of the half-duplex packet duration. For large values of Dhd , the reference network is already operating with a medium to heavily congested channel, and new fullduplex links shall enjoy much shorter communications not to increase too much the overall interference, regardless of q. On the other hand, when smaller data units are employed by half-duplex pairs (e.g. Dhd ≤ 1), a notable fraction of the clusters can be upgraded to bidirectional mode and granted channel access for longer fraction of time (γ ∗ > 1) bringing an improvement to the system throughput. In this perspective, the developed framework offers then useful tools to evaluate whether it is worth to undergo the cost of deploying full-duplex terminals given the working conditions of an existing topology, taking into account the traffic profiles and applications such new nodes shall be able to sustain. V. A C OMPARISON WITH S LOTTED S CHEMES We conclude our study by investigating the performance gap between the asynchronous network under consideration and a slotted counterpart of its. The rationale triggering such a discussion is twofold. On the one hand, the tradeoff  D +T 1  0 ω (T, γ > 1) = · D γD   γD −T  γD +T 1  00 ω (T, γ > 1) = · D D   γD −T T ∈ [−D, 0) T ∈ [0, D(γ −1)) T ∈ [D(γ −1)), γD] T ∈ [−Dγ, −D(γ −1)) T ∈ [−D(γ −1), 0) T ∈ [0, D]      2 2 2 2α 2(1−γ) Ω0hd (r, θ, α|γ ≤ 1) = πr2 θ α Γ 1+ Γ 1− + α α 2+α γ      2 2 2 2α γ −1 0 2 α Ωhd (r, θ, α|γ > 1) = πr θ Γ 1+ Γ 1− + γ −(1+2/α) α α 2+α γ Ω0fd (r, θ, α|γ Z ≤ 1) = π(1+γ) 4u − 2 Z0 ∞ Ω0fd (r, θ, α|γ > 1) = 4u 0 2 Z ∞ 2 Z0 π π(1+γ) − 2 where, `(u, ϕ) = u +r +2ru cos ϕ π − α2 0   ! 1−γ − dϕ du θrα (u−α −`(u, ϕ)) 2(1+γθrα u−α )(1+γθrα `(u, ϕ))   ! 1+θr α u−α ln 1+θr α `(u,ϕ) γ −1 − dϕ du θrα (u−α −`(u, ϕ)) 2(1+θrα u−α )(1+θrα `(u, ϕ)) ln 1+γθr α u−α 1+γθr α `(u,ϕ) (26) (27) (28) 8 1 7 0.9 Dhd = 1 fraction of FD clusters, q optimal duration ratio, γ ∗ Dhd = 0.8 Dhd = 1.5 6 Dhd = 2 5 Dhd = 3 increasing duration of half-duplex links 4 3 2 1 0.8 0.7 0.3 0.6 0.4 0.5 0.5 0.6 0.4 0.7 0.3 0.8 0.2 0.9 0.1 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0 1 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 fraction of full-duplex clusters, q network load, G Fig. 9: Ratio of full-duplex to half-duplex transmission duration maximising throughput as a function of q. Different shades of grey report the behaviour for distinct durations Dhd of the half-duplex links. Fig. 10: Ratio Ξ of the throughput density of an unslotted system over a slotted one as a function of the fraction of full-duplex clusters in the network and the network load. All transmissions in the asynchronous system are of common duration. between the throughput loss undergone by systems that do not implement any form of coordination among terminals and their intrinsic simplicity is often a basic driver for protocol design and implementation choices and, as such, has been tackled starting from the seminal works of Abramson on Aloha [31]. From this viewpoint, while recent results based on stochastic geometry [25], [30] have provided interesting insights for large and distributed networks, no characterisation is available yet for systems that resort to full-duplex communications. Secondly, the study will allow us to understand the impact of the additional degree of freedom in terms of different packet durations for half- and full-duplex clusters available in unslotted systems and to clarify whether it can help in reducing the performance degradation with respect to synchronous ones. Throughout our discussion, we will refer to the elegant analysis of slotted full-duplex networks offered in [18], and point the interested reader to it for further details. In the following, we recall the key results needed for our comparison, and highlight the main conceptual differences with respect to the framework introduced in Section II. In the synchronous scenario, the topology is still composed of pairs of nodes that independently decide whether to establish a bidirectional or a half-duplex link with probability q and 1−q, respectively. Time is divided in slots of equal duration, and each data exchange in the system can be performed only within the boundaries of – and fill completely – one such time unit. This element of coordination allows for some major analytical simplifications. Firstly, it decouples the time and spatial components of medium access, so that the network can be effectively described by means of a PPP over R2 of intensity λs , with each node pair independently deciding whether to access a slot for an information transfer with probability p. Secondly, the shared time-frame results in a constant level of interference perceived at a receiver for the whole duration of an incoming packet, allowing to overlook the averaging procedures tackled in our work. To ensure a fair comparison, decoding is described via a threshold model for the slotted system as well, and all networking parameters are unchanged with respect to the presented framework. Lastly, we are still interested in evaluating the behaviour of the system as a function of the load, which we defined as the fraction of time the channel is occupied on average in a unit area. When synchronous access is considered, the dependency of this parameter on the duration of transmissions is clearly lost, leading to G = pλs . Under these modelling assumptions, the system throughput density can be eventually expressed as [18]  Ts = W G 1+q(2β −1) ·e−G((1−q)Ωhd,s +q Ωfd,s ) (29) where     2 2 2 Ωhd,s = πr2 θ α Γ 1+ Γ 1− α α Z ∞  Z π  1 1 Ωfd,s = 2u π − dϕ du 1+θrα u−α 0 1+θrα `(u, ϕ) 0 and `(u, ϕ) is defined in (28). As anticipated in the previous sections, the ancillary Ω function that captures the effect of full-duplex interference in a slotted system is structurally distinct from the one derived for asynchronous Aloha, driving the different achievable performance. To better understand and quantify this aspect, we focus on the metric Ξ, defined as the ratio of the throughput of a completely asynchronous configuration to the one of its synchronous counterpart operated at the same network load G, with equal parameters and fraction of full-duplex clusters. Let us initially assume for the unslotted network all data transmissions to be of the same duration. In this case, a direct comparison of the throughput expressions in (14) and (29) shows how imperfect self-interference cancellation besets the two scenarios in the same way, so that Ξ is in fact independent of β and captures the intrinsic differences between the two access policies beyond specific implementation aspects. The behaviour of the throughput ratio is reported in Fig. 10 as a function of G and of the penetration level q of full-duplex pairs, highlighting how the performance gap widens when the network faces larger network loads, and confirming the intuition that an increase of aggregate interference is more VI. C ONCLUSIONS This paper introduced a stochastic geometry framework to capture the performance of an asynchronous Aloha network where part of the nodes operate in full-duplex mode. Exact 10 For the sake of comparison, note for instance that for the considered λ = 0.05, a network load G = 0.2 in Fig 10 corresponds to a packet duration D = 4 in the plots of Section III (e.g. Fig. 3). 1 throughput density ratio, Ξ detrimental in a fully uncoordinated scenario.10 This rationale also buttresses the similar yet less pronounced trend that can be spotted when more full-duplex transmissions are triggered. In this perspective, additional insights are offered by Fig. 11, which reports Ξ against q for three different load configurations. Let us first focus on the solid lines, representative of the behaviour of an asynchronous system with common duration for all transmissions, and consider in particular the values for q = 0. Such points indicate the performance loss brought by the lack of a slotted time-frame in a traditional completely half-duplex network. Remarkably, when light loads are tackled, synchronism among nodes throughout the network only triggers a 10% gain, making unslotted access particularly attractive in view of its simplicity. Conversely, under strong congestion (e.g. G = 0.35), the performance of an asynchronous MAC plummets to less than half of its slotted competitor. The plot also sheds light on the impact of the additional interference brought by full-duplex connections. It is interesting to observe in fact that, while spatial reuse is better taken advantage of in slotted systems, the throughput loss undergone in the asynchronous case when increasing q is rather contained, especially for low-to-intermediate load. Along this line of reasoning, it is then relevant to understand whether the gap may be further reduced by leveraging the additional degree of freedom of different transmission durations available in unslotted settings. The question is tackled once more in Fig. 11, where dashed lines report, for any value of q, the performance degradation Ξ undergone by an heterogeneous asynchronous setting whose parameter pair (γ, D) has been configured so as to optimise the throughput in (18). It is apparent how a smarter subdivision of resources in terms of channel occupation time among half- and fullduplex links can partly counterbalance the inefficiency induced by uncoordinated transmissions. Such a result becomes especially remarkable since the benefits are attainable in operating regions of practical interest. For example, if we recall that the traffic intensity of the asynchronous network has been set to λ = 0.05 throughout our discussion, we can infer that the dashed curve for G = 0.05 in Fig. 11 describes the behaviour of the system for a normalised network load G/λ = 1. This value, in turn, is shown in Fig. 8 to offer a throughput density close to its peak and is thus representative of a working point typically targeted for efficient network operations. Beyond numerical results, however, the analytical comparison of slotted and unslotted full-duplex systems enabled by the developed framework shall be seen as a tool towards an educated choice on whether to strive for synchronism or not when designing a system, as it offers insights on some of the key involved performance tradeoffs. G = 0.05 0.9 0.8 0.7 G = 0.1 0.6 0.5 0.4 0.3 0.2 G = 0.35 γ=1 optimised γ 0 0.2 0.4 0.6 0.8 1 fraction of full-duplex clusters, q Fig. 11: Ratio Ξ of the throughput density of an unslotted system over a slotted one vs q. Solid lines report the ratio when the asynchronous system is operated with all transmissions of the same duration, whereas dashed ones consider optimal values of γ. Different shades of grey indicate distinct network loads. expressions have been presented for the success probability and the system throughput, prompting the key tradeoffs in the system. In particular, three operating regions have been identified, showing how for short enough packets as many communications as possible shall be performed in full-duplex mode, while for packets longer than a certain threshold solely relying on half-duplex is convenient. Under the assumption of complete self-interference cancellation, the maximum throughput gain achievable over a purely half-duplex system has been proven to be independent of the distance between source and destination of a link. Bringing imperfect cancellation into the picture, instead, the distance between two communicating nodes becomes a critical parameter, with full-duplex paying off only over short links. An optimisation approach leveraging different link durations for bidirectional and unidirectional data exchanges was introduced to improve network performance and, finally, a comparison with the slotted case studied in [18] was discussed, clarifying the effectiveness cost undergone for not synchronising medium access among devices. In all settings, the role of very accurate self-interference cancellation schemes has been confirmed as a necessary condition for full-duplex to be convenient in broad and uncoordinated networking scenarios. A PPENDIX A P ROOF OF T HEOREM 1 We aim to show that Ωfd (r, θ, α)/Ωhd (r, θ, α) does not depend on the distance r between the two nodes in a cluster. Recalling from (8) that the denominator can be written in the form Ωhd (r, θ, α) = k(θ, α)r2 , k ∈ R, the proposition is proven as soon as the numerator exhibits a quadratic dependence on r as well. As a first step, we observe that the definition of Ωfd in (13) leverages symmetry to compute the spatial average over the cluster centre considering a node u moving along the x axis, i.e. u = uejξ , ξ = 0. Leaning on the expression w = r ejϕ and on the notation of Fig. 1, we R∞ can thus reformulate (13) as Ωfd = 0 4ug(u)du, where   Z π ln 1+sL(u) −ln 1+sL(u+w)  dϕ g(u) = 1− s L(u)−L(u+w) 0 and s = θ rα . For a given u on the x-axis, the integral solely depends on the path loss function L(·) computed at the companion node in the cluster, which in turn is maximised for ϕ = π, i.e. when w = w0 = −r. For the integrand within g(u) we hence obtain   ln 1+sL(u) −ln 1+sL(u+w)  1− s L(u)−L(u+w)   1+su−α ln 1+s|u−r| (a) (b) −α 1 . ≤ 1− ≤ 1− s (u−α −|u−r|−α ) 1+su−α (30) The first inequality upper bounds the denominator as L(u)− L(w) ≤ L(u)−L(w0 ) and lower bounds the numerator as     1+sL(u) 1+sL(u) ln ≥ ln 1+sL(u+w) 1+sL(u+w0 ) for any ϕ ∈ [0, π]. Conversely, inequality (b) follows by applying to the logarithmic numerator the well-known relation ln(x) ≥ 1−1/x, x ∈ R and by carrying out simple manipulations on the obtained expression. Since the rightmost expression in (30) is independent of ϕ, we get   1 g(u) ≤ π 1− . 1+su−α Plugging this into the definition of Ωfd , and evaluating the integral over u, we eventually get  2 Ωfd ≤ 4r2 π θ α Γ(1+2/α) Γ(1−2/α) α . (31) To complement this result, let us focus on the two cases of a solely half-duplex and a solely full-duplex network with ideal self-interference cancellation, corresponding to q = 0 and q = 1, respectively. Assuming the same set of parameters for the two scenarios, particularly in terms of density λ and (hd) (fd) link duration D, ps ≥ ps clearly holds, as the full-duplex system undergoes on average a larger level of interference due to the increased spatial reuse. Recalling (4)-(5) and the expressions of the Laplace transforms in (7)-(8), (12), we then get exp(−λDΩhd ) ≥ exp(−λDΩfd ), leading to   2 2α 2 α Ωfd ≥ r π θ Γ(1+2/α) Γ(1−2/α) . (32) α+2 Combining (31) and (32), the real-valued analytical function Ωfd (r, θ, α) is lower- and upper-bounded for any r ∈ R by curves in the form Ar2 and Br2 , with A and B real constants. The statement under proof then readily follows from elementary applications of analytical geometry [32].  R EFERENCES [1] M. Duarte and A. Sabharwal, “Full-Duplex Wireless Communications Using Off-The-Shelf Radios: Feasibility and First Results,” in Proc. Asilomar, Pacific Grove (CA), US, Nov. 2010. [2] M. Jain, J. Choi, T. Kim, D. Bharadia, S. Seth, K. Srinivasan, P. Levis, S. Katti, and P. Sinha, “Practical, Real-Time, Full Duplex Wireless,” in Proc. ACM MobiCom, Las Vegas (NV), US, Sep. 2011. [3] A. Sabharwal, P. Schniter, D. Guo, D. W. Bliss, S. Rangarajan, and R. Wichman, “In-Band Full-Duplex Wireless: Challenges and Opportunities,” IEEE J. Sel. Areas Commun., vol. 32, no. 9, pp. 1637–1652, 2014. [4] G. Liu, R. Yu, H. Ji, V. Leung, and X. Li, “In-Band Full-Duplex Relaying: A Survey, Research Issues and Challenges,” IEEE Commun. Surveys Tuts., vol. 17, no. 2, pp. 500–524, 2015. [5] D. Kim, H. Lee, and D. Hong, “A Survey of In-Band Full-Duplex Transmission: From the Perspective of PHY and MAC Layers,” IEEE Commun. Surveys Tuts., vol. 17, no. 4, pp. 2017–2046, 2015. [6] V. Cadambe and S. Jafar, “Degrees of Freedom of Wireless Networks With Relays, Feedback, Cooperation, and Full Duplex Operation,” IEEE Trans. Inf. Theory, vol. 55, no. 5, pp. 2334–2344, 2009. [7] B. Day, A. Margetts, D. Bliss, and P. Schniter, “Full-Duplex MIMO Relaying: Achievable Rates Under Limited Dynamic Range,” IEEE J. Sel. Areas Commun., vol. 30, no. 8, pp. 1541–1553, 2012. [8] A. Sahai, S. Diggavi, and A. Sabharwal, “On Degrees-of-Freedom of Full-Duplex Uplink/Downlink Channel,” in Proc. IEEE Information Theory Workshop, Seville, Spain, Sep. 2013. [9] O. Simeone, E. Erkip, and S. Shamai, “Full-Duplex Cloud Radio Access Networks: An Information-Theoretic Viewpoint,” IEEE Wireless Commun. Lett., vol. 3, no. 4, pp. 413–416, 2014. [10] W. Choi, H. Lim, and A. Sabharwal, “Power-Controlled Medium Access Control Protocol for Full-Duplex WiFi Networks,” IEEE Trans. Wireless Commun., vol. 14, no. 7, pp. 3601–3613, 2015. [11] M. Duarte, A. Sabharwal, V. Aggarwal, R. Ramakrishnan, C. Rice, and N. Shankaranarayanan, “Design and Characterization of a Full-Duplex Multiantenna System for WiFi Networks,” IEEE Trans. Veh. Technol., vol. 63, no. 3, pp. 1160–1177, 2014. [12] N. Singh, D. Gunawardena, A. Proutiere, B. Radunovic, H. Balan, and P. Key, “Efficient and Fair MAC for Wireless Networks with SelfInterference Cancellation,” in Proc. IEEE WiOpt, Princenton (NJ), US, May 2011. [13] K. Thilina, H. Tabassum, E. Hossain, and D. I. Kim, “Medium Access Control Design for Full Duplex Wireless Systems: Challenges and Approaches,” IEEE Commun. Mag., vol. 53, no. 5, pp. 112–120, 2015. [14] Z. Tong and M. Haenggi, “A Throughput-Optimum Adaptive ALOHA MAC Scheme for Full-Duplex Wireless Networks,” in Proc. IEEE GlobeCom, San Diego (CA), US, Dec. 2015. [15] X. Xie and X. Zhang, “Does Full-Duplex Double the Capacity of Wireless Networks?” in Proc. IEEE INFOCOM, Toronto, CA, Apr. 2014. [16] A. Al Ammouri, H. El Sawy, O. Amin, and M. Alouini, “In-Band α-Duplex Scheme for Cellular Networks: A Stochastic Geometry Approach,” IEEE Trans. Wireless Commun., vol. 15, no. 10, pp. 6797–6812, 2016. [17] H. Alves, C. de Lima, P. Nardelli, R. Demo Souza, and M. Latva-aho, “On the Average Spectral Efficiency of Interference-Limited Full-Duplex Networks,” in Proc. EAI CROWNCOM, Oulu, Finland, Jun. 2014. [18] Z. Tong and M. Haenggi, “Throughput Analysis for Full-Duplex Wireless Networks with Imperfect Self-interference Cancellation,” IEEE Trans. Commun., vol. 63, no. 11, pp. 4490–4500, 2015. [19] J. Lee and T. Q. S. Quek, “Hybrid Full-/Half-Duplex System Analysis in Heterogeneous Wireless Networks,” IEEE Trans. Wireless Commun., vol. 14, no. 5, pp. 2883–2895, 2015. [20] A. Munari, F. Rossetto, P. Mähönen, and M. Petrova, “On the Stability of a Full-Duplex Aloha Network,” IEEE Comm. Letters, vol. 20, no. 12, pp. 2398–2401, 2016. [21] A. Laya, C. Kalalas, F. Vazquez-Gallego, L. Alonso, and J. AlonsoZarate, “Goodbye, ALOHA!” IEEE Access, vol. 4, pp. 2029–2044, 2016. [22] G. Alfano, M. Garetto, and E. Leonardi, “New Directions into the Stochastic Geometry Analysis of Dense CSMA Networks,” IEEE Trans. Mobile Comput., vol. 13, no. 2, pp. 324–336, 2014. [23] S. Wang, V. Venkateswaran, and X. Zhang, “Exploring Full-Duplex Gains in Multi-Cell Wireless Networks: a Spatial Stochastic Framework,” in Proc. IEEE INFOCOM, Hong Kong, China, Apr. 2015. [24] A. Gupta and R. Kumar, “A Survey of 5G Network: Architecture and Emerging Technologies,” IEEE Access, vol. 3, pp. 1206–1232, 2015. [25] M. Kaynia, N. Jindal, and G. E. Oien, “Improving the Performance of Wireless Ad Hoc Networks Through MAC Layer Design,” IEEE Trans. Wireless Commun., vol. 10, no. 1, pp. 240–252, 2011. [26] LoRa Alliance, “The LoRa Alliance Wide Area Networks for Internet of Things,” www.lora-alliance.org, accessed: Nov. 3, 2016. [27] Sigfox, “SIGFOX: The Global Communications Service Provider for the Internet of Things,” www.sigfox.com, accessed: Nov. 3, 2016. [28] M. Haenggi, Stochastic Geometry for Wireless Networks. Cambridge University Press, 2012. [29] D. Bharadia, E. McMilin, and S. Katti, “Full Duplex Radios,” in Proc. ACM SIGCOMM, Hong Kong, China, Aug. 2013. [30] B. Błaszczyszyn and P. Muehlethaler, “Stochastic Analysis of NonSlotted Aloha in Wireless Ad Hoc Networks,” in Proc. IEEE INFOCOM, San Diego (CA), US, Mar. 2010. [31] N. Abramson, “The Throughput of Packet Broadcasting Channels,” IEEE Trans. Commun., vol. 25, no. 1, pp. 117–128, 1977. [32] H. Flanders and J. Price, Elementary Functions and Analytical Geometry. Academic Press, 1973.
7cs.IT
1 Fundamental Tradeoff between Storage and Latency in Cache-Aided Wireless Interference Networks arXiv:1605.00203v4 [cs.IT] 17 Jun 2017 Fan Xu, Meixia Tao, Senior Member, IEEE, and Kangqi Liu, Student Member, IEEE Abstract This paper studies the fundamental tradeoff between storage and latency in a general wireless interference network with caches equipped at all transmitters and receivers. The tradeoff is characterized by an information-theoretic metric, normalized delivery time (NDT), which is the worst-case delivery time of the actual traffic load at a transmission rate specified by degrees of freedom (DoF) of a given channel. We obtain both an achievable upper bound and a theoretical lower bound of the minimum NDT for any number of transmitters, any number of receivers, and any feasible cache size tuple. We show that the achievable NDT is exactly optimal in certain cache size regions, and is within a bounded multiplicative gap to the theoretical lower bound in other regions. In the achievability analysis, we first propose a novel cooperative transmitter/receiver coded caching strategy. It offers the freedom to adjust file splitting ratios for NDT minimization. We then propose a delivery strategy which transforms the considered interference network into a new class of cooperative X-multicast channels. It leverages local caching gain, coded multicasting gain, and transmitter cooperation gain (via interference alignment and interference neutralization) opportunistically. Finally, the achievable NDT is obtained by solving a linear programming problem. This study reveals that with caching at both transmitter and receiver sides, the network can benefit simultaneously from traffic load reduction and transmission rate enhancement, thereby effectively reducing the content delivery latency. Index Terms Wireless cache network, coded caching, content delivery, multicast, and interference management. I. I NTRODUCTION Over the last decades, mobile data traffic has been shifting from connection-centric services, such as voice, e-mails, and web browsing, to emerging content-centric services, such as video streaming, push media, application download/updates, and mobile TV [1]–[3]. These contents are typically produced well ahead of transmission and can be requested by multiple users at possibly different times. This allows us to cache the contents at the edge of networks, e.g., base stations and user devices, during periods of low network load. The local availability of contents at the network edge has significant potential of reducing user access latency and alleviating wireless traffic. Recently, there have been increasing interests from both academia and industry in characterizing the impact of caching on wireless networks [4]–[8]. Caching in a shared link with one server and multiple cache-enabled users is first studied by Maddah-Ali and Niesen in [9]. It is shown that caching at user ends, also known as coded caching, brings not only local caching gain but also global caching gain. The latter is achieved This paper was presented in part at IEEE ISIT 2016. The authors are with the Department of Electronic Engineering, Shanghai Jiao Tong University, Shanghai, 200240, China (Emails: [email protected], [email protected], [email protected]). 2 by a carefully designed cache placement and coded delivery strategy, which can create multicast chances for content delivery even if users demand different files. The idea of coded caching in [9] is then extended to the distributed network in [10], which achieves a rate close to the optimal centralized scheme. Taking file popularity into consideration, the authors in [11]–[13] introduced order-optimal coded caching schemes for average traffic load performance. In [14], the authors considered the wireless broadcast channel with imperfect channel state information at the transmitter (CSIT) and showed that the gain of coded caching can offset the loss due to the imperfect CSIT. Besides the shared link or broadcast channels mentioned above, coded caching is also investigated in other network topologies, such as hierarchical cache networks [15], device-to-device cache networks [16], and multi-server networks [17]. Caching at transmitters is studied in [18]–[23] to exploit the opportunities for transmitter cooperation and interference management. In specific, the authors in [18] exploited the multipleinput multiple-output (MIMO) cooperation gain via joint beamforming by caching the same erasure-coded packets at all edge nodes in a backhaul-limited multi-cell network. The authors in [19] studied the degrees of freedom (DoF) and clustered cooperative beamforming in cellular networks with edge caching via a hypergraph coloring problem. The authors in [20] studied the transmitter cache strategy in a 3 × 3 cache-aided interference channel under an informationtheoretical framework. It is shown that splitting contents into different parts and caching each part in different transmitters can turn the interference channel into broadcast channel, X channel, or hybrid channel and hence increase the system throughput via interference management. The authors in [21] presented a lower bound of delivery latency in a general interference network with transmitter cache and showed that the scheme in [20] is optimal in certain region of cache size. The authors in [22] studied a 2 × 2 cloud and cache aided wireless network, and characterized the optimal tradeoff between cache storage size and content delivery time. Then, the authors in [23] extended the network in [22] to the general cloud and cache aided wireless network, and showed that their proposed transmission strategy achieves the optimality within a constant factor 2. The above literature reveals that caching at the receiver side can bring local caching gain and coded multicasting gain, and that caching at the transmitter side can induce transmitter cooperation for interference management and load balancing. In modern wireless communication systems, storage space has been proliferating in both base stations and smart mobile devices [4]. During the off-peak traffic time, both the base stations and mobile users can download certain files from the core network into their local caches in advance. When the users submit content requests in the peak traffic time afterwards, the locally cached contents can be utilized to relieve the burden of the network traffic and reduce the delivery latency. It is thus of both theoretical importance and practical interest to investigate the impact of caching at both transmitter and receiver sides. In this paper, we aim to study the fundamental limits of caching in a general wireless interference network with caches equipped at all transmitters and receivers as shown in Fig. 1. The performance metric to characterize the gains of caching varies in the existing works. For the broadcast channel with receiver cache, the authors in [9] characterized the gain by memory-rate tradeoff, where the rate is defined as the normalized load of the shared link with respect to the file size in the delivery phase. For the interference channel with transmitter cache, the authors in [20] characterized the gain by the standard DoF from the information-theoretic studies. In [21], the authors introduced the storage-latency tradeoff, where the latency is defined as the relative delivery time with respect to an ideal baseline system with unlimited cache and no interference in the high signal-to-noise ratio (SNR) region. In our considered wireless interference network with 3 both transmitter and receiver caches, the standard DoF is unable to capture the potential reduction in the traffic load due to receiver cache, and the rate is unable to capture the potential DoF enhancement due to cache-induced transmitter cooperation. Interestingly, the latency-oriented performance metric in [21] can reflect not only the load reduction due to receiver cache but also the DoF enhancement due to transmitter cache, since it evaluates the delivery time of the actual load at a transmission rate specified by the given DoF. As such, we adopt the storagelatency tradeoff to characterize the fundamental limits of caching in this work. In specific, we measure the performance by normalized delivery time (NDT) as defined in [21]–[23], denoted as τ (µR , µT ), which is a function of the normalized receiver cache size µR and the normalized transmitter cache size µT . Our preliminary results on the latency-storage tradeoff study in the special case with 3 transmitters and 3 receivers are presented in [24]. Note that an independent work on the similar problem with both transmitter and receiver caches is studied in [25]. After the initial submission of this work, another similar work is studied in [26]. We shall discuss the differences with [25], [26] at appropriate places throughout the paper. The main contributions and results of this work are listed as follows: • A novel file splitting and caching strategy: We propose a novel file splitting and caching strategy for any number of transmitters and receivers, and at any feasible normalized cache size tuples. This strategy is more general than the existing file splitting and caching strategy in [9], [20], [25], [26]. It offers the freedom to adjust the file splitting ratios for caching gain optimization. • Achievable storage-latency tradeoff : Based on the proposed file splitting and caching strategy, we obtain an achievable upper bound of the minimum NDT for the general NT × NR interference networks by solving a linear programming problem of file splitting ratios. The achievable NDT is for any number of transmitters NT ≥ 2, any number of receivers NR ≥ 2, and any feasible normalized cache size tuples (µR , µT ). The main idea is to design the delivery phase carefully so that the network topology can be opportunistically changed to a new class of cooperative X-multicast channels, which includes X channel, broadcast channel, and multicast channel as special cases. Interference neutralization and interference alignment are used to increase the system DoF of these channels. Our analysis shows that the transmitter cooperation gain, local caching gain, and coded multicasting gain can be leveraged opportunistically in different cache size regions. Our analysis also shows that the optimal file spitting ratios are not unique. The multiple choices offer the freedom to choose a proper caching scheme according to practical limitations, such as subpacketization overhead and receiver complexity. • Lower bound of storage-latency tradeoff : We also obtain a lower bound of the minimum NDT for the general NT × NR interference network by using genie-message approach. With this lower bound, we show that the achievable NDT upper bound is optimal in certain cache size regions. In other regions, the multiplicative gap between the upper and lower bounds is within 2 R −1 when NT ≥ NR , within 12 when NT < NR and µT ≥ N1T , and within NT +N when NT < NR NT 1 and µT < NT . The remainder of this paper is organized as follows. Section II introduces our system model and performance metric. Section III presents the main results of this paper. Section IV describes the cache placement strategy. Section V illustrates the content delivery strategy. Section VI presents some discussions. Section VII proves the lower bound of NDT, and Section VIII concludes this paper. Notations: (·)T denotes the transpose. [K] denotes set {1, 2, · · · , K}. ⌊x⌋ denotes the largest T + integer no greater than x. (xj )K j=1 denotes vector (x1 , x2 , · · · , xK ) . (x) denotes the maximum 4 Tx 1 Cache Cache V1 U1 Tx 2 Cache Rx 1 Rx 2 U2 Cache V 2 ... ... Tx NT Cache U N Rx N R Cache V NR T Fig. 1: Cache-aided wireless interference network with NT transmitters and NR receivers. of x and 0, i.e. (x)+ = max{0, x}. A1∼S denotes set {A1 , A2 , · · · , AS }. CN (m, σ 2 ) denotes the complex Gaussian distribution with mean of m and variance of σ 2 . II. S YSTEM D ESCRIPTION AND P ERFORMANCE M ETRIC A. System Description Consider a general cache-aided wireless interference network with NT (≥ 2) transmitters and NR (≥ 2) receivers as illustrated in Fig. 1, where each node is equipped with a cache memory of finite size.1 Each node is assumed to have single antenna. The communication link between each transmitter and each receiver experiences channel fading, and is corrupted with additive white Gaussian noise. The communication at each time slot t over this network is modeled by Yq (t) = NT X p=1 hqp (t)Xp (t) + Zq (t), q = 1, 2, · · · , NR , where Yq (t) ∈ C denotes the received signal at receiver q, Xp (t) ∈ C denotes the transmitted signal at transmitter p, hqp (t) ∈ C denotes the channel coefficient from transmitter p to receiver q which is assumed to be identically and independently (i.i.d.) distributed as some continuous distribution, and Zq (t) denotes the noise at receiver q distributed as CN (0, 1). Consider a database consisting of L files, denoted by {W1 , W2 , · · · , WL }. Throughout this study, we consider L ≥ NR so that each receiver can request a distinct file. Each file is chosen independently and uniformly from [2F ] = {1, 2, · · · , 2F } randomly, where F is the file size in bits. Each transmitter has a local cache able to store MT F bits and each receiver has a local cache able to store MR F bits. The normalized cache sizes at each transmitter and receiver are defined, respectively, as MT MR µT , , µR , . L L The network operates in two phases, cache placement phase and content delivery phase. During the cache placement phase, each transmitter p designs a caching function φp,i that maps each file Wi into its cached content Up,i as Up,i , φp,i (Wi ), ∀i ∈ [L]. 1 This work focuses on the general interference network with at least two transmitters and at least two receivers. We do not consider the special cases with either one transmitter (broadcast channel) or one receiver (multiple-access channel). 5 S Define the overall cached content at transmitter p as Up , i∈[L] Up,i . The mapping {φp,i } is such that H(Up ) ≤ MT F in order to satisfy the cache capacity constraint at each transmitter. Each receiver q also designs a caching function ψq,i that maps each file Wi into its cached content Vq,i as Vq,i , ψq,i (Wi ), ∀i ∈ [L]. S Define the overall cached content at receiver q as Vq , i∈[L] Vq,i . The mapping ψq,i is such that H(Vq ) ≤ MR F in order to satisfy the cache capacity constraint at each receiver. The caching functions {φp,i , ψq,i } are assumed to be known globally at all nodes. Note that in this paper, we restrict our study to the caching functions that do not allow for inter-file coding, but can allow for arbitrary coding within each file. Similar assumptions have been made in [21], [23]. In the delivery phase, each receiver q requests a file Wdq from the database. We denote NR R d , (dq )N as the demand vector. Each transmitter p has an encoding function q=1 ∈ [L] Λp : [2⌊F MT ⌋ ] × [L]NR × CNT ×NR → CT . Transmitter p uses Λp to map its cached content Up , receiver demands d, and channel realization H to the codeword (Xp [t])Tt=1 , Λp (Up , d, H), where T is the block length of the code. Note that T may depend on the receiver demand d and channel realization H. Each codeword (Xp [t])Tt=1 has an average transmit power constraint P . Each receiver q has a decoding function Γq : [2⌊F MR ⌋ ] × CT × CNT ×NR × [L]NR → [2F ]. We denote (Yq [t])Tt=1 as the signal vector received at receiver q. Upon receiving (Yq [t])Tt=1 , each receiver q uses Γq to decode Ŵq , Γq (Vq , (Yq [t])Tt=1 , H, d) of its desired file Wdq using its cached content Vq and the channel realization H as side information. The worst-case error probability is Pǫ = max max P(Ŵq 6= Wdq ). d∈[L]NR q∈[NR ] The given caching and coding scheme {φp,i , ψq,i , Λp , Γq } is said to be feasible if, for almost all channel realizations, Pǫ → 0 when F → ∞. Note that the cache placement phase and the content delivery phase take place on different timescales. In general, cache placement is in a much larger timescale (e.g. on a daily or hourly basis) while content delivery is in a much shorter timescale. As such, the caching functions designed in the cache placement phase are unaware of the future content requests, but the coding functions during the content delivery phase are dependent on the caching functions. B. Performance Metric In this work, we adopt the following latency-oriented performance metric as in [21]–[23].2 Definition 1 ( [21]). The normalized delivery time (NDT) for a given feasible caching and coding scheme at a given normalized cache size tuple (µR , µT ) is defined as max T τ (µR , µT ) , lim lim sup d . P →∞ F →∞ F/ log P 2 The performance metric NDT is first proposed in [21] for wireless networks with transmitter cache only. It is then scaled by the number of receivers and renamed as fractional delivery time (FDT) by taking receiver cache into account in [24] as well as the initial submission of this paper. During the paper revision, we have removed the scaling and changed back to NDT for consistency with [21]. 6 Moreover, the minimum NDT is defined as τ ∗ (µR , µT ) = inf{τ (µR , µT ) : τ (µR , µT ) is achievable}. Note that F/ log P is the delivery time of transmitting one file of F bits in a point-to-point baseline system with Gaussian noise in the high SNR regime. An NDT of τ ∗ thus indicates that the worst-case time required to serve any possible demand vector d is τ ∗ times of this reference time period. Remark 1 (Interpretation of NDT). Let R denote the worst-case traffic load per user with respect to the file size F . Since the per-user capacity of the network in the high SNR regime can be approximately given by (d·log P +o(log P )), where d is the per-user DoF, the worst-case delivery . Then, by Definition 1, NDT can be expressed time can be rewritten as max T = d·log PRF +o(log P ) d more conveniently as τ = R/d. (1) In the special case with transmitter cache only, we have τ (µR = 0, µT ) = 1/d. As a result, NDT characterizes the asymptotic delivery time of the actual per-user traffic load R at a transmission rate specified by the per-user DoF d when P → ∞ and F → ∞, and hence is particularly suitable to measure the performance of the wireless networks with both transmitter and receiver caches. Remark 2 (Feasible region of NDT). The NDT introduced above is able to measure the fundamental tradeoff between the cache storage and content delivery latency. However, not all normalized cache sizes are feasible. Given fixed L and MT , all the transmitters together can store at most NT MT F bits of files, which leaves at least LF − NT MT F bits of files to be stored in all receivers. Thus we must have MR F ≥ LF − NT MT F . This results in the following feasible region for the normalized cache sizes:  0 ≤ µR , µT ≤ 1 . (2) µR + NT µT ≥ 1 Throughout this paper, we study the NDT in the above feasible region. Note that the works in [25], [26] are limited to the region { N1T ≤ µT ≤ 1, 0 ≤ µR ≤ 1}. III. M AIN R ESULTS In this section, we first present our main results on the fundamental storage-latency tradeoff for the general cache-aided wireless interference network. Then, we present the results in some special cases and discuss the connections with existing works. A. General Results Theorem 1 (Achievable NDT). For the cache-aided interference network with NT ≥ 2 transmitters, NR ≥ 2 receivers, and L ≥ NR files, where each transmitter has a cache of normalized size 7 µT and each receiver has a cache of normalized size µR , the minimum NDT is upper bounded by the optimal solution of the following linear programming (LP) problem: τU (µR , µT ) , P1 : min {ar,t :(r,t)∈A} s.t.  NX NT R −1 X NR −1 r NT t  ar,t , d r,t r=0 t=1   N NT  R X X NT NR ar,t + aNR ,0 = 1, t r r=0 t=1   NR X NT  X NR − 1 NT ar,t + aNR ,0 ≤ µR , t r − 1 r=1 t=1   NR X NT  X NT − 1 NR ar,t ≤ µT , t−1 r r=0 t=1 (3) (4) (5) (6) 0 ≤ ar,t ≤ 1, ∀(r, t) ∈ A (7) where A , {(r, t) : r + NR t ≥ NR , 0 ≤ r ≤ NR , 0 ≤ t ≤ NT , r, t ∈ Z}, {ar,t } are the (file splitting) variables to be optimized, and dr,t is given by  1, r + t ≥ NR    (NRr−1)(NtT )t , r + t = NR − 1 (8) dr,t = (NRr−1n)(NtT )t+1o    max d , r+t , r + t ≤ N − 2 R 1 NR with d1 being d1 , max ′ 1≤t ≤t (  NR −1 r NT t′     NR −1 NT NR −r−1 ′ t r t′ t′ −1    NT  NR −r−1 ′ NR −r−2 R −1 t + Nr+1 t′ −1 t′ −1 t′ −1 ) (9) The LP problem in Theorem 1 can be solved efficiently by some linear equation substitution and other manipulations. The closed-form and optimal solutions in the special cases when NT = NR = 2 and NT = NR = 3 are given in Corollary 3 and Corollary 4, respectively, in Section V. Theorem 2 (Lower bound of NDT). For the cache-aided interference network with NT ≥ 2 transmitters, NR ≥ 2 receivers, and L ≥ NR files, where each transmitter has a cache of normalized size µT and each receiver has a cache of normalized size µR , the minimum NDT is lower bounded by 1n (s1 + s2 ) − (NT − l)s2 µT τ ∗ (µR , µT ) ≥ τL1 , max l=1,··· ,min{NT ,NR } l s1 =0,1,...,l s2 =0,1,...,NR −l    2s2 + s1 + 1 2 − · s1 + s2 µ R , 2 (10) 8 when the caching functions allow for arbitrary intra-file coding, and by 1n (s1 + s2 ) − (NT − l)s2 µT τ ∗ (µR , µT ) ≥ τL2 , max l=1,··· ,min{NT ,NR } l s1 =0,1,...,l s2 =0,1,...,NR −l  when the intra-file coding is not allowed.  2s2 + s1 + 1 2 − · s1 + s2 µ R 2    2s2 + s1 + 2 (s1 − 1) + s2 (1 − NT µT ) + 2 (11) The proof of Theorem 1 will be given in Section IV and V, and the proof of Theorem 2 will be given in Section VII. It can be seen from the above theorems that both the upper and lower bounds of the minimum NDT are convex3 and non-increasing functions of normalized cache sizes µR and µT . The following two corollaries state the relations of the two bounds, the proofs of which will be given in Appendix B and Appendix C, respectively. Corollary 1 (Optimality). The achievable NDT is optimal (i.e., coincides with the lower bound) when (µR , µT ) satisfies any of the following conditions: 1) NR µR + NT µT ≥ NR : the optimal NDT is τ ∗ = 1 − µR ; NR 2) (µR , µT ) = (0, 1): the optimal NDT is τ ∗ = min{N ; T ,NR } NT +NR −1 ∗ ; 3) (µR , µT ) = (0, 1/NT ): the optimal NDT is τ = NT 4) µR + NT µT = 1 when there is no intra-file coding in the caching functions: the optimal R −1 NDT is τ ∗ = NT +N (1 − µR ). NT Corollary 2 (Gap of NDT). The multiplicative gap between the upper bound and the lower bound of the minimum NDT is within 2 when NT ≥ NR , within 12 when NT < NR , µT ≥ N1T , R −1 and within NT +N when NT < NR , µT < N1T . NT B. Special Cases 1) Transmitter cache only (µR = 0): In the special case when µR = 0 (transmitter cache only), the achievable NDT for the 3 × 3 network in Theorem 1 reduces to  13/6 − 3µT /2, 1/3 ≤ µT ≤ 2/3 τU (0, µT ) = . (12) 3/2 − µT /2, 2/3 < µT ≤ 1 In [20], the authors obtained the inverse of an achievable sum DoF of this network. By Remark 1, it is seen that our result (12) is consistent with that in [20]. Also, when µR = 0, by setting s1 = l, s2 = NR − l in (10) of Theorem 2, a loosened lower bound is 1 τ∗ ≥ max (NR − (NT − l)(NR − l)µT ) . l=1,2,··· ,min{NT ,NR } l which is the same as the lower bound δ ∗ (µ) in [21]. 3 Please refer to [23, Lemma 1] for more detailed analysis of the convexity of NDT. 9 2) Full transmitter cache (µT = 1): When µT = 1, each transmitter can cache all the files and hence can fully cooperate with each other. The network can thus be viewed as a virtual broadcast channel as in [9] except that the server (transmitter) has NT distributed antennas. When NT ≥ NR , by Corollary 1, the optimal NDT of the NT × NR network is τ ∗ = 1 − µR . R and others being 0 in (3). By This can be achieved by letting a∗NR ,0 = µR , a∗0,NR = 1−µ (NNRT ) R (1−µR ) comparing to the result in [9], i.e. the lower convex envelop of points τ = N1+N at µR ∈ R µR {0, 1/NR, 2/NR , . . . , 1}, it is seen that our NDT is better when 0 ≤ µR < 1 − N1R and the same when 1 − N1R ≤ µR ≤ 1. When NT < NR , by Theorem 1, an achievable NDT (not necessarily optimal) at certain µR is  N (1−µ ) R R  , µR ∈ {0, N1R , N2R . . . ,  NT +NR µR   NR −NT −2  }  NR  NR −NT −1 1 1 − µR + N NR , µR = τ̃U = , NR T (N µ )  R R  N −N N −N +1   1 − µR , µR ∈ { RNR T , R NRT ,    NR −NT +2 , . . . , 1} NR 1 and others being 0 in (3). By comparing to the result in [9], i.e., (NNRRµR ) R (1−µR ) at these points, it is seen that our NDT is better when µR ∈ {0, N1R , . . . , NNRR−2 } τ = N1+N R µR and the same when µR ∈ { NNRR−1 , 1}. The above performance improvements are all due to transmitter cooperation gain. by letting aNR µR ,NT = IV. F ILE S PLITTING AND C ACHE P LACEMENT In this section, we propose a novel file splitting and cache placement scheme for any given normalized cache sizes µR and µT and any transmitter and receiver node numbers NT and NR . This scheme is the basis of the proofs of all the achievable NDTs. In this work, we treat all the files equally without taking file popularity into account. Thus, each file will be split and cached in the same manner. Without loss of generality, we focus on the splitting and caching of file Wi for any 1 ≤ i ≤ L. Since each bit of the file is either cached or not cached at every node, there are 2NT +NR possible cache states for each bit. Not every cache state is, however, legitimate. In specific, every bit of the file must be cached in at least one node. In addition, every bit that is not cached simultaneously in all receivers must be cached 4 in at least one transmitter. As such, theP total P number of feasible cache states for each bit is  N T NR  N T  NR NT PNR −1 NR NT +NR + 1. Now we can partition each = given by 2 − 0  r=0 t=1 r=0 t r r PNR PNT NR NT  + 1 subfiles exclusively, each associated with one unique cache Wi into r=0 t=1 r t state and with possibly different length. Define receiver subset Φ ⊆ [NR ] and transmitter subset Ψ ⊆ [NT ]. Then, denote Wi,RΦ ,TΨ as the subfile of Wi cached in receiver subset Φ and transmitter subset Ψ. For example, Wi,R12 ,T12 is the subfile cached in receivers 1 and 2 and transmitters 1 and 2, Wi,R∅ ,T123 is the subfile cached in none of the receivers but in transmitters 1, 2 and 3. Similarly, we denoteSWi,RΦ as the collection of the subfiles of Wi that are cached in receiver subset Φ, i.e., Wi,RΦ = Wi,RΦ ,TΨ . We assume Ψ 4 This is because we do not allow receiver cooperation and all the messages must be sent from the transmitters. 10 that the subfiles that are cached in the same number of transmitters and the same number of receivers have the same size. Due to the symmetry of all the nodes as well as the independence of all files, this assumption is valid and does not lose any generality. Thus, we denote the size of Wi,RΦ ,TΨ by ar,t F , where r = |Φ|, t = |Ψ|, and ar,t ∈ [0, 1] is the file splitting ratio to be optimized later. For example, the size of Wi,R12 ,T12 is a2,2 F , and the size of Wi,R∅ ,T123 is a0,3 F . Here, the file splitting ratios {ar,t } should satisfy the following constraints:    NR X NT   X NT NR    ar,t + aNR ,0 = 1, (13)   t r   r=0 t=1      NR X NT  X NR − 1 NT ar,t + aNR ,0 ≤ µR , (14)  t r − 1  r=1 t=1       NR X NT   X NT − 1 NR   ar,t ≤ µT . (15)   t−1 r r=0 t=1 Constraint (13) comes from the file size limit. This is because for each file, the number of its subfiles cached in r out of NR receivers and t out of NT transmitters is given by NrR NtT and they all have same length of ar,t F bits, for r = 0, 1, · · · , NR and t = 1, 2, · · · , NT or (r = NR , t = 0). Constraint (14) comes from the receiver cache size is because  for  PNThis PNlimit. NR −1 NT T R + 1. each receiver, the total number of subfiles it caches is given by r=1 t=1 r−1 t   NR −1 NT Among them, there are r−1 subfiles with length of ar,t F bits, for r = 1, 2, · · · , NR t and t = 1, 2, · · · , NT , and there is only one subfile with length of aNR ,0 F bits. Likewise, constraint (15) comes from the transmitter cache size isbecause  for each transmitter, PNThis P limit. NR NT −1 T R . Among them, there the total number of subfiles it caches is given by N t=1 r=0 r t−1   NR NT −1 are r subfiles with length of ar,t F bits for r = 0, 1, · · · , NR and t = 1, 2, · · · , NT . t−1 Remark 3 (Integer points and equal file splitting). Consider the special case where (µR , µT ) satisfies NR µR = m and NT µT = n with m and n being any integers. These normalized cache size values are referred to as integer points, where every bit of each file can be cached simultaneously at m receivers and n transmitters on average. The authors in [25] proposed to split each file so that each bit is cached exactly at m receivers and n transmitters. We refer to this file spitting scheme as equal file splitting. For example, in a 3 × 3 interference network at integer point (µR = 1/3, µT = 2/3), they proposed to partition each file equally into nine disjoint subfiles, each of fractional size a1,2 = 1/9, then place each subfile at exactly one receiver and two transmitters. Such file spitting and cache placement method is, however, not unique. Alternatively, we can partition each file into two subfiles, one cached at all three transmitters but not any receiver with fractional size a0,3 = 2/3 and the other cached at all three receivers but not any transmitter with fractional size a3,0 = 1/3. As we will show in Section V, the two file splitting and caching strategies achieve the same NDT. Through this example, it can be seen that our proposed file splitting and cache placement strategy is more general. It offers the freedom to adjust the file splitting ratios for caching gain optimization as will be discussed in Section V. V. D ELIVERY S CHEME AND C ACHING O PTIMIZATION In this section, we prove the achievability of the NDT in Theorem 1. The main idea of the proof is to design the delivery phase given the file splitting and caching strategy presented in Section IV, and then to compute and minimize the achievable NDT by optimizing the file splitting 11 ratios. We consider the worst-case scenario where each receiver requests a distinct file. When some receivers request the same file, the proposed delivery strategy can still be applied either directly or by treating the requests as being different. Without loss of generality, we assume that receiver q (q = 1, 2, . . . , NR ) desires Wq in the delivery phase. In specific, receiver q wants subfiles {Wq,RΦ ,TΨ : q ∈ / Φ}. We divide these subfiles into NR NT groups according to the number of transmitters and receivers  they are cached, or equivalently, their fractional file sizes  where NR −1 NT {ar,t }. There are N subfiles in the group associated with ar,t , and each receiver t R r NR −1 NT desires subfiles of them. Each group of subfiles is delivered individually in the time r t division manner. Without loss of generality, we present the delivery strategy of an arbitrary group of subfiles with fractional file size ar,t in this section, for 0 ≤ r ≤ NR − 1, 1 ≤ t ≤ NT . As will be clear in the following subsection, the cache states of these subfiles transform the original interference network into cooperative X-multicast channels, and therefore exploit transmitter cooperation gain and coded multicasting gain, apart from local caching gain. A. Delivery of Subfiles in the Group with ar,t Note that each subfile in the same group with fractional file size ar,t is desired by one receiver, and already cached at r different receivers and t different transmitters. Coded multicasting approach can be used in the delivery phase through bit-wise XOR, similar with [9]. In specific, given an arbitrary receiver subset Φ+ with size |Φ+ | = r + 1 and an arbitrary transmitter subset L Wq,RΦ+ \{q} ,TΨ desired Ψ with size t, each transmitter in Ψ generates the coded message + q∈Φ+ + by all receivers in Φ . Note that each receiver q in Φ has cached subfiles Wq′ ,RΦ+ \{q′ } ,TΨ for q ′ ∈ Φ+ \ {q}, and thus can successfully decode its desired subfile Wq,RΦ+ \{q} ,TΨ from the coded L Wq,RΦ+ \{q} ,TΨ . Through this coded multicasting approach, r+1 different subfiles are message q∈Φ+  NT  NR coded messages combined into a single coded message via XOR, and there are only r+1 t to be transmitted in total, each available at t transmitters and desired by r + 1 receivers. We define the channel with such message flow formally as below.   NR Definition 2. The channel characterized as follows is referred to as the NtT × r+1 cooperative X-multicast channel: 1) there are NR receivers and NT transmitters; 2) each set of r + 1 (r < NR ) receivers forms a receiver multicast group; 3) each set of t (t ≤ NT ) transmitters forms a transmitter cooperation group; 4) each transmitter cooperation group has an independent message to send to each receiver multicast group. In the special case when (r, t) = (0, 1) (or (r, t) = (0, NT )), the cooperative X-multicast channel reduces to the X channel (or MISO broadcast channel). When t = 1, the channel   reduces NR to the (r + 1)-multicast X-channel defined in [26]. The achievable DoF of the NtT × r+1 cooperative X-multicast channel is presented in the following lemma.   NR cooperative X-multicast channel is Lemma 1. The achievable per-user DoF of the NtT × r+1  1, r + t ≥ NR    (NRr−1)(NtT )t , r + t = NR − 1 , dr,t = (16) (NRr−1n)(NtT )t+1 o    max d′ , r+t , r + t ≤ N − 2 r,t NR R 12 where d′r,t , max ′ 1≤t ≤t (  NR −1 r NT t′     NR −1 NT NR −r−1 ′ t t′ r t′ −1    NT  NR −r−1 ′ NR −r−2 R −1 t + Nr+1 t′ −1 t′ −1 t′ −1 ) (17) Proof. We present the main idea of the proof here. The detailed proof is given in Appendix A. Since each message can be cooperatively transmitted by t transmitters, the interference it may cause to a maximum of t − 1 undesired receivers can be neutralized through interference neutralization. When the actual number of undesired receivers for each message, NR − r − 1, does not exceed t − 1, i.e. NR ≤ r + t, by interference neutralization, each receiver only receives its desired messages with all undesired messages neutralized out. Therefore, a per-user DoF of 1 can be achieved. On the other hand, when NR > r + t, each message will still cause interference to NR − r − t undesired receivers after interference neutralization. In this case, asymptotic interference alignment is further applied by partitioning the interference messages into groups and aligning the interferences from the same group in a same subspace at each undesired receiver, so as to achieve the per-user DoF in (16).   NR Remark 4 (Sum DoF). Since each message is desired by r + 1 receivers in the NtT × r+1 cooperative X-multicast channel, the achievable sum DoF of this channel is given by dsum = NR d , where dr,t is given in Lemma 1. r+1 r,t Remark 5 (Optimality of DoF). The achievable per-user DoF in Lemma 1 is optimal in certain cases. In specific, NT 1) When (r, t) = (0, 1), Lemma 1 reduces to d0,1 = NT +N , which is optimal for the X R −1 channel [27]. NT , 1}, which is optimal for 2) When (r, t) = (0, NT ), Lemma 1 reduces to d0,NT = min{ N R the MISO broadcast channel [28]. 3) When r + t ≥ NR , Lemma 1 reduces to dr,t = 1, which is optimal for the considered channel. The converse can be proved easily by using a cut-set bound at each receiver. Note that the optimality of the DoF results in the above cases is a part of the reason that the achievable NDT is optimal under the conditions in Corollary 1. More specifically, it is observed from the proof of Corollary 1 in Appendix B that the optimal file splitting ratios satisfy a∗0,NR > 0, a∗NR −NT ,NT > 0, a∗0,NT > 0, a∗0,1 > 0 in the corresponding cache size regions. In the special case when t = 1, Lemma 1 reduces to the DoF of the (r+1)-multicast X-channel NT (NR −1) in [26], i.e., dr,1 = N NR −1 +r NR −1 . When (NR , NT ) = (3, 3) and (r, t) = (0, 2), Lemma 1 T ( r ) ( r+1 ) reduces to the DoF of the cache-aided interference channel in [20] when (µR , µT ) = (0, 2/3), i.e., d0,2 = 6/7. When (NR , NT ) = (3, 3) and (r, t) = (1, 1), (r, t) = (1, 2), (r, t) = (1, 3), Lemma 1 reduces to the DoF of the hybrid X-multicast channel, partially cooperative X-multicast channel, and fully cooperative X-multicast channel in [24], i.e. d1,1 = 6/7, d1,2 = 1, and d1,3 = 1, respectively.   NR Since the channel formed by the delivery of the group with ar,t is the NtT × r+1 cooperative  NT  NR X-multicast channel, and there are r+1 t coded messages to deliver, with each receiver   desiring NRr−1 NtT of them, by Lemma 1, we can obtain the NDT of this group directly as (NR −1)(NT ) τr,t = r dr,t t ar,t . 13 Fig. 2: Cache size regions in the 2 × 2 network. B. Optimization of Splitting Ratios Summing up the NDTs obtained in the previous subsection for all groups, we can obtain the total NDT in the delivery phase:   NX NT NR −1 NT R −1 X r t τ= ar,t . (18) d r,t r=0 t=1 We then optimize the file splitting ratios {ar,t } to minimize the total NDT subject to constraints (13)(14)(15). This is expressed as the LP problem shown in Theorem 1, where the constraints (4)(5)(6) are the same as (13)(14)(15), and dr,t in (8) is the same as (16). Thus, Theorem 1 is proved. In the following corollaries, we present the closed-form and optimal solutions in Theorem 1 when NT = NR = 2 and NT = NR = 3 by using linear equation substitutions and other manipulations. The detailed computation for NT = NR = 2 is given in Appendix D. The computation for NT = NR = 3 is similar and omitted. Corollary 3. For the cache-aided 2×2 interference network, the minimum NDT is upper bounded by  1 − µR , (µR , µT ) ∈ R122 ∗ , (19) τ (µR , µT ) ≤ τU = 2 − 2µR − µT , (µR , µT ) ∈ R222 where {Ri22 }2i=1 are given below and sketched in Fig. 2.  1 R22 = {(µR , µT ) : µR + µT ≥ 1, µR ≤ 1, µT ≤ 1} R222 = {(µR , µT ) : µR + µT < 1, µR ≥ 0, µR + 2µT ≥ 1} Proof. See Appendix D. 14 Fig. 3: Cache size regions in the 3 × 3 network. Corollary 4. For the cache-aided 3×3 interference network, the minimum NDT is upper bounded by  1−µ , (µR , µT ) ∈ R133    4 4R 1   3 − 3 µR − 3 µT , (µR , µT ) ∈ R233 3 − 35 µR − 12 µT , (µR , µT ) ∈ R333 (20) τ ∗ (µR , µT ) ≤ τU = 2  8 3 13 4  − µ − µ , (µ , µ ) ∈ R  R R T 33 2 T   86 − 83µ − 3µ 5 , (µ , µ ) ∈ R R T R T 33 3 3 where {Ri33 }5i=1 are given below and sketched in Fig. 3.  1 R33 = {(µR , µT ) : µR + µT ≥ 1, µR ≤ 1, µT ≤ 1}     R233 = {(µR , µT ) : µR + µT < 1, 2µR + µT ≥ 1,    µR + 2µT > 1}    3 R33 = {(µR , µT ) : 3µR + 3µT ≥ 2, 2µR + µT < 1, . µR ≥ 0}     R433 = {(µR , µT ) : 3µR + 3µT < 2, µR ≥ 0, 3µT > 1}    5    R33 = {(µR , µT ) : 3µT ≤ 1, µR + 2µT ≤ 1, µR + 3µT ≥ 1} Proof. The proof is similar to that of Corollary 3 and hence ignored. We only present the optimal solution of file splitting ratios in Appendix E. It can be seen from Corollary 3 and Corollary 4 that the achievable NDT is a piece-wise linearly decreasing function of µR and µT . The number of piece-wise regions depends on NR and NT . VI. D ISCUSSION ON THE ACHIEVABLE S CHEME In this section, we provide some discussions on our proposed caching and delivery scheme, which will offer some insights into the impact of caching in the considered interference networks. 15 A. On Caching at Integer Points Consider an arbitrary integer point (µR = m/NR , µT = n/NT ) with m and n being any integers. We first evaluate the achievable NDT by adopting the equal file splitting strategy.5 In   the equal file splitting strategy, each file is split into NmR NnT equal-sized subfiles, each cached in m receivers and n transmitters. Then, we have am,n = NR 1 NT and all the rest ar,t = 0. ( m )( n ) Theproposed delivery scheme introduced before then transforms the network topology to the NR NT cooperative X-multicast channel. By (18), the achievable NDT can be expressed × m+1 n in a unified form as 1 − µR , (21) τm,n = dm,n where dm,n is the per-user DoF of the formed cooperative X-multicast channel given in (16). By comparing (21) and (3), the achievable NDT at any (µR , µT ) in Theorem 1 can be regarded as the convex envelope of  the achievable NDTs {τm,n } at all integer points with combination coefficients {βm,n , NnT NmR am,n : (m, n) ∈ A}. Based on Remark 4, we can rewrite (21) as τm,n = NR (1 − µR ) . (m + 1)dsum (22) The expression of NDT in (22) reveals the gains of caching more explicitly. The term (1 − µR ) denotes the receiver local caching gain, since each receiver has already cached a fraction µR of its desired file. The term (m + 1) denotes the coded multicasting gain, since by our caching and delivery scheme, each coded message is needed by m + 1 different receivers. The DoF term, dsum , reflects the cache-induced transmitter cooperation gain via interference neutralization and interference alignment. At an arbitrary cache size tuple (µR , µT ), these gains can also be exploited and reflected by the file splitting ratios {ar,t } of the corresponding cache states. When the optimal solution of the LP problem satisfies a∗r,t > 0 for some (r, t), it means that there exist subfiles cached in r receivers and t transmitters in the cache placement phase. As shown in our proposed delivery scheme in Section V-A, local caching gain is exploited when a∗r,t > 0 for some r > 0, coded multicasting gain is exploited when a∗r,t > 0 for some 0 < r < NR , and transmitter cooperation gain is exploited when a∗r,t > 0 for some t ≥ 1. For example, we can only exploit local caching gain and transmitter cooperation gain in cache size region R133 in the 3 × 3 network, since our solution satisfies a∗0,3 , a∗3,0 > 0 and all the rest a∗r,t = 0 as shown in Appendix E. B. On the Optimal File Splitting Ratios It is important to realize from the previous two sections that the optimal file slitting ratios for NDT minimization at given cache size (µR , µT ) are not unique. Mathematically, this is quite expected since a linear programming problem like (3) in general does not have unique solutions. However, the physical meaning of each solution can vary dramatically. Let us take the integer point (µR = 31 , µT = 32 ) in the 3 × 3 network for example. According to Corollary 4, there are two optimal solutions for the file splitting ratios. One is a∗0,3 = 23 , a∗3,0 = 13 with the rest a∗r,t = 0. This solution means that each file is split into two subfiles, one has fractional size a∗0,3 = 32 and is cached simultaneously at all three transmitters but none of the receivers, the other subfile 5 See Remark 3 in Section IV for the definition of integer points. 16 has fractional size a∗3,0 = 31 and is cached simultaneously at all three receivers but none of the transmitters. From the proposed delivery scheme in Section V, it is seen that this solution enjoys both receiver local caching gain and transmitter cooperation gain. In particular, the transmitter cooperation turns the interference network into a MISO broadcast channel with per-user DoF of 1. Another feasible solution is a∗1,2 = 19 with all the rest a∗r,t = 0. In this solution, each file is split into 9 subfiles, each with the same fractional size a∗1,2 = 19 and cached at one receiver and two transmitters. From the proposed delivery scheme in Section V, this solution enjoys the coded multicasting gain and transmitter cooperation gain by turning the network topology into a partially cooperative X-multicast channel. Together with Corollary 1 in Section III, both file splitting schemes are globally optimal in terms of achieving the minimum NDT τ ∗ = 32 . It is interesting to note that the second file splitting scheme is the same as the one proposed in [25]. However, the delivery strategy is different. In [25], the network topology is turned into a partially cooperative interference channel with side information, and interference neutralization is used to achieve the sum DoF of 3. Given that each receiver already caches 3 out of the 9 subfiles of its desired file and only needs the other 6 subfiles in the delivery phase, we can 3×6×a F compute the total delivery time as T = 3×log1,2P . As such, the corresponding NDT is τ = 23 , which is the same as ours. In general, we find that at integer points (µR = NmR , µT = NnT ), with m + n ≥ NR , the optimal file splitting ratios and the delivery scheme are not unique. In specific, when NT ≥ NR , besides R the equal file splitting strategy, the optimal ratios can also be a∗NR ,0 = µR , a∗0,NR = 1−µ NT . This ( NR )  NT solution means that each file is split into 1 + N subfiles, one has fractional size a∗NR ,0 = µR R and is cached simultaneously at all receivers but none of the transmitters, and each of the other R and is cached simultaneously at NR out of NT different subfiles has fractional size a∗0,NR = 1−µ (NNRT ) transmitters but none of the receivers. According   to the delivery schemes proposed in Section V, NT NR the network topology becomes the NR × 1 cooperative X-multicast channel whose per-user DoF is 1. Thus, we can obtain the NDT as 1 − µR τ= = 1 − µR . (23) d Note that bit-wise XOR is not used in the delivery phase, thus this scheme does not exploit coded multicasting gain. Comparing (23) to (21) achieved by equal file splitting strategy, it can be seen that the transmitter cooperation gain obtained in this scheme has the same contribution as the combined coded-multicasting and transmitter cooperation gain in the equal file splitting strategy. When NT < NR , bit-wise XOR is applied in the delivery phase to achieve the optimal NDT, because the limited number of transmitters becomes a bottleneck. In this case, the optimal NR (1−µR ) R solution can be a∗NR ,0 = 1 − N (1 − µR ), a∗NR −NT ,NT = NT NR . This solution means that each NT (NR −NT )  NR R file is split into 1 + NR −NT subfiles, one has fractional size a∗NR ,0 = 1 − N (1 − µR ) and is NT cached simultaneously at all receivers but none of the transmitters, and each of the other subfiles has fractional size a∗NR −NT ,NT = NR (1−µR ) NT NR NR −NT and is cached simultaneously at all transmitters and ( ) NR −NT out of NR different receivers. In the delivery phase, only the subfiles with fractional size a∗NR −NT ,NT are transmitted, and the local caching gain, coded-multicasting gain and transmitter cooperation gain are all exploited. 17 The multiple choices of file splitting ratios offer more freedoms to choose an appropriate caching and delivery scheme according to different limitations in practical systems, such as transmitter or receiver computation complexity or file splitting constraints. C. On the Differences with [25] and [26] Although the similar caching problem is considered in [25], their performance metric, caching scheme, and conclusion are different from ours. First, we adopt the NDT as the performance metric while [25] used the standard DoF. As we noted in Remark 1 in Section II, NDT is particularly suitable for the considered network because it reflects not only the load reduction due to receiver cache but also the DoF enhancement due to transmitter cache. In specific, we can express the NDT as τ = Rd as in (1), where R is the per-user traffic load normalized by each file size. To illustrate this in detail, we consider the integer points (µR = 31 , µT = 23 ) and (µR = 23 , µT = 31 ) in the 3 × 3 interference network. In [25], they have per-user DoF of 1 at both points. However, the actual delivery time at these two points is different. At point (µR = 31 , µT = 32 ), each file is split into 9 equal-sized subfiles, each cached at one receiver and two transmitters. This corresponds to a1,2 = 91 and the rest ar,t ’s are all 0. Thus, each receiver caches 3 out of 9 subfiles of its desired file and only needs the other 6 subfiles in 6×a the delivery phase. The corresponding NDT is τ = 1 1,2 = 32 . On the other hand, at point (µR = 32 , µT = 13 ), each file is also split into 9 equal-sized subfiles, but each cached at two receivers and one transmitter. This corresponds to a2,1 = 91 and the rest ar,t ’s are all 0. Thus, each receiver caches 6 out of 9 subfiles of its desired file and only needs the other 3 subfiles in 3×a the delivery phase, yielding the corresponding NDT τ = 1 2,1 = 13 . Clearly, the DoF alone is unable to fully capture the gains of joint transmitter and receiver caching as NDT does. Second, the file splitting ratios in [25] are pre-determined at each given cache size tuple (µR , µT ) as noted in Remark 3 of Section IV. However, our file splitting ratios are obtained by solving an LP problem at each given cache size tuple and thus are provably optimal under the given caching strategy. Another difference between our work and [25] is that the transmission scheme in [25] is restricted to one-shot linear processing, while we allow asymptotic interference alignment and interference neutralization to explore the optimal transmission DoF. Due to this difference, the achievable NDT in [25] is different from ours. In specific, the achievable NDT in [25] at an arbitrary integer point (µR , µT ) is given by τ= NR (1 − µR ) , min{NR , NR µR + NT µT } (24) based on [25, Theorem 1]. The achievable NDT in our scheme is given by (21). It can be seen that our achievable NDT in (21) is smaller (hence better) than (24) in [25]. For example, consider the integer point (µR = 0, µT = 1/3) in the 3 × 3 interference network. According to Corollary 1, the achievable NDT in our scheme is optimal and given by τ ∗ = 5/3, which is better than the NDT τ = 3 achieved in [25]. The caching problem with all transmitters and receivers equipped with cache is also considered in a later work [26]. Note that the performance metric, 1/DoF, adopted in [26] is equivalent to NDT and thus we are able to compare the result directly. In [26], each subfile is only cached at one distinct transmitter during the cache placement phase for all µT ≥ 1/NT . Hence it cannot exploit the cache-induced transmitter cooperation through interference neutralization as our scheme when µT > 1/NT . As a result, the achievable NDT in [26] is larger (hence worse) than ours at cache size region µT > 1/NT . For example, consider integer point (µR = 1/3, µT = 2/3) in the 3 × 3 18 Desired files of s1 + s2 receivers All transmitted signals s1 + s2 receiver caches NT - l transmitter caches l received signals Tx 1 Rx 1 Cache Cache Rx s1 Cache Г Rx l Cache Г Г Cache Rx l +1 Cache Г Г Tx NT Г Г Г Tx l +1 Cache Г Г Tx 2 Cache Rx l + s2 Г Г Cache Rx N R Cache Fig. 4: Illustration of the proof of the converse. interference network. According to Corollary 1, the achievable NDT in our scheme is optimal and given by τ ∗ = 2/3, which is better than the NDT τ = 7/9 achieved in [26]. Last but not least, [25], [26] are limited to the cache size region µT ≥ N1T which is only a subset of the feasible cache size region (2) considered in this work. VII. L OWER B OUND OF THE M INIMUM NDT In this section, we present the proof of the lower bound of the minimum NDT in Theorem 2. The method of the proof is an extension of the approach in [21] by taking receiver caches into account. The proof of the lower bound is based on the following statement. As illustrated in Fig. 4, we divide all the receivers into two groups, where the first group contains l arbitrary receivers and the second group contains the remaining NR − l receivers. Then, we select s1 (s1 ≤ l) receivers from the first group as S1 , and s2 (s2 ≤ NR − l) receivers from the second group as S2 . By converse assumption, given the local caches from any NT − l transmitters, the received signals from the l receivers in the first group, and the local caches from the receivers in S1 and S2 , then the desired files requested by the receivers in S1 and S2 are decodable in the high SNR regime. 19 More specifically, given the transmitter caches from the NT − l transmitters, the transmitted signals of these NT − l transmitters can be constructed. Then, given the NT − l transmitted signals and the l received signals in the first group, the remaining l unknown transmitted signals can be obtained almost surely [21, Lemma 3], neglecting noise in the high SNR regime. With all the transmitted signals, the received signals of all the receivers can be obtained. Together with the local caches from S1 and S2 , their desired files are decodable. To begin the proof, let d = (d1 , d2 , . . . , dNR ) denote a distinct user demand vector. Using [21, Lemma 2] and from the statement above, we obtain H(Wd1 ∼ds1 , Wdl+1 ∼dl+s2 |Y1∼l , Ul+1∼NT , V1∼s1 , Vl+1∼l+s2 , Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) =F εF + T εP log P, (25) where Wd , {Wd1 , Wd2 , . . . , WdNR }, εP is a function of power P , and satisfies limP →∞ εP = 0. Then, the entropy of desired files {Wd1 , . . . , Wds1 , Wdl+1 , . . . , Wdl+s2 } can be expressed as (s1 + s2 )F =H(Wd1 ∼ds1 , Wdl+1 ∼dl+s2 |Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) =H(Wd1 ∼ds1 , Wdl+1 ∼dl+s2 |Y1∼l , Ul+1∼NT , V1∼s1 , Vl+1∼l+s2 , Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) + I(Wd1 ∼ds1 , Wdl+1 ∼dl+s2 ; Y1∼l , Ul+1∼NT , V1∼s1 , Vl+1∼l+s2 |Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) =I(Wd1 ∼ds1 , Wdl+1 ∼dl+s2 ; Y1∼l , Ul+1∼NT , V1∼s1 , Vl+1∼l+s2 |Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) + F εF + T εP log P. Note that there are L NR (26)  NR ! distinct demand vectors in total. Then, we have (s1 + s2 )F X 1 H(Wd1 ∼ds1 , Wdl+1 ∼dl+s2 |Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) = L NR ! d NR X 1 = L I(Wd1 ∼ds1 , Wdl+1 ∼dl+s2 ; Y1∼l , Ul+1∼NT , V1∼s1 , Vl+1∼l+s2 |Wds1 +1 ∼dl Wdl+s2 +1 ∼dNR , NR ! d NR W1∼L \ Wd ) + F εF + T εP log P. (27) In what follows, we prove the bounds (10) and (11), respectively according to whether intra-file coding is allowed or not in the caching functions. 20 A. Lower Bound (10) with Arbitrary Intra-file Coding The mutual information in (27) is upper bounded by X 1  I(Wd1 ∼ds1 , Wdl+1 ∼dl+s2 ; Y1∼l , Ul+1∼NT , V1∼s1 , Vl+1∼l+s2 |Wds1 +1 ∼dl , L NR ! d NR Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) = X 1  I(Wd1 ∼ds1 , Wdl+1 ∼dl+s2 ; Y1∼l |Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) L NR ! d NR X 1 I(Wd1 ∼ds1 , Wdl+1 ∼dl+s2 ; Ul+1∼NT , V1∼s1 , Vl+1∼l+s2 |Y1∼l , Wds1 +1 ∼dl , + L NR ! d NR Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) (28a) X 1  h(Y1∼l |Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) L NR ! d NR X 1 H(Ul+1∼NT , V1∼s1 , Vl+1∼l+s2 |Y1∼l , Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) + L NR ! d NR X X 1 1 − L h(Y1∼l |W1∼L ) − L  H(Ul+1∼NT , V1∼s1 , Vl+1∼l+s2 |Y1∼l , W1∼L ) NR ! d NR ! d NR NR (28b) X 1 h(Y1∼l |Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) ≤ L NR ! d NR X 1 H(Ul+1∼NT , V1∼s1 , Vl+1∼l+s2 |Y1∼l , Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) + L NR ! d NR (28c) X 1 ≤ L lT log(2πe(c · P + 1)) N ! R NR d X 1 + L H(Ul+1∼NT |V1∼s1 , Vl+1∼l+s2 , Y1∼l , Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) N ! R NR d X 1 (28d) H(V1∼s1 , Vl+1∼l+s2 |Y1∼l , Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) + L N ! R NR d X 1 ≤lT log(2πe(c · P + 1)) + L  H(Ul+1∼NT |Wd1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) N ! R NR d X 1 H(V1∼s1 , Vl+1∼l+s2 |Y1∼l , Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) + F εF (28e) + L N ! R NR d = Here, (28a) and (28b) follow from the definition of mutual information; (28d) follows from [21, Lemma 1]; (28e) follows from the Fano’s inequality and the fact that conditioning reduces entropy. 21 The second term in (28e) is upper bounded by X 1  H(Ul+1∼NT |Wd1 ∼dl , Wdl+s2 +1∼dN , W1∼L \ Wd ) L R N ! R NR d X X 1 ≤ L H(Up |Wd1 ∼dl , Wdl+s2 +1∼dN , W1∼L \ Wd ) R N ! R NR d l+1≤p≤NT X X X 1 = L H(Up,i ) NR ! l+1≤p≤N d i∈{d ,...,d } NR T l+1 l+s2   X X 1 L−1 = L (NR − 1)!H(Up,i ) s2 NR − 1 NR ! l+1≤p≤N 1≤i≤L NR T   1 L−1 (NR − 1)!MT F ≤ L (NT − l)s2 NR − 1 NR ! N (29a) (29b) (29c) (29d) (29e) R =(NT − l)s2 µT F. (29f) Here, (29c) comes from the fact that only files {Wi : i ∈ {dl+1, . . . , dl+s2 }} are unknown; (29e) comes from the fact that each transmitter has MT F bits of caching storage. Note that (29) can be viewed equivalently as the fact that each transmitter can cache µT F bits of each file on average. This argument is also used for the upper bound of the third term in (28e) below. 22 Further, the third term in (28e) is upper bounded by X 1  H(V1∼s1 , Vl+1∼l+s2 |Y1∼l , Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) L N ! R NR d X 1 = L H(V1 |Y1∼l , Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) N ! R NR d X 1 H(V2∼s1 , Vl+1∼l+s2 |Y1∼l , V1 , Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) + L N ! R NR d (30a) ≤(s1 + s2 )µR F s1 XX 1 + L H(Vq |Y1∼l , V1∼q−1 , Wd1 ∼dq−1 , Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) N ! R NR d q=2 X 1 H(Vl+1∼l+s2 |Y1∼l , V1∼s1 , Wd1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) + F εF (30b) + L N ! R NR d ≤(s1 + s2 )µR F + + = q=2 (s1 + s2 − q + 1)µR F X l+s X2 1  H(Vq |Y1∼l , V1∼s1 , Wd1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) + F εF L N ! R NR d q=l+1 ≤(s1 + s2 )µR F +  s1 X s1 X q=2 (s1 + s2 − q + 1)µR F + s22 µR F + F εF  2s2 + s1 + 1 2 s1 + s2 µ R F + F ε F . 2 (30c) (30d) (30e) Here, (30b) comes from the Fano’s inequality and the fact that receiver 1 can cache µR F bits of each file on average, which is similar to (29); (30c) comes from the fact that each receiver q (2 ≤ q ≤ s1 ) can cache µR F bits of unknown files Wdq ∼ds1 , Wdl+1 ∼dl+s2 on average, similar to (29); (30d) comes from the fact that each receiver q (l + 1 ≤ q ≤ l + s2 ) can cache µR F bits of unknown files Wl+1∼l+s2 on average, similar to (29). Combining (27)(28e)(29f)(30e), we have   2s2 + s1 + 1 2 (s1 + s2 )F ≤lT log(2πe(c · P + 1)) + (NT − l)s2 µT F + s1 + s2 µ R F 2 + F εF + T ǫP log P. (31) Dividing F on both sides of (31) and letting F → ∞ and P → ∞, we have T log P τ = lim lim P →∞ F →∞ F     1 2s2 + s1 + 1 2 ≥ (s1 + s2 ) − (NT − l)s2 µT − · s1 + s2 µ R . l 2 (32) By optimizing the bound in (32) over all possible choices of s1 = 0, 1, . . . , l, s2 = 0, 1, . . . , NR − l, and l = 1, 2, . . . , min{NT , NR }, (10) is proved. 23 B. Lower Bound (11) without Intra-file Coding Next, we consider the proof of (11) where neither intra-file coding nor inter-file coding are allowed. In this case, files can only be split and cached at receivers and transmitters without any coding. If the cache sizes at transmitters are not enough, receivers must cache some common bits of the files to guarantee the feasibility of the scheme. Thus, (30c) and (30d) can be further tightened. In specific, the third term in (28e) can be upper bounded by X 1  H(V1∼s1 , Vl+1∼l+s2 |Y1∼l , Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) L NR ! d NR X 1 = L H(V1 |Y1∼l , Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) NR ! d NR X 1 + L (33a) H(V2∼s1 , Vl+1∼l+s2 |Y1∼l , V1 , Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) N ! R NR d ≤(s1 + s2 )µR F s1 XX 1 H(Vq |Y1∼l , V1∼q−1 , Wd1 ∼dq−1 , Wds1 +1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) + L NR ! d q=2 NR X 1 H(Vl+1∼l+s2 |Y1∼l , V1∼s1 , Wd1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) + F εF (33b) + L N ! R NR d ≤(s1 + s2 )µR F + ≤ s1 X q=2  (s1 + s2 − q + 1) µR − (1 − NT µT )+ F X l+s X2 1 + L H(Vq |Y1∼l , V1∼s1 , Wd1 ∼dl , Wdl+s2 +1 ∼dNR , W1∼L \ Wd ) + F εF N ! R NR d q=l+1 s1 X q=2   (s1 + s2 − q + 1) µR − (1 − NT µT )+ F + s22 µR − (1 − NT µT )+ F (33c) + (s1 + s2 )µR F + F εF (33d)     2s2 + s1 + 1 2s2 + s1 = s1 + s22 µR F − (s1 − 1) + s22 (1 − NT µT )+ F + F εF . (33e) 2 2 Here, (33b) follows from the Fano’s inequality and the fact that given receiver 1 has MR F cache storage, it can cache µR F bits of each file on average, which is similar to (29); (33c) follows from the fact that at least (1 − NT µT )+ F cached bits of each file on average are common for all receivers to guarantee the feasibility of the scheme if NT MT F < LF . Thus, each receiver q (2 ≤ q ≤ s1 ) can cache (µR − (1 − NT µT )+ )F bits of unknown files Wdq ∼ds1 , Wdl+1 ∼dl+s2 on average, similar to (29); (33d) follows from the fact that each receiver q (l + 1 ≤ q ≤ l + s2 ) can cache (µR − (1 − NT µT )+ )F bits of unknown files Wdl+1 ∼dl+s2 on average, similar to (29). Combining (27)(28e)(29f)(33e), we have   2s2 + s1 + 1 2 (s1 + s2 )F ≤lT log(2πe(c · P + 1)) + (NT − l)s2 µT F + s1 + s2 µ R F 2   2s2 + s1 2 (34) (s1 − 1) + s2 (1 − NT µT )+ F + F εF + T ǫP log P. − 2 24 Dividing F on both sides of (34) and letting F → ∞ and P → ∞, we have T log P τ = lim lim P →∞ F →∞ F    1 2s2 + s1 + 1 2 ≥ (s1 + s2 ) − (NT − l)s2 µT − · s1 + s2 µ R l 2    2s2 + s1 2 + + . (s1 − 1) + s2 (1 − NT µT ) 2 (35) By optimizing the bound in (35) over all possible choices of s1 = 0, 1, . . . , l, s2 = 0, 1, . . . , NR −l, and l = 1, 2, · · · , min{NT , NR }, (11) is proved. VIII. C ONCLUSIONS In this paper, we have characterized the normalized delivery time for a general NT × NR interference network where both the transmitter and receiver sides are equipped with caches. We have obtained both the achievable upper bound and the theoretical lower bound of the minimum NDT for any NT ≥ 2, any NR ≥ 2, and any normalized cache size tuple (µR , µT ) in the feasible region. The achievable bound is expressed as the optimal solution of a linear programming problem which can be solved efficiently. The closed-form expressions for the 2 × 2 and 3 × 3 networks show that it is a piece-wise linearly decreasing function of the normalized cache sizes. The achievable NDT is exactly optimal in a number of special cases and is within a bounded multiplicative gap to the lower bound in general cases. In specific, the gap is a constant in most R −1 cases, and is bounded by NT +N in the case when µT < 1/NT (the accumulated cache size NT at all transmitters is not enough to cache the entire file library) and NT < NR . The proposed cache placement strategy involves generic file splitting with adjustable ratios. The proposed delivery strategy transforms the interference network into a new class of cooperative X-multicast channels. We derived the achievable DoF of this new channel via interference neutralization and interference alignment techniques. Our analysis shows that the proposed caching method can leverage receiver local caching gain, coded multicasting gain, and transmitter cooperation gain opportunistically. Analysis also shows that the optimal file splitting ratios are not unique. 25 A PPENDIX A: P ROOF OF L EMMA 1 Consider the × cooperative X-multicast channel defined in Section V-A. There  NT  NR are r+1 t messages in total. We denote message WR,T as the message desired by receiver multicast group R with |R| = r + 1 and cached at transmitter cooperation group T with |T | = t. For example, W[r+1],[t] is desired by receivers {1, 2, . . . , r + 1}, and available at transmitters {1, 2, . . . , t}. We divide the proof of Lemma 1 into three parts as follows, according to the relationship between NR and r + t. NT t   NR r+1 A. r + t ≥ NR  NT   NR messages into NtT groups, such that the messages In this case, we divide the total r+1 t in the same group are available at the same transmitter cooperation group. Each receiver desires NR −1 NR messages in each group. We then deliver each message group messages out of the r+1 r sequentially in a time division manner. Here, we take the group associated with transmitter cooperation set T = {1, 2, . . . , t} as an example to illustrate the achievable transmission scheme. All the other transmitter sets can use the same method. Denote xR,T as the transmitted symbol encoded from message WR,T . Each xR,T is wanted by the receiver set R and unwanted by the receiver set R̄ = [NR ] \ R. Note that each transmitted symbol can be cancelled at min{NR − r − 1, t − 1} undesired receivers by interference neutralization among the t cooperating transmitters in T . Since r + t ≥ NR , we only let NR − r (≤ t) transmitters in T cooperatively transmit the symbol xR,T , and deactivate the rest t + r − NR transmitters. In this case, each symbol can still be neutralized at all the NR − r − 1 undesired receivers. Without loss of generality, transmitters {1, 2, . . . , NR − r} are selected for cooperative transmission.   NR We use a ρ , NRr−1 -symbol extension to transmit the r+1 messages in this group. Note that ρ is also the total number of messages desired by each receiver. In each time slot u ∈ [ρ], the received signal at an arbitrary receiver q ∈ [NR ], denoted as yq (u), is given by (neglecting the noise) yq (u) = NX R −r hqp (u) p=1 = X vR,T ,p (u)xR,T R:|R|=r+1 | R:|R|=r+1,R∋q | X {z NR ) terms (r+1 "N −r R X } # hqp (u)vR,T ,p (u) xR,T + p=1 {z wanted X R:|R|=r+1,R6∋q } | "N −r R X # hqp (u)vR,T ,p (u) xR,T p=1 {z unwanted } (36) where hqp (u) is the channel realization, and vR,T ,p (u) is the precoder of symbol xR,T at transmitter p. For each undesired receiver q ∈ R̄ of symbol xR,T , to apply interference neutralization, we need NX R −r p=1 hqp (u)vR,T ,p (u) = 0, ∀q ∈ R̄, ∀u ∈ [ρ]. (37) We now design the precoders {vR,T ,p (u)} to meet (37). Consider the symbol xR,T desired by an arbitrary receiver multicast group R = {R1 , R2 , . . . , Rr+1 }. The undesired receiver set of 26 xR,T is R̄ = {Rr+2 , . . . , RNR }. Here, (R1 , R2 , . . . , RNR ) represents an arbitrary permutation of receiver index (1, 2, . . . , NR ). Consider the following (NR − r) × (NR − r) matrix:   hRr+2,1 hRr+2 ,2 · · · hRr+2 ,NR −r hRr+3,1 hRr+3 ,2 · · · hRr+3 ,NR −r     , HR̄ ,  ··· ··· ··· ··· (38)    hRN ,1 hRN ,2 · · · hRN ,NR −r  R R R a1 a2 ··· aNR −r for any {a1 , a2 , . . . , aNR −r }. Define cp as the cofactor of ap such that the determinant of HR̄ can be expressed as NX R −r ap cp = det(HR̄ ). (39) p=1 Then, we design vR,T ,p (u) as vR,T ,p (u) = cp (u) by taking channel realization {hqp (u)} into (38) and (39). By such construction, the condition in (37) is satisfied. For example, at receiver Rr+2 , we have NX R −r hRr+2 ,p (u)vR,T ,p (u) p=1 = NX R −r hRr+2 ,p (u)cp (u) p=1 hRr+2 ,1 (u) hRr+3 ,1 (u) ··· = hRNR ,1 (u) hRr+2 ,1 (u) hRr+2,2 (u) hRr+3,2 (u) ··· hRNR ,2 (u) hRr+2,2 (u) ··· ··· ··· ··· ··· hRr+2 ,NR −r (u) hRr+3 ,NR −r (u) ··· = 0. hRNR ,NR −r (u) hRr+2 ,NR −r (u) After interference neutralization, the received signal in (36) can be rewritten as X yq (u) = h̃R̄ q,T (u)xR,T , (40) (41) R:|R|=r+1,R∋q where hRr+2 ,1 (u) hRr+2 ,2 (u) NX hRr+3 ,1 (u) hRr+3 ,2 (u) R −r R̄ ··· ··· h̃q,T (u) , hq,p (u)vR,T ,p (u) = hRNR ,1 (u) hRNR ,2 (u) p=1 hq,1 (u) hq,2 (u) · · · hRr+2 ,NR −r (u) · · · hRr+3 ,NR −r (u) ··· ··· . · · · hRNR ,NR −r (u) · · · hq,NR −r (u) (42) To successfully decode the ρ desired messages of receiver q, we need to assure that the following ρ × ρ received signal matrix is full-rank with probability 1:   R̄ρ R̄2 1 (1) h̃R̄ (1) h̃ (1) · · · h̃ q,T q,T q,T   R̄1 R̄ρ R̄2 h̃q,T (2) h̃q,T (2) · · · h̃q,T (2) (43) ,   ··· ··· ··· ···  R̄ρ R̄2 1 h̃R̄ q,T (ρ) h̃q,T (ρ) · · · h̃q,T (ρ) 27  where {R̄1 , R̄2 , . . . , R̄ρ } denotes the undesired receiver sets of the NRr−1 messages intended for receiver q. Given that the construction method of {vR,T ,p (u)} and the formation of {h̃R̄ q,T (u)} are the same at each time slot u as in (38), (39) and (42), using [29, Lemma 3], we only need R̄ρ R̄2 1 to prove the linear independence of polynomials {h̃R̄ q,T , h̃q,T , . . . , h̃q,T } as functions of {hqp }. R̄ Since h̃R̄ q,T is the determinant of the matrix (42) and each h̃q,T has a unique undesired receiver R̄ ρ R̄2 1 set R̄, it is easy to see that polynomials {h̃R̄ q,T , h̃q,T , . . . , h̃q,T } are linearly independent. Using [29, Lemma 3], we assure that the received signal matrix 1.  (43) is full-rank with probability  Therefore, receiver q can successfully decode its NRr−1 desired messages in NRr−1 time slots. Similar arguments can be applied to other receivers. Therefore, a per-user DoF of 1 is achieved. B. r + t = NR − 1 Next, let us consider the case when r + t = NR − 1. Since each message can only be canceled at t−1 undesired receivers by interference neutralization while there are NR −r−1 = t undesired receivers in total, each message will still cause interference to one undesired receiver. In this case, asymptotic interference alignment is further applied. To be specific, let each message WR,T be NR −1 NT encoded into a tN ( r+1 )( t ) ×1 symbol vector xR,T = ((x1R,T )T , (x2R,T )T , . . . , (xtR,T )T )T , where NR −1 NR −1 NT NT N ∈ Z+ , and xiR,T (i ∈ [t]) is an N ( r+1 )( t ) ×1 vector. We use an S , S0 +(N +1)( r+1 )( t )   NR −1 NT symbol extension, where S0 , NRr−1 NtT tN ( r+1 )( t ) . Note that S0 is also the total number of symbols desired by each receiver. Unlike  NTthe  previous method in Case A which used message NR grouping, here, we transmit all the r+1 t messages together. In each time slot u ∈ [S], the received signal at an arbitrary receiver q ∈ [NR ], denoted as yq (u), is given by (neglecting the noise) " # t X X X X  T i yq (u) = hqp (u) vR,T xiR,T , (44) ,p (u) R:|R|=r+1 T :|T |=t i=1 p∈T R −1)(NT ) i (Nr+1 t × 1 precoding vector where hqp (u) is the channel realization, and vR,T ,p (u) is the N i of symbol vector xR,T at transmitter p. We first elaborate the interference neutralization strategy. Consider an arbitrary symbol vector i xR,T desired by receiver multicast group R = {R1 , R2 , . . . , Rr+1 }, transmitted by transmitter cooperation group T = {T1 , T2 , . . . , Tt }, and whose undesired receiver set is R̄ = [NR ] \ R = {R̄1 , R̄2 , . . . , R̄t }. We assume that xiR,T will be neutralized at receiver set R̄i , R̄ \ {R̄i }. Then, the precoder must satisfy X R −1)(NT ) i (Nr+1 t ], ∀u ∈ [S] (45) hqp (u)vR,T ,p,n (u) = 0, ∀q ∈ R̄i , ∀n ∈ [N p∈T i i where vR,T ,p,n (u) is the n-th element of vR,T ,p (u). Consider the following t × t matrix:   hR̄1 ,T2 · · · hR̄1 ,Tt hR̄1 ,T1  hR̄2 ,T1 hR̄2 ,T2 · · · hR̄2 ,Tt    ··· ··· ···   ···   hR̄i−1 ,T1 hR̄i−1 ,T2 · · · hR̄i−1 ,Tt   , HR̄i ,T ,  hR̄i+1 ,T1 hR̄i+1 ,T2 · · · hR̄i+1 ,Tt    ··· ··· ···   ··· h hR̄t ,T2 · · · hR̄t ,Tt  R̄t ,T1 a1 a2 ··· at (46) 28 for any {a1 , a2 , . . . , at }. Define cp as the cofactor of ap such that t X ap cp = det(HR̄i ,T ). (47) p=1 i We then design vR,T ,p,n (u) as R̄i R̄i i vR,T ,p,n (u) = αR,T (u)cp (u)zR,T ,n (u), (48) R̄i where αR,T (u) is chosen i.i.d. from a continuous distribution for all {R, T , R̄i , u}, cp (u) is R̄i the cofactor cp by taking channel realization {hqp (u)} into (46) and (47), and zR,T ,n (u) will be determined later. By such construction, the condition in (45) is satisfied. For example, at receiver R̄1 , we have X R̄i R̄i (u)cp (u)zR,T hR̄1 ,p (u)αR,T ,n (u) p∈T R̄i R̄i = αR,T (u)zR,T ,n (u) X hR̄1 ,p (u)cp (u) p∈T hR̄1 ,T2 (u) hR̄1 ,T1 (u) hR̄2 ,T2 (u) hR̄2 ,T1 (u) ··· ··· hR̄i−1 ,T1 (u) hR̄i−1 ,T2 (u) R̄i R̄i = αR,T (u)zR,T ,n (u) · h R̄i+1 ,T1 (u) hR̄i+1 ,T2 (u) ··· ··· hR̄t ,T2 (u) hR̄t ,T1 (u) hR̄1 ,T2 (u) hR̄1 ,T1 (u) =0 · · · hR̄1 ,Tt (u) · · · hR̄2 ,Tt (u) ··· ··· · · · hR̄i−1 ,Tt (u) · · · hR̄i+1 ,Tt (u) ··· ··· · · · hR̄t ,Tt (u) · · · hR̄1 ,Tt (u) (49) By the above construction of precoders, it can be seen that symbol vectors xiR,T unwanted by receiver q ∈ R̄i are all neutralized. Then, the received signal in (44) at an arbitrary receiver q ∈ [NR ] can be rewritten as " # t X X X X  T i yq (u) = hqp (u) vR,T xiR,T ,p (u) R:|R|=r+1,R∋q T :|T |=t i=1 + X p∈T " X X T :|T |=t R̄i ,R: |R|=r+1,R∪R̄i 6∋q p∈T i hqp (u) vR,T ,p (u) T # xiR,T , (50) where the first term is the desired messages of receiver q and the second term is the residual interferences. Now, we aim to apply asymptotic interference alignment to align the interference term in (50) at the same sub-space. Consider the following monomial set:         Y h isiR,T R̄i R̄i i αR,T h̃q,T : 1 ≤ sR,T ≤ N , (51) Mq [N] =       R,R̄i ,T : R∪R̄i 6∋q 29 i where h̃R̄ q,T is defined as i h̃R̄ q,T hR̄1 ,T2 hR̄1 ,T1 hR̄2 ,T2 hR̄2 ,T1 ··· ··· Tt X hR̄i−1 ,T1 hR̄i−1 ,T2 hq,p cp = , hR̄i+1 ,T1 hR̄i+1 ,T2 p=T1 ··· ··· hR̄t ,T2 hR̄t ,T1 hq,T1 hq,T2 · · · hR̄1 ,Tt · · · hR̄2 ,Tt ··· ··· · · · hR̄i−1 ,Tt . · · · hR̄i+1 ,Tt ··· ··· · · · hR̄t ,Tt · · · hq,Tt (52) NR −1 NT i i The cardinality of Mq [N] is N ( r+1 )( t ) . For each element vR,T ,p,n (u) in vR,T ,p (u) satisfying R̄i R̄i R ∪ R̄i 6∋ q, the element zR,T ,n (u) in (48) is given by a unique monomial mR,T ,n (u) in R̄i Mq [N] by taking {hqp (u)} and {αR,T (u)} into (51). Then it can P be seen that for elements i i i vR,T ,p,n (u) in vR,T ,p (u) satisfying R ∪ R̄i 6∋ q, the summation p∈T hqp (u)vR,T ,p,n (u) is R̄i R̄i i αR,T (u)h̃R̄ q,T (u)mR,T ,n (u) and satisfies R̄i R̄i i αR,T (u)h̃R̄ q,T (u)mR,T ,n (u) ∈ Mq [N + 1](u), Therefore, the interferences at receiver q are aligned together. The received signal in (50) can be rewritten as " # t X X X X  T i yq (u) = hqp (u) vR,T xiR,T + ,p (u) R:|R|=r+1,R∋q T :|T |=t i=1 p∈T X m(u)xm(u) , m(u)∈Mq [N +1](u) (53) where xm(u) is the sum of interference   symbols whose received factor is m(u) at receiver q. To successfully decode the NRr−1 NtT desired messages of receiver q, we need to assure that the S × S received signal matrix whose column vectors are   S NR −1 NT R̄i R̄i R̄i ) ( )( αR,T (u)h̃q,T (u)mR,T ,n (u) : |R| = r + 1, R ∋ q, |T | = t, i ∈ [t], n ∈ [N r+1 t ] u=1 o n (54) ∪ (m(u))Su=1 : m(u) ∈ Mq [N + 1](u) is full-rank with probability 1. R̄i R̄i R̄i i Since the construction method of {vR,T ,p (u)} and the formation of {αR,T (u)h̃q,T (u)mR,T ,n (u)} and {m(u)} are the same at each time slot u, based on [29, Lemma 3], we only need to prove R̄i the linear independence of these polynomials as functions of {hqp } and {αR,T }, which is given by o n NR −1 NT R̄i R̄i R̄i ) ( )( t r+1 αR,T h̃q,T mR,T ,n : R ∋ q, |R| = r + 1, |T | = t, i ∈ [t], n ∈ [N ∪ {m : m ∈ Mq [N + 1]}. R̄i It can be seen that {αR,T : R ∪ R̄i 6∋ q ′ , ∀T } only exist in the polynomials whose transmitted symbols are the interference of receiver q ′ . Thus, polynomials with different q ′ are linearly independent. Next, let us consider the polynomials of desired symbols of receiver q corresponding to the same q ′ . The polynomials are given in the following set: o n R̄i R̄i R̄i ′ i ′ [N], ∀T . (55) h̃R̄ m : R ∋ q, R ∪ R̄ ∋ 6 q , m ∈ M αR,T i q q,T R,T ,n R,T ,n 30 R̄i Partition the set (55) into subsets according to different powers of factors {αR,T : R ∪ R̄i 6∋ q ′ }. Since polynomials in different subsets are linearly independent due to different powers of factors α, we only need to prove the linear independence within each subset. Consider an arbitrary subset with the following form:         αR̄0 h̃R̄0 isiR,T h Y R0 ,T0 q,T0 R̄i R̄i ′ : R0 ∋ q, R0 ∪ R̄0 6∋ q , ∀T0 , (56) αR,T h̃q′ ,T R̄0 R̄0       αR0 ,T0 h̃q′ ,T0 R,R̄i ,T : R∪R̄i 6∋q ′ R̄i where the power of αR,T is siR,T . To prove the linear independence of polynomials in (56), it is equivalent to prove the linear independence of functions in ( R̄ ) h̃q,T00 : R̄0 6∋ q, R0 ∪ R̄0 6∋ q ′ , ∀T0 . (57) 0 h̃R̄ q ′ ,T0 Assume there exist some factors kTR̄00 such that X kTR̄00 R0 ,R̄0 ,T0 : R̄0 6∋q,R0 ∪R̄0 6∋q ′ 0 h̃R̄ q,T0 0 h̃qR̄′ ,T 0 ≡ 0. (58) Pt R̄0 R̄0 0 Note that h̃R̄ q,T0 = p=1 hq,Tp CTp (h̃q,T0 ), where Tp ∈ T0 and CTp (h̃q,T0 ) is the cofactor of hq,Tp in (52) for p = 1, 2, . . . , t. We can rewrite (58) as Pt R̄0 X X h̃R̄0 p=1 hq,Tp CTp (h̃q,T0 ) R̄0 R̄0 q,T0 k T0 kT0 R̄ = 0 0 h̃ h̃R̄ ′ q ,T0 q ′ ,T0 R0 ,R̄0 ,T0 : R0 ,R̄0 ,T0 : R̄0 6∋q,R0 ∪R̄0 6∋q ′ R̄0 6∋q,R0 ∪R̄0 6∋q ′ = NT X X hq,p p=1 kTR̄00 R0 ,R̄0 ,T0 : R̄0 6∋q,R0 ∪R̄0 6∋q ′ ,T0 ∋p 0 Cp (h̃R̄ q,T0 ) 0 h̃R̄ q ′ ,T0 . (59) Since hq,p is independent for different transmitter p, (59) implies that X kTR̄00 R0 ,R̄0 ,T0 : R̄0 6∋q,R0 ∪R̄0 6∋q ′ ,T0 ∋p 0 Cp (h̃R̄ q,T0 ) 0 h̃qR̄′ ,T 0 ≡ 0, (60) for each transmitter p. We can rewrite (60) as X R0 ,R̄0 ,T0 : R̄0 6∋q,R0 ∪R̄0 6∋q ′ ,T0 ∋p,T0 ∋p1 kTR̄00 0 Cp (h̃R̄ q,T0 ) 0 h̃qR̄′ ,T 0 ≡− X R0 ,R̄0 ,T0 : R̄0 6∋q,R0 ∪R̄0 6∋q ′ ,T0 ∋p,T0 6∋p1 kTR̄00 0 Cp (h̃R̄ q,T0 ) 0 h̃R̄ q ′ ,T0 , (61) for an arbitrary transmitter p1 6= p. Since {h1,p1 , h2,p1 , . . . , hNR ,p1 } \ {hq,p1 } only appear on the left side of (61), it is easy to see that (61) holds only when both sides equal zero. Therefore, the summation of functions on the left side of (61) equals zero. The same arguments can be applied on these functions again, and we can find that the summation of functions satisfying {R̄0 6∋ q, R0 ∪ R̄ 6∋ q ′ , T0 ⊇ {p, p1 , p2 }} equals zero for an arbitrary transmitter p2 ∈ / {p, p1 }. 31 Iteratively, we can see that the summation of functions satisfying {R̄0 6∋ q, R0 ∪ R̄0 6∋ q ′ } equals zero for an arbitrary transmitter set T , i.e., X kTR̄0 0 Cp (h̃R̄ q,T ) R0 ,R̄0 : R̄0 6∋q,R0 ∪R̄0 6∋q ′ 0 h̃R̄ q ′ ,T ≡ 0. (62) Similar to the derivation of (61) and (62), based on (62), we can find that the summation of functions equals zero for an arbitrary transmitter set T and an arbitrary R̄i , s.t. q ∈ / R̄i , q ′ ∈ / R ∪ R̄i . The detailed proof is omitted here. This implies that kTR̄i R̄ Cp (h̃q,Ti ) R̄ i h̃q′ ,T ≡ 0, and thus kTR̄i = 0. Therefore, we proved the linear independence of functions in (57), and the linear independence of polynomials in (55). Now we consider the polynomials of interference symbols in Mq [N + 1]. Given the construction of monomial set (51), it is easy to see that the polynomials of interference symbols are linearly independent with each other and with the polynomials of the desired signals. Therefore, we finished the proof of linear independence of the polynomials of received symbols at receiver q. Similarly, the polynomials of received symbols at other receivers are also linearly independent. Therefore, the received signal matrix of each receiver is full-rank with probability 1 using [29, Lemma 3], and each receiver can decode its desired signals successfully. Since each receiver   NT NR −1 can decode NRr−1 NtT tN ( r+1 )( t ) symbols in S time slots, a per-user DoF of  (NR −1)(NT )  NR −1 NT tN r+1 t t r d=   NR −1 NR −1 NT NT NR −1 NT tN ( r+1 )( t ) + (N + 1)( r+1 )( t ) r t is achieved. Letting N → ∞, the per-user DoF of NT NR −1 t t r NT NR −1 t+1 t r ( ( )( ) )( ) is achieved. C. r + t ≤ NR − 2 Now, we consider the case when r+t ≤ NR −2. There are two methods to deliver the messages. The firstone is similar to the one used when r + t ≥ NR . We first split each message WR,T into NR −r−1 submessages, each associated with a unique receiver set R ∪ {Rr+2 , Rr+3 . . . . , Rr+t }, t−1 where R is the desired receiver set and {Rr+2 , Rr+3 . . . . , Rr+t } is a set of arbitrary t − 1 NR receivers from the rest NR − r − 1 undesired receivers. There are r+t different receiver sets   r+t NT in total, each having r+1 t submessages. In the delivery phase, submessages with different receiver sets are delivered individually in a time division manner, and submessages with a same receiver  are delivered together. Through this approach, we can see that the transmitters send  set r+t NT submessages each time and each receiver in the corresponding receiver set of these t r+1  NT  submessages, while the rest NR − r − t receivers do not submessages desires r+t−1 t r  desire  NT r+t any submessage of them. Therefore, we can regard the network each time as a t × r+1 cooperative X-multicast network achievable DoF is 1 in Case A. Note that each  whose per-user  NR −1 NR receiver only exists in r+t−1 of the r+t receiver sets in total. Thus, the per-user DoF of  NR  r+t NR −1 / r+t = NR is achieved by this method. r+t−1 The second method is similar to the one in Case B, i.e. interference neutralization is used to neutralize each message at undesired receivers, and then the rest interferences are aligned together by asymptotic interference alignment. 32 We first consider the case when t < NT . The delivery scheme when t = NT is slightly different, and will be presented later. When t < NT , each message WR,T is encoded into a NR −r−1 tN (NR −r−t)(NT −t+1) × 1 symbol vector t−1 xR,T = ((x1R,T )T , (x2R,T )T , . . . , (x̺R,T )T )T ,  −r−1 where ̺ , NRt−1 , N ∈ Z+ , and xiR,T (i ∈ [̺]) is a tN (NR −r−t)(NT −t+1) × 1 vector. We  NR −r−2 NT  R −1 (N + 1)(NR −r−t)(NT −t+1) -symbol extension here, where use S , S0 + Nr+1 t−1 t−1    −r−1 S0 , NRr−1 NtT NRt−1 tN (NR −r−t)(NT −t+1) . Note that S0 is also the total number of symbols desired by each receiver. In each time slot u, the received signal at an arbitrary receiver q ∈ [NR ], denoted as yq (u), is " # ̺ X X X X  T i hqp (u) vR,T yq (u) = xiR,T , (63) ,p (u) R:|R|=r+1 T :|T |=t i=1 p∈T i (NR −r−t)(NT −t+1) where hqp (u) is the channel realization, and vR,T × 1 precoding ,p (u) is the tN i vector of symbol vector xR,T at transmitter p. To apply interference neutralization, we consider an arbitrary symbol vector xiR,T desired by receiver multicast group R = {R1 , R2 , . . . , Rr+1 }, transmitted by transmitter cooperation group T = {T1 , T2 , . . . , Tt } , and whose undesired receiver set is R̄ = [NR ]\R = {R̄1 , R̄2 , . . . , R̄NR −r−1 }. We assume that each xiR,T will be neutralized at a distinct receiver set R̄i ⊂ R̄ with |R̄i | = t−1. Consider an arbitrary xiR,T with R̄i = {R̄i,1 , R̄i,2 , . . . , R̄i,t−1 }. Then, the precoder must satisfy X i (NR −r−t)(NT −t+1) hqp (u)vR,T ], ∀u ∈ [S], (64) ,p,n (u) = 0, ∀q ∈ R̄i , ∀n ∈ [tN p∈T i i where vR,T ,p,n (u) is the n-th element of vR,T ,p (u). Consider the following matrix:   hR̄i,1 ,T2 · · · hR̄i,1 ,Tt hR̄i,1 ,T1  hR̄ ,T hR̄i,2 ,T2 · · · hR̄i,2 ,Tt   i,2 1   ··· ··· ··· ···    , HR̄i ,T , hR̄i,t−1 ,T1 hR̄i,t−1 ,T2 · · · hR̄i,t−1 ,Tt  a1 a2 ··· at (65) for any {a1 , a2 , . . . , at }. Define cp as the cofactor of ap such that t X ap cp = det(HR̄i ,T ). (66) p=1 i We then design vR,T ,p,n (u) as R̃i R̄i i vR,T ,p,n (u) = αR,T (u)cp (u)zR,T ,n (u), (67) R̃i where αR,T (u) is chosen i.i.d. from a continuous distribution for all {R, T , R̄i , u}, cp (u) is R̄i the cofactor cp by taking channel realization {hqp (u)} into (65) and (66), and zR,T ,n (u) will be 33 determined later. By such construction, the condition in (64) is satisfied. For example, at receiver R̄i,1 , we have X R̄i R̄i (u)cp (u)zR,T hR̄i,1 ,p (u)αR,T ,n (u) p∈T R̄i R̄i = αR,T (u)zR,T ,n (u) X hR̄i,1 ,p (u)cp (u) p∈T hR̄i,1 ,T2 (u) hR̄i,1 ,T1 (u) hR̄i,2 ,T2 (u) hR̄i,2 ,T1 (u) R̄i R̄i ··· ··· = αR,T (u)zR,T ,n (u) · hR̄i,t−1 ,T1 (u) hR̄i,t−1 ,T2 (u) hR̄i,1 ,T2 (u) hR̄i,1 ,T1 (u) = 0. · · · hR̄i,1 ,Tt (u) · · · hR̄i,2 ,Tt (u) ··· ··· · · · hR̄i,t−1 ,Tt (u) · · · hR̄i,1 ,Tt (u) (68) By the above construction of precoders, it can be seen that symbol vectors xiR,T unwanted by receiver q ∈ R̄i are all neutralized. Then, the received signal at an arbitrary receiver q ∈ [NR ] can be rewritten as " # ̺ X X X X  T i hqp (u) vR,T yq (u) = xiR,T ,p (u) R:|R|=r+1,R∋q T :|T |=t i=1 X + p∈T " X X T :|T |=t R̄i ,R: |R|=r+1,R∪R̄i 6∋q i hqp (u) vR,T ,p (u) p∈T T # xiR,T , (69) where the first term is the desired messages of receiver q and the second term is the residual interferences. Now, we aim to apply asymptotic interference alignment to align the interference term in (69) at the same sub-space. In specific, symbol vector xiR,T is aligned with other symbol vectors which have the same receiver multicast group R, neutralized at the same receiver set R̄i , and only differ from one transmitter at transmitter cooperation set T . For an arbitrary xiR,T , consider the following monomial sets:       isi,q h Y R,{p}∪T c i,q R̄i R̄i R̄i : 1 ≤ sR,{p}∪T c ≤ N , (70) MR,T c [N] = αR,{p}∪T c h̃q,{p}∪T c     p,q: p∈T / c ,q ∈R∪ / R̄i i where T c ⊂ T , |T c | = t − 1 and h̃R̄ q,T is defined as i h̃R̄ q,T hR̄i,1 ,T2 hR̄i,1 ,T1 hR̄i,2 ,T2 hR̄i,2 ,T1 hq,p cp = , ··· ··· hR̄i,t−1 ,T1 hR̄i,t−1 ,T2 p=T1 hq,T1 hq,T2 Tt X · · · hR̄i,1 ,Tt · · · hR̄i,2 ,Tt . ··· ··· · · · hR̄i,t−1 ,Tt ··· hq,Tt (71) There are t different monomial sets for symbol vector xiR,T , each with cardinality N (NR −r−t)(NT −t+1) . R̄i c i i ⊂ T , |T c | = t − 1}. For each element vR,T Define MR̄ ,p,n (u) R,T [N] = {MR,T c [N] : T R̄ R̄ i i i in vR,T ,p (u) , the element zR,T ,n (u) in (67) is given by a unique monomial mR,T ,n (u) in 34 R̄i i MR̄ R,T [N] by taking {hqp (u)} and {αR,T (u)} into (70). By such construction, the summation P R̄i R̄i i i i / R ∪ R̄i is αR,T (u)h̃R̄ q,T (u)mR,T ,n (u) and satisfies p∈T hqp (u)vR,T ,p,n (u) for xR,T such that q ∈ R̄i R̄i R̄i i αR,T (u)h̃R̄ q,T (u)mR,T ,n (u) ∈ MR,T [N + 1] (u), R̄i i i In specific, denote mR̄ R,T c ,n (u) as the monomial selected by vR,T ,p,n (u) in an arbitrary MR,T c [N] (u), where T c ⊂ T . We have R̄i R̄i R̄i i αR,T (u)h̃R̄ q,T (u)mR,T c ,n (u) ∈ MR,T c [N + 1] (u), which means that the symbols intended for the same receiver multicast group R, neutralized R̄i at the same receiver set R̄i , with its precoder zR,T ,n constructed from the same monomial set R̄i MR,T c [N] are aligned in the same subspace with dimension (N + 1)(NR −r−t)(NT −t+1) . By the design of both interference neutralization and interference alignment, the received signal at receiver q is given by " # ̺ X X X X  T i yq (u) = hqp (u) vR,T xiR,T ,p (u) R:|R|=r+1,R∋q T :|T |=t i=1 + X T :|T |=t R̄i ,R: |R|=r+1,R∪R̄i 6∋q X = + X i hqp (u) vR,T ,p (u) p∈T " ̺ X X X R:|R|=r+1,R∋q T :|T |=t i=1 X p∈T " X X p∈T hqp (u) T T i vR,T ,p (u) X # xiR,T # xiR,T m(u)xm(u) , (72) T c :|T c |=t−1 m(u)∈MR̄i [N +1](u) R̄i ,R: R,T c |R|=r+1,R∪R̄i 6∋q where xm(u) is the sum of interference   symbols whose received factor is m(u) at receiver q. To successfully decode the NRr−1 NtT desired messages of receiver q, we need to assure that the S × S received signal matrix whose column vectors are  S R̄i R̄i R̄i : |R| = r + 1, αR,T (u)h̃q,T (u)mR,T ,n (u) u=1 o R ∋ q, |T | = t, i ∈ [̺], n ∈ [tN (NR −r−t)(NT −t+1) ] o n c i [N + 1] (u), R ∪ R̄ ∋ 6 q, |T | = t − 1 ∪ (m(u))Su=1 : m(u) ∈ MR̄ c i R,T i is full-rank with probability 1. Since the construction method of {vR,T ,p (u)} and the formation R̄i R̄i R̄i of {αR,T (u)h̃q,T (u)mR,T ,n (u)} and {m(u)} are the same at each time slot u, based on [29, Lemma 3], we only need to prove the linear independence of these polynomial functions, which is given by o n R̄i R̄i R̄i (NR −r−t)(NT −t+1) ] αR,T h̃q,T mR,T ,n : R ∋ q, |R| = r + 1, |T | = t, i ∈ [̺], n ∈ [tN o n R̄i R̄i c i ∪ mR̄ R,T c ,n : mR,T c ,n ∈ MR,T c [N + 1] , R ∪ R̄i 6∋ q, |T | = t − 1 . 35 First, we can see that polynomials corresponding to different R and R̄i are linearly independent o n R̄i because they have different factors αR,T . Then, we only need to consider polynomials corresponding to the same R and R̄i . Let us first consider polynomials of desired symbols corresponding to an arbitrary R and R̄i (R ∋ q), i.e. o [ n R̄i R̄i R̄i R̄i R̄i αR,T h̃q,T mR,T ,n : mR,T ,n ∈ MR,T [N] T :|T |=t = [ T :|T |=t = [ [ T c: T c ⊂T ,|T c |=t−1 T c :|T c |=t−1 n R̄i αR,T i h̃R̄ q,T i mR̄ R,T c ,n : i mR̄ R,T c ,n ∈ i MR̄ R,T c [N] o o n R̄i R̄i R̄i R̄i R̄ c / T , mR,T c ,n ∈ MR,T c [N] . αR,T c ∪{p} h̃q,T c ∪{p} mR,T c ,n : p ∈ (73) Partitioning these polynomials into subsets w.r.t. T c as in (73), it can be seen that polynomiR̄i R̄i R̄i c are linearly independent. This is because the als {αR,T c ∪{p} h̃q,T c ∪{p} mR,T c ,n } for different T n o R̄i c c polynomials for each T have a unique factor set αR,T c ∪{p} : p ∈ /T . Then, we only need to consider the linear independence of polynomials with the same R, R̄i and T c (R ∋ q): o n R̄i R̄i R̄i R̄i R̄i c [N] . (74) m : p ∈ / T , m ∈ M h̃ αR,T c ∪{p} q,T c ∪{p} R,T c ,n R,T c ,n R,T c Note that hqp only exists in polynomials whose symbols are transmitted by T c ∪ {p}, i.e. o n R̄i R̄i R̄i R̄i R̄i . (75) αR,T c ∪{p} h̃q,T c ∪{p} mR,T c ,n : mR,T c ,n ∈ MR,T c [N] R̄i R̄i R̄i Therefore, it can be seen that polynomials {αR,T c ∪{p} h̃q,T c ∪{p} mR,T ,n } are linearly independent for different p. This implies that we only need to prove the linear independence of polynomials for the same R, R̄i , T c and p (R ∋ q), which is equivalent to prove the linear R̄i R̄i i independence of polynomials in MR̄ R,T c [N] in (70). Given that each αR,{p}∪T c h̃q,{p}∪T c in (70) has a unique channel coefficient hq,p , we can guarantee the Jacobian matrix of polynomials R̄i R̄i / R ∪ R̄i , p ∈ / T c } are full row rank. Using [30, Theorem 3] in Page {αR,{p}∪T c h̃q,{p}∪T c : q ∈ 135 and [29, Lemma 1], it can be seen that these polynomials are algebraically independent. i Thus, polynomials in MR̄ R,T c [N] are linearly independent, and we finished the proof of linear independence of polynomials whose symbols are desired by receiver q. We can directly apply the arguments above to the polynomials corresponding to the interference, and show that these polynomials are also linearly independent. Therefore, we finished the proof of linear independence of the polynomials of received symbols at receiver q. Similarly, the polynomials of received symbols at other receivers are also linearly independent. Therefore, the received signal matrix at each receiver is full rank with probability 1 using [29, Lemma 3], and each receiver can decode its desired signals   successfully.  (N −r−t)(N −t+1) NR −1 NT NR −r−1 T Since each receiver can decode tN R symbols in S =   NR −r−1 (N −r−t)(N −t+1)r NRt−1 Nt−1   −r−2 N NR −1 NT (NR −r−t)(NT −t+1) R T R T (N +1) -symbol tN + r+1 t−1 t t−1 t−1 r extension, a per-user DoF of  NR −r−1 (N −r−t)(N −t+1)  NR −1 NT T tN R t t−1 r d= S 36 is achieved. Letting N → ∞, the per-user DoF of   NR −1 NT d= NR −1 r  NT t  r t NR −r−1 t t−1 +  NR −r−1 t t−1    NR −1 NR −r−2 NT t−1 r+1 t−1 (76) is achieved. Next, we consider the case when t = NT where interference alignment is not applied. Each message WR,[NT ] is encoded into a NNRT−r−1 × 1 symbol vector −1 xR,[NT ] = (x1R,[NT ] , x2R,[NT ] , . . . , xρR,[NT ] )T     NR −r−2 R −1 where ρ , NNRT−r−1 . A symbol extension of S = NRr−1 NNRT−r−1 + Nr+1 is used −1 −1 NT −1 here. In each time slot u, the received signal at an arbitrary receiver q ∈ [NR ], denoted by yq (u), is given by   ρ X X X i  yq (u) = hqp (u)vR,[N (u) xiR,[NT ] (77) T ],p R:|R|=r+1 i=1 p∈[NT ] i where hqp (u) is the channel realization, and vR,[N (u) is the precoder of symbol xiR,[NT ] at T ],p transmitter p. To apply interference neutralization, we consider an arbitrary symbol xiR,[NT ] desired by receiver multicast group R = {R1 , R2 , . . . , Rr+1 }, and whose undesired receiver set is R̄ = {R̄1 , R̄2 , . . . , R̄NR −r−1 }. We assume that xiR,[NT ] will be neutralized at a distinct receiver set R̄i ⊂ R̄ with |R̄i | = NT − 1. Consider an arbitrary xiR,[NT ] with R̄i = {R̄i,1 , R̄i,2 , . . . , R̄i,NT −1 }. We must have X i hqp (u)vR,[N (u) = 0, ∀q ∈ R̄i , ∀u ∈ [ρ] (78) T ],p p∈[NT ] Consider the following NT × NT matrix:  hR̄i,1 ,2 hR̄i,1 ,1  hR̄ ,1 h R̄i,2 ,2 i,2   ··· ···  hR̄i,N −1 ,1 hR̄i,N −1 ,2 T T a1 a2  ··· hR̄i,1 ,NT ··· hR̄i,2 ,NT    , HR̄ , ··· ··· i  · · · hR̄i,NT −1 ,NT  ··· aNT (79) for any {a1 , a2 , . . . , aNT }. Define cp as the cofactor of ap such that NT X ap cp = det(HR̄i ). (80) p=1 i We then design vR,[N (u) as T ],p R̄i i vR,[N (u) = αR,[N (u)cp (u), T ],p T] (81) 37 R̄i where αR,[N (u) is chosen i.i.d. from a continuous distribution for all {R, R̄i , u}, and cp (u) is T] the cofactor cp by taking channel realization {hqp (u)} into (79) and (80). By such construction, the condition in (78) is satisfied. For example, at receiver R̄i,1 , we have X R̄i (u)cp (u) hR̄i,1 ,p (u)αR,[N T] p∈[NT ] R̄i = αR,[N (u) T] X hR̄i,1 ,p (u)cp (u) p∈[NT ] hR̄i,1 ,2 (u) hR̄i,1 ,1 (u) hR̄i,2 ,2 (u) hR̄i,2 ,1 (u) R̄i ··· ··· = αR,[N (u) · T] hR̄i,NT −1 ,1 (u) hR̄i,NT −1 ,2 (u) hR̄i,1 ,2 (u) hR̄i,1 ,1 (u) = 0. ··· hR̄i,1 ,NT (u) ··· hR̄i,2 ,NT (u) ··· ··· · · · hR̄i,NT −1 ,NT (u) ··· hR̄i,1 ,NT (u) (82) By the above construction of precoders, it can be seen that symbol xiR,[NT ] unwanted by receiver q ∈ R̄i are all neutralized. Then, the received signal at receiver q can be rewritten as   ρ X X X i  hqp (u)vR,[N (u) xiR,[NT ] yq (u) = T ],p R:R∋q,|R|=r+1 i=1 + X R,R̄i :R∪R̄i 6∋q   p∈[NT ] X p∈[NT ]  i hqp (u)vR,[N (u) xiR,[NT ] , T ],p (83) where the first term is the desired messages and the second term is the interference. To guarantee the decodability of receiver q, we need to assure the following S × S received signal matrix whose column vectors are   S  X  i   hqp (u)vR,[NT ],p (u) : R ∋ q, |R| = r + 1, i ∈ [ρ]   p∈[NT ] u=1  S  X i ∪  hqp (u)vR,[N (u) T ],p  p∈[NT ] : R ∪ R̄i 6∋ q u=1    i to be full-rank with probability 1. Since the construction method of {vR,[N (u)} and the T ],p P i formation of { p∈[NT ] hqp (u)vR,[NT ],p (u)} are the same at each time slot u, based on [29, Lemma 3], we only need to prove the linear independence of these polynomial functions, which is given by ) ) ( ( NT NT X X R̄i R̄i . hqp cp ∪ αR,[NT ] hqp cp αR,[NT ] p=1 R,i:R∋q,|R|=r+1,i∈[ρ] p=1 R,R̄i :R∪R̄i 6∋q R̄i Since each polynomial has a unique factor αR,[N , it is obvious that these polynomials are T] linearly independent. Similarly, the polynomials of received symbols at other receivers are also 38 linearly independent. Therefore, the received signal matrix at each receiver is full rank with probability 1 using [29, Lemma 3], and can decode its desired Since  each receiver   signals  successfully.   NR −1 NR −r−1 NR −1 NR −r−1 NR −1 NR −r−2 each receiver can decode symbols in S = + r NT −1 r NT −1 r+1 NT −1 symbol extension, the per-user DoF of   NR −1 NR −r−1 d=  NR −1 r r  NR −r−1 NT −1 NT −1  NR −r−2 R −1 + Nr+1 NT −1 is achieved. Combining (76) and (84), we obtain the per-user DoF of   NR −r−1 NR −1 NT t r t t−1   d = NR −1 NT  NR −r−1 NR −r−2 R −1 t + Nr+1 t t−1 t−1 r (84) NT t−1  (85) for t ≤ NT . It can be seen that (85) is an increasing function of t when NR − NT − r − 1 < 0, and is a decreasing function of t when NR − NT − r − 1 > 0. Intuitively, the achievable per-user DoF should be a non-decreasing function of transmitter cooperation size t. Thus, to obtain a reasonable DoF, we introduce the following proposition.   NR Proposition 1. Any achievable DoF of the Nt′T × r+1 cooperative X-multicast channel can   NR NT be achieved in the t × r+1 cooperative X-multicast channel, where t′ < t.   NR NT cooperative X-multicast channel. Split each message Proof. Consider an arbitrary × t r+1  t WR,T into t′ submessages, each associated with a unique transmitter set T ′ ⊂ T with |T ′ | = t′ , and will be transmitted by transmitter set T ′ only. We denote submessages of WR,T delivered T′ by transmitter set T ′ as WR,T . Then, in the delivery phase for an arbitrary transmitter set T ′ , ′ each transmitter in T will generate and transmit a super-message desired by receiver set R: o n T′ :T ⊃T′ . ŴR,T ′ = WR,T T ′ (|T ′ | = t′ ) Through this approach, each super-message ŴR,T ′ is available at transmitter  set NT NR and desired by receiver set R. The network topology has changed to the t′ × r+1 cooperative   NR X-multicast channel. Therefore, any achievable DoF in the Nt′T × r+1 cooperative X-multicast   NT NR channel can be achieved in the original t × r+1 cooperative X-multicast channel. in the first method Based on Proposition 1, combining the achievable per-user DoF of r+t NR and (85) in the second method, we obtain the achievable per-user DoF when r + t ≤ NR − 2 as   r+t ′ d = max dr,t , , NR where d′r,t is given in Lemma 1. By combining the results in all three parts, Lemma 1 is proved. A PPENDIX B: O PTIMALITY (P ROOF OF C OROLLARY 1) We prove the optimality of the proposed caching and delivery scheme presented in Section IV and V. We consider the following four cases. 39 1) NR µR + NT µT ≥ NR : Letting l = s1 = 1, s2 = 0 in (10) in Theorem 2, we have: τ ∗ (µR , µT ) ≥ 1 − µR . (86) Now consider the achievable upper bound of NDT. Subtracting (5) from (4), we obtain       NT  NX NT  R −1 X X NT NT NR − 1 NR 1 − µR ≤ ar,t a0,t + − t t r−1 r t=1 r=1 t=1   NX NT  R −1 X NR − 1 NT = ar,t . t r r=0 t=1 (87) Substituting (87) into (18), we obtain that the achievable NDT must satisfy      X 1 NR − 1 NT − 1 ar,t τ ≥ 1 − µR + dr,t t r {(r,t):r+t<NR } ≥ 1 − µR , (88) and hence τU ≥ 1 − µR . Note that the two equalities in (88) can be achieved at the same time when NR µR + NT µT ≥ NR . In specific, when NT ≥ NR , consider the following file splitting ratios which satisfy constraints (4)(5)(6): 1 − µR a∗NR ,0 = µR , a∗0,NR = NT  , and others being 0. NR Substituting it into (3), we have: τU =  NT ∗ a = 1 − µR , NR 0,NR  which coincides with lower bound (86), and thus is optimal. When NT < NR , consider the following file splitting ratios: a∗NR ,0 = 1 − (1 − µR ) 1 − µR NR ∗ , aNR −NT ,NT = NR −1  , and others being 0. NT N −N R T Similar arguments when NT ≥ NR can be applied here again, and are omitted. Thus, the optimality when NT µT + NR µR ≥ NR is proved. 2) (µR , µT ) = (0, 1): Substituting l = s1 = min{NT , NR }, s2 = NR − min{NT , NR } into (10), we have: τ∗ ≥ NR . min{NT , NR } (89) Now consider the achievable upper bound of NDT. Since there is no cache storage at receivers, which implies that ar,t = 0 for r > 0, the achievable NDT in (3) reduces to  NT NT X t τU = min a0,t , (90) d 0,t t=1 40 and constraint (4) reduces to  NT  X NT t t=1 a0,t = 1. It can be seen from (8) that d0,t ≤ min{1, NT /NR } for t ∈ [NT ], thus we have   NT  NT NT X X 1 NR NT t a0,t ≥ . a0,t = NT d min{N , N } t } min{1, 0,t T R N t=1 t=1 (91) (92) R Note that the equality in (92) can be achieved by letting file splitting ratios satisfy a∗0,NT = 1, and others being 0 in (3). Thus, the optimality when (µR , µT ) = (0, 1) is proved. 3) (µR , µT ) = (0, 1/NT ): substituting l = s1 = 1, s2 = NR − 1 into (10), we have: NT + NR − 1 . (93) NT Now consider the achievable upper bound of NDT. In this case, the only feasible file splitting ratios are given by τ∗ ≥ a∗0,1 = 1/NT , and others being 0. Substituting it into (3), the achievable NDT is given by τ= NT NT NT +NR −1 a∗0,1 = NT + NR − 1 , NT which coincides with the lower bound (93) and thus is optimal. 4) µR +NT µT = 1 when intra-file coding is not allowed in the caching functions: Substituting l = s1 = 1, s2 = NR − 1 into (11), we have: NT + NR − 1 (1 − µR ). (94) τ ∗ ≥ (NT + NR − 1)µT = NT Now consider the achievable upper bound of NDT. In this case, the only feasible file splitting ratios are given by 1 − µR ∗ a∗0,1 = , aNR ,0 = µR , and others being 0. NT Substituting it into (3), the achievable NDT is given by τ= NT NT NT +NR −1 a∗0,1 = NT + NR − 1 (1 − µR ), NT which coincides with the lower bound (94) and thus is optimal. Summarizing all the four cases above, we finished the proof of Corollary 1. A PPENDIX C: M AXIMUM M ULTIPLICATIVE G AP (P ROOF OF C OROLLARY 2) Given the fact that NDT is optimal when NT µT + NR µR ≥ NR , we only need to prove the multiplicative gap when NT µT + NR µR < NR . Denote g as the multiplicative gap. We consider three cases to prove Corollary 2: (1) NT ≥ NR ; (2) NT < NR and µT ≥ 1/NT ; (3) NT < NR and µT < 1/NT . 41 A. NT ≥ NR Using (86), we have: NX NT R −1 X 1 g≤ · min 1 − µR {ar,t } r=0 t=1 NR −1 r  dr,t NT t  ar,t , (95) Consider the following file splitting ratios in (95): aNR ,0 = µR , a0,1 = NT µT + µR − 1 NR (1 − µR ) − NT µT , a0,NR = NT  , and others being 0, NT (NR − 1) (NR − 1) N R then we have the following upper bound:  NT NT NR (1 − µR ) − NT µT 1 1 NR NT µT + µR − 1  · · + g≤ T 1 − µR d0,1 NT (NR − 1) 1 − µR d0,NR N (NR − 1) NR   1 NT + NR − 1 NR 1 NT µT + µR − 1 = · (1 − µR ) − µT + · 1 − µR NR − 1 NT 1 − µR NR − 1 µT NR − =1+ NT 1 − µR ≤ 2. (96) Therefore, the multiplicative gap is within 2 when NT ≥ NR . B. NT < NR and µT ≥ N1T we consider six cases to discuss the multiplicative gap g: (1) NR ≤ 1.8NT , (2) NR 1.8NT , µR ≤ 2NR1−NT , (3) NR > 1.8NT , NT = 2, 2NR1 −2 < µR < 14 , (4) NR > 1.8NT , NT √ N − 2NT2 −2NT , (6) NR > 1.8NT , NT 2, µR ≥ 41 , (5) NR > 1.8NT , NT ≥ 3, 2NR1−NT < µR < T 2NT −N 2 T √ 2 NT − 2NT −2NT 3, µR ≥ . 2NT −NT2 R and others being 0 1) NR ≤ 1.8NT : Letting file splitting ratios aNR ,0 = µR , a0,1 = 1−µ NT NT +NR −1 ∗ (3), we have τ ≤ (1 − µR ). Comparing the lower bound (86), we have NT g≤ NT + NR − 1 < 2.8 NT > = ≥ in (97) 2) NR n> 1.8NT , µR ≤ 2NR1−NT : Letting  l = o s1 = NT , s2 = NR − NT in (10), we have 2 +N N T µR . Using the same upper bound of τ ∗ as in case τ ∗ ≥ N1T NR − (NR − NT )NR + T 2 42 (1), i.e. τ ∗ ≤ NT +NR −1 (1 NT − µR ), we have g≤ (N + NR − 1)(1 − µR )   T N 2 +N NR − (NR − NT )NR + T 2 T µR (NT + NR − 1)(2NR − NT ) NR2 − NT2 /2 − NT /2 NT NR + 2NR2 − 2NR + NT ≤ NR2 − NT2 /2 − NT /2 2N 2 + N 2 /1.8 − 2NR + NR /1.8 ≤ 2 R 2 R NR − NR /(2 × 1.82 ) − NR /(2 × 1.8) (4 + 2/1.8)NR − (4 − 2/1.8) = (2 − 1/1.82)NR − 1/1.8 ≤ 4+2/1.8 − (4 − 2/1.8) 4 + 2/1.8 2×1.8−1/1.8 + = 2 − 1/1.82 (2 − 1/1.82 )NR − 1/1.8 4 + 2/1.8 < 3.1 < 2 − 1/1.82 (98) 3) NR > 1.8NT , NT = 2, 2NR1 −2 < µR < 41 : Denote µˆR = ⌊µR NR ⌋/NR . Since the achievable upper bound τU is a decreasing function of µR and µT , we have: τ ∗ (µR , µT ) ≤ τU (µR , µT ) ≤ τU (µR , 1/NT ) ≤ τU (µˆR , 1/NT ). (99) Here τU (µˆR , 1/NT ) is upper bounded by τU (µˆR , 1/NT ) ≤ ≤ ≤ by letting file splitting ratio aNR µˆR ,1 = NT − 1 + NR NR µˆR +1 NT NT + NR NR µˆR +1 NT NT + NNRRµR NT 1 NT (NNR µˆ R R (1 − µˆR ) ) =1+ 1 , NT µR (100) , and others being 0 in (3). Letting l = s1 = NT , s2 = ⌊ 2µ1R − 1⌋ in (10), we have      1 1 1 1 2 2 ∗ NT + ⌊ − 1⌋ − ⌊ − 1⌋ + NT /2 + NT /2 + NT ⌊ − 1⌋ µR τ ≥ NT 2µR 2µR 2µR      1 1 1 1 2 2 NT + −1−1 − ( − 1) + NT /2 + NT /2 + NT ( − 1) µR ≥ NT 2µR 2µR 2µR      1 1 1 2 = NT + −2 − + NT /2 − NT /2 + 1 + (NT /2 − 1)/µR µR NT 2µR 4µ2R     1 1 1 1 2 NT /2 − 1 + − (NT /2 − NT /2 + 1)µR = − 2µR (101) = NT 4µR NT 4µR 43 Comparing (100) and (101), we have g≤ NT + 1 4µR 1 µR = − 2µR 2µR + 1 2 × 1/4 + 1 < = 12. 2 1/4 − 2µR 1/4 − 2 × (1/4)2 (102) 4) NR > 1.8NT , NT = 2, µR ≥ 14 : By the convexity of the achievable upper bound τU , we have τ ∗ (µR , µT ) ≤τU (µR , µT ) ≤τU (µR , 1/NT ) ≤τU (1, 1/NT ) + = τU (1/4, 1/NT ) − τU (1, 1/NT ) (1 − µR ) 3/4 τU (1/4, 1/NT ) (1 − µR ). 3/4 (103) Denoting µˆR = ⌊ 41 NR ⌋/NR and using (99)(100), we have τU (1/4, 1/NT ) ≤ τU (µˆR , 1/NT ) ≤ τU (µˆR , 1/NT ) 1 . ≤1+ NT /4 (104) Using (86)(103)(104), we have 4 g≤ 3  1+ 1 NT /4 √ NT −  = 4. 2N 2 −2NT T 5) NR > 1.8NT , NT ≥ 3, 2NR1−NT < µR < 2NT −NT2 √ 2 NT − 2NT −2NT µ0R = . Similar to (99)(100), we have 2NT −N 2 (105) : Denote µˆR = ⌊µR NR ⌋/NR and T τ ∗ (µR , µT ) ≤ τU (µˆR , 1/NT ) ≤ 1 + 1 . NT µR (106) 44 Letting l = s1 = NT , s2 = ⌊ 2µ1R − NT /2⌋ in (10), we have   1 1 ∗ NT + ⌊ − NT /2⌋ τ ≥ NT 2µR    1 1 2 2 − ⌊ − NT /2⌋ + NT /2 + NT /2 + NT ⌊ − NT /2⌋ µR 2µR 2µR   1 1 NT + − NT /2 − 1 ≥ NT 2µR    1 1 2 2 − ( − NT /2) + NT /2 + NT /2 + NT ( − NT /2) µR 2µR 2µR      1 1 1 NT2 NT /2 + −1 − µR + NT /2 + = NT 2µR 4µ2R 4   1 1 NT2 = NT /2 − 1 + − (NT /2 + )µR NT 4µR 4   1 NT2 + 2NT 0 1 NT /2 − 1 + − µR ≥ NT 4µR 4 ( ) p 1 1 NT + 2 NT − 2NT2 − 2NT = NT /2 − 1 + − NT 4µR 4 2 − NT   1 1 NT /2 − 1 + − NT /4 ≥ NT 4µR   1 1 = NT /4 − 1 + NT 4µR (107) Combining (106) and (107), we have g≤ 1+ 1 NT µR 1/4 − 1/NT + =4+ =4+ <4+ 1 4NT µR 4/NT 1/4 − 1/NT + 4 NT /4 − 1 + 4 NT /4 − 1 + 1 4NT µR 1 4µR 1 4µ0R <7 (108) 45 6) NR > 1.8NT , NT ≥ 3, µR ≥ bound τU , we have √ NT − 2NT2 −2NT 2NT −NT2 : By the convexity of the achievable upper τ ∗ (µR , µT ) ≤τU (µR , µT ) ≤τU (µR , 1/NT ) τU (µ0R , 1/NT ) − τU (1, 1/NT ) (1 − µR ) ≤τU (1, 1/NT ) + 1 − µ0R = τU (µ0R , 1/NT ) (1 − µR ). 1 − µ0R (109) Denote µˆR 0 = ⌊µ0R NR ⌋/NR . Using (99)(100), we have τU (µ0R , 1/NT ) ≤ τU (µˆR 0 , 1/NT ) ≤ 1 + 1 NT µ0R (110) Combining (86), (109) and (110), we have g≤ 1 NT µ0R − µ0R 1+ 1 < 3.8 (111) Thus, by combining the above six cases, the multiplicative gap is within 12 when NT < NR and µT ≥ N1T . C. NT < NR and µT < N1T Consider the following file splitting ratios in (3): 1 − µR a0,1 = , aNR ,0 = µR , and others being 0. NT Then, we have the following achievable NDT: τ= NT NT NT +NR −1 1 − µR NT + NR − 1 = (1 − µR ). NT NT Comparing to (86), we have NT + NR − 1 . NT Summarizing all the analysis above, Corollary 2 is proved. g≤ A PPENDIX D: O PTIMIZATION F ILE S PLITTING R ATIOS OF C OROLLARY 3) The LP problem in the 2 × 2 network is expressed as OF IN THE 2 × 2 N ETWORK (P ROOF min τ2 = 3a0,1 + a0,2 + 2a1,1 + a1,2 (112) s.t. 2a0,1 + a0,2 + 4a1,1 + 2a1,2 + a2,0 + 2a2,1 + a2,2 = 1, (113) 2a1,1 + a1,2 + a2,0 + 2a2,1 + a2,2 ≤ µR , a0,1 + a0,2 + 2a1,1 + 2a1,2 + a2,1 + a2,2 ≤ µT . (114) (115) 46 Subtracting (114) from (113), we have 1 − µR ≤ 2a0,1 + a0,2 + 2a1,1 + a1,2 . (116) Substituting (116) into the objective function in (112), we get τ2 ≥ 1 − µR + a0,1 (117a) ≥ 1 − µR . (117b) Now we discuss the solution in regions R122 and R222 individually. Region R122 : In this region, the equality in (117) holds if a0,1 = 0. This can be satisfied when the file splitting ratios {ar,t } take the following values: a∗2,0 = µR , a∗0,2 = 1 − µR and other ratios are 0. Region R222 : In this region, subtracting (116) from (115), we can get µT − (1 − µR ) ≥ −a0,1 + a1,2 + a2,1 + a2,2 , ≥ −a0,1 or equivalently a0,1 ≥ 1 − µR − µT . (118) Substituting (118) into (117a), we can get τ2 ≥ 1 − µR + 1 − µR − µT = 2(1 − µR ) − µT . (119) In this region, the minimum NDT τ2 = 2(1−µR)−µT can be achieved. The solution for splitting ratios is not unique but must satisfy a∗0,1 = 1 − µR − µT and a∗2,1 = a∗2,2 = a∗1,2 = 0. Here we choose one feasible solution to be a∗0,1 = 1 − µR − µT , a∗2,0 = µR , a∗0,2 = 2µT − (1 − µR ) and other ratios are 0. A PPENDIX E: O PTIMAL S OLUTION OF F ILE S PLITTING R ATIOS IN THE 3 × 3 N ETWORK The optimal solution of file splitting ratios in the 3 × 3 network is given below, where all the regions are defined in Corollary 4. Region R133 : The optimal splitting ratios are not unique but must satisfy a∗1,1 = a∗0,1 = a∗0,2 = 0, a∗3,0 + 3a∗3,1 + 3a∗3,2 + a∗3,3 (120) + 6a∗2,1 + 6a∗2,2 + 2a∗2,3 + 3a∗1,2 + a∗1,3 = µR . (121) One feasible solution is a∗3,0 = µR , a∗0,3 = 1 − µR , and other ratios are 0. Region R233 : The optimal splitting ratios are not unique but must satisfy a∗0,1 = a∗0,2 = a∗3,1 = a∗3,2 = a∗3,3 = a∗2,2 = a∗2,3 = a∗1,3 = 0, 1 µR µT − , a∗1,1 = − 3 3 3 a∗3,0 + 6a∗2,1 + 3a∗1,2 = 2µR + µT − 1, 3a∗2,1 + 6a∗1,2 + a∗0,3 = µR + 2µT − 1. (122) 47 One feasible solution is 1 µR µT ∗ − , a3,0 = 2µR + µT − 1, a∗0,3 = µR + 2µT − 1, a∗1,1 = − 3 3 3 and other ratios are 0. Region R333 : The optimal splitting ratios are unique and given by µR ∗ a∗1,1 = , a = 1 − 2µR − µT , a∗0,3 = 3µR + 3µT − 2, 3 0,2 and other ratios being 0. Region R433 : The optimal splitting ratios are unique and given by a∗1,1 = µR ∗ 2 1 , a0,1 = − µR − µT , a∗0,2 = µT − , 3 3 3 (123) (124) (125) and other ratios being 0. Region R533 : The optimal splitting ratios are unique and given by a∗1,1 = 1 µR + µT − , a∗0,1 = 1 − µR − 2µT , a∗3,0 = 1 − 3µT , 3 3 (126) and other ratios being 0. R EFERENCES [1] F. Boccardi, R. W. Heath, A. Lozano, T. L. Marzetta, and P. Popovski, “Five disruptive technology directions for 5G,” IEEE Communications Magazine, vol. 52, no. 2, pp. 74–80, February 2014. [2] H. Liu, Z. Chen, X. Tian, X. Wang, and M. Tao, “On content-centric wireless delivery networks,” IEEE Wireless Communications, vol. 21, no. 6, pp. 118–125, December 2014. [3] Cisco, “Cisco visual networking index: Global mobile data traffic forecast update 2015-2020,” White Paper, Feb 2016. [Online]. Available: http://www.cisco.com/c/en/us/solutions/collateral/service-provider/visual-networking-index-vni/mobile-white-paper-c11-520862.html [4] N. Golrezaei, A. F. Molisch, A. G. Dimakis, and G. Caire, “Femtocaching and device-to-device collaboration: A new architecture for wireless video distribution,” IEEE Communications Magazine, vol. 51, no. 4, pp. 142–149, April 2013. [5] E. Bastug, M. Bennis, and M. Debbah, “Living on the edge: The role of proactive caching in 5G wireless networks,” IEEE Communications Magazine, vol. 52, no. 8, pp. 82–89, Aug 2014. [6] X. Wang, M. Chen, T. Taleb, A. Ksentini, and V. C. M. Leung, “Cache in the air: exploiting content caching and delivery techniques for 5G systems,” IEEE Communications Magazine, vol. 52, no. 2, pp. 131–139, February 2014. [7] 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, August 2016. [8] M. Tao, W. Yu, W. Tan, and S. Roy, “Communications, caching, and computing for content-centric mobile networks: part 1 [guest editorial],” IEEE Communications Magazine, vol. 54, no. 8, pp. 14–15, August 2016. [9] M. A. Maddah-Ali and U. Niesen, “Fundamental limits of caching,” IEEE Transactions on Information Theory, vol. 60, no. 5, pp. 2856–2867, May 2014. [10] M. Maddah-Ali and U. Niesen, “Decentralized coded caching attains order-optimal memory-rate tradeoff,” IEEE/ACM Transactions on Networking, vol. 23, no. 4, pp. 1029–1040, Aug 2015. [11] U. Niesen and M. A. Maddah-Ali, “Coded caching with nonuniform demands,” in IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS), April 2014, pp. 221–226. [12] M. Ji, A. M. Tulino, J. Llorca, and G. Caire, “Order-optimal rate of caching and coded multicasting with random demands,” IEEE Transactions on Information Theory, vol. 63, no. 6, pp. 3923–3949, June 2017. [13] J. Zhang, X. Lin, and X. Wang, “Coded caching under arbitrary popularity distributions,” in Information Theory and Applications Workshop (ITA), Feb 2015, pp. 98–107. [14] J. Zhang and P. Elia, “Fundamental limits of cache-aided wireless BC: Interplay of coded-caching and CSIT feedback,” IEEE Transactions on Information Theory, vol. 63, no. 5, pp. 3142–3160, May 2017. [15] N. Karamchandani, U. Niesen, M. A. Maddah-Ali, and S. N. Diggavi, “Hierarchical coded caching,” IEEE Transactions on Information Theory, vol. 62, no. 6, pp. 3212–3229, June 2016. [16] M. Ji, G. Caire, and A. F. Molisch, “Fundamental limits of caching in wireless D2D networks,” IEEE Transactions on Information Theory, vol. 62, no. 2, pp. 849–869, Feb 2016. [17] S. P. Shariatpanahi, S. A. Motahari, and B. H. Khalaj, “Multi-server coded caching,” IEEE Transactions on Information Theory, vol. 62, no. 12, pp. 7253–7271, Dec 2016. 48 [18] A. Liu and V. K. N. Lau, “Exploiting base station caching in MIMO cellular networks: Opportunistic cooperation for video streaming,” IEEE Transactions on Signal Processing, vol. 63, no. 1, pp. 57–69, Jan 2015. [19] B. Azari, O. Simeone, U. Spagnolini, and A. M. Tulino, “Hypergraph-based analysis of clustered co-operative beamforming with application to edge caching,” IEEE Wireless Communications Letters, vol. 5, no. 1, pp. 84–87, Feb 2016. [20] M. Maddah-Ali and U. Niesen, “Cache-aided interference channels,” in IEEE International Symposium on Information Theory (ISIT), June 2015, pp. 809–813. [21] A. Sengupta, R. Tandon, and O. Simeone, “Cache aided wireless networks: Tradeoffs between storage and latency,” vol. abs/1512.07856, 2015. [Online]. Available: http://arxiv.org/abs/1512.07856 [22] R. Tandon and O. Simeone, “Cloud-aided wireless networks with edge caching: Fundamental latency trade-offs in fog radio access networks,” in 2016 IEEE International Symposium on Information Theory (ISIT), July 2016, pp. 2029–2033. [23] A. Sengupta, R. Tandon, and O. Simeone, “Cloud and cache-aided wireless networks: Fundamental latency trade-offs,” vol. abs/1605.01690, 2016. [Online]. Available: http://arxiv.org/abs/1605.01690 [24] F. Xu, K. Liu, and M. Tao, “Cooperative Tx/Rx caching in interference channels: A storage-latency tradeoff study,” in 2016 IEEE International Symposium on Information Theory (ISIT), July 2016, pp. 2034–2038. [25] N. Naderializadeh, M. A. Maddah-Ali, and A. S. Avestimehr, “Fundamental limits of cache-aided interference management,” IEEE Transactions on Information Theory, vol. 63, no. 5, pp. 3092–3107, May 2017. [26] J. Hachem, U. Niesen, and S. N. Diggavi, “Degrees of freedom of cache-aided wireless interference networks,” vol. abs/1606.03175, 2016. [Online]. Available: http://arxiv.org/abs/1606.03175 [27] V. Cadambe and S. Jafar, “Interference alignment and the degrees of freedom of wireless X networks,” IEEE Transactions on Information Theory, vol. 55, no. 9, pp. 3893–3908, Sept 2009. [28] H. Weingarten, Y. Steinberg, and S. Shamai, “The capacity region of the Gaussian multiple-input multiple-output broadcast channel,” IEEE Transactions on Information Theory, vol. 52, no. 9, pp. 3936–3964, Sept 2006. [29] V. S. Annapureddy, A. E. Gamal, and V. V. Veeravalli, “Degrees of freedom of interference channels with CoMP transmission and reception,” IEEE Transactions on Information Theory, vol. 58, no. 9, pp. 5740–5760, Sept 2012. [30] W.Hodge and D. Pedoe, Methods of Algebraic Geometry. NewYork: Cambridge Univ. Press, 1953.
7cs.IT
arXiv:1802.02943v1 [math.PR] 8 Feb 2018 Parametric inference for multidimensional hypoelliptic diffusion with full observations Anna Melnykova ∗ Abstract Multidimensional hypoelliptic diffusions arise naturally as models of neuronal activity. Estimation in those models is complex because of the degenerate structure of the diffusion coefficient. We build a consistent estimator of the drift and variance parameters with the help of a discretized log-likelihood of the continuous process in the case of fully observed data. We discuss the difficulties generated by the hypoellipticity and provide a proof of the consistency of the estimator. We test our approach numerically on the hypoelliptic FitzHugh-Nagumo model, which describes the firing mechanism of a neuron. Keywords: parametric inference, hypoelliptic diffusions, FitzHughNagumo model, contrast estimator 1 Introduction Hypoelliptic diffusions naturally occur in various applications, most notably in neuroscience, molecular physics and in mathematical finance. In particular, multidimensional models of a neuron population, such as stochastic approximation of a Hawkes process (Ditlevsen and Löcherbach, 2017), or exotic models of option pricing (Malliavin and Thalmaier, 2006) are described by a hypoelliptic diffusion. The main difference to the classical (or elliptic) setting is that in the hypoelliptic case the dimensionality of the noise is lower than the dimensionality of the system of stochastic differential equations (SDE), which describes the process. Hypoellipticity can be intuitively explained in the following ∗ [email protected], Université de Cergy-Pontoise, AGM UMR-CNRS 8088 and Université de Grenoble Alpes, LJK UMR-CNRS 5224 1 way: though the covariance matrix of noise is singular due to a degenerate diffusion coefficient, smooth transition density with respect to the Lebesgue measure still exists. That is the case when the noise is propagated to all the coordinates through the drift term. Properties of hypoelliptic diffusions significantly differ from those of elliptic ones, when all coordinates are driven by a Gaussian noise. Thus they are more difficult to study. The first problem is that each coordinate has a variance of different order. It is the main cause why classical numerical approximation methods do not work well with hypoelliptic diffusions. In particular, it is proven that for hypoelliptic systems the classical EulerMaruyama scheme does not preserve ergodic properties of the true process (Mattingly et al., 2002). The second problem is the degenerate diffusion coefficient. As the explicit form of the transition density is often unknown, parametric inference is usually based on its discrete approximation with the piece-wise Gaussian processes (see, for example Kessler (1997)). But in the hypoelliptic case this approach cannot be applied directly because the covariance matrix of the approximated transition density is not invertible. Now let us be more specific. Consider a two-dimensional system of stochastic differential equations of the form: ( dXt = a1 (Xt , Yt ; θ)dt (1) dYt = a2 (Xt , Yt ; θ)dt + b(Xt , Yt ; σ)dWt , where (Xt , Yt )T ∈ R × R, (a1 (Xt , Yt ; θ), a2 (Xt , Yt ; θ))T is the drift term, (0, b(Xt , Yt ; σ))T is the diffusion coefficient, (dWt ) is a standard Brownian motion defined on some probability space (Ω, F, P ), (θ, σ) is the vector of the unknown parameters, taken from some compact set Θ1 × Θ2 . The goal of this paper is to estimate the parameters of (1) from discrete observations of both coordinates X and Y . It is achieved in two steps: first, we consider a discretization scheme in order to approximate the transition density of the continuous process preserving the ergodic property, and then we propose an estimation technique which maximizes the likelihood function of the discrete approximate model. Let us discuss the solutions proposed by other authors for hypoelliptic systems of different types. Several works treat the parametric inference problem for a particular case of system (1). It is natural to introduce first the class of stochastic Damping Hamiltonian systems, also known as Langevin equations (Gardiner and Collett, 1985). These hypoelliptic models arise as a stochastic expansion of 2-dimensional deterministic dynamical systems — for example, the Van der Pol oscillator (Van der Pol, 1920) perturbed by noise. They are defined 2 as the solution of the following SDE: ( dXt = Yt dt dYt = a2 (Xt , Yt ; θ)dt + b(Xt , Yt ; σ)dWt . (2) The particular case of Hamiltonian systems with b(Xt , Yt ; σ) ≡ σ and a2 (Xt , Yt ; θ) = g1 (Xt ; θ)Xt +g2 (X1 ; θ)Yt is considered in Ozaki (1989), where the link between the continuous-time solution of (2) and the corresponding discrete model is obtained with the so-called local linearization scheme. The idea of this scheme is the following: for a system of SDE with a non-constant drift and a constant variance, its solution can be interval-wise approximated by a system with a linear drift, and the original covariance matrix being expanded by adding higher-order terms. It allows to construct a quasi Maximum Likelihood Estimator. Pokern et al. (2007) attempt to solve the problem of the non-invertibility of the covariance matrix for the particular case of system (2) with a constant variance with the help of Itô-Taylor expansion of the transition density. The parameters are then estimated with a Gibbs sampler based on the discretized model with the noise propagated 3 into the first coordinate with order ∆ 2 . This approach allows to estimate the variance coefficient, but it is not efficient for estimating the parameters of the drift term. In Samson and Thieullen (2012) it is shown that a consistent estimator for fully and partially observed data can be constructed using only the discrete approximation of the second equation of the system (2). This method works reasonably good in practice even for more general models when it is possible to convert a system (1) to a simpler form (2). However, the transformation of the observations sampled from the continuous model (1) requires the prior knowledge of the parameters involved in the first equation. The other particular case of (1), when b(Xt , Yt ; σ) ≡ σ and the drift term is linear and thus the transition density is known explicitly, is treated in Le-Breton and Musiela (1985). A consistent maximum likelihood estimator is then constructed in two steps — first, a covariance matrix of the process is estimated from available continuous-time observations, and then it is used for computing the parameters of the drift term. Few other works are also devoted to a non-parametric estimation of the drift and the variance terms (Cattiaux et al., 2014, 2016). To the best of our knowledge, for systems (1) the only reference is Ditlevsen and Samson (2017). They construct a consistent estimator using a discretization scheme based on a Itô-Taylor expansion. But the estimation is conducted separately for each coordinate, so it requires partial knowledge of the parameters of the system. In this paper we propose a new estimation method, adjusting the local 3 linearization scheme described in Ozaki (1989) developed for the models of type (2) to the more general class of SDEs (1). Under the hypoellipticity assumption this scheme propagates the noise to both coordinates of the system and allows to obtain an invertible covariance matrix. We start with describing the discretization scheme, approximating the transition density and proposing a contrast estimator based on the discretized log-likelihood. While we attempt to estimate the parameters included in the drift and diffusion coefficient simultaneuously, we also explain in which cases and how the estimation can be splitted. Then we study the convergence of the scheme and prove the consistency of the proposed estimator based on the 2-dimensional contrast. We also detail the different speeds of convergence of the diffusion parameters, which are implied by the hypoellipticity. To the best of our knowledge, the proof of this consistency is the first in the literature. We finish with some numerical experiments, testing the proposed approach on the hypoelliptic FitzHugh-Nagumo model and compare it to other estimators. This paper is organized as follows: Section 2 presents the model and assumptions. Discrete model is introduced in Section 3. The estimators are studied in Section 4 and illustrated numerically in Section 5. We close with Section 6, devoted to conclusions and discussions. Formal proofs are gathered in Appendix. 2 2.1 Models and assumptions Notations We consider system (1). We assume that both variables are discretely observed at equally spaced periods of time on some finite time interval [0, T ]. The vector of observations at time i∆ is denoted by Zi = (Xi , Yi )T , where Zi is the value of the process at the time i∆, i ∈ 0 . . . N . We further assume that it is possible to draw a sufficiently large and accurate sample of data, i.e that T may be arbitrary large, and the partition size ∆ — arbitrary small. Let us also introduce the vector notations: dZt = A(Zt ; θ)dt + B(Zt ; σ)dW̃t , Z0 = ω0 , t ∈ [0, T ] (3) where Zt = (Xt , Yt )T , W̃t is a standard two-dimensional Brownian motion defined on the filtered probability space, ω0 is a F0 -measurable 2−dimensional random vector. Matrices A and B represent, respectively, the drift and the 4 diffusion coefficient, that is A(Zt ; θ) = (a1 (Xt , Yt ; θ), a2 (Xt , Yt ; θ))T and   0 0 B(Zi ; σ) = . (4) 0 b(Zt ; σ) Throughout the paper we use the following abbreviations: ∂x f ≡ ∂f ∂x (x, y; θ) ∂f and ∂y f ≡ ∂y (x, y; θ). We suppress the dependency on the parameter θ, when its value is clear from context, otherwise additional indices are introduced. True values of the parameters are denoted by θ0 , σ0 . We also adopt the notations from Pokern et al. (2007) and refer to the variable Yt which is directly driven by Gaussian noise as ”rough”, and to Xt as ”smooth”. 2.2 Assumptions Further, we are working under the following assumptions: A1 Functions a1 (x, y; θ) and a2 (x, y; θ) have bounded partial derivatives of every order, uniformly in θ. Furthermore ∂y a1 6= 0 ∀(x, y) ∈ R2 . A2 Global Lipschitz and linear growth conditions. ∀t, s ∈ [0, ∞) ∃Kθ s.t.: kA(Zt ; θ) − A(Zs ; θ)k + kB(Zt ; σ) − B(Zs ; σ)k ≤ KkZt − Zs k kA(Zt ; θ)k2 + kB(Zt ; σ)k2 ≤ K 2 (1 + kZt k2 ), where k · k is the standard Euclidean norm. Further, denote by ξ0 the initial value of the process Zt , then Ekξ0 k2 < ∞. A3 Process Zt is ergodic and there exists a unique invariant probability measure ν0 with finite moments of any order. A4 Both functions a1 (Zt ; θ) and a2 (Zt ; θ) are identifiable, that is ai (Zt ; θ) = ai (Zt ; θ0 ) ⇔ θ = θ0 . Assumption (A1) ensures that the weak Hörmander condition is satisfied, thus the system is hypoelliptic in the sense of stochastic calculus of variations (Nualart, 2006, Malliavin and Thalmaier, 2006). In order to prove it we first write the coefficients of system (3) as two vector fields, converting (3) from Itô to the Stratonovich form:     a1 (x, y; θ) 0 A0 (x, y) = A1 (x, y) = . a2 (x, y; θ) − 21 b(x, y; σ)∂y b(x, y; σ) b(x, y; σ) 5 Then their Lie bracket is equal to   ∂y a1 [A0 , A1 ] = 2 b(x, y; σ) . ∂x a2 (x, y; θ) − 12 ∂x b(x, y; σ)∂xy By (A1) the first element of this vector is not equal to 0, thus we conclude that A1 and [A0 , A1 ] generate R2 . That means that the weak Hörmander condition is satisfied and as a result the transition density for system (3) exists, though not necessarily has an explicit form. (A2) implies the existence and uniqueness in law of the weak solution of the system (3) Karatzas and Shreve (1987) and (A4) is a standard condition which is needed to prove the consistency of the estimator. (A3) ensures that we can apply the weak ergodic theorem, that is, for any continuous function f with polynomial growth at infinity: 1 T Z T f (Zs )ds −→ ν0 (f ) 0 T →∞ a.s. We do not investigate the conditions under which process Zt is ergodic, as it is not the main focus of this work. Ergodicity of the stochastic damping Hamiltonian system (2) is studied in Wu (2001). Conditions for a wider class of hypoelliptic SDEs can be found in Mattingly et al. (2002). It is also important to know that if the process Zt is ergodic, then its sampling {Zi }, i ∈ [0, N ] is also ergodic (Genon-Catalot et al., 2000). 3 3.1 Discrete model Derivation Now we introduce a discretization scheme which approximates the transition density of system (3). It is a generalized version of the local linearization scheme presented in Ozaki (1989) for systems (2). Recall that the process Zt is observed at equally spaced periods of time of size ∆. On each interval we consider a new process Zt described by the homogeneous linear system with the constant diffusion coefficient. That is, we use the approximation A(Zt ; θ) ∼ Jt Zt on each interval of length ∆, where Jt := J(Zt ; θ) is the Jacobian of the drift coefficient A(Zt ; θ), computed at the beginning of such an interval. In other words, instead of working with (3), we study N systems of the following type: dZs = Jτ Zs ds + B(Zτ ; σ)dW̃s , 6 Z0 = Z τ , s ∈ (τ, τ + ∆], (5) where the initial value Z0 is given by the observation of the true process Zt at time τ . Note that the value of the diffusion matrix B is fixed at time τ . Solution of (5) has an explicit form: Z s Jτ s Zs = Z τ e + eJτ (s−v) B(Zτ ; σ)dW̃v , ∀s ∈ (τ, τ + ∆]. τ Then the first moment and the covariance matrix of the process Zs on each interval (τ, τ + ∆] are given, respectively, by: Σ(Zs ; θ, σ 2 ) = E "Z E[Zs ] = Zτ eJτ s ,  Z s Jτ (s−v) e B(Zτ ; σ)dW̃v τ s eJτ (s−v) B(Zτ ; σ)dW̃v (6) T # . τ (7) Continuous representation of the drift and the variance terms (6) - (7) is not convenient for the numerical implementation, so it has to be discretized. For the drift term the discretization is straightforward and follows directly from the definition of the matrix exponent. For the covariance matrix we use the following proposition, proof of which is postponed to appendix: Proposition 1. The second-order Taylor approximation of matrix Σ(Z∆ ; θ, σ 2 ) defined in (7) has the following form: ! 2 ∆3 ∆2 ∆3 (∂ a ) (∂ a ) + (∂ a )(∂ a ) y 1 y 1 y 1 y 2 3 2 3 b2 (Zτ ; σ) +O(∆4 ), 2 3 2 3 (∂y a1 ) ∆2 + (∂y a1 )(∂y a2 ) ∆3 ∆ + (∂y a2 ) ∆2 + (∂y a2 )2 ∆3 (8) where the derivatives are computed at time τ . Note that the noise in the first coordinate appears only through ∂y a1 . Thus, under assumption (A1) matrix (7) has rank 2, while the original covariance matrix BB T is of rank 1. This fact allows us to use techniques developed for non-degenerate Gaussian diffusions. However, note that this matrix is still highly ill-conditioned, as its determinant is of order O(∆4 ). At this point we give up the continuous time setting and move to the discrete process. Let us denote the approximated form (8) of matrix (7) by Σ∆ . Then the approximation for the solution of (5) is given by: Zi+1 = Ā(Zi ; θ) + B̄(Zi ; θ, σ)Ξi , (9) where Ξi is a standard Gaussian 2-dimensional random vector, B̄ is any matrix such that B̄ B̄ T = Σ∆ , Ā is an approximation of the conditional 7 expectation of the drift (6), given ∀k ∈ N by: ∆2 ∆k k Ji A(Zi ; θ) + · · · + J A(Zi ; θ) + O(∆k+1 ) 2 k! i (10) Thus, on each small interval the discretized process can be approximated  by the Gaussian process such that E [Zi+1 |Zi ] ∼ N Ā(Zi ; θ), Σ∆ (Zi ; θ, σ) . Ā(Zi ; θ) = Zi + ∆A(Zi ; θ) + 3.2 Properties of the discrete model The difference between the true process and its approximation cannot be computed explicitly since the transition density of the process is in general unknown. But the moments of the process can be approximated by a moment generator function. For sufficiently smooth and integrable function f : R × R → R we know that: E(f (Zt+∆ )|Zt = z) = j X ∆i i=0 i! Li f (z) + O(∆j+1 ), (11) where Li f (z) is the i times iterated generator of model (3), given by Lf (z) = (∂z f (z))A(z) + 1 2 5 f (z), 2 B 2 ∂ where 52B (·) = σ 2 ∂y 2 (·) is a weighted Laplace type operator. Thus, the value of the process is approximated by: E(Zt+∆ |Zt = z) = z + ∆A(z; θ) + ∆2 LA(z; θ) + O(∆3 ), 2 (12) which coincides with (10) up to the terms of order ∆2 . Adding more terms to (10) does not improve the accuracy of the scheme unless the model is linear. Further we assume that k = 2. Now let us denote by Ā1 (Zi ; θ) the first element of the vector Ā(Zi ; θ), and by Ā2 (Zi ; θ) the second. We have the following proposition: Proposition 2 (Weak convergence of the local linearization scheme). For 8 k ≥ 2 the following holds:  E Xi+1 − Ā1 (Zi ; θ0 ) = O(∆3 )  E Yi+1 − Ā2 (Zi ; θ0 ) = O(∆3 ) 2 ∆3 2 E Xi+1 − Ā1 (Zi ; θ0 ) = (∂y a1 )2θ0 b (Zi ; σ0 ) + O(∆4 ) 3 2 E Yi+1 − Ā2 (Zi ; θ0 ) = ∆b2 (Zi ; σ0 ) + O(∆2 )    ∆2 2 E Xi+1 − Ā1 (Zi ; θ0 ) Yi+1 − Ā2 (Zi ; θ0 ) = (∂y a1 )θ0 b (Zi ; σ0 ) + O(∆3 ) 2 Proof. It follows directly from the comparison between the scheme (8) - (10) and the moment generator function (11). More detailed expansion of (11) can be found in Kloeden et al. (2003). For systems (3) it is suitable to approximate the drift term up to the order ∆2 . It is not sufficient to use a first-order approximation, as in that case the variance of the first coordinate would be suppressed by the error in the drift term. However, for elliptic systems it is often enough to approximate a drift only up to ∆. 4 Parameter estimation Let us introduce a contrast function for system (3). In the elliptic case this function is defined as −2 times the log-likelihood of the discretized model (Florens-Zmirou (1989), Kessler (1997)). In hypoelliptic case, however, we must modify this criterion taking into account the specific structure of the covariance matrix. Most notably, the contrast is obtained by dividing the first part by 2: L(θ, σ 2 ; Z0:N ) = N −1 1X 2 (Zi+1 − Ā(Zi ; θ))T Σ−1 ∆ (Zi ; θ, σ )(Zi+1 − Ā(Zi ; θ)) 2 i=0 + N −1 X log det(Σ∆ (Zi ; θ, σ 2 )). (13) i=0 Then the estimator is defined as: (θ̂, σ̂ 2 ) = arg min L(θ, σ 2 ; Z0:N ) θ,σ 2 9 (14) For system (2) this correction is not proposed nor in Ozaki (1989), nor in Pokern et al. (2007). We justify this bias theoretically in Lemma 1. However, the 2-dimensional criterion (14) is tricky to analyze because of the different orders of variance for the first and the second coordinate. As a result, under the scaling which allows to estimate the parameters included in the rough coordinate, we cannot say anything about the parameters from the smooth coordinate and vice versa. It does not introduce any additional restrictions on the numerical implementation, but must be taken into account during the theoretical study. When both equations are driven by the same parameters, the task is simplified as the parameters can be then estimated from a onedimensional criteria, which involves only one of the two equations. Let us denote the parameters in the first coordinate by ϕ, and in the second by ψ. We start with considering the variance term. In order to prove the convergence of the estimator for the σ̂ 2 , we fix the value of the parameter in the first coordinate in order to focus on the parameters which directly regulate the diffusion term of the original process. It results in the following Lemma: Lemma 1. Under assumptions (A1)-(A4), ϕ ≡ ϕ0 and ∆N → 0 while N ∆N → ∞ the following holds:  Z  2 1 b (z; σ0 ) Pθ 2 2 LN,∆N (θ, σ ; Z0:N ) −→ + log b (z; σ) ν0 (dz) (15) N b2 (z; σ) Then we proceed with the drift term. Note that the first statement of the Lemma 2 suffices to obtain the consistency of the estimator, but only in the case when both equations are driven by the same parameters. However, in combination with the second term it allows us to establish the main result of the paper: Lemma 2. Under assumptions (A1)-(A4), ∆N → 0 and N ∆N → ∞ the following holds:  Pθ ∆N  LN,∆N (θ, σ02 ; Z0:N ) − LN,∆N (θ0 , σ02 ; Z0:N ) −→ N →∞,∆N →0 N Z (a1 (z; θ0 ) − a1 (z; θ))2 6 ν0 (dz) b2 (z; σ02 )(∂y a1 )2θ lim  Pθ 1  LN,∆N (ϕ0 , ψ, σ02 ; Z0:N ) − LN,∆N (ϕ0 , ψ0 , σ02 ; Z0:N ) −→ N →∞,∆N →0 N ∆N Z (a2 (z; ψ) − a2 (z; ψ0 ))2 2 ν0 (dz) b2 (z; σ02 ) lim 10 Note that consistency for each term is obtained under different scal1 ings. Scaling ∆ is standard for the diffusion coefficient, while N1∆ — for ∆ the drift parameter (Kessler (1997)). But N is very unusual. That means that each parameter converges to its real value with different speed. It is the main theoretical difficulty encountered while constructing a two-dimensional contrast, compared to 2 different one-dimensional contrasts proposed in Ditlevsen and Samson (2017). Finally, we establish the following theorem: Theorem 1. Under assumptions (A1)-(A4) and ∆N → 0 and N ∆N → ∞ the following holds: Pθ (θ̂, σ̂ 2 ) −→ (θ0 , σ02 ) Proof. Let us start with the variance term. The result follows from Lemma 1. Denote the integral on the right side of (15) by I(σ, σ0 ). We can choose some subsequence Nk such that σ̂Nk ,∆Nk converges to some σ∞ . By the definition of the estimator we know that I(σ∞ , σ0 ) ≤ I(σ0 , σ0 ). But we also 2 0) know that bb2(z;σ + log b2 (z; σ) ≥ 1 + log b2 (z; σ0 ) and thus I(σ∞ , σ0 ) ≥ (z;σ) I(σ0 , σ0 ). It proves the consistency of σ̂. Consistency for the drift term essentially follows from Lemma 2 and from the identifiability of the drift functions. We can state that there exists a subsequence θ̂N,∆N which converges to θ̂∞ . At the same time, as a1 is identifiable, thus θ̂∞ ≡ θ0 . That means that the estimator is consistent with respect to the parameters of the first coordinate. Proof for the ψ is analogous. Another way to unify the scaling and simplify the task of parameter estimation is to consider a quadratic variance of the drift term. This approach does not allow to estimate the parameters of the diffusion term, but is effective for the parameters of the drift. Its main advantage consists in the fact that the computation of the contrast function does not require finding an inverse of matrix (8), which is ill-conditioned and can cause numerical problems for small values of ∆. Consider θ̂QV = arg min θ N −1 1 X Zi+1 − Ā(Zi ; θ) N −1 2 , i=0 with Ā(Zi ; θ) being defined in (10). Proposition 3. Under assumptions (A1)-(A4) the following holds: P θ θ̂QV −→ θ0 11 (16) What about the diffusion term, in the case when b(x, y; σ) ≡ σf (x, y), parameter σ can be computed explicitly with the help of the sample covariance matrix. Good properties of this approach for the elliptic case are proven in Florens-Zmirou (1989). When it comes to the hypoelliptic systems, this approach must be modified, as the discretization step of order ∆ does not allow to compute the terms of order ∆3 , which represent the propagated noise. However, the value of σ can still be inferred from the observations of the rough coordinate by computing σ̄ 2 = N −1 1 X (Yi+1 − Yi )2 N∆ f (Xi , Yi ) (17) i=0 5 5.1 Simulation study The model The two estimators (θ̂, σ̂ 2 ) and (θ̂QV , σ̃ 2 ) are evaluated on the simulation study with a hypoelliptic stochastic neuronal model called FitzHugh-Nagumo model (Fitzhugh, 1961). It is a simplified version of the Hodgkin-Huxley model (Hodgkin and Huxley, 1952), which describes in a detailed manner activation and deactivation dynamics of a spiking neuron. First it was studied in the deterministic case, then it was improved by adding two sources of noise to the both coordinates, what results in an elliptic SDE. However, it is often argued that only ion channels are perturbed by noise, while the membrane potential depends on them in a deterministic way. This idea leads to a 2-dimensional hypoelliptic diffusion. In this paper we consider a hypoelliptic version with noise only in the second coordinate as studied in Leon and Samson (2017). More precisely, the behaviour of the neuron is defined through the solution of the system ( dXt = 1ε (Xt − Xt3 − Yt − s)dt (18) dYt = (γXt − Yt + β)dt + σdWt , where the variable Xt represents the membrane potential of the neuron at time t, and Yt is a recovery variable, which could represent channel kinetic. Parameter s is the magnitude of the stimulus current and is often known in experiments, ε is a time scale parameter and is typically significantly smaller than 1, since Xt moves ”faster” than Yt . Parameters to be estimated are θ = (γ, β, ε, σ). Hypoellipticity and ergodicity of (18) are proven in Leon and Samson (2017). In Jensen et al. (2012) it is proven that s is unidentifiable when 12 only one coordinate is observed. Parametric inference for elliptic FitzHughNagumo model both in fully- and partially observed case is investigated in Jensen (2014). The same problem, but for the hypoelliptic setting is studied in Ditlevsen and Samson (2017). 5.2 Experimental design In order to make our experiments more representative, we consider two different settings: an excitatory and an oscillatory behaviour. For the first regime, the drift parameters are set to γ = 1.5, β = 0.3, ε = 0.1, s = 0.01 and the diffusion coefficient σ = 0.6, and for the second γ = 1.2, β = 1.3, ε = 0.1, s = 0.01 and σ = 0.4. The diffusion coefficient does not change the behaviour pattern, only the ”noisiness” of the observations. We organize the trials as follows: first, we generate 100 trajectories using formula (9) for each set of parameters with ∆ = 0.001 and N = 500000. Then we downsample the sequence and work only with each 10-th value of the process, so that ∆ = 0.01 and N = 50000. We estimate the parameters corresponding to the contrast given by (13). We refer to this method as linearized contrast. For the ”quadratic variance” estimation (QV) we do the following: we estimate the parameter σ explicitly from the observations of the second variable by (17), and then compute the parameters of the drift by minimizing (16). In addition, we compare both methods to the 1.5 strong order scheme (Ditlevsen and Samson, 2017), based on two separate estimators for each coordinate. The minimization of the criterions is conducted with the optim function in R with the Conjugate Gradient method. In Table 1 we present the mean value of the estimated parameters and the standard deviation (in brackets). Figure 1 illustrates the estimation densities. Linearized estimator is depicted in blue, Quadratic-Variance in red, 1.5 scheme in green. The first thing is that the estimation of the diffusion coefficient σ with the 2-dimensional linearized estimator is biased in both sets of data, even though the contrast is corrected with respect to the hypoellipticity of the system. This bias does not appear in the one-dimensional criteria and when the value is directly computed from the observations. Thus its origin may be explained by the dimensionality of the system. Parameters of the second coordinate γ and β are estimated efficiently with all three methods, though the 1.5 scheme provides a more accurate estimation. It is expected, since one of the parameters is fixed to its real value. However, in the case of ε, 1-dimensional criteria does not score better than the linearized and QV estimators. This parameter seems to be underestimated in the case of 1.5 13 Set 1: Lin. contrast QV 1.5 scheme Set 2: Lin. contrast QV 1.5 scheme γ 1.5 1.477 (1.056) 1.460 (1.059) 1.497 (1.055) 1.2 1.199 (0.531) 1.170 (0.423) 1.221 (0.645) β 0.3 0.289 (0.428) 0.311 (0.403) 0.299 (0.393) 1.3 1.315 (0.621) 1.268 (0.598) 1.324 (0.777) ε 0.1 0.100 (0.561) 0.100 (0.562) 0.099 (0.563) 0.1 0.102 (0.683) 0.100 (0.678) 0.088 (0.575) Table 1: Comparison between different schemes σ 0.6 0.672 (0.291) 0.611 (0.287) 0.597 (0.288) 0.4 0.472 (0.340) 0.400 (0.381) 0.398 (0.338) Beta 0 0 1 1 2 2 3 3 4 4 5 5 Gamma 1.0 1.5 2.0 −0.2 0.0 0.2 0.6 0.8 Sigma 0 0 5 500 10 15 1500 20 25 2500 Epsilon 0.4 0.098 0.099 0.100 0.101 0.102 0.60 0.65 0.70 (a) Excitatory set Beta 0.0 0.0 1.0 1.0 2.0 2.0 3.0 3.0 Gamma 0.5 1.0 1.5 0.6 1.0 1.2 1.4 1.6 1.8 Sigma 0 0 50 100 200 400 600 800 150 Epsilon 0.8 0.080 0.090 0.100 0.38 0.42 0.46 0.50 (b) Oscillatory set Figure 1: Estimation density for the linearized (blue), the QV (red) and 1.5 15 scheme (green) estimators. scheme, and a bit overestimated with the linearization scheme, as well as the diffusion coefficient. During the simulation study it is also observed that ε is the most sensitive to the initial value with which the optim function is initialized, since it directly regulates the amount of noise which is propagated to the first coordinate. 6 Conclusions The proposed estimator successfully generalizes parametric inference methods developed for models of type (2) for more general class (1). Numerical study shows that it can be used with no prior knowledge of the parameters. It is the most prominent advantage of our method over the analogous works. From the theoretical point of view, our estimators also reveal good properties. Both linearized and the quadratic variance contrasts are consistent. We did not study the question of the asymptotic normality of the estimator, since in multidimensional case this question is much more harder to treat in comparison to the elliptic case because of the different orders of variance for each coordinate. The most important direction of prospective work is the adaptation of the estimation method to the case when only the observations of the first coordinate are available. Under proper conditions it must be possible to couple the contrast minimization with one of the existing filtering methods and estimate the parameters of the system (at least, partially). It would allow to face real experimental data. Another point is the generalization of the contrast to systems of higher dimension. In practice we deal with arbitrary number of rough and smooth variables, and the general rule which describes the behaviour of the contrast in that case is not yet deriven. 7 Acknowledgments Author’s work was financially supported by LabEx PERSYVAL-Lab and LABEX MME-DII. Sincere gratitude is expressed to Adeline Leclercq-Samson and Eva Löcherbach for numerous discussions, helpful remarks and multiple rereadings of the paper draft. 16 References Cattiaux, P., León, J. R., and Prieur, C. (2014). Estimation for stochastic damping hamiltonian systems under partial observation. ii drift term. ALEA, 11(1):p–359. Cattiaux, P., León, J. R., Prieur, C., et al. (2016). Estimation for stochastic damping hamiltonian systems under partial observation. iii. diffusion term. The Annals of Applied Probability, 26(3):1581–1619. Ditlevsen, S. and Löcherbach, E. (2017). Multi-class oscillating systems of interacting neurons. SPA, 127:1840–1869. Ditlevsen, S. and Samson, A. (2017). Hypoelliptic diffusions: discretization, filtering and inference from complete and partial observations. submitted. Fitzhugh, R. (1961). Impulses and physiological states in theoretical models of nerve membrane. Biophysical Journal, 1(6):445–466. Florens-Zmirou, D. (1989). Approximate discrete-time schemes for statistics of diffusion processes. Statistics: A Journal of Theoretical and Applied Statistics, 20(4):547–557. Gardiner, C. W. and Collett, M. J. (1985). Input and output in damped quantum systems: Quantum stochastic differential equations and the master equation. Phys. Rev. A, 31:3761–3774. Genon-Catalot, V. and Jacod, J. (1993). On the estimation of the diffusion coefficient for multi-dimensional diffusion processes. In Annales de l’IHP Probabilités et statistiques, volume 29, pages 119–151. Genon-Catalot, V., Jeantheau, T., and Larédo, C. (2000). Stochastic volatility models as hidden markov models and statistical applications. bernoulli 6 1051–1079. Mathematical Reviews (MathSciNet), 10:3318471. Hodgkin, A. L. and Huxley, A. F. (1952). A quantitative description of membrane currents and its application to conduction and excitation in nerve. Journal of Physiology-London, 117(4):500–544. Jensen, A. C. (2014). Statistical Inference for Partially Observed Diffusion Processes. Phd thesis, University of Copenhagen. Jensen, A. C., Ditlevsen, S., Kessler, M., and Papaspiliopoulos, O. (2012). Markov chain monte carlo approach to parameter estimation in the fitzhugh-nagumo model. Physical Review E, 86(4):041114. 17 Karatzas, I. and Shreve, S. E. (1987). Brownian Motion and Stochastic Calculus. Graduate Texts in Mathematics. Springer, 1 edition. Kessler, M. (1997). Estimation of an ergodic diffusion from discrete observations. Scandinavian Journal of Statistics, 24(2):211–229. Kloeden, P. E., Platen, E., and Schurz, H. (2003). Numerical solution of SDE through computer experiments. Universitext. Springer. Le-Breton, A. and Musiela, M. (1985). Some parameter estimation problems for hypoelliptic homogeneous gaussian diffusions. Banach Center Publications, 16(1):337–356. Leon, J. R. and Samson, A. (2017). Hypoelliptic stochastic FitzHughNagumo neuronal model: mixing, up-crossing and estimation of the spike rate. Annals of Applied Probability. to appear. Malliavin, P. and Thalmaier, A. (2006). Stochastic calculus of variations in mathematical finance. Springer finance. Springer, 1 edition. Mattingly, J. C., Stuart, A. M., and Higham, D. J. (2002). Ergodicity for sdes and approximations: locally lipschitz vector fields and degenerate noise. Stochastic processes and their applications, 101(2):185–232. Nualart, D. (2006). Malliavin Calculus and Related Topics. Springer. New York. Ozaki, T. (1989). Statistical identification of nonlinear random vibration systems. Journal of Applied Mechanics, 56:186–191. Pokern, Y., Stuart, A. M., and Wiberg, P. (2007). Parameter estimation for partially observed hypoelliptic diffusions. J. Roy. Stat. Soc., 71(1):49–73. Samson, A. and Thieullen, M. (2012). Contrast estimator for completely or partially observed hypoelliptic diffusion. Stochastic Processes and their Applications, 122:2521–2552. Van der Pol, B. (1920). A theory of the amplitude of free and forced triode vibrations. Radio Review, 1(1920):701–710. Wu, L. (2001). Large and moderate deviations and exponential convergence for stochastic damping hamiltonian systems. Stochastic processes and their applications, 91(2):205–238. 18 8 Appendix 8.1 Properties of the scheme Proof of the Proposition 1. Let us consider each integral of (8) separately. Denote: Z t+∆ eJ(t+∆−s) B(Zt ; σ)dW̃s , Wt+∆ = t where we suppress the dependency of the Jacobian of the starting point on the interval in order to keep notations simple. Recalling the Jacobian of system (3) and the definition of the matrix exponent, we have: Z t+∆ Wt+∆ = (I + J(t + ∆ − s) + O(∆2 ))B(Zt ; σ)dW̃s = t    Z t+∆  0 1 + ∂x a1 (t + ∆ − s) ∂y a1 (t + ∆ − s) b(Zt ; σ)dWs + O(∆2 ) = 1 ∂ a (t + ∆ − s) 1 + ∂ a (t + ∆ − s) x 2 y 2 t # " R t+∆ ∂y a1 t (t + ∆ − s)dWs + O(∆2 ) R t+∆ = b(Zt ; σ) R t+∆ dWs + ∂y a2 t (t + ∆ − s)dWs + O(∆2 ) t   0 : Then we can calculate E Wt+∆ Wt+∆ (1) (12) Σ∆ Σ∆ (12) (2) Σ∆ Σ∆   0 E Wt+∆ Wt+∆ = b2 (Zt ; σ)E ! + O(∆4 ), where entries are given by: (1) Σ∆ (12) Σ∆ (2) Σ∆ 2 Z = (∂y a1 )  Z = ∂y a1 2 t+∆ t t+∆ (t + ∆ − s)dWs  Z (t + ∆ − s)dWs t Z t+∆ Z t t+∆ Z  (t + ∆ − s)dWs dWs + ∂y a2 t t 2 t+∆ (t + ∆ − s)dWs dWs + ∂y a2 = t+∆ t The first entry can be easily calculated by the Itô isometry: (1) E[Σ∆ ] 2 Z 2 t+∆ (t + ∆ − s)dWs = (∂y a1 ) E = (∂y a1 ) 2 Z t t 19 t+∆ (t+∆−s)ds = (∂y a1 )2 ∆3 3 Now consider the product of two stochastic integrals in the remaining terms. Assume for simplicity that t = 0. From the properties of the stochastic integrals (Karatzas and Shreve (1987)), it is straightforward to see that:   X X (Wti − Wti−1 ) = E  lim (∆ − s)(Wti − Wti−1 ) n→∞ ti ,ti−1 ∈[0,∆] ti ,ti−1 ∈[0,∆] X   (∆ − s)E (Wti − Wti−1 )2 = = lim n→∞ Z ∆ (∆ − s)ds = 0 ti ,ti−1 ∈[0,∆] ∆2 2 That gives the proposition. 8.2 Auxiliary results In this section we introduce an index in the notation for the time step in order to highlight that it depends on the experimental design. Whenever this dependency is not important, the old notations are used. We start with an important Lemma which links the sampling and the probabilistic law of the continuous process: Lemma 3 (Kessler (1997)). Let ∆ → 0 and N ∆ → ∞, let f ∈ R × Θ → R be such that f is differentiable with respect to z and θ, with derivatives of polynomial growth in z uniformly in θ. Then: Z N Pθ0 1 X f (Zi ; θ) −→ f (z; θ)ν0 (dz) as N → ∞ uniformly in θ. N i=1 Lemma is proven in Kessler (1997) for the one-dimensional case. However, as its proof is based only on ergodicity of the process and the assumptions analogous to ours, and not on the discretization scheme or dimensionality, we take it for granted without giving a formal generalization for a multi-dimensional case. Then proposition 2 in combination with the continuous ergodic theorem and Lemma 3 allow us to establish the following important result: Lemma 4. Let f : R2 × Θ → R be a function with the derivatives of polynomial growth in x, uniformly in θ. Then: 1. Assume ∆N → 0 and N ∆N → ∞. Z N −1 2 PΘ 1 1 X f (Zi ; θ) Xi+1 − Ā1 (Zi ; θ0 ) −→ f (z; θ)b2 (z; σ0 )ν0 (dz) 3 2 (∂ a (Z ; θ )) 3 N ∆N i=0 y 1 i 0 20 2. Assume ∆N → 0 and N ∆N → ∞. Z N −1 2 PΘ 1 X f (Zi ; θ) Yi+1 − Ā2 (Zi ; θ0 ) −→ f (z; θ)b2 (z; σ0 )ν0 (dz) N ∆N i=0 3. Assume ∆N → 0 and N ∆N → ∞. Z n−1   PΘ 1 1 X f (Zi ; θ) f (z; θ)b2 (z; σ0 )ν0 (dz) Xi+1 − Ā1 (Zi ; θ0 ) Yi+1 − Ā2 (Zi ; θ0 ) −→ 2 N ∆2N i=0 (∂y a1 (Zi ; θ0 )) Proof. Let us denote: (1) ζi (2) ζi (1,2) ζi 2 1 f (Zi ; θ) Xi+1 − Ā1 (Zi ; θ0 ) 3 2 N ∆N (∂y a1 (Zi ; θ0 )) 2 1 = f (Zi ; θ) Yi+1 − Ā2 (Zi ; θ0 ) N ∆N   1 f (Zi ; θ) = Xi+1 − Ā1 (Zi ; θ0 ) Yi+1 − Ā2 (Zi ; θ0 ) 2 N ∆N ∂y a1 (Zi ; θ0 ) = Thanks to Proposition 2 we know that: Eθ0 h (1) ζi |Fi i N −1 1 X = f (Zi ; θ)b2 (Zi ; σ0 ) + O(∆N ). 3N i=0 Then from Lemma 3 it follows that for N → ∞ uniformly in θ: Z h i PΘ 1 (1) f (z; θ)b2 (z; σ0 )ν0 (dz). Eθ0 ζi |Fi −→ 3 (2) The same applies for terms ζi (1,2) and ζi . Let us introduce an auxiliary lemma which repeats Lemma 3 in Ditlevsen and Samson (2017). Its proof is based on Lemma 9 from Genon-Catalot and Jacod (1993) and Lemma 3: Lemma 5. Let f : R2 × Θ → R be a function with derivatives of polynomial growth in x, uniformly in θ. 1. Assume ∆N → 0 and N ∆N → ∞. Then N −1 1 X Pθ f (Zi ; θ)(Xi+1 − Ā1 (Zi ; θ0 )) −→ 0 2 N ∆N i=0 uniformly in θ. 21 2. Assume ∆N → 0 and N ∆N → ∞. Then N −1 1 X Pθ f (Zi ; θ)(Yi+1 − Ā2 (Zi ; θ0 )) −→ 0 N ∆N i=0 uniformly in θ. 3. ∆N → 0 and N → ∞. Then N −1 1 X Pθ f (Zi ; θ)(Yi+1 − Ā2 (Zi ; θ0 )) −→ 0 N i=0 uniformly in θ. Proof. Expectation of the first sum tends to zero for ∆N → 0 and N ∆N → ∞ due to Proposition 2. Convergence for θ is due Lemma 9 in GenonCatalot and Jacod (1993) and uniformity in θ follows the proof of Lemma 10 in Kessler (1997). The second and the third assertions are proven in the same way, with the proper scaling. 8.3 Consistency of the estimator Proof of Lemma 1. We can split the contrast in the following sum: 1 lim [3T1 − 3T2 + T3 + T4 ] LN,∆N (θ, σ 2 ; Z0:N ) = N →∞,∆N →0 N →∞,∆N →0 2N lim where terms are given by follows: T1 = N −1 1 X (Xi+1 − Ā1 (Zi ; θ))2 N ∆3N b2 (Zi ; σ)(∂y a1 )2θ i=0 N −1 1 X (Xi+1 − Ā1 (Zi ; θ))(Yi+1 − Ā2 (Zi ; θ)) T2 = N ∆2N b2 (Zi ; σ)(∂y a1 )θ T3 = T4 = 1 N 1 N i=0 N −1 X i=0 N −1 X (Yi+1 − Ā2 (Zi ; θ))2 ∆N b2 (Zi ; σ) log b2 (Zi ; σ) i=0 By the assumption of the lemma (Xi+1 − Ā1 (Zi ; θ)) = (Xi+1 − Ā1 (Zi ; θ0 )), what in combination with Lemma 5 gives the convergence in probability to 22 zero for terms T1 and T2 . T4 converges in probability to due to Lemma 3. Consider T3 : T3 = R log b2 (z; σ)ν0 (dz) N −1  1 X 1 (Yi+1 − Ā2 (Zi ; θ0 ))2 + (Yi+1 − Ā2 (Zi ; θ0 ))(Ā2 (Zi ; θ0 ) − Ā2 (Zi ; θ))+ 2 N ∆N b (Zi ; σ) i=0 2 (Ā2 (Zi ; θ0 ) − Ā2 (Zi ; θ))  N −1 1 X (Yi+1 − Ā2 (Zi ; θ0 ))2 = + N ∆N b2 (Zi ; σ) i=0 ∆N N ∆N N −1 X i=0 N −1 (Yi+1 − Ā2 (Zi ; θ0 ))(a2 (Zi ; θ0 ) − a2 (Zi ; θ)) ∆2N X (a2 (Zi ; θ0 ) − a2 (Zi ; θ))2 + b2 (Zi ; σ) N ∆N b2 (Zi ; σ) i=0 Thanks to Lemma 4 and 5 we conclude that Z 2 b (z; σ0 ) Pθ T3 −→ ν0 (dz) + 0 + 0 b2 (z; σ) That gives the result. Proof of Lemma 2. Consider  ∆N  LN,∆N (θ, σ02 ; Z0:N ) − LN,∆N (θ0 , σ02 ; Z0:N ) = T1 + T2 + T3 + T4 , N where the terms are given as follows: " 2 2 # N −1 Xi+1 − Ā1 (Zi ; θ) Xi+1 − Ā1 (Zi ; θ0 ) 6∆N X 1 − T1 = (∂y a1 (Zi ; θ))2 (∂y a1 (Zi ; θ0 ))2 N ∆3N i=0 b2 (Zi ; σ0 ) "    # N −1 Xi+1 − Ā1 (Zi ; θ0 ) Yi+1 − Ā2 (Zi ; θ0 ) 6∆N X Xi+1 − Ā1 (Zi ; θ) Yi+1 − Ā2 (Zi ; θ) − T2 = − ∂y a1 (Zi ; θ)b2 (Zi ; σ0 ) ∂y a1 (Zi ; θ0 )b2 (Zi ; σ0 ) N ∆2N i=0  N −1  2∆N X (Yi+1 − Ā2 (Zi ; θ))2 − (Yi+1 − Ā2 (Zi ; θ0 ))2 T3 = N ∆N b2 (Zi ; σ0 ) i=0   N −1 ∂y a1 (Zi ; θ) ∆N X T4 = log N ∂y a1 (Zi ; θ0 ) i=0 23 Consider term T1 : " 2 N −1 Xi+1 − Ā1 (Zi ; θ0 ) + Ā1 (Zi ; θ0 ) − Ā1 (Zi ; θ) 6∆N X 1 T1 = − (∂y a1 (Zi ; θ))2 N ∆3N i=0 b2 (Zi ; σ0 ) 2 #   N −1 2 Xi+1 − Ā1 (Zi ; θ0 ) 6∆N X 1 1 = X − Ā (Z ; θ ) − i+1 1 i 0 (∂y a1 (Zi ; θ0 ))2 (∂y a1 (Zi ; θ)) N ∆3N i=0 b2 (Zi ; σ0 )   ∆N 1 + Xi+1 − Ā1 (Zi ; θ0 ) (a1 (Zi ; θ0 ) − a1 (Zi ; θ))+ (∂y a1 (Zi ; θ0 )) (∂y a1 (Zi ; θ))  ∆2N 2 (a1 (Zi ; θ0 ) − a1 (Zi ; θ)) . (∂y a1 (Zi ; θ))2 Recalling Lemmas 3, 5 and 4 we have that: 2   N −1 6 X Xi+1 − Ā1 (Zi ; θ0 ) 1 1 Pθ − −→ 0 2 2 b (Zi ; σ0 ) (∂y a1 (Zi ; θ)) (∂y a1 (Zi ; θ0 )) N ∆N 6 N ∆N i=0 N −1 X  1 Pθ X − Ā (Z ; θ ) (a1 (Zi ; θ0 ) − a1 (Zi ; θ)) −→ 0 i+1 1 i 0 b2 (Zi ; σ0 )(∂y a1 (Zi ; θ)) i=0 Z N −1 X 6 (a1 (Zi ; θ0 ) − a1 (Zi ; θ))2 Pθ (a1 (z; θ0 ) − a1 (z; θ))2 −→ 6 ν0 (dz). N b2 (Zi ; σ0 )(∂y a1 (Zi ; θ))2 b2 (z; σ0 )(∂y a1 (z; θ))2 i=0 Now consider T2 : "  N −1 6 X Xi+1 − Ā1 (Zi ; θ0 ) + Ā1 (Zi ; θ0 ) − Ā1 (Zi ; θ) Yi+1 − Ā2 (Zi ; θ0 ) + Ā2 (Zi ; θ0 ) − Ā2 (Zi ; θ − N ∆N b2 (Zi ; σ0 )∂y a1 (Zi ; θ) i=0 "  #   N −1 Xi+1 − Ā1 (Zi ; θ0 ) Yi+1 − Ā2 (Zi ; θ0 ) 6 X Xi+1 − Ā1 (Zi ; θ0 ) Yi+1 − Ā2 (Zi ; θ0 ) =− b2 (Zi ; σ0 )∂y a1 (Zi ; θ0 ) N ∆N b2 (Zi ; σ0 ) i=0     1 1 ∆N − + 2 Xi+1 − Ā1 (Zi ; θ0 ) (a2 (Zi ; θ0 ) − a2 (Zi ; θ))+ (∂y a1 (Zi ; θ)) (∂y a1 (Zi ; θ0 )) b (Zi ; σ0 )(∂y a1 (Zi ; θ))   ∆2N Yi+1 − Ā2 (Zi ; θ0 ) (a1 (Zi ; θ0 ) − a1 (Zi ; θ)) + (a1 (Zi ; θ0 ) − a1 (Zi ; θ))(a2 (Zi ; θ0 ) − a2 (Zi ; θ (∂y a1 (Zi ; θ)) Thanks to Lemma 5 we know that: − N −1   6 X 1 Xi+1 − Ā1 (Zi ; θ0 ) (a2 (Zi ; θ0 ) − a2 (Zi ; θ))+ 2 N b (Zi ; σ0 )(∂y a1 (Zi ; θ)) i=0   Pθ Yi+1 − Ā2 (Zi ; θ0 ) (a1 (Zi ; θ0 ) − a1 (Zi ; θ)) −→ 0 24 and, respectively, for the cross-term we have: N −1 6∆N X 1 Pθ − (a1 (Zi ; θ0 ) − a1 (Zi ; θ))(a2 (Zi ; θ0 ) − a2 (Zi ; θ)) −→ 0. 2 N b (Zi ; σ0 )(∂y a1 (Zi ; θ)) i=0 Finally, by Lemma 4:    N −1 6 X Xi+1 − Ā1 (Zi ; θ0 ) Yi+1 − Ā2 (Zi ; θ0 ) (∂y a1 (Zi ; θ0 )) Pθ − 1 −→ 0. − 2 N ∆N b (Zi ; σ0 )(∂y a1 (Zi ; θ0 )) (∂y a1 (Zi ; θ)) i=0 Finally, consider the term T3 : N −1  2 X 1 T3 = (Yi+1 − Ā2 (Zi ; θ0 ))2 + (Yi+1 − Ā2 (Zi ; θ0 ))(Ā2 (Zi ; θ0 ) − Ā2 (Zi ; θ))+ 2 N b (Zi ; σ0 ) i=0  (Ā2 (Zi ; θ0 ) − Ā2 (Zi ; θ))2 − (Yi+1 − Ā2 (Zi ; θ0 ))2 = N −1   2 X 1 ∆N (Yi+1 − Ā2 (Zi ; θ0 ))(a2 (Zi ; θ0 ) − a2 (Zi ; θ)) + ∆2N (a2 (Zi ; θ0 ) − a2 (Zi ; θ))2 2 N b (Zi ; σ0 ) i=0 P θ Lemma 5 implies that T3 −→ 0. The same holds for T4 . Thus, we indeed have  Pθ ∆N  LN,∆N (θ, σ02 ; Z0:N ) − LN,∆N (θ0 , σ02 ; Z0:N ) −→ N →∞,∆N →0 N Z (a1 (z; θ0 ) − a1 (z; θ))2 6 ν0 (dz). (19) b2 (z; σ0 )(∂y a1 (z; θ))2 lim Note that we cannot infer the value of ψ with that scaling because the estimator for each variable converges with a different speed. Thus, we fix the parameter ϕ to ϕ0 and consider the same sum, but with a different scaling, namely:  1  1 LN,∆N (θ, σ02 ; Z0:N ) − LN,∆N (θ0 , σ02 ; Z0:N ) = 2 [T1 +T2 +T3 +T4 ] N →∞,∆N →0 N ∆N ∆N lim As ψ ≡ ψ0 , we only have to consider term 1 T ∆2N 3 N −1  1 2 X 1 T3 = ∆N (Yi+1 − Ā2 (Zi ; θ0 ))(a2 (Zi ; θ0 ) − a2 (Zi ; θ))+ 2 2 2 ∆N N ∆N i=0 b (Zi ; σ0 )  ∆2N (a2 (Zi ; θ0 ) − a2 (Zi ; θ))2 25 From Lemma 3 and 5 we conclude that Z 1 (a2 (z; θ0 ) − a2 (z; θ))2 Pθ T −→ 2 ν0 (dz) 3 b2 (z; σ0 ) ∆2N (20) Then (19)-(20) give the lemma. Proof of Lemma 3. Let us now consider the following difference: N −1 1 X 1 (Xi+1 − Ā1 (Zi ; θ))2 2 [LV F (Z0:N ; θ) − LV F (Z0:N ; θ0 )] = N ∆2 N ∆N N i=0  2 2 +(Yi+1 − Ā2 (Zi ; θ)) − (Xi+1 − Ā1 (Zi ; θ0 )) − (Yi+1 − Ā2 (Zi ; θ0 ))2 N −1 1 X = 2(Xi+1 − Ā1 (Zi ; θ0 ))(Ā1 (Zi ; θ0 ) − Ā1 (Zi ; θ)) + (Ā1 (Zi ; θ0 ) − Ā1 (Zi ; θ))2 N ∆2N i=0  +2(Yi+1 − Ā2 (Zi ; θ0 ))(Ā2 (Zi ; θ0 ) − Ā2 (Zi ; θ)) + (Ā2 (Zi ; θ0 ) − Ā2 (Zi ; θ))2 Then we have from Lemmas 4, 5: N −1 2∆2N X Pθ (Xi+1 − Ā1 (Zi ; θ0 ))(a1 (Zi ; θ0 ) − a1 (Zi ; θ)) −→ 0 N ∆2N i=0 N −1 2∆2N X Pθ (Yi+1 − Ā2 (Zi ; θ0 ))(a2 (Zi ; θ0 ) − a2 (Zi ; θ)) −→ 0 2 N ∆N i=0 Z N −1 ∆2N X 2 Pθ (a (Z ; θ ) − a (Z ; θ)) −→ (a1 (z; θ0 ) − a1 (z; θ))2 ν0 (dz) 1 i 0 1 i N ∆2N i=0 Z N −1 ∆2N X 2 Pθ (a2 (Zi ; θ0 ) − a2 (Zi ; θ)) −→ (a2 (z; θ0 ) − a2 (z; θ))2 ν0 (dz) N ∆2N i=0 From that we can conclude that there exists a subsequence θ̂N,∆N = arg minLV F (Z0:N ; θ) θ that tends to θ∞ . Then the result follows from the identifiability of the drift functions. 26
10math.ST
ON CONJUGACY CLASSES OF Sn CONTAINING ALL IRREDUCIBLES SHEILA SUNDARAM arXiv:1607.08581v3 [math.GR] 22 Mar 2018 For Priyanka Abstract. It is shown that for the conjugation action of the symmetric group Sn , when n = 6 or n ≥ 8, all Sn -irreducibles appear as constituents of a single conjugacy class, namely, one indexed by a partition λ of n with at least two parts, whose parts are all distinct and taken from the set of odd primes and 1. The following simple characterisation of conjugacy classes containing all irreducibles is proved: If n 6= 4, 8, the partition λ of n indexes a global conjugacy class for Sn if and only if it has at least two parts, and all its parts are odd and distinct. 1. Introduction Consider the conjugation action of Sn on itself. Its orbits are the conjugacy classes, indexed by partitions λ of n. In this paper we address the following question: Is there a single conjugacy class which contains all the irreducibles for the conjugation action of Sn ? This question was answered affirmatively for the alternating group An and for other simple sporadic groups in [3, Theorem 1.6], where such a conjugacy class is called a global class. Our result is the following (see also Theorem 5.1): Theorem 1.1. For n ≥ 2, there is a global conjugacy class for the conjugation action of Sn if and only if n = 6 or n ≥ 8. More precisely, let λ be a partition of n into distinct parts, such that all parts greater than 1 are odd primes, and such that λ has at least two parts. In this case, every Sn -irreducible occurs in the conjugacy class indexed by λ, provided n = 6 or n ≥ 9. If n = 8, every S8 -irreducible occurs in the class indexed by the partition (7, 1). It follows immediately that (for n ≥ 8) the permutation module arising from the conjugation action of Sn on itself, as well as the twisted analogue of this action studied in [8], both contain a copy of every Sn -irreducible. For the conjugacy action, proofs that this fact holds for all n ≥ 3 were given by A. Frumkin, D. Passman and T. Scharf respectively, in [2], [6, Theorem 1.10] and [7], in each case by a different method; a more general result was proved in [8]. For the sign-twisted conjugacy action the analogous result was shown to hold for all n in [8, Theorem 4.9]. A related question is Passman’s problem of determining the kernel of the adjoint representation of the group algebra. In [6], Passman proves that the conjugacy action for Sn contains every irreducible by showing the equivalent statement [6, Lemma 1.12], that the kernel of the adjoint action is trivial. Heide and Zalesski ([3]; see also [4]) conjecture that for a finite simple group, this kernel is trivial if and only if the group G admits a global conjugacy class (see [3], p.165, remarks leading to Conjecture 1.5). Date: 3 February 2016; revised 28 September 2016, 27 February 2017. 2010 Mathematics Subject Classification. 20C05, 20C15, 20C30, 05E18, 06A07. 1 2 SHEILA SUNDARAM Theorem 1.1 strengthens and gives an alternative proof of [8, Theorem 4.17] that the Sn -conjugacy action on the subset of even permutations contains every irreducible. Our proof of Theorem 1.1 uses the description of the ordinary and twisted conjugacy action as the symmetric or exterior power of the conjugation action of Sn on an ncycle. This formulation was exploited in [8] to derive many properties of these and other related representations. In the next section we summarise the key facts from [8] that are used in this paper, referring to [5] for background on symmetric functions. 2. Preliminaries Consider the representation 1 ↑SCnn of Sn obtained by inducing the trivial representation of a cyclic subgroup Cn of order n. Clearly this is the representation afforded by the conjugation action on the class of n-cycles. Let fn denote the Frobenius characteristic (see [5]) of the induced representation 1 ↑SCnn of Sn obtained by inducing the trivial representation of a cyclic subgroup Cn of order n. Let hn and en denote respectively the homogeneous and elementary symmetric functions of degree n, and let [ ] denote the plethysm operation. Then it is clear that conjugation on the conjugacy class indexed by Q a partition λ of n with mi parts equal to i, has Frobenius characteristic Hλ [F ] = characteristic of the twisted conjugation action i≥1 hmi [fi ]. Similarly, the FrobeniusQ on the class indexed by λ is Eλ [F ] = i≥1 emi [fi ]. In particular, when λ consists of distinct parts λi , the Frobenius characteristic of both the ordinary and twisted conjugation actions Q on the conjugacy class indexed by λ is simply the product of symmetric functions i fλi . A crucial property of the representations fn , stated in Proposition 3.1, and proved in [8], allows us to determine when the representation corresponding to these products contains every Sn -irreducible.Q The crux of our arguments therefore lies in a detailed analysis of the products i fλi . Since the Schur function sλ is the Frobenius characteristic of the irreducible indexed by λ, we are led to products of Schur functions and the Littlewood-Richardson rule. Recall [5] that a lattice permutation of weight ν is a sequence of positive integers with the number i appearing νi times, such that in any initial segment of the sequence, the number of i’s is never less than the number of (i + 1)’s. For partitions λ, µ, ν, the multiplicity of the Schur function sλ in the product sµ sν , is the Littlewood-Richardson coefficient (or LR-coefficient) cλµ,ν ([5]). This coefficient counts the number of semistandard fillings of weight ν of the skew-shape λ/µ, i.e., one that is weakly increasing in the rows, left to right, and strictly increasing down the columns, with the property that when this filling is read right to left along rows, and top to bottom down the (skew-)shape, the resulting sequence is a lattice permutation. We record the following basic facts ([5]) to summarise the key properties of the Littlewood-Richardson coefficient that we will need: Proposition 2.1. The following are equivalent for partitions λ, µ, ν : (1) (2) (3) (4) sλ appears in the product sµ sν ; sν appears in sλ/µ ; cλµ,ν ≥ 1; there is a semi-standard tableau of weight ν of the skew-shape λ/µ, such that when the tableau is read right to left along rows and top to bottom down the skew-shape, the resulting sequence is a lattice permutation. ON CONJUGACY CLASSES OF Sn CONTAINING ALL IRREDUCIBLES 3 Furthermore, given partitions λ and µ, there is a partition ν satisfying one of the above equivalent conditions if and only if µ ⊂ λ. 3. The ingredients of the proof The characterisation of a global Sn -class as given in Theorem 1.1 is motivated by the following key property regarding the irreducibles appearing in fn . This property was established in [8] using the well-known character values of the representation fn . Proposition 3.1. [8, Lemma 4.7] If k is an odd prime then the coefficient of sµ in the Schur function expansion of fk is a positive integer for every partition µ of k except µ = (k − 1, 1) and µ = (2, 1k−2). We will need several technical lemmas, which we state in terms of a class of functions whose definition is motivated by Proposition 3.1. Definition 3.2. Define symmetric functions An and gn (n ≥ 0), as follows: P P An = µ⊢n sµ for n ≥ 1, gn = µ⊢n,µ,µt 6=(n−1,1) sµ for n ≥ 3. Also define g2 = A2 = s(2) + s(12 ) , g1 = A1 = s(1) , and g0 = A0 = 1. Thus gn = An − (s(n−1,1) + s(2,1n−2 ) ) for n ≥ 4, while g3 = A3 − s(2,1) . Lemma 3.3. Let q ≥ 5 and n ≥ q + 1, or q = 3, 4 and n ≥ q + 2. Let λ be any partition of n. Then λ contains a partition µ̄ of q different from (q − 1, 1) and (2, 1q−2). Proof. Certainly λ contains some partition of q; suppose first that it contains (q − 1, 1). First suppose λ1 ≥ λ2 ≥ 2, i.e., the Ferrers diagram of λ contains a 2 by 2 square. If q ≥ 4, we can take µ̄ = (q − 2, 2). If q = 3, then since n ≥ 5, there is at least one additional cell in λ. If this cell is in row 1 or row 2, we may take µ̄ = (3). Otherwise we may take µ̄ = (13 ). Now suppose the Ferrers diagram of λ does not contain a 2 by 2 square, so it must be a hook (r, 1n−r ), where q − 1 ≤ r ≤ n − 1. Take µ̄ = (q) if r ≥ q. Otherwise r = q − 1, and n − r = n − q + 1 ≥ 2, so we may take µ̄ = (q − 2, 12). This poses a problem only if q = 4. But then λ = (3, 1n−3 ), and since n ≥ q + 2 = 6, we can take µ̄ = (14 ). The case when λ contains µ = (2, 1q−2) is easily treated by applying the previous argument to the transpose or conjugate shape λt .  Lemma 3.4. Let q ≥ 5 and n ≥ q + 1, or q = 3, 4 and n ≥ q + 2, or q = 1, 2 and n ≥ q. Then for every partition λ of n, the Schur function sλ appears in the product An−q gq . Equivalently, there are partitions µ of n−q and ν of q, ν ∈ / {(q−1, 1), (2, 1q−2)} for q ≥ 3, λ such that the LR-coefficient cµ,ν is positive. In particular, this holds for A1 gq = g1 gq for all q 6= 3, 4, and for A2 gq for all q. Proof. From Lemma 3.3 (for q ≥ 3), or by the definition of gq (for q = 1, 2), we know that there is a partition ν of q contained in λ such that sν appears as a summand of gq . By Proposition 2.1 there is a partition µ of n − q such that the LR-coefficient cλµ,ν is nonzero, i.e., such that sλ appears in the product sµ sν . By the definition of An−q , the result follows.  Note that the conditions in the hypothesis are tight: A1 g4 = g4 s(1) does not contain the Schur function corresponding to the hook (3, 12 ), and A1 g3 = g3 s(1) does not contain the Schur function indexed by (2, 2). 4 SHEILA SUNDARAM The next lemma is the heart of this paper. We defer the proof to the next section, because the arguments are technical and unilluminating beyond their immediate context. Lemma 3.5. Let p > q ≥ 4, or p ≥ 6, q = 3, or p = 4, q = 3. Then in the Schur function expansion of gp gq , the Schur function sλ appears with positive coefficient for every partition λ of p + q. Equivalently, there are partitions µ of p, µ ∈ / {(p − 1, 1), (2, 1p−2)}, q−2 and ν of q, ν ∈ / {(q − 1, 1), (2, 1 )}, such that the LR-coefficient cλµ,ν is positive. Again, the conditions in the hypothesis are tight: one checks by direct computation that sλ does not appear in g5 g3 for λ = (42 ), (24 ), and does not appear in g42 for λ = (6, 12), (3, 15), (4, 2, 12) and (32 , 2). However g4 g3 does contain all the irreducibles; this is checked by direct computation. Finally g32 does not contain sλ for λ = (3, 2, 1). We now state conditions, one necessary and two sufficient, for a conjugacy class to be global. Proposition 3.6. Let λ be a partition of n. (1) If λ indexes a global conjugacy class, then all its parts must be odd and distinct, and it must have at least two parts. (2) If n − 1 is a prime greater than or equal to 5, the class indexed by the partition (n − 1, 1) is a global conjugacy class for Sn . (3) If λ is a partition not containing 1 which indexes a global conjugacy class for Sn , then the partition λ ∪ {1} indexes a global conjugacy class for Sn+1 . These facts also hold for the twisted conjugacy action of Sn . Proof. For Part (1), recall from Section 2 that the Frobenius characteristic of the conQ jugacy action on the class indexed by λ is the product of plethysms i hmi [fi ] where the part i occurs mi times in λ. By restricting the sign representation to an i-cycle, it follows easily by reciprocity that if i is even then fi does not contain s(1i ) . One way to see this is to invoke Proposition 2.1, which shows that the sign representation s(1n ) occurs in a product of two Schur functions if and only if the latter are both equal to the sign representation. Thus if mi ≥ 2 or i is even, the sign representation cannot occur in hmi [fi ] and the claim follows. For the twisted conjugacy action, one checks that the sign representation occurs in emi [fi ] if and only if i is odd, and the trivial representation occurs if and only if mi = 1; hence the claim. Part (2) follows from Proposition 3.1 and Lemma 3.4, with q = n − 1, since n ≥ 6 and the representation fn−1 contains the representation gn−1 . For Part (3), first note that if Fλ denotes the representation on the conjugacy class indexed by λ, and 1 is NOT a part of λ, then the representation on the class λ ∪ {1} is obtained by inducing up and thus its Frobenius characteristic is Fλ · f1 . Now the claim follows by reciprocity: it suffices to observe, (using the notation of Definition 3.2), that Fλ contains An if λ is a global class, since An contains all irreducibles, and the multiplicity of sµ in An · f1 equals the inner product hAn , sµ/(1) i, which is nonzero by definition of An .  In order to apply Proposition 3.1 to the proof of Theorem 1.1, we will need a numbertheoretic result on the representation of an integer as a sum of primes due to R. Dressler. We state Dressler’s result as a proposition. Proposition 3.7. [1] Every positive integer n 6= 1, 2, 4, 6, 9 can be written as a sum of distinct odd primes. ON CONJUGACY CLASSES OF Sn CONTAINING ALL IRREDUCIBLES 5 Corollary 3.8. Every even integer n ≥ 8 can be written as a sum of at least two distinct odd primes, and every odd integer n ≥ 9 can be written as a sum of 1 and at least two distinct odd primes. Proof. The first statement is simply Dressler’s result above. For odd n ≥ 9 it suffices to apply the theorem to the even integer n − 1, which must be a sum of at least two distinct odd primes.  Recall that fn denotes the Frobenius characteristic of the representation 1 ↑SCnn of Sn , where Cn is a cyclic subgroup of order n, i.e., of the conjugacy action on n-cycles. We now have all the ingredients necessary to complete the Proof of Theorem 1.1: Recall that if λ consists of distinct parts λi , the Frobenius characteristic of both the ordinary and twisted conjugation action on the conjugacy Q class indexed by λ is simply the product i fλi . Let n ≥ 10. By Corollary 3.8, there is a partition λ of n with distinct parts taken from the set containing 1 and the odd primes, such that the number of odd parts greater than 1 is at least two. From Proposition 3.1 we know that, as representations, fλi contains gλi for every part λi of λ. Lemma 3.5 tells us when the product of two gk ’s will contain all irreducibles, and Lemma 3.4 tells us when a product of the form An−k gk will contain all irreducibles. We will apply Lemma 3.5 once, and then repeatedly invoke Lemma 3.4. For the two largest parts, we have p = λ1 > q = λ2 ≥ 3. Invoking Lemma 3.5, (noting that if q = 3 then p ≥ 7), we see that sµ appears in the product fp fq for every partition µ of p + q. Equivalently, fp fq contains Ap+q as representations. Denote the remaining smaller parts of λ (if Qany) by µ1 > . . . > µr ≥ 1; i.e., λ = {p, q} ∪ µ. Consider the k product Fk = fp fq i=1 fµi , for k = 1, . . . , r. We claim that, as a representation, Fk contains all irreducibles. Because all integers involved are distinct, p ≥ q + 1 and q ≥ µ1 + 1, so p + q ≥ 2µ1 + 3 > µ1 + 2. Hence we can invoke Lemma 3.4 to conclude that F1 = (fp fq ) · fµ1 contains all irreducibles, since it contains the product Ap+q gµ1 , i.e., it contains Ap+q+µ1 as a representation. Now iterate Lemma 3.4. For the inductive P step note that p + q + ki=1 µi > µk+1 + 2 for all k < r. We conclude that Fk contains all irreducibles. When n < 10, one has, from Proposition 3.6 (3) and Lemma 3.4: (1) For each of the cases n = 6, 8, 9, the following partitions respectively index a unique global conjugacy class: (5, 1), (7, 1), (5, 3, 1). (See the remarks following Lemma 3.5: the product g5 g3 does not contain all irreducibles.) (2) For 2 ≤ n ≤ 5 and n = 7, there is no global conjugacy class. This finishes the proof of Theorem 1.1.  The above argument in fact establishes the global property of containing every irreducible for a general class of representations. Let Wn be the Sn -module whose Frobenius characteristic is gn . For any partition λ of n, let Wλ be the Sn -module whose Frobenius Q characteristic is the product i gλi . It is immediate from Lemmas 3.4 and 3.5 that Wλ contains all irreducibles in each of the cases below. (1) λ = (1n ), or λ contains the part 1 and also a part k for some k 6= 3, 4 or (2) λ contains both 3 and 4 as parts, or 2 is a part of λ, or (3) λ has at least two distinct parts p > q ≥ 4, or p ≥ 6, q = 3. 6 SHEILA SUNDARAM (For Part (3) use Lemma 3.5 and the remark following it to conclude that for the smallest pair of parts s > t, we have that gs gt contains As+t , and s + t ≥ 7; now iterate Lemma 3.4 as above.) Checking that g1 g32, g33 and g43 contain all irreducibles, while g1 g42 lacks s(33 ) , we have: Theorem 3.9. Every irreducible appears in Wλ for all λ with at least two parts except the following six partitions: λ = (3, 1), (4, 1), (3, 3), (4, 4), (5, 3), (4, 4, 1). 4. Proof of Lemma 3.5 In this section we prove Lemma 3.5 via a case-by-case analysis. The case p = 4, q = 3 is checked by direct computation of the Schur function expansion of g4 g3 , so we will confine ourselves to the other cases. Proof. Let λ be any partition of p + q. If there are partitions µ of p and ν of q such that µ ∈ / {(p − 1, 1), (2, 1p−2)} and ν ∈ / {(q − 1, 1), (2, 1q−2)} and sλ appears in the Schur function expansion of the product sµ · sν , then sλ appears with positive coefficient in the product gp gq . Our goal is to show that such partitions µ, ν always exist, using Proposition 2.1. We may assume λ ∈ / {(n − 1, 1), (2, 1n−2)}, by observing that s(n−1,1) appears in the product s(p) s(q) and s(2,1n−2 ) appears in the product s(1p ) s(1q ) . By Lemma 3.3, there is a µ ⊂ λ such that sµ appears in gp . Hence there is at least one partition ν of q such that sλ appears in the Schur function expansion of the product g p sν . We need to take care of the cases ν = (q − 1, 1), (2, 1q−2). The case ν = (2, 1q−2 ) for λ follows from the conjugate case ν = (q − 1, 1) for λt , since the sum gk is self-conjugate. Thus it suffices to consider ν = (q − 1, 1). By analysing the possible configurations of λ/µ, we show that it is possible to find a ν̄ which is neither (q − 1, 1) nor its transpose, and a partition µ̄ of p such that µ̄ is neither (p − 1, 1) nor its transpose, for which sλ appears in the product sµ̄ sν̄ . Equivalently, the LR-coefficient cλµ̄,ν̄ is positive. Suppose λ/µ is a horizontal strip, i.e., no two squares occur in the same column. In this case clearly the skew-shape can be filled with all 1’s, which is a lattice permutation, and hence cλµ,(q) 6= 0. Henceforth we assume λ/µ is NOT a horizontal strip. We will treat the cases q ≥ 4 and q = 3 separately. First let q ≥ 4. We shall further distinguish between a connected shape λ/µ (Cases 1-3 below) and a disconnected one (Cases 4-6 below). We consider first the case when the skew-shape is connected (and q ≥ 4). The most general connected configuration admitting a lattice permutation of weight (q − 1, 1) is as in Figure 1 below, where the skew-shape is connected, occupies two consecutive rows, and has exactly one pair of squares appearing in the same column. Let us call the inner corner cell d. If d appears in row i and column j of the Ferrers diagram of λ, let c1 be the cell in row i + 1 and column j − 1, and let c2 be the cell in row i and column j + 1. Note that at least one of these two cells must exist in λ, in order to accommodate a lattice permutation of weight (q − 1, 1), since q ≥ 4. X X X X X X X X X X X X X X X d c2 . . . . . . . . . X X . . . c1 . . . X X ON CONJUGACY CLASSES OF Sn CONTAINING ALL IRREDUCIBLES 7 Figure 1: λ/µ is NOT a horizontal strip, and admits a lattice permutation filling of weight (q − 1, 1) Case 1: Assume cells c1 and c2 both exist in λ. Fill the first row of the skew-shape with all 1’s. For the second row of the skew-shape, put 2’s in the cell below d and in cell c1 , and 1’s for the remaining cells to the left of c1 . This gives a lattice permutation, since there are at least two 1’s preceding the 2’s: both cell d and cell c2 are filled with 1’s. It has weight (q − 2, 2), and hence for ν̄ = (q − 2, 2), we have cλµ,ν̄ 6= 0, and thus sλ appears in the product sµ · sν̄ , hence in gp · gq . Case 2: Cell c2 does not exist in λ, so that we have the “backwards L”configuration of Figure 2a. X X X X X X X X X X X X X X X X X′ d X X y . . . c1 Figure 2a X X In this case the cell in row i + 1 and column j (immediately below d) is a cell on the south-east boundary of λ. Let X ′ be the cell in row i and column j − 1, (i.e., immediately to the left of cell d) and let y be the cell of λ in row i + 1 which is immediately adjacent to µ. Thus y is a cell of λ/µ, while X ′ is a cell of µ. Note that y 6= c1 since λ/µ has size q ≥ 4. Consider the partition µ̄ = µ ∪ {y}\{X ′}, still a partition of p. Then λ/µ̄ consists of a 2 by 2 square on the south-east boundary of λ together with (q − 4) squares in row (i + 1). It can therefore be filled with a lattice permutation of weight (q − 2, 2) (see Figure 2b). X X X X X X X X X X X X X X X X 1 1 X X 1 2 1 2 Figure 2b X X Now we need only check that µ̄ is not of shape (p − 1, 1) or (2, 1p−2). In the former case, we would be forced to conclude that µ̄ has only (q − 2) squares (since the cell y can be the only cell of µ̄ in row i + 1), a contradiction since |µ̄| = |µ| = p > q. In the latter case, the cell occupied by y is a boundary cell of λ, so the only way this can happen is if µ̄ = (2, 1), and thus the size of µ̄ is 3. But then p = 3 and q ≥ 4, a contradiction to the hypothesis that p > q. Thus µ̄ is the shape we seek, and sλ appears in the product sµ̄ · s(q−2,2) , hence in gp · gq . Case 3: Cell c1 does not exist in λ, so that we have the configuration in Figure 3. 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 d c2 . . . . . . . . . Figure 3 X X X X X X Here we have four sub-cases to consider: Recall that d is in row i, column j. Subcase 3a: Suppose that either i ≥ 3 and j is arbitrary, or i = 2 and j ≥ 2, and assume there is a corner cell X ′ of λ occupying a column j ′ > j + q − 2, i.e., a corner cell that is strictly to the right of the right-most cell in the 8 SHEILA SUNDARAM skew-shape. In particular, X ′ will be strictly to the right of the cell c2 . See Figure 3a. X X X X X X X X X X X X X X X X X X X X X X X′ Figure 3a X X X X d c2 . . . . . . . . . X X X X X X Take µ̄ = µ ∪ {d}\{X ′}. Then µ̄ must contain a 2 by 2 square (this is clear if i ≥ 3; if i = 2, then since j ≥ 2, the cell d is the bottom right corner of the 2 by 2 square.) Thus µ̄ cannot be one of the forbidden shapes, and λ/µ̄ is a horizontal strip. Hence cλµ̄,(q) 6= 0 and sλ appears in the product sµ̄ · s(q) . Subcase 3b: Again consider the case when either i ≥ 3 and j is arbitrary, or i = 2 and j ≥ 2, but now assume there is no corner cell of λ occupying a column j ′ > j + q − 2. Rows 1, . . . , i of λ must therefore all have the same length. Let X ′ be the cell in row (i − 1) and column j + q − 2, immediately above the right-most cell of the skew-shape λ/µ. Note that as long as q ≥ 4, the right-most cell of the skew-shape is not c2 . Take µ̄ = µ ∪ {d}\{X ′} exactly as in Subcase 3a. The new skew-shape can clearly be filled with a lattice permutation of weight (q − 2, 2) : see Figures 3b and 3b’. Note that µ̄ is a shape appearing in gp , because it contains a 2 by 2 square as in Subcase 3a. X X X X X X X X X X X X X X X X X X′ X X X X d c2 . . . . . . . . . Figure 3b X X X X X X X X X X X X X X X X X X X X X X X 1 X X X X d 1 1 1 2 Figure 3b’ X X X X 2 X X Subcase 3c: Assume that i = 2 but j = 1; thus µ consists of only the first row of λ, i.e., a single row lying above the shape (q − 1, 1), as in Figure 3c. X X X X X X X′′ X′ d c2 . . . . . . . . . Figure 3c In this case, since µ has size p ≥ (q − 1) + 2, the single row of µ must exceed the next (second) row of λ by at least 2 squares. Let X ′ and X ′′ be the two squares at the end of the first row, as in Figure 3c. Taking µ̄ = µ ∪ {d, c2 }\{X ′, X ′′ }, we see that λ/µ̄ is a horizontal strip, thus admitting a lattice permutation of weight (q), and µ̄ has a 2 by 2 square. Hence in this case sλ appears in the product sµ̄ · s(q) , and sµ̄ appears in gp . ON CONJUGACY CLASSES OF Sn CONTAINING ALL IRREDUCIBLES 9 Subcase 3d: Now assume that i = 1 (and hence necessarily j ≥ 2), i.e., the skew-shape spans the first two rows of λ, as in Figure 3d. X X X X ′ d c2 . . . . . . . . . Figure 3d X X X Y X X Let X ′ be the cell in row 1, column j − 1 (i.e., immediately to the left of cell d) and let Y be the cell of µ just below X ′ . First suppose that X ′ , Y are in column 1 of µ. See Figure 3d’. X ′ d c2 . . . . . . . . . Y X Figure 3d’ X X Z1 Z2 This means µ = (1p ); since p ≥ q +1 ≥ 5, there are at least 3 cells in column 1 of µ below the cell Y. Let Z1 , Z2 be the two bottom-most cells in µ. Let µ̄ = µ ∪ {d, c2 }\{Z1 , Z2}. It is clear that this produces a partition µ̄ of p of shape (3, 1p−3) whose Schur function appears in gp because p − 3 ≥ 2. The skew-shape λ/µ̄ consists of a horizontal strip (from the first two rows) of size q−2, of which one square (in row 2) is disconnected, and a connected vertical strip of size 2, i.e., one that will admit a lattice permutation of weight (q − 2, 2). Hence cλµ̄,(q−2,2) 6= 0, and sλ appears in the product sµ̄ · s(q−2,2) . See Figure 3d”. X′ X X 1 Y 1 1 2 X X Figure 3d” X 1 2 We have taken care of all cases in which q ≥ 4 and λ/µ is a connected skew-shape. Now assume that the skew-shape λ/µ is disconnected (and q ≥ 4). Since λ/µ admits a lattice permutation of weight (q − 1, 1), it has two or more connected components, and all except possibly one consist of a single row. We may assume that the exceptional component is either a vertical strip of size 2, or the shape (k, 1) for some k ≥ 2, or the “backwards L”skew-shape shown in Figure 2a; otherwise it looks like the skew-shape in Figure 1, with both c1 and c2 being nonempty, and is thus taken care of locally by the argument of Case 1. Case 4: We will begin with the “backwards L”case shown in Figure 2a. If the size of the skew-shape in Figure 2a is 4 or greater, the argument in Case 2 applies; note that the outcome is unaffected by the other connected components since they are horizontal strips (filling them with all 1’s gives a permissible lattice permutation). Hence we need only consider the case when the skew-shape shown in Figure 2a is of size exactly 3. 10 SHEILA SUNDARAM Subcase 4a: We have the skew-shape λ/µ in Figure 4a, where there is a connected horizontal strip to the right of and above (i.e., north-east of) the “backwards L”component, whose cells are labelled d, a1 , c1 . In this case there is clearly a lattice permutation filling of weight containing a 2 by 2 square, (fill all the components that are horizontal strips with 1’s, a 1 in cell d and 2’s in cells c1 and a). (Note that q ≥ 4.) See Figure 4a’. Thus sλ appears in gp · gq . 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 d X X X X c1 a X X X X X X Figure 4a: Horizontal strip north-east of the skew-shape d, a, c1 . X X X X X X X X X X X X X X X X X X X X X 1 ... ... 1 X X X X X 1 X X X X 2 2 X X X X X X Figure 4a’: Lattice permutation with at least two 2’s Subcase 4b: We have the skew-shape λ/µ in Figure 4b, where there is no connected horizontal strip to the north-east of the “backwards L”component, but there is (necessarily, because q ≥ 4) ) a connected horizontal strip below (south-west of) it. In this case again there is clearly a lattice permutation filling of weight ν containing a 2 by 2 square, obtained by filling the right-most cell of the closest connected horizontal strip with a 2 (and the remaining cells, if any, with 1’s, including all other horizontal strips), hence a weight ν such that sν appears in gq . See Figure 4b’. X X X X X X X X X X X X X X X X X X d X X X X X c1 a X X X X X X X X X Figure 4b: Horizontal strip south-west of the skew-shape d, a, c1 . X X X X X X X X X X X X X X X X X X 1 X X X X X 1 2 X X X X X X X 1 1 2 X X Figure 4b’: Lattice permutation of weight ν with at least two 2’s Case 5: Now suppose that there are at least two connected components in λ/µ, all but one of which are connected horizontal strips, and the exceptional component L has shape (k, 1) for some q − 1 > k ≥ 2. We call d1 , . . . , dk the cells (left to ON CONJUGACY CLASSES OF Sn CONTAINING ALL IRREDUCIBLES 11 right) in the first row of L, and e1 the unique cell in row 2 of L immediately below d1 . By assumption, there is at least one other connected component, which is a horizontal strip. Subcase 5a: If there is such a horizontal strip above L, fill L with the number 1 in cells d1 , . . . , dk−1 and put 2’s in the cells e1 below d1 , and in the rightmost cell dk . Fill all other connected components with 1’s. Clearly this gives a lattice permutation whose weight is (q − 2, 2) and hence indexes a Schur function in gq . Subcase 5b: If all the connected components of λ/µ that are horizontal strips are below L, fill L with k 1’s in cells d1 , . . . , dk and a 2 in cell e1 . Let C = c1 , . . . , cr be (left to right) the cells in the connected horizontal strip closest to L and below it. Then r ≥ 1. Fill the right-most cell cr with a 2 (this is possible because k ≥ 2), and all others with a 1. Fill all other connected components with 1’s. Once again this gives a lattice permutation whose weight is (q − 2, 2) and hence indexes a Schur function in gq . Case 6: The final case to consider is when the exceptional connected component of λ/µ is a vertical strip V of size 2, and all the others are horizontal strips (of size 1 or more). There are four subcases: Subcase 6a: Let q ≥ 4. Assume that there is a horizontal strip H1 above V and a horizontal strip H2 below V , and assume these are the closest components to V . Fill V with 1 and 2 in the obvious column-strict way. Fill the left-most cell of H1 with a 1, and the right-most cell of H2 with a 2. (These cells exist since q ≥ 4.) Fill all other cells in the skew-shape λ/µ with 1’s. Clearly this gives a lattice permutation of weight (q − 2, 2). See Figure 5a. X X X X X X X X X X 1 ... 1 X X X X X X X X X X X X X X X X 1 Figure 5a X X X X X X 2 X X X X X X X X 1 ... 1 2 X X Subcase 6b: First let q ≥ 5. Assume that all the horizontal strips of the skewshape λ/µ are above V . Fill all the horizontal strips with 1’s, and V with 2 and 3. Thus we have a lattice permutation filling of weight (q − 2, 1, 1). Since q − 2 ≥ 3, this indexes a Schur function in gq . See Figure 5b. This argument fails if q = 4; it will be addressed in Subcase 6d. X X X X X X X X X X 1 ... 1 X X X X X X X X 1 X X X X X X 2 X X X X X X 3 1 Figure 5b X X X X X X X X Subcase 6c: Let q ≥ 5. Now assume all the horizontal strips of the skewshape λ/µ lie below V , and let H0 be the closest one below V . Fill V with 12 SHEILA SUNDARAM 1 and 2, and fill the right-most cell of H0 with a 3, and all remaining cells in the skew-shape with 1’s. Again we have a lattice permutation filling of weight (q − 2, 1, 1). Since q − 2 ≥ 3, this indexes a Schur function in gq . See Figure 5c. Again, the argument fails if q = 4, and will be addressed in Subcase 6d below. X X X X X X X X X X X X X X X X X 1 X X X X X X 2 X X X X X X X X 1 ... 1 Figure 5c 3 X 1 X Subcase 6d: Now let q = 4, so that in the skew-shape we have, in addition to the vertical strip V, either two disconnected single squares or a single connected horizontal strip of size 2. In the former case the entire skewshape is clearly a vertical strip of size 4, so can be filled with a lattice permutation of weight (14 ), and the question is settled. In the latter case, our skew-shape λ/µ consists of a vertical strip of size 2 and a horizontal strip of size 2. Suppose that the top cell of V is in row α and column j, while the left-most cell (call it d) of H is in row i and column β. We are interested in the portion S(µ) of µ lying between rows α and i, and columns j and β. Let X be a cell of µ in the south-east boundary of S(µ). First let the horizontal strip H lie below the vertical strip V, so i ≥ α+2 and j ≥ β + 2. We replace µ with the partition µ̄ = µ\X ∪ {d}. The resulting skew-shape λ/µ̄ consists of the vertical strip V and two other cells; the higher new cell, X, is in a row above H and a column to the left of V. In all cases the following filling gives a lattice permutation of weight (22 ): put 1 and 2 in V, 1 in X and 2 in the right-most cell of H. It remains to check that µ̄ is not a forbidden shape. In all except one case µ̄ contains either three rows or three columns. The exceptional case is when i = α + 2 and j = β + 2, forcing the cells of µ lying between rows α and i, and columns j and β, to form a 2 by 2 square. But µ has p ≥ 5 cells, so in µ, there is either a row (of length at least 3) above V or a column (of length at least 3) to the left of H, and the difficulty is resolved. Next assume that the horizontal strip H is above the vertical strip V, so that i < α and j < β. Here we have three subcases to consider: Subcase 6d(i): Assume that there is a cell X in the south-east boundary of λ in row i′ and column j ′ , where i < i′ < α, j < j ′ < β, i.e., i′ is a row index strictly above V and strictly below the row of H, and j ′ is a column index also strictly to the right of V and strictly to the left of H. Recall that d is the left-most cell of H. Note that the skew-shape λ/µ is the union of V and H. Set µ̄ = µ ∪ {d}\{X}. One checks easily that µ̄ is not of shape (p − 1, 1) or (2, 1p−2), because (a) p ≥ 5 and (b) X must be part of a 2 by 2 square of µ, so including the cell d in µ results in a row of length at least 3. This ensures that µ̄ contains the shape (3, 1, 1). Also now λ/µ̄ is clearly a vertical strip. ON CONJUGACY CLASSES OF Sn CONTAINING ALL IRREDUCIBLES 13 Subcase 6d(ii): If no such cell X exists, this means the strips H and V are at the ends of a hook shape (r, 1s ) for some r, s such that 1 ≤ r + s ≤ p. Consider first the case r + s = p. In this case λ is also a hook. In Figure 5d below, µ is a hook (µ1 , 1p−µ1 ) with the vertical strip V at the bottom and the horizontal strip H on top. Also, by our initial hypothesis that sµ appears in gp , we know µ1 6= 2. X X X X X X X X X Figure 5d: µ = (7, 14 ), λ = (9, 16 ) X X Suppose that µ1 = 1. Then µ = (1p ) and p ≥ 5. If we take µ̄ to be the shape obtained by including the horizontal strip H, and removing the bottom two squares of µ, then µ̄ = (3, 1p−3) and λ/µ̄ is a connected vertical strip of size 4, which satisfies our requirements. Suppose that µ1 ≥ 3, and let µ = (µ1 , 1r ). (Thus µ1 + r = p ≥ 5 and r 6= 1.) The preceding construction now gives µ̄ = (µ1 + 2, 1r−2 ) and a skew-shape that is a vertical strip, as long as r ≥ 2 and r 6= 3. The difficulty arises when r = 3 (the shape µ̄ does not appear in gp ) or r = 0. In the former case µ = (µ1 , 13 ), and we can take µ̄ = (µ1 + 1, 12 ): the skew-shape will still be a vertical strip with two connected components, one of size 1 and one of size 3. In the case r = 0, we can take µ̄ = (p − 2, 12 ) and then the skew-shape will be a horizontal strip of size 4 from the first row. Subcase 6d(iii): Now assume the strips H and V are at the ends of a nonempty hook shape (r, 1s ) for some r, s such that 1 ≤ r ≤ r +s < p, so λ is NOT a hook. Since µ has size p, we know that either the column to the left of V is nonempty, or the row above H is nonempty. Assume the latter case; hence the row above H contains at least r + 2 ≥ 3 cells of µ (to ensure that λ = µ ∪ V ∪ H is a legal shape). See Figure 5e. Hence the right-most cell Y in the row of µ above H must lie strictly to the right of the left cell d of H. X X X X X X X X X X X Y X X X X1 X2 . . . Xr d X X X X1′ X X X ... X X X Xs′ Figure 5e X X X X X X X X Set µ̄ = µ ∪ {d}\{Y }. From the rows of H and Y , we see that since r ≥ 1, µ̄ contains a 2 by 2 square, and λ/µ̄ is now a vertical strip. 14 SHEILA SUNDARAM Now assume that the row above H is empty. Then size considerations again imply that there is a nonempty column to the left of V. By exchanging the top cell in V with the bottom-most cell in the column to the left of V, we arrive at the same conclusion as before. Hence we conclude that in all cases, sλ appears in gp gq when p > q ≥ 4. Now let q = 3 and p = n − q ≥ 6. Let λ be a partition of n and let µ ⊂ λ such that sµ appears in gp = gn−3 , and λ/µ can only be filled with a lattice permutation of weight (2, 1). We must show as before that there are partitions µ̄ and ν such that sµ̄ appears in gn−3 , sλ appears in sµ̄ · sν , and ν 6= (2, 1). The cases are as follows: (1) Assume the skew-shape λ/µ forms a partition (2, 1), i.e., two cells with one cell below the left-most cell d in the first row of the skew-shape. (a) If µ lies entirely above the skew-shape, let X be the last cell in the row immediately above the skew-shape. If µ has at least two rows, then it is easy to see that we can take µ̄ = µ ∪ {d}\{X} and the resulting skew-shape is now a vertical strip of size 3. Also, since p ≥ 6, µ̄ now spans three rows, and either contains a 2 by 2 square, or its first row has length at least 3, so the forbidden shapes are avoided. Now suppose that µ consists of only one row lying above the skew-shape (2, 1). Let X1 , X2 be the last two cells in the unique row of µ. Let e be the cell below d in the skew-shape. Set µ̄ = µ ∪ {d, e}\{X1, X2 }. Then µ̄ = (µ1 − 2, 1, 1) has first part equal to at least 4, and λ/µ̄ is now a horizontal strip. For the case when µ lies entirely to the left of the skew-shape, simply transpose this argument. (b) Otherwise, at a minimum, we have cells both above and to the left of the skew-shape, at least 6 in all, so that, if i, i + 1 are the rows of λ, and j, j + 1, the columns occupied by the skew-shape, i, j ≥ 2, then µi−1 ≥ µi + 2, µi = µi+1 ≥ 1 (and µ′j−1 ≥ µ′j +2, µ′j = µ′j+1 ≥ 1). Again by a similar exchange of two cells as in (1) (a) above, i.e., setting µ̄ = (µ1 , . . . , µi−1 −1, µi +1, µi+1, . . .) we arrive at the conclusion that the skew-shape is a vertical strip of size 3, and the shape µ̄ contains a 2 by 2 square. (2) Now suppose the skew-shape is a “backwards L”shape; refer to Figure 6, where the skew-shape stops at the cell labelled c1 . X X X X X X X X X X X X0 X X X X X′ d X X . . . X c1 Figure 6 X X (a) If µ\{X ′ } lies entirely above the three cells in the skew-shape, let r be the lowest row of µ above the skew-shape. Then r ≥ 2 because µ 6= (p − 1, 1). In Figure 6, the cell labelled X′ occurs in column 1 of λ. Clearly µr ≥ 2 and µr+1 = 1, (X′ is the sole cell in row r + 1 of µ) and µ has r + 1 rows. Then we may exchange the cell labelled c1 in Figure 6 for the right-most cell labelled X0 in row r of µ, producing µ̄ = (µ1 , . . . , µr − 1, µr+1 = 1, 1). The lowest two cells of µ̄ are the cells labelled X′ and c1 in Figure 6, so that µ̄ spans at least three rows. The condition p ≥ 6 guarantees that if X0 is in the same column as d, i.e., if µr = 2, then either µr−1 ≥ 3 or r ≥ 3; in ON CONJUGACY CLASSES OF Sn CONTAINING ALL IRREDUCIBLES 15 the latter case, µ̄ has a 2 by 2 square. Either way µ̄ is an allowed shape. Clearly the new skew-shape is a vertical strip. The case when µ\{X ′} lies entirely to the left of the three cells is treated by transposing the above argument. (b) There are cells above and to the left of the skew-shape in Figure 6. Referring to that figure, because p ≥ 6, at a minimum λ consists of the 3 by 3 square in which the skew-shape occupies the lower right corner, and µ contains at least the remaining 6 cells in the 3 by 3 square. Again consider the rightmost cell X0 in the row immediately above the skew-shape (see Figure 6). Exchange the cells labelled c1 and X0 . (In the extreme case X0 will be directly above the cell labelled d). That is, µ̄ = µ ∪ {c1 }\{X0 }. Clearly µ̄ has a 2 by 2 square, and the new skew-shape is a vertical strip. This completes our proof of Lemma 3.5 in the case q = 3, p ≥ 6.  5. Final Remarks We conclude with one more theorem. Proposition 5.2 below was conjectured by the author at the time of submission, and subsequently proved by Swanson [9]. The work of the last two sections shows that the truth of Proposition 5.2 implies Theorem 5.1. This is immediate from Proposition 3.6 and the technical Lemmas 3.4 and 3.5, as well as the remarks following each of them regarding the classes (3, 1) and (5, 3). Equivalently, it is an immediate consequence of Theorem 3.9 that Proposition 5.2 implies the following: Theorem 5.1. Let n 6= 4, 8. The partition λ of n indexes a global conjugacy class for Sn if and only if it has at least two parts, and all its parts are odd and distinct. Proposition 5.2. ([9], conjectured in [8, Remark 4.8]) If n is odd, fn contains all irreducibles except (n − 1, 1) and (2, 1n−2). If n is even, fn contains all irreducibles except (n − 1, 1) and (1n ). Acknowledgment: I am grateful to the anonymous referee for a thorough and meticulous reading, and for outlining a reorganisation of the paper which greatly improved the exposition. References 1. R. Dressler, A stronger Bertrand’s Postulate with an application to partitions, Proc. Amer. Math. Soc. 33 No. 2 (1972), 226-228. 2. A. Frumkin, Theorem about the conjugacy representation of Sn , Israel J. Math. 55 (1986), 121– 128. 3. G. Heide and A. E. Zalesski, Passman’s Problem on Adjoint Representations, Contemporary Math. 420 (2006), 163–176. 4. G. Heide, J. Saxl, P. H. Tiep and A. E. Zalesski, Conjugacy action, induced representations and the Steinberg square for simple groups of Lie type, J. London Math. Soc., 106 (2013), 908–930. 5. I. G. Macdonald, Symmetric functions and Hall polynomials, Second Edition, Oxford University Press (1995). 6. D. Passman, The adjoint representation of group algebras and enveloping algebras, Publicacions Matemàtiques 36 (1992), 861–878. 7. T. Scharf, Ein weiterer Beweis, daß die konjugierende Darstellung der symmetrischen Gruppe jede irreduzible Darstellung enthält, Arch. Math. 54 (1990), 427–429. 8. S. Sundaram, The conjugacy action of Sn and submodules induced by centralisers, J. Alg. Comb., to appear. DOI: 10.1007/s10801-017-0796-9. (arXiv:1603.0589v1). 9. J. P. Swanson, On the existence of tableaux with given modular major index, Algebraic Combinatorics, 1 (2018) no. 1, 3–21. DOI : 10.5802/alco.4. (arXiv:1701.04963v1). 16 SHEILA SUNDARAM Pierrepont School, One Sylvan Road North, Westport, CT 06880 E-mail address: [email protected]
4math.GR
A Macro for Reusing Abstract Functions and Theorems Sebastiaan J.C. Joosten Bernard van Gastel Julien Schmaltz Open University of the Netherlands {bas.joosten,Bernard.vanGastel,Julien.Schmaltz}@ou.nl Even though the ACL2 logic is first order, the ACL2 system offers several mechanisms providing users with some operations akin to higher order logic ones. In this paper, we propose a macro, named instance-of-defspec, to ease the reuse of abstract functions and facts proven about them. Defspec is an ACL2 book allowing users to define constrained functions and their associated properties. It contains macros facilitating the definition of such abstract specifications and instances thereof. Currently, lemmas and theorems derived from these abstract functions are not automatically instantiated. This is exactly the purpose of our new macro. instance-of-defspec will not only instantiate functions and theorems within a specification but also many more functions and theorems built on top of the specification. As a working example, we describe various fold functions over monoids, which we gradually built from arbitrary functions. 1 Introduction The primary goal of this paper is to provide a way to reason abstractly in ACL2, while being able to specialise later. This kind of reasoning is necessary in the development of large modular proofs. Our main contribution is a macro, called instance-of-defspec, providing a convenient way to manipulate abstract functions and their properties. In our approach, we build generic theorems, and use our macro to apply them on more specific instances, that is: reuse proofs. For this to work, we reuse functions as well, by instantiating generic functions with more specific ones. While both function- and proof reuse are possible to some extent in ACL2, we provide a single macro to do both in a way that is more convenient than the existing solutions. Aside from the theoretical example presented in our paper, we briefly discuss the use of our solution in the development of a generic theory of communication networks, called G E N O C [10]. This effort is a large and modular proof development of about fifty thousands lines of ACL2 code. Our macro already provides a thousand lines reduction of our code base. This paper uses monoid-operations and fold operations as leading examples. A monoid is simply a closed and associative operation with an identity element, for which we will write ◦ and 0 respectively. A fold operation is an operation that changes a list (a0 . . . ak ) into a value (a0 ◦· · · ◦ak ). The leading example is not of particular importance on its own, but used to illustrate the macro instance-of-defspec. Using the encapsulate environment, ACL2 provides a way to hide function definitions, while preserving certain function properties. We can then prove a theorem about such functions, using only the function properties in the proof. If we would then write a new function that satisfies all the properties used in the proof, we know that the function will satisfy the theorem as well. However, even though we know that the function satisfies the theorem, the only way to actually use this knowledge in further proofs is by telling it to ACL2 in the form of a new theorem. Using an uninterpreted function in the definition of a concrete function raises similar issues. We provide a macro called instance-of-defspec, that will allow ACL2 users to instantiate abstract functions while being able to use higher order theorems and functions. R. Gamboa and J. Davis (Eds.): ACL2 Workshop 2013 (ACL2 ’13). EPTCS 114, 2013, pp. 29–41, doi:10.4204/EPTCS.114.3 c S.J.C. Joosten, B.E. van Gastel, J. Schmaltz This work is licensed under the Creative Commons Attribution License. Reusing Functions and Theorems 30 The name instance-of-defspec derives from the word defspec, which already is a part of ACL2 [9]. In essence, defspec is a labeled encapsulate environment, such that the functions which are kept local to the encapsulate can be referred to as a single package. The advantage of defspec is that other functions can be declared to be an instance of this defspec. The current way of doing this in ACL2 is by using DefInstance, which is a part of defspec. This enables us to prove the ‘higher order’ statement that addition is a monoid. One could then use the :functional-instance hint, which was already implemented in Nqthm[1], to prove a specific theorem if it was already proven in a more general context. For example, we can use it to prove a theorem for addition which was already proven for a monoid efficiently. Our approach combines these previous solutions. At a call of instance-of-defspec, the logical world is searched for functions and theorems that depend on the abstract defspec. These are copied for the concrete instance. Using DefInstance and the :functional-instance hint, the proof of every theorem is repeated for the instance without the computational burden. Since instance-of-defspec will copy functions, our approach offers an alternative to defattach. Kaufmann and Moore [5] explain how this can be used to add an executable function, to for instance the abstract monoid, such that we can execute it. Unfortunately, defattach only allows one such attachment per function, and it does not influence the logical world. Our macro can be seen as an extension to DefInstance which combines all of these solutions, making a copy of functions instead of using defattach thus actually applying the change in the logical world. As a leading example for reasoning abstractly, we develop a small theory about monoids. We prove that (x0 ◦ (x1 ◦ (. . . ◦ (xn ◦ 0)))) = (((x0 ◦ x1 ) ◦ . . .) ◦ xn ) for n ≥ 0, using any associative operation for ◦ with identity element 0. The benefit of such a proof is that we can apply it to arithmetic addition with zero, to multiplication with one, or to appending lists with the empty list. In this paper, we present this example explaining how instance-of-defspec can be used in Section 2. In Section 3 we look at the inner workings of the macro, explaining limitations and opportunities in our approach. We also describe how instance-of-defspec can be used to add extra arguments to a function. Similar approaches are compared to instance-of-defspec in Section 4 2 Monoids as an example usage Definition 1 (Monoid) A monoid (0, ◦) on the domain D is an operator ◦ and a constant 0 such that: • ◦ is closed: for all a, b ∈ D we have (a ◦ b) ∈ D. • ◦ is associative: (a ◦ b) ◦ c = a ◦ (b ◦ c) for a, b, c ∈ D. • 0 ∈ D is an identity element: 0 ◦ a = a = a ◦ 0. In this section, we build a monoid by adding the three constraints from the definition one at a time. On the unrestricted operator ◦, we define different implementations of a fold operation. We will show that they are equivalent for monoids. This section is self-containing, that is: the ACL2 interpreter should accept the inputs given in this section as-is. For additional theorems and examples, or for less typing, the reader may use the file closedMonoid.lisp. First, we include our instance-of-defspec book. 1 (include-book "instance-of-defspec") S.J.C. Joosten, B.E. van Gastel, J. Schmaltz 31 This book includes an entirely abstract function called binary-function, which was encapsulated in a defspec called binary. We repeat the definition of binary here. Note that this event cannot be entered in ACL2 here, since binary is already present in our instance-of-defspec book. (defspec binary ((binary-function (x y) t)) (local (defun binary-function (x y) (cons x y)))) Here we use defspec, together with local. The actual implementation of a local event is unknown to ACL2 outside the defspec. The only thing ACL2 knows about binary-function is that it takes two arguments. Hence we can regard binary-function as an arbitrary binary function, despite the chosen implementation of cons here. 2.1 Reusing functions The intuition of the fold operation is that it transforms a list (x1 . . . xn ) into a value x1 ◦ · · · ◦ xn for any binary operator ◦. For transforming the empty list, we need some sort of identity element to build upon. For this reason, we provide a first element x0 . We define foldl and foldr, which differ in the placement of the brackets. In the case of foldl, the brackets are written as ((((x0 ◦ x1 ) ◦ x2 ) ◦ x3 ) ◦ · · ·). In the case of foldr and foldr1, brackets are written as: x1 ◦ (x2 ◦ (x3 ◦ (· · · ◦ x0 ))). For foldr1 we require that the list has at least one element. For foldr (foldl) we supply the last (first) element. Note that, in the end, we will prove that these fold operations all are equivalent, even when providing an identity element as the first element. For this proof, we need associativity and an identity element, which is precisely the requirement of a monoid. 2 3 (defun foldr (x xs) (if (atom xs) x (binary-function (car xs) (foldr x (cdr xs))))) 4 ; Alternatively, we can ’omit’ the first element: 6 (defun foldr1 (xs) 7 (if (atom (cdr xs)) (car xs) 8 (binary-function (car xs) (foldr1 (cdr xs))))) 5 9 (defun foldl (x xs) 11 (if (atom xs) x 12 (foldl (binary-function x (car xs)) (cdr xs)))) 10 Since the focus of this article is the use of instance-of-defspec, we do not proceed by proving properties of the fold functions, but show how to actually use these fold functions. A trivial example of a binary function is cons. We can instantiate binary-function (provided by the defspec encapsulate binary) with cons under a list of substitutions as follows: 13 14 (instance-of-defspec binary cons ’((binary-function cons) (foldr cons-foldr) (foldr1 cons-foldr1) (foldl cons-foldl))) This instantiates our fold functions as executable functions: ACL2 (B C ACL2 (A B !> (cons-foldr ’a ’(b c)) . A) !> (cons-foldr1 ’(a b c)) . C) 32 Reusing Functions and Theorems ACL2 !> (cons-foldl ’a ’(b c)) ((A . B) . C) Now lets add the assumption that our binary function is closed. That is: there is some domain, and if both arguments to the binary function belong to it, so does its result. We encapsulate it using a defspec, and instantiate it as a binary operation. We will explain the use of defspec in Section 3.1. You may think of it as an encapsulate environment that hides the local definitions and provides the notion of closed-binop in terms of c-domainp, c-binary-function and the theorem (to be seen as a property) closed-binop-closed. 15 16 17 18 19 20 21 22 (defspec closed-binop ((c-domainp (x) t) (c-binary-function (x y) t)) (local (defun c-domainp (x) (integerp x))) (local (defun c-binary-function (x y) (+ x y))) (defthm closed-binop-closed (implies (and (c-domainp x) (c-domainp y)) (c-domainp (c-binary-function x y))))) (instance-of-defspec binary c) ; choose c (for closed) as the prefix symbol here In the last statement, we instantiate closed-binop as an arbitrary binary operator: we use abstract functions as the instantiation of other abstract functions. Even though a closed binary function is an abstraction itself, it is an instantiation of the - more general - binary function. Note that in this case, we did not specify the list of replacements. We do not have to: the second argument c is used as the default prefix. Hence, c-foldr is the instantiation of foldr with c-binary-function as binary-function: ACL2 !> :pf c-foldr (EQUAL (C-FOLDR X XS) (IF (CONSP XS) (C-BINARY-FUNCTION (CAR XS) (C-FOLDR X (CDR XS))) X)) In fact, we could have done the same with cons. The following would have been a shorter notation for the same instruction we gave earlier: 23 (instance-of-defspec binary cons ’((binary-function cons))) 2.2 Reusing theorems We have seen how to reuse functions using defspec. We can do the same trick for theorems. In the context of a closed operation, we show that the repetitive application of this operation again yields an element in its domain. For brevity, we only show this for the foldr1 operation: (defun list-domainp (xs) (if (endp xs) t 26 (and (c-domainp (car xs)) (list-domainp (cdr xs))))) 24 25 27 28 (defthm foldr1-closed S.J.C. Joosten, B.E. van Gastel, J. Schmaltz 29 30 33 (implies (and (list-domainp xs) (consp xs)) (c-domainp (c-foldr1 xs)))) We reuse this theorem for a semigroup. A closed associative operator ◦ is called a semigroup. Note that a semigroup is like a monoid, but without the identity element 0. More formally: a monoid (0, ◦) is a semigroup ◦ with identity element 0. So once again, we write a defspec, and specify that it is an instance of a closed binary operator. 31 32 33 34 35 36 37 38 39 40 41 42 (defspec semigroup ((sg-c-domainp (x) t) (sg-c-binary-function (x y) t)) (local (defun sg-c-domainp (x) (integerp x))) (local (defun sg-c-binary-function (x y) (+ x y))) (is-a closed-binop sg semigroup-is-a-closed-binop) (defthm semigroup-assoc (implies (and (sg-c-domainp x) (sg-c-domainp y) (sg-c-domainp z)) (equal (sg-c-binary-function x (sg-c-binary-function y z)) (sg-c-binary-function (sg-c-binary-function x y) z))))) (instance-of-defspec closed-binop sg) ; reuse the fold operators (again) Note that we used the macro is-a inside our semigroup. This copies the theorems from the closed binary operator into the current defspec. By doing so, we ensure that the previously defined specification of closed-binop will be copied to semigroup, since this is required to prove that a semigroup is an instance of closed-binop. The is-a macro is auxiliary to instance-of-defspec. Its implementation will be discussed in Section 3.5. In this case, the following theorem is generated in place of the is-a macro: ACL2 !> (OLDSPEC ’CLOSED-BINOP ’SEMIGROUP-IS-A-CLOSED-BINOP ’SG () (W STATE)) ((DEFTHM SEMIGROUP-IS-A-CLOSED-BINOP-0 (IMPLIES (IF (SG-C-DOMAINP X) (SG-C-DOMAINP Y) ’NIL) (SG-C-DOMAINP (SG-C-BINARY-FUNCTION X Y))))) Now we try to prove that foldr1 is foldl. Note that this was not the case for cons-foldr1 and cons-foldl. We need to prove it for the semigroup folds: sg-c-foldr1 and sg-c-foldl. (defthm foldr1-is-foldl (implies (and (sg-c-domainp x) (sg-c-domainp y) 45 (sg-list-domainp xs)) 46 (equal (sg-c-foldr1 (cons x xs)) 47 (sg-c-foldl x xs)))) 43 44 If we look at the proof output, we will find that the proof has used a theorem we did not define ourselves, but which was automatically copied based on the theorem we added to the closed binary operator: ACL2 !> :pf (:REWRITE SG-FOLDR1-CLOSED) (IMPLIES (AND (SG-LIST-DOMAINP XS) (CONSP XS)) Reusing Functions and Theorems 34 (SG-C-DOMAINP (SG-C-FOLDR1 XS))) Without the theorem foldr1-closed, and thus the automatically derived theorem sg-foldr1-closed, the proof attempt of foldr1-is-foldl would have failed. 2.3 On monoids As promised, we end with a theory about monoids. A monoid is a semigroup with an identity element. To take care of the names, we use a renaming constant. Note that we can use renaming in the macro is-a, exactly like in instance-of-defspec. (defconst *monoid-renaming* ’((sg-c-domainp mon-domainp) (sg-c-foldr mon-foldr) 50 (sg-c-binary-function mon-binop) (sg-c-foldr1 mon-foldr1) 51 (sg-list-domainp mon-list-domainp) (sg-c-foldl mon-foldl) )) 48 49 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 (defspec monoid ((mon-domainp (x) t) (mon-binop (x y) t) (mon-id () t)) (local (defun mon-domainp (x) (integerp x))) (local (defun mon-binop (x y) (+ x y))) (local (defun mon-id () 0)) (defthm id-in-domain (mon-domainp (mon-id))) (is-a semigroup mon monoid-is-a-semigroup *monoid-renaming*) (defthm monoid-id-left (implies (and (mon-domainp x)) (equal (mon-binop x (mon-id)) x))) (defthm monoid-id-right (implies (and (mon-domainp x)) (equal (mon-binop (mon-id) x) x)))) (instance-of-defspec semigroup mon *monoid-renaming*) We introduce function fold which acts like foldr1, but without the requirement that its argument should be a consp. 69 (defun fold (xs) (if (atom xs) (mon-id) (mon-foldr1 xs))) We end the book about monoids, the file closedMonoid.lisp, by proving equality between the different versions of fold, and giving another instantiation. These proofs are omitted here, but we encourage the reader to take a look. 3 Inner workings As the sources will be made available with this publication, we do not reproduce them here. Instead, we highlight the main parts to give the reader a rough understanding of the code, and highlight the ‘ugly bits’ to illustrate the difficulties and limitations of our approach. The macro instance-of-defspec effectively does three things: S.J.C. Joosten, B.E. van Gastel, J. Schmaltz 35 1. Look up the defspec and prove that the provided instance is an instance of this defspec using DefInstance. 2. Look up every function that uses one of the defspec functions, and copy it as an instantiated function. 3. Look up every theorem that use one of the functions from the previous step, and copy it as an instantiation. In order to find the functions and theorems, we look at the ACL2 world. For this reason, we use make-event. In particular, instance-of-defspec is a macro that expands to: ‘(make-event (instanceOf-defspec-fn ’,spec ’,prefix ,rename state) :check-expansion nil) 3.1 Obtaining the defspec To reason abstractly, ACL2 provides the encapsulate environment. This environment allows the user to hide events, such that a particular theorem can be stated about a function, without allowing the definition of this function to enter the logical world. When proving further properties outside the encapsulate, the function is seen as an abstract function, since the function is unknown to the logical world. To prove that a certain concrete function is an instance of this environment, defspec was developed by Sandip Ray and Matt Kaufmann. The system book make-event/defspec.lisp provides two parts: the first is a macro called defspec, which does exactly the same as an encapsulate environment, but then also provides a name for it. The second is a macro called definstance, which generates a theorem equivalent to stating that some implementation is an actual instantiation of the defspec named. We chose to build on this approach for the reason why Ray and Kaufmann developed it. In the comments of their code, they write [9]: The real problem is that ACL2 is a theorem prover for first order logic, not higher-order logic, while the statement we want to make is inherently a higher-order statement. (...) But having one macro that generates the instances will give the evaluators the ability to trust it, rather than hand-coded proofs that all the “corresponding” constraints are satisfied. The hope is that with a lot of use the macros here will be conventionally thought of as higherorder representations. To obtain the defspec, we use acl2::decode-logical-name to skip to the place where the defspec was declared, and lookup the corresponding encapsulate event. In the case of closed-binop as written in the previous section, it might look like this: (EVENT-LANDMARK GLOBAL-VALUE 8844 (ENCAPSULATE (C-DOMAINP C-BINARY-FUNCTION) . :COMMON-LISP-COMPLIANT) ENCAPSULATE ((C-DOMAINP (X) T) (C-BINARY-FUNCTION (X Y) T)) (LOCAL (DEFUN C-DOMAINP (X) (INTEGERP X))) (LOCAL (DEFUN C-BINARY-FUNCTION (X Y) (+ X Y))) (DEFTHM CLOSED-BINOP-CLOSED (IMPLIES (AND (C-DOMAINP X) (C-DOMAINP Y)) (C-DOMAINP (C-BINARY-FUNCTION X Y))))) 36 Reusing Functions and Theorems From this, we obtain the corresponding functions by taking the cadar of the third element. In this case, it returns (C-DOMAINP C-BINARY-FUNCTION). At this point, we would like to note that we do not know whether this is an appropriate way to find the encapsulated functions. We just chose this to identify the defspec because it consistently returned these functions in multiple tests. Instantiating the defspec is done with a definstance. At the instantiation of closed-binop as a semigroup, we generated the following statement: (DEFINSTANCE CLOSED-BINOP SG-CLOSED-BINOP :FUNCTIONAL-SUBSTITUTION ((C-DOMAINP SG-C-DOMAINP) (C-BINARY-FUNCTION SG-C-BINARY-FUNCTION))) This is the first statement generated. It is also the main proof obligation: it will fail when ACL2 cannot prove that the instance presented is an implementation of the defspec. 3.2 Obtaining functions Once we have found the functions defined in the defspec, we look up all functions that depend on these. Note that we apply this transitively. That is: if we use the abstract function f inside g, and g is used inside h, then h has to be instantiated as well. To do so, we wrote function get-derived-funs. Function get-derived-funs goes through the world multiple times, keeping track of a list of ‘discovered’ functions while looking for functions that use one of these and adding them to the list. The search for functions is done by looking for DEF-BODIES in the world, which ensures that macros have been eliminated from the definition. We terminate this search once the list does not grow any further. For each separate function, we stop searching once we hit the definition of that function. The rationale behind this is that a function cannot be used before it was declared. Since the procedure will just be used in a make-event, we can leave it in :program mode, saving us the trouble to prove termination. We take care not to add functions twice, which does provide termination: there are a finite number of functions in the current logical world. When copying the function, we wish to be as similar to the original function as possible. However, we have to replace the abstract functions for their instantiations. To do so, we expand all macros in the function body using the :trans macro. After this, we replace the functions with their definitions using a function we called replacefns. This function takes a list of desired substitutions, and a list of terms in which this replacement should take place. ACL2 !> :replacefns ((foo bar) (bar foo)) ((+ ((lambda (foo j) (foo foo j)) x y) (bar x y))) ((+ ((LAMBDA (FOO J) (BAR FOO J)) X Y) (FOO X Y))) Copying our function as identically as possible has the advantage of copying documentation and other parameters as well. There are cases where the generated defun fails, which occur when ACL2 fails to prove guards or termination of the generated function. 3.3 Obtaining theorems Obtaining the theorems happens in a similar way. The main difference is that the list of functions does not grow while searching for theorems that use these functions. We can therefore find all theorems in one pass through the world. When generating the theorems, we do not try to let the copied theorem mimic the original, as we did with functions. In the case of functions, it was possible that ACL2 tried to prove something (like guards S.J.C. Joosten, B.E. van Gastel, J. Schmaltz 37 or termination), but failed. In the case of theorems, we want to prevent this from happening, by making sure that ACL2 does not redo an entire proof. To achieve this, we use the :functional-instance hint. Also, we do not try to copy the original event, but look for its effect on the logical world and copy the effect. The theorem foldr1-closed from Section 2.2 is stored in the world as: (... (FOLDR1-CLOSED THEOREM IMPLIES (IF (LIST-DOMAINP XS) (CONSP XS) ’NIL) (C-DOMAINP (C-FOLDR1 XS))) ... (FOLDR1-CLOSED CLASSES (:REWRITE)) ...) Note that the theorem and the classes are stored in different world items. We obtain the theorems by combining these two parts in the world. The first holds the (translated, macro-free) theorem, and the second holds the rule-class(es). Some rule-classes are stored with extra attributes. For example, a typing rule will define a typed term, and a forward-chaining rule has a trigger-term. The :functional-instance hint will generate various subgoals, which can be proven using the proof generated by a previously proven definstance theorem (which is the first theorem we generate, even before copying the functions). We also add the :in-theory hint, giving a theory that contains only the newly generated functions. Although we do not know how to prove that this is a sound way to copy theorems, we can at least give the anecdotical evidence that we have not found an example where the proof attempt for a generated theorem failed. While developing instance-of-defspec, we found it useful to be able to keep track of the theorems defined. With relatively little effort, we have written the macro symbol-lemmas which, like :pl, shows theorems containing its argument. The main difference being that the former shows all theorems, while the latter only shows those in which its argument is a trigger. 3.4 Adding arguments The main use of instance-of-defspec is to provide a single method to create functions like map, and corresponding theorems. An issue we did not foresee was that some of the functions we would like to map, though effectively unary, are actually binary. We have solved this by allowing for lambda functions in the function substitution. As an example, we investigate a generic function that checks whether all elements in some list satisfy some predicate: (defspec list-predicate ((predicate (x) t)) (local (defun predicate (x) x))) (defun predicate-listp (lst) (if (atom lst) (null lst) ; require true-lists (and (predicate (car lst)) (predicate-listp (cdr lst))))) Now suppose we want our predicate to be member-equal. This would enable us to test whether all elements in some list occur in some other list, which is exactly the condition for subsets. We can create a new function subset-equal (written without a p to prevent collision with the builtin subsetp-equal): (instance-of-defspec list-predicate members ’((predicate (lambda (x) (member-equal x y))) (predicate-listp (lambda (lst) (subset-equal lst y))))) Reusing Functions and Theorems 38 At this point, we require the lambda expression to have exactly the same argument as the arguments of the function it replaces: ACL2 !> (instance-of-defspec list-predicate members ’((predicate (lambda (x) (member-equal x y))) (predicate-listp (lambda (xs) (subset-equal xs y))))) ACL2 Error in COPYFUN: The lambda construct (LAMBDA (XS) (SUBSET-EQUAL XS Y)) takes as input (XS), which should be an exact match of the original arguments of the original function: (LST) This syntactic limitation will hopefully prevent users unintentionally swapping arguments, and helps identify which variables are substituted. 3.5 The is-a macro To prove something is an instance of some defspec, we need to prove all theorems included in that defspec. If we want to add a property to a previous defspec, we proceed by creating a new defspec, and indicating that the new is an instance of the former. One way to do this, is by using definstance, and another is by using is-a. The main advantage of the latter is that theorems are be copied individually, and can remain enabled. This results in a different behaviour of subsequent proof attempts. Another advantage is that the notation of is-a is very similar to that of instance-of-defspec. The implementation of is-a is a lot like definstance, in the sense that it uses the function constraint defined in the defspec book to get all theorems that have to hold. For every function it finds in the defspec, the function constraint is called which returns a theorem that must hold. While it would be possible to use is-a outside of a defspec, it would make more sense to use instance-of-defspec there. 4 Discussion Related work Before we started working with instance-of-defspec, we used ACL2’s macro system to avoid code duplication. This approach does not involve inspecting the world, or make-event. We just used plain macros that write out ‘instances’. Apart from functions, we used these macro’s to generate theorems as well. In this approach we lose the proof obligation that the proposed instance is actually an instance, or even having to create an encapsulated environment for the abstract structure. The price we pay, however, is having to do full proofs for all instantiated theorems, which can be a heavy computational burden. Also, we found the current approach of writing theorems about abstract instances directly in the logical world to be more convenient than writing theorems in a macro. Carl Eastlund and Matthias Felleisen make a case against using ACL2’s macros, proposing hygienic macros [2]. If we were to use hygienic macros for this purpose, writing out functions and theorems using a macro could be more convenient. We would still need to redo theorems. A very promising alternative to our approach was presented by Gamboa and Patterson [4]. The authors introduce a way to use polymorphism in ACL2. One of the downsides is the use of a stobj called memory. In addition, it is presented as an alternative to the current encapsulate environments, instead of building on what is already present in ACL2. S.J.C. Joosten, B.E. van Gastel, J. Schmaltz 39 Although we could not find a paper on it, there is a macro called def-functional-instance inside the ACL2 tools directory which provides an easier way to instantiate previous theorems using the :functional-instance hint. The problem is solved more rigorously by Moore [8], by providing an alternative to the :functional-instance hint which computes its substitutions automatically. Our instance-of-defspec macro does all this, and these two previous solutions stress the importance of doing so. For conveniently instantiating functions, the macro by Martı́n-Mateos et al. [7] is most similar to ours. The same instantiations are performed: both functions and theories can be reused. The authors did not use the defspec environment, nor do their macros rewrite proof hints to aid the instantiated proofs. Also, at some point in the process the user is required to specify exactly which events to copy (these must be defun and defthm events). A macro call must be placed around these events, and the output of this macro should be copied manually. The user then obtains a program which will define a constant that can be used for reuse. One of the reasons that their approach was less convenient than ours, is that ACL2 did not have some of its current features, especially make-event, at the time. Indeed, such improvements are present in later work. In the code accompanying the more recent paper from this group [6], many of the improvements suggested in the earlier paper [7] have been made. Fundamental differences still are: • The macro by Martı́n-Mateos only copies a handful of events, where our macro will take any event that rewrites itself to a defun or a defthm, which includes those handled by Martı́n-Mateos. • The macro by Martı́n-Mateos requires the general theory to be wrapped inside a macro entirely. Our approach only requires this for the local defspec, allowing the general theory to be distributed over multiple books. • Our macro allows arguments to be added to function calls without changing the original function. • Leaving the definitions of the instantiation enabled might cause the macro by Martı́n-Mateos to fail. In our approach the theorem prover is guided by automatically generated hints. Since both approaches use the :functional-instance hint, we expect this to be something which can be resolved rather easily. Carl Eastlund and Matthias Felleisen built a module system on top of ACL2, using the Dracula environment [3]. In this system, the abstract entities are called interfaces, which have signatures and contracts. This compares well to the defspec which is already built in ACL2. A major difference is that, in ACL2, a function has to be declared local, and the theorems must hold for it. In essence, the user must provide a witness for the defspec, while the Dracula environment does not require this. The interfaces can be instantiated as modules, or reused in modules, by using export and import commands respectively. An advantage of Dracula Modular ACL is that modules are checked independently, which might improve the performance of ACL2 by reducing memory requirements. For our approach, one would have to write different files in order to get such behavior. We see two disadvantages to the modular approach. • Reasoning about interfaces directly is not possible. A familiar proof states that there can only be one identity element for a monoid. In the modular approach, one would have to create a module which imports the interface, and exports another interface which also has the property that there is only one identity element. In their paper, Eastlund and Felleisen prove correctness of the executable modules. Hence the module that describes a property about the monoid interface will not be proven to be correct until a witness for the monoid is provided. • The Dracula environment requires the user to trust both the ACL2 system and the module system, whereas in our approach all proofs are performed within the ACL2 system. Although we believe Reusing Functions and Theorems 40 the module system to be sound, bugs in ACL2 up to version 2.3 show that reasoning with encapsulated properties is particularly error-prone. The reader may, for instance, read the discussion on subversive recursions in the miscellaneous section of the ACL2 documentation (version 3 and up). Use in practice Our group is involved in a large scale generic proof about Network-On-Chips, called G E N O C [10]. The proofs consists of almost fifty thousand lines of ACL2 code. In G E N O C all kinds of properties about classes of networks are proven. To maximise proof reusability, an important aspect is partially instantiating these generic proofs for classes of networks, and later fully instantiating the proofs for concrete instantiations of networks. Currently we use many hand coded functional substitution rules in the definstance. These are hard and error-prone to maintain. By using the instance-of-defspec construct we already reduce our effort to maintain our codebase. Also a lot of instantiations of generic theorems can be removed, because they are automatically generated. Both these changes reduced our code base by one thousand lines. As instance-of-defspec copies every function and theorem based on a defspec. Because of this, instantiating a defspec early in a proof session and instantiating it late in the session could have different meanings. For this reason, we ensured that it would be possible to instantiate the same set of functions as a defspec twice. One might worry that all extra instantiated definitions can clutter up the logical world and namespace. In practice, however, we only needed to instantiate each set of functions as one defspec, and did not run into problems with a cluttered up namespace. Nevertheless we provided a feature, per request by one of the reviewers, which allows you to not copy some theorems. To do this, add a theorem to the rename list without providing a new name for it. For instance, if sometheorem would normally be instantiated by a call to instance-of-defspec, add (sometheorem newname) to use newname as the new name for this theorem, or (sometheorem) to not copy sometheorem at all. Future work Using our macro in all instances in GeNoC still presents a problem. We cannot handle function definitions inside encapsulate environments correctly. To find functions to use as local witness, we need to look inside the encapsulate environment, which is forbidden. For this reason, the defun-sk and defevaluator events, which rewrite to events including the encapsulate, are not supported. In the current example, we use is-a to include a previous defspec into a new one. In practice, not all functions may be duplicated in this step. We can already illustrate how this problem arises by a modification in the monoid example. Suppose that in Section 2.1, instead of adding the domainp function to closed-binop, we would have used predicate and the corresponding generic function predicate-listp (possibly included from a different file). Proving that closed-binop is an instance of binary will not be a problem. Proving that the semigroup is an instance of closed-binop, however, requires instantiating predicate with sg-c-domainp while instantiating the semigroup operator with closed-binop. We are in the process of finding a convenient syntax for this, and we will provide a way to do this in the near future. 5 Conclusions The macro instance-of-defspec enables us to reuse abstract functions and facts proven about them. It automatically instantiates lemmas and theorems derived from the abstract functions. We are convinced that together with defspec, our macro provides a way to reason abstractly in ACL2, while being able to specialise later. The great variety of similar approaches shows that there is a strong need for abstract S.J.C. Joosten, B.E. van Gastel, J. Schmaltz 41 reasoning in ACL2. This variety of solutions also suggests that no approach has become the standard for the community. We believe that our approach is more convenient than the existing solutions, and we hope it will become a standard in the ACL2 community. Acknowledgments We thank the reviewers for their detailed comments and apposite insights. References [1] Robert S Boyer, David M Goldschlag, Matt Kaufmann & J Strother Moore (1991): Functional instantiation in first order logic. In: GROUP, UNIVERSITY OF GOTEBORG, Citeseer, pp. 7–26, doi:10.1016/ B978-0-12-450010-5.50007-4. [2] C. Eastlund & M. Felleisen (2011): Hygienic macros for ACL2. Trends in Functional Programming, pp. 84–101, doi:10.1007/978-3-642-22941-1_6. [3] Carl Eastlund & Matthias Felleisen (2009): Making induction manifest in modular ACL2. In: Proceedings of the 11th ACM SIGPLAN conference on Principles and practice of declarative programming, ACM, pp. 105–116, doi:10.1145/1599410.1599424. [4] R. Gamboa & M. Patterson (2003): Polymorphism in ACL2. In: Fourth International Workshop on the ACL2 Theorem Prover and Its Applications. [5] M. Kaufmann & J.S. Moore (2011): How Can I Do That with ACL2? Recent Enhancements to ACL2. In: Tenth International Workshop on the ACL2 Theorem Prover and Its Applications, 70, doi:10.4204/EPTCS. 70.4. [6] L. Lambán, F.J. Martı́n-Mateos, J. Rubio & J.L. Ruiz-Reina (2012): Formalization of a normalization theorem in simplicial topology. Annals of Mathematics and Artificial Intelligence 64(1), pp. 1–37, doi:10.1007/ s10472-011-9274-6. [7] F. J. Martı́n-Mateos, J. A. Alonso, M. J. Hidalgo & J. L. Ruiz-Reina (2002): A generic instantiation tool and a case study: A generic multiset theory. In: Third International Workshop on the ACL2 Theorem Prover and Its Applications, pp. 188–203. [8] J S. Moore (2009): Automatically computing functional instantiations. In: Proceedings of the Eighth International Workshop on the ACL2 Theorem Prover and its Applications, ACM, pp. 11–19, doi:10.1145/ 1637837.1637839. [9] S. Ray & M. Kaufmann (2006): Defspec.lisp. ACL2 books/make-event directory. [10] Freek Verbeek & Julien Schmaltz (2012): Easy Formal Specification and Validation of Unbounded Networkson-Chips Architectures. ACM Transactions on Design Automation of Electronic Systems 17(1), doi:10. 1145/2071356.2071357.
6cs.PL
Learning to Detect Violent Videos using Convolutional Long Short-Term Memory arXiv:1709.06531v1 [cs.CV] 19 Sep 2017 Swathikiran Sudhakaran1,2 and Oswald Lanz2 1 2 University of Trento, Trento, Italy Fondazione Bruno Kessler, Trento, Italy {sudhakaran,lanz}@fbk.eu Abstract Developing a technique for the automatic analysis of surveillance videos in order to identify the presence of violence is of broad interest. In this work, we propose a deep neural network for the purpose of recognizing violent videos. A convolutional neural network is used to extract frame level features from a video. The frame level features are then aggregated using a variant of the long short term memory that uses convolutional gates. The convolutional neural network along with the convolutional long short term memory is capable of capturing localized spatio-temporal features which enables the analysis of local motion taking place in the video. We also propose to use adjacent frame differences as the input to the model thereby forcing it to encode the changes occurring in the video. The performance of the proposed feature extraction pipeline is evaluated on three standard benchmark datasets in terms of recognition accuracy. Comparison of the results obtained with the state of the art techniques revealed the promising capability of the proposed method in recognizing violent videos. 1. Introduction Nowadays, the amount of public violence has increased dramatically. This can be a terror attack involving one or a number of persons wielding guns to a knife attack by a single person. This has resulted in the ubiquitous usage of surveillance cameras. This has helped authorities in identifying violent attacks and take the necessary steps in order to minimize the disastrous effects. But almost all the systems nowadays require manual human inspection of these videos for identifying such scenarios, which is practically infeasible and inefficient. It is in this context that the proposed study becomes relevant. Having such a practical system that can automatically monitor surveillance videos and identify the violent behavior of humans will be of immense help and assistance to the law and order establishment. In this work, we will be considering aggressive human behavior as violence rather than the presence of blood or fire. The development of several deep learning techniques, brought about by the availability of large datasets and computational resources, has resulted in a landmark change in the computer vision community. Several techniques with improved performance for addressing problems such as object detection, recognition, tracking, action recognition, caption generation, etc. have been developed as a result. However, despite the recent developments in deep learning, very few deep learning based techniques have been proposed to tackle the problem of violence detection from videos. Almost all the existing techniques rely on hand-crafted features for generating visual representations of videos. The most important advantage of deep learning techniques compared to the traditional hand-crafted feature based techniques is the ability of the former to achieve a high degree of generalization. Thus they are able to handle unseen data in a more effective way compared to handcrafted features. Moreover, no prior information about the data is required in the case of a deep neural network and they can be inputted with raw pixel values without much complex pre-processing. Also, deep learning techniques are not application specific unlike the hand-crafted feature based methods since a deep neural network model can be easily applied for a different task without any significant changes to the architecture. Owing to these reasons, we choose to develop a deep neural network for performing violent video recognition. Our contributions can be summarized as follows: • We develop an end-to-end trainable deep neural network model for performing violent video classification • We show that a recurrent neural network capable of encoding localized spatio-temporal changes generates a better representation, with less number of parameters, for detecting the presence of violence in a video • We show that a deep neural network trained on the frame difference performs better than a model trained on raw frames • We experimentally validate the effectiveness of the proposed method using three widely used benchmarks for violent video classification The rest of the document is organized as follows. Section 2 discusses some of the relevant techniques for performing violent video recognition followed by a detailed explanation of the proposed deep neural network model in Section 3. The details about the various experiments conducted as part of this research are given in Section 4 and the document is concluded in Section 5. 2. Related Works Several techniques have been proposed by researchers for addressing the problem of violence detection from videos. These include methods that use the visual content [21, 2], audio content [23, 12] or both [33, 1]. In this section, we will be concentrating on methods that use the visual cues alone since it is more related to the proposed approach and moreover audio data is generally unavailable with surveillance videos. All the existing techniques can be divided into two classes depending on the underlying idea 1. Inter-frame changes: Frames containing violence undergo massive variations because of fast motion due to fights [28, 5, 4, 8] 2. Local motion in videos: The motion change patterns taking place in the video is analyzed [6, 3, 7, 21, 15, 32, 20, 24, 13, 2, 11, 34] Vasconcelos and Lippman [28] used the tangent distance between adjacent frames for detecting the inter-frame variations. Clarin et al. improves this method in [5] by finding the regions with skin and blood and analyzing these regions for fast motion. Chen et al. [4] uses the motion vector encoded in the MPEG-1 video stream for detecting frames with high motion content and then detects the presence of blood for classifying the video as violent. Deniz et al. [8] proposes to use the acceleration estimate computed from the power spectrum of adjacent frames as an indicator of fast motion between successive frames. Motion trajectory information and the orientation of limbs of the persons present in the scene is proposed as a measure for detecting violence by Datta et al. [6]. Several other methods follow the techniques used in action recognition, i.e., to identify spatio-temporal interest points and extract features from these points. These include Harris corner detector [3], Space-time interest points (STIP) [7], motion scale-invariant feature transform (MoSIFT) [21, 32]. Hassner et al. [15] introduces a new feature descriptor called violent flows (ViF), which is the flow magnitude over time of the optical flow between adjacent frames, for detecting violent videos. This method is improved by Gao et al. [11] by incorporating the orientation of the violent flow features resulting in oriented violent flows (OViF) features. Substantial derivative, a concept in fluid dynamics, is proposed by Mohammadi et al. [20] as a discriminative feature for detecting violent videos. Gracia et al. [13] proposes to use the blob features, obtained by subtracting adjacent frames, as the feature descriptor. The improved dense trajectory features commonly used in action recognition is used as a feature vector by Bilinski et al. in [2]. They also propose an improved Fisher encoding technique that can encode spatiotemporal position of features in a video. Zhang et al. [34] proposes to use a modified version of motion Weber local descriptor (MoIWLD) followed by sparse representation as the feature descriptor. The hand-crafted feature based techniques used methods such as bag of words, histogram, improved Fisher encoding, etc. for aggregating the features across the frames. Recently various models using long short term memory (LSTM) RNNs [16] have been developed for addressing problems involving sequences such as machine translation [27], speech recognition [14], caption generation [31, 29] and video action recognition [9, 26]. The LSTM was introduced in 1997 to combat the effect of vanishing gradient problem which was plaguing the deep learning community. The LSTM incorporates a memory unit which contains information about the inputs the LSTM unit has seen and is regulated using a number of fully-connected gates. The same idea of using LSTM for feature aggregation is proposed by Dong et al. in [10] for violence detection. The method consisted of extracting features using a convolutional neural network from raw pixels, optical flow images and acceleration flow maps followed by LSTM based encoding and a late fusion. Recently, Xingjian et al. [30] replaced the fullyconnected gate layers of the LSTM with convolutional layers and used this improved model for predicting precipitation nowcasting from radar images with improved performance. This newer model of the LSTM is named as convolutional LSTM (convLSTM). Later, it has been used for predicting optical flow images from videos [22] and for anomaly detection in videos [18]. By replacing the fully-connected layers in the LSTM with convolutional layers, the convLSTM model is capable of encoding spatiotemporal information in its memory cell. 3. Proposed method The goal of the proposed study was to develop an endto-end trainable deep neural network model for classifying Frame 1 ConvLSTM Frame 2 Frame 2 96 256 384 384 256 96 256 384 384 256 96 256 384 384 256 Hidden State (256) Frame 3 Frame N-1 Frame N 10 2 256 1000 Figure 1. Block diagram of the proposed model. The model consists of alternating convolutional (red), normalization (grey) and pooling (blue) layers. The hidden state of the ConvLSTM (green) at the final time step is used for classification. The fully-connected layers are shown in brown colour. videos in to violent and non-violent ones. The block diagram of the proposed model is illustrated in figure 1. The network consists of a series of convolutional layers followed by max pooling operations for extracting discriminant features and convolutional long short memory (convLSTM) for encoding the frame level changes, that characterizes violent scenes, existing in the video. 3.1. ConvLSTM Videos are sequences of images. For a system to identify if a fight is taking place between the humans present in the video, it should be capable of identifying the locations of the humans and understand how the motion of the said humans are changing with time. Convolutional neural networks (CNN) are capable of generating a good representation of each video frame. For encoding the temporal changes a recurrent neural network (RNN) is required. Since we are interested in changes in both the spatial and temporal dimensions, convLSTM will be a suitable option. Compared to LSTM, the convLSTM will be able to encode the spatial and temporal changes using the convolutional gates present in them. This will result in generating a better representation of the video under analysis. The equations of the convLSTM model are given in equations 1-6. it = σ(wxi ∗ It + whi ∗ ht−1 + bi ) (1) ft = σ(wxf ∗ It + whf ∗ ht−1 + bf ) c̃t = tanh(wxc̃ ∗ It + whc̃ ∗ ht−1 + bc̃ ) (2) (3) ct = c̃t ⊙ it + ct−1 ⊙ ft ot = σ(wxo ∗ It + who ∗ ht−1 + bo ) (4) (5) ht = ot ⊙ tanh(ct ) (6) In the above equations, ‘*’ represents convolution operation and ‘⊙’ represents the Hadamard product. The hidden state ht , the memory cell ct and the gate activations it , ft and ot are all 3D tensors in the case of convLSTM. For a system to identify a video as violent or non-violent, it should be capable of encoding localized spatial features and the manner in which they change with time. Handcrafted features are capable of achieving this with the downside of having increased computational complexity. CNNs are capable of generating discriminant spatial features but existing methods use the features extracted from the fullyconnected layers for temporal encoding using LSTM. The output of the fully-connected layers represents a global descriptor of the whole image. Thus the existing methods fail to encode the localized spatial changes. As a result, they resort to methods involving addition of more streams of data such as optical flow images [10] which results in increased computational complexity. It is in this context that the use of convLSTM becomes relevant as it is capable of encoding the convolutional features of the CNN. Also, the convolutional gates present in the convLSTM is trained to encode the temporal changes of local regions. In this way, the whole network is capable of encoding localized spatiotemporal features. 3.2. Network Architecture Figure 1 illustrates the architecture of the network used for identifying violent videos. The convolutional layers are trained to extract hierarchical features from the video frames and are then aggregated using the convLSTM layer. The network functions as follows: The frames of the video under consideration are applied sequentially to the model. Once all the frames are applied, the hidden state of the convLSTM layer in this final time step contains the representation of the input video frames applied. This video representation, in the hidden state of the convLSTM, is then applied to a series of fully-connected layers for classification. In the proposed model, we used the AlexNet model [17] pre-trained on the ImageNet database as the CNN model for extracting frame level features. Several studies have found Table 1. Classification accuracy obtained with the hockey fight dataset for different models Input Video Frames (random initialization) Video Frames (ImageNet pre-trained) Difference of Video Frames (random initialization) Difference of Video Frames (ImageNet pre-trained) Classification Accuracy 94.1±2.9% 96±0.35% 95.5±0.5% 97.1±0.55% out that networks trained on the ImageNet database is capable of having better generalization and results in improved performance for tasks such as action recognition [25] [19]. In the convLSTM, we used 256 filters in all the gates with a filter size of 3 × 3 and stride 1. Thus the hidden state of the convLSTM consists of 256 feature maps. A batch normalization layer is added before the first fully-connected layer. Rectified linear unit (ReLU) non-linear activation is applied after each of the convolutional and fully-connected layers. In the network, instead of applying the input frames as such, the difference between adjacent frames are given as input. In this way, the network is forced to model the changes taking place in adjacent frames rather than the frames itself. This is inspired by the technique proposed by Simonyan and Zisserman in [25] to use optical flow images as input to a neural network for action recognition. The difference image can be considered as a crude and approximate version of optical flow images. So in the proposed method, the difference between adjacent video frames are applied as input to the network. As a result, the computational complexity involved in the optical flow image generation is avoided. The network is trained to minimize the binary cross entropy loss. rithm. Since the number of videos present in the datasets are limited, data augmentation techniques such as random cropping and horizontal flipping are used during training stage. During each training iteration, a portion of the frame of size 224 × 224 is cropped, from the four corners or from the center, and is randomly flipped before applying to the network. Note that the same augmentation technique is followed for all the frames present in a video. The network is run for 7500 iterations during the training stage. In the evaluation stage, the video frames are resized to 224 × 224 and are applied to the network for classifying them as violent or non-violent. All the training video frames in a dataset are normalized to make their mean zero and variance unity. 4.2. Datasets To evaluate the effectiveness of the proposed approach in classifying violent videos, three benchmark datasets are used and the classification accuracy is reported. The performance of the proposed method is evaluated on three standard public datasets namely, Hockey Fight Dataset [21], Movies Dataset [21] and Violent-Flows Crowd Violence Dataset [15]. They contain videos captured using mobile phones, CCTV cameras and high resolution video cameras. Hockey Fight Dataset: Hockey fight dataset is created by collecting videos of ice hockey matches and contains 500 fighting and non-fighting videos. Almost all the videos in the dataset have a similar background and subjects (humans). 20 frames from each video are used as inputs to the network. Movies Dataset: This dataset consists of fight sequences collected from movies. The non-fight sequences are collected from other publicly available action recognition datasets. The dataset is made up of 100 fight and 100 nonfight videos. As opposed to the hockey fight dataset, the videos of the movies dataset is substantially different in its content. 10 frames from each video are used as inputs to the network. Violent-Flows Dataset: This is a crowd violence dataset as the number of people taking part in the violent events are very large. Most of the videos present in this dataset are collected from violent events taking place during football matches. There are 246 videos in this dataset. 20 frames from each video are used as inputs to the network. 4.1. Experimental Settings 4.3. Results and Discussions The network is implemented using the Torch library. From each video, N number of frames equally spaced in time are extracted and resized to a dimension of 256 × 256 for training. This is to avoid the redundant computations involved in processing all the frames, since adjacent frames contain overlapping information. The number of frames selected is based on the average duration of the videos present in each dataset. The network is trained using RMSprop algorithm with a learning rate of 10−4 and a batch size of 16. The model weights are initialized using Xavier algo- Performance evaluation is done using 5-folds cross validation scheme, which is the technique followed in existing literature. The model architecture selection was done by evaluating the performance of the different models on the hockey fight dataset. The classification accuracies obtained for the two cases, video frames as input and difference of frames as input, is listed in table 1. From the table, it can also be seen that using a network that is pre-trained on the ImageNet dataset (we used BVLC AlexNet from Caffe model zoo) results in better performance compared to us- 4. Experiments and Results Table 2. Comparison of classification results Method MoSIFT+HIK[21] ViF[15] MoSIFT+KDE+Sparse Coding[32] Deniz et al.[8] Gracia et al.[13] Substantial Derivative[20] Bilinski et al.[2] MoIWLD[34] ViF+OViF[11] Three streams + LSTM[10] Proposed Hockey Dataset 90.9% 82.9±0.14% 94.3±1.68% 90.1±0% 82.4±0.4% 93.4 96.8±1.04% 87.5±1.7% 93.9 97.1±0.55% ing a network that is randomly initialized. In this way, we decided to use frame difference as the input and to use a pre-trained network in the model. Table 2 gives the classification accuracy values obtained for the various datasets considered in this study and is compared against 10 state of the art techniques. From the table, it can be seen that the proposed method is able to better the results of the existing techniques in the case of hockey fights dataset and movies dataset. As mentioned earlier, this study considers aggressive behavior as violent. The biggest problem of considering this definition occurs in the case of sports. For instance, in the hockey dataset, the fight videos consists of players colliding against each other and hitting one another. So one easy way to detect violent scenes is to check if one player moves closer to another. But the non-violent videos also consist of players hugging each other or doing high fives as part of a celebration. It is highly likely that these videos could be mistaken as violent. But the proposed method is able to avoid this which suggests that it is capable of encoding motion of localized regions (motion of limbs, reaction of involved persons, etc.). However, in the case of violent-flows dataset, the proposed method is not able to best the previous state of the art technique (it came second in terms of accuracy). Analyzing the dataset, it is found that in most of the violent videos, only a small part of the crowd is found to be involved in aggressive behavior while a large part remained as spectators. This forces the network to mark such videos as non-violent since majority of the people present in it is found to behave normally. Further studies are required for devising techniques to alleviate this problem involved with crowd videos. One technique that can be considered is to divide the frame in to sub-regions and predict the output of the regions separately and mark the video as violent if any of the regions is outputted by the network as violent. In order to compare the advantage of convLSTM over traditional LSTM, a different model that consists of LSTM is trained and tested on the hockey fights dataset. The new Movies Dataset 89.5% 98.0±0.22% 97.8±0.4% 96.89±0.21% 99 100±0% Violent-Flows Dataset 81.3±0.21% 89.05±3.26% 85.43±0.21% 96.4 93.19±0.12% 88±2.45% 94.57±2.34% Table 3. Comparison between convLSTM and LSTM models in terms of classification accuracy obtained in the hockey fights dataset and number of parameters Model convLSTM LSTM Accuracy 97.1±0.55% 94.6±1.19% No. of Parameters 9.6M(9619544) 77.5M(77520072) model consists of the AlexNet architecture followed by an LSTM RNN layer. The output of the last fully-connected layer (fc7) of AlexNet is applied as input to an LSTM with 1000 units. The rest of the architecture is similar to the one that uses convLSTM. The results obtained with this model and the number of trainable parameters associated with it are compared against the proposed model in table 3. The table clearly shows the advantages of using convLSTM over LSTM and the capability of convLSTM in generating useful video representation. It is also worth mentioning that the number of parameters that are required to be optimized, in the case of convLSTM, is very much less compared to LSTM (9.6M vs 77.5M). This helps the network to generalize better without overfitting in the case of limited data. The proposed model is capable of processing 31 frames per second on an NVIDIA K40 GPU. 5. Conclusions This work presents a novel end-to-end trainable deep neural network model for addressing the problem of violence detection in videos. The proposed model consists of a convolutional neural network (CNN) for frame level feature extraction followed by feature aggregation in the temporal domain using convolutional long short term memory (convLSTM). The proposed method is evaluated on three different datasets and resulted in improved performance compared to the state of the art methods. It is also shown that a network trained to model changes in frames (frame difference) performs better than a network trained using frames as inputs. A comparative study between the tradi- tional fully-connected LSTM and convLSTM is also done and the results show that the convLSTM model is capable of generating a better video representation compared to LSTM with less number of parameters, thereby avoiding overfitting. References [1] E. Acar, F. Hopfgartner, and S. Albayrak. Breaking down violence detection: Combining divide-et-impera and coarseto-fine strategies. Neurocomputing, 208:225–237, 2016. 2 [2] P. Bilinski and F. Bremond. Human violence recognition and detection in surveillance videos. In AVSS, 2016. 2, 5 [3] D. Chen, H. Wactlar, M.-y. Chen, C. Gao, A. Bharucha, and A. Hauptmann. Recognition of aggressive human behavior using binary local motion descriptors. In International Conference of the IEEE Engineering in Medicine and Biology Society (EMBS), 2008. 2 [4] L.-H. Chen, H.-W. Hsu, L.-Y. Wang, and C.-W. Su. Violence detection in movies. In International Conference on Computer Graphics, Imaging and Visualization (CGIV), 2011. 2 [5] C. Clarin, J. Dionisio, and M. Echavez. Dove: Detection of movie violence using motion intensity analysis on skin and blood. Technical report, University of the Philippines, 01 2005. 2 [6] A. Datta, M. Shah, and N. D. V. Lobo. Person-on-person violence detection in video data. In ICPR, 2002. 2 [7] F. D. De Souza, G. C. Chavez, E. A. do Valle Jr, and A. d. A. Araújo. Violence detection in video using spatio-temporal features. In Conference on Graphics, Patterns and Images (SIBGRAPI), 2010. 2 [8] O. Deniz, I. Serrano, G. Bueno, and T.-K. Kim. Fast violence detection in video. In International Conference on Computer Vision Theory and Applications (VISAPP), 2014. 2, 5 [9] J. Donahue, L. Anne Hendricks, S. Guadarrama, M. Rohrbach, S. Venugopalan, K. Saenko, and T. Darrell. Long-term recurrent convolutional networks for visual recognition and description. In CVPR, 2015. 2 [10] Z. Dong, J. Qin, and Y. Wang. Multi-stream deep networks for person to person violence detection in videos. In Chinese Conference on Pattern Recognition, 2016. 2, 3, 5 [11] Y. Gao, H. Liu, X. Sun, C. Wang, and Y. Liu. Violence detection using oriented violent flows. Image and Vision Computing, 48:37–41, 2016. 2, 5 [12] T. Giannakopoulos, A. Pikrakis, and S. Theodoridis. A multi-class audio classification method with respect to violent content in movies using bayesian networks. In IEEE Workshop on Multimedia Signal Processing (MMSP), 2007. 2 [13] I. S. Gracia, O. D. Suarez, G. B. Garcia, and T.-K. Kim. Fast fight detection. PloS one, 10(4):e0120448, 2015. 2, 5 [14] A. Graves, N. Jaitly, and A.-r. Mohamed. Hybrid speech recognition with deep bidirectional lstm. In IEEE Workshop on Automatic Speech Recognition and Understanding (ASRU), 2013. 2 [15] T. Hassner, Y. Itcher, and O. Kliper-Gross. Violent flows: Real-time detection of violent crowd behavior. In CVPR Workshops, June 2012. 2, 4, 5 [16] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. 2 [17] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. 3 [18] J. R. Medel and A. Savakis. Anomaly detection in video using predictive convolutional long short-term memory networks. arXiv preprint arXiv:1612.00390, 2016. 2 [19] I. Misra, C. L. Zitnick, and M. Hebert. Shuffle and learn: unsupervised learning using temporal order verification. In ECCV, 2016. 4 [20] S. Mohammadi, H. Kiani, A. Perina, and V. Murino. Violence detection in crowded scenes using substantial derivative. In AVSS, 2015. 2, 5 [21] E. B. Nievas, O. D. Suarez, G. B. Garcı́a, and R. Sukthankar. Violence detection in video using computer vision techniques. In International Conference on Computer Analysis of Images and Patterns. Springer, 2011. 2, 4, 5 [22] V. Pătrăucean, A. Handa, and R. Cipolla. Spatio-temporal video autoencoder with differentiable memory. In ICLR Workshop, 2016. 2 [23] S. Pfeiffer, S. Fischer, and W. Effelsberg. Automatic audio content analysis. In ACM International Conference on Multimedia, 1997. 2 [24] P. Rota, N. Conci, N. Sebe, and J. M. Rehg. Real-life violent social interaction detection. In ICIP, 2015. 2 [25] K. Simonyan and A. Zisserman. Two-stream convolutional networks for action recognition in videos. In NIPS, 2014. 4 [26] N. Srivastava, E. Mansimov, and R. Salakhutdinov. Unsupervised learning of video representations using lstms. In ICML, 2015. 2 [27] I. Sutskever, O. Vinyals, and Q. V. Le. Sequence to sequence learning with neural networks. In NIPS, 2014. 2 [28] N. Vasconcelos and A. Lippman. Towards semantically meaningful feature spaces for the characterization of video content. In ICIP, 1997. 2 [29] S. Venugopalan, M. Rohrbach, J. Donahue, R. Mooney, T. Darrell, and K. Saenko. Sequence to sequence-video to text. In ICCV, 2015. 2 [30] S. Xingjian, Z. Chen, H. Wang, D.-Y. Yeung, W.-K. Wong, and W.-c. Woo. Convolutional lstm network: A machine learning approach for precipitation nowcasting. In NIPS, 2015. 2 [31] K. Xu, J. Ba, R. Kiros, K. Cho, A. C. Courville, R. Salakhutdinov, R. S. Zemel, and Y. Bengio. Show, attend and tell: Neural image caption generation with visual attention. In ICML, 2015. 2 [32] L. Xu, C. Gong, J. Yang, Q. Wu, and L. Yao. Violent video detection based on mosift feature and sparse coding. In ICASSP, 2014. 2, 5 [33] W. Zajdel, J. D. Krijnders, T. Andringa, and D. M. Gavrila. Cassandra: audio-video sensor fusion for aggression detection. In AVSS, 2007. 2 [34] T. Zhang, W. Jia, X. He, and J. Yang. Discriminative dictionary learning with motion weber local descriptor for violence detection. IEEE Transactions on Circuits and Systems for Video Technology, 27(3):696–709, 2017. 2, 5
1cs.CV
1 Nonparametric Inference via Bootstrapping the Debiased Estimator arXiv:1702.07027v2 [stat.ME] 26 Feb 2017 Yen-Chi Chen1 Department of Statistics University of Washington February 28, 2017 In this paper, we propose to construct confidence bands by bootstrapping the debiased kernel density estimator (for density estimation) and the debiased local polynomial regression estimator (for regression analysis). The idea of using a debiased estimator was first introduced in Calonico et al. (2015), where they construct a confidence interval of the density function (and regression function) at a given point by explicitly estimating stochastic variations. We extend their ideas and propose a bootstrap approach for constructing confidence bands that is uniform for every point in the support. We prove that the resulting bootstrap confidence band is asymptotically valid and is compatible with most tuning parameter selection approaches, such as the rule of thumb and cross-validation. We further generalize our method to confidence sets of density level sets and inverse regression problems. Simulation studies confirm the validity of the proposed confidence bands/sets. Keywords and phrases: Kernel density estimator, local polynomial regression, level set, inverse regression, confidence set, bootstrap. 1. Introduction. In nonparametric statistics, how to construct a confidence band has been a central research topic for several decades. However, this problem has not yet been fully resolved because of its intrinsic difficulty. The main issue is that the nonparametric estimation error generally contains a bias part and a stochastic variation part. Stochastic variation can be captured using a limiting distribution or a resampling approach, such as the bootstrap (Efron, 1979). However, the bias is not easy to handle because it often involves higher-order derivatives of the underlying function and cannot be easily captured by resampling methods (see, e.g., page 89 in Wasserman 2006). To construct a confidence band, two main approaches are proposed in the literature. The first one is to undersmooth the data so the bias converges faster than the stochastic variation (Bjerve et al., 1985; Hall, 1992a; Hall and Owen, 1993; Chen, 1996; Wasserman, 2006). Namely, we choose the tuning parameter (e.g., the smoothing bandwidth in the kernel estimator) in a way such that the bias shrinks faster than the stochastic variation. Because the bias term is negligible compared to the stochastic variation, the resulting confidence band is (asymptotically) valid. The other approach is to estimate the bias and then construct a confidence band after correcting the bias (Härdle and Bowman, 1988; Hardle and Marron, 1991; Hall, 1992b; Eubank and Speckman, 1993; Fan and Gijbels, 1996; Wasserman, 2006). The second approach is sometimes called a debiased, or bias-corrected, approach. Because the bias term often involves higher-order derivative of the targeted function, we need to introduce another estimator of the derivatives to correct the bias to obtain a consistent bias estimator. However, both approaches have their limitations. If we undersmooth the data, we no longer have the optimal convergence rate because we are not balancing the bias and stochastic variation. This inflates the size of the confidence bands, which makes it suboptimal for practical use. For the debiased method, we need to use another estimator to consistently estimate the bias, which generally requires choosing another tuning parameter. Having another tuning parameter makes the problem even more complicated and limits its practical applicability. 1 [email protected] 2 In this paper, we introduce a simple approach to construct confidence bands for both density and regression functions. We use the kernel density estimator (KDE) to estimate the density function and local polynomial regression for inferring the regression function. Our method is based on the debiased estimator proposed in Calonico et al. (2015), where the authors propose a confidence band of a fixed point using an explicit estimation of the errors. However, they consider univariate density and their approach is only valid for a given point, which limits the applicability. We generalize their idea to multivariate densities and propose using the bootstrap to construct a confidence band that is uniform for every point in the support. A feature of the debiased estimator in Calonico et al. (2015) is that we are able to construct a confidence band even without a consistent bias estimator. Thus, our approach requires only one single tuning parameter-the smoothing bandwidth-and this tuning parameter is compatible with most off-the-shelf bandwidth selectors, such as the rule of thumb in the KDE or cross-validation in regression (Fan and Gijbels, 1996; Wasserman, 2006; Scott, 2015). This leads to a simple but elegant approach to construct a valid confidence band with uniform coverage over the entire support. As an illustration, consider Figure 1, where we apply the nonparametric bootstrap with L∞ metric to construct confidence bands. We consider one example for density estimation and one example for regression. In the first example (top row of Figure 1), we have a size 2000 random sample from a Gaussian mixture, such that with a probability of 0.6, a data point is generated from the standard normal and with a probability of 0.4, a data point is from a normal centered at 4. We choose the smoothing bandwidth using the rule of thumb (Silverman, 1986), estimate the density using the debiased KDE, and use the bootstrap to construct a 95% confidence band. In the left panel, we display one example of the confidence band for the population density function (black curve) with a confidence band from bootstrapping the usual KDE (red band) and that from bootstrapping the debiased KDE (blue band). The right panel shows the coverage of the bootstrap confidence band under various nominal levels. For the second example (bottom row of Figure 1), we consider estimating the regression function of Y = sin(π · X) + , where  ∼ N (0, 0.12 ) and X is from a uniform distribution on [0, 1]. We generate 500 points and apply the local linear smoother to estimate the regression function. We select the smoothing bandwidth by repeating a 5-fold cross validation of the local linear smoother 1000 times. Then we estimate the regression function using both the local linear smoother (red) and the debiased local linear smoother (blue) and apply the empirical bootstrap to construct 95% confidence bands. In both cases, we see that bootstrapping the usual estimator does not yield an asymptotically valid confidence band, but bootstrapping the debiased estimator gives us a valid confidence band with nominal coverages. Main Contributions. • We propose our confidence bands for both density estimation and regression problems (Section 3.1 and 3.2). • We generalize these confidence bands to both density level set and inverse regression problems (Section 3.1.1 and 3.2.1). • We derive the convergence rate of the debiased estimators under uniform loss (Lemma 2 and 7). • We derive the asymptotic theory of the debiased estimators and prove the consistency of confidence bands (Theorem 3, 4, 8, and 9). 3 Confidence Sets, Gaussian, N=2000 1.0 0.30 Density Estimation, 95% CI Original KDE Debiased KDE 0.0 0.00 0.05 0.2 0.10 0.4 0.15 0.6 0.20 Bootstrap Coverage 0.8 0.25 Original KDE Debiased KDE −4 −2 0 2 4 6 8 0.0 0.2 0.4 0.6 0.8 1.0 Nominal Coverage Local Polynomial Regression, 95% CI Localy Polynomial Reg., Sine, N=500 1.5 1.0 X Original LPR Debiased LPR ● ● ● ● ● ●● ● ●●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●●● ● ● ●● ● ● ● ● ● ● ● ●● ●● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●●● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ●● ●● ●● ● ● ● ●● ●● ●● ● ●● ● ●● ● ● ● ●●● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ●● ●● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ●● ● ● ●● ●● ● ● ●● ●● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●●● ● ●● ● ● 0.0 0.2 0.8 0.4 0.6 Bootstrap Coverage 0.2 0.0 Original LPR Debiased LPR −1.5 −1.0 −0.5 0.0 0.5 1.0 ● 0.4 0.6 X 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Nominal Coverage Fig 1. Confidence bands from bootstrapping the usual estimator versus bootstrapping the debiased estimator. In the top row, we consider estimating the density function of a Gaussian mixture. And in the bottom row, we consider estimating the regression function of a sine structure. The left panel displays one instance of 95% bootstrap confidence bands and the right panel shows the coverage of bootstrap confidence band under different nominal levels. 4 • We use simulations to show that our confidence bands/sets are indeed asymptotically valid (Section 5). Related Work. Our method is based on the pilot work in Calonico et al. (2015). Our confidence band is a bias correction (debiasing) method, which is a common method for constructing confidence bands of nonparametric estimators. An incomplete list of literature about bias correction approach is as follows: Härdle and Bowman (1988); Hardle and Marron (1991); Hall (1992b); Eubank and Speckman (1993); Sun and Loader (1994); Härdle et al. (1995); Neumann (1995); Xia (1998); Härdle et al. (2004). The confidence sets about level sets and inverse regression are related to Lavagnini and Magno (2007); Bissantz and Birke (2009); Birke et al. (2010); Tang et al. (2011); Mammen and Polonik (2013); Chen et al. (2015b). Outline. In Section 2, we give a brief review of the debiased estimator proposed in Calonico et al. (2015). In Section 3, we propose our approaches for constructing confidence bands of density and regression functions and generalize these approaches to density level sets and inverse regression problems. In Section 4, we derive a convergence rate for the debiased estimator and prove the consistency of confidence bands. In Section 5, we use simulations to demonstrate that our proposed confidence bands/sets are indeed asymptotically valid. Finally, we conclude this paper and discuss some possible future directions in Section 6. 2. Debiased Estimator. Here we briefly review the debiased estimator of the KDE and local polynomial regression proposed in Calonico et al. (2015). 2.1. Kernel Density Estimator. Let X1 , · · · , Xn be IID from an unknown density function p with a compact support K ∈ Rd . For simplicity, we consider d = 1 case. The (original) KDE is   n 1 X x − Xi pbh (x) = , K h nhd i=1 where K(x) is the kernel function and h > 0 is the smoothing bandwidth. Now we define the Hessian estimator using another smoothing bandwidth b > 0 as   n 1 X (2) x − Xi (2) , pbb (x) = d+2 K b nb i=1 where K (2) (x) = ∇2 K(x) is the Laplacian (second derivative) of the kernel function K(x). Let τ = hb . The debiased KDE is (2) (1) pbτ,h (x) = pbh (x) − cK · h2 · pbb (x)     n n 1 X x − Xi 1 1 X (2) x − Xi 2 − · cK · h · d+2 = K K h 2 b nhd nb i=1 i=1   n 1 X x − Xi = Mτ , d h nh i=1 where (2) Mτ (x) = K(x) − cK · τ d+2 · K (2) (τ · x), 5 R where cK = x2 K(x)dx. Note that when we use the Gaussian kernel, cK = 1. The function Mτ (x) can be viewed as a new kernel function, which we called the debiased kernel function. (2) Note that the second quantity cK · h2 · pbb (x) is an estimate for the asymptotic bias in the KDE. An important remark is that we allow τ ∈ (0, ∞) to be a fixed number and still have a valid confidence band. In practice, we often choose h = b (τ = 1). (2) A feature of the debiased KDE is that the second derivative estimator pbb (x) (the debiased (2) part) is not a consistent estimator of pb (x) because the variance will be O(1) when τ is fixed. (2) Although pbb (x) is not a consistent estimator, it is an asymptotically unbiased estimator of 2 ∇ p(x). Thus, adding this term to the original KDE trades the bias of pbh (x) into the stochastic variability of pbτ,h (x). For statistical inference, as long as we can use resampling methods to capture the variability of the estimator, we are able to construct a valid confidence band. The reason why bootstrapping the debiased KDE pbτ,h (x) works is because the bias of pbτ,h (x) converges faster than its stochastic variability. The stochastic variability can be captured by the bootstrap, which leads to a valid confidence band. 2.2. Local Polynomial Regression. Now we introduce the debiased estimator for the local polynomial regression (Fan and Gijbels, 1996; Wasserman, 2006). For simplicity, we consider the local linear smoother (local polynomial regression with degree 1) and assume that the covariate has dimension 1. One can easily generalize this method into higher-order local polynomial regression or multivariate covariates. Let (X1 , Y1 ), · · · , (Xn , Yn ) be the observed random sample for the covariate Xi ∈ D ⊂ R and the response Yi ∈ R. The parameter of interest in regression analysis is the regression function r(x) = E(Yi |Xi = x). The local linear smoother for estimating r(x) is (3) rbh (x) = n X `i,h (x)Yi , i=1 with ωi,h (x) `i,h (x) = Pn i=1 ωi,h (x)   x − Xi ωi,h (x) = K (Sn,h,2 (x) − (Xi − x)Sn,h,1 (x)) h   n X x − Xi j Sn,h,j (x) = (Xi − x) K , j = 1, 2, h i=1 where K(x) is the kernel function and h > 0 is the smoothing bandwidth. To debias rbh (x), we use the local polynomial regression for estimating the second derivative 00 r (x). We consider the third-order local polynomial regression estimator of r00 (x), which is given by (4) rbb00 (x) = n X i=1 `i,b (x, 2)Yi 6 with `b (x, 2)T = (`1,b (x, 2), · · · , `n,b (x, 2)) ∈ Rn = eT3 (XxT Wb,x Xx )−1 XxT Wx , where eT3 = (0, 0, 1, 0),   1 X1 − x · · · (X1 − x)3 1 X2 − x · · · (X2 − x)3    Xx =  .  ∈ Rn×4 , .. .. ..  ..  . . . 3 1 Xn − x · · · (Xn − x)      x − Xn x − X1 ,··· ,K ∈ Rn×n . Wb,x = Diag K b b Namely, rbb00 (x) is the local polynomial regression estimator of second derivative r00 (x) using smoothing bandwidth b > 0. Using the same quantity τ = h/b, the debiased local linear smoother is rbτ,h (x) = rbh (x) − (5) 1 (2) · cK · h2 · rbh/τ (x), 2 R where cK = x2 K(x)dx is the same as the constant used in the debiased KDE. Note that in practice, we often choose h = b(τ = 1) . Essentially, the debiased local linear smoother uses (2) rbh/τ (x) to correct the bias of the local linear smoother rbh (x). Remark 1. One can also construct a debiased estimator using the kernel regression (Nadaraya-Watson estimator; Nadaraya 1964). However, because the bias of the kernel regression has an extra design bias term r0 (x)p0 (x) 1 cK · h2 · , 2 p(x) the debiased estimator will be more complicated. We need to estimate r0 (x), p0 (x), and p(x) to correct the bias. 3. Confidence Bands. 3.1. Inference of Density Function. Here is how we construct our confidence bands of density function. Given the original sample X1 , · · · , Xn , we apply the empirical bootstrap (Efron, 1979) to generate the bootstrap sample X1∗ , · · · , Xn∗ . Then we apply the debiased KDE (1) with the bootstrap sample to obtain the bootstrap debiased KDE   n 1 X x − Xi∗ ∗ pbτ,h (x) = Mτ , (6) h nhd i=1 where Mτ is the debiased kernel defined in equation (2). Finally, we compute the bootstrap L∞ metric pb∗τ,h − pbτ,h , where kf k∞ = supx |f (x)|. ∞ 7 Confidence Bands of Density Function 1. Choose the smoothing bandwidth hRT by a standard approach such as the rule of thumb or crossvalidation (Silverman, 1986; Sheather and Jones, 1991; Sheather, 2004). 2. Compute the debiased KDE pbτ,hRT with a fixed value τ (in general, we choose τ = 1). 3. Bootstrap the original sample for B times and compute the bootstrap debiased KDE ∗(1) ∗(B) pbτ,hRT , · · · , pbτ,hRT . 4. Compute the quantile b t1−α = Fb−1 (1 − α), B  1 X  ∗(j) Fb(t) = I kb pτ,hRT − pbτ,hRT k∞ < t . B j=1 5. Output the confidence band   b1−α (x) = pbτ,h (x) − b C t1−α , pbτ,h (x) + b t1−α . Fig 2. Confidence bands of the density function. Let Fb(t) = P  ∗(1) pbτ,h − pbτ,h ∞ ≤ t|X1 , · · · , Xn  be the distribution of the bootstrap L∞ metric and let b t1−α be the (1 − α) quantile of Fb(t). Then a (1 − α) confidence band of p is   b1−α (x) = pbτ,h (x) − b C t1−α , pbτ,h (x) + b t1−α . In Theorem 4, we prove that this is an asymptotic valid confidence band of p when c0 ≥ 0 for some c0 . Namely, we will prove   b1−α (x) ∀x ∈ K ≥ 1 − α + oP (1). P p(x) ∈ C nhd+4 log n → The constraint on the smoothing bandwidth allows us to choose h = O(n−1/(d+4) ), which is the rate of most bandwidth selectors in the KDE literature (Silverman, 1986; Sheather and Jones, 1991; Sheather, 2004). Thus, we can choose the tuning parameter using one of these standard methods and bootstrap the debiased estimators to construct the confidence band. This leads to a simple but elegant confidence band with uniform coverage over the entire support. Figure 2 provides a summary of the proposed procedure. Note that one can replace the KDE using the local polynomial density estimator and the resulting confidence band is still valid. The validity of the confidence band follows from the validity of the confidence band of the local linear smoother (Theorem 9). Remark 2. We can construct a variable width confidence band by bootstrapping pbτ,h − p √ p , ∞ the weighted L∞ -metric. This is because the variance of pbτ,h is proportional to p(x), so we rescale the difference, making the resulting empirical process have an equal variance at each 8 position. In more detail, we choose e t1−α as the 1 − α quantile of pb∗τ,h − pbτ,h p pbh ∞ and construct a confidence band using i h p p e1−α (x) = pbτ,h (x) − e t1−α pbh (x) . (7) C t1−α pbh (x), pbτ,h (x) + e Note that when we rescale the difference, we use the original estimator pbh instead of the debiased estimator pbτ,h because the debiased estimator may take negative value (this is because it is a KDE using a fourth-order kernel–see the discussion after Lemma 1). A feature of this confidence band is that the width of the resulting confidence band now depends on x and by a similar derivation as Theorem 4, it is also an asymptotically valid confidence band. Remark 3. In a sense, the debiased estimator is similar to the debiased lasso (Javanmard and Montanari, 2014; Van de Geer et al., 2014; Zhang and Zhang, 2014) where we add an extra term to the original estimator to correct the bias so that the stochastic variation dominates the estimation error. Then the stochastic variation can be estimated using either a limiting distribution or a bootstrap, which leads to a (asymptotically) valid confidence band. 3.1.1. Inference of Density Level Sets. In addition to the confidence band of p, bootstrapping the debiased KDE gives us a confidence set of the level set of p. Let λ be a given level. We define D = {x : p(x) = λ} as the λ-level set of p Polonik (1995); Tsybakov (1997). A simple estimator for D is the plug-in estimator based on the debiased KDE: b τ,h = {x : pbτ,h (x) = λ}. D Under regularity conditions, a consistent density estimator leads to a consistent level set estimator (Polonik, 1995; Tsybakov, 1997; Cuevas et al., 2006; Rinaldo et al., 2012). Now we propose a confidence set of D based on bootstrapping the debiased KDE. We will use the method proposed in Chen et al. (2015b). To construct a confidence set for D, we introduce the Hausdorff distance which is defined as   Haus(A, B) = max sup d(x, B), sup d(x, A) . x∈A x∈B The Hausdorff distance is like an L∞ metric for sets. b ∗ = {x : pb∗ (x) = λ} be the plug-in Recall that pb∗τ,h is the bootstrap debiased KDE. Let D τ,h τ,h estimator of D using the bootstrap debiased KDE. Now define b tLV 1−α to be the 1 − α quantile of the distribution of the bootstrap Hausdorff distance   b∗ , D b τ,h ) < t|X1 , · · · , Xn . FbLV (t) = P Haus(D τ,h 9 Confidence Bands of Regression Function 1. Choose the smoothing bandwidth hCV by cross-validation (5-fold or 10-fold) or other bandwidth selector with the usual local linear smoother. 2. Compute the debiased local linear smoother rbτ,hCV with a fixed value τ (in general, we choose τ = 1). 3. Bootstrap the original sample for B times and compute the bootstrap debiased local linear smoother ∗(1) ∗(B) rbτ,hCV , · · · , rbτ,hCV . 4. Compute the quantile b −1 (1 − α), sb1−α = G B  1 X  ∗(j) b G(s) = I kb rτ,hCV − rbτ,hCV k∞ < s . B j=1 5. Output the confidence band R b1−α C (x) = [b rτ,h (x) − sb1−α , rbτ,h (x) + sb1−α ] Fig 3. Confidence bands of the regression function. Then a (1 − α) confidence set of D is b τ,h ⊕ b D tLV 1−α , where A ⊕ r = {x : d(x, A) ≤ r} for a set A and a scalar r > 0. In Theorem 5, we prove that this is an asymptotically valid confidence set of D. Remark 4. Mammen and Polonik (2013) proposed an alternative way to construct confidence sets for the level sets by inverting the confidence bands of KDE. They proposed using {x : |b ph (x) − λ| < n,α } as a confidence set of D, where n,α is some suitable quantity computed from the data. This idea also works for the debiased KDE; we can construct a confidence set as  x : |b pτ,h (x) − λ| < b t1−α , where b t1−α is the 1 − α quantile of bootstrap L∞ metric given in Section 3.1. Moreover, Theorem 4 implies that this is also an asymptotically valid confidence set. 3.2. Inference of Regression Function. Now we turn to the confidence band for the regression function r(x). Again we propose using the empirical bootstrap (in the regression case it is also known as the paired bootstrap) to estimate r(x). Other bootstrap methods, such as the multiplier bootstrap (also known as the wild bootstrap; Wu 1986) or the residual bootstrap (Freedman, 1981), will also work under slightly different assumptions. Recall that rbτ,h (x) is the debiased local linear smoother. Given the original sample (X1 , Y1 ), · · · , (Xn , Yn ), we generate the bootstrap sample, denoted as (X1∗ , Y1∗ ), · · · , (Xn∗ , Yn∗ ). Then we compute the debiased local linear smoother using 10 ∗ (x). Let s the bootstrap sample to get the bootstrap debiased local linear smoother rbτ,h b1−α be the (1 − α) quantile of the distribution  ∗ b G(s) = P kb rτ,h − rbτ,h k∞ < s|X1 , · · · , Xn . Then a (1 − α) confidence band of r(x) is R b1−α C (x) = [b rτ,h (x) − sb1−α , rbτ,h (x) + sb1−α ] . That is, the confidence band is the debiased local linear smoother plus or minus the bootstrap quantile. The bottom left panel of Figure 1 shows an example of the confidence band. In Theorem 9, we prove that rbτ,h ± sb1−α is indeed an asymptotic 1 − α confidence band of nh5 the regression function r(x) when h → 0, log n → c0 ≥ 0 for some c0 . i.e.   b R (x) ∀x ∈ D ≥ 1 − α + oP (1). P r(x) ∈ C 1−α 5 nh The condition on smoothing bandwidth (h → 0, log n → c0 ≥ 0 for some c0 ≥ 0) is compatible with the optimal rate of the usual local linear smoother (h = O(n−1/5 )). Thus, we suggest choosing the smoothing bandwidth by cross-validating the original local linear smoother. This leads to a simple but valid confidence band. We can also use other bandwidth selectors such as those introduced in Chapter 4 of Fan and Gijbels (1996); these methods all yield a bandwidth at rate O(n−1/5 ), which works for our approach. Figure 3 summarizes the above procedure of constructing a confidence band. 3.2.1. Inference of Inverse Regression. The debiased local linear smoother can be used to construct confidence sets of the inverse regression problem (Lavagnini and Magno, 2007; Bissantz and Birke, 2009; Birke et al., 2010; Tang et al., 2011). Let r0 be a given level, the inverse regression finds the collection of points R such that R = {x : r(x) = r0 }. Namely, R is the region of covariates such that the regression function r(x) equals r0 , a fixed level. Note that the inverse regression is also known as the calibration problem (Brown, 1993; Gruet, 1996; Weisberg, 2005) and regression level set (Cavalier, 1997; Laloe and Servien, 2013). A simple estimator of R is the plug-in estimator from the debiased local linear smoother: b τ,h = {x : rbτ,h (x) = r0 } . R b τ,h is a consistent estimator of R under smoothness Laloe and Servien (2013) proved that R assumptions. To construct a confidence set of R, we propose the following bootstrap confidence set. ∗ (x) is the bootstrap debiased local linear smoother and let Recall that rbτ,h  b ∗ = x : rb∗ (x) = r0 R τ,h τ,h 11 be the plug-in estimator of R. Let sbR 1−α be the (1 − α) quantile of the distribution   b R (s) = P Haus(R b τ,h , R b τ,h ) < s|X1 , · · · , Xn . G Then an asymptotic confidence set of R is b τ,h ⊕ sbR = {x ∈ K : d(x, R b τ,h ) ≤ sbR }. R 1−α 1−α b ∗ ⊕ sbR is indeed an asymptotically valid (1 − α) confidence In Theorem 10, we prove that R 1−α τ,h set of R. b τ,h will contain When R contains only one element, say x0 , asymptotically the estimator R √ only one element x b0 . Moreover, nh(b x0 − x0 ) converges to a mean √ 0 normal distribution. b ∗ to estimate the variance of nh(b Thus, we can use the bootstrap R x0 − x0 ) and use the τ,h asymptotic normality to construct a confidence set. Namely, we use [b x0 + zα/2 · σ bR , x b0 + z1−α/2 · σ bR ] as a confidence set of x0 , where zα is the α quantile of a standard normal distribution and σ bR is the bootstrap variance estimate. We will also compare the coverage of confidence sets using this approach in Section 5. Similar to Remark 4, an alternative method of the confidence set of the inverse regression is given by inverting the confidence and of the regression function: {x : |m b τ,h (x) − r0 | < sb1−α } , where sb1−α is the bootstrap L∞ metric of the debiased local linear smoother (Section 3.2). As long as we have an asymptotically valid confidence band of m(x), the resulting confidence set of inverse regression is also asymptotically valid. Bissantz and Birke (2009) and Birke et al. (2010) suggested constructing confidence sets of R by undersmoothing. However, undersmoothing is not compatible with many common bandwidth selectors for regression analysis and the size will shrink at a slower rate. On the other hand, our method does not require any undersmoothing and later we will prove that the smoothing bandwidth from cross-validation hCV is compatible with our method (Theorem 10). Thus, we can simply choose hCV as the smoothing bandwidth and bootstrap the estimators to construct the confidence set. 4. Theoretical Analysis. 4.1. Kernel Density Estimator. For a multi-index vector β = (β1 , . . . , βd ) of non-negative integers, we define |β| = β1 + β2 + · · · + βd and the corresponding derivative operator (8) Dβ = ∂ β1 ∂xβ1 1 ··· ∂ βd ∂xβd d , where Dβ f is often written as f [β] . For a real number `, let b`c be the largest integer strictly less than `. For any given ξ, L > 0, we define the Hölder Class Σ(ξ, L) (Definition 1.2 in Tsybakov 1997) as the collection of functions such that n o Σ(ξ, L) = f : |f [β] (x) − f [β] (y)| ≤ L|x − y|ξ−|β| , ∀β s.t. |β| = bξc . 12 To derive the consistency of confidence bands/sets, we need the following assumptions. Assumptions. (K1) K(x) is symmetric and has at least second-order bounded derivative and Z Z  2 2 [β] kxk K (kxk)dx < ∞, K [β] (kxk) dx < ∞, where K [β] is partial derivative of K with respect to the multi-index vector β = (β1 , · · · , βd ) and for |β| ≤ 2. (K2) Let     kx − yk : x ∈ Rd , |β| = γ, h > 0 , Kγ = y 7→ K [β] h S where K [β] is defined in equation (8) and K`∗ = `γ=0 Kγ . We assume that K2∗ is a VC-type class. i.e., there exist constants A, v, and a constant envelope b0 such that  v A ∗ 2 (9) sup N (K2 , L (Q), b0 ) ≤ ,  Q where N (T, dT , ) is the -covering number for a semi-metric set T with metric dT and L2 (Q) is the L2 norm with respect to the probability measure Q. (P) The density function p has compact support K and is in Hölder Class Σ(2 + δ0 , L0 ) for some constant L0 > 0 and 2 ≥ δ0 > 0. (D) The gradient on the level set D = {x : p(x) = λ} is bounded from zero; i.e., inf k∇p(x)k ≥ g0 > 0 x∈D for some g0 . (K1) is a common and mild condition on kernel functions (Wasserman, 2006; Scott, 2015). (K2) is also a weak assumption to control the complexity of kernel functions so we have uniform consistency on density, gradient, and Hessian estimation (Giné and Guillou, 2002; Einmahl and Mason, 2005; Genovese et al., 2009, 2014; Chen et al., 2015a). Note that many common kernel functions, such as the Gaussian kernel, satisfy this assumption. (P) is a very mild assumption because δ0 can be a tiny number. We can interpret (P) as requiring the existence and smoothness of the second derivative of the density function. When δ0 > 2, our procedure is still valid but the bias of the debiased KDE will be at rate O(h4 ). (D) is a common assumption in the level set estimation literature to ensure level sets are (d − 1) dimensional hypersurfaces; see, e.g., Cadre (2006) and Chen et al. (2015b). Our first result is the pointwise bias and variance of the debiased KDE. Lemma 1 (Pointwise bias and variance). Assume (K1) and (P) and τ ∈ (0, ∞) is fixed. Then the bias and variance of pbτ,h is at rate E (b pτ,h (x)) − p(x) = O(h2+δ0 )   1 Var(b pτ,h (x)) = O . nhd 13 Lemma 2 is consistent with Calonico et al. (2015) and it shows an interesting result: the bias of the debiased KDE has rate O(h2+δ0 ) and its stochastic variation has the same rate as the usual KDE. This means that the debiasing operation kicks the bias of the density estimator into the next order and keeps the stochastic variation as the same order. Moreover, 1 − this also implies that the optimal bandwidth for the debiased KDE is h = O(n d+4+2δ0 ), which corresponds to oversmoothing the usual KDE. This is because when τ is fixed, the debiased KDE is actually a KDE with a fourth-order kernel function (Calonico et al., 2015). Namely, the debiased kernel Mτ is a fourth-order kernel function. Thus, the bias is pushed to the order O(h2+δ0 ) rather than the usual rate O(h2 ). Using the empirical process theory, we can further derive the convergence rate under the L∞ error. Lemma 2 (Uniform error rate of the debiased KDE). Assume (K1-2) and (P). Assume d+4 τ ∈ (0, ∞) is fixed and h → 0, nh log n → c0 ≥ 0 for some c0 . Then ! r log n 2+δ0 kb pτ,h − pk∞ = O(h ) + OP . nhd To obtain a confidence band, we need to study the L∞ error of the estimator pbτ,h . Recall from (1),   n 1 X x − Xi pbτ,h (x) = Mτ h nhd i=1   Z 1 x−y bn (y). = d Mτ dP h h Lemma 1 implies 1 E (b pτ,h (x)) = h  Z Mτ x−y h  dP(y) = p(x) + O(h2+δ0 ).  , we can rewrite Using the notation of empirical process and defining fx (y) = √1 d Mτ x−y h h the difference  1 b pbτ,h (x) − p(x) = √ Pn (fx ) − P(fx ) + O(h2+δ0 ). hd Therefore, √ √ (10) nhd (b pτ,h (x) − p(x)) = Gn (fx ) + O( nhd+4+2δ0 ) = Gn (fx ) + o(1) nhd+4 log n → c0 for some c0 ≥ 0. Based on the above derivations, we define the function     x−y 1 √ Fτ,h = fx (y) = Mτ :x∈K . h hd By using the Gaussian approximation method of Chernozhukov et al. (2014a,c), we derive the asymptotic behavior of pbτ,h . when class 14 Theorem 3 (Gaussian approximation). Assume (K1-2) and (P). Assume τ ∈ (0, ∞) is d+4 fixed and h → 0, nh log n → c0 ≥ 0 for some c0 . Then there exists a Gaussian process Bn defined on Fτ,h such that for any f1 , f2 ∈ Fτ,h , E(Bn (f1 )Bn (f2 )) = Cov (f1 (Xi ), f2 (Xi )) and !  7 1/8 ! √  log n sup P . nhd kb pτ,h − pk∞ ≤ t − P sup kBn (f )k ≤ t = O nhd t∈R f ∈Fτ,h Theorem 3 shows that the L∞ metric can be approximated by the distribution of the d+4 supremum of a Gaussian process. The requirement on h, nh log n → c0 ≥ 0 for some c0 , is very 1 useful–it allows the case where h = O(n− d+4 ), the optimal choice of smoothing bandwidth of the usual KDE. As a result, we can choose the smoothing bandwidth using standard receipts such as the the rule of thumb and least square cross-validation method (Chacón et al., 2011; Silverman, 1986). A similar Gaussian approximation (and later the bootstrap consistency) also appeared in Neumann and Polzehl (1998). Finally, we prove that the distribution of the bootstrap L∞ error kb p∗τ,h − pbτ,h k∞ approximates the distribution of the original L∞ error, which leads to the validity of the bootstrap confidence band. Theorem 4 (Confidence bands of density function). Assume (K1-2) and (P). Assume d+4 b τ ∈ (0, ∞) is fixed and h → 0, nh log n → c0 ≥ 0 for some c0 . Let t1−α be the 1 − α quantile of the distribution of the bootstrap L∞ metric; namely,   b t1−α = Fb−1 (1 − α), Fb(t) = P pb∗τ,h − pbτ,h ∞ < t|X1 , · · · , Xn . Then  7 1/8 !  log n b1−α (x) ∀x ∈ K = 1 − α + O P p(x) ∈ C . nhd  b1−α (x) is an asymptotically valid 1 − α confidence band of the density function p. Namely, C Theorem 4 proves that bootstrapping the debiased KDE leads to an asymptotically valid 1 confidence band of p. Moreover, we can choose the smoothing bandwidth at rate h = O(n− d+4 ), which is compatible with most bandwidth selectors. This shows that bootstrapping the debi  2  d+4 log n ased KDE yields a confidence band with width shrinking at rate OP , which is n not attainable if we undersmooth the usual KDE. Remark 5. The bootstrap consistency given in Theorem 4 shows that our method may be very useful in topological data analysis (Carlsson, 2009; Edelsbrunner and Morozov, 2012; Wasserman, 2016). Many statistical inferences of topological features of a density function are accomplished by bootstrapping the L∞ distance (Fasy et al., 2014; Chazal et al., 2014; Chen, 2016; Jisu et al., 2016). However, most current approaches consider bootstrapping the original KDE so the inference is for the topological features of the ‘smoothed’ density function rather than the features of the original density function p. By bootstrapping the debiased KDE, we 15 can construct confidence sets for the topological features of p. In addition, the assumption (P) in topological data analysis is reasonable because many topological features are related to the critical points (points where the density gradient is 0) and the curvature at these points (eigenvalues of the density Hessian matrix). To guarantee consistency when estimating these structures, we need to assume more smoothness of the density function, so (P) is a very mild assumption when we want to infer topological features. Remark 6. By a similar derivation as Chernozhukov et al. (2014a), we can prove that b C1−α (x) is a honest confidence band of the Hölder class Σ(2 + δ0 , L0 ) for some δ0 , L0 > 0. i.e.,  7 1/8 !   log n e1−α (x) ∀x ∈ K = 1 − α + O sup P p(x) ∈ C . nhd p∈Σ(2+δ0 ,L0 ) For a Hölder ! class Σ(2 + δ0 , L0 ), the optimal width of the confidence band will be at rate δ0 1+ O n 2 − d+4+2δ 0 1 (Tsybakov, 1997). With h = O(n− d+4 ), the width of our confidence band is 1 at rate OP (log n · n− d+4 ), which is suboptimal when δ0 is large. However, when δ0 is small, the size of our confidence band shrinks almost at the same rate as the optimal confidence band.  1/8  log7 n Remark 7. The correction in the bootstrap coverage, O , is not optimal. nhd Chernozukov et al. (2014) introduced an induction method to obtain a rate of O(n−1/6 ) for bootstrapping high dimensional vectors. We believethat one can apply a similar technique to  1/6 log7 n obtain a coverage correction at rate O . d nh The Gaussian approximation also works for the Hausdorff error of the level set estimab τ,h (Chen et al., 2015b). Thus, bootstrapping the Hausdorff metric approximates the tor D distribution of the actual Hausdorff error, leading to the following result. Theorem 5 (Confidence set of level sets). Assume (K1-2), (P), (D), and τ ∈ (0, ∞) is d+4 log n LV b fixed, and h → 0, nh b1−α . log n → c0 ≥ 0, nhd+2 → 0 for some c0 . Recall that Cn,1−α = Dτ,h ⊕ s Then  7 1/8 !  log n LV P D ⊂ Cn,1−α . =1−α+O nhd LV Namely, Cn,1−α is an asymptotic confidence set of the level set D = {x : p(x) = λ}. The proof of Theorem 5 is similar to the proof of Theorem 4 in Chen et al. (2015b), so we ignore it. The key element in the proof is showing that the supremum of an empirical process approximates the Hausdorff distance, so we can approximate the Hausdorff distance using the supremum of a Gaussian process. Finally we show that the bootstrap Hausdorff distance converges to the same Gaussian process. Theorem 5 proves that the bootstrapping confidence set of the level set is asymptotically valid. Thus, bootstrapping the debiased KDE leads to not only a valid confidence band of the density function but also a valid confidence set of the density level set. Note that Chen et al. 16 b h = {x : pbh (x) = λ}, which (2015b) proposed bootstrapping the original level set estimator D leads to a valid confidence set of the smoothed level set Dh = {x : E (b ph (x)) = λ}. However, their confidence set is not valid for inferring D unless we undersmooth the data. 4.2. Local Polynomial Regression. To analyze the theoretical behavior of the local linear smoother, we consider the following assumptions. Assumptions. (K3) Let K`†  =  y 7→ x−y h γ  K x−y h   : x ∈ D, γ = 0, · · · , `, h > 0 , We assume that K6† is a VC-type class (see assumption (K2) for the formal definition). (R1) E(|Y |4 |X = x) ≤ C0 < ∞, and the density of covariate X, pX , has compact support D ⊂ R and pX (x) > 0 for all x ∈ D. Moreover, pX is continuous and the regression function r is in Hölder Class Σ(2 + δ0 , L0 ) for some constant L0 > 0 and 2 ≥ δ0 > 0. (R2) At any point of R, the gradient of f is nonzero, i.e., inf kr0 (x)k ≥ g1 > 0, x∈R for some g1 . (K3) is the local polynomial version assumption of (K2), which is a mild assumption that any kernel with a compact support and the Gaussian kernel satisfies this assumption. (R1) contains two parts. The first part is a common assumption to guarantee the convergence rate of the local polynomial regression (Fan and Gijbels, 1996; Wasserman, 2006). The latter part of (R1) is analogous to (P), which is a very mild condition. (R2) is an analogous assumption to (D) that is needed to derive the convergence rate of the inverse regression. Lemma 6 (Bias and variance of the debiased local linear smoother). Assume (K1), (R1), and τ ∈ (0, ∞) is fixed. Then the bias and variance of rbτ,h for a given point x is at rate E (b rτ,h (x)) − r(x) = O(h2+δ0 )   1 Var(b rτ,h (x)) = O . nh R Define Ωk ∈ R(k+1)×(k+1) whose elements Ωk,ij = ui+j−2 K(u)du. and define eT1 = (1, 0) and eT3 = (0, 0, 1, 0). Let ψx : R2 7→ R be a function defined as   1 1 T −1 2 T −1 e Ω Ψ0,x (z) + cK · τ · e3 Ω3 Ψ2,τ x (τ z1 , z2 ) , (11) ψx (z) = pX (x) 1 1 2 and Ψ0,x (z1 , z2 )T = (η0 (x, z1 , z2 ), η1 (x, z1 , z2 )) Ψ2,x (z1 , z2 )T = (η0 (x, z1 , z2 ), η1 (x, z1 , z2 ), η2 (x, z1 , z2 ), η3 (x, z1 , z2 ))     z1 − x z1 − x j ηj (x, z1 , z2 ) = z2 · ·K . h h 17 Lemma 7 (Empirical approximation). Assume (K1,3), (R1),√and τ ∈ (0, ∞) is fixed, and nh5 h → 0, log nh(b rτ,h (x) − r(x)) has the n → c0 ≥ 0 for some c0 . Then the scaled difference following approximation: ! r √ 1 log n nh (b rτ,h (x) − r(x)) − √ Gn (ψx ) = O(h) + OP , sup nh h x∈D where ψx (z) is defined in equation (11). Moreover, the debiased local linear smoother rbτ,h (x) has the following error rate ! r log n 2+δ0 kb rτ,h − rk∞ = O(h ) + OP . nh √ Lemma 7 shows that we can approximate the scaled difference nh (b rτ,h (x) − r(x)) by 1 √ an empirical process h Gn (fx ). Based on this approximation, the second assertion (uniform bound) is an immediate result from the empirical process theory in Giné and Guillou (2002). Note that Lemma 7 also works for the usual local linear smoother or other local polynomial regression estimators (but centered at their expectations). Namely, the local polynomial regression can be uniformly approximated by an empirical process. This implies that we can apply empirical process theory to analyze the asymptotic behavior of the local polynomial regression. Remark 8. Fan and Gijbels (1996) have discussed the prototype of the empirical approximation. However, they only derived a pointwise approximation rather than a uniform approximation. To construct a confidence band that is uniform for all x ∈ D, we need a uniform approximation of the local linear smoother by an empirical process. Now we define the function class  Gτ,h =  1 √ ψx (z) : x ∈ D , h where ψx (z) is defined in equation (11). The set Gτ,h is analogous to the set Fτ,h in the KDE case. With this notation and using Lemma 7, we conclude √ rτ,h (x) − r(x)) k ≈ sup kGn (f )k. sup k nh (b x∈D f ∈Gτ,h Under assumption (K1, K3) and applying the Gaussian approximation method of Chernozhukov et al. (2014a,c), the distribution of the right-hand-side will be approximated by the distribution of the maxima of a Gaussian process, which leads to the following conclusion. Theorem 8 (Gaussian approximation of the debiased local linear smoother). Assume nh5 (K1,3), (R1), τ ∈ (0, ∞) is fixed, and h → 0, log n → c0 ≥ 0 for some c0 . Then there exists 18 a Gaussian process Bn defined on Gτ,h such that for any f1 , f2 ∈ Gτ,h , E(Bn (f1 )Bn (f2 )) = Cov (f1 (Xi , Yi ), f2 (Xi , Yi )) and !  7 1/8 ! √  log n sup P nhd kb rτ,h − rk∞ ≤ t − P sup kBn (f )k ≤ t = O . nh t∈R f ∈Gτ,h The proof of Theorem 8 follows a similar way as the proof of Theorem 3 so we omit it. Theorem 8 shows that the L∞ error of the debiased linear smoother will be approximated by the maximum of a Gaussian process. Thus, as long as we can prove that the bootstrapped L∞ error converges to the same Gaussian process, we have bootstrap consistency of the confidence band. Theorem 9 (Confidence band of regression function). Assume (K1,3), (R1), τ ∈ (0, ∞) nh5 is fixed, and h → 0, log b1−α be the (1 − α) quantile of the n → c0 ≥ 0 for some c0 . Let s distribution  ∗ b − rbτ,h k∞ < s|X1 , · · · , Xn . G(s) = P kb rτ,h Then  P r(x) ∈ R b1−α C (x)  ∀x ∈ D = 1 − α + O  log7 n nh 1/8 ! . b R (x) is an asymptotically valid 1 − α confidence band of the regression function Namely, C 1−α r. The proof of Theorem 9 follows a similar way as the proof of Theorem 4, with Theorem 3 being replaced by Theorem 8. Thus, we omit the proof. Theorem 9 proves that the confidence band from bootstrapping the debiased local linear smoother is asymptotically valid. This is a very powerful result because Theorem 9 is compatible with the smoothing bandwidth selected by the cross-validation of the original local linear smoother. This implies the validity of the proposed procedure in Section 3.2. Finally, we prove that the confidence set of the inverse regression R is also asymptotically valid. Theorem 10 (Confidence set of inverse regression). Assume (K1,3), (R1–2), and τ ∈ nh5 (0, ∞) is fixed, and h → 0, log n → c0 ≥ 0 for some c0 . Then  7 1/8 !   log n ∗ R b ⊕ sb P R⊂R . 1−α = 1 − α + O τ,h nh b ∗ ⊕ sbR is an asymptotically valid confidence set of the inverse regression R. Namely, R 1−α τ,h The proof of Theorem 10 is basically the same as the proof of Theorem 5. Essentially, the inverse regression is just the level set of the regression function. Thus, as long as we have a confidence band of the regression function, we have the confidence set of the inverse regression. A good news is that Theorem 10 is compatible with the bandwidth from the cross-validation hCV . Therefore, we can simply choose h = hCV and then construct the confidence set by bootstrapping the inverse regression estimator. 19 Remark 9. Note that one can revise the bound on coverage correction in Theorem 10   1 1/6 by using the following facts. First, the original Hausdorff error is into the rate O nh approximately the maximum of absolute values of a few normal random variables. This is because each estimated location of the inverse regression follows an asymptotically normal distribution centered at one population location of the inverse regression. Then because the bootstrap will approximate this distribution, by the Gaussian comparison theorem (see, e.g., Theorem 2 in Chernozhukov et  al. 2014b  and Lemma 3.1 in Chernozhukov et al. 2013), the 1 1/6 approximation error rate is O nh . 5. Simulation. 5.1. Density Estimation. In this section, we demonstrate the coverage of proposed confidence bands/sets of density function and level sets. Original KDE, GMM, N=2000 0.2 0.4 0.6 0.8 1.0 0.8 0.4 0.6 Bootstrap Coverage 0.2 0.2 0.4 0.6 0.8 1.0 0.2 0.4 0.6 0.8 Debiased KDE, GMM, N=500 Debiased KDE, GMM, N=1000 Debiased KDE, GMM, N=2000 0.2 0.4 0.6 Nominal Coverage 0.8 1.0 1.0 0.2 0.4 0.6 Bootstrap Coverage 0.8 h = hRT h = hRT*2 h = hRT/2 0.0 0.2 0.4 0.6 Bootstrap Coverage 0.8 h = hRT h = hRT*2 h = hRT/2 0.0 0.2 0.4 0.6 Bootstrap Coverage 1.0 Nominal Coverage 0.0 0.0 0.0 Nominal Coverage h = hRT h = hRT*2 h = hRT/2 0.8 0.0 Nominal Coverage 1.0 1.0 0.0 h = hRT h = hRT*2 h = hRT/2 0.0 0.2 0.4 0.6 Bootstrap Coverage 0.8 h = hRT h = hRT*2 h = hRT/2 0.0 0.0 0.2 0.4 0.6 Bootstrap Coverage 0.8 h = hRT h = hRT*2 h = hRT/2 1.0 Original KDE, GMM, N=1000 1.0 1.0 Original KDE, GMM, N=500 0.0 0.2 0.4 0.6 Nominal Coverage 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Nominal Coverage Fig 4. Confidence bands of density estimation. The top row displays bootstrap coverage versus nominal coverage when we bootstrap the original KDE. The bottom row shows coverage comparison via bootstrapping the debiased KDE. It is clear that when we bootstrap the original KDE, the confidence band has undercoverage in every case. On the other hand, when we bootstrap the debiased KDE, the confidence band achieves nominal coverage when we undersmooth the data (green curves) or when the sample size is large enough (blue curve). Density functions. To demonstrate the validity of confidence bands for density estimation, we consider the following Gaussian mixture model. We generate n IID data points X1 , · · · , Xn from a Gaussian mixture such that, with a probability of 0.6, Xi is from N (0, 1), 20 a standard normal, and with a probability of 0.4, Xi is from N (4, 1), a standard normal centered at 4. The population density of Xi is shown in the black curve in the top left panel of Figure 1. We consider three different sample sizes: n = 500, 1000, and 2000. We bootstrap both the original KDE and the debiased KDE for 1000 times with three different bandwidths: hRT , hRT × 2, and hRT /2, where hRT is the bandwidth from the rule of thumb (Silverman, 1986). We use these three different bandwidths to show the robustness of the bootstrapped confidence bands against bandwidth selection. The result is given in Figure 4. In the top row (the case of bootstrapping the original KDE), except for the undersmoothing case (orange line), confidence band coverage is far below the nominal level. Moreover, even in the undersmoothing case, the coverage does not achieve the nominal level. In the top row, we display the result of bootstrapping the debiased KDE. We see that undersmoothing (green curve) always yields a confidence band with nominal coverage. The rule of thumb (blue curve) yields an asymptotically valid confidence band–the bootstrap coverage achieves nominal coverage when the sample size is large enough (in this case, we need a sample size about 2000). This affirms Theorem 4. For the case of oversmoothing, it still fails to generate a valid confidence band. Level sets. Next, we consider constructing the bootstrapped confidence sets of level sets. We generate the data from a Gaussian mixture model with three components: N ((0, 0)T , 0.32 · I2 ), N ((1, 0)T , 0.32 · I2 ), N ((1.5, 0.5)T , 0.32 · I2 ), where I2 is the 2 × 2 identity matrix. We have equal probability (1/3) to generate a new observation from each of the three Gaussians. We use the level λ = 0.25. This model has been used in Chen et al. (2015b). The black contours in the left two columns of Figure 5 provide examples of the corresponding level set D. We consider two sample sizes: n = 500 and 1000. We choose the smoothing bandwidth by the rule of thumb (Chacón et al., 2011; Silverman, 1986) and apply the bootstrap 1000 times to construct the confidence set. We repeat the entire procedure 1000 times to evaluate coverage, and the coverage plot is given in the right column of Figure 5. In both cases, the red curves are below the gray line (45 degree line). This indicates that bootstrapping the usual level set does not give us a valid confidence set; the bootstrap coverage is below nominal coverage. On the other hand, the blue curves in both panels are close to the gray line, showing that bootstrapping the debiased KDE does yield a valid confidence set. 5.2. Regression. Now we show that bootstrapping the debiased local linear smoothers yields a valid confidence band/set of the regression function and inverse regression. Regression functions. To show the validity of confidence bands, we generate pairs of random variables (X, Y ) from X ∼ Unif[0, 1], Y = sin(π · X) + ,  ∼ N (0, 0.12 ), where X and  are independent. This is the same as the model used in the bottom row of Figure 1. In the bottom left panel of Figure 1, we display one instance of data points (gray dots), the true regression function (black curve), the original local linear smoother 21 Debiased KDE 0.5 X2 0.0 ● ● 0.8 ● ● ● ● ● ● ● ● ● 0.0 0.5 1.0 1.5 2.0 2.5 −1.0 −0.5 0.0 0.5 1.0 1.5 2.0 1.0 Debiased KDE ● ● ● ● ● ● ● ● ● ● ● ●● ● 0.5 X2 0.0 ● ● ● ● ● ● 0.8 1.0 ● ● ● ● ● ● ● ● ●● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ●●● ● ● ●● ●● ● ●● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ●● ●●● ●● ● ●●● ● ● ●● ● ● ●● ● ●● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●●●●● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ●●● ● ●● ● ● ●● ● ● ● ●●● ● ● ● ●●●● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ●● ● ● ●● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ●● ●● ● ●● ● ● ●● ● ● ● ● ● ●● ●●● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●●● ● ● ● ● ● ●●● ● ●● ●● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ●● ● ● ●● ●● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ●●●●● ● ● ● ● ● ● ●● ● ●●●●● ● ● ● ●● ● ●●● ● ● ● ● ● ● ●●● ● ● ● ●●● ●●● ● ●● ● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ● ● ●● ● ● ● ● ●● ●● ●● ● ● ●● ● ●● ●● ● ●●●● ● ●● ●● ●● ● ● ● ● ● ●● ●● ● ●●● ●● ●●● ●● ● ●●● ● ●● ● ● ● ● ● ● ●● ●●● ● ●● ● ● ●●● ● ● ●● ● ● ●● ● ●● ●● ●● ● ● ●● ● ● ● ● ●●●● ●● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ●● ● ● ● ● ●● ●● ● ●●● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ●● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ●● ●● ● ● ●● ●● ●● ● ● ●●● ●● ● ●● ● ● ● ● ● ●● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●●● ● ●● ● ● ● ●● ● ●● ● ● ●● ● ● ●● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●● ● ● ●● ● ● ●● ●●● ●● ● ●● ● ● ● ●● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●●●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ●●● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● −0.5 ● ● ● ● ● ● ● −1.0 ● ● ● ● 0.0 0.5 1.0 X1 1.5 2.0 2.5 ● 0.0 1.0 ● ●● ● ● ● Original KDE Debiased KDE ● ● ● ● ● ● ● 0.6 ● 0.4 ● ● ● ● ●● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ●●● ● ● ●● ●● ● ●● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ●● ●●● ●● ● ●●● ● ● ●● ● ● ●● ● ●● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●●●●● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ●●● ● ●● ● ● ●● ● ● ● ●●● ● ● ● ●●●● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ●● ● ● ●● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ●● ●● ● ●● ● ● ●● ● ● ● ● ● ●● ●●● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●●● ● ● ● ● ● ●●● ● ●● ●● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ●● ● ● ●● ●● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ●●●●● ● ● ● ● ● ● ●● ● ●●●●● ● ● ● ●● ● ●●● ● ● ● ● ● ● ●●● ● ● ● ●●● ●●● ● ●● ● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ● ● ●● ● ● ● ● ●● ●● ●● ● ● ●● ● ●● ●● ● ●●●● ● ●● ●● ●● ● ● ● ● ● ●● ●● ● ●●● ●● ●●● ●● ● ●●● ● ●● ● ● ● ● ● ● ●● ●●● ● ●● ● ● ●●● ● ● ●● ● ● ●● ● ●● ●● ●● ● ● ●● ● ● ● ● ●●●● ●● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ●● ● ● ● ● ●● ●● ● ●●● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ●● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ●● ●● ● ● ●● ●● ●● ● ● ●●● ●● ● ●● ● ● ● ● ● ●● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●●● ● ●● ● ● ● ●● ● ●● ● ● ●● ● ● ●● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●● ● ● ●● ● ● ●● ●●● ●● ● ●● ● ● ● ●● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●●●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ●●● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ● ● 0.5 1.0 Bootstrap Coverage ● ● X2 0.8 Confidence Sets, 3GMM LV, N=1000 ● 0.0 0.6 Level Set, 95% CI ● −0.5 0.4 Level Set, 95% CI ● ● ● −1.0 0.2 Nominal Coverage ● −0.5 0.0 X1 Original KDE −1.0 2.5 X1 0.2 −0.5 1.5 1.5 −1.0 0.0 −1.0 ● −1.0 ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●●● ● ● ●● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●●● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ●● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ●● ● ● ● ●● ● ●● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● −0.5 0.5 X2 0.0 −0.5 ● ● ● ● ● ● 0.6 ● 0.4 ● ● ● ● 0.2 ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●●● ● ● ●● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●●● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ●● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ●● ● ● ● ●● ● ●● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● 1.0 1.0 ● ● ● ● ● ● ● ● ● ● Original KDE Debiased KDE ● ● ● ● ● Bootstrap Coverage ● ● Confidence Sets, 3GMM LV, N=500 1.0 Level Set, 95% CI 1.5 1.5 Level Set, 95% CI Original KDE ● ● −1.0 −0.5 0.0 0.5 1.0 X1 1.5 2.0 2.5 0.0 0.2 0.4 0.6 0.8 1.0 Nominal Coverage Fig 5. Confidence sets of level sets. In the first column, we display one instance of data points along with the true level contour (black curve), the estimated level contour using the usual KDE (red curve), and the associated confidence set (red area). The second column is similar to the first column, but we now use the level set estimator from the debiased KDE (blue curve) and the blue band is the associated confidence set. The third column shows the coverage of the bootstrap confidence set and the nominal level. The top row is the result of n = 500 and the bottom row is the result of n = 1000. Based on the third column, we see that bootstrapping the original KDE does not give us a valid confidence set (we are under coverage) but bootstrapping the debiased KDE does yield an asymptotically valid confidence set. (red curve), and the debiased local linear smoother (blue curve). We consider three sample sizes: n = 500, 1000, and 2000. The smoothing bandwidth hCV is chosen using a 5-fold crossvalidation of the original local linear smoother. In addition to hCV , we also consider hCV × 2 and hCV /2 to show the robustness of the confidence bands against bandwidth selection. We then bootstrap both the original local linear smoother and the debiased local linear smoother to construct confidence bands. The result is shown in Figure 6. In the top panel, we present the coverage of bootstrapping the original local linear smoother. Only in the case of hCV /2 (undersmoothing) do the confidence bands attain nominal coverage. This makes sense because when we are undersmoothing the data, the bias vanishes faster than the stochastic variation so the bootstrap confidence bands are valid. In the bottom panel, we present the coverage of bootstrapping the debiased local linear smoother. It is clear that all curves are around the gray line, which means that the confidence bands attain nominal coverage in all the three smoothing bandwidths. Thus, this again shows the robustness of the confidence band from the debiased estimator against different bandwidths. 22 Original LPR, Sine, N=2000 0.2 0.4 0.6 0.8 1.0 0.8 0.4 0.6 Bootstrap Coverage 0.2 0.2 0.4 0.6 0.8 1.0 0.2 0.4 0.6 0.8 Debiased LPR, Sine, N=500 Debiased LPR, Sine, N=1000 Debiased LPR, Sine, N=2000 0.2 0.4 0.6 Nominal Coverage 0.8 1.0 1.0 0.2 0.4 0.6 Bootstrap Coverage 0.8 h = hCV h = hCV*2 h = hCV/2 0.0 0.2 0.4 0.6 Bootstrap Coverage 0.8 h = hCV h = hCV*2 h = hCV/2 0.0 0.2 0.4 0.6 Bootstrap Coverage 1.0 Nominal Coverage 0.0 0.0 0.0 Nominal Coverage h = hCV h = hCV*2 h = hCV/2 0.8 0.0 Nominal Coverage 1.0 1.0 0.0 h = hCV h = hCV*2 h = hCV/2 0.0 0.2 0.4 0.6 Bootstrap Coverage 0.8 h = hCV h = hCV*2 h = hCV/2 0.0 0.0 0.2 0.4 0.6 Bootstrap Coverage 0.8 h = hCV h = hCV*2 h = hCV/2 1.0 Original LPR, Sine, N=1000 1.0 1.0 Original LPR, Sine, N=500 0.0 0.2 0.4 0.6 0.8 Nominal Coverage 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Nominal Coverage Fig 6. Confidence band of regression. We use the same ‘sine’ dataset as in Figure 1 and consider three sample sizes: n = 500, 1000, and 2000. And we consider 3 different smoothing bandwidths: hCV , hCV × 2, and hCV /2, where hCV is the bandwidth from 5-fold cross-validation on the original local linear smoother. The top row is the bootstrap coverage of the local linear smoother without debiasing. The bottom row shows the bootstrap coverage of the debiased local linear smoother. We see a clear pattern that the debiased local linear smoother attains nominal coverage for all three bandwidths. On the other hand, only in the undersmoothing case (hCV /2) does the original local linear smoother have nominal coverage. Inverse regression. The last simulation involves inverse regression. In particular, we consider the case where R contains a unique point, so we can construct a confidence set using both the bootstrap-only approach and normality with the bootstrap variance estimate. The data are generated by the following model: X ∼ Unif[0, 1], Y = 1 − eX + ,  ∼ N (0, 0.22 ), where X,  are independent. Namely, the regression function r(x) = E(Y |X = x) = 1 − ex . We choose the level r0 = 0.5, which corresponds to the location R = {− log(2)}. We consider two sample sizes: n = 500, and 1000. We choose the smoothing bandwidth using a 5-fold cross-validation of the original local linear smoother. The left column of Figure 7 shows one example of the two sample sizes where the black vertical line denotes the location of R, the red line and red band present the estimator from the original local linear smoother and its confidence set, and the blue line and blue band display the estimator and confidence set from 23 r0 = 0.5, 95% CI 1.0 1.5 Inverse Regression, N=500 Original LPR Original LPR + normal Debiased LPR Debiased LPR + normal ● ● ● ● ● ● ● ●● ● Original LPR Debiased LPR −0.5 ● ● 0.0 0.6 ●●● 0.4 0.5 0.0 ● ● Bootstrap Coverage ● ● 0.2 0.4 0.6 0.8 0.0 1.0 ● 0.2 ● ●● ● ● ● ● ● ●●● ● ● ●● ●● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ●●● ● ● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●●●● ●● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ●●● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.8 ●● 1.0 0.0 0.2 X r0 = 0.5, 95% CI 1.0 1.5 ● ●● ● ● ● ● ●● ● ● ● ●● −0.5 Original LPR Debiased LPR 0.0 0.2 0.4 0.6 X 0.8 1.0 0.6 ● ●● ●● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ●●● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● ● ●● ● ● ●● ●● ● ● ● ●● ● ●● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●●● ●● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ●●● ● ● ●● ● ● ● ● ● ● ● ●●● ● ●● ●● ●● ●● ● ● ● ●● ●●● ●● ● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ●● ●● ● ● ● ●●● ●● ●● ● ●●● ● ● ● ●● ● ●● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ●● ●● ●● ●● ● ● ●● ● ● ● ● ●●●● ● ● ● ● ●● ● ● ● ●● ● ● ● ●● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●●●●● ● ● ● ● ● ● ●● ● ● ● ●● ●● ●● ● ● ● ●● ●● ●●● ● ●● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●●● ●●● ●● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ●●● ●● ● ● ● ● ● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ●● ●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●● ● ● ●● ●● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ●●● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ●● ● ● ●●● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ●● ● ● ● ●● ● ● ● ●● ●●● ● ● ●● ● ●●● ●● ● ●● ● ● ● ● ●● ●● ● ● ● ● ● ●●●●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ●●● ●● ● ●● ● ● ● ● 0.4 ● Bootstrap Coverage ● ● 0.8 ● ● ● ● 0.2 1.0 0.5 ● ● ● 1.0 0.0 ● ● ● 0.0 ● ● ● ● 0.8 Original LPR Original LPR + normal Debiased LPR Debiased LPR + normal ● ● ● ● 0.6 Inverse Regression, N=1000 ● ●● 0.4 Nominal Coverage 0.0 0.2 0.4 0.6 0.8 1.0 Nominal Coverage Fig 7. Confidence sets of the inverse regression. In the left column, we display one instance of the bootstrap confidence set using the local linear smoother (red region) and debiased local linear smoother (blue region). The purple curve shows the actual regression line and the black vertical line shows the location of the actual inverse regression (r0 = 0.5). In the right column, we provide bootstrap coverage for both local linear smoother (red) and the debiased local linear smoother (blue). We also consider the confidence set using normality and bootstrap (in a lighter color). The top row is the case of n = 500 and the bottom row is the case of n = 1000. the debiased local linear smoother. We construct the confidence sets by (i) completely bootstrapping (Section 3.2.1), and (ii) the normality with the bootstrap variance estimate. The right column of Figure 7 presents the coverage of all four methods. The reddish curves are the results of bootstrapping the original local linear smoother, which do not attain nominal coverage. The bluish curves are the results from bootstrapping the debiased local linear smoother, which all attain nominal coverage. Moreover, it seems that using normality does not change the coverage– the light-color curves (using normality) are all close to the dark-color curves (without normality). 6. Discussion. In this paper, we propose to construct confidence bands/sets via bootstrapping the debiased estimators (Calonico et al., 2015). We prove both theoretically and using simulations that our proposed confidence bands/sets are asymptotically valid. Moreover, our confidence bands/sets are compatible with many common bandwidth selectors, such as the rule of thumb and cross-validation. In what follows, we discuss some topics related to our methods. • Higher-order kernels. In this paper, we consider second-order kernels for simplicity. 24 Our methods can be generalized to higher-order kernel functions. Calonico et al. (2015) has already described the debiased estimator using higher-order kernel functions, so to construct a confidence band, all we need to do is bootstrapping the L∞ error of the debiased estimator and take the quantile. Note that if we use a ω-th order kernel function for the original KDE, then we can make inference for the functions in Σ(ω + δ0 , L0 ), δ0 > 0 because the debiasing operation will kick the bias into the next order term. Thus, if we have some prior knowledge about the smoothness of functions we are interested in, we can use a higher-order kernel function and bootstrap it to construct the confidence bands. • Detecting local difference of two functions. Our approaches can be used to detect local differences of two functions. When the two functions being compared are densities, it is a problem for the local two sample test (Duong et al., 2009; Duong, 2013). When the two functions being compared are regression functions, the comparison is related to the conditional average treatment effect curve (Lee and Whang, 2009; Hsu, 2013; Ma and Zhou, 2014; Abrevaya et al., 2015). In the local two sample test, we want to know if two samples are from the same population or not and find out the regions where the two densities differ. For the case of the conditional average treatment effect curve, we compare the differences of two regression curves where one curve is the regression curve from the control group and the other is the regression curve from the treatment group. The goal is to find out where we have strong evidence that the two curves differ. In both cases, we can use the debiased estimators of the densities or regression functions, and then bootstrap the difference to obtain an asymptotically valid confidence band. Chiang et al. (2017) has applied a similar idea to several local Wald estimators in econometrics. • Other geometric features. We can use the idea of bootstrapping the debiased estimator to make inferences of other geometric features such as local modes (Romano, 1988), ridges (Chen et al., 2015a), and cluster trees (Jisu et al., 2016). Romano (1988) proved that naively bootstrapping the KDE does not yield a valid confidence set unless we undersmooth the data. However, bootstrapping the debiased KDE still works because the optimal h of the original KDE is an undersmoothed h of the debiased KDE. So our results are actually consistent with Romano (1988). Acknowledgement. We thank Cun-Hui Zhang for very useful and constructive comments and suggestions in this paper. APPENDIX A: PROOFS OF THE KERNEL DENSITY ESTIMATOR Proof of Lemma 1. Bias. Recall from equation (1) 1 (2) pbτ,h (x) = pbh (x) − cK · h2 · pbb (x). 2 25 Thus, by the standard derivation of the bias under assumption (P),   1 (2) E (b pτ,h (x)) = E (b ph (x)) − cK · h2 · E pbb (x) 2 1 1 = p(x) + cK · h2 · p(2) (x) + O(h2+δ0 ) − cK · h2 · (p(2) (x) + O(bδ0 )) 2 2 = p(x) + O(h2+δ0 + h2 · bδ0 ). Because τ = h/b is fixed, we obtain the desired result for the bias. Variance. To derive the variance, note that under (K1) and (P), nonparametric theory implies       1 1 (2) Var(b pτ,h (x)) = O , Var pbτ,b (x) = O nhd nbd+4 see, e.g., Wasserman (2006) and Scott (2015). Thus, when τ = h/b is fixed,     (2) (2) Var(b pτ,h (x)) = Var(b pτ,h (x)) + O(h4 ) · Var pbτ,b (x) − O(h2 ) · Cov pbτ,h (x), pbτ,b (x) ! r r    4  1 h 1 1 2 ≤O +O +O h · nhd nbd+4 nhd nbd+4 !    d+4  d+4 1 τ τ 2 =O +O +O nhd nhd nhd   1 =O . nhd Proof of Lemma 2. By Lemma 1, pbτ,h (x) − p(x) = pbτ,h (x) − E (b pτ,h (x)) + O(h2+δ0 ) (12) d+4 and when nh bτ,h (x) − E (b pτ,h (x)) so we only log n → c0 ≥ 0, the bias is negligible compared to p focus on the stochastic variation part. To derive the pτ,h (x)), note that  rate of pbτ,h (x) − E (b pbτ,h (x) is a KDE with the kernel function Mτ x−y . h Because assumption (K2) implies that for fixed τ and h,     x−y F1 = gx (y) = Mτ : x ∈ K, h ≥ h > 0 h is a bounded VC class of functions. Note that we can always find such a h because h → 0 when n → ∞. Therefore, F1 satisfies the K1 condition of Giné and Guillou (2002), which implies that ! r log n sup kb pτ,h (x) − E (b pτ,h (x)) k = OP . nhd x∈K Plugging this into equation (12), we obtain the desired result. 26 Proof of Theorem 3. By Lemma 2, when √ (13) nhd kb pτ,h − pk∞ = √ nhd+4 log n → c0 ≥ 0, the scaled difference nhd kb pτ,h − E (b pτ,h ) k∞ + o(1). By Corollary 2.2 and the derivation of Proposition 3.1 in Chernozhukov et al. (2014c), there is a tight Gaussian process Bn as described in Theorem 3 and constants A1 , A2 > 0 such that for any γ > 0, ! √ A1 log2/3 n d ≤ A2 γ P nh kb pτ,h − E (b pτ,h ) k∞ − sup kBn (f )k > 1/3 γ (nhd )1/8 f ∈Fτ,h when n is sufficiently large. Using equation (13), we can revise the above inequality by ! 2/3 √ A log n 3 (14) P nhd kb pτ,h − pk∞ − sup kBn (f )k > 1/3 ≤ A2 γ γ (nhd )1/8 f ∈Fτ,h for some constants A3 . To convert the bound in equation (14) into a bound on the Kolmogorov distance, we apply the anti-concentration inequality (Lemma 2.3 in Chernozhukov et al. 2014c; see also Chernozhukov et al. 2014a), which implies that when n is sufficiently large, there exists a constant A4 > 0 such that ! ! √ nhd kb pτ,h − pk∞ < t − P sup kBn (f )k < t sup P t f ∈Fτ,h (15) ! ≤ A4 · E sup kBn (f )k f ∈Fτ,h · A3 log2/3 n + A2 γ. γ 1/3 (nhd )1/8 By Dudleys inequality of Gaussian processes (van der Vaart and Wellner, 1996), ! p E sup kBn (f )k = O( log n), f ∈Fτ,h so the optimal γ = √ sup P t  log7 n nhd 1/8 , which leads to the desired result: ! nhd kb pτ,h − pk∞ < t ! −P sup kBn (f )k < t f ∈Fτ,h  ≤O log7 n nhd 1/8 ! . Proof of Theorem 4. The proof of Theorem 4 follows the same derivation as the proof of Theorem 4 of Chen et al. (2015b). A similar derivation also appears in Chernozhukov et al. (2014a). Here we only give a high-level derivation. Let t1−α be the 1 − α quantile of the CDF of kb pτ,h − pk∞ . By the property of the L∞ loss kb pτ,h − pk∞ , it is easy to see that P (p(x) ∈ [b pτ,h (x) − t1−α , pbτ,h (x) + t1−α ] ∀x ∈ K) = 1 − α. 27 Thus, all we need to do is to√prove that the bootstrap estimate b t1−α approximates t1−α . We will √ prove this by showing that nhd kb pτ,h −pk∞ and the bootstrap L∞ metric nhd kb p∗τ,h − pbτ,h k∞ converges in the Kolmogorov distance (i.e., the Berry-Esseen bound). By Theorem 3, we known that there exists a Gaussian process Bn defined on Fτ,h such that √ nhd kb pτ,h − pk∞ ≈ sup |Bn (f )|. f ∈Fτ,h Conditioned on Xn = {X1 , · · · , Xn }, by Lemma 1, the bootstrap difference √ √ nhd kb p∗τ,h − pbτ,h k∞ = nhd kb p∗τ,h − E (b pτ,h |Xn ) k∞ + oP (1) √ √ and similar to nhd kb pτ,h − pk∞ , nhd kb p∗τ,h − E (b pτ,h |Xn ) k∞ can be approximated by the maximum of an empirical bootstrap process (Chernozhukov et al., 2016), which, by the same derivation as the proof of Theorem 3, leads to the following conclusion ! !  7 1/8 ! √ log n ∗ e n (f )k < t Xn ≤ O sup P nhd kb pτ,h − pbτ,h k∞ < t Xn − P sup kB , nhd t f ∈Fτ,h e n is a Gaussian process defined on Fτ,h such that for any f1 , f2 ∈ Fτ,h where B   d 1 (X), f2 (X)) e n (f1 )B e n (f2 )|Xn = Cov(f E B = n n n i=1 i=1 i=1 1X 1X 1X f1 (Xi )f2 (Xi ) − f1 (Xi ) · f2 (Xi ). n n n   e n (f1 )B e n (f2 )|Xn follows the sample covariance structure at f1 and f2 . Namely, E B e n and Bn differ only in the covariance structure and the sample covariance conBecause B verges to the population covariance, by the Gaussian comparison Lemma (Theorem 2 in Chere n (f )k and supf ∈F kBn (f )k converges in the Kolmogorov nozhukov et al. 2014b), supf ∈Fτ,h kB τ,h distance (and the convergence rate is faster than the Gaussian approximation described in Theorem 3 so we can ignore the error here). Thus, we have shown that √ √ e n (f )| ≈ nhd kb nhd kb pτ,h − pk∞ ≈ sup |Bn (f )| ≈ sup |B p∗τ,h − pbτ,h k∞ , f ∈Fτ,h f ∈Fτ,h which proves that √ sup P t ! nhd kb pτ,h − pk∞ < t √ −P ! nhd kb p∗τ,h − pbτ,h k∞ < t Xn  ≤ OP log7 n nhd 1/8 ! . Thus, the quantile of the distribution of kb p∗τ,h − pbτ,h k∞ approximates the quantile of the distribution of kb pτ,h − pk∞ , which proves the desired result. 28 APPENDIX B: PROOFS OF THE LOCAL POLYNOMIAL REGRESSION Proof of Lemma 6. Recall from equation (5) that the debiased local linear smoother is rbτ,h (x) = rbh (x) − 1 (2) · cK · h2 · rbh/τ (x). 2 Under assumption (K3) and (R1), the bias and variance of rbh (x) is (by a similar derivation as the one described in Lemma 1) h2 cK · r(2) (x) + O(h2+δ0 ) 2 r ! 1 Var(b rh (x)) = OP , nh E (b rh (x)) − r(x) = (2) and the bias and variance of the second derivative estimator rbh/τ (x) is   (2) E rbh/τ (x) − r(2) (x) = O(hδ0 ) r (2) Var(b rh/τ (x)) = OP 1 nh5 ! . Thus, the bias of rbτ,h (x) is   1 (2) · cK · h2 · E rbh/τ (x) 2 1 h2 cK · r(2) (x) + O(h2+δ0 ) − · cK · h2 · (r(2) (x) + O(hδ0 )) = 2 2 2+δ0 = O(h ). E (b rτ,h (x)) − r(x) = E (b rh (x)) − r(x) − The variance of rbτ,h (x) is   1 (2) Var (b rτ,h (x)) = Var rbh (x) − · cK · h2 · rbh/τ (x) 2       (2) (2) = Var (b rh (x)) + O h4 · Var rbh/τ (x) − O h2 · Cov rbτ,h (x), rbh/τ (x) ! r r  4    h 1 1 1 ≤O +O + O h2 · · nh nh5 nh nh5   1 =O , nh which has proven the desired result. Before we move on to the proof of Lemma 7, we first introduce some notations. For a given 29 point x ∈ D, let  1 (X1 − x) (X1 − x)2 (X1 − x)3 1 (X2 − x) (X2 − x)2 (X2 − x)3    Xx =  .  ∈ Rn×4 .. .. ..  ..  . . . 2 3 1 (Xn − x) (Xn − x) (Xn − x)      X1 −x 2 X1 −x 3 X1 −x 1 h  h  h   X2 −x X2 −x 2 X2 −x 3   1 h h h  ∈ Rn×4 Xx,h =  .. .. ..   ..  . . . .  Xn −x 2  Xn −x 3 Xn −x 1 h h  h      X1 − x X2 − x Xn − x Wx = diag K ,K ,··· ,K ∈ Rn×n h h h  Γh = diag 1, h−1 , h−2 , h−3 ∈ R4×4  Y = (Y1 , · · · , Yn ) ∈ Rn . (2) Based on the above notations, the local polynomial estimator rbh (x) can be written as (2) rbh (x) = eT3 (XTx Wx Xx )−1 XTx Wx Y  −1 1 1 1 T T Γh Xx Wx Xx Γh Γh XTx Wx Y = e3 Γh h nh n −1  1 T 1 T 1 T Xx,h Wx Xx,h X Wx Y = 3 e3 h nh n x,h (16) where eT3 = (0, 0, 1, 0); see, e.g., Fan and Gijbels (1996); Wasserman (2006). Thus, a key 1 element in the proof of Lemma 7 is deriving the asymptotic behavior of ( nh XTx,h Wx Xx,h )−1 . Lemma 11. Assume (K1,K3) and (R1). Then 1 T sup Xx,h Wx Xx,h − pX (x) · Ω3 x∈D nh r = O(h) + OP max log n nh ! . Thus,  sup x∈D 1 T X Wx Xx,h nh x,h −1 1 − Ω−1 pX (x) 3 r = O(h) + OP max log n nh ! . 1 Proof. We denote Ξn (x, h) = nh XTx,h Wx Xx,h . Then direct computation shows that the (j, `) element of the matrix Ξn (x, h) is n 1 X Ξn (x, h)j` = nh i=1 for j, ` = 1, 2, 3, 4.  Xi − x h j+`−2  K Xi − x h  30 Thus, the difference Ξn (x, h)j` − pX (x)Ω3,j` = Ξn (x, h)j` − E (Ξn (x, h)j` ) + E (Ξn (x, h)j` ) − pX (x)Ω3,j` . | {z } | {z } (I) (II) The first quantity (I) is about stochastic variation and the second quantity (II) is like bias in the KDE. We first bound (II). By direct derivation,    Z  ω − x j+`−2 ω−x 1 K pX (ω)dω E (Ξn (x, h)j` ) = h h h Z = uj+`−2 K (u) pX (x + uh)du Z = pX (x) uj+`−2 K (u) + O(h) = pX (x)Ω3,j` + O(h). Now we bound (I). Let PX,n denote the empirical measure and PX denote the probability measure of the covariate X. We rewrite the first quantity (I) as 1 (I) = h Z  ω−x h j+`−2  K ω−x h  (dPX,n (ω) − dPX (ω)). This quantity can be uniformly bounded using the empirical process theory from Giné and Guillou (2002), which proves that ! r log n (I) = OP nh uniformly for all x ∈ D under assumption (K3) and (R1). Putting it altogether, we have proved ! r log n . sup kΞn (x, h)j` − pX (x)Ω3,j` k = O(h) + OP nh x∈D This works for all j, ` = 1, 2, 3, 4, so we have proved this lemma. Proof of Lemma 7. Empirical approximation. Recall that rbτ,h (x) = rbh (x) − 1 (2) · cK · h2 · rbh/τ (x), 2 The goal is to prove that rbτ,h (x)−r(x) can be uniformly approximated by an empirical process. By Lemma 6, the difference rbτ,h (x) − r(x) is dominated by the √ stochastic variation rbτ,h (x) − 5 rτ,h (x) − E (b rτ,h (x))) ≈ E (b rτ,h (x)) when nh → c < ∞. Thus, we only need to show that nh (b √1 Gn (ψx ). h 31 Because    1 (2) (2) · cK · h2 · rbh/τ (x) − E rbh/τ (x) . 2 For simplicity, we only show the result of the second derivative part (the result of the first part can be proved in a similar way). Namely, we will prove ! r √    nh log n 1 (2) (2) 2 (17) · cK · h · rbh/τ (x) − E rbh/τ (x) = √ Gn (ψx,2 ) + O(h) + OP 2 nh h rbτ,h (x) − E (b rτ,h (x)) = rbh (x) − E (b rh (x)) − uniformly for all x ∈ D, where ψx,2 (z1 , z2 ) = 12 cK · τ 2 · eT3 Ω−1 3 Ψ2,τ x (τ z1 , z2 ) is the second part of ψx (z1 , z2 ). Recall from equation (16) and apply Lemma 11,  −1 1 T 1 T 1 T (2) X Wx Xx,b X Wx Y rbh/τ (x) = 2 e3 b nh x,b nb x,b ! r 1 1 log n = 2 eT Ω−1 XT Wx Y + O(h) + OP , b · pX (x) 3 3 nb x,b nh where b = h/τ . The vector 1 T nb Xx,b Wx Y can be decomposed into     Xi −x 1 Pn Y K i=1 i nb b      P n Xi −x Xi −x   1 Y · · K  nb i=1 i  b b 1 T  2   Xx,b Wx Y =  P   n Xi −x 1 nb · K Xib−x   nb i=1 Yi · b   3   Xi −x Xi −x 1 Pn Y · · K i=1 i nb b b Z = Ψ2,τ x (τ z1 , z2 )dPn (z1 , z2 ). Thus, !! r log n τ3 T −1 e Ω Ψ2,τ x (τ z1 , z2 )dPn (z1 , z2 ) 1 + O(h) + OP = h3 · pX (x) 3 3 nh !! r 2 log n = Pn (ψx,2 ) 1 + O(h) + OP . 3 cK · h nh  q    (2) log n 2 This also implies E rbh/τ (x) = cK ·h3 P(ψx,2 ) 1 + O(h) + O . Based on the above nh (2) rbh/τ (x) Z derivations, the scaled second derivative √    r n nh (2) (2) 2 · cK · h · rbh/τ (x) − E rbh/τ (x) = · (Pn (ψx,2 ) − P(ψx,2 )) 1 + O(h) + OP 2 h !! r 1 log n = √ Gn (ψx,2 ) 1 + O(h) + OP nh h ! r 1 log n = √ Gn (ψx,2 ) + O(h) + OP . nh h r log n nh !! 32 Because this OP term is uniformly for all x (Lemma 11), we conclude that √    nh 1 (2) (2) · cK · h2 · rbh/τ (x) − E rbh/τ (x) − √ Gn (ψx,2 ) = O(h) + OP sup 2 h x∈D r log n nh ! . √ We can derive a similar bound for nh (b rh (x) − E (b rh (x))), which proves the first assertion. Uniform bound. In the first assertion, we have shown that 1 rbτ,h (x) − r(x) ≈ √ Gn (ψx ). h By assumption (K3) and (R1), the collection e τ,h = {ψx (z1 , z2 ) : x ∈ D} G is a VC-type class with a uniform constant envelope function, so we can apply the empirical process theory in Giné and Guillou (2002), which proves that ! r 1 log n sup √ Gn (f ) = OP . nh h e f ∈G τ,h This, together with the bias in Lemma 6, implies r rbτ,h (x) − r(x) = O(h 2+δ0 ) + OP log n nh ! . REFERENCES J. Abrevaya, Y.-C. Hsu, and R. P. Lieli. Estimating conditional average treatment effects. Journal of Business & Economic Statistics, 33(4):485–505, 2015. M. Birke, N. Bissantz, and H. Holzmann. Confidence bands for inverse regression models. Inverse Problems, 26(11):115020, 2010. N. Bissantz and M. Birke. Asymptotic normality and confidence intervals for inverse regression models with convolution-type operators. Journal of Multivariate Analysis, 100(10):2364–2375, 2009. S. Bjerve, K. A. Doksum, and B. S. Yandell. Uniform confidence bounds for regression based on a simple moving average. Scandinavian Journal of Statistics, pages 159–169, 1985. P. J. P. J. Brown. Measurement, regression, and calibration. Number 04; QA278. 2, B7. 1993. B. Cadre. Kernel estimation of density level sets. Journal of multivariate analysis, 97(4):999–1023, 2006. S. Calonico, M. D. Cattaneo, and M. H. Farrell. On the effect of bias estimation on coverage accuracy in nonparametric inference. arXiv preprint arXiv:1508.02973, 2015. G. Carlsson. Topology and data. Bulletin of the American Mathematical Society, 46(2):255–308, 2009. L. Cavalier. Nonparametric estimation of regression level sets. Statistics A Journal of Theoretical and Applied Statistics, 29(2):131–160, 1997. J. Chacón, T. Duong, and M. Wand. Asymptotics for general multivariate kernel density derivative estimators. Statistica Sinica, 2011. F. Chazal, B. T. Fasy, F. Lecci, A. Rinaldo, and L. Wasserman. Stochastic convergence of persistence landscapes and silhouettes. In Proceedings of the thirtieth annual symposium on Computational geometry, page 474. ACM, 2014. S. X. Chen. Empirical likelihood confidence intervals for nonparametric density estimation. Biometrika, 83(2): 329–341, 1996. 33 Y.-C. Chen. Generalized cluster trees and singular measures. arXiv preprint arXiv:1611.02762, 2016. Y.-C. Chen, C. R. Genovese, and L. Wasserman. Asymptotic theory for density ridges. The Annals of Statistics, 43(5):1896–1928, 2015a. Y.-C. Chen, C. R. Genovese, and L. Wasserman. Density level sets: Asymptotics, inference, and visualization. arXiv:1504.05438, 2015b. V. Chernozhukov, D. Chetverikov, and K. Kato. Gaussian approximations and multiplier bootstrap for maxima of sums of high-dimensional random vectors. The Annals of Statistics, 41(6):2786–2819, 2013. V. Chernozhukov, D. Chetverikov, and K. Kato. Anti-concentration and honest, adaptive confidence bands. The Annals of Statistics, 42(5):1787–1818, 2014a. V. Chernozhukov, D. Chetverikov, and K. Kato. Comparison and anti-concentration bounds for maxima of gaussian random vectors. Probability Theory and Related Fields, pages 1–24, 2014b. V. Chernozhukov, D. Chetverikov, and K. Kato. Gaussian approximation of suprema of empirical processes. The Annals of Statistics, 42(4):1564–1597, 2014c. V. Chernozhukov, D. Chetverikov, and K. Kato. Empirical and multiplier bootstraps for suprema of empirical processes of increasing complexity, and related gaussian couplings. Stochastic Processes and their Applications, 2016. V. Chernozukov, D. Chetverikov, and K. Kato. Central limit theorems and bootstrap in high dimensions. arXiv preprint arXiv:1412.3661, 2014. H. D. Chiang, Y.-C. Hsu, and Y. Sasaki. A unified robust bootstrap method for sharp/fuzzy mean/quantile regression discontinuity/kink designs. arXiv preprint arXiv:1702.04430, 2017. A. Cuevas, W. González-Manteiga, and A. Rodrı́guez-Casal. Plug-in estimation of general level sets. Australian & New Zealand Journal of Statistics, 48(1):7–19, 2006. T. Duong. Local significant differences from nonparametric two-sample tests. Journal of Nonparametric Statistics, 25(3):635–645, 2013. T. Duong, I. Koch, and M. Wand. Highest density difference region estimation with application to flow cytometric data. Biometrical Journal, 51(3):504–521, 2009. H. Edelsbrunner and D. Morozov. Persistent homology: theory and practice. In Proceedings of the European Congress of Mathematics, pages 31–50, 2012. B. Efron. Bootstrap methods: Another look at the jackknife. Annals of Statistics, 7(1):1–26, 1979. U. Einmahl and D. M. Mason. Uniform in bandwidth consistency of kernel-type function estimators. The Annals of Statistics, 33(3):1380–1403, 2005. R. L. Eubank and P. L. Speckman. Confidence bands in nonparametric regression. Journal of the American Statistical Association, 88(424):1287–1301, 1993. J. Fan and I. Gijbels. Local polynomial modelling and its applications: monographs on statistics and applied probability 66, volume 66. CRC Press, 1996. B. T. Fasy, F. Lecci, A. Rinaldo, L. Wasserman, S. Balakrishnan, and A. Singh. Confidence sets for persistence diagrams. The Annals of Statistics, 42(6):2301–2339, 2014. D. A. Freedman. Bootstrapping regression models. The Annals of Statistics, 9(6):1218–1228, 1981. C. R. Genovese, M. Perone-Pacifico, I. Verdinelli, and L. Wasserman. On the path density of a gradient field. The Annals of Statistics, 37(6A):3236–3271, 2009. C. R. Genovese, M. Perone-Pacifico, I. Verdinelli, and L. Wasserman. Nonparametric ridge estimation. The Annals of Statistics, 42(4):1511–1545, 2014. E. Giné and A. Guillou. Rates of strong uniform consistency for multivariate kernel density estimators. In Annales de l’Institut Henri Poincare (B) Probability and Statistics, volume 38, pages 907–921. Elsevier, 2002. M.-A. Gruet. A nonparametric calibration analysis. The Annals of Statistics, 24(4):1474–1492, 1996. P. Hall. On bootstrap confidence intervals in nonparametric regression. The Annals of Statistics, 20(2):695–711, 1992a. P. Hall. Effect of bias estimation on coverage accuracy of bootstrap confidence intervals for a probability density. The Annals of Statistics, 20(2):675–694, 1992b. P. Hall and A. B. Owen. Empirical likelihood confidence bands in density estimation. Journal of Computational and Graphical Statistics, 2(3):273–289, 1993. W. Härdle and A. W. Bowman. Bootstrapping in nonparametric regression: local adaptive smoothing and confidence bands. Journal of the American Statistical Association, 83(401):102–110, 1988. W. Hardle and J. Marron. Bootstrap simultaneous error bars for nonparametric regression. The Annals of Statistics, 19(2):778–796, 1991. 34 W. Härdle, S. Huet, and E. Jolivet. Better bootstrap confidence intervals for regression curve estimation. Statistics: A Journal of Theoretical and Applied Statistics, 26(4):287–306, 1995. W. Härdle, S. Huet, E. Mammen, and S. Sperlich. Bootstrap inference in semiparametric generalized additive models. Econometric Theory, 20(02):265–300, 2004. Y.-C. Hsu. Consistent tests for conditional treatment effects. Technical report, Institute of Economics, Academia Sinica, Taipei, Taiwan, 2013. A. Javanmard and A. Montanari. Confidence intervals and hypothesis testing for high-dimensional regression. Journal of Machine Learning Research, 15(1):2869–2909, 2014. K. Jisu, Y.-C. Chen, S. Balakrishnan, A. Rinaldo, and L. Wasserman. Statistical inference for cluster trees. In Advances In Neural Information Processing Systems, pages 1831–1839, 2016. T. Laloe and R. Servien. Nonparametric estimation of regression level sets. Journal of the Korean Statistical Society, 2013. I. Lavagnini and F. Magno. A statistical overview on univariate calibration, inverse regression, and detection limits: application to gas chromatography/mass spectrometry technique. Mass spectrometry reviews, 26(1): 1–18, 2007. S. Lee and Y.-J. Whang. Nonparametric tests of conditional treatment effects. 2009. Y. Ma and X.-H. Zhou. Treatment selection in a randomized clinical trial via covariate-specific treatment effect curves. Statistical methods in medical research, page 0962280214541724, 2014. E. Mammen and W. Polonik. Confidence regions for level sets. Journal of Multivariate Analysis, 122:202–214, 2013. E. A. Nadaraya. On estimating regression. Theory of Probability & Its Applications, 9(1):141–142, 1964. M. H. Neumann. Automatic bandwidth choice and confidence intervals in nonparametric regression. The Annals of Statistics, 23(6):1937–1959, 1995. M. H. Neumann and J. Polzehl. Simultaneous bootstrap confidence bands in nonparametric regression. Journal of Nonparametric Statistics, 9(4):307–333, 1998. W. Polonik. Measuring mass concentrations and estimating density contour clusters-an excess mass approach. The Annals of Statistics, pages 855–881, 1995. A. Rinaldo, A. Singh, R. Nugent, and L. Wasserman. Stability of density-based clustering. The Journal of Machine Learning Research, 13(1):905–948, 2012. J. P. Romano. Bootstrapping the mode. Annals of the Institute of Statistical Mathematics, 40(3):565–586, 1988. D. W. Scott. Multivariate density estimation: theory, practice, and visualization. John Wiley & Sons, 2015. S. Sheather and C. Jones. A reliable data-based bandwidth selection method for kernel density estimation. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 53(3):683–690, 1991. S. J. Sheather. Density estimation. Statistical Science, 19(4):588–597, 2004. B. W. Silverman. Density Estimation for Statistics and Data Analysis. Chapman and Hall, 1986. J. Sun and C. R. Loader. Simultaneous confidence bands for linear regression and smoothing. The Annals of Statistics, 22(3):1328–1345, 1994. R. Tang, M. Banerjee, and G. Michailidis. A two-stage hybrid procedure for estimating an inverse regression function. The Annals of Statistics, 39(2):956–989, 2011. A. B. Tsybakov. On nonparametric estimation of density level sets. The Annals of Statistics, 25(3):948–969, 1997. S. Van de Geer, P. Bühlmann, Y. Ritov, and R. Dezeure. On asymptotically optimal confidence regions and tests for high-dimensional models. The Annals of Statistics, 42(3):1166–1202, 2014. A. van der Vaart and J. A. Wellner. Weak Convergence and Empirical Process. Springer, 1996. L. Wasserman. All of Nonparametric Statistics. Springer-Verlag New York, Inc., 2006. L. Wasserman. Topological data analysis. arXiv preprint arXiv:1609.08227, 2016. S. Weisberg. Applied linear regression, volume 528. John Wiley & Sons, 2005. C. Wu. Jackknife, bootstrap and other resampling methods in regression analysis. The Annals of Statistics, 14(4):1261–1295, 1986. Y. Xia. Bias-corrected confidence bands in nonparametric regression. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 60(4):797–811, 1998. C.-H. Zhang and S. S. Zhang. Confidence intervals for low dimensional parameters in high dimensional linear models. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 76(1):217–242, 2014.
10math.ST
Relative Error Tensor Low Rank Approximation arXiv:1704.08246v1 [cs.DS] 26 Apr 2017 Zhao Song∗ [email protected] UT-Austin David P. Woodruff [email protected] IBM Almaden Peilin Zhong† [email protected] Columbia University Abstract We consider relative error low rank approximation of tensors with respect to the Frobenius Qq norm. Namely, given an order-q tensor A ∈ R i=1 ni , output a rank-k tensor B for which kA − Bk2F ≤ (1 + ) OPT, where OPT = inf rank-k A0 kA − A0 k2F . Despite much success on obtaining relative error low rank approximations for matrices, no such results were known for tensors. One structural issue is that there may be no rank-k tensor Ak achieving the above infinum. Another, computational issue, is that an efficient relative error low rank approximation algorithm for tensors would allow one to compute the rank of a tensor, which is NP-hard. We bypass these two issues via (1) bicriteria and (2) parameterized complexity solutions: 1. We give an algorithm which outputs a rank k 0 = O((k/)q−1 ) tensor B for which kA − Bk2F ≤ (1 + ) OPT in nnz(A) + n · poly(k/) time in the real RAM model, whenever either Ak exists or OPT > 0. Here nnz(A) denotes the number of non-zero entries in A. If both Ak does not exist and OPT = 0, then B instead satisfies kA − Bk2F < γ, where γ is any positive, arbitrarily small function of n. 2. We give an algorithm for any δ > 0 which outputs a rank k tensor B for which kA−Bk2F ≤ (1 + ) OPT and runs in (nnz(A) + n poly(k/) + exp(k 2 /)) · nδ time in the unit cost RAM Pk δ model, whenever OPT > 2−O(n ) and there is a rank-k tensor B = i=1 ui ⊗ vi ⊗ wi for δ δ which kA − Bk2F ≤ (1 + /2) OPT and kui k2 , kvi k2 , kwi k2 ≤ 2O(n ) . If OPT ≤ 2−Ω(n ) , δ then B instead satisfies kA − Bk2F ≤ 2−Ω(n ) . Our first result is polynomial time, and in fact input sparsity time, in n, k, and 1/, for any k ≥ 1 and any 0 <  < 1, while our second result is fixed parameter tractable in k and 1/. For outputting a rank-k tensor, or even a bicriteria solution with rank-Ck for a certain constant 1−o(1) ) C > 1, we show a 2Ω(k time lower bound under the Exponential Time Hypothesis. Our results are based on an “iterative existential argument”, and give the first relative error low rank approximations for tensors for a large number of error measures for which nothing was known. In particular, we give the first relative error approximation algorithms on tensors for: column row and tube subset selection, entrywise `p -low rank approximation for 1 ≤ p < 2, low rank approximation with respect to sum of Euclidean norms of faces or tubes, weighted low rank approximation, and low rank approximation in distributed and streaming models. We also obtain several new results for matrices, such as nnz(A)-time CUR decompositions, improving the previous nnz(A) log n-time CUR decompositions, which may be of independent interest. ∗ Work done while visiting IBM Almaden, and supported in part by UTCS TAship (CS361 Spring 17 Introduction to Computer Security). † Supported in part by Simons Foundation, and NSF CCF-1617955. Contents 1 Introduction 1.1 Our Results . . . . . . . . . . . . . . . . . . 1.2 Our Techniques . . . . . . . . . . . . . . . . 1.3 Other Low Rank Approximation Algorithms 1.4 An Algorithm and a Roadmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Following Our Framework. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A Notation 4 5 8 11 16 17 B Preliminaries B.1 Subspace Embeddings and Approximate Matrix Product B.2 Tensor CURT decomposition . . . . . . . . . . . . . . . B.3 Polynomial system verifier . . . . . . . . . . . . . . . . . B.4 Lower bound on the cost of a polynomial system . . . . B.5 Frobenius norm and `2 relaxation . . . . . . . . . . . . B.6 CountSketch and Gaussian transforms . . . . . . . . . . B.7 Cauchy and p-stable transforms . . . . . . . . . . . . . . B.8 Leverage scores . . . . . . . . . . . . . . . . . . . . . . . B.9 Lewis weights . . . . . . . . . . . . . . . . . . . . . . . . B.10 TensorSketch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 20 20 24 25 25 26 27 28 28 30 C Frobenius Norm for Arbitrary Tensors 31 C.1 (1 + )-approximate low-rank approximation . . . . . . . . . . . . . . . . . . . . . . . 31 C.2 Input sparsity reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 C.3 Tensor multiple regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 C.4 Bicriteria algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 C.4.1 Solving a small regression problem . . . . . . . . . . . . . . . . . . . . . . . . 38 C.4.2 Algorithm I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 C.4.3 poly(k)-approximation to multiple regression . . . . . . . . . . . . . . . . . . 44 C.4.4 Algorithm II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 C.5 Generalized matrix row subset selection . . . . . . . . . . . . . . . . . . . . . . . . . 47 C.6 Column, row, and tube subset selection, (1 + )-approximation . . . . . . . . . . . . 51 C.7 CURT decomposition, (1 + )-approximation . . . . . . . . . . . . . . . . . . . . . . 53 C.7.1 Properties of leverage score sampling and BSS sampling . . . . . . . . . . . . 53 C.7.2 Row sampling for linear regression . . . . . . . . . . . . . . . . . . . . . . . . 54 C.7.3 Leverage scores for multiple regression . . . . . . . . . . . . . . . . . . . . . . 56 C.7.4 Sampling columns according to leverage scores implicitly, improving polynomial running time to nearly linear running time . . . . . . . . . . . . . . . . . 57 C.7.5 Input sparsity time algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 C.7.6 Optimal sample complexity algorithm . . . . . . . . . . . . . . . . . . . . . . 63 C.8 Face-based selection and decomposition . . . . . . . . . . . . . . . . . . . . . . . . . 64 C.8.1 Column-row, column-tube, row-tube face subset selection . . . . . . . . . . . 64 C.8.2 CURT decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 C.9 Solving small problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 C.10 Extension to general q-th order tensors . . . . . . . . . . . . . . . . . . . . . . . . . . 70 C.10.1 Fast sampling of columns according to leverage scores, implicitly . . . . . . . 70 C.10.2 General iterative existential proof . . . . . . . . . . . . . . . . . . . . . . . . . 72 1 C.10.3 General input sparsity reduction . . . C.10.4 Bicriteria algorithm . . . . . . . . . . C.10.5 CURT decomposition . . . . . . . . . C.11 Matrix CUR decomposition . . . . . . . . . . C.11.1 Algorithm . . . . . . . . . . . . . . . . C.11.2 Stronger property achieved by leverage . . . . . . . . . . . . . . . . . . . . scores D Entry-wise `1 Norm for Arbitrary Tensors D.1 Facts . . . . . . . . . . . . . . . . . . . . . . . . D.2 Existence results . . . . . . . . . . . . . . . . . D.3 Polynomial in k size reduction . . . . . . . . . . D.4 Solving small problems . . . . . . . . . . . . . . D.5 Bicriteria algorithms . . . . . . . . . . . . . . . D.5.1 Input sparsity time . . . . . . . . . . . . D.5.2 Improving cubic rank to quadratic rank D.6 Algorithms . . . . . . . . . . . . . . . . . . . . D.6.1 Input sparsity time algorithm . . . . . . e 3/2 )-approximation algorithm . . . . D.6.2 O(k D.7 CURT decomposition . . . . . . . . . . . . . . . E Entry-wise `p Norm for Arbitrary E.1 Existence results for matrix case E.2 Existence results . . . . . . . . . E.3 Polynomial in k size reduction . . E.4 Solving small problems . . . . . . E.5 Bicriteria algorithm . . . . . . . . E.6 Algorithms . . . . . . . . . . . . E.7 CURT decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 74 74 74 75 77 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 81 82 85 89 90 90 92 94 94 96 96 Tensors, 1 < p < 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 100 101 104 106 106 108 108 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . F Robust Subspace Approximation (Asymmetric Norms F.1 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . F.2 `1 -Frobenius (a.k.a `1 -`2 -`2 ) norm . . . . . . . . . . . . . F.2.1 Definitions . . . . . . . . . . . . . . . . . . . . . F.2.2 Sampling and rescaling sketches . . . . . . . . . . F.2.3 No dilation and no contraction . . . . . . . . . . F.2.4 Oblivious sketches, MSketch . . . . . . . . . . . F.2.5 Running time analysis . . . . . . . . . . . . . . . F.2.6 Algorithms . . . . . . . . . . . . . . . . . . . . . F.3 `1 -`1 -`2 norm . . . . . . . . . . . . . . . . . . . . . . . . F.3.1 Definitions . . . . . . . . . . . . . . . . . . . . . F.3.2 Projection via Gaussians . . . . . . . . . . . . . . F.3.3 Reduction, projection to high dimension . . . . . F.3.4 Existence results . . . . . . . . . . . . . . . . . . F.3.5 Running time analysis . . . . . . . . . . . . . . . F.3.6 Algorithms . . . . . . . . . . . . . . . . . . . . . 2 for Arbitrary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tensors) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 . 111 . 111 . 111 . 112 . 113 . 115 . 116 . 117 . 124 . 124 . 125 . 127 . 128 . 130 . 131 G Weighted Frobenius Norm for Arbitrary Tensors G.1 Definitions and Facts . . . . . . . . . . . . . . . . . G.2 r distinct faces in each dimension . . . . . . . . . . G.3 r distinct columns, rows and tubes . . . . . . . . . G.4 r distinct columns and rows . . . . . . . . . . . . . . . . . H Hardness H.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . H.2 Symmetric tensor eigenvalue . . . . . . . . . . . . . H.3 Symmetric tensor singular value, spectral norm and H.4 Tensor rank is hard to approximate . . . . . . . . . H.4.1 Cover number . . . . . . . . . . . . . . . . . H.4.2 Properties of 3SAT instances . . . . . . . . H.4.3 Reduction . . . . . . . . . . . . . . . . . . . H.5 Hardness result for robust subspace approximation H.6 Extending hardness from matrices to tensors . . . . H.6.1 Entry-wise `1 norm and `1 -`1 -`2 norm . . . H.6.2 `1 -`2 -`2 norm . . . . . . . . . . . . . . . . . . . . . . . . . rank-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 . 133 . 134 . 138 . 140 . . . . . . . . . . . . . . . . . . approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 144 145 146 148 149 150 152 162 165 166 167 Hard Instance 169 I.1 Frobenius CURT decomposition for 3rd order tensor . . . . . . . . . . . . . . . . . . 169 I.2 General Frobenius CURT decomposition for q-th order tensor . . . . . . . . . . . . . 171 J Distributed Setting 174 K Streaming Setting 178 L Extension to Other Tensor Ranks L.1 Tensor Tucker rank . . . . . . . . L.1.1 Definitions . . . . . . . . L.1.2 Algorithm . . . . . . . . . L.2 Tensor Train rank . . . . . . . . L.2.1 Definitions . . . . . . . . L.2.2 Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 . 182 . 182 . 182 . 185 . 185 . 185 M Acknowledgments 189 References 190 3 1 Introduction Low rank approximation of matrices is one of the most well-studied problems in randomized numerical linear algebra. Given an n × d matrix A with real-valued entries, we want to output a rank-k matrix B for which kA − Bk is small, under a given norm. While this problem can be solved exactly using the singular value decomposition for some norms like the spectral and Frobenius norms, the time complexity is still min(ndω−1 , dnω−1 ), where ω ≈ 2.376 is the exponent of matrix multiplication [Str69, CW87, Wil12]. This time complexity is prohibitive when n and d are large. By now there are a number of approximation algorithms for this problem, with the Frobenius norm 1 being one of the most common error measures. Initial solutions [FKV04, AM07] to this problem were based on sampling and achieved additive error in terms of kAkF , where  > 0 is an approximation parameter, which can be arbitrarily larger than the optimal cost OPT = minrank-k B kA − Bk2F . Since then a number of solutions based on the technique of oblivious sketching [Sar06, CW13, MM13, NN13] as well as sampling based on non-uniform distributions [DMM06b, DMM06a, DMM08, DMIMW12], have been proposed which achieve the stronger notion of relative error, namely, which output a rankk matrix B for which kA−Bk2F ≤ (1+) OPT with high probability. It is now known how to output a factorization of such a B = U ·V , where U is n×k and V is k×d, in nnz(A)+(n+d) poly(k/) time [CW13, MM13, NN13]. Such an algorithm is optimal, up to the poly(k/) factor, as any algorithm achieving relative error must read almost all of the entries. Tensors are often more useful than matrices for capturing higher order relations in data. Computing low rank factorizations of approximations of tensors is the primary task of interest in a number of applications, such as in psychology[Kro83], chemometrics [Paa00, SBG04], neuroscience [AAB+ 07, KB09, CLK+ 15], computational biology [CV15, SC15], natural language processing [CYYM14, LZBJ14, LZMB15, BNR+ 15], computer vision [VT02, WA03, SH05, HPS05, HD08, AFdLGTL09, PLY10, LFC+ 16, CLZ17], computer graphics [VT04, WWS+ 05, Vas09], security [AÇKY05, ACY06, KB06], cryptography [FS99, Sch12, KYFD15, SHW+ 16] data mining [KS08, RST10, KABO10, Mør11], machine learning applications such as learning hidden Markov models, reinforcement learning, community detection, multi-armed bandit, ranking models, neural network, Gaussian mixture models and Latent Dirichlet allocation [MR05, AFH+ 12, HK13, ALB13, ABSV14, AGH+ 14, AGHK14, BCV14, JO14a, GHK15, PBLJ15, JSA15, ALA16, AGMR16, ZSJ+ 17], programming languages [RTP16], signal processing [Wes94, DLDM98, Com09, CMDL+ 15], and other applications [YCS11, LMWY13, OS14, ZCZJ14, STLS14, YCS16, RNSS16]. Despite the success for matrices, the situation for order-q tensors for q > 2 is much less understood. There are a number of works based on alternating minimization [CC70, Har70, FMPS13, FT15, ZG01, BS15] gradient descent or Newton methods [ES09, ZG01], methods based √ on the Higher-order SVD (HOSVD) [LMV00a] which provably incur Ω( n)-inapproximability for Frobenius norm error [LMV00b], the power method or orthogonal iteration method [LMV00b], additive error guarantees in terms of the flattened (unfolded) tensor rather than the original tensor [MMD08], tensor trains [Ose11], the tree Tucker decomposition [OT09], or methods specialized to orthogonal tensors [KM11, AGH+ 14, MHG15, WTSA15, WA16, SWZ16]. There are also a number of works on the problem of tensor completion, that is, recovering a low rank tensor from missing entries [WM01, AKDM10, TSHK11, LMWY13, MHWG14, JO14b, BM16]. There is also another line of work using the sum of squares (SOS) technique to study tensor problems [BKS15, GM15, HSS15, HSSS16, MSS16, PS17, SS17], other recent work on tensor PCA [All12b, All12a, RM14, JMZ15, ADGM16, ZX17], and work applying smoothed analysis to tensor decomposition [BCMV14]. Several previous works also consider more robust norms than 1 Recall the Frobenius norm kAkF of a matrix A is ( Pn i=1 4 Pd j=1 A2i,j )1/2 . the Frobenius norm for tensors, e.g., the R1 norm (`1 -`2 -`2 norm in our work) [HD08], `1 -PCA [PLY10], entry-wise `1 regularization [GGH14], M-estimator loss [YFS16], weighted approximation [Paa97, TK11, LRHG13], tensor-CUR [OST08, MMD08, CC10, FMMN11, FT15], or robust tensor PCA [GQ14, LFC+ 16, CLZ17]. Unlike for matrices, the above works either do not have provable guarantees or require incoherence or orthogonality assumptions on the underlying tensor to achieve their bounds. A natural question, for example, is why the following guarantee has not been achieved for tensors: given a third order tensor A ∈ Rn×n×n , output a rank-k tensor B for which kA − Bk2F ≤ (1 + ) OPT, (1) where OPT = inf rank-k B 0 kA − B 0 k2F , and where recall the rank of a tensor B is the minimal integer P k for which B can be expressed as ki=1 ui ⊗ vi ⊗ wi . For a third order tensor, its rank is an integer in {0, 1, 2, . . . , n2 }. For simplicity, in this section we mostly focus the discussion on third order tensors with all dimensions of equal size, but we extend all of our main theorems below to tensors of any constant order q > 3 and dimensions of different sizes. The first caveat regarding (1) for tensors is that an optimal rank-k solution may not even exist! This is a well-known problem for tensors (see, e.g., [KHL89, Paa00, KDS08, Ste06, Ste08] and more details in section 4 of [DSL08]), for which for any rank-k tensor B, there always exists another rank-k tensor B 0 for which kA − B 0 k2F < kA − Bk2F . If OPT = 0, then in this case for any rank-k tensor B, necessarily kA−Bk2F > 0, and so (1) cannot be satisfied. This fact was known to algebraic geometers as early as the 19th century, which they refer to as the fact that the locus of r-th secant planes to a Segre variety may not define a (closed) algebraic variety [DSL08, Lan12]. It is also known as the phenomenon underlying the concept of border rank2 [Bin80, Bin86, BCS97, Knu98, Lan06]. In this case it is natural to allow the algorithm to output an arbitrarily small γ > 0 amount of additive error. Note that unlike several additive error algorithms for matrices, the additive error here can in fact be an arbitrarily small positive function of n. If, however, OPT > 0, then for any  > 0, there exists a rank-k tensor B for which kA − Bk2F ≤ (1 + ) OPT, and in this case we should still require the algorithm to output a relative-error solution. If an optimal rank-k solution B exists, then as for matrices, it is natural to require the algorithm to output a relative-error solution. Besides the above definitional issue, a central reason that (1) has not been achieved is that computing the rank of a third order tensor is well-known to be NP-hard [Hås90, HL13]. Thus, if one had such a polynomial time procedure for solving the problem above, one could determine the rank of A by running the procedure on each k ∈ {0, 1, 2, . . . , n2 }, and check for the first value of k for which kA − Bk2F = 0, thus determining the rank of A. However, it is unclear if approximating the tensor rank is hard. This question will also be answered in this work. The main question which we address is how to define a meaningful notion of (1) for the case of tensors and whether it is possible to obtain provably efficient algorithms which achieve this guarantee, without any assumptions on the tensor itself. Besides (1), there are many other notions of relative error for low rank approximation of matrices for which provable guarantees for tensors are unknown, such as tensor CURT, R1 norm, and the weighted and `1 norms mentioned above. Our goal is to provide a general technique to obtain algorithms for many of these variants as well. 1.1 Our Results To state our results, we first consider the case when a rank-k solution Ak exists, that is, there exists a rank-k tensor Ak for which kA − Ak k2F = OPT. 2 https://en.wikipedia.org/wiki/Tensor_rank_decomposition#Border_rank 5 We first give a poly(n, k, 1/)-time (1 + )-relative error approximation algorithm for any 0 <  < 1 and any k ≥ 1, but allow the output tensor B to be of rank O((k/)2 ) (for general q-order tensors, the output rank is O((k/)q−1 ), whereas we measure the cost of B with respect to rank-k tensors. Formally, kA − Bk2F ≤ (1 + )kA − Ak k2F . In fact, our algorithm can be implemented in nnz(A) + n · poly(k/) time in the real-RAM model, where nnz(A) is the number of non-zero entries of A. Such an algorithm is optimal for any relative error algorithm, even bicriteria ones. If Ak does not exist, then our output B instead satisfies kA − Bk2F ≤ (1 + ) OPT +γ, where γ is an arbitrarily small additive error. Since γ is arbitrarily small, (1 + ) OPT +γ is still a relative error whenever OPT > 0. Our theorem is as follows. Theorem 1.1 (A Version of Theorem C.9, bicriteria). Given a 3rd order tensor A ∈ Rn×n×n , if Ak exists then there is a randomized algorithm running in nnz(A) + n · poly(k/) time which outputs a (factorization of a) rank-O(k 2 /2 ) tensor B for which kA − Bk2F ≤ (1 + )kA − Ak k2F . If Ak does not exist, then the algorithm outputs a rank-O(k 2 /2 ) tensor B for which kA − Bk2F ≤ (1 + ) OPT +γ, where γ > 0 is an arbitrarily small positive function of n. In both cases, the success probability is at least 2/3. We next consider the case when the rank parameter k is small, and we try to obtain rank-k solutions which exists. Pk are efficient for small values of k. As before, we first suppose that Akpoly(n) , we can If Ak = i=1 ui ⊗ vi ⊗ wi and the norms kui k2 , kvi k2 , and kwi k2 are bounded by 2 return a rank-k solution B for which kA − Bk2F ≤ (1 + )kA − Ak k2F + 2− poly(n) , in f (k, 1/) · poly(n) time in the standard unit cost RAM model with words of size O(log n) bits. Thus, our algorithm is fixed parameter tractable in k and 1/, and in fact remains polynomial time for any values of k and 1/ for which k 2 / = O(log n). This is motivated by a number of low rank approximation applications in which k is typically small. The additive error of 2− poly(n) is only needed in order to write down our solution B in the unit cost RAM model, since in general the entries of B may be irrational, even if the entries of A are specified by poly(n) bits. If instead we only want to output an approximation to the value kA − Ak k2F , then we can output a number Z for which OPT ≤ Z ≤ (1 + ) OPT, that is, we do not incur additive error. e for which kA − Ak e 2 ≤ OPT +γ. When Ak does not exist, there still exists a rank-k tensor A F P k e for which if A e= u ⊗ v ⊗ w , then the norms kui k2 , kvi k2 , We require there exists such a A i i i=1 i poly(n) and kwi k2 are bounded by 2 . e have norm The assumption in the previous two paragraphs that the factors of Ak and of A poly(n) bounded by 2 is necessary in certain cases, e.g., if OPT = 0 and we are to write down the factors in poly(n) time. An abridged version of our theorem is as follows. Theorem 1.2 (Combination of PkTheorem C.1 and C.2, rank-k). Given a 3rd order tensor A ∈ n×n×n R , for any δ > 0, if Ak = i=1 ui ⊗vi ⊗wi exists and each of kui k2 , kvi k2 , and kwi k2 is bounded δ) 2 O(n by 2 , then there is a randomized algorithm running in O(nnz(A) + n poly(k, 1/) + 2O(k /) ) · nδ time in the unit cost RAM model with words of size O(log n) bits3 , which outputs a (factorization δ of a) rank-k tensor B for which kA − Bk2F ≤ (1 + )kA − Ak k2F + 2−O(n ) . Further, we can output a number Z for which OPT ≤ Z ≤ (1+) OPT in the same amount of time. When Ak does not exist, if e for which kA− Ak e 2 ≤ OPT +2−O(nδ ) and A e = Pk ui ⊗vi ⊗wi is such there exists a rank-k tensor A i=1 F δ that the norms kui k2 , kvi k2 , and kwi k2 are bounded by 2O(n ) , then we can output a (factorization e for which kA − Ak e 2 ≤ (1 + ) OPT +2−O(nδ ) . of a) rank-k tensor A F 3 The entries of A are assumed to fit in nδ words. 6 Our techniques for proving Theorem 1.1 and Theorem 1.2 open up avenues for many other problems in linear algebra on tensors. We now define the problems and state our results for them. There is a long line of research on matrix column subset selection and CUR decomposition [DMM08, BMD09, DR10, BDM11, FEGK13, BW14, WS15, ABF+ 16, SWZ17] under operator, Frobenius, and entry-wise `1 norm. It is natural to consider tensor column subset selection or tensorCURT4 , however most previous works either give error bounds in terms of the tensor flattenings [DMM08], assume the original tensor has certain properties [OST08, FT15, TM17], consider the exact case which assumes the tensor has low rank [CC10], or only fit a high dimensional cross-shape to the tensor rather than to all of its entries [FMMN11]. Such works are not able to provide a (1+)approximation guarantee as in the matrix case without assumptions. We consider tensor column, row, and tube subset selection, with the goal being to find three matrices: a subset C ∈ Rn×c of columns of A, a subset R ∈ Rn×r of rows of A, and a subset T ∈ Rn×t of tubes of A, such that there exists a tensor U ∈ Rc×r×t for which kU (C, R, T ) − Akξ ≤ αkAk − Akξ + γ, (2) where γ = 0 if Ak exists and γ = 2− poly(n) otherwise, α >P 1 is the ratio, ξ is either Prapproximation Pt c Frobenius norm or Entry-wise `1 norm, and U (C, R, T ) = i=1 j=1 l=1 Ui,j,l · Ci ⊗ Rj ⊗ Tl . In tensor CURT decomposition, we also want to output U . We provide a (nearly) input sparsity time algorithm for this, together with an alternative input sparsity time algorithm which chooses slightly larger factors C, R, and T . Theorem 1.3 (Combination of Theorem C.20 and C.21, kkF -norm, column, row, tube subset selection). Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, if Ak exists then there is a randomized algorithm which takes O(nnz(A) + n poly(k, 1/)) time and outputs three matrices: a subset C ∈ Rn×c of columns of A, a subset R ∈ Rn×r of rows of A, and a subset T ∈ Rn×t of tubes of A where c = r = t = poly(k, 1/), and there exists a tensor U ∈ Rc×r×t such that kU (C, R, T ) − Ak2F ≤ (1 + )kAk − Ak2F holds. If Ak does not exist, then kU (C, R, T ) − Ak2F ≤ (1 + ) OPT +γ where γ is an arbitrarily small positive function of n. In both cases, the algorithm succeeds with probability at least 9/10. Given a factorization of a rank-k tensor B, we can obtain C, U , R, and T in terms of it: Theorem 1.4 (Combination of Theorem C.40 and C.41, kkF -norm, CURT decomposition). Given a 3rd order tensor A ∈ Rn×n×n , let k ≥ 1, and let UB , VB , WB ∈ Rn×k be given. There is an algorithm e 2 ) poly(k, 1/) time (respectively, O(nnz(A))+n poly(k, 1/) time) running in O(nnz(A) log n)+ O(n n×c which outputs a subset C ∈ R of columns of A, a subset R ∈ Rn×r of rows of A, a subset T ∈ Rn×t of tubes of A, together with a tensor U ∈ Rc×r×t with rank(U ) = k such that c = r = t = O(k/) (respectively, c = r = t = O(k log k + k/)), and kU (C, R, T ) − Ak2F ≤ (1 + )kUB ⊗ VB ⊗ WB − Ak2F holds with probability at least 9/10. Combining Theorems 1.2 and 1.4 (with B being a (1 + O())-approximation to A) we achieve Equation (2) with α = (1 + ) and ξ = F with the optimal number of columns, rows, tubes, and rank of U (we mention our matching lower bound later). We also obtain several algorithms for tensor entry-wise `p norm low-rank approximation, as well as results for asymmetricPtensor are naturalP extensions of the matrix `1 -`2 norm. Here, P norms, which P 1 1 for a tensor A, kAkv = i ( j,k (Ai,j,k )2 ) 2 and kAku = i,j ( k (Ai,j,k )2 ) 2 . 4 T denotes the tube which is the column in 3rd dimension of tensor. 7 Theorem 1.5 (Combination of Theorem D.14 (kk1 -norm), Theorem E.9 (kkp -norm, p ∈ (0, 1)) Theorem F.23 (kkv -norm or `1 -`2 -`2 ), Theorem F.37 (kku -norm or `1 -`1 -`2 )). Given a 3rd order e 2 ). If Ak exists then there is an algorithm which tensor A ∈ Rn×n×n , for any k ≥ 1, let r = O(k e runs in nnz(A) · t + O(n) poly(k) time and outputs a (factorization of a) rank-r tensor B for which kB − Akξ ≤ poly(k, log n) · kAk − Akξ holds. If Ak does not exist, we have kB − Akξ ≤ poly(k, log n)·OPT +γ, where γ is an arbitrarily small positive function of n. The success probability e is at least 9/10. For ξ = 1 or p, t = O(k); for ξ = v, t = O(1); for ξ = u, t = O(n). As in the case of Frobenius norm, we can get rank-k and CURT algorithms for the above norms. Our results for asymmetric norms can be extended to `p -`2 -`2 , `p -`p -`2 , and families of M-estimators. We also obtain the following result for weighted tensor low-rank approximation. Theorem 1.6 (Informal Version of Theorem G.5, weighted). Suppose we are given a third order tensor A ∈ Rn×n×n , as well as a tensor W ∈ Rn×n×n with r distinct rows and r distinct columns. Suppose there is a rank-k tensor A0 ∈ Rn×n×n for which kW ◦ (A0 − A)k2F = OPT and one can write P δ A0 = ki=1 ui ⊗ vi ⊗ wi for kui k2 , kvi k2 , and kwi k2 bounded by 2n . Then there is an algorithm e 2 2 running in (nnz(A) + nnz(W ) + n2O(r k /) ) · nδ time and outputting n × k matrices U1 , U2 , U3 for which kW ◦ (U1 ⊗ U2 ⊗ U3 − A)k2F ≤ (1 + ) OPT with probability at least 2/3. We next strengthen Håstad’s NP-hardness to show that even approximating tensor rank is hard. Theorem 1.7 (Informal Version of Theorem H.42). Let q ≥ 3. Unless the Exponential Time Hypothesis (ETH) fails, there is an absolute constant c0 > 1 for which distinguishing if a tensor in q 1−o(1) Rn has rank at most k, or at least c0 · k, requires 2δk time, for a constant δ > 0. Under random-ETH [Fei02, GL04, RSW16], an average case hardness assumption for 3SAT , we can replace the k 1−o(1) in the exponent above with a k. We also obtain hardness in terms of : Theorem 1.8 (Informal Version of Corollary H.22). Let q ≥ 3. Unless ETH fails, there is no 1/4 q algorithm running in 2o(1/ ) time which, given a tensor A ∈ Rn , outputs a rank-1 tensor B for which kA − Bk2F ≤ (1 + ) OPT. As a side result worth stating, our analysis improves the best matrix CUR decomposition algorithm under Frobenius norm [BW14], providing the first optimal nnz(A)-time algorithm: Theorem 1.9 (Informal Version of Theorem C.48, Matrix CUR decomposition). There is an algorithm, which given a matrix A ∈ Rn×d and an integer k ≥ 1, runs in O(nnz(A))+(n+d) poly(k, 1/) time and outputs three matrices: C ∈ Rn×c containing c columns of A, R ∈ Rr×d containing r rows of A, and U ∈ Rc×r with rank(U ) = k for which r = c = O(k/) and kCU R − Ak2F ≤ (1 + ) minrank−k Ak kAk − Ak2F , holds with probability at least 9/10. 1.2 Our Techniques Many of our proofs, in particular those for Theorem 1.1 and Theorem 1.2, are based on what we call an “iterative existential proof”, which we then turn into an algorithm in two different ways depending if we are proving Theorem 1.1 or Theorem 1.2. e in what Henceforth, we assume otherwise replace Ak with a suitably good tensor A Pk A∗k exists; ∗ ∗ 5 ∗ ∗ follows. Since Ak = i=1 Ui ⊗ Vi ⊗ Wi , we can create three n × k matrices U , V , and W ∗ whose columns are the vectors Ui∗ , Vi∗ , and Wi∗ , respectively. Now we consider the three different 5 For simplicity, we define U ⊗ V ⊗ W = Pk i=1 Ui ⊗ Vi ⊗ Wi , where Ui is the i-th column of U . 8 flattenings (or unfoldings) of Ak , which express Ak as an n × n2 matrix. Namely, by thinking of Ak as the sum of outer products, we can write the three flattenings of Ak as U ∗ ·Z1 , V ∗ ·Z2 , and W ∗ ·Z3 , where the rows of Z1 are vec(Vi∗ ⊗ Wi∗ ) 6 ( For simplicity, we write Z1 = (V ∗> W ∗> ). 7 ), the rows def of Z2 are vec(Ui∗ ⊗ Wi∗ ), and the rows of Z3 are vec(Ui∗ ⊗ Vi∗ ), for i ∈ [k] = {1, 2, . . . , k}. Letting the three corresponding flattenings of the input tensor A be A1 , A2 , and A3 , by the symmetry of the Frobenius norm, we have kA − Bk2F = kA1 − U ∗ Z1 k2F = kA2 − V ∗ Z2 k2F = kA3 − W ∗ Z3 k2F . Let us consider the hypothetical regression problem minU kA1 − U Z1 k2F . Note that we do not know Z1 , but we will not need to. Let r = O(k/), and suppose S1 is an n2 × r matrix of i.i.d. normal random variables with mean 0 and variance 1/r, denoted N (0, 1/r). Then by standard b is the minimizer to the smaller regression results for regression (see, e.g., [Woo14] for a survey), if U 2 b problem U = argminU kU Z1 S1 − A1 S1 kF , then b Z1 k2F ≤ (1 + )minU kA1 − U Z1 k2F . kA1 − U (3) {(A1 S1 )a ⊗ (A2 S2 )b ⊗ (A3 S3 )c }a,b,c∈[r] . (4) b = A1 S1 (Z1 S1 )† . Although we do not know know Z1 , this implies U b is in the column Moreover,U span of A1 S1 , which we do know, since we can flatten A to compute A1 and then compute A1 S1 . Thus, this hypothetical regression argument gives us an existential statement - there exists a good b in the column span of A1 S1 . We could similarly define Vb = A2 S2 (Z2 S2 )† and rank-k matrix U c = A3 S3 (Z3 S3 )† as solutions to the analogous regression problems for the other two flattenings W of A, which are in the column spans of A2 S2 and A3 S3 , respectively. Given A1 S1 , A2 S2 , and A3 S3 , which we know, we could hope there is a good rank-k tensor in the span of the rank-1 tensors However, an immediate issue arises. First, note that our hypothetical regression problem guarantees b Z1 k2 ≤ (1 + )kA − Ak k2 , and therefore since the rows of Z1 are of the special form that kA1 − U F F P b ∗ ∗ ∗ vec(Vi ⊗ Wi∗ ), we can perform a “retensorization” to create a rank-k tensor B = i U i ⊗ Vi ⊗ Wi b , since it b Z1 for which kA − Bk2 ≤ (1 + )kA − Ak k2 . While we do not know U from the matrix U F F is in the column span of A1 S1 , it implies that B is in the span of the rank-1 tensors {(A1 S1 )a ⊗ Vb∗ ⊗ Wc∗ }a∈[r],b,c∈[k] . Analogously, we have that there is a good rank-k tensor B in the span of the rank-1 tensors {Ua∗ ⊗(A2 S2 )b ⊗Wc∗ }a,c∈[k],b∈[r] , and a good rank-k tensor B in the span of the rank-1 tensors {Ua∗ ⊗ Vb∗ ⊗ (A3 S3 )c }a,b∈[k],c∈[r] . However, we do not know U ∗ or V ∗ , and it is not clear there is a rank-k tensor B for which simultaneously its first factors are in the column span of A1 S1 , its second factors are in the column span of A2 S2 , and its third factors are in the column span of A3 S3 , i.e., whether there is a good rank-k tensor B in the span of rank-1 tensors in (4). b = A1 S1 (Z1 S1 )† . We fix this by an iterative argument. Namely, we first compute A1 S1 , and write U b , so the rows of Z2 are vec(U bi ⊗ W ∗ ) for i ∈ [k], and consider We now redefine Z2 with respect to U i 2 the regression problem minV kA2 − V Z2 kF . While we do not know Z2 , if S2 is an n2 × r matrix of vec(Vi∗ ⊗ Wi∗ ) denotes a row vector that has length n1 n2 where Vi∗ has length n1 and Wi∗ has length n2 . (V ∗> W ∗> ) denotes a k × n1 n2 matrix where the i-th row is vec(Vi∗ ⊗ Wi∗ ), where length n1 vector Vi∗ is the i-th column of n1 × k matrix V ∗ , and length n2 vector Wi∗ is the i-th column of n2 × k matrix W ∗ , ∀i ∈ [k]. 6 7 9 i.i.d. Gaussians, we again have the statement that Vb = A2 S2 (Z2 S2 )† satisfies kA2 − Vb Z2 k2F ≤ (1 + )minV kA2 − V Z2 k2F by the regression guarantee with Gaussians ≤ (1 + )kA2 − V ∗ Z2 k2F since V ∗ is no better than the minimizer V b Z1 k2F by retensorizing and flattening along a different dimension = (1 + )kA1 − U ≤ (1 + )2 minU kA1 − U Z1 k2F by (3) = (1 + )2 kA − Ak k2F by definition of Z1 . Now we can retensorize Vb Z2 to obtain a rank-k tensor B for which kA − Bk2F = kA2 − Vb Z2 k2F ≤ (1 + )2 kA − Ak k2F . Note that since the columns of Vb are in the span of A2 S2 , and the rows of Z2 bi ⊗ W ∗ ) for i ∈ [k], where the columns of U b are in the span of A1 S1 , it follows that B is are vec(U i in the span of rank-1 tensors {(A1 S1 )a ⊗ (A2 S2 )b ⊗ Vbc }a,b∈[r],c∈[k] . Suppose we now redefine Z3 so that it is now an r2 ×n2 matrix with rows vec((A1 S1 )a ⊗(A2 S2 )b ) for all pairs a, b ∈ [r], and consider the regression problem minW kA3 − W Z3 k2F . Now observe that 2 since we know Z3 , and since we can form A3 by flattening A, we can solve for W ∈ Rn×r in polynomial time by solving a regression problem. Retensorizing W Z3 to a tensor B, it follows that we have found a rank-r2 = O(k 2 /2 ) tensor B for which kA − Bk2F ≤ (1 + )2 kA − Ak k2F = (1 + O())kA − Ak k2F , and the result follows by adjusting  by a constant factor. To obtain the nnz(A)+n poly(k/) running time guarantee of Theorem 1.1, while we can replace S1 and S2 with compositions of a sparse CountSketch matrix and a Gaussian matrix (see chapter 2 of [Woo14] for a survey), enabling us to compute A1 S1 and A2 S2 in nnz(A) + n poly(k/) time, we still need to solve the regression problem minW kA3 −W Z3 k2F quickly, and note that we cannot even write down Z3 without spending r2 n2 time. Here we use a different random matrix S3 called TensorSketch, which was introduced in [Pag13, PP13], but for which we will need the stronger properties of a subspace embedding and approximate matrix product shown to hold for it in [ANW14]. Given the latter properties, we can instead solve the regression problem minW kA3 S3 − W Z3 S3 k2F , and importantly A3 S3 and Z3 S3 can be computed in nnz(A) + n poly(k/) time. Finally, this small problem can be solved in n poly(k/) time. If we want to output a rank-k solution as in Theorem 1.2, then we need to introduce indeterminates at several places in the preceding argument and run a generic polynomial optimization b as procedure which runs in time exponential in the number of indeterminates. Namely, we write U b A1 S1 X1 , where X1 is an r ×k matrix of indeterminates, we write V as A2 S2 X2 , where X2 is an r ×k c as A3 S3 X3 , where X3 is an r×k matrix of indeterminates. matrix of indeterminates, and we write W When executing the above iterative argument, we let the rows of Z1 be the vectors vec(Vi∗ ⊗ Wi∗ ), bi ⊗ Vi ). Then U b bi ⊗ W ∗ ), and the rows of Z3 be the vectors vec(U the rows of Z2 be the vectors vec(U i b is a (1+)-approximate minimizer to minU kA1 −U Z1 kF , while V is a (1+)-approximate minimizer c is a (1 + )-approximate minimizer to minW kA3 − W Z3 kF . Note to minV kA2 − V Z2 kF , while W † † † that by tensor Pkassigning X1 = (Z1 S1 ) , X2 = (Z2 S2 ) , and X3 = (Z3 S3 )2 , it follows3 that the rank-k B = i=1 (A1 S1 X1 )i ⊗ (A2 S2 X2 )i ⊗ (A3 S3 X3 )i satisfies kA − BkF ≤ (1 + ) kA − Ak k2F , as desired. Note that here the rows of Z2 are a function of X1 , while the rows of Z3 are a function of both X1 and X2 . What is important for us though is that it suffices to minimize the degree-6 polynomial X k X ( (A1 S1 X1 )a,i · (A2 S2 X2 )b,i · (A3 S3 X3 )c,i − Aa,b,c )2 , a,b,c∈[n] i=1 10 over the 3rk = O(k 2 /) indeterminates X1 , X2 , X3 , since we know there exists an assignment to X1 , X2 , and X3 providing a (1+O())-approximate solution, and any solution X1 , X2 , and X3 found by minimizing the above polynomial will be no worse than that solution. This polynomial can be minimized up to additive 2− poly(n) additive error in poly(n) time [Ren92a, BPR96] assuming the entries of U ∗ , V ∗ , and W ∗ are bounded by 2poly(n) , as assumed in Theorem 1.2. Similar arguments can be made for obtaining a relative error approximation to the actual value OPT as well as handling the case when Ak does not exist. To optimize the running time to nnz(A), we can choose CountSketch matrices T1 , T2 , T3 of t = poly(k, 1/) × n dimensions and reapply the above iterative argument. Then it suffices to minimize this small size degree-6 polynomial X k X ( (T1 A1 S1 X1 )a,i · (T2 A2 S2 X2 )b,i · (T3 A3 S3 X3 )c,i − (A(T1 , T2 , T3 ))a,b,c )2 , a,b,c∈[t] i=1 over the 3rk = O(k 2 /) indeterminates X1 , X2 , X3 . Outputting A1 S1 X1 , A2 S2 X2 , A3 S3 X3 then provides a (1 + )-approximate solution. Our iterative existential argument provides a general framework for obtaining low rank approximation results for tensors for many other error measures as well. 1.3 Other Low Rank Approximation Algorithms Following Our Framework. Column, row, tube subset selection, and CURT decomposition. In tensor column, row, tube subset selection, the goal is to find three matrices: a subset C of columns of A, a subset R of rows of A, and a subset T of tubes of A, such that there exists a small tensor U for which kU (C, R, T ) − Ak2F ≤ (1 + ) OPT. We first choose two Gaussian matrices S1 and S2 with s1 = s2 = 2 O(k/) columns, and form a matrix Z30 ∈ R(s1 s2 )×n with (i, j)-th row equal to the vectorization of (A1 S1 )i ⊗ (A2 S2 )j . Motivated by the regression problem minW kA3 − W Z30 kF , we sample d3 = O(s1 s2 /) columns from A3 and let D3 denote this selection matrix. There are a few ways to do the sampling depending on the tradeoff between the number of columns and running time, which we describe below. Proceeding iteratively, we write down Z20 by setting its (i, j)-th row to the vectorization of (A1 S1 )i ⊗ (A3 D3 )j . We then sample d2 = O(s1 d3 /) columns from A2 and let D2 denote that selection matrix. Finally, we define Z10 by setting its (i, j)-th row to be the vectorization of (A2 D2 )i ⊗ (A3 D3 )j . We obtain C = A1 D1 , R = A2 D2 and T = A3 D3 . For the sampling steps, we can use a generalized matrix column subset selection technique, which extends a column subset selection technique of [BW14] in the context of CUR decompositions to the case when e 2 ) poly(k, 1/) time. C is not necessarily a subset of the input. This gives O(nnz(A) log n) + O(n Alternatively, we can use a technique we develop called tensor leverage score sampling described below, yielding O(nnz(A)) + n poly(k, 1/) time. A body of work in the matrix case has focused on finding the best possible number of columns and rows of a CUR decomposition, and out Pk we can ask the same question for tensors. It turns n×n×n that if one is given the factorization i=1 (UB )i ⊗ (VB )i ⊗ (WB )i of a rank-k tensor B ∈ R with UB , VB , WB ∈ Rn×k , then one can find a set C of O(k/) columns, a set R of O(k/) rows, and a set T of O(k/) tubes of A, together with a rank-k tensor U for which kU (C, R, T ) − Ak2F ≤ (1 + )kA − Bk2F . This is based on an iterative argument, where the initial sampling (which needs to be our generalized matrix column subset selection rather than tensor leverage score sampling to achieve optimal bounds) is done with respect to VB> WB> , and then an iterative argument is carried out. Since we show a matching lower bound on the number of columns, rows, tubes and rank of U , these parameters are tight. The algorithm is efficient if one is given a rank-k tensor B 11 which is a (1 + O())-approximation to A; if not then one can use Theorem C.2 and and this step will be exponential time in k. If one just wants O(k log k + k/) columns, rows, and tubes, then one can achieve O(nnz(A)) + n poly(k, 1/) time, if one is given B. Column-row, row-tube, tube-column face subset selection, and CURT decomposition. In tensor column-row, row-tube, tube-column face subset selection, the goal is to find three tensors: a subset C ∈ Rc×n×n of row-tube faces of A, a subset R ∈ Rn×r×n of tube-column faces of A, and a subset T ∈ Rn×n×t of column-row faces of A, such that there exists a tensor U ∈ Rtn×cn×rn with small rank for which kU (T1 , C2 , R3 ) − Ak2F ≤ (1 + ) OPT, where T1 ∈ Rn×tn denotes the matrix obtained by flattening the tensor T along the first dimension, C2 ∈ Rn×cn denotes the matrix obtained by flattening the tensor C along the second dimension, and R3 ∈ Rn×rn denotes the matrix obtained by flattening the tensor T along the third dimension. We solve this problem by first choosing two Gaussian matrices S1 and S2 with s1 = s2 = O(k/) columns, and then forming matrix U3 ∈ Rn×s1 s2 with (i, j)-th column equal to (A1 S1 )i , as well as matrix V3 ∈ Rn×s1 s2 with (i, j)-th column equal to (A2 S2 )j . Inspired by the regression problem minW ∈Rn×s1 s2 kV3 · (W > U3> ) − A2 kF , we sample d3 = O(s1 s2 /) rows from A2 and let D3 ∈ Rn×n denote this selection matrix. In other words, D3 selects d3 tube-column faces from the original tensor A. Thus, we obtain a small regression problem: minW kD3 V3 · (W > U3> ) − D3 A2 kF . By retensorizing the objective function, we obtain the problem minW kU3 ⊗ (D3 V3 ) ⊗ W − A(I, D3 , I)kF . Flattening the objective function along the third dimension, we obtain minW kW · (U3> (D3 V3 )> ) − (A(I, D3 , I))3 kF which has optimal solution (A(I, D3 , I))3 (U3> (D3 V3 )> )† . Let W 0 denote A(I, D3 , I))3 . In the next step, we fix W2 = W 0 (U3> (D3 V3 )> )† and U2 = U3 , and consider the objective function minV kU2 · (V > W2> ) − A1 kF . Applying a similar argument, we obtain V 0 = (A(D2 , I, I))2 and U 0 = (A(I, I, D1 )1 ). Let C denote A(D2 , I, I), R denote A(I, D3 , I), and T denote A(I, I, D1 ). Overall, this algorithm selects poly(k, 1/) faces from each dimension. Similar to our column-based CURT decomposition, Pk our face-based CURT decomposition has the property that if one is given the factorization i=1 (UB )i ⊗ (VB )i ⊗ (WB )i of a rank-k tensor B ∈ Rn×n×n with UB , VB , WB ∈ Rn×k which is a (1+O())-approximation to A, then one can find a set C of O(k/) row-tube faces, a set R of O(k/) tube-column faces, and a set T of O(k/) columnrow faces of A, together with a rank-k tensor U for which kU (T1 , C2 , R3 ) − Ak2F ≤ (1 + ) OPT. Tensor multiple regression and tensor leverage score sampling. In the above we need to consider standard problems for matrices in the context of tensors. Suppose we are given a matrix A ∈ Rn1 ×n2 n3 and a matrix B = (V > W > ) ∈ Rk×n2 n3 with rows (Vi ⊗ Wi ) for an n2 × k matrix V and n3 × k matrix W . Using TensorSketch [Pag13, PP13, ANW14] one can solve multiple regression minU kU B−AkF without forming B in O(n2 +n3 ) poly(k, 1/) time, rather than the naïve O(n2 n3 ) poly(k, 1/) time. However, this does not immediately help us if we would like to sample columns of such a matrix B proportional to its leverage scores. Even if we apply TensorSketch to compute a k × k change of basis matrix R in O(n2 + n3 ) poly(k, log(n2 n3 )) time, for which the leverage scores of B are (up to a constant factor) the squared column norms of R−1 B, there are still n2 n3 leverage scores and we cannot write them all down! Nevertheless, we show we can still 0 sample by them. For the i-th row ei R−1 of R−1 , we create a matrix V i by scaling each of the columns of V > entrywise by the entries of z. The squared norms of ei R−1 B are exactly the squared 0 entries of (V i )W > . We cannot compute this matrix product, but we can first sample a column of it proportional to its squared norm and then sample an entry in that column proportional to its 0 square. To sample a column, we compute G(V i )W > for a Gaussian matrix G with O(log n3 ) rows 0i 0i by computing G · V , then computing (G · V ) · W > , which is O(n2 + n3 ) poly(k, log(n2 n3 )) total 12 time. After sampling a column, we compute the column exactly and sample a squared entry. We 0 do this for each i ∈ [k], first sampling an i proportional to kGV i W > k2F , then running the above scheme on that i. The poly(log n) factor in the running time can be replaced by poly(k) if one wants to avoid a poly(log n) dependence in the running time. Entry-wise `1 low-rank approximation. We consider the problem of entrywise `1 -low rank approximation of an n × n × n tensor A, namely, the problem of finding a rank-k tensor B for which kA − BkP 1 ≤ poly(k, log n) OPT, where OPT = inf rank-k B kA − Bk1 , and where for a tensor A, kAk1 = i,j,k |Ai,j,k |. Our iterative existential argument can be applied in much the same way as for the Frobenius norm. We iteratively flatten A along each of its three dimensions, obtaining A1 , A2 , and A3 as above, and iteratively build a good rank-k solution B of the form (A1 S1 X1 )⊗(A2 S2 X2 )⊗ (A3 S3 X3 ), where now the Si are matrices of i.i.d. Cauchy random variables or sparse matrices of Cauchy random variables and the Xi are O(k log k) × k matrices of indeterminates. For a matrix C and a matrix S of i.i.d. Cauchy random variables with k columns, it is known [SWZ17] that the column span of CS contains a poly(k log n)-approximate rank-k space with respect to the entrywise `1 -norm for C. In the case of tensors, we must perform an iterative flattening and retensorizing argument to guarantee there exists a tensor B of the form above. Also, if we insist on outputting a rank-k solution as opposed to a bicriteria solution, k(A1 S1 X1 ) ⊗ (A2 S2 X2 ) ⊗ (A3 S3 X3 ) − Ak1 is not a polynomial of the Xi , and if we introduce sign variables for the n3 absolute values, the running 3 time of the polynomial solver will be 2# of variables = 2Ω(n ) . We perform additional dimensionality reduction by Lewis weight sampling [CP15] from the flattenings to reduce the problem size to e 2) e 3 ) sign variables, and to obtain a 2O(k poly(k). This small problem still has O(k running time we relax the reduced problem to a Frobenius norm problem, mildly increasing the approximation factor by another poly(k) factor. Combining the iterative existential argument with techniques in [SWZ17], we also obtain an `1 CURT decomposition algorithm (which is similar to the Frobenius norm result in Theorem 1.4), e e e which can find O(k) columns, O(k) rows, O(k) tubes, and a tensor U . Our algorithm starts from a given factorization of a rank-k tensor B = UB ⊗ VB ⊗ WB found above. We compute a sampling and rescaling diagonal matrix D1 according to the Lewis weights of matrix B1 = (VB> WB> ), where e D1 has O(k) nonzero entries. Then we iteratively construct B2 , D2 , B3 and D3 . Finally we have e e C = A1 D1 (selecting O(k) columns from A), R = A2 D2 (selecting O(k) rows from A), T = A3 D3 † e (selecting O(k) tubes from A) and tensor U = ((B1 D1 ) ) ⊗ ((B2 D2 )† ) ⊗ ((B3 D3 )† ). We have similar results for entry-wise `p , 1 ≤ p < 2, via analogous techniques. `1 -`2 -`2 low-rank approximation (sum of Euclidean norms of faces). For an n × n × n tensor A, in `1 -`2 -`2 low rank approximation we seek a rank-k tensor B for which kA − Bkv ≤ P P 1 poly(k, log n) OPT, where OPT = inf rank-k B kA − Bkv and where kAkv = i ( j,k (Ai,j,k )2 ) 2 for a tensor A. This norm is asymmetric, i.e., not invariant under permutations to its coordinates, and we cannot flatten the tensor along each of its dimensions while preserving its cost. Instead, we embed the problem to a new problem with a symmetric norm. Once we have a symmetric norm, we apply an iterative existential argument. We choose an oblivious sketching matrix (the M -Sketch in [CW15b]) S ∈ Rs×n with s = poly(k, log n), and reduce the original problem to kS(A − B)kv , by losing a small approximation factor. Because s is small, we can then turn the √ `1 part of the problem to `2 by losing another s in the approximation, so that now the problem is aP Frobenius norm problem. We then apply our iterative existential argument to the problem b2 S2 X2 )i ⊗ (A b3 S3 X3 )i − A)kF where U ∗ is a fixed matrix and A b = SA, and output kS( ki=1 Ui∗ ⊗ (A a bicriteria solution. 13 `1 -`1 -`2 low-rank approximation (sum of Euclidean norms of tubes). For an n×n×n tensor A, in the `1 -`1 -`2 low rank approximation problem we seek a rank-k tensor B for which kA − Bku ≤ P P 1 poly(k, log n) OPT, where OPT = inf rank-k B kA − Bku and kAku = i,j ( k (Ai,j,k )2 ) 2 . The main difficulty in this problem is that the norm is asymmetric, and we cannot flatten the tensor along all three dimensions. To reduce the problem to a problem with a symmetric norm, we choose random Gaussian matrices S ∈ Rn×s with s = O(n). By Dvoretzky’s theorem [Dvo61], for all tensors A, kASk1 ≈ kAku , which reduces our problem to minrank-k B k(A − B)Sk1 . Via an iterative existential b1 S1 X1 ) ⊗ argument, we obtain a generalized version of entrywise `1 low rank approximation, k((A b b (A2 S2 X2 ) ⊗ (A3 S3 X3 ) − A)Sk1 , where A = AS is an n × n × s size tensor. Finally, we can either use a polynomial system solver to obtain a rank-k solution, or output a bicriteria solution. Weighted low-rank approximation. We also consider weighted low rank approximation. Given an n × n × n tensor A and an n × n × n tensor W of weights, we want to find a rank-k tensor B for which kW ◦ (A − B)k2F ≤ (1 + ) OPT, where OPT = inf rank-k B kW ◦ (A − B)k2F and P 2 A2 ) 21 . We provide two algorithms based on where for a tensor A, kW ◦ AkF = ( i,j,k Wi,j,k i,j,k different assumptions on the weight tensor W . The first algorithm assumes that W has r distinct faces on each of its three dimensions. We flatten A and W along each of its three dimensions, obtaining A1 , A2 , A3 and W1 , W2 , W3 . Because each Wi has r distinct rows, combining the “guess a sketch” technique from [RSW16] with our iterative argument, we can create matrices U1 , U2 , and 2 U3 in terms and for which a solution to the objective function Pk of O(rk /) total indeterminates kW ◦ ( i=1 (U1 )i ⊗ (U2 )i ⊗ (U3 )i − A)k2F , together with O(r) side constraints, gives a (1 + )2 e approximation. We can solve the latter problem in poly(n) · 2O(rk /) time. Our second algorithm assumes W has r distinct faces in two dimensions. Via a pigeonhole argument, the third dimension e will have at most 2O(r) distinct faces. We again use O(rk 2 /) variables to express U1 and U2 , but now express U3 in terms of these variables, which is necessary since W3 could have an exponential number of distinct rows, ultimately causing too many variables needed to express U3 directly. We P e again arrive at the objective function kW ◦ ( ki=1 (U1 )i ⊗ (U2 )i ⊗ (U3 )i − A)k2F , but now have 2O(r) side constraints, coming from the fact that U3 is a rational function of the variables created for U1 e 2 2 and U2 and we need to clear denominators. Ultimately, the running time is 2O(r k /) . 1−o(1) Computational Hardness. Our 2δk time hardness for c-approximation in Theorem H.42 is shown via a reduction from approximating MAX-3SAT to approximating MAX-E3SAT, where the latter problem has the property that each clause in the satisfiability instance has exactly 3 literals (in MAX-3SAT some clauses may have 2 literals). Then, a reduction [Tre01] from approximating MAXE3SAT to approximating MAX-E3SAT(B) is performed, for a constant B which provides an upper bound on the number of clauses each literal can occur in. Given an instance φ to MAX-E3SAT(B), we create a 3rd order tensor T as Håstad does using φ [Hås90]. While Håstad’s reduction guarantees that the rank of T is at most r if φ is satisfiable, and at least r + 1 otherwise, we can show that if φ is not satisfiable then its rank is at least the minimal size of a set of variables which is guaranteed to intersect every unsatisfied clause in any unsatisfiable assignment. Since if φ is not satisfiable, there are at least a linear fraction of clauses in φ that are unsatisfied under any assignment by the inapproximability of MAX-E3SAT(B), and since each literal occurs in at most B clauses for a constant B, it follows that the rank of T when φ is not satisfiable is at least c0 r for a constant c0 > 1. Further, under ETH , our reduction implies one cannot approximate MAX-E3SAT(B), and 1−o(1) thus approximate the rank of a tensor up to a factor c0 , in less than 2δk time. We need the near-linear size reduction of MAX-3SAT to MAX-E3SAT of [MR10] to get our strongest result. 14 Algorithm 1 Main Meta-Algorithm 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: procedure TensorLowRankApproxBicriteria(A, n, k, ) . Theorem 1.1 Choose sketching matrices S2 ,S3 (Composition of Gaussian and CountSketch.) Choose sketching matrices T2 ,T3 (CountSketch.) Compute T2 A2 S2 , T3 A3 S3 . Construct Vb by setting (i, j)-th column to be (A2 S2 )i . c by setting (i, j)-th column to be (A3 S3 )j . Construct W Construct matrix B by setting (i, j)-th row of B is vectorization of (T2 A2 S2 )i ⊗ (T3 A3 S3 )j . Solve minU kU B − (A(I, T2 , T3 ))1 k2F . b , Vb , and W c. return U end procedure procedure TensorLowRankApprox(A, n, k, ) . Theorem 1.2 Choose sketching matrices S1 ,S2 ,S3 (Composition of Gaussian and CountSketch.) Choose sketching matrices T1 ,T2 ,T3 (CountSketch.) Compute T1 A1 S1 , T2 A2 S2 , T3 A3 S3 . Solve minX1 ,X2 ,X3 k(T1 A1 S1 X1 ) ⊗ (T2 A2 S2 X2 ) ⊗ (T3 A3 S3 X3 ) − A(T1 , T2 , T3 )k2F . return A1 S1 X1 , A2 S2 X2 , and A3 S3 X3 . end procedure 1/4 The 2Ω(1/ ) time hardness for (1 + )-approximation for rank-1 tensors in Theorem H.21 strengthens the NP-hardness for rank-1 tensor computation in Section 7 of [HL13], where instead of assuming the NP-hardness of the Clique problem, we assume ETH . Also, the proof in [HL13] did not explicitly bound the approximation error; we do this for a poly(1/)-sized tensor (which can be 1/4 padded with 0s to a poly(n)-sized tensor) to rule out (1 + )-approximation in 2o(1/ ) time. 1/2 The same hard instance above shows, assuming ETH , that 2Ω(1/ ) time is necessary for (1+)approximation to the spectral norm of a symmetric rank-1 tensor (see Section H.2 and Section H.3). 1−o(1) Assuming ETH , the 21/ -hardness [SWZ17] for matrix `1 -low rank approximation gives the same hardness for tensor entry-wise `1 and `1 -`1 -`2 low rank approximation. Also, under ETH , we Ω(1) strengthen the NP-hardness in [CW15a] to a 21/ -hardness for `1 -`2 -low rank approximation of a matrix, which gives the same hardness for tensor `1 -`2 -`2 low rank approximation. Hard Instance. We extend the previous matrix CUR hard instance [BW14] to 3rd order tensors by planting multiple rotations of the hard instance for matrices into a tensor. We show C must select Ω(k/) columns from A, R must select Ω(k/) rows from A, and T must select Ω(k/) tubes from A. Also the tensor U must have rank at least k. This generalizes to q-th order tensors. Optimal matrix CUR decomposition. We also improve the nnz(A) log n+(n+d) poly(log n, k, 1/) running time of [BW14] for CUR decomposition of A ∈ Rn×d to nnz(A) + (n + d) poly(k, 1/), while selecting the optimal number of columns, rows, and a rank-k matrix U . Using [CW13, MM13, b with k orthonormal columns in nnz(A) + n poly(k/) time for which NN13], we find a matrix U 2 2 ) and S ∈ Rs1 ×n be a sampling/rescaling b e minV kU V − AkF ≤ (1 + )kA − Ak k2F . Let s1 = O(k/ 1 b . By strengthening the affine embedding analysis of [CW13] to matrix by the leverage scores of U leverage score sampling (the analysis of [CW13] gives a weaker analysis for affine embeddings using leverage scores which does not allow approximation in the sketch space to translate to approximation b X 0 − S1 Ak2 ≤ in the original space), with probability at least 0.99, for all X 0 which satisfy kS1 U F 0 2 0 2 2 b X −S1 Ak , we have kU b X −Ak ≤ (1+) minX kU b X −Ak , where 0 = 0.0001. (1+ ) minX kS1 U F F F 15 bY R − Applying our generalized row subset selection procedure, we can find Y, R for which kS1 U 2 0 2 0 b S1 AkF ≤ (1 +  ) minX kS1 U X − S1 AkF , where R contains O(k/ ) = O(k/) rescaled rows of b Y R − Ak2 ≤ S1 A. A key point is that rescaled rows of S1 A are also rescaled rows of A. Then, kU F b X − Ak2 . Finding Y, R can be done in d poly(s1 /) = d poly(k/) time. Now set (1 + ) minX kU F Vb = Y R. We can choose S2 to be a sampling/rescaling matrix, and then find C, Z for which kCZ Vb S2 − AS2 k2F ≤ (1 + 0 ) minX kX Vb S2 − AS2 k2F in a similar way, where C contains O(k/) rescaled columns of AS2 , and thus also of A. We thus have kCZY R − Ak2F ≤ (1 + O())kA − Ak k2F . Distributed and streaming settings. Since our algorithms use linear sketches, they are implementable in distributed and streaming models. We use random variables with limited independence to succinctly store the sketching matrices [CW13, KVW14, KN14, Woo14, SWZ17]. Extension to other notions of tensor rank. This paper focuses on the standard CP rank, or canonical rank, of a tensor. As mentioned, due to border rank issues, the best rank-k solution does not exist in certain cases. There are other notions of tensor rank considered in some applications which do not suffer from this problem, e.g., the tucker rank [KC07, PC08, MH09, ZW13, YC14], and the train rank [Ose11, OTZ11, ZWZ16, PTBD16]). We also show observe that our techniques can be applied to these notions of rank. 1.4 An Algorithm and a Roadmap Roadmap Section A introduces notation and definitions. Section B includes several useful tools. We provide our Frobenius norm low rank approximation algorithms in Section C. Section C.10 extends our results to general q-th order tensors. Section D has our results for entry-wise `1 norm low rank approximation. Section E has our results for entry-wise `p norm low rank approximation. Section G has our results for weighted low rank approximation. Section F has our results for asymmetric norm low rank approximation algorithms. We present our hardness results in Section H and Section I. Section J and Section K extend the results to distributed and streaming settings. Section L extends our techniques from tensor rank to other notions of tensor rank including tensor tucker rank and tensor train rank. 16 Figure 1: A 3rd order tensor with size 8 × 8 × 8. A Notation For an n ∈ N+ , let [n] denote the set {1, 2, · · · , n}. e ) to be f · logO(1) (f ). In addition to O(·) notation, for two For any function f , we define O(f functions f, g, we use the shorthand f . g (resp. &) to indicate that f ≤ Cg (resp. ≥) for an absolute constant C. We use f h g to mean cf ≤ g ≤ Cf for constants c, C. For a matrix A, we use kAk2 to denote the spectral norm of A. For a tensor A, let kAk and kAk2 (which we sometimes use interchangeably) denote the spectral norm of tensor A, |A(x, y, z)| . x,y,z6=0 kxk · kyk · kzk kAk = sup Let kAkF denote the Frobenius norm of a matrix/tensor A, i.e., kAkF is the square root of sum of squares of all the entries of A. For 1 ≤ p < 2, we use kAkp to denote the entry-wise `p -norm of a matrix/tensor A, i.e., kAkp is the p-th root of the sum of p-th powers of the absolute values of the entries of A. kAk1 will be an important special case of kAkp , which corresponds to the sum of absolute values of all of the entries. Let nnz(A) denote the number of nonzero entries of A. Let det(A) denote the determinant of a square matrix A. Let A> denote the transpose of A. Let A† denote the Moore-Penrose pseudoinverse of A. Let A−1 denote the inverse of a full rank square matrix. For a 3rd order tensor A ∈ Rn×n×n , its x-mode fibers are called column fibers (x = 1), row fibers (x = 2) and tube fibers (x = 3). For tensor A, we use A∗,j,l to denote its (j, l)-th column, we use Ai,∗,l to denote its (i, l)-th row, and we use Ai,j,∗ to denote its (i, j)-th tube. A tensor A is symmetric if and only if for any i, j, k, Ai,j,k = Ai,k,j = Aj,i,k = Aj,k,i = Ak,i,j = Ak,j,i . For a tensor A ∈ Rn1 ×n2 ×n3 , we use > to denote rotation (3 dimensional transpose) so that A> ∈ Rn3 ×n1 ×n2 . For a tensor A ∈ Rn1 ×n2 ×n3 and matrix B ∈ Rn3 ×k , we define the tensor-matrix dot product to be A · B ∈ Rn1 ×n2 ×k . 17 Figure 2: Flattening. We flatten a third order 4 × 4 × 4 tensor along the 1st dimension to obtain a 4 × 16 matrix. The red blocks correspond to a column in the original third order tensor, the blue blocks correspond to a row in the original third order tensor, and the green blocks correspond to a tube in the original third order tensor. We use ⊗ to denote outer product, ◦ to denote entrywise product, and · to denotePdot product. Given two column vectors u, v ∈ Rn , let u ⊗ v ∈ Rn×n and (u ⊗ v)i,j = ui · vj , u> v = ni=1 ui vi ∈ R and (u ◦ v)i = ui vi . Definition A.1 (⊗ product for vectors). Given q vectors u1 ∈ Rn1 , u2 ∈ Rn2 , · · · , uq ∈ Rnq , we use u1 ⊗ u2 ⊗ · · · ⊗ uq to denote an n1 × n2 × · · · × nq tensor such that, for each (j1 , j2 , · · · , jq ) ∈ [n1 ] × [n2 ] × · · · × [nq ], (u1 ⊗ u2 ⊗ · · · ⊗ uq )j1 ,j2 ,··· ,jq = (u1 )j1 (u2 )j2 · · · (uq )jq , where (ui )ji denotes the ji -th entry of vector ui . n1 ×n2 ×···×nq , let Definition A.2 Qq (vec(), convert tensor into a vector). Given a tensor A ∈ R 1× n i i=1 vec(A) ∈ be a Q row vector, such that the t-th entry of vec(A) is Aj1 ,j2 ,··· ,jq where t = QR (j1 − 1) qi=2 ni + (j2 − 1) qi=3 ni + · · · + (jq−1 − 1)nq + jq .     3   1  , v = 4 then vec(u ⊗ v) = 3 4 5 6 8 10 . For example if u = 2 5 Definition A.3 (⊗ product for matrices). Given q matrices U1 ∈ Rn1 ×k , U2 ∈ Rn2 ×k , · · · , Uq ∈ Rnq ×k , we use U1 ⊗ U2 ⊗ · · · ⊗ Uq to denote an n1 × n2 × · · · × nq tensor which can be written as, k X U1 ⊗ U2 ⊗ · · · ⊗ Uq = (U1 )i ⊗ (U2 )i ⊗ · · · ⊗ (Uq )i ∈ Rn1 ×n2 ×···×nq , i=1 where (Uj )i denotes the i-th column of matrix Uj ∈ Rnj ×k . Definition A.4 ( product for matrices). Given q matrices U1 ∈ Rk×n1 , U2 ∈ Rk×n2 , · · · , Uq ∈ Q Rk×nq , we use U1 U2 · · · Uq to denote a k× qj=1 nj matrix where the i-th row of U1 U2 · · · Uq is the vectorization of (U1 )i ⊗ (U2 )i ⊗ · · · ⊗ (Uq )i , i.e.,   vec((U1 )1 ⊗ (U2 )1 ⊗ · · · ⊗ (Uq )1 ) Qq  vec((U1 )2 ⊗ (U2 )2 ⊗ · · · ⊗ (Uq )2 )   ∈ Rk× j=1 nj . U1 U2 · · · Uq =    ··· k k k vec((U1 ) ⊗ (U2 ) ⊗ · · · ⊗ (Uq ) ) where (Uj )i ∈ Rnj denotes the i-th row of matrix Uj ∈ Rk×nj . 18 Definition A.5 (Flattening vs unflattening/retensorizing). Suppose we are given three matrices U ∈ Rn1 ×k , V ∈ Rn2 ×k , W ∈ Rn3 ×k . Let tensor A ∈ Rn1 ×n2 ×n3 denote U ⊗ V ⊗ W . Let A1 ∈ Rn1 ×n2 n3 denote a matrix obtained by flattening tensor A along the 1st dimension. Then A1 = U ·B, where B = V > W > ∈ Rk×n2 n3 denotes the matrix for which the i-th row is vec(Vi ⊗ Wi ), ∀i ∈ [k]. We let the “flattening” be the operation that obtains A1 by A. Given A1 = U · B, we can obtain tensor A by unflattening/retensorizing A1 . We let “retensorization” be the operation that obtains A from A1 . Similarly, let A2 ∈ Rn2 ×n1 n3 denote a matrix obtained by flattening tensor A along the 2nd dimension, so A2 = V · C, where C = W > U > ∈ Rk×n1 n3 denotes the matrix for which the i-th row is vec(Wi ⊗ Ui ), ∀i ∈ [k]. Let A3 ∈ Rn3 ×n1 n2 denote a matrix obtained by flattening tensor A along the 3rd dimension. Then, A3 = W · D, where D = U > V > ∈ Rk×n1 n2 denotes the matrix for which the i-th row is vec(Ui ⊗ Vi ), ∀i ∈ [k]. Definition A.6 ( (·, ·, ·) operator for tensors and matrices). Given tensor A ∈ Rn1 ×n2 ×n3 and three matrices B1 ∈ Rn1 ×d1 , B2 ∈ Rn2 ×d2 , B3 ∈ Rn3 ×d3 , we define tensors A(B1 , I, I) ∈ Rd1 ×n2 ×n3 , A(I, B2 , I) ∈ Rn1 ×d2 ×n3 , A(I, I, B3 ) ∈ Rn1 ×n2 ×d3 , A(B1 , B2 , I) ∈ Rd1 ×d2 ×n3 , A(B1 , B2 , B3 ) ∈ Rd1 ×d2 ×d3 as follows, n1 X A(B1 , I, I)i,j,l = A(I, B2 , I)i,j,l = A(I, I, B3 )i,j,l = A(B1 , B2 , I)i,j,l = A(B1 , B2 , B3 )i,j,l = i0 =1 n2 X Ai0 ,j,l (B1 )i0 ,i , ∀(i, j, l) ∈ [d1 ] × [n2 ] × [n3 ] Ai,j 0 ,l (B2 )j 0 ,j , ∀(i, j, l) ∈ [n1 ] × [d2 ] × [n3 ] j 0 =1 n3 X ∀(i, j, l) ∈ [n1 ] × [n2 ] × [d3 ] Ai,j,l0 (B3 )l0 ,l , l0 =1 n1 X n2 X ∀(i, j, l) ∈ [d1 ] × [d2 ] × [n3 ] Ai0 ,j 0 ,l (B1 )i0 ,i (B2 )j 0 ,j , i0 =1 j 0 =1 n1 X n2 X n3 X Ai0 ,j 0 ,l0 (B1 )i0 ,i (B2 )j 0 ,j (B3 )l0 ,l , i0 =1 j 0 =1 l0 =1 ∀(i, j, l) ∈ [d1 ] × [d2 ] × [d3 ] Note that B1> A = A(B1 , I, I), AB3 = A(I, I, B3 ) and B1> AB3 = A(B1 , I, B3 ). In our paper, if ∀i ∈ [3], Bi is either a rectangular matrix or a symmetric matrix, then we sometimes use A(B1 , B2 , B3 ) to denote A(B1> , B2> , B3> ) for simplicity. Similar to the (·, ·, ·) operator on 3rd order tensors, we can define the (·, ·, · · · , ·) operator on higher order tensors. For the matrix case, min 0 kA − A0 k2F always exists. However, this is not true for tenrank −k A sors [DSL08]. For convenience, we redefine the notation of OPT and min. Definition A.7. Given tensor A ∈ Rn1 ×n2 ×n3 , k > 0, if define OPT = inf rank −k A0 kA − A0 k2F does not exist, then we kA − A0 k2F + γ for sufficiently small γ > 0, which can be an arbitrarily small positive function of n. We let be a rank −k tensor Ak ∈ B min rank −k A0 min kA−A0 k2F be the value of OPT, and we let arg min kA−A0 k2F rank −k A0 Rn1 ×n2 ×n3 which rank −k A0 satisfies kA − Ak k2F = OPT . Preliminaries Section B.1 provides the definitions for Subspace Embeddings and Approximate Matrix Product. We introduce the definition for Tensor-CURT decomposition in Section B.2. Section B.3 presents 19 Tensor Row Column Tube Figure 3: A 3rd order tensor contains n2 columns, n2 rows, and n2 tubes. a tool which we call a “polynomial system verifier”. Section B.4 introduces a tool which is able to determine the minimum nonzero value of the absolute value of a polynomial evaluated on a set, provided the polynomial is never equal to 0 on that set. Section B.5 shows how to relax an `p problem to an `2 problem. We provide definitions for CountSketch and Gaussian transforms in Section B.6. We present Cauchy and p-stable transforms in Section B.7. We introduce leverage scores and Lewis weights in Section B.8 and Section B.9. Finally, we explain an extension of CountSketch, which is called TensorSketch in Section B.10. B.1 Subspace Embeddings and Approximate Matrix Product Definition B.1 (Subspace Embedding). A (1 ± ) `2 -subspace embedding for the column space of an n × d matrix A is a matrix S for which for all x ∈ Rd , kSAxk22 = (1 ± )kAxk22 . Definition B.2 (Approximate Matrix Product). Let 0 <  < 1 be a given approximation parameter. Given matrices A and B, where A and B each have n rows, the goal is to output a matrix C so that kA> B − CkF ≤ kAkF kBkF . Typically C has the form A> S > SB, for a random matrix S with a small number of rows. See, e.g., Lemma 32 of [CW13] for a number of example matrices S with O(−2 ) rows for which this property holds. B.2 Tensor CURT decomposition We first review matrix CUR decompositions: Definition B.3 (Matrix CUR, exact). Given a matrix A ∈ Rn×d , we choose C ∈ Rn×c to be a subset of columns of A and R ∈ Rr×n to be a subset of rows of A. If there exists a matrix U ∈ Rc×r such that A can be written as, CU R = A, then we say C, U, R is matrix A’s CUR decomposition. 20 . Tensor A column-row face . Tensor A column-tube face . Tensor A row-tube face Figure 4: A third order tensor has three types of faces: the column-row faces, the column-tube faces, and the row-tube faces 21 Definition B.4 (Matrix CUR, approximate). Given a matrix A ∈ Rn×d , a parameter k ≥ 1, an approximation ratio α > 1, and a norm kkξ , we choose C ∈ Rn×c to be a subset of columns of A and R ∈ Rr×n to be a subset of rows of A. Then if there exists a matrix U ∈ Rc×r such that, kCU R − Akξ ≤ α min rank −k Ak kAk − Akξ , where kkξ can be operator norm, Frobenius norm or Entry-wise `1 norm, we say that C, U, R is matrix A’s approximate CUR decomposition, and sometimes just refer to this as a CUR decomposition. Definition B.5 ([Bou11]). Given matrix A ∈ Rm×n , integer k, and matrix C ∈ Rm×r with r > k, we define the matrix ΠξC,k (A) ∈ Rm×n to be the best approximation to A (under the ξ-norm) within b ξ, the column space of C of rank at most k; so, Πξ (A) ∈ Rm×n minimizes the residual kA − Ak C,k b ∈ Rm×n in the column space of C of rank at most k. over all A We define the following notion of tensor-CURT decomposition. Definition B.6 (Tensor CURT, exact). Given a tensor A ∈ Rn1 ×n2 ×n3 , we choose three sets of pair of coordinates S1 ⊆ [n2 ] × [n3 ], S2 ⊆ [n1 ] × [n3 ], S3 ⊆ [n1 ] × [n2 ]. We define c = |S1 |, r = |S2 | and t = |S3 |. Let C ∈ Rn1 ×c denote a subset of columns of A, R ∈ Rn2 ×r denote a subset of rows of A, and T ∈ Rn3 ×t denote a subset of tubes of A. If there exists a tensor U ∈ Rc×r×t such that A can be written as (((U · T > )> · R> )> · C > )> = A, or equivalently, U (C, R, T ) = A, or equivalently, ∀(i, j, l) ∈ [n1 ] × [n2 ] × [n3 ], Ai,j,l = c r t X X X Uu1 ,u2 ,u3 Ci,u1 Rj,u2 Tl,u3 , u1 =1 u2 =1 u3 =1 then we say C, U, R, T is tensor A’s CURT decomposition. Definition B.7 (Tensor CURT, approximate). Given a tensor A ∈ Rn1 ×n2 ×n3 , for some k ≥ 1, for some approximation α > 1, for some norm kkξ , we choose three sets of pair of coordinates S1 ⊆ [n2 ] × [n3 ], S2 ⊆ [n1 ] × [n3 ], S3 ⊆ [n1 ] × [n2 ]. We define c = |S1 |, r = |S2 | and t = |S3 |. Let C ∈ Rn1 ×c denote a subset of columns of A, R ∈ Rn2 ×r denote a subset of rows of A, and T ∈ Rn3 ×t denote a subset of tubes of A. If there exists a tensor U ∈ Rc×r×t such that kU (C, R, T ) − Akξ ≤ α min rank −k Ak kAk − Akξ , where kkξ is operator norm, Frobenius norm or Entry-wise `1 norm, then we refer to C, U, R, T as an approximate CUR decomposition of A, and sometimes just refer to this as a CURT decomposition of A. Recently, [TM17] studied a very different face-based tensor-CUR decomposition, which selects faces from tensors rather than columns. To achieve their results, [TM17] need to make several incoherence assumptions on the original tensor. Their sample complexity depends on log n, and they only sample two of the three dimensions. We will provide more general face-based tensor CURT decompositions. 22 . Selecting a subset of columns Tensor . Selecting a subset of rows Tensor . Tensor Selecting a subset of tubes Figure 5: Column subset selection, row subset selection and tube subset selection. Definition B.8 (Tensor (face-based) CURT, exact). Given a tensor A ∈ Rn1 ×n2 ×n3 , we choose three sets of coordinates S1 ⊆ [n1 ], S2 ⊆ [n2 ], S3 ⊆ [n3 ]. We define c = |S1 |, r = |S2 | and t = |S3 |. Let C ∈ Rc×n2 ×n3 denote a subset of row-tube faces of A, R ∈ Rn1 ×r×n3 denote a subset of columntube faces of A, and T ∈ Rn1 ×n2 ×t denote a subset of column-row faces of A. Let C2 ∈ Rn2 ×cn3 23 denote the matrix obtained by flattening the tensor C along the second dimension. Let R3 ∈ Rn3 ×rn1 denote the matrix obtained by flattening the tensor R along the third dimension. Let T1 ∈ Rn1 ×tn2 denote the matrix obtained by flattening the tensor T along the first dimension. If there exists a tensor U ∈ Rtn2 ×cn3 ×rn1 such that A can be written as tn2 X cn3 X rn1 X i=1 j=1 l=1 Ui,j,l (T1 )l ⊗ (C2 )i ⊗ (R3 )j = A, U (T1 , C2 , R3 ) = A, or equivalently, ∀(i0 , j 0 , l0 ) ∈ [n1 ] × [n2 ] × [n3 ], Ai,j,l = tn1 X cn3 X rn2 X Ui,j,l (T1 )i0 ,i (C2 )j 0 ,j (R3 )l0 ,l , i=1 j=1 l=1 then we say C, U, R, T is tensor A’s (face-based) CURT decomposition. Definition B.9 (Tensor (face-based) CURT, approximate). Given a tensor A ∈ Rn1 ×n2 ×n3 , for some k ≥ 1, for some approximation α > 1, for some norm kkξ ,we choose three sets of coordinates S1 ⊆ [n1 ], S2 ⊆ [n2 ], S3 ⊆ [n3 ]. We define c = |S1 |, r = |S2 | and t = |S3 |. Let C ∈ Rc×n2 ×n3 denote a subset of row-tube faces of A, R ∈ Rn1 ×r×n3 denote a subset of column-tube faces of A, and T ∈ Rn1 ×n2 ×t denote a subset of column-row faces of A. Let C2 ∈ Rn2 ×cn3 denote the matrix obtained by flattening the tensor C along the second dimension. Let R3 ∈ Rn3 ×rn1 denote the matrix obtained by flattening the tensor R along the third dimension. Let T1 ∈ Rn1 ×tn2 denote the matrix obtained by flattening the tensor T along the first dimension. If there exists a tensor U ∈ Rtn2 ×cn3 ×rn1 such that kU (T1 , C2 , R3 ) − Akξ ≤ α min rank −k Ak kAk − Akξ , where kkξ is operator norm, Frobenius norm or Entry-wise `1 norm, then we refer to C, U, R, T as an approximate CUR decomposition of A, and sometimes just refer to this as a (face-based) CURT decomposition of A. B.3 Polynomial system verifier We use the polynomial system verifiers independently developed by Renegar [Ren92a, Ren92b] and Basu et al. [BPR96]. Theorem B.10 (Decision Problem [Ren92a, Ren92b, BPR96]). Given a real polynomial system P (x1 , x2 , · · · , xv ) having v variables and m polynomial constraints fi (x1 , x2 , · · · , xv )∆i 0, ∀i ∈ [m], where ∆i is any of the “standard relations”: {>, ≥, =, 6=, ≤, <}, let d denote the maximum degree of all the polynomial constraints and let H denote the maximum bitsize of the coefficients of all the polynomial constraints. Then in (md)O(v) poly(H), time one can determine if there exists a solution to the polynomial system P . Recently, this technique has been used to solve a number of low-rank approximation and matrix factorization problems [AGKM12, Moi13, CW15a, BDL16, RSW16, SWZ17]. 24 A subset of rows R C T U Tensor A subset of columns A subset of tubes Figure 6: An example tensor CURT decomposition. B.4 Lower bound on the cost of a polynomial system An important result we use is the following lower bound on the minimum value attained by a polynomial restricted to a compact connected component of a basic closed semi-algebraic subset of Rv . Theorem B.11 ([JPT13]). Let T = {x ∈ Rv |f1 (x) ≥ 0, · · · , f` (x) ≥ 0, f`+1 (x) = 0, · · · , fm (x) = 0} be defined by polynomials f1 , · · · , fm ∈ Z[x1 , · · · , xv ] with n ≥ 2, degrees bounded by an even integer d, and coefficients of absolute value at most H, and let C be a compact connected (in the topological sense) component of T . Let g ∈ Z[x1 , · · · , xv ] be a polynomial of degree at most d and coefficients of absolute value bounded by H. Then, the minimum value that g takes over C satisfies that if it is not zero, then its absolute value is greater than or equal to v dv e = max{H, 2v + 2m}. where H e v )−v2 (24−v/2 Hd , While the above theorem involves notions from topology, we shall apply it in an elementary way. Namely, in our setting T will be bounded and so every connected component, which is by definition closed, will also be bounded and therefore compact. As the connected components partition T the theorem will just be applied to give a global minimum value of g on T provided that it is non-zero. B.5 Frobenius norm and `2 relaxation Theorem B.12 (Generalized rank-constrained matrix approximations, Theorem 2 in [FT07]). Given matrices A ∈ Rn×d , B ∈ Rn×p , and C ∈ Rq×d , let the SVD of B be B = UB ΣB VB> and the SVD of C be C = UC ΣC VC> . Then, B † (UB UB> AVC CC> )k C † = arg min rank −k X∈Rp×q kA − BXCkF , where (UB UB> AVC VC> )k ∈ Rp×q is of rank at most k and denotes the best rank-k approximation to UB UB> AVC VC> ∈ Rp×d in Frobenius norm. 25 Claim B.13 (`2 relaxation of `p -regression). Let p ∈ [1, 2). For any A ∈ Rn×d and b ∈ Rn , define x∗ = arg minkAx − bkp and x0 = arg minkAx − bk2 . Then, x∈Rd x∈Rd kAx∗ − bkp ≤ kAx0 − bkp ≤ n1/p−1/2 · kAx∗ − bkp . Claim B.14 ((Matrix) Frobenius norm relaxation of `p -low rank approximation). Let p ∈ [1, 2) and for any matrix A ∈ Rn×d , define A∗ = arg min kB − Akp and A0 = arg min kB − AkF . rank −k B∈Rn×d rank −k B∈Rn×d Then kA∗ − Akp ≤ kA0 − Akp ≤ (nd)1/p−1/2 kA∗ − Akp . Claim B.15 ((Tensor) Frobenius norm relaxation of `p -low rank approximation). Let p ∈ [1, 2) and for any matrix A ∈ Rn1 ×n2 ×n3 , define A∗ = arg min rank −k B∈Rn1 ×n2 ×n3 kB − Akp and A0 = arg min rank −k B∈Rn1 ×n2 ×n3 kB − AkF . Then kA∗ − Akp ≤ kA0 − Akp ≤ (n1 n2 n3 )1/p−1/2 kA∗ − Akp . B.6 CountSketch and Gaussian transforms Definition B.16 (Sparse embedding matrix or CountSketch transform). A CountSketch transform is defined to be Π = σ · ΦD ∈ Rm×n . Here, σ is a scalar, D is an n × n random diagonal matrix with each diagonal entry independently chosen to be +1 or −1 with equal probability, and Φ ∈ {0, 1}m×n is an m × n binary matrix with Φh(i),i = 1 and all remaining entries 0, where h : [n] → [m] is a random map such that for each i ∈ [n], h(i) = j with probability 1/m for each j ∈ [m]. For any matrix A ∈ Rn×d , ΠA can be computed in O(nnz(A)) time. For any tensor A ∈ Rn×d1 ×d2 , ΠA can be computed in O(nnz(A)) time. Let Π1 , Π2 , Π3 denote three CountSktech transforms. For any tensor A ∈ Rn1 ×n2 ×n3 , A(Π1 , Π2 , Π3 ) can be computed in O(nnz(A)) time. If the above scalar σ is not specified in the context, we assume the scalar σ to be 1. Definition B.17 (Gaussian matrix or Gaussian transform). Let S = σ · G ∈ Rm×n where σ is a scalar, and each entry of G ∈ Rm×n is chosen independently from the standard Gaussian distribution. For any matrix A ∈ Rn×d , SA can be computed in O(m · nnz(A)) time. For any tensor A ∈ Rn×d1 ×d2 , SA can be computed in O(m · nnz(A)) time. √ If the above scalar σ is not specified in the context, we assume the scalar σ to be 1/ m. In most places, we can combine CountSketch and Gaussian transforms to achieve the following: Definition B.18 (CountSketch + Gaussian transform). Let S 0 = SΠ, where Π ∈ Rt×n is the CountSketch transform (defined in Definition B.16) and S ∈ Rm×t is the Gaussian transform (defined in Definition B.17). For any matrix A ∈ Rn×d , S 0 A can be computed in O(nnz(A) + dtmω−2 ) time, where ω is the matrix multiplication exponent. 26 Lemma B.19 (Affine Embedding - Theorem 39 in [CW13]). Given matrices A ∈ Rn×r , B ∈ Rn×d , and rank(A) = k, let m = poly(k/), S ∈ Rm×n be a sparse embedding matrix (Definition B.16) with scalar σ = 1. Then with probability at least 0.999, ∀X ∈ Rr×d , we have (1 − ) · kAX − Bk2F ≤ kS(AX − B)k2F ≤ (1 + )kAX − Bk2F . Lemma B.20 (see, e.g., Lemma 10 in version 1 of [BWZ16]8 ). Let m = Ω(k/), S = √1m · G, where G ∈ Rm×n is a random matrix where each entry is an i.i.d Gaussian N (0, 1). Then with probability at least 0.998, S satisfies (1 ±p 1/8) Subspace Embedding (Definition B.1) for any fixed matrix C ∈ Rn×k , and it also satisfies O( /k) Approximate Matrix Product (Definition B.2) for any fixed matrix A and B which has the same number of rows. Lemma B.21 (see, e.g., Lemma 11 in version 1 of [BWZ16]8 ). Let m = Ω(k 2 + k/), Π ∈ Rm×n , where Π is a sparse embedding matrix (Definition B.16) with scalar σ = 1, then with probability at least 0.998, S satisfies (1±1/8) Subspace Embedding (Definition B.1) for any fixed matrix C ∈ Rn×k , p and it also satisfies O( /k) Approximate Matrix Product (Definition B.2) for any fixed matrix A and B which has the same number of rows. Lemma B.22 (see, e.g., Lemma 12 in version 1 of [BWZ16]8 ). Let m2 = Ω(k 2 + k/), Π ∈ Rm2 ×n , where Π is a sparse embedding matrix (Definition B.16) with scalar σ = 1. Let m1 = Ω(k/), 1 S = √m · G, where G ∈ Rm1 ×m2 is a random matrix where each entry is an i.i.d Gaussian 1 N (0, 1). Let S 0 = SΠ. Then with probability at least 0.99, S 0 is a (1 ± p1/3) Subspace Embedding (Definition B.1) for any fixed matrix C ∈ Rn×k , and it also satisfies O( /k) Approximate Matrix Product (Definition B.2) for any fixed matrix A and B which have the same number of rows. Theorem B.23 (Theorem 36 in [CW13]). Given A ∈ Rn×k , Bp ∈ Rn×d , suppose S ∈ Rm×n is such that S is a (1 ± √12 ) Subspace Embedding for A, and satisfies O( /k) Approximate Matrix Product for matrices A and C where C with n rows, where C depends on A and B. If b = arg min kSAX − SBk2 , X F X∈Rk×d then b − Bk2 ≤ (1 + ) min kAX − Bk2 . kAX F F X∈Rk×d B.7 Cauchy and p-stable transforms Definition B.24 (Dense Cauchy transform). Let S = σ · C ∈ Rm×n where σ is a scalar, and each entry of C ∈ Rm×n is chosen independently from the standard Cauchy distribution. For any matrix A ∈ Rn×d , SA can be computed in O(m · nnz(A)) time. Definition B.25 (Sparse Cauchy transform). Let Π = σ · SC ∈ Rm×n , where σ is a scalar, S ∈ Rm×n has each column chosen independently and uniformly from the m standard basis vectors of Rm , and C ∈ Rn×n is a diagonal matrix with diagonals chosen independently from the standard Cauchy distribution. For any matrix A ∈ Rn×d , ΠA can be computed in O(nnz(A)) time. For any tensor A ∈ Rn×d1 ×d2 , ΠA can be computed in O(nnz(A)) time. Let Π1 ∈ Rm1 ×n1 , Π2 ∈ Rm2 ×n2 , Π3 ∈ Rm3 ×n3 denote three sparse Cauchy transforms. For any tensor A ∈ Rn1 ×n2 ×n3 , A(Π1 , Π2 , Π3 ) ∈ Rm1 ×m2 ×m3 can be computed in O(nnz(A)) time. 8 https://arxiv.org/pdf/1504.06729v1.pdf 27 Definition B.26 (Dense p-stable transform). Let p ∈ (1, 2). Let S = σ · C ∈ Rm×n , where σ is a scalar, and each entry of C ∈ Rm×n is chosen independently from the standard p-stable distribution. For any matrix A ∈ Rn×d , SA can be computed in O(m nnz(A)) time. Definition B.27 (Sparse p-stable transform). Let p ∈ (1, 2). Let Π = σ · SC ∈ Rm×n , where σ is a scalar, S ∈ Rm×n has each column chosen independently and uniformly from the m standard basis vectors of Rm , and C ∈ Rn×n is a diagonal matrix with diagonals chosen independently from the standard p-stable distribution. For any matrix A ∈ Rn×d , ΠA can be computed in O(nnz(A)) time. For any tensor A ∈ Rn×d1 ×d2 , ΠA can be computed in O(nnz(A)) time. Let Π1 ∈ Rm1 ×n1 , Π2 ∈ Rm2 ×n2 , Π3 ∈ Rm3 ×n3 denote three sparse p-stable transforms. For any tensor A ∈ Rn1 ×n2 ×n3 , A(Π1 , Π2 , Π3 ) ∈ Rm1 ×m2 ×m3 can be computed in O(nnz(A)) time. B.8 Leverage scores Definition B.28 (Leverage scores). Let U ∈ Rn×k have orthonormal columns, and let pi = u2i /k, 2 where u2i = ke> i U k2 is the i-th leverage score of U . Definition B.29 (Leverage score sampling). Given A ∈ Rn×d with rank k, let U ∈ Rn×k be an orthonormal basis of the column space of A, and for each i let pi be the squared row norm of the i-th row of U , i.e., the i-th leverage score. Let k · pi denote the i-th leverage score of U scaled by k. Let β > 0 be a constant and q = (q1 , · · · , qn ) denote a distribution such that, for each i ∈ [n], qi ≥ βpi . Let s be a parameter. Construct an n × s sampling matrix B and an s × s rescaling matrix D as follows. Initially, B = 0n×s and D = 0s×s . For each column j of B, D, independently, and with √ replacement, pick a row index i ∈ [n] with probability qi , and set Bi,j = 1 and Dj,j = 1/ qi s. We denote this procedure Leverage score sampling according to the matrix A. B.9 Lewis weights We follow the exposition of Lewis weights from [CP15]. Definition B.30. For a matrix A, let ai denote the ith row of A, where ai (= (Ai )> ) is a column vector. The statistical leverage score of a row ai is def > −1 > −1/2 τi (A) = a> ai k22 . i (A A) ai = k(A A) For a matrix A and norm p, the `p Lewis weights w are the unique weights such that for each row i we have wi = τi (W 1/2−1/p A). or equivalently, 2/p > 1−2/p a> A)−1 ai = wi . i (A W Lemma B.31 (Lemma 2.4 of [CP15] and Lemma 7 of [CLM+ 15]). Given a matrix A ∈ Rn×d , n ≥ d, for any constant C > 0, 4 > p ≥ 1, there is an algorithm which can compute C-approximate `p Lewis weights for every row i of A in O((nnz(A) + dω log d) log n) time, where ω < 2.373 is the matrix multiplication exponent[Str69, CW87, Wil12]. 28 n×d (n ≥ d) with ` (4 > p ≥ 1) Lewis Lemma B.32 (Theorem 7.1 of [CP15]). Given matrix p P A∈R weights w, for any set of sampling probabilities pi , i pi = N , pi ≥ f (d, p)wi , 1/p if S ∈ RN ×n has each row chosen independently as the ith standard basis vector, multiplied by 1/pi , with probability pi /N . Then, overall with probability at least 0.999, 1 ∀x ∈ Rd , kAxkpp ≤ kSAxkpp ≤ 2kAxkpp . 2 Furthermore, if p = 1, N = O(d log d). If 1 < p < 2, N = O(d log d log log d). If 2 ≤ p < 4, N = O(dp/2 log d). Lemma B.33. Given matrix A ∈ Rn×d (n ≥ d), there is an algorithm to compute a diagonal matrix D = SS1 with N nonzero entries in O(n poly(d)) time such that, with probability at least 0.999, for all x ∈ Rd 1 kDAxkpp ≤ kAxkpp ≤ 10kDAxkpp , 10 where S, S1 are two sampling/rescaling matrices. Furthermore, if p = 1, then N = O(d log d). If 1 < p < 2, then N = O(d log d log log d). If 2 ≤ p < 4, then N = O(dp/2 log d). Given a matrix A ∈ Rn×d (n ≥ d), by Lemma B.32 and Lemma B.31, we can compute a e sampling/rescaling matrix S in O((nnz(A) + dω log d) log n) time with O(d) nonzero entries such that 1 ∀x ∈ Rd , kAxkpp ≤ kSAxkpp ≤ 2kAxkpp . 2 Sometimes, poly(d) is much smaller than log n. In this case, we are also able to compute such a sampling/rescaling matrix S in n poly(d) time in an alternative way. To do so, we run one of the input sparsity `p embedding algorithms (see e.g., [MM13]) to compute a well conditioned basis U of the column span of A in n poly(d/) time. By sampling according to the well conditioned basis (see e.g. [Cla05, DDH+ 09, Woo14]), we can compute a sampling/rescaling matrix S1 such that (1 − )kAxkpp ≤ kS1 Axkpp ≤ (1 + )kAxkpp where  ∈ (0, 1) is an arbitrary constant. Notice that S1 has poly(d/) nonzero entries, and thus S1 A has size poly(d/). Next, we apply Lewis weight sampling according to S1 A, and we obtain a sampling/rescaling matrix S for which 1 1 ∀x ∈ Rd , (1 − )kS1 Axkpp ≤ kSS1 Axkpp ≤ (1 + )kS1 Axkpp . 3 3 This implies that 1 ∀x ∈ Rd , kAxkpp ≤ kSS1 Axkpp ≤ 2kAxkpp . 2 Note that SS1 is still a sampling/rescaling matrix according to A, and the number of non-zero e entries is O(d). The total running time is thus n poly(d/), as desired. 29 B.10 TensorSketch Q Let φ(v1 , v2 , · · · , vq ) denote the function that maps q vectors(ui ∈ Rni ) to the qi=1 ni -dimensional vector formed by v1 ⊗ v2 ⊗ · · · ⊗ uq . We first give the definition of TensorSketch. Similar definitions can be found in previous work [Pag13, PP13, ANW14, WTSA15]. Definition B.34 (TensorSketch [Pag13]). Given q points v1 , v2 , · · · , vq where for each i ∈ [q], vi ∈ Rni , let m be the target dimension. The TensorSketch transform is specified using q 3-wise independent hash functions, h1 , · · · , hq , where for each i ∈ [q], hi : [ni ] → [m], as well as q 4-wise independent sign functions s1 , · · · , sq , where for each i ∈ [q], si : [ni ] → {−1, +1}. TensorSketch applied to v1 , · · · , vq is then CountSketch applied to φ(v1 , · · · , vq ) with hash Q Q function H : [ qi=1 ni ] → [m] and sign functions S : [ qi=1 ni ] → {−1, +1} defined as follows: H(i1 , · · · , iq ) = h1 (i1 ) + h2 (s2 ) + · · · + hq (iq ) (mod m), and S(i1 , · · · , iq ) = s1 (i1 ) · s2 (i2 ) · · · · · sq (iq ). Using the Fast Fourier Transform, TensorSketch(v1 , · · · , vq ) can be computed in O( m log m)) time. Pq i=1 (nnz(vi )+ Note that Theorem 1 in [ANW14] only defines φ(v) = v ⊗ v ⊗ · · · ⊗ v. Here we state a stronger version of Theorem 1 than in [ANW14], though the proofs are identical; a formal derivation can be found in [DW17]. Q Theorem B.35 (Generalized version of Theorem 1 in [ANW14]). Let S be the ( qi=1 ni )×m matrix such that TensorSketch (v1 , v2 , · · · , vq ) is φ(v1 , v2 , · · · , vq )S for a randomly selected TensorSketch. The matrix S satisfies the following two properties. Q Property I (Approximate Matrix Product). Let A and B be matrices with qi=1 ni rows. For m ≥ (2 + 3q )/(2 δ), we have Pr[kA> SS > B − A> Bk2F ≤ 2 kAk2F kBk2F ] ≥ 1 − δ. Property II (Subspace Embedding). Consider a fixed k-dimensional subspace V . If m ≥ k 2 (2 + then with probability at least 1 − δ, kxSk2 = (1 ± )kxk2 simultaneously for all x ∈ V . 3q )/(2 δ), 30 C Frobenius Norm for Arbitrary Tensors Section C.1 presents a Frobenius norm tensor low-rank approximation algorithm with (1 + )approximation ratio. Section C.2 introduces a tool which is able to reduce the size of the objective function from n3 to poly(k, 1/). Section C.3 introduces a new problem called tensor multiple regression. Section C.4 presents several bicriteria algorithms. Section C.5 introduces a powerful tool which we call generalized matrix row subset selection. Section C.6 presents an algorithm that is able to select a batch of columns, rows and tubes from a given tensor, and those samples are also able to form a low-rank solution. Section C.7 presents several useful tools for tensor problems, and also two (1 + )-approximation CURT decomposition algorithms: one has the optimal sample complexity, and the other has the optimal running time. Section C.9 shows how to solve the problem if the size of the objective function is small. Section C.10 extends several techniques from 3rd order tensors to general q-th order tensors, for any q ≥ 3. Finally, in Section C.11 we also provide a new matrix CUR decomposition algorithm, which is faster than [BW14]. For simplicity of presentation, we assume Ak exists in theorems (e.g., Theorem C.1) which concern outputting a rank-k solution, as well as the theorems (e.g., Theorem C.7, Theorem C.8, Theorem C.13) which concern outputting a bicriteria solution (the output rank is larger than k). For each of the bicriteria theorems, we can obtain a more detailed version when Ak does not exist, like Theorem 1.1 in Section 1 (by instead considering a tensor sufficiently close to Ak in objective function value). Note that the theorems for column, row, tube subset selection Theorem C.20 and Theorem C.21 also belong to this first category. In the second category, for each of the rank-k theorems we can obtain a more detailed version handling all cases, even when Ak does not exist, like Theorem 1.2 in Section 1 (by instead considering a tensor sufficiently close to Ak in objective function value). Several other tensor results or tools (e.g., Theorem C.4, Lemma C.3, Theorem C.40, Theorem C.41, Theorem C.14, Theorem C.46) that we build in this section do not belong to the above two categories. It means those results do not depend on whether Ak exists or not and whether OPT is zero or not. C.1 (1 + )-approximate low-rank approximation Algorithm 2 Frobenius Norm Low-rank Approximation 1: 2: 3: 4: 5: 6: 7: 8: 9: procedure FLowRankApprox(A, n, k, ) . Theorem C.1 s1 ← s2 ← s3 ← O(k/). 2 2 2 Choose sketching matrices S1 ∈ Rn ×s1 , S2 ∈ Rn ×s2 , S3 ∈ Rn ×s3 . . Definition B.18 Compute Ai Si , ∀i ∈ [3]. Y1 , Y2 , Y3 , C ←FInputSparsityReduction(A, A1 S1 , A2 S2 , A3 S3 , n, s1 , s2 , s3 , k, ). . Algorithm 3 Create variables for Xi ∈ Rsi ×k , ∀i ∈ [3]. Run polynomial system verifier for k(Y1 X1 ) ⊗ (Y2 X2 ) ⊗ (Y3 X3 ) − Ck2F . return A1 S1 X1 , A2 S2 X2 , and A3 S3 X3 . end procedure Theorem C.1. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1,  ∈ (0, 1), there exists 2 an algorithm which takes O(nnz(A)) + n poly(k, 1/) + 2O(k /) time and outputs three matrices 31 U ∈ Rn×k , V ∈ Rn×k , W ∈ Rn×k such that k X i=1 2 Ui ⊗ Vi ⊗ Wi − A F ≤ (1 + ) min rank −k Ak kAk − Ak2F holds with probability 9/10. Proof. Given any tensor A ∈ Rn1 ×n2 ×n3 , we define three matrices A1 ∈ Rn1 ×n2 n3 , A2 ∈ Rn2 ×n3 n1 , A3 ∈ Rn3 ×n1 n2 such that, for any i ∈ [n1 ], j ∈ [n2 ], l ∈ [n3 ], Ai,j,l = (A1 )i,(j−1)·n3 +l = (A2 )j,(l−1)·n1 +i = (A3 )l,(i−1)·n2 +j . We define OPT as OPT = min rank −k A0 kA0 − Ak2F . Suppose the optimal Ak = U ∗ ⊗ V ∗ ⊗ W ∗ . We fix V ∗ ∈ Rn×k and W ∗ ∈ Rn×k . We use , Vk∗ to denote the columns of V ∗ and W1∗ , W2∗ , · · · , Wk∗ to denote the columns of W ∗ . We consider the following optimization problem, V1∗ , V2∗ , · · · min U1 ,··· ,Uk ∈Rn k X i=1 2 Ui ⊗ Vi∗ ⊗ Wi∗ −A , F which is equivalent to min U1 ,··· ,Uk ∈Rn  U1 U2 · · ·   ∗ V1 ⊗ W1∗  V2∗ ⊗ W2∗   Uk   ···  − A Vk∗ ⊗ Wk∗ 2 . F   vec(V1∗ ⊗ W1∗ ) vec(V2∗ ⊗ W2∗ )   ∈ Rk×n2 and matrix U to denote U1 U2 · · · We use matrix Z1 to denote    ··· vec(Vk∗ ⊗ Wk∗ ) Then we can obtain the following equivalent objective function,  Uk . min kU Z1 − A1 k2F . U ∈Rn×k Notice that minU ∈Rn×k kU Z1 − A1 k2F = OPT, since Ak = U ∗ Z1 . 2 Let S1> ∈ Rs1 ×n be a sketching matrix defined in Definition B.18, where s1 = O(k/). We obtain the following optimization problem, min kU Z1 S1 − A1 S1 k2F . U ∈Rn×k b ∈ Rn×k denote the optimal solution to the above optimization problem. Let U A1 S1 (Z1 S1 )† . By Lemma B.22 and Theorem B.23, we have b Z1 − A1 k2 ≤ (1 + ) min kU Z1 − A1 k2 = (1 + ) OPT, kU F F U ∈Rn×k 32 b = Then U which implies k X i=1 2 bi ⊗ Vi∗ ⊗ Wi∗ − A U F ≤ (1 + ) OPT . b1 , · · · , U bk , we use the given matrix A1 , and we create s1 × k variables for matrix To write down U † (Z1 S1 ) . b ∈ Rn×k and W ∗ ∈ Rn×k , and we convert tensor A into matrix A2 . As our second step,we fix U  b1 ⊗ W ∗ ) vec(U 1  b2 ⊗ W ∗ ) vec(U 2  Let matrix Z2 denote  . We consider the following objective function, ···   ∗ b vec(Uk ⊗ Wk ) min kV Z2 − A2 k2F , V ∈Rn×k for which the optimal cost is at most (1 + ) OPT. 2 Let S2> ∈ Rs2 ×n be a sketching matrix defined in Definition B.18, where s2 = O(k/). We sketch S2 on the right of the objective function to obtain the new objective function, min kV Z2 S2 − A2 S2 k2F . V ∈Rn×k Let Vb ∈ Rn×k denote the optimal solution of the above problem. Then Vb = A2 S2 (Z2 S2 )† . By Lemma B.22 and Theorem B.23, we have, kVb Z2 − A2 k2F ≤ (1 + ) min kV Z2 − A2 k2F ≤ (1 + )2 OPT, V ∈Rn×k which implies k X i=1 2 bi ⊗ Vbi ⊗ W ∗ − A U i F ≤ (1 + )2 OPT . 2 To write down Vb1 , · · · , Vbk , we need to use the given matrix A2 ∈ Rn ×n , and we need to create s2 × k variables for matrix (Z2 S2 )† . b ∈ Rn×k and Vb ∈ Rn×k . We convert tensor A ∈ Rn×n×n As our third step, we fix the matrices U   b1 ⊗ Vb1 ) vec(U  b2 ⊗ Vb2 )  2  vec(U  into matrix A3 ∈ Rn ×n . Let matrix Z3 denote  . We consider the following objective ···   b b vec(Uk ⊗ Vk ) function, min kW Z3 − A3 k2F , W ∈Rn×k which has optimal cost at most (1 + )2 OPT. 2 Let S3> ∈ Rs3 ×n be a sketching matrix defined in Definition B.18, where s3 = O(k/). We sketch S3 on the right of the objective function to obtain a new objective function, min kW Z3 S3 − A3 S3 k2F . W ∈Rn×k 33 c ∈ Rn×k denote the optimal solution of the above problem. Then W c = A3 S3 (Z3 S3 )† . By Let W Lemma B.22 and Theorem B.23, we have, c Z3 − A3 k2F ≤ (1 + ) min kW Z3 − A3 k2F ≤ (1 + )3 OPT . kW W ∈Rn×k Thus, we have min X1 ,X2 ,X3 2 k X (A1 S1 X1 )i ⊗ (A2 S2 X2 )i ⊗ (A3 S3 X3 )i − A i=1 F ≤ (1 + )3 OPT . Let V1 = A1 S1 , V2 = A2 S2 , V3 = A3 S3 , we then apply Lemma C.3, and we obtain Vb1 , Vb2 , Vb3 , C. We then apply Theorem C.45. Correctness follows by rescaling  by a constant factor. Running time. Due to Definition B.18, the running time of line 4 is O(nnz(A)) + n poly(k). The running time of line 5 is shown by Lemma C.3, and the running time of line 7 is shown by Theorem C.45. Theorem C.2. Suppose we are given a 3rd order n × n × n tensor A such that each entry can be written using nδ bits, where δ > 0 is a given, value which can be arbitrarily small (e.g., we could have nδ being O(log n)). Define OPT = inf rank −k Ak kAk − Ak2F . For any k ≥ 1, and for any 0 <  < 1, 0 2 define nδ = O(nδ 2O(k /) ). (I) If OPT > 0, and there exists a rank-k Ak = U ∗ ⊗ V ∗ ⊗ W ∗ tensor, δ0 with size n × n × n, such that kAk − Ak2F = OPT, and max(kU ∗ kF , kV ∗ kF , kW ∗ kF ) ≤ 2O(n ) , then 2 there exists an algorithm that takes (nnz(A) + n poly(k, 1/) + 2O(k /) )nδ time in the unit cost RAM model with word size O(log n) bits9 and outputs three n × k matrices U, V, W such that kU ⊗ V ⊗ W − Ak2F ≤ (1 + ) OPT (5) 0 holds with probability 9/10, and each entry of each of U, V, W fits in nδ bits. (II) If OPT > 0, and Ak does not exist, and there exist three n × k matrices U 0 , V 0 , W 0 for which δ0 max(kU 0 kF , kV 0 kF , kW 0 kF ) ≤ 2O(n ) and kU 0 ⊗ V 0 ⊗ W 0 − Ak2F ≤ (1 + /2) OPT, then we can find U, V, W such that (5) holds. (III) If OPT = 0 and Ak does exist, and there exists a solution U ∗ , V ∗ , W ∗ such that each entry 0 can be written by nδ bits, then we can obtain (5). (IV) If OPT = 0, and there exist three n×k matrices U, V, W such that max(kU kF , kV kF , kW kF ) δ0 ≤ 2O(n ) and kU ⊗ V ⊗ W − Ak2F ≤ (1 + ) OPT +2−Ω(n δ0 ) δ0 = 2−Ω(n ) , (6) then we can output U, V, W such that (6) holds. Further if Ak exists, we can output a number Z for which OPT ≤ Z ≤ (1 + ) OPT. For all the cases above, the algorithm runs in the same time as (I) and succeeds with probability at least 9/10. Proof. This follows by the discussion in Section 1, Theorem C.1 and Theorem C.45 in Section C.9. Part (I) Suppose δ > 0 and Ak = U ∗ ⊗ V ∗ ⊗ W ∗ exists and each of kU ∗ kF , kV ∗ kF , and kW ∗ kF is δ0 bounded by 2O(n ) . We assume the computation model is the unit cost RAM model with words of size O(log n) bits, and allow each number of the input tensor A to be written using nδ bits. For the 9 The entries of A are assumed to fit in nδ words. 34 case when OPT is nonzero, using the proof of Theorem C.1 and Theorems C.45, B.11, there exists a δ O(k2 /) lower bound on the cost OPT, which is at least 2−O(n )2 . We can round each entry of matrices 0 ∗ ∗ ∗ δ U , V , W to be an integer expressed using O(n ) bits to obtain U 0 , V 0 , W 0 . Using the triangle inequality and our lower bound on OPT, it follows that U 0 , V 0 , W 0 provide a (1 + )-approximation. Thus, applying Theorem C.1 by fixing U 0 , V 0 , W 0 and using Theorem C.45 at the end, we can 0 output three matrices U, V, W , where each entry can be written using nδ bits, so that we satisfy kU ⊗ V ⊗ W − Ak2F ≤ (1 + ) OPT. For the running time, since each entry of the input is bounded by nδ bits, due to Theorem C.1, we need (nnz(A) + n poly(k/)) · nδ time to reduce the size of the problem to poly(k/) size (with each number represented using O(nδ ) bits). According to Theorem C.45, the running time of using 2 0 2 a polynomial system verifier to get the solution is 2O(k /) nO(δ ) = 2O(k /) nO(δ) time. Thus the 2 total running time is (nnz(A) + n poly(k/))nδ + 2O(k /) · nO(δ) . Part (II) is similar to Part (I). Part (III) is trivial to prove since there exists a solution which can be written down in the bit model, so we obtain a (1 + )-approximation. Part (IV) is also very similar to Part (II). C.2 Input sparsity reduction Algorithm 3 Reducing the Size of the Objective Function from poly(n) to poly(k) 1: 2: 3: 4: 5: 6: 7: procedure FInputSparsityReduction(A, V1 , V2 , V3 , n, b1 , b2 , b3 , k, ) . Lemma C.3 c1 ← c2 ← c3 ← poly(k, 1/). Choose sparse embedding matrices T1 ∈ Rc1 ×n , T2 ∈ Rc2 ×n , T3 ∈ Rc3 ×n . . Definition B.16 Vbi ← Ti Vi ∈ Rci ×bi , ∀i ∈ [3]. C ← A(T1 , T2 , T3 ) ∈ Rc1 ×c2 ×c3 . return Vb1 , Vb2 , Vb3 and C. end procedure Lemma C.3. Let poly(k, 1/) ≥ b1 b2 b3 ≥ k. Given a tensor A ∈ Rn×n×n and three matrices V1 ∈ Rn×b1 , V2 ∈ Rn×b2 , and V3 ∈ Rn×b3 , there exists an algorithm that takes O(nnz(A) + nnz(V1 ) + nnz(V2 ) + nnz(V3 )) = O(nnz(A) + n poly(k/)) time and outputs a tensor C ∈ Rc1 ×c2 ×c3 and three matrices Vb1 ∈ Rc1 ×b1 , Vb2 ∈ Rc2 ×b2 and Vb3 ∈ Rc3 ×b3 with c1 = c2 = c3 = poly(k, 1/), such that with probability at least 0.99, for all α > 0, X1 , X10 ∈ Rb1 ×k , X2 , X20 ∈ Rb2 ×k , X3 , X30 ∈ Rb3 ×k satisfy that, k X i=1 then, k X i=1 2 (Vb1 X10 )i ⊗ (Vb2 X20 )i ⊗ (Vb3 X30 )i − C F ≤α k X i=1 2 (V1 X10 )i ⊗ (V2 X20 )i ⊗ (V3 X30 )i −A F ≤ (1 + )α 2 (Vb1 X1 )i ⊗ (Vb2 X2 )i ⊗ (Vb3 X3 )i − C k X i=1 , F 2 (V1 X1 )i ⊗ (V2 X2 )i ⊗ (V3 X3 )i − A . F Proof. Let X1 ∈ Rb1 ×k , X2 ∈ Rb2 ×k , X3 ∈ Rb3 ×k . First, we define Z1 = ((V2 X2 )> (V3 X3 )> ) ∈ 2 Rk×n . (Note that, for each i ∈ [k], the i-th row of matrix Z1 is vec((V2 X2 )i ⊗ (V3 X3 )i ).) Then, by 35 flattening we have k X (V1 X1 )i ⊗ (V2 X2 )i ⊗ (V3 X3 )i − A i=1 2 F = kV1 X1 · Z1 − A1 k2F . We choose a sparse embedding matrix (Definition B.16) T1 ∈ Rc1 ×n with c1 = poly(k, 1/) rows. Since V1 has b1 ≤ poly(k/) columns, according to Lemma B.19 with probability 0.999, for all 2 X1 ∈ Rb1 ×k , Z ∈ Rk×n , (1 − )kV1 X1 Z − A1 k2F ≤ kT1 V1 X1 Z − T1 A1 k2F ≤ (1 + )kV1 X1 Z − A1 k2F . Therefore, we have kT1 V1 X1 · Z1 − T1 A1 k2F k X = (1 ± ) (V1 X1 )i ⊗ (V2 X2 )i ⊗ (V3 X3 )i − A i=1 2 . F 2 Second, we unflatten matrix T1 A1 ∈ Rc1 ×n to obtain a tensor A0 ∈ Rc1 ×n×n . Then we flatten A0 along the second direction to obtain A2 ∈ Rn×c1 n . We define Z2 = (T1 V1 X1 )> (V3 X3 )> ∈ Rk×c1 n . Then, by flattening, kV2 X2 · Z2 − A2 k2F = kT1 V1 X1 · Z1 − T1 A1 k2F k X = (1 ± ) (V1 X1 )i ⊗ (V2 X2 )i ⊗ (V3 X3 )i − A i=1 2 . F We choose a sparse embedding matrix (Definition B.16) T2 ∈ Rc2 ×n with c2 = poly(k, 1/) rows. Then according to Lemma B.19 with probability 0.999, for all X2 ∈ Rb2 ×k , Z ∈ Rk×c1 n , (1 − )kV2 X2 Z − A2 k2F ≤ kT2 V2 X2 Z − T2 A2 k2F ≤ (1 + )kV2 X2 Z − A2 k2F . Therefore, we have kT2 V2 X2 · Z2 − T2 A2 k2F = (1 ± )kV2 X2 · Z2 − A2 k2F = (1 ± )2 k X (V1 X1 )i ⊗ (V2 X2 )i ⊗ (V3 X3 )i − A i=1 2 . F Third, we unflatten matrix T2 A2 ∈ Rc2 ×c1 n to obtain a tensor A00 (= A(T1 , T2 , I)) ∈ Rc1 ×c2 ×n . Then we flatten tensor A00 along the last direction (the third direction) to obtain matrix A3 ∈ Rn×c1 c2 . We define Z3 = (T1 V1 X1 )> (T2 V2 X2 )> ∈ Rk×c1 c2 . Then, by flattening, we have kV3 X3 · Z3 − A3 k2F = kT2 V2 X2 · Z2 − T2 A2 k2F = (1 ± ) 2 k X (V1 X1 )i ⊗ (V2 X2 )i ⊗ (V3 X3 )i − A i=1 2 . F We choose a sparse embedding matrix (Definition B.16) T3 ∈ Rc3 ×n with c3 = poly(k, 1/) rows. Then according to Lemma B.19 with probability 0.999, for all X3 ∈ Rb3 ×k , Z ∈ Rk×c1 c2 , (1 − )kV3 X3 Z − A3 k2F ≤ kT3 V3 X3 Z − T3 A3 k2F ≤ (1 + )kV3 X3 Z − A3 k2F . 36 Therefore, we have kT3 V3 X3 · Z3 − T3 A3 k2F = (1 ± ) 3 k X (V1 X1 )i ⊗ (V2 X2 )i ⊗ (V3 X3 )i − A i=1 2 . F Note that kT3 V3 X3 · Z3 − T3 A3 k2F k X = (T1 V1 X1 )i ⊗ (T2 V2 X2 )i ⊗ (T3 V3 X3 )i − A(T1 , T2 , T3 ) i=1 and thus, we have ∀X1 ∈ Rb1 ×k , X2 ∈ Rb2 ×k , X3 ∈ Rb3 ×k k X (T1 V1 X1 )i ⊗ (T2 V2 X2 )i ⊗ (T3 V3 X3 )i − A(T1 , T2 , T3 ) i=1 =(1 ± )3 (V1 X1 )i ⊗ (V2 X2 )i ⊗ (V3 X3 )i − A Let Vbi denote Ti Vi , for each i ∈ [3]. Let C ∈ k X (Vb1 X10 )i ⊗ (Vb2 X20 )i ⊗ (Vb3 X30 )i − C i=1 then Rc1 ×c2 ×c3 2 ≤ (1 + )3 α (1 − )3 F F k X i=1 (Vb1 X10 )i k X i=1 . F k X ≤α (Vb1 X1 )i ⊗ (Vb2 X2 )i ⊗ (Vb3 X3 )i − C i=1 i=1 1 α ≤ (1 − )3 2 denote A(T1 , T2 , T3 ). For α > 1, if k X (V1 X10 )i ⊗ (V2 X20 )i ⊗ (V3 X30 )i − C 1 ≤ (1 − )3 , F 2 k X i=1 2 ⊗ (Vb2 X20 )i ⊗ , F 2 F (Vb3 X30 )i 2 −C F 2 (Vb1 X1 )i ⊗ (Vb2 X2 )i ⊗ (Vb3 X3 )i − C k X i=1 2 (V1 X1 )i ⊗ (V2 X2 )i ⊗ (V3 X3 )i − C F 2 F By rescaling  by a constant, we complete the proof of correctness. Running time. According to Section B.6, for each i ∈ [3], Ti Vi can be computed in O(nnz(Vi )) time, and A(T1 , T2 , T3 ) can be computed in O(nnz(A)) time. By the analysis above, the proof is complete. C.3 Tensor multiple regression 2 2 Theorem C.4. Given matrices A ∈ Rd×n , U, V ∈ Rn×k , let B ∈ Rk×n denote U > V > . There exists an algorithm that takes O(nnz(A) + nnz(U ) + nnz(V ) + d poly(k, 1/)) time and outputs a matrix W 0 ∈ Rd×k such that, kW 0 B − Ak2F ≤ (1 + ) min kW B − Ak2F . W ∈Rd×k 37 Algorithm 4 Frobenius Norm Tensor Multiple Regression 1: 2: 3: 4: 5: 6: 7: 8: procedure FTensorMultipleRegression(A, U, V, d, n, k) s ← O(k 2 + k/). 2 Choose S ∈ Rn ×s to be a TensorSketch. Compute A · S. Compute B · S. W ← (AS)(BS)† return W . end procedure 2 ×s Proof. We choose a TensorSketch (Definition B.34) S ∈ Rn problem, . Theorem C.4 . Definition B.34 . B = U> V> to reduce the problem to a smaller min kW BS − ASk2F . W ∈Rd×k Let W 0 denote the optimal solution to the above problem. Following a similar proof to that in p Section C.7.3, if S is a (1±1/2)-subspace embedding and satisfies /k-approximate matrix product, then W 0 provides a (1 + )-approximation to the original problem. By Theorem B.35, we have s = O(k 2 + k/). Running time. According to Definition B.34, BS can be computed in O(nnz(U ) + nnz(V )) + poly(k/) time. Notice that each row of S has exactly 1 nonzero entry, thus AS can be computed in O(nnz(A)) time. Since BS ∈ Rk×s and AS ∈ Rd×s , minW ∈Rd×k kW BS − ASk2F can be solved in d poly(sk) = d poly(k/) time. C.4 C.4.1 Bicriteria algorithms Solving a small regression problem Lemma C.5. Given tensor A ∈ Rn×n×n and three matrices U ∈ Rn×s1 , V ∈ Rn×s2 and W ∈ Rn×s3 , there exists an algorithm that takes O(nnz(A) + n poly(s1 , s2 , s3 , 1/)) time and outputs α0 ∈ Rs1 ×s2 ×s3 such that s1 X s2 X s3 X i=1 j=1 l=1 2 0 αi,j,l · Ui ⊗ Vj ⊗ Wl − A ≤ (1 + ) min α∈Rs1 ×s2 ×s3 F s1 X s2 X s3 X i=1 j=1 l=1 2 αi,j,l · Ui ⊗ Vj ⊗ Wl − A . F holds with probability at least .99. Proof. We define eb ∈ Rn to be the vector where the i + (j − 1)n + (l − 1)n2 -th entry of eb is Ai,j,l . We e ∈ Rn3 ×s1 s2 s3 to be the matrix where the (i + (j − 1)n + (l − 1)n2 , i0 + (j 0 − 1)s2 + (l0 − 1)s2 s3 ) define A entry is Ui0 ,i · Vj 0 ,j · Wl0 ,l . This problem is equivalent to a linear regression problem, 3 min x∈Rs1 s2 s3 e − ebk22 , kAx e ∈ Rn3 ×s1 s2 s3 , eb ∈ Rn3 . Thus, it can be solved fairly quickly using recent work [CW13, where A MM13, NN13]. However, the running time of this naïvely is Ω(n3 ), since we have to write down e In the next few paragraphs, we show how to improve the running time to nnz(A) + each entry of A. n poly(s1 , s2 , s3 ). 38 Since α ∈ Rs1 ×s2 ×s3 , α can be always written as α = X1 ⊗X2 ⊗X3 , where X1 ∈ Rs1 ×s1 s2 s3 , X2 ∈ Rs2 ×s1 s2 s3 , X3 ∈ Rs3 ×s1 s2 s3 , we have min α∈Rs1 ×s2 ×s3 s1 X s2 X s3 X i=1 j=1 l=1 2 αi,j,l · Ui ⊗ Vj ⊗ Wl − A = F min X1 ∈Rs1 ×s1 s2 s3 X2 ∈Rs2 ×s1 s2 s3 X3 ∈Rs3 ×s1 s2 s3 k(U X1 ) ⊗ (V X2 ) ⊗ (W X3 ) − Ak2F . By Lemma C.3, we can reduce the problem size n × n × n to a smaller problem that has size t1 × t2 × t3 , s1X s2 s3 min X1 ,X2 ,X3 i=1 2 (T1 U X1 )i ⊗ (T2 V X2 )i ⊗ (T3 W X3 )i − A(T1 , T2 , T3 ) F where T1 ∈ Rt1 ×n , T2 ∈ Rt2 ×n , T3 ∈ Rt3 ×n , t1 = t2 = t3 = poly(s1 s2 s3 /). Notice that min X1 ,X2 ,X3 = s1X s2 s3 i=1 min α∈Rs1 ×s2 ×s3 2 (T1 U X1 )i ⊗ (T2 V X2 )i ⊗ (T3 W X3 )i − A(T1 , T2 , T3 ) s1 X s2 X s3 X i=1 j=1 l=1 F 2 αi,j,l · (T1 U )i ⊗ (T2 V )j ⊗ (T3 W )l − A(T1 , T2 , T3 ) . F Let α0 = arg min α∈Rs1 ×s2 ×s3 s1 X s2 X s3 X i=1 j=1 l=1 2 αi,j,l · (T1 U )i ⊗ (T2 V )j ⊗ (T3 W )l − A(T1 , T2 , T3 ) , F then we have s1 X s2 X s3 X i=1 j=1 l=1 2 0 αi,j,l · Ui ⊗ V j ⊗ W l − A ≤ (1 + ) min α∈Rs1 ×s2 ×s3 F s1 X s2 X s3 X i=1 j=1 l=1 2 αi,j,l · Ui ⊗ Vj ⊗ Wl − A . F Again, according to Lemma C.3, the total running time is then O(nnz(A) + n poly(s1 , s2 , s3 , 1/)). Lemma C.6. Given tensor A ∈ Rn×n×n , and two matrices U ∈ Rn×s , V ∈ Rn×s with rank(U ) = r1 , rank(V ) = r2 , let T1 ∈ Rt1 ×n , T2 ∈ Rt2 ×n be two sparse embedding matrices (Definition B.16) with t1 = poly(r1 /), t2 = poly(r2 /). Then with probability at least 0.99, ∀X ∈ Rn×s , (1 − )kU ⊗ V ⊗ X − Ak2F ≤ kT1 U ⊗ T2 V ⊗ X − A(T1 , T2 , I)k2F ≤ (1 + )kU ⊗ V ⊗ X − Ak2F . 2 Proof. Let X ∈ Rn×s . We define Z1 = (V > X > ) ∈ Rs×n . We choose a sparse embedding matrix (Definition B.16) T1 ∈ Rt1 ×n with t1 = poly(r1 /) rows. According to Lemma B.19 with probability 2 0.999, for all Z ∈ Rs×n , (1 − )kU Z − A1 k2F ≤ kT1 U Z − T1 A1 k2F ≤ (1 + )kT1 U Z − A1 k2F . 39 It means that (1 − )kU Z1 − A1 k2F ≤ kT1 U Z1 − T1 A1 k2F ≤ (1 + )kT1 U Z1 − A1 k2F . 2 Second, we unflatten matrix T1 A1 ∈ Rt1 ×n to obtain a tensor A0 ∈ Rt1 ×n×n . Then we flatten A0 along the second direction to obtain A02 ∈ Rn×t1 n . We define Z2 = ((T1 U )> X > ) ∈ Rs×t1 n . Then, by flattening, kV · Z2 − A02 k2F = kT1 U · Z1 − T1 A1 k2F = (1 ± )kU ⊗ V ⊗ X − Ak2F . We choose a sparse embedding matrix (Definition B.16) T2 ∈ Rt2 ×n with t2 = poly(r2 /) rows. Then according to Lemma B.19 with probability 0.999, for all Z ∈ Rs×t1 n , (1 − )kV Z − A02 k2F ≤ kT2 V Z − T2 A02 k2F ≤ (1 + )kV Z − A02 k2F . Thus, kT2 V · Z2 − T2 A02 k2F = (1 ± )2 kU ⊗ V ⊗ X − Ak2F . After rescaling  by a constant, with probability at least 0.99, ∀X ∈ Rn×s , (1 − )kU ⊗ V ⊗ X − Ak2F ≤ kT1 U ⊗ T2 V ⊗ X − A(T1 , T2 , I)k2F ≤ (1 + )kU ⊗ V ⊗ X − Ak2F . C.4.2 Algorithm I We start with a slightly unoptimized bicriteria low rank approximation algorithm. Algorithm 5 Frobenius Norm Bicriteria Low Rank Approximation Algorithm, rank-O(k 3 /3 ) 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: procedure FTensorLowRankBicriteriaCubicRank(A, n, k) s1 ← s2 ← s3 ← O(k/). t1 ← t2 ← t3 ← poly(k/). 2 Choose Si ∈ Rn ×si to be a Sketching matrix, ∀i ∈ [3]. Choose Ti ∈ Rti ×n to be a Sketching matrix, ∀i ∈ [3]. Compute U ← T1 · (A1 · S1 ), V ← T2 · (A2 · S2 ), W ← T3 · (A3 · S3 ). Compute C ← A(T1 , T2 , T3 ). X ←FTensorRegression(C, U, V, W, t1 , s1 , t2 , s2 , t3 , s3 ). return X(A1 S1 , A2 S2 , A3 S3 ). end procedure . Theorem C.7 . Definition B.18 . Definition B.16 . Linear regression Theorem C.7. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1,  ∈ (0, 1), let r = O(k 3 /3 ). There exists an algorithm that takes O(nnz(A) + n poly(k, 1/)) time and outputs three matrices U ∈ Rn×r , V ∈ Rn×r , W ∈ Rn×r such that r X i=1 2 Ui ⊗ Vi ⊗ Wi − A F ≤ (1 + ) min rank −k Ak holds with probability 9/10. 40 kAk − Ak2F Proof. At the end of Theorem C.1, we need to run a polynomial system verifier. This is why we obtain exponential in k running time. Instead of running the polynomial system verifier, we can use Lemma C.5. This reduces the running time to be polynomial in all parameters: n, k, 1/. However, the output tensor has rank (k/)3 (Here we mean that we do not obtain a better decomposition than (k/)3 components). According to Section B.6, for each i, Ai Si can be computed in O(nnz(A)) + n poly(k/) time. Then Ti (Ai Si ) can be computed in n poly(k, 1/) time and A(T1 , T2 , T3 ) also can be computed in O(nnz(A)) time. The running time for the regression is poly(k/). Now we present an optimized bicriteria algorithm. Algorithm 6 Frobenius Norm Low Rank Approximation Algorithm, rank-O(k 2 /2 ) 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: procedure FTensorLowRankBicriteriaQuadraticRank(A, n, k) s1 ← s2 ← O(k/). 2 Choose Si ∈ Rn ×si to be a sketching matrix, ∀i ∈ [3]. Compute A1 · S1 , A2 · S2 . b by using A1 S1 according to Equation (9). Form U b Form V by using A2 S2 according to Equation (10). c ←FTensorMultipleRegression(A, U b , Vb , n, n, s1 s2 ). W b , Vb , W c. return U end procedure procedure FTensorLowRankBicriteriaQuadraticRank(A, n, k) s1 ← s2 ← O(k/). t1 ← t2 ← poly(k/). 2 Choose Si ∈ Rn ×si to be a Sketching matrix, ∀i ∈ [2]. Choose Ti ∈ Rti ×n to be a Sketching matrix, ∀i ∈ [2]. b by using A1 S1 according to Equation (9). Form U Form Vb by using A2 S2 according to Equation (10). Compute C ← A(T1 , T2 , I). b )> (T2 Vb )> . Compute B ← (T1 U c ← arg min kXB − C3 k2 . W F . Theorem C.8 . Definition B.18 . Algorithm 4 . Theorem C.8 . Definition B.18 . Definition B.16 . C ∈ Rt1 ×t2 ×n X∈Rn×s1 s2 b , Vb , W c. return U 21: end procedure 20: Theorem C.8. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1,  ∈ (0, 1), let r = O(k 2 /2 ). There exists an algorithm that takes O(nnz(A) + n poly(k, 1/)) time and outputs three matrices U ∈ Rn×r , V ∈ Rn×r , W ∈ Rn×r such that r X i=1 2 Ui ⊗ Vi ⊗ Wi − A F ≤ (1 + ) min rank −k Ak kAk − Ak2F holds with probability 9/10. Note that there are two different ways to implement algorithm FTensorLowRankBicriteriaQuadraticRank. We present the proofs for both of them here. Approach I. 41 Proof. Let OPT = sketching matrix S3 kAk − Ak2F . According to Theorem C.1, we know that there exists a min rank −k Ak 2 ∈ Rn ×s3 min where s3 = O(k/), such that X1 ∈Rs1 ×k ,X2 ∈Rs2 ×k ,X3 ∈Rs3 ×k k X (A1 S1 X1 )l ⊗ (A2 S2 X2 )l ⊗ (A3 S3 X3 )l − A l=1 2 F ≤ (1 + ) OPT Now we fix an l and we have: (A1 S1 X1 )l ⊗ (A2 S2 X2 )l ⊗ (A3 S3 X3 )l  ! s s1 2 X X = (A1 S1 )i (X1 )i,l ⊗  (A2 S2 )j (X2 )j,l  ⊗ (A3 S3 X3 )l i=1 = j=1 s1 X s2 X i=1 j=1 (A1 S1 )i ⊗ (A2 S2 )j ⊗ (A3 S3 X3 )l (X1 )i,l (X2 )j,l Thus, we have min X1 ,X2 ,X3 s1 X s2 X (A1 S1 )i ⊗ (A2 S2 )j ⊗ k X (A3 S3 X3 )l (X1 )i,l (X2 )j,l i=1 j=1 l=1 ! 2 −A ≤ (1 + ) OPT . (7) F 2 We use matrices A1 S1 ∈ Rn×s1 and A2 S2 ∈ Rn×s2 to construct a matrix B ∈ Rs1 s2 ×n in the following way: each row of B is the vector corresponding to the matrix generated by the ⊗ product between one column vector in A1 S1 and the other column vector in A2 S2 , i.e., B i+(j−1)s1 = vec((A1 S1 )i ⊗ (A2 S2 )j ), ∀i ∈ [s1 ], j ∈ [s2 ], (8) where (A1 S1 )i denotes the i-th column of A1 S1 and (A2 S2 )j denote the j-th column of A2 S2 . b ∈ Rn×s1 s2 by copying matrix A1 S1 s2 times, i.e., We create matrix U   b = A1 S1 A1 S1 · · · A1 S1 . U (9) We create matrix Vb ∈ Rn×s1 s2 by copying the i-th column of A2 S2 a total of s1 times, into columns (i − 1)s1 , · · · , is1 of Vb , for each i ∈ [s2 ], i.e.,   Vb = (A2 S2 )1 · · · (A2 S2 )1 (A2 S2 )2 · · · (A2 S2 )2 · · · (A2 S2 )s2 · · · (A2 S2 )s2 . (10) b and Vb to represent B, Thus, we can use U b> B = (U According to Equation (7), we have: min W ∈Rn×s1 s2 2 Vb > ) ∈ Rs1 s2 ×n . kW B − A3 k2F ≤ (1 + ) OPT . Next, we want to find matrix W ∈ Rn×s1 s2 by solving the following optimization problem, min W ∈Rn×s1 s2 kW B − A3 k2F . 42 Note that B has size s1 s2 × n2 . Naïvely writing down B already requires Ω(n2 ) time. In order to achieve nearly linear time in n, we cannot write down B. We choose S3 ∈ Rn1 n2 ×s3 to be a TensorSketch (Definition B.34). In order to solve multiple regression, we need to set c denote the optimal solution to kW BS3 − A3 S3 k2 . Then s3 = O((s1 s2 )2 + (s1 s2 )/). Let W F † c = (A3 S3 )(BS3 ) . Since each row of S3 has exactly 1 nonzero entry, A3 S3 can be computed in W b > Vb > ), according to Definition B.34, BS3 can be computed in O(nnz(A)) time. Since B = (U n poly(s1 s2 /) = n poly(k/) time. By Theorem C.4, we have c B − A3 k2F ≤ (1 + ) kW Thus, we have min W ∈Rn×s1 s2 kW B − A3 k2F . b ⊗ Vb ⊗ W c − Ak2 ≤ (1 + ) OPT . kU F According to Definition B.18, A1 S1 , A2 S2 can be computed in O(nnz(A) + poly(k/)) time. Te total running time is thus O(nnz(A) + poly(k/)). Approach II. Proof. Let OPT = 2 min kAk − Ak2F . Choose sketching matrices (Definition B.18) S1 ∈ Rn rank −k Ak 2 ∈ Rn ×s3 , and 2 ×s 1 , S2 ∈ Rn ×s2 , S3 sketching matrices (Definition B.16) T1 ∈ Rt1 ×n and T2 ∈ Rt2 ×n b ∈ Rn×s1 s2 by copying matrix with s1 = s2 = s3 = O(k/), t1 = t2 = poly(k/). We create matrix U A1 S1 s2 times, i.e.,   b = A1 S1 A1 S1 · · · A1 S1 . U We create matrix Vb ∈ Rn×s1 s2 by copying the i-th column of A2 S2 a total of s1 times, into columns (i − 1)s1 , · · · , is1 of Vb , for each i ∈ [s2 ], i.e.,   Vb = (A2 S2 )1 · · · (A2 S2 )1 (A2 S2 )2 · · · (A2 S2 )2 · · · (A2 S2 )s2 · · · (A2 S2 )s2 . As we proved in Approach I, we have min X∈Rn×s1 s2 b ⊗ Vb ⊗ X − Ak2 ≤ (1 + ) OPT . kU F b )> (T2 Vb )> ) ∈ Rs1 s2 ×t1 t2 , and flatten A(T1 , T2 , I) along the third direction to obtain Let B = ((T1 U n×t t 1 2 C3 ∈ R . Let c = arg min kT1 U b ⊗ T2 Vb ⊗ X − A(T1 , T2 , I)k2F = arg min kXB − C3 k2F . W X∈Rn×s1 s2 Let X∈Rn×s1 s2 b ⊗ Vb ⊗ X − Ak2F . W ∗ = arg min kU X∈Rn×s1 s2 43 According to Lemma C.6, b ⊗ Vb ⊗ W c − Ak2 kU F 1 b ⊗ T2 Vb ⊗ W c − A(T1 , T2 , I)k2 ≤ kT1 U F 1− 1 b ⊗ T2 Vb ⊗ W ∗ − A(T1 , T2 , I)k2F kT1 U ≤ 1− 1+ b b ≤ kU ⊗ V ⊗ W ∗ − Ak2F 1− (1 + )2 ≤ OPT . 1− According to Definition B.18, A1 S1 , A2 S2 can be computed in O(nnz(A) + poly(k/)) time. The total running time is thus O(nnz(A) + poly(k/)). Since T1 , T2 are sparse embedding matrices, b , T2 Vb can be computed in O(nnz(A)+poly(k/)) time. The total running time is in O(nnz(A)+ T1 U poly(k/)). Theorem C.9. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1 and any 0 <  < 1, if Ak exists then there is a randomized algorithm running in nnz(A) + n · poly(k/) time which outputs a rank-O(k 2 /2 ) tensor B for which kA − Bk2F ≤ (1 + )kA − Ak k2F . If Ak does not exist, then the algorithm outputs a rank-O(k 2 /2 ) tensor B for which kA − Bk2F ≤ (1 + ) OPT +γ, where γ is an arbitrarily small positive function of n. In both cases, the algorithm succeeds with probability at least 9/10. Proof. If Ak exists, then the proof directly follows the proof of Theorem C.1 and Theorem C.8. If Ak does not exist, then for any γ > 0, there exist U ∗ ∈ Rn×k , V ∗ ∈ Rn×k , W ∗ ∈ Rn×k such that kU ∗ ⊗ V ∗ ⊗ W ∗ − Ak2F ≤ inf rank −k A0 kA − A0 k2F + 1 γ. 10 Then we just regard U ∗ ⊗ V ∗ ⊗ W ∗ as the “best” rank k approximation to A, and follow the same argument as in the proof of Theorem C.1 and the proof of Theorem C.8. We can finally output a tensor B ∈ Rn×n×n with rank-O(k 2 /2 ) such that kB − Ak2F ≤ (1 + )kU ∗ ⊗ V ∗ ⊗ W ∗ − Ak2F   1 0 2 ≤ (1 + ) inf kA − A kF + γ rank −k A0 10 ≤ (1 + ) inf rank −k A0 kA − A0 k2F + γ where the first inequality follows by the proof of Theorem C.1 and the proof of theorem C.8. The second inequality follows by our choice of U ∗ , V ∗ , W ∗ . The third inequality follows since 1 +  < 2 and γ > 0. C.4.3 poly(k)-approximation to multiple regression Lemma C.10 ((1.4) and (1.9) in [RV09]). Let s ≥ k. Let U ∈ Rn×k denote a matrix that has orthonormal columns, and S ∈ Rs×n denote an i.i.d. N (0, 1/s) Gaussian matrix. Then SU is also an s × k i.i.d. Gaussian matrix with each entry draw from N (0, 1/s), and furthermore, we have with arbitrarily large constant probability, √ σmax (SU ) = O(1) and σmin (SU ) = Ω(1/ s). 44 Proof. Note that √ s− √ k−1= √ √s−k−1 s+ k−1 √ = Ω(1/ s). Lemma C.11. Given matrices A ∈ Rn×k , B ∈ Rn×d , let S ∈ Rs×n denote a standard Gaussian N (0, 1) matrix with s = k. Let X ∗ = min kAX − BkF . Let X 0 = min kSAX − SBkF . Then, X∈Rk×d X∈Rk×d we have that √ kAX 0 − BkF ≤ O( k)kAX ∗ − BkF , holds with probability at least 0.99. Proof. Let X ∗ ∈ Rk×d denote the optimal solution such that kAX ∗ − BkF = min kAX − BkF . X∈Rk×d √ Consider a standard Gaussian matrix S ∈ Rk×n scaled by 1/ k with exactly k rows. Then for any X ∈ Rk×d , by the triangle inequality, we have kSAX − SBkF ≤ kSAX − SAX ∗ kF + kSAX ∗ − SBkF , and kSAX − SBkF ≥ kSAX − SAX ∗ kF − kSAX ∗ − SBkF . We first show how to bound kSAX − SAX ∗ kF , and then show how to bound kSAX ∗ − SBkF . Note that Lemma C.10 implies the following result, Claim C.12. For any X ∈ Rk×d , with probability 0.999, we have 1 √ kAX − AX ∗ kF . kSAX − SAX ∗ kF . kAX − AX ∗ kF . k Proof. First, we can write A = U R ∈ Rn×k where U ∈ Rn×k has orthonormal columns and R ∈ Rk×k . It gives, kSAX − SAX ∗ kF = kSU (RX − RX ∗ )kF . Second, applying Lemma C.10 to SU ∈ Rs×k completes the proof. Using Markov’s inequality, for any fixed matrix AX ∗ − B, choosing a Gaussian matrix S, we have that kSAX ∗ − SBk2F = O(kAX ∗ − Bk2F ) holds with probability at least 0.999. This is equivalent to kSAX ∗ − SBkF = O(kAX ∗ − BkF ), holding with probability at least 0.999. 45 (11) Let X 0 = arg minkSAX − SBkF . Putting it all together, we have X∈Rk×d kAX 0 − BkF ≤ kAX 0 − AX ∗ kF + kAX ∗ − BkF √ ≤ O( k)kSAX 0 − SAX ∗ kF + kAX ∗ − BkF √ √ ≤ O( k)kSAX 0 − SBkF + O( k)kSAX ∗ − SBkF + kAX ∗ − BkF √ √ ≤ O( k)kSAX ∗ − SBkF + O( k)kSAX ∗ − SBkF + kAX ∗ − BkF √ ≤ O( k)kAX ∗ − BkF . C.4.4 by triangle inequality by Claim C.12 by triangle inequality by definition of X 0 by Equation (11) Algorithm II Theorem C.13. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, let r = k 2 . There exists an algorithm which takes O(nnz(A)k) + n poly(k) time and outputs three matrices U, V, W ∈ Rn×r such that, r X i=1 Ui ⊗ Vi ⊗ Wi − A F ≤ poly(k) min rank −k A0 kA0 − AkF holds with probability 9/10. Proof. Let OPT = min rank −k A0 kA0 − AkF , we fix V ∗ ∈ Rn×k , W ∗ ∈ Rn×k to be the optimal solution of 2 the original problem. We use Z1 = (V ∗> W ∗> ) ∈ Rk×n to denote the matrix where the i-th row 2 is the vectorization of Vi∗ ⊗ Wi∗ . Let A1 ∈ Rn×n denote the matrix obtained by flattening tensor A ∈ Rn×n×n along the first direction. Then, we have min kU Z1 − A1 kF ≤ OPT . U 2 ×s Choosing an N (0, 1/k) Gaussian sketching matrix S1 ∈ Rn smaller problem, 1 with s1 = k, we can obtain the min kU Z1 S1 − A1 S1 kF . U ∈Rn×k √ b = A1 S1 (Z1 S1 )† . Define α = O( k). By Lemma C.11, we have Define U b Z1 − A1 kF ≤ α OPT . kU b and W ∗ . Define Z2 , A2 similarly as above. Choosing an N (0, 1/k) Gaussian Second, we fix U 2 sketching matrix S2 ∈ Rn ×s2 with s2 = k, we can obtain another smaller problem, min kV Z2 S2 − A2 S2 kF . V ∈Rn×k Define Vb = A2 S2 (Z2 S2 )† . By Lemma C.11 again, we have kVb Z2 − A2 kF ≤ α2 OPT . 46 Thus, we now have min kA1 S1 X1 ⊗ A2 S2 X2 ⊗ W − AkF ≤ α2 OPT X1 ,X2 ,W e ∈ Rn×s1 s2 by copying We use a similar idea as in the proof of Theorem C.8. We create matrix U matrix A1 S1 s2 times, i.e.,   e = A1 S1 A1 S1 · · · A1 S1 . U We create matrix Ve (i − 1)s1 , · · · , is1 of  Ve = (A2 S2 )1 We have ∈ Rn×s1 s2 by copying the i-th column of A2 S2 a total of s1 times, into columns Ve , for each i ∈ [s2 ], i.e.,  · · · (A2 S2 )1 (A2 S2 )2 · · · (A2 S2 )2 · · · (A2 S2 )s2 · · · (A2 S2 )s2 . min X∈Rn×s1 s2 e ⊗ Ve ⊗ X − AkF ≤ α2 OPT . kU Choose Ti ∈ Rti ×n to be a sparse embedding matrix (Definition B.16) with ti = poly(k/), for each i ∈ [2]. By applying Lemma C.6, we have, if W 0 satisfies, then, e ⊗ T2 Ve ⊗ W 0 − A(T1 , T2 , I)kF = kT1 U e ⊗ Ve ⊗ W 0 − AkF ≤ (1 + ) kU min X∈Rn×s1 s2 min X∈Rn×s1 s2 Thus, we only need to solve min X∈Rn×s1 s2 e ⊗ T2 Ve ⊗ X − A(T1 , T2 , I)kF kT1 U e ⊗ Ve ⊗ X − AkF ≤ (1 + )α2 OPT . kU e ⊗ T2 Ve ⊗ X − A(T1 , T2 , I)kF . kT1 U which is similar to the proof of Theorem C.8. Therefore, we complete the proof of correctness. For e , T2 Ve can be computed in the running time, A1 S1 , A2 S2 can be computed in O(nnz(A)k) time, T1 U n poly(k) time. The final regression problem can be computed in n poly(k) running time. C.5 Generalized matrix row subset selection Note that in this section, the notation ΠξC,k is given in Definition B.5. Theorem C.14. Given matrices A ∈ Rn×m and C ∈ Rn×k , there exists an algorithm which takes O(nnz(A) log n)+(m+n) poly(k, 1/) time and outputs a diagonal matrix D ∈ Rn×n with d = O(k/) nonzeros (or equivalently a matrix R that contains d = O(k/) rescaled rows of A) and a matrix U ∈ Rk×d such that kCU DA − Ak2F ≤ (1 + ) min kCX − Ak2F X∈Rk×m holds with probability .99. 47 Algorithm 7 Generalized Matrix Row Subset Selection: Constructing R with r = O(k +k/) Rows and a rank-k U ∈ Rk×r 1: procedure GeneralizedMatrixRowSubsetSelection(A, C, n, m, k, ) . Theorem C.14 2: Y, Φ, ∆ ← ApproxSubspaceSVD(A, C, k). . Claim C.16 and Lemma 3.12 in [BW14] 3: B ← Y ∆. 4: Z2 , D ← QR(B). . Z2 ∈ Rm×k , Z2> Z2 = Ik , D ∈ Rk×k 5: h2 ← 8k ln(20k). 6: Ω2 , D2 ← RandSampling(Z2 , h2 , 1) . Definition 3.6 in [BW14] > k×h 2 7: M2 ← Z 2 Ω 2 D 2 ∈ R . > ← SVD(M ). . rank(M2 ) = k and VM2 ∈ Rh2 ×k 8: UM2 , ΣM2 , VM 2 2 9: r1 ← 4k. 10: S2 ← BSSSamplingSparse(VM2 , ((A> − A> Z2 Z2> )Ω2 D2 )> , r1 , 0.5) . Lemma 4.3 in [BW14] 11: R1 ← (A> Ω2 D2 S2 )> ∈ Rr1 ×n containing rescaled rows from A. 12: r2 ← 4820k/. 13: R2 ← AdaptiveRowsSparse(A, Z2 , R1 , r2 ) . Lemma 4.5 in [BW14] > > (r +r )×n > 1 2 .R∈R containing r = 4k + 4820k/ rescaled rows of A. 14: R ← [R1 , R2 ] . 15: Choose W ∈ Rξ×m to be a randomly chosen sparse subspace embedding with ξ = Ω(k 2 −2 ). 16: U ← Φ−1 ∆D−1 (W CΦ−1 ∆D−1 )† W AR† = Φ−1 ∆∆> (W C)† W AR† . 17: return R, U . 18: end procedure Proof. This follows by combining Lemma C.17 and C.18. Let U, R denote the output of procedure GeneralizedMatrixRowSubsetSelection, kA − CU Rk2F ≤ (1 + )kA − Z2 Z2> AR† Rk2F ≤ (1 + )(1 + 60)kA − ΠFC,k (A)k2F ≤ (1 + 130)kA − ΠFC,k (A)k2F . Because R is a subset of rows of A and R has size O(k/) × m, there must exist a diagonal matrix D ∈ Rn×n with O(k/) nonzeros such that R = DA. This completes the proof. Corollary C.15 (A slightly different version of Theorem C.14, faster running time, and small input matrix). Given matrices A ∈ Rn×m and C ∈ Rn×k , if min(m, n) = poly(k, 1/), then there exists an algorithm which takes O(nnz(A)) + (m + n) poly(k, 1/) time and outputs a diagonal matrix D ∈ Rn×n with d = O(k/) nonzeros (or equivalently a matrix R that contains d = O(k/) rescaled rows of A) and a matrix U ∈ Rk×d such that kCU DA − Ak2F ≤ (1 + ) min kCX − Ak2F X∈Rk×m holds with probability .99. Proof. The log n factor comes from the adaptive sampling where we need to choose a Gaussian matrix with O(log n) rows and compute SA. If A has poly(k, 1/) columns, it is sufficient to choose S to be a CountSketch matrix with poly(k, 1/) rows. Then, we do not need a log n factor in the running time. If S has poly(k, 1/) rows, then we no longer need the matrix S. 48 Claim C.16. Given matrices A ∈ Rm×n and C ∈ Rm×c , let Y ∈ Rm×c , Φ ∈ Rc×c and ∆ ∈ Rc×k denote the output of procedure ApproxSubspaceSVD(A, C, k, ). Then with probability .99, we have, kA − Y ∆∆> Y > Ak2F ≤ (1 + 30)kA − ΠFC,k (A)k2F . Proof. This follows by Lemma 3.12 in [BW14]. Lemma C.17. The matrices R and Z2 in procedure GeneralizedMatrixRowSubsetSelection (Algorithm 7) satisfy with probability at least 0.17 − 2/n, kA − Z2 Z2> AR† Rk2F ≤ kA − ΠFC,k (A)k2F + 60kA − ΠFC,k (A)k2F . Proof. We can show, 30 kA − AR1† R1 k2F 4820 30 † 2 = kA − BB AkF + kA − AR1† R1 k2F 4820 ≤ kA − BB † Ak2F + 30kA − Ak k2F kA − Z2 Z2> Ak2F + ≤ kA − Y ∆∆> Y Ak2F + 30kA − ΠFC,k (A)k2F ≤ (1 + 30)kA − ΠFC,k (A)k2F + 30kA − ΠFC,k (A)k2F , where the first step follows by the fact that Z2 Z2> = Z2 DD−1 Z2> = (Z2 D)(Z2 D)† = BB † , the second step follows by kA − AR1† R1 k2F ≤ 4820kA − Ak k2F , the third step follows by B = Y ∆ and B † = (Y ∆)† = ∆† Y † = ∆> Y > , and the last step follows by Claim C.16. Lemma C.18. The matrices C, U and R in procedure GeneralizedMatrixRowSubsetSelection (Algorithm 7) satisfy that kA − CU Rk2F ≤ (1 + )kA − Z2 Z2> AR† Rk2F with probability at least .99. Proof. Let UR , ΣR , VR denote the SVD of R. Then VR VR> = R† R. We define Y ∗ to be the optimal solution of min kW AVR VR> − W CΦ−1 ∆D−1 Y Rk2F . X∈Rk×r b ∗ to be Y ∗ R ∈ Rk×n , which is also equivalent to defining X b ∗ to be the optimal solution We define X of min kW AVR VR> − W CΦ−1 ∆D−1 Xk2F . X∈Rk×n b ∗ = (W CΦ−1 ∆D−1 )† W AVR V † . Furthermore, it implies X R We also define X ∗ to be the optimal solution of min kAVR VR† − CΦ−1 ∆D−1 Xk2F , X∈Rk×n 49 which implies that, X ∗ = (CΦ−1 ∆D−1 )† AVR VR> = Z2> AVR VR> . Now, we start to prove an upper bound on kA − CU Rk2F , kA − CU Rk2F = kA − CΦ−1 ∆D−1 Y ∗ Rk2F b ∗ k2F = kA − CΦ−1 ∆D−1 X b ∗ + A − AVR VR> k2F = kAVR VR> − CΦ−1 ∆D−1 X b ∗ k2 + kA − AVR V > k2 , = kAVR VR> − CΦ−1 ∆D−1 X F {z } | {z R F} | α by definition of U b ∗ = Y ∗R by X (12) β b ∗ = M V > , A − AVR V > = A(I − VR V > ) and the Pythagorean where the last step follows by X R R R theorem. We show how to upper bound the term α, α ≤ (1 + )kAVR VR> − CΦ−1 ∆D−1 X ∗ k2F = = kAVR VR> kAVR VR> − − −1 −1 CΦ ∆D X ∗ k2F CΦ−1 ∆D−1 X ∗ k2F + + by Lemma C.19 kAVR VR> kAVR VR> − − −1 −1 CΦ ∆D X ∗ k2F CΦ−1 ∆D−1 (Z2> AR† R)k2F . (13) By the Pythagorean theorem and the definition of Z2 (which means Z2 = CΦ−1 ∆D−1 ), we have, kAVR VR> − CΦ−1 ∆D−1 (Z2> AR† R)k2F + β = kAVR VR> − CΦ−1 ∆D−1 (Z2> AR† R)k2F + kA − AVR VR> k2F = kA − CΦ−1 ∆D−1 (Z2> AR† R)k2F = kA − Z2 Z2> AR† Rk2F . (14) Combining Equations (12), (13) and (14) together, we obtain, kA − CU Rk2F ≤ kAVR VR> − CΦ−1 ∆D−1 X ∗ k2F + kA − Z2 Z2> AR† Rk2F . We want to show kAVR VR> − CΦ−1 ∆D−1 X ∗ k2F ≤ kA − Z2 Z2> AR† Rk2F , kAVR VR> − CΦ−1 ∆D−1 X ∗ k2F = kAVR VR> − CΦ−1 ∆D−1 Z2> AVR VR> k2F ≤ kA − CΦ−1 ∆D−1 Z2> Ak2F by properties of projections ≤ kA − CΦ−1 ∆D−1 Z2> AR† Rk2F = kA − by X ∗ = Z2> AVR VR> by properties of projections Z2 Z2> AR† Rk2F . by Z2 = CΦ−1 ∆D−1 This completes the proof. Lemma C.19 ([CW13]). Let A ∈ Rn×d have rank ρ and B ∈ Rn×r . Let W ∈ Rr×n be a randomly b ∗ = arg minkW AX − W Bk2 and let chosen sparse subspace embedding with r = Ω(ρ2 −2 ). Let X F X∈Rd×r X∗ = arg minkAX − X∈Rd×r Bk2F . Then with probability at least .99, e ∗ − Bk2 ≤ (1 + )kAX ∗ − Bk2 . kAX F F 50 Algorithm 8 Frobenius Norm Tensor Column, Row and Tube Subset Selection, Polynomial Time 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: procedure FCRTSelection(A, n, k, ) . Theorem C.20 s1 ← s2 ← O(k/). Choose a Gaussian matrix S1 with s1 columns. . Definition B.18 Choose a Gaussian matrix S2 with s2 columns. . Definition B.18 Form matrix Z30 by setting the (i, j)-th row to be the vectorization of (A1 S1 )i ⊗ (A2 S2 )j . 0 > 2 D3 ←GeneralizedMatrixRowSubsetSelection(A> 3 , (Z3 ) ,n ,n,s1 s2 ,). . Algorithm 7 Let d3 denote the number of nonzero entries in D3 . . d3 = O(s1 s2 /) Form matrix Z20 by setting the (i, j)-th row to be the vectorization of (A1 S1 )i ⊗ (A3 S30 )j . 0 > 2 D2 ←GeneralizedMatrixRowSubsetSelection(A> 2 , (Z2 ) ,n ,n,s1 d3 ,). Let d2 denote the number of nonzero entries in D2 . . d2 = O(s1 d3 /) 0 Form matrix Z1 by setting the (i, j)-th row to be the vectorization of (A2 D2 )i ⊗ (A3 D3 )j . 0 > 2 D1 ←GeneralizedMatrixRowSubsetSelection(A> 1 , (Z1 ) ,n ,n,d2 d3 ,). Let d1 denote the number of nonzero entries in D1 . . d1 = O(d2 d3 /) C ← A1 D1 , R ← A2 D2 and T ← A3 D3 . return C, R and T . end procedure C.6 Column, row, and tube subset selection, (1 + )-approximation Theorem C.20. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, there exists an algorithm which takes O(nnz(A)) log n + n2 poly(log n, k, 1/) time and outputs three matrices: C ∈ Rn×c , a subset of columns of A, R ∈ Rn×r a subset of rows of A, and T ∈ Rn×t , a subset of tubes of A where c = r = t = poly(k, 1/), and there exists a tensor U ∈ Rc×r×t such that k(((U · T > )> · R> )> · C > )> − Ak2F ≤ (1 + ) min rank −k Ak kAk − Ak2F , or equivalently, c X r X t X i=1 j=1 l=1 2 Ui,j,l · Ci ⊗ Rj ⊗ Tl − A ≤ (1 + ) min rank −k Ak kAk − Ak2F F holds with probability 9/10. 2 Proof. We fix V ∗ ∈ Rn×k and W ∗ ∈ Rn×k . We define Z1 ∈ Rk×n where the i-th row of Z1 is 2 the vector Vi ⊗ Wi . Choose sketching (Gaussian) matrix S1 ∈ Rn ×s1 (Definition B.18), and let b = A1 S1 (Z1 S1 )† ∈ Rn×k . Following a similar argument as in the previous theorem, we have U b Z1 − A1 k2 ≤ (1 + ) OPT . kU F b and W ∗ . We define Z2 ∈ Rk×n2 where the i-th row of Z2 is the vector U bi ⊗ W ∗ . Choose We fix U i 2 sketching (Gaussian) matrix S2 ∈ Rn ×s2 (Definition B.18), and let Vb = A2 S2 (Z2 S2 )† ∈ Rn×k . Following a similar argument as in the previous theorem, we have kVb Z2 − A2 k2F ≤ (1 + )2 OPT . b and Vb . Note that U b = A1 S1 (Z1 S1 )† and Vb = A2 S2 (Z2 S2 )† . We define Z3 ∈ Rk×n2 We fix U bi ⊗ Vbi . Let z3 = s1 · s2 . We define Z 0 ∈ Rz3 ×n2 such such that the i-th row of Z3 is the vector U 3 51 that, ∀i ∈ [s1 ], ∀j ∈ [s2 ], the i + (j − 1)s1 -th row of Z30 is the vector (A1 S1 )i ⊗ (A2 S2 )j . We consider the following objective function, kW XZ30 − A3 k2F ≤ min W ∈Rn×k ,X∈Rk×z3 min kW Z3 − A3 k2F ≤ (1 + )2 OPT . W ∈Rn×k 2 ×n2 Using Theorem C.14, we can find a diagonal matrix D3 ∈ Rn nonzero entries such that min X∈Rd3 ×z3 with d3 = O(z3 /) = O(k 2 /3 ) kA3 D3 XZ30 − A3 k2F ≤ (1 + )3 OPT . In the following, we abuse notation and let A3 D3 ∈ Rn×d3 by deleting zero columns. Let W 0 denote A3 D3 ∈ Rn×d3 . Then, min X∈Rd3 ×z3 kW 0 XZ30 − A3 k2F ≤ (1 + )3 OPT . b and W 0 . Let z2 = s1 · d3 . We define Z 0 ∈ Rz2 ×n2 such that, ∀i ∈ [s1 ], ∀j ∈ [d3 ], the We fix U 2 i + (j − 1)s1 -th row of Z20 is the vector (A1 S1 )i ⊗ (A3 D3 )j . 2 2 Using Theorem C.14, we can find a diagonal matrix D2 ∈ Rn ×n with d2 = O(z2 /) = O(s1 d3 /) = O(k 3 /5 ) nonzero entries such that min X∈Rd2 ×z2 kA2 D2 XZ20 − A2 k2F ≤ (1 + )4 OPT . Let V 0 denote A2 D2 . Then, min X∈Rd2 ×z2 kV 0 XZ20 − A2 k2F ≤ (1 + )4 OPT . 2 We fix V 0 and W 0 . Let z1 = d2 · d3 . We define Z10 ∈ Rz1 ×n such that, ∀i ∈ [d2 ], ∀j ∈ [d3 ], the i + (j − 1)s1 -th row of Z10 is the vector (A2 D2 )i ⊗ (A3 D3 )j . 2 2 Using Theorem C.14, we can find a diagonal matrix D1 ∈ Rn ×n with d1 = O(z1 /) = O(d2 d3 /) = O(k 5 /9 ) nonzero entries such that min X∈Rd1 ×z1 kA1 D1 XZ10 − A1 k2F ≤ (1 + )5 OPT . Let U 0 denote A1 D1 . Then, min X∈Rd1 ×z1 kU 0 XZ10 − A1 k2F ≤ (1 + )5 OPT . Putting U 0 , V 0 , W 0 all together, we complete the proof. Theorem C.21. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, there exists an algorithm which takes O(nnz(A) + n poly(k, 1/)) time and outputs three matrices: C ∈ Rn×c , a subset of columns of A, R ∈ Rn×r a subset of rows of A, and T ∈ Rn×t , a subset of tubes of A where c = r = t = poly(k, 1/), and there exists a tensor U ∈ Rc×r×t such that kU (C, R, T ) − Ak2F ≤ (1 + ) min rank −k Ak kAk − Ak2F , or equivalently, c X r X t X i=1 j=1 l=1 2 Ui,j,l · Ci ⊗ Rj ⊗ Tl − A ≤ (1 + ) F holds with probability 9/10. 52 min rank −k Ak kAk − Ak2F Algorithm 9 Frobenius Norm Tensor Column, Row and Tube Subset Selection, Input Sparsity Time 1: procedure FCRTSelection(A, n, k, ) . Theorem C.21 2: s1 ← s2 ← O(k/). 3: 0 ← 0.001. 4: Choose a Gaussian matrix S1 with s1 columns. . Definition B.18 5: Choose a Gaussian matrix S2 with s2 columns. . Definition B.18 6: Form matrix B1 by setting (i, j)-th column to be (A1 S1 )i . 7: Form matrix B2 by setting (i, j)-th column to be (A2 S2 )j . . Z30 = B1> B2> 8: d3 ← O(s1 s2 log(s1 s2 ) + (s1 s2 /)). 9: D3 ←FastTensorLeverageScoreGeneralOrder(B1> , B2> , n, n, s1 s2 , 0 , d1 ). . Algorithm 15 10: Form matrix B1 by setting (i, j)-th column to be (A1 S1 )i . 11: Form matrix B3 by setting (i, j)-th column to be (A3 D3 )j . . Z20 = B1> B3> 12: d2 ← O(s1 d3 log(s1 d3 ) + (s1 d3 /)). 13: D2 ←FastTensorLeverageScoreGeneralOrder(B1> , B3> , n, n, s1 d3 , 0 , d2 ). 14: Form matrix B2 by setting (i, j)-th column to be (A2 D2 )i . 15: Form matrix B3 by setting (i, j)-th column to be (A3 D3 )j . . Z10 = B2> B3> 16: d1 ← O(d2 d3 log(d2 d3 ) + (d2 d3 /)). 17: D1 ←FastTensorLeverageScoreGeneralOrder(B2> , B3> , n, n, d2 d3 , 0 , d1 ). 18: C ← A1 D1 , R ← A2 D2 and T ← A3 D3 . 19: return C, R and T . 20: end procedure Proof. The proof is similar to the proof of Theorem C.20, except we replace generalized matrix row subset by tensor leverage score sampling (implicitly). C.7 C.7.1 CURT decomposition, (1 + )-approximation Properties of leverage score sampling and BSS sampling Notice that, the BSS algorithm is a deterministic procedure developed in [BSS12] for selecting rows from a matrix A ∈ Rn×d (with kAk2 ≤ 1 and kAk2F ≤ k) using a selection matrix S so that kA> S > SA − A> Ak2 ≤ . The algorithm runs in poly(n, d, 1/) time. Using the ideas from [BW14] and [CEM+ 15], we are able to reduce the number of nonzero entries from O(−2 k log k) to O(−2 k), and also improve the running time to input sparsity. Lemma C.22 (Leverage score preserves subspace embedding - Theorem 2.11 in [Woo14]). Given a rank-k matrix A ∈ Rn×d , via leverage score sampling, we can obtain a diagonal matrix D with m nonzero entries such that, letting B = DA, if m = O(−2 k log k), then, with probability at least 0.999, for all x ∈ Rd , (1 − )kAxk2 ≤ kBxk2 ≤ (1 + )kAxk2 Lemma C.23. Given a rank-k matrix A ∈ Rn×d , there exists an algorithm that runs in O(nnz(A)+ n poly(k, 1/)) time and outputs a matrix B containing O(−2 k log k) re-weighted rows of A, such 53 that with probability at least 0.999, for all x ∈ Rd , (1 − )kAxk2 ≤ kBxk2 ≤ (1 + )kAxk2 Proof. We choose a sparse embedding matrix (Definition B.16) Π ∈ Rd×s with s = poly(k/). With probability at least 0.999, Π> is a subspace embedding of A> . Thus, rank(AΠ) = rank(A). Also, the leverage scores of AΠ are the same as those of A. Thus, we can compute the leverage scores of AΠ. The running time of computing AΠ is O(nnz(A)). Thus the total running time is O(nnz(A) + n poly(k, 1/)). Lemma C.24. Let B denote a matrix which contains O(−2 k log k) rows of A ∈ Rn×d . Choosing Π to be a sparse subspace embedding matrix of size d × O(−6 (k log k)2 ), with probability at least 0.999, kBΠΠ> B > − BB > k2 ≤ kBk22 . Combining Lemma C.23, C.24 and the BSS algorithm, we obtain: Lemma C.25. Given a rank-k matrix A ∈ Rn×d , there exists an algorithm that runs in O(nnz(A)+ n poly(k, 1/)) time and outputs a sampling and rescaling diagonal matrix S that selects O(−2 k) re-weighted rows of A, such that, with probability at least 0.999, kA> S > SA − A> Ak2 ≤ kAk22 . or equivalently, for all x ∈ Rd , (1 − )kAxk2 ≤ kSAxk2 ≤ (1 + )kAxk2 . Proof. Using Lemma C.23, we can obtain B. Then we apply a sparse subspace embedding matrix Π on the right of B. At the end, we run the BSS algorithm on BΠ and we are able to output O(−2 k) re-weighted rows of BΠ. Using these rows, we are able to determine O(−2 k) re-weighted rows of A. C.7.2 Row sampling for linear regression Theorem C.26 (Theorem 5 in [CNW15]). We are given A ∈ Rn×d with kAk22 ≤ 1 and kAk2F ≤ k, and an  ∈ (0, 1). There exists a diagonal matrix S with O(k/2 ) nonzero entries such that k(SA)> SA − A> Ak2 ≤ . Corollary C.27. Given a rank-k matrix A ∈ Rn×d , vector b ∈ Rn , and parameter  > 0, let U ∈ Rn×(k+1) denote an orthonormal basis of [A, b]. Let S ∈ Rn×n denote a sampling and rescaling diagonal matrix according to Leverage score sampling and sparse BSS sampling of U with m nonzero entries. If m = O(k), then S is a (1±1/2) subspace embedding for U ; if m = O(k/), then S satisfies √ -operator norm approximate matrix product for U . Proof. This follows by Lemma C.22, Lemma C.24 and Theorem C.26. Lemma C.28 ([NW14]). Given A ∈ Rn×d and b ∈ Rn , let S ∈ Rn×n denote a sampling and rescaling diagonal matrix. Let x∗ denote arg minx kAx − bk22 and x0 denote arg minx kSAx − Sbk22 . √ If S is a (1 ± 1/2) subspace embedding for the column span of A, and 0 (= )-operator norm approximate matrix product for U adjoined with b − Ax∗ , then, with probability at least .999, kAx0 − bk22 ≤ (1 + )kAx∗ − bk22 . 54 Proof. We define OPT = minkAx−bk2 . We define x0 = arg minkSAx−Sbk22 and x∗ = arg minkAx− x x x bk22 . Let w = b − Ax∗ . Let U denote an orthonormal basis of A. We can write Ax0 − Ax∗ = U β. Then, we have, kAx0 − bk22 = kAx0 − Ax∗ + AA† b − bk22 by x∗ = A† b = kU β + (U U > − I)bk22 = kAx∗ − Ax0 k22 + kAx∗ − bk22 by Pythagorean Theorem = kU βk22 + OPT2 = kβk22 + OPT2 . If S is a (1 ± 1/2) subspace embedding for U , then we can show kβk2 − kU > S > SU βk2 ≤ kβ − U > S > SU βk2 by triangle inequality > > = k(I − U S SU )βk2 ≤ kI − U > S > SU k2 · kβk2 1 ≤ kβk2 . 2 Thus, we obtain kU > S > SU βk2 ≥ kβk2 /2. Next, we can show kU > S > SU βk2 = kU > S > S(Ax0 − Ax∗ )k22 = kU > S > S(A(SA)† Sb − Ax∗ )k2 = kU > S > S(b − Ax∗ )k2  We define U 0 = U have by x0 = (SA)† Sb by SA(SA)† = I = kU > S > Swk2 . by w = b − Ax∗  w/kwk2 . We define X and y to satisfy U = U 0 X and w = U 0 y. Then, we kU > S > Swk2 = kU > S > Sw − U > wk2 by U > w = 0 = kX > U 0> S > SU 0 y − X > U 0> U 0 yk2 = kX > (U 0> S > SU 0 − I)yk2 ≤ kXk2 · kU 0> S > SU 0 − Ik2 · kyk2 ≤ 0 kXk2 kyk2 = 0 kU k2 kwk2 = 0 OPT, by kU k2 = 1 and kwk2 = OPT where the fifth inequality follows since S satisfies 0 -operator norm approximate matrix product for the column span of U adjoined with w. 55 Putting it all together, we have kAx0 − bk22 = kAx∗ − bk22 + kAx∗ − Ax0 k22 = OPT2 +kβk22 ≤ OPT2 +4kU > S > Swk22 ≤ OPT2 +4(0 OPT)2 by 0 = ≤ (1 + ) OPT2 . 1√ . 2 Finally, note that S satisfies 0 -operator norm approximate matrix product for U adjoined with w if it is a (1 ± 0 )-subspace embedding for U adjoined with w, which holds using BSS sampling by Theorem 5 of [CNW15] with O(d/) samples. C.7.3 Leverage scores for multiple regression Lemma C.29 (see, e.g., Lemma 32 in [CW13] among other places). Given matrix A ∈ Rn×d with orthonormal columns, and parameter  > 0, if S ∈ Rn×n is a sampling and rescaling diagonal matrix according to the leverage scores of A where the number of nonzero entries is t = O(1/2 ), then, for any B ∈ Rn×m , we have kA> S > SB − A> Bk2F < 2 kAk2F kBk2F , holds with probability at least 0.9999. Corollary C.30. Given matrix A ∈ Rn×d with orthonormal columns, and parameter  > 0, if S ∈ Rn×n is a sampling and rescaling diagonal matrix according to the leverage scores of A with m nonzero entries, then if mp= O(d log d), then S is a (1 ± 1/2) subspace embedding for A. If m = O(d/), then S satisfies /d-Frobenius norm approximate matrix product for A. Proof. This follows by Lemma C.22 and Lemma C.29. Lemma C.31 ([NW14]). Given A ∈ Rn×d and B ∈ Rn×m , let S ∈ Rn×n denote a sampling and rescaling matrix according to A. Let X ∗ denote arg minX kAX−Bk2F and X 0 denote arg minX kSAX− SBk2F . Let U denote p an orthonormal basis for A. If S is a (1 ± 1/2) subspace embedding for U , and satisfies 0 (= /d)-Frobenius norm approximate matrix product for U , then, we have that kAX 0 − Bk2F ≤ (1 + )kAX ∗ − Bk2F holds with probability at least 0.999. Proof. We define OPT = minX kAX − BkF . Let A = U ΣV > denote the SVD of A. Since A has rank k, U and V have k columns. We can write A(X 0 − X ∗ ) = U β. Then, we have kAX 0 − Bk2F = kAX 0 − AX ∗ + AA† B − Bk2F = kU β + (U U > − I)Bk2F = kAX ∗ − AX 0 k2F + kAX ∗ − Bk2F = kU βk2F + OPT2 = kβk2F + OPT2 . by X ∗ = A† B by Pythagorean Theorem (15) 56 If S is a (1 ± 1/2) subspace embedding for U , then we can show, kβkF − kU > S > SSU βkF ≤ kβ − U > S > SU βkF by triangle inequality > > = k(I − U S SU )βkF ≤ k(I − U > S > SU )k2 · kβkF 1 ≤ kβkF . 2 Thus, we obtain by kABkF ≤ kAk2 kBkF by k(I − U > S > SU )k2 ≤ 1/2 kU > S > SU βkF ≥ kβkF /2. (16) Next, we can show kU > S > SU βkF = kU > S > S(AX 0 − AX ∗ )kF = kU > S > S(A(SA)† Sb − AX ∗ )kF by X 0 = (SA)† SB = kU > S > S(B − AX ∗ )kF . by SA(SA)† = I Then, we can show kU > S > S(B − AX ∗ )kF ≤ 0 kU > kF kB − AX ∗ kF √ = 0 d OPT . by kU kF = √ by Lemma C.29 d and kB − AX ∗ kF = OPT (17) Putting it all together, we have kAX 0 − Bk2F = kAX ∗ − Bk2F + kAX ∗ − AX 0 k2F = OPT2 +kβk2F by Equation (15) ≤ OPT2 +4kU > S > Swk2F √ ≤ OPT2 +4(0 d OPT)2 by Equation (16) ≤ (1 + ) OPT2 . C.7.4 by Equation (17) 1p by 0 = /d 2 Sampling columns according to leverage scores implicitly, improving polynomial running time to nearly linear running time This section explains an algorithm that is able to sample from the leverage scores from the product of two matrices U, V without explicitly writing down U V . To build this algorithm we combine TensorSketch, some ideas from [DMIMW12] and some ideas from [AKO11, MW10]. Finally, we are able to improve the running time of sampling columns according to leverage scores from Ω(n2 ) e to O(n). Given two matrices U, V ∈ Rk×n , we define A ∈ Rk×n1 n2 to be the matrix where the i-th row of A is the vectorization of U i ⊗ V i , ∀i ∈ [k]. Naïvely, in order to sample O(poly(k, 1/)) rows from A> according to leverage scores, we need to write down n2 leverage scores. This approach will take at least Ω(n2 ) running time. In the rest of this section, we will explain how to do it in O(n · poly(log n, k, 1/)) time. In Section C.10.1, we will explain how to extend this idea from 3rd order tensors to general q-th order tensors and remove the poly(log n) factor from running time, i.e., obtain O(n · poly(k, 1/)) time. 57 Algorithm 10 Fast Tensor Leverage Score Sampling 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: procedure FastTensorLeverageScore(U, V, n1 , n2 , k, , Rsamples ) . Lemma C.32 s1 ← poly(k, 1/). g1 ← g2 ← g3 ← O(−2 log(n1 n2 )). Choose Π ∈ Rn1 n2 ×s1 to be a TensorSketch. . Definition B.34 −1 k×k Compute R ∈ R by using (U V )Π. . U ∈ Rk×n1 , V ∈ Rk×n2 g ×k Choose G1 ∈ R 1 to be a Gaussian sketching matrix. for i = 1 → g1 do w ← (Gi R−1 )> . Gi denotes the i-th row of G for j = 1 → [n1 ] do . Form matrix U 0i ∈ Rk×n1 Uj0i ← w ◦ Uj , ∀j ∈ [n1 ]. . Uj denotes the j-th column of U ∈ Rk×n1 end for end for Choose G2,i ∈ Rg2 ×n1 to be a Gaussian sketching matrix. for i = 1 → g1 do αi ← k(G2,i U 0i> )V k2F . Choose G3,i ∈ Rg3 ×n1 to be a Gaussian sketching matrix. for j2 = 1 → n2 do βi,j ← kG3,i (U 0i> )Vj2 k22 . end for end for S ← ∅. for r = 1 → Rsamples do P 0 Sample i from [g1 ] with probability αi / gi01P =1 αi . Sample j2 from [n2 ] with probability βi,j2 / nj 02=1 βi,j20 . 2 for j1 = 1 → n1 do γj1 ← ((U 0i> )j1 Vj2 )2 . end for P Sample j1 from [n1 ] with probability γj1 / nj 01=1 γj10 . 1 S ← S ∪ (j1 , j2 ). end for Convert S into a diagonal matrix D with at most Rsamples nonzero entries. return D. . Diagonal matrix D ∈ Rn1 n2 ×n1 n2 end procedure Lemma C.32. Given two matrices U ∈ Rk×n1 and V ∈ Rk×n2 , there exists an algorithm that takes O((n1 + n2 ) · poly(log(n1 n2 ), k) · Rsamples ) time and samples Rsamples columns of U V ∈ Rk×n1 n2 according to the leverage scores of R−1 (U V ), where R is the R of a QR factorization. Proof. We choose Π ∈ Rn1 n2 ×s1 to be a TensorSketch. Then, according to Section B.10, we can compute R−1 in n · poly(log n, k, 1/) time, where R is the R in a QR-factorization. We want to sample columns from U V according to the square of the `2 -norms of each column of R−1 (U V ). However, explicitly writing down the matrix R−1 (U V ) takes kn1 n2 time, and the number of columns is already n1 n2 . The goal is to sample columns from R−1 (U V ) without explicitly computing the square of the `2 -norm of each column. The first simple observation is that the following two sampling procedures are equivalent in terms of the column samples of a matrix that they take. (1) We sample a single entry from the 58 matrix R−1 (U V ) proportional to its squared value. (2) We sample a column from the matrix R−1 (U V ) proportional to its squared `2 -norm. Let the (i, j1 , j2 )-th entry denote the entry in the i-th row and the (j1 − 1)n2 + j2 -th column. We can show, for a particular column (j1 − 1)n2 + j2 , Pr[sample an entry from the (j1 − 1)n2 + j2 th column of a matrix] = = k X i=1 k X i=1 = Pr[sample the (i, j1 , j2 )-th entry of matrix] |(R−1 (U V ))i,(j1 −1)n2 +j2 |2 kR−1 (U V )k2F k(R−1 (U V ))(j1 −1)n2 +j2 k2 kR−1 (U V )k2F = Pr[sample the (j1 − 1)n2 + j2 th column of matrix]. (18) Thus, it is sufficient to show how to sample a single entry from matrix R−1 (U V ) proportional to its squared value without writing down all of the entries of a k × n1 n2 matrix. We choose a Gaussian matrix G1 ∈ Rg1 ×k with g1 = O(−2 log(n1 n2 )). By Claim C.33 we can reduce the length of each column vector of matrix R−1 U V from k to g1 while preserving the squared `2 -norm of all columns simultaneously. Thus, we obtain a new matrix GR−1 (U V ) ∈ Rg1 ×n1 n2 , and sampling from this new matrix is equivalent to sampling from the original matrix R−1 (U V ). In the following paragraphs, we explain a sampling procedure (also described in Procedure FastTensorLeverageScore in Algorithm 10) which contains three sampling steps. The first step is sampling i from [g1 ], the second step is sampling j2 from [n2 ], and the last step is sampling j1 from [n1 ]. For each j1 ∈ [n1 ], let Uj1 denote the j1 -th column of U . For each i ∈ [g1 ], let Gi1 denote the i-th row of matrix G1 ∈ Rg1 ×k , let U 0i ∈ Rk×n1 denote a matrix where the j1 -th column is (Gi R−1 )> ◦ Uj1 ∈ Rk , ∀j ∈ [n1 ]. Then, using Claim C.37, we have that (Gi R−1 ) · (U V ) ∈ Rn1 n2 is a row vector where the entry in the (j1 − 1)n2 + j2 -th coordinate is the entry in the j1 -th row and j2 th column of matrix (U 0i> V ) ∈ Rn1 ×n2 . Further, the squared `2 -norm of vector (Gi R−1 ) · (U V ) is equal to the squared Frobenius norm of matrix (U 0i> V ). Thus, sampling i proportional to the squared `2 -norm of vector (Gi R−1 ) · (U V ) is equivalent to sampling i proportional to the squared Frobenius norm of matrix (U 0i> V ). Naïvely, computing the Frobenius norm of an n1 × n2 matrix requires O(n1 n2 ) time. However, we can choose a Gaussian matrix G2,i ∈ Rg2 ×n1 to sample according to the value k(G2,i U 0i> )V k2F , which can be computed in O((n1 + n2 )g2 k) time. By claim C.35, k(G2,i U 0i> )V k2F ≈ k(U 0i> )V k2F with high probability. So far, we have finished the first step of the sampling procedure. For the second step of the sampling procedure, we need to sample j2 from [n2 ]. To do that, we need to compute the squared `2 -norm of each column of U 0i> V ∈ Rn1 ×n2 . This can be done by choosing another Gaussian matrix G3,i ∈ Rg3 ×n1 . For all j2 ∈ [n2 ], by Claim C.36, we have kG3,i U 0i> Vj2 k22 ≈ kU 0i> Vj2 k22 . Also, for j2 ∈ [n2 ], kG3,i U 0i> Vj2 k22 can be computed in nearly linear in n1 + n2 time. For the third step of the sampling procedure, we need to sample j1 from [n1 ]. Since we already have i and j2 from the previous two steps, we can directly compute |(U 0i> )j1 Vj2 |2 , for all j1 . This only takes O(n1 k) time. Overall, the running time is O((n1 + n2 ) · poly(log(n1 n2 ), k, 1/)). Because our estimates are accurate enough, our sampling probabilities are also good approximations to the leverage score sampling probabilities. Putting it all together, we complete the proof. 59 Claim C.33. Given matrix R−1 (U V ) ∈ Rk×n1 n2 , let G1 ∈ Rg1 ×k denote a Gaussian matrix with g1 = (−2 log(n1 n2 )). Then with probability at least 1 − 1/ poly(n1 n2 ), we have: for all j ∈ [n1 n2 ], (1 − )kR−1 (U V )j k22 ≤ kG1 R−1 (U V )j k22 ≤ (1 + )kR−1 (U V )j k22 . Proof. This follows by the Johnson-Lindenstrauss Lemma. Claim C.34. For a fixed i ∈ [g1 ], let G2,i ∈ Rg2 ×n1 denote a Gaussian matrix with g2 = O(−2 log(n1 n2 )). Then with probability at least 1 − 1/ poly(n1 n2 ), we have: for all j2 ∈ [n2 ], (1 − )kU 0i> Vj2 k22 ≤ k(G2,i U 0i> )Vj2 k2 ≤ (1 + )kU 0i> Vj2 k22 . By taking the union bound over all i ∈ [g1 ], we obtain a stronger claim, Claim C.35. With probability at least 1 − 1/ poly(n1 n2 ), we have : for all i ∈ [g1 ], for all j2 ∈ [n2 ], (1 − )kU 0i> Vj2 k22 ≤ k(G2,i U 0i> )Vj2 k2 ≤ (1 + )kU 0i> Vj2 k22 . Similarly, if we choose G3,i to be a Gaussian matrix, we can obtain the same result as for G2,i : Claim C.36. With probability at least 1 − 1/ poly(n1 n2 ), we have : for all i ∈ [g1 ], for all j2 ∈ [n2 ], (1 − )kU 0i> Vj2 k22 ≤ k(G3,i U 0i> )Vj2 k2 ≤ (1 + )kU 0i> Vj2 k22 . Claim C.37. For any i ∈ [g1 ], j1 ∈ [n1 ], j2 ∈ [n2 ], let Gi1 denote the i-th row of matrix G1 ∈ Rg1 ×k . Let (U V )(j1 −1)n2 +j2 denote the (j1 − 1)n2 + j2 -th column of matrix Rk×n1 n2 . Let (U 0i> )j1 denote the j1 -th row of matrix (U 0i> ) ∈ Rn1 ×k . Let Vj2 denote the j2 -th column of matrix V ∈ Rk×n2 . Then, we have Gi1 R−1 (U V )(j1 −1)n2 +j2 = (U 0i> )j1 Vj2 . Proof. This follows by, Gi1 R−1 (U V )(j1 −1)n2 +j2 = Gi1 R−1 (Uj1 ◦ Vj2 ) = (Gi1 R−1 ◦ (Uj1 )> )Vj2 = (U 0i> )j1 Vj2 . 2 Lemma C.38. Given A ∈ Rn×n , V, W ∈ Rk×n , for any  > 0, there exists an algorithm that runs 2 2 in O(n · poly(k, 1/)) time and outputs a diagonal matrix D ∈ Rn ×n with m = O(k log k + k/) nonzero entries such that, b (V kU W ) − Ak2F ≤ (1 + ) min kU (V U ∈Rn×k W ) − Ak2F , b denotes the optimal solution to minU kU (V holds with probability at least 0.999, where U 2 ADkF . W )D − Proof. This follows by combining Theorem C.46, Corollary C.30, and Lemma C.31. Remark C.39. Replacing Theorem C.46 (Algorithm 15) by Lemma C.32 (Algorithm 10), we can obtain a slightly different version of Lemma C.38 with n poly(log n, k, 1/) running time, where the dependence on k is better. 60 Algorithm 11 Frobenius Norm CURT Decomposition Algorithm, Input Sparsity Time and Nearly Optimal Number of Samples 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: procedure FCURTInputSparsity(A, UB , VB , WB , n, k, ) . Theorem C.40 d1 ← d2 ← d3 ← O(k log k + k/). 0 ← 0.01. 2 Form B1 = VB> WB> ∈ Rk×n . D1 ←FastTensorLeverageScoreGeneralOrder(VB> , WB> , n, n, k, 0 , d1 ). . Algorithm 15 b = A1 D1 (B1 D1 )† ∈ Rn×k . Form U b > W > ∈ Rk×n2 . Form B2 = U B b > , W > , n, n, k, 0 , d2 ). D2 ←FastTensorLeverageScoreGeneralOrder(U B Form Vb = A2 D2 (B2 D2 )† ∈ Rn×k . b > Vb > ∈ Rk×n2 . Form B3 = U b > , Vb > , n, n, k, 0 , d3 ). D3 ←FastTensorLeverageScoreGeneralOrder(U C←A P1 D1 , R ← A2 D2 , T ← A3 D3 . U ← ki=1 ((B1 D1 )† )i ⊗ ((B2 D2 )† )i ⊗ ((B3 D3 )† )i . return C, R, T and U . end procedure C.7.5 Input sparsity time algorithm Theorem C.40. Given a 3rd order tensor A ∈ Rn×n×n , let k ≥ 1, and let UB , VB , WB ∈ Rn×k denote a rank-k, α-approximation to A. Then there exists an algorithm which takes O(nnz(A) + n poly(k, 1/)) time and outputs three matrices C ∈ Rn×c with columns from A, R ∈ Rn×r with rows from A, T ∈ Rn×t with tubes from A, and a tensor U ∈ Rc×r×t with rank(U ) = k such that c = r = t = O(k log k + k/), and c X r X t X i=1 j=1 l=1 2 Ui,j,l · Ci ⊗ Rj ⊗ Tl − A ≤ (1 + )α min rank −k A0 kA0 − Ak2F F holds with probability 9/10. Proof. We define OPT := min rank −k A0 kA0 − Ak2F . We already have three matrices UB ∈ Rn×k , VB ∈ Rn×k and WB ∈ Rn×k and these three matrices provide a rank-k, α-approximation to A, i.e., k X (UB )i ⊗ (VB )i ⊗ (WB )i − A i=1 2 2 F ≤ α OPT . (19) Let B1 = VB> WB> ∈ Rk×n denote the matrix where the i-th row is the vectorization of (VB )i ⊗ 2 2 (WB )i . Let D1 ∈ Rn ×n be a sampling and rescaling matrix corresponding to sampling by the 2 leverage scores of B1> ; there are d1 nonzero entries on the diagonal of D1 . Let Ai ∈ Rn×n denote the matrix obtained by flattening A along the i-th direction, for each i ∈ [3]. 61 b = A1 D1 (B1 D1 )† ∈ Rn×k , Define U ∗ ∈ Rn×k to be the optimal solution to min kU B1 −A1 k2F , U U ∈Rn×k and V0 ∈ Rn×k to be the optimal solution to b> min kV · (U V ∈Rn×k WB> ) − A2 k2F . Due to Lemma C.38, if d1 = O(k log k + k/) then with constant probability, we have b B1 − A1 k2F ≤ αD kU ∗ B1 − A1 k2F . kU 1 (20) b > W > ) ∈ Rk×n2 denotes the matrix where the i-th row is the vectorization of Recall that (U B bi ⊗ (WB )i , ∀i ∈ [k]. Now, we can show, U b> kV0 · (U b B1 − A1 k2F WB> ) − A2 k2F ≤ kU b> by V0 = arg minkV · (U V ∈Rn×k ≤ αD1 kU ∗ B1 − A1 k2F ≤ αD1 kUB B1 − WB> ) − A2 k2F by Equation (20) ∗ A1 k2F by U = arg minkU B1 − A1 k2F U ∈Rn×k ≤ αD1 α OPT . by Equation (19) (21) b > W > . Let D2 ∈ Rn2 ×n2 be a sampling and rescaling matrix corresponding We define B2 = U B to the leverage scores of B2> . Suppose there are d2 nonzero entries on the diagonal of D2 . Define V ∗ ∈ Rn×k to be the optimal solution to minV ∈Rn×k kV B2 − A2 k2F , Vb = A2 D2 (B2 D2 )† ∈ b > Vb > ) − A3 k2 , and V 0 to be the Rn×k , W0 ∈ Rn×k to be the optimal solution to min kW · (U F W ∈Rn×k optimal solution to min kV B2 D2 − A2 D2 k2F . V ∈Rn×k Due to Lemma C.38, with constant probability, we have kVb B2 − A2 k2F ≤ αD2 kV ∗ B2 − A2 k2F . (22) 2 b > Vb > ) ∈ Rk×n denotes the matrix where the i-th row is the vectorization of Recall that (U bi ⊗ Vbi , ∀i ∈ [k]. Now, we can show, U b> kW0 · (U Vb > ) − A3 k2F ≤ kVb B2 − A2 k2F W ∈Rn×k ≤ αD2 kV ∗ B2 − A2 k2F ≤ αD2 kV0 B2 − b> by W0 = arg minkW · (U Vb > ) − A3 k2F by Equation (22) ∗ A2 k2F by V = arg minkV B2 − A2 k2F V ∈Rn×k ≤ αD2 αD1 α OPT . by Equation (21) (23) b > Vb > . Let D3 ∈ Rn2 ×n2 denote a sampling and rescaling matrix correspondWe define B3 = U ing to sampling by the leverage scores of B3> . Suppose there are d3 nonzero entries on the diagonal of D3 . c = A3 D3 (B3 D3 )† ∈ Define W ∗ ∈ Rn×k to be the optimal solution to minW ∈Rn×k kW B3 −A3 k2F , W n×k 0 2 R , and W to be the optimal solution to min kW B3 D3 − A3 D3 kF . W ∈Rn×k Due to Lemma C.38 with constant probability, we have Now we can show, c B3 − A3 k2 ≤ αD kW ∗ B3 − A3 k2 . kW F F 3 c B3 − A3 k2F ≤ αD kW ∗ B3 − A3 k2F , kW 3 (24) by Equation (24) ∗ A3 k2F , by W = arg minkW B3 − A3 k2F ≤ αD3 αD2 αD1 α OPT . by Equation (23) ≤ αD3 kW0 B3 − W ∈Rn×k 62 This implies, k X i=1 2 bi ⊗ Vbi ⊗ W ci − A U F ≤ O(1)α OPT2 . b = A1 D1 (B1 D1 Vb = A2 D2 (B2 D2 W c = A3 D3 (B3 D3 )† . where U By Lemma C.38, we need to set d1 = d2 = d3 = O(k log k + k/). Note that B1 = (VB> WB> ). Thus D1 can be found in n · poly(k, 1/) time. Because D1 has a small number of nonzero entries on the diagonal, we can compute B1 D1 quickly without explicitly writing down B1 . Also A1 D1 b in n poly(k, 1/) can be computed in nnz(A) time. Using (A1 D1 ) and (B1 D1 ), we can compute U time. In a similar way, we can compute B2 , D2 , B3 , and D3 . Since tensor U is constructed based on three poly(k, 1/) size matrices, (B1 D1 )† , (B2 D2 )† , and (B3 D3 )† , the overall running time is O(nnz(A) + n poly(k, 1/)) )† , C.7.6 )† , Optimal sample complexity algorithm Algorithm 12 Frobenius Norm CURT Decomposition Algorithm, Optimal Sample Complexity 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: procedure FCURTOptimalSamples(A, UB , VB , WB , n, k) . Theorem C.41 d1 ← d2 ← d3 ← O(k/). 2 Form B1 = VB> WB> ∈ Rk×n . > 2 D1 ←GeneralizedMatrixRowSubsetSelection(A> . Algorithm 7 1 , B1 , n , n, k, ). Let d1 denote the number of nonzero entries in D1 . . d1 = O(k/) b = A1 D1 (B1 D1 )† ∈ Rn×k . Form U b > W > ∈ Rk×n2 . Form B2 = U B > 2 D2 ←GeneralizedMatrixRowSubsetSelection(A> . Algorithm 7 2 , B2 , n , n, k, ). Let d2 denote the number of nonzero entries in D2 . . d2 = O(k/) Form Vb = A2 D2 (B2 D2 )† ∈ Rn×k . b > Vb > ∈ Rk×n2 . Form B3 = U > 2 D3 ←GeneralizedMatrixRowSubsetSelection(A> . Algorithm 7 3 , B3 , n , n, k, ). d3 denote the number of nonzero entries in D3 . . d3 = O(k/) C←A P1 D1 , R ← A2 D2 , T ← A3 D3 . U ← ki=1 ((B1 D1 )† )i ⊗ ((B2 D2 )† )i ⊗ ((B3 D3 )† )i . return C, R, T and U . end procedure Theorem C.41. Given a 3rd order tensor A ∈ Rn×n×n , let k ≥ 1, and let UB , VB , WB ∈ Rn×k denote a rank-k, α-approximation to A. Then there exists an algorithm which takes O(nnz(A) log n+ n2 poly(log n, k, 1/)) time and outputs three matrices: C ∈ Rn×c with columns from A, R ∈ Rn×r with rows from A, T ∈ Rn×t with tubes from A, and a tensor U ∈ Rc×r×t with rank(U ) = k such that c = r = t = O(k/), and c X r X t X i=1 j=1 l=1 2 Ui,j,l · Ci ⊗ Rj ⊗ Tl − A ≤ (1 + )α min rank −k A0 kA0 − Ak2F F holds with probability 9/10. Proof. The proof is almost the same as the proof of Theorem C.40. The only difference is that instead of using Theorem C.38, we use Theorem C.14. 63 C.8 Face-based selection and decomposition Previously we provided column-based tensor CURT algorithms, which are algorithms that can select a subset of columns from each of the three dimensions. Here we provide two face-based tensor CURT decomposition algorithms. The first algorithm runs in polynomial time and is a bicriteria algorithm (the number of samples is poly(k/)). The second algorithm needs to start with a rank-k (1 + O())approximate solution, which we then show how to combine with our previous algorithm. Both of our algorithms are able to select a subset of column-row faces, a subset of row-tube faces and a subset of column-tube faces. The second algorithm is able to output U , but the first algorithm is not. C.8.1 Column-row, column-tube, row-tube face subset selection Algorithm 13 Frobenius Norm Tensor Column-row, Row-tube and Tube-column Face Subset Selection 1: procedure FFaceCRTSelection(A, n, k, ) . Theorem C.42 2: s1 ← s2 ← O(k/). 3: Choose a Gaussian matrix S1 with s1 columns. . Definition B.18 4: Choose a Gaussian matrix S2 with s2 columns. . Definition B.18 5: Form matrix V3 by setting the (i, j)-th column to be (A2 S2 )j . 6: D3 ←GeneralizedMatrixRowSubsetSelection(A2 ,V3 ,n,n2 ,s1 s2 ,). . Algorithm 7 7: Let d3 denote the number of nonzero entries in D3 . . d3 = O(s1 s2 /) 8: Form matrix U2 by setting the (i, j)-th column to be (A1 S1 )i . 9: D2 ←GeneralizedMatrixRowSubsetSelection(A1 ,U2 ,n,n2 ,s1 s2 ,). 10: Let d2 denote the number of nonzero entries in D2 . . d2 = O(s1 s2 /) 11: Form matrix W1 by setting the (i, j)-th column to be (A(I, D3 , I)3 )j . 12: D1 ←GeneralizedMatrixRowSubsetSelection(A3 ,W1 ,n,n2 ,s1 s2 ,). 13: Let d1 denote the number of nonzero entries in D1 . . d1 = O(s1 s2 /) 14: T ← A(I, I, D1 ), C ← A(D2 , I, I), and R ← A(I, D3 , I). 15: return C, R and T . 16: end procedure Theorem C.42. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, there exists an algorithm which takes O(nnz(A)) log n + n2 poly(log n, k, 1/) time and outputs three tensors : a subset C ∈ Rc×n×n of row-tube faces of A, a subset R ∈ Rn×r×n of column-tube faces of A, and a subset T ∈ Rn×n×t of column-row faces of A, where c = r = t = poly(k, 1/), and for which there exists a tensor U ∈ Rtn×cn×rn for which kU (T1 , C2 , R3 ) − Ak2F ≤ (1 + ) min rank −k A0 kA0 − Ak2F , or equivalently, tn X cn X rn X i=1 j=1 l=1 2 Ui,j,l · (T1 )i ⊗ (C2 )j ⊗ (R3 )l − A ≤ (1 + ) min rank −k A0 kA0 − Ak2F . F 2 Proof. We fix V ∗ ∈ Rn×k and W ∗ ∈ Rn×k . We define Z1 ∈ Rk×n where the i-th row of Z1 is 2 the vector Vi ⊗ Wi . Choose a sketching (Gaussian) matrix S1 ∈ Rn ×s1 (Definition B.18), and let 64 b = A1 S1 (Z1 S1 )† ∈ Rn×k . Following a similar argument as in the previous theorem, we have U b Z1 − A1 k2F ≤ (1 + ) OPT . kU b and W ∗ . We define Z2 ∈ Rk×n2 where the i-th row of Z2 is the vector U bi ⊗ W ∗ . Choose We fix U i 2 a sketching (Gaussian) matrix S2 ∈ Rn ×s2 (Definition B.18), and let Vb = A2 S2 (Z2 S2 )† ∈ Rn×k . Following a similar argument as in the previous theorem, we have kVb Z2 − A2 k2F ≤ (1 + )2 OPT . b and Vb . Note that U b = A1 S1 (Z1 S1 )† and Vb = A2 S2 (Z2 S2 )† . We define Z3 ∈ Rk×n2 We fix U bi ⊗ Vbi . Let z3 = s1 · s2 . We define Z 0 ∈ Rz3 ×n2 such such that the i-th row of Z3 is the vector U 3 that, ∀i ∈ [s1 ], ∀j ∈ [s2 ], the i + (j − 1)s1 -th row of Z30 is the vector (A1 S1 )i ⊗ (A2 S2 )j . We define U3 ∈ Rn×z3 to be the matrix where the i + (j − 1)s1 -th column is (A1 S1 )i and V3 ∈ Rn×z3 to be the matrix where the i + (j − 1)s1 -th column is (A2 S2 )j . Then Z30 = (U3> V3> ). We first have, min W ∈Rn×k ,X∈Rk×z3 kW XZ30 − A3 k2F ≤ min kW Z3 − A3 k2F ≤ (1 + )2 OPT . W ∈Rn×k Now consider the following objective function, min W ∈Rn×z3 kV3 · (W > U3> ) − A2 k2F . Let D3 denote a sampling and rescaling diagonal matrix according to V1 ∈ Rn×z3 , let d3 denote the number of nonzero entries of D3 . Then we have min kD3 V3 · (W > min kU3 ⊗ (D3 V3 ) ⊗ W − A(I, D3 , I)k2F min kW · (U3> W ∈Rn×z3 = = W ∈Rn×z3 W ∈Rn×z3 U3> ) − D3 A2 k2F (D3 V3 )> ) − (A(I, D3 , I))3 k2F , where the first equality follows by retensorizing the objective function, and the second equality follows by flattening the tensor along the third dimension. Let Z 3 denote (U3> (D3 V3 )> ) ∈ Rz3 ×nd3 and W 0 = (A(I, D3 , I))3 ∈ Rn×nd3 . Using Theo2 2 rem C.14, we can find a diagonal matrix D3 ∈ Rn ×n with d3 = O(z3 /) = O(k 2 /3 ) nonzero entries such that kU3 ⊗ V3 ⊗ (W 0 Z3† ) − Ak2F ≤ (1 + )3 OPT . † We define U2 = U3 ∈ Rn×z2 with z2 = z3 . We define W2 = W 0 Z 3 ∈ Rn×z2 with z2 = z3 . We consider, min V ∈Rn×z2 kU2 · (V > W2> ) − A1 k2F . Let D2 denote a sampling and rescaling matrix according to U2 , and let d2 denote the number of nonzero entries of D2 . Then, we have min kD2 U2 · (V > min kD2 U2 ⊗ V ⊗ W2 − A(D2 , I, I)k2F min kV · (W2> V ∈Rn×z2 = = V ∈Rn×z2 V ∈Rn×z2 W2> ) − D2 A1 k2F (D2 U2 )> ) − (A(D2 , I, I))2 k2F , 65 where the first equality follows by retensorizing the objective function, and the second equality follows by flattening the tensor along the second dimension. Let Z 2 denote (W2> (D2 U2 )> ) ∈ Rz2 ×nd2 and V 0 = (A(D2 , I, I))2 ∈ Rn×nd2 . Using Theo2 2 rem C.14, we can find a diagonal matrix D2 ∈ Rn ×n with d2 = O(z2 /) nonzero entries such that † kU2 ⊗ (V 0 Z 2 ) ⊗ W2 − Ak2F ≤ (1 + )4 OPT . † We define W1 = W2 ∈ Rn×z1 with z1 = z2 , and define V1 = (V 0 Z 2 ) ∈ Rn×z1 with z1 = z2 . Let D1 denote a sampling and rescaling matrix according to W1 , and let d1 denote the number of nonzero entries of D1 . Then we have min kD1 W1 · (U > min kU ⊗ V1 ⊗ (D1 W1 ) − A(I, I, D1 )k2F min kU · (V1> U ∈Rn×z1 = = U ∈Rn×z1 U ∈Rn×z1 V1> ) − D1 A3 k2F (D1 W1 )> ) − A(I, I, D1 )1 k2F where the first equality follows by unflattening the objective function, and second equality follows by flattening the tensor along the first dimension. Let Z 1 denote (V1> (D1 W1 )> ) ∈ Rz1 ×nd1 , and U 0 = A(I, I, D1 )1 ∈ Rn×nd1 . Using Theo2 2 rem C.14, we can find a diagonal matrix D1 ∈ Rn ×n with d1 = O(z1 /) nonzero entries such that † k(U 0 Z 1 ) ⊗ (V1 ) ⊗ W1 − Ak2F ≤ (1 + )5 OPT, which means, † † † k(U 0 Z 1 ) ⊗ (V 0 Z 2 ) ⊗ (W 0 Z 3 ) − Ak2F ≤ (1 + )5 OPT . Putting U 0 , V 0 , W 0 together completes the proof. Corollary C.43. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, there exists an algorithm which takes O(nnz(A)) + n2 poly(k, 1/) time and outputs three tensors : a subset C ∈ Rc×n×n of row-tube faces of A, a subset R ∈ Rn×r×n of column-tube faces of A, and a subset T ∈ Rn×n×t of column-row faces of A, where c = r = t = poly(k, 1/), so that there exists a tensor U ∈ Rtn×cn×rn for which kU (T1 , C2 , R3 ) − Ak2F ≤ (1 + ) min rank −k A0 kA0 − Ak2F , or equivalently, tn X cn X rn X i=1 j=1 l=1 2 Ui,j,l · (T1 )i ⊗ (C2 )j ⊗ (R3 )l − A ≤ (1 + ) min rank −k A0 kA0 − Ak2F F Proof. If we allow a poly(k/) factor increase in running time and a poly(k/) factor increase in the number of faces selected, then instead of using generalized row subset selection, which has running time depending on log n, we can use the technique in Section C.11 to avoid the log n factor. 66 Algorithm 14 Frobenius Norm (Face-based) CURT Decomposition Algorithm, Optimal Sample Complexity 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: procedure FFaceCURTDecomposition(A, UB , VB , WB , n, k) . Theorem C.44 D1 ←GeneralizedMatrixRowSubsetSelection(A3 , WB , n, n2 , k, ). . Algorithm 7, the number of nonzero entries is d1 = O(k/) Form Z1 = VB> (D1 WB )> . b = (A(I, I, D1 ))1 Z † ∈ Rn×k . Form U 1 b , n, n2 , k, ). . The number of D2 ←GeneralizedMatrixRowSubsetSelection(A1 , U nonzero entries is d2 = O(k/) b )). Form Z2 = (WB> (D2 U b Form V = (A(D2 , I, I))2 Z2† ∈ Rn×k . D3 ←GeneralizedMatrixRowSubsetSelection(A2 , Vb , n, n2 , k, ). . The number of nonzero entries is d3 = O(k/) b > (D3 Vb )> . Form Z3 = U c = (A(I, D3 , I))3 (Z3 )† ∈ Rn×k . Form W T ← A(I, P I, D1 ), C ← A(D2 , I, I), R ← A(I, D3 , I). U ← ki=1 ((Z1 )† )i ⊗ ((Z2 )† )i ⊗ ((Z3 )† )i . return C, R, T and U . end procedure C.8.2 CURT decomposition Theorem C.44. Given a 3rd order tensor A ∈ Rn×n×n , let k ≥ 1, and let UB , VB , WB ∈ Rn×k denote a rank-k, α-approximation to A. Then there exists an algorithm which takes O(nnz(A)) log n + n2 poly(log n, k, 1/) time and outputs three tensors: C ∈ Rc×n×n with row-tube faces from A, R ∈ Rn×r×n with colum-tube faces from A, T ∈ Rn×n×t with column-row faces from A, and a (factorization of a) tensor U ∈ Rtn×cn×rn with rank(U ) = k for which c = r = t = O(k/) and kU (T1 , C2 , R3 ) − Ak2F ≤ (1 + )α min rank −k A0 kA0 − Ak2F , or equivalently, tn X cn X rn X i=1 j=1 l=1 2 Ui,j,l · (T1 )i ⊗ (C2 )j ⊗ (R3 )l − A ≤ (1 + )α min rank −k A0 kA0 − Ak2F F holds with probability 9/10. Proof. We already have three matrices UB ∈ Rn×k , VB ∈ Rn×k and WB ∈ Rn×k and these three matrices provide a rank-k, α-approximation to A, i.e., kUB ⊗ VB ⊗ WB − Ak2F ≤ α We can consider the following problem, min kWB · (U > U ∈Rn×k 67 min rank −k A0 | kA0 − Ak2F . {z } OPT VB> ) − A3 k2F . Let D1 denote a sampling and rescaling diagonal matrix according to WB , and let d1 denote the number of nonzero entries of D1 . Then we have min k(D1 WB ) · (U > VB> ) − D1 A3 k2F U ∈Rn×k = min kU ⊗ VB ⊗ D1 WB − A(I, I, D1 )k2F U ∈Rn×k = min kU · (VB> U ∈Rn×k (D1 WB )> ) − (A(I, I, D1 ))1 k2F , where the first equality follows by retensorizing the objective function, and the second equality follows by flattening the tensor along the first dimension. Let Z1 denote VB> (D1 WB )> ∈ Rk×nd1 , b = (A(I, I, D1 ))1 Z † ∈ Rn×k . Then we have and define U 1 b ⊗ VB ⊗ WB − Ak2F ≤ (1 + )α OPT . kU b and WB , and consider the following objective function, In the second step, we fix U b · (V > min kU WB ) − A1 k2F . V ∈Rn×k b , and let d2 denote the number of Let D2 denote a sampling and rescaling matrix according to U nonzero entries of D2 . Then we have, b ) · (V > min k(D2 U WB> ) − D2 A1 k2F V ∈Rn×k = = b ) ⊗ V ⊗ WB − A(D2 , I, I)k2 min k(D2 U F V ∈Rn×k min kV · (WB> V ∈Rn×k b )> ) − (A(D2 , I, I))2 k2 , (D2 U F where the first equality follows by unflattening the objective function, and the second equality follows b )> ) ∈ Rk×nd2 , and by flattening the tensor along the second dimension. Let Z2 denote (WB> (D2 U define Vb = (A(D2 , I, I))2 (Z2 )† ∈ Rn×k . Then we have, b ⊗ Vb ⊗ WB − Ak2F ≤ (1 + )2 α OPT . kU b and Vb , and consider the following objective function, In the third step, we fix U min kVb · (W W ∈Rn×k b ) − A2 k 2 . U F Let D3 denote a sampling and rescaling matrix according to Vb , and let d3 denote the number of nonzero entries of D3 . Then we have, min k(D3 Vb ) · (W > W ∈Rn×k = = b > ) − D 3 A2 k 2 U F b ⊗ (D3 Vb ) ⊗ W − A(I, D3 , I)k2 min kU F W ∈Rn×k b> min kW · (U W ∈Rn×k (D3 Vb )> ) − (A(I, D3 , I))3 k2F , where the first equality follows by retensorizing the objective function, and the second equality b > (D3 Vb )> ) ∈ Rk×nd3 , follows by flattening the tensor along the third dimension. Let Z3 denote (U c = (A(I, D3 , I))3 (Z3 )† . Putting it all together, we have, and define W b ⊗ Vb ⊗ W c − Ak2F ≤ (1 + )3 α OPT . kU 68 This implies k(A(I, I, D1 ))1 Z1† ⊗ (A(D2 , I, I))2 Z2† ⊗ (A(I, D3 , I))3 Z3† − Ak2F ≤ (1 + )3 α OPT . C.9 Solving small problems Theorem C.45. Let maxi {ti , di } ≤ n. Given a t1 × t2 × t3 tensor A and three matrices: a t1 × d1 matrix T1 , a t2 × d2 matrix T2 , and a t3 × d3 matrix T3 , if for any δ > 0 there exists a solution to min X1 ,X2 ,X3 k X (T1 X1 )i ⊗ (T2 X2 )i ⊗ (T3 X3 )i − A i=1 2 := OPT, F O(nδ ) and each entry of Xi can be expressed using bits, then there exists an algorithm that takes b2 )⊗ b1 )⊗(T2 X b1 , X b2 , and X b3 such that k(T1 X nO(δ) ·2O(d1 k+d2 k+d3 k) time and outputs three matrices: X b3 ) − Ak2 = OPT. (T3 X F Proof. For each i ∈ [3], we can createPti × di variables to represent matrix Xi . Let x denote this list of variables. Let B denote tensor ki=1 (T1 X1 )i ⊗ (T2 X2 )i ⊗ (T3 X3 )i and let Bi,j,l (x) denote an entry of tensor B (which can be thought of as a polynomial written in terms of x). Then we can write the following objective function, min x t1 X t2 X t3 X (Bi,j,l (x) − Ai,j,l )2 . i=1 j=1 l=1 We slightly modify the above objective function to obtain a new objective function, t1 X t2 X t3 X min (Bi,j,l (x) − Ai,j,l )2 , x,σ i=1 j=1 l=1 δ s.t. kxk22 ≤ 2O(n ) , where the last constraint is unharmful, because there exists a solution that can be written using O(nδ ) bits. Note that the number of inequality constraints in the above system is O(1), the degree is O(1), and the number of variables is v = (d1 k + d2 k + d3 k). Thus by Theorem B.11, the minimum nonzero cost is at least δ O(v) (2O(n ) )−2 . δ It is clear that the upper bound on the cost is at most 2O(n ) . Thus the number of binary search δ steps is at most log(2O(n ) )2O(v) . In each step of the binary search, we need to choose a cost C between the lower bound and the upper bound, and write down the polynomial system, t1 X t2 X t3 X (Bi,j,l (x) − Ai,j,l )2 ≤ C, i=1 j=1 l=1 δ kxk22 ≤ 2O(n ) . Using Theorem B.10, we can determine if there exists a solution to the above polynomial system. Since the number of variables is v, and the degree is O(1), the number of inequality constraints is O(1). Thus, the running time is poly(bitsize) · (# constraints · degree)# variables = nO(δ) 2O(v) . 69 C.10 Extension to general q-th order tensors This section provides the details for our extensions from 3rd order tensors to general q-th order tensors. In most practical applications, the order q is a constant. Thus, to simplify the analysis, we use Oq (·) to hide dependencies on q. C.10.1 Fast sampling of columns according to leverage scores, implicitly This section explains an algorithm that is able to sample from the leverage scores from the product of q matrices U1 , U2 , · · · , Uq without explicitly writing down U1 U2 · · · Uq . To build this algorithm we combine TensorSketch, some ideas from [DMIMW12], and some techniques from [AKO11, MW10]. Finally, we improve the running time for sampling columns according to e the leverage scores from poly(n) to O(n). Given q matrices U1 , U2 , · · · , Uq , with each such matrix Qq k× i=1 ni to be the matrix where the i-th row of A is the Ui having size k × ni , we define A ∈ R i i i vectorization of U1 ⊗ U2 ⊗ · · · ⊗ Uq , ∀i ∈ [k]. Naïvely, inQorder to sample poly(k, 1/) rows from A q according to the Qq leverage scores, we need to write down i=1 ni leverage scores. This approach will take at least i=1 ni running time. In the remainder of this section, we will explain how to do it in Oq (n · poly(k, 1/)) time for any constant p, and maxi∈[q] ni ≤ n. Theorem C.46. Given q matrices U1 ∈ Rk×n1 , U2 ∈ Rk×n2 , · · · , Uq ∈ Rk×nq , let maxi ni ≤ n. There exists an algorithm that takes Oq (n·poly(k, 1/)·Rsamples ) time and samples Rsamples columns Qq of U1 U2 · · · Uq ∈ Rk× i=1 ni according to the leverage scores of U1 U2 · · · Uq . Proof. Let maxi ni ≤ n. First, choosing Π0 to be a TensorSketch, we can compute R−1 in Oq (n poly(k, 1/)) time, where R is the R in a QR-factorization. We want to sample columns from U1 U2 · · · Uq according to the square of the `2 -norm ofQ each column of R−1 (U1 U2 · · · Uq ). The issue is the number of columns of this matrix is already qi=1 ni . The goal is to sample columns from R−1 (U1 U2 · · · Uq ) without explicitly computing the square of the `2 -norm of each column. Similarly as in the proof of Lemma C.32, we have the observation that the following two sampling procedures are equivalent in terms of sampling a column of a matrix: (1) We sample a single entry from matrix R−1 (U1 U2 · · · Uq ) proportional to its squared value, (2) We sample a column from matrix R−1 (U1 U2 · · · Uq ) proportional to its squared `2 -norm. Let the (i, j1 , j2 , · · · , jq )-th entry denote the entry in the i-th row and the j-th column, where q−1 q X Y j= (jl − 1) nt + j q . l=1 t=l+1 Similarly to Equation (18), we can show, for a particular column j, Pr[we sample an entry from the j-th column of matrix] = Pr[we sample the j-th column of a matrix]. Thus, it is sufficient to show how to sample a single entry from matrix R−1 (U1 Q U2 · · · Uq ) proportional to its squared value without writing down all the entries of the k × qi=1 ni matrix. Let V0 denote R−1 . Let n0 denote the number of rows of V0 . In the next few paragraphs, we describe a sampling procedure (procedure FastTensorLeverageScoreGeneralOrder in Algorithm 15) which first samples b j0 from [n0 ], then samples b j1 b from [n1 ], · · · , and at the end samples jq from [nq ]. In the first step, we want to sample b j0 from Qq [n0 ] proportional to the squared `2 -norm of that row. To do this efficiently, we choose Π1 ∈ R i=1 ni ×s1 to be a TensorSketch to sketch on the 70 Algorithm 15 Fast Tensor Leverage Score Sampling, for General q-th Order 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: procedure FastTensorLeverageScoreGeneralOrder({Ui }i∈[q] , {ni }i∈[q] , k, , Rsamples ) . Theorem C.46 s1 ← poly(k, 1/). Choose Π0 , Π1 ∈ Rn1 n2 ···nq ×s1 to each be a TensorSketch. . Definition B.34 −1 k×k Compute R ∈ R by using (U1 U2 · · · Uq )Π0 . . Ui ∈ Rk×ni , ∀i ∈ [q] −1 V0 ← R , n0 ← k. for i = 1 → [n0 ] do αi ← k(V0 )i ((U1 U2 · · · Uq )Π1 )k22 . end for for r = 1 → Rsamples do P Sample b j0 from [n0 ] with probability αi / ni00=1 αi0 . for l = 1 → q − 1 do sl+1 ← Oq (poly(k, 1/)). Choose Πl+1 ∈ Rnl+1 ···nq ×sl+1 to be a TensorSketch. for jl = 1 → [nl ] do . Form Vl ∈ Rnl ×k b (Vl )jl ← (Vl−1 )jl−1 ◦ (Ul )> jl . end for for i = 1 → nq do βi ← k(Vl )i ((Ul+1 · · · Uq )Πl+1 )k22 . end for P Sample b jl from [nl ] with probability βi / ni0l=1 βi0 . end for for i = 1 → nq do b βi ← |(Vq−1 )jq−1 (Uq )i |2 . end for Pn Sample b jq from [nq ] with probability βi / i0q=1 βi0 . S ← S ∪ (b j1 , · · · , b jq ). end for Convert S into a diagonal matrix D with at most Rsamples nonzero entries. return D. . Diagonal matrix D ∈ Rn1 n2 ···nq ×n1 n2 ···nq end procedure right of V0 (U1 U2 · · · Uq ). By Section B.10, as long as s1 = Oq (poly(k, 1/)), then Π1 is a (1 ± )-subspace embedding matrix. Thus with probability 1 − 1/Ω(q), for all i ∈ [n0 ], k(V0 )i ((U1 U2 ··· Uq )Π1 )k22 = (1 ± )k(V0 )i ((U1 U2 ··· Uq ))k22 , which means we can sample b j0 from [n0 ] in Oq (n poly(k, 1/)) time. In the second step, we have already obtained b j0 . Using that row of V0 with U1 , we can form a new matrix V1 ∈ Rn1 ×k in the following sense, (V1 )i = (V0 )j0 ◦ (U1 )> i , ∀i ∈ [n1 ], b b where (V1 )i denotes the i-th row of matrix V1 , (V0 )j0 denotes the b j0 -th row of V0 and (U1 )i is the i-th column of U1 . Another important observation is, the entry in the (j1 , j2 , · · · , jq )-th coordinate b of vector (V0 )j0 (U1 U2 · · · Uq ) is the same as the entry in the j1 -th row and (j2 , · · · , jq )-th 71 column of matrix V1 (U2 U3 · · · Uq ). Thus, sampling j1 is equivalent to sampling j1 from the new matrix V1 (U2 U3 · · · Uq ) proportional to the squared `2 -norm of that row. We still have the computational Qq issue that the length of the row vector is very long. To deal with this, we can choose Π2 ∈ R i=2 ni ×s2 to be a TensorSketch to multiply on the right of V1 (U2 U3 · · · Uq ). By Section B.10, as long as s2 = Oq (poly(k, 1/)), then Π2 is a (1 ± )-subspace embedding matrix. Thus with probability 1 − 1/Ω(q), for all i ∈ [n1 ], k(V1 )i ((U2 Uq )Π2 )k22 = (1 ± )k(V1 )i ((U2 ··· ··· Uq ))k22 , which means we can sample b j1 from [n1 ] in Oq (n poly(k, 1/)) time. We repeat the above procedure until we obtain each of b j0 , b j1 , · · · , b jq . Note that the last one, b jq , is easier, since the length of the vector is already small enough, and so we do not need to use TensorSketch for it. By Section B.10, the time for multiplying by TensorSketch is Oq (n poly(k, 1/)). Setting  to be a small constant, and taking a union bound over O(q) events completes the proof. Qq Lemma C.47. Given A ∈ Rn0 × i=1 ni , U1 , U2 , · · · , Uq ∈ Rk×n , for any  > 0, there exists an Qq Qq n × i i=1 ni algorithm that runs in O(n · poly(k, 1/)) time and outputs a diagonal matrix D ∈ R i=1 with m = O(k log k + k/) nonzero entries such that, b (U1 kU U2 ··· Uq ) − Ak2F ≤ (1 + ) min kU (U1 U ∈Rn×k U2 ··· Uq ) − Ak2F , b denotes the optimal solution of holds with probability at least 0.999, where U min U ∈Rn0 ×k kU (U1 ··· U2 Uq )D − ADk2F . Proof. This follows by combining Theorem C.46, Corollary C.30, and Lemma C.31. C.10.2 General iterative existential proof Algorithm 16 General q-th Order Iterative Existential Proof procedure GeneralIterativeExistentialProof(A, n, k, q, ) Fix U1∗ , U2∗ , · · · , Uq∗ ∈ Rn×k . 3: for i = 1 → q do q−1 4: Choose sketching matrix Si ∈ Rn ×si with si = Oq (k/). q−1 b> 5: Define Zi ∈ Rk×n to be U Uj∗> 0 . j 1: . Section C.10.2 2: j<i j 0 >i Let Ai denote the matrix obtained by flattening tensor A along the i-th dimension. bi to be Ai Si (Zi Si )† . Define U 8: end for b1 , U b2 , · · · , U bq . 9: return U 10: end procedure 6: 7: Given a q-th order tensor A ∈ Rn×n×···×n , we fix U1∗ , U2∗ , · · · , Uq∗ ∈ Rn×k to be the best rank-k solution (if it does not exist, then we replace it by a good approximation, as discussed). We define OPT = kU1∗ ⊗ U2∗ ⊗ · · · ⊗ Uq∗ − Ak2F . Our iterative proof works as follows. We first obtain the objective function, min kU1 · Z1 − A1 k2F ≤ OPT, U1 ∈Rn×k 72 where A1 is a matrix obtained by flattening tensor A along the first dimension, Z1 = (U2∗> U3∗> q−1 · · · Uq∗> ) denotes a k × nq−1 matrix. Choosing S1 ∈ Rn ×s1 to be a Gaussian sketching matrix with s1 = O(k/), we obtain a smaller problem, min kU1 · Z1 S1 − A1 S1 k2F . U1 ∈Rn×k b1 to be A1 S1 (Z1 S1 )† ∈ Rn×k , which gives, We define U b1 · Z1 − A1 k2 ≤ (1 + ) OPT . kU F After retensorizing the above, we have, b1 ⊗ U ∗ ⊗ · · · ⊗ U ∗ − Ak2 ≤ (1 + ) OPT . kU 2 q F b1 , U ∗ , · · · , U ∗ ∈ Rn×k , and choose S2 ∈ Rnq−1 ×s2 to be a Gaussian In the second round, we fix U q 3 q−1 b > U ∗> · · · U ∗> ). We sketching matrix with s2 = O(k/). We define Z2 ∈ Rk×n to be (U q 1 3 b2 to be A2 S2 (Z2 S2 )† ∈ Rn×k . Then, we have define U b1 ⊗ U b2 ⊗ U3∗ ⊗ · · · ⊗ Uq∗ − Ak2F ≤ (1 + )2 OPT . kU b1 , · · · , U bi−1 , U ∗ , · · · , Uq∗ ∈ Rn×k , and We repeat the above process, where in the i-th round we fix U i+1 q−1 q−1 choose Si ∈ Rn ×si to be a Gaussian sketching matrix with si = O(k/). We define Zi ∈ Rk×n ∗> b> · · · U b> bi to be Ai Si (Zi Si )† ∈ Rn×k . Then, we have to be (U Ui+1 · · · Uq∗> ). We define U 1 i−1 b1 ⊗ · · · ⊗ U bi−1 ⊗ U bi ⊗ U ∗ ⊗ · · · ⊗ U ∗ − Ak2 ≤ (1 + )2 OPT . kU i+1 q F At the end of the q-th round, we have b1 ⊗ · · · ⊗ U bq − Ak2 ≤ (1 + )q OPT . kU F Replacing  = 0 /(2q), we obtain b1 ⊗ · · · ⊗ U bq − Ak2 ≤ (1 + 0 ) OPT . kU F where for all i ∈ [q], si = O(kq/0 ) = Oq (k/0 ) . C.10.3 General input sparsity reduction This section shows how to extend the input sparsity reduction from third order tensors to general q-th order tensors. Given a tensor A ∈ Rn×n×···×n and q matrices, for each i ∈ [q], matrix Vi has size Vi ∈ Rn×bi , with bi ≤ poly(k, 1/). We choose a batch of sparse embedding matrices Ti ∈ Rti ×n . Define Vbi = Ti Vi , and C = A(T1 , T2 , · · · , Tq ). Thus we have with probability 99/100, for any α ≥ 0, for all {Xi , Xi0 ∈ Rbi ×k }i∈[q] , if then kVb1 X10 ⊗ Vb2 X20 ⊗ · · · ⊗ Vbq Xq0 − Ck2F ≤ αkVb1 X1 ⊗ Vb2 X2 ⊗ · · · ⊗ Vbq Xq − Ck2F , kV1 X10 ⊗ V2 X20 ⊗ · · · ⊗ Vq Xq0 − Ak2F ≤ (1 + )αkV1 X1 ⊗ V2 X2 ⊗ · · · ⊗ Vq Xq − Ak2F , where ti = Oq (poly(bi , 1/)). 73 Algorithm 17 General q-th Order Input Sparsity Reduction 1: 2: 3: 4: 5: 6: 7: 8: procedure GeneralInputSparsityReduction(A, {Vi }i∈[q] , n, k, q, ) for i = 1 → q do Choose sketching matrix Ti ∈ Rti ×n with ti = poly(k, q, 1/). Vbi ← Ti Vi . end for C ← A(T1 , T2 , · · · , Tq ). return {Vbi }i∈[q] , C. end procedure C.10.4 . Section C.10.3 Bicriteria algorithm This section explains how to extend the bicriteria algorithm from third order tensors (Section C.4) to general q-th order tensors. Given any q-th order tensor A ∈ Rn×n×···×n , we can output a rank-r tensor (or equivalently q matrices U1 , U2 , · · · , Uq ∈ Rn×r ) such that, kU1 ⊗ U2 ⊗ · · · ⊗ Uq − Ak2F ≤ (1 + ) OPT, where r = Oq ((k/)q−1 ) and the algorithm takes Oq (nnz(A) + n · poly(k, 1/)). Algorithm 18 General q-th Order Bicriteria Algorithm 1: 2: 3: 4: 5: 6: 7: 8: 9: procedure GeneralBicriteriaAlgorithm(A, n, k, q, ) for i = 2 → q do q−1 Choose sketching matrix Si ∈ Rn ×si with si = O(kq/). Choose sketching matrix Ti ∈ Rti ×n with ti = poly(k, q, 1/). bi by setting (j2 , j3 , · · · , jq )-th column to be (Ai Si )j . Form matrix U i end for Solve minU1 kU1 B − (A(I, T2 , · · · , Tq ))1 k2F . bi }i∈[q] . return {U end procedure C.10.5 . Section C.10.4 CURT decomposition This section extends the tensor CURT algorithm from 3rd order tensors (Section C.7) to general q-th order tensors. Given a q-th order tensor A ∈ Rn×n×···×n and a batch of matrices U1 , U2 , · · · , Uq ∈ Rn×k , we iteratively apply the proof in Theorem C.40 (or Theorem C.41) q times. Then for each i ∈ [q], we are able to select di columns from the i-th dimension of tensor A (let Ci denote those columns) and also find a tensor U ∈ Rd1 ×d2 ×···×dq such that, kU (C1 , C2 , · · · , Cq ) − Ak2F ≤ (1 + )kU1 ⊗ U2 ⊗ · · · ⊗ Uq − Ak2F , where either di = Oq (k log k + k/) (similar to Theorem C.40) or di = Oq (k/) (similar to Theorem C.41). C.11 Matrix CUR decomposition There is a long line of research on matrix CUR decomposition under operator, Frobenius or recently, entry-wise `1 norm [DMM08, BMD09, DR10, BDM11, BW14, SWZ17]. We provide the first 74 Algorithm 19 General q-th Order CURT Decomposition procedure GeneralCURTDecomposition(A, {Ui }i∈[q] , n, k, q, ) 2: for i = 1 → q do q−1 b> U Uj> ∈ Rk×n . 3: Form Bi = j 1: . Section C.10.5 4: if fast = true then . Optimal running time 0 ← 0.01. di ← Oq (k log k + k/). Di ← FastTensorLeverageScoreGeneralOrder ({Ubj }j<i , {Uj }j>i , n, k, 0 , di ). . Algorithm 15 else . Optimal sample complexity 0 ← Oq (). > q−1 , n, k,  ). Di ← GeneralizedMatrixRowSubsetSelection (A> . 0 i , Bi , n Algorithm C.5, di = Oq (k/). end if bi ← Ai Di (Bi Di )† . U C i ← Ai D i . end for U ← (B1 D1 )† ⊗ (B2 D2 )† ⊗ · · · ⊗ (Bq Dq )† . return {Ci }i∈[q] , U . end procedure j<i 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: j>i algorithm that runs in nnz(A) time, which improves the previous best matrix CUR decomposition algorithm under Frobenius norm [BW14]. C.11.1 Algorithm Algorithm 20 Optimal Matrix CUR Decomposition Algorithm 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: procedure OptimalMatrixCUR(A, n, k, ) . Theorem C.48 0 ← 0.1. 00 ← 0.0010 . b ←SparseSVD(A, k, 0 ). b ∈ Rn×k U .U Choose S1 ∈ Rn×n to be a sampling and rescaling diagonal matrix according to the leverage b with s1 = O(−2 k log k) nonzero entries. scores of U b , s1 , n, k, 00 ). R, Y ←GeneralizedMatrixRowSubsetSelection(S1 A, S1 U . r×n k×r Algorithm 7, R ∈ R , Y ∈ R and r = O(k/) Vb ← Y R ∈ Rk×n . Choose S2> ∈ Rn×n to be a sampling and rescaling diagonal matrix according to the leverage scores of Vb > ∈ Rn×k with s2 = O(−2 k log k) nonzero entries. C > , Z > ← GeneralizedMatrixRowSubsetSelection ((AS2 )> , (Vb S2 )> , s2 , n, k, 00 ). . Algorithm 7, C ∈ Rn×c , Z ∈ Rc×k , and c = O(k/) U ← ZY . . U ∈ Rc×r and rank(U ) = k return C, U, R. end procedure Theorem C.48. Given matrix A ∈ Rn×n , for any k ≥ 1 and  ∈ (0, 1), there exists an algorithm that takes O(nnz(A) + n poly(k, 1/)) time and outputs three matrices C ∈ Rn×c with c columns 75 from A, R ∈ Rr×n with r rows from A, and U ∈ Rc×r with rank(U ) = k such that r = c = O(k/) and, kCU R − Ak2F ≤ (1 + ) min rank −k Ak kAk − Ak2F , holds with probability at least 9/10. Proof. We define OPT = min rank −k Ak kAk − Ak2F . b ∈ Rn×k by using the result of [CW13], so that U b satisfies: We first compute U b X − Ak2F ≤ (1 + ) OPT . min kU X∈Rk×n (25) This step can be done in O(nnz(A) + n poly(k, 1/)) time. We choose S1 ∈ Rn×n to be a sampling and rescaling diagonal matrix according to the leverage b , where here s1 = O(−2 k log k) is the number of samples. This step also can be done in scores of U O(n poly(k, 1/)) time. b. We run GeneralizedMatrixRowSubsetSelection(Algorithm 7) on matrices S1 A and S1 U Then we obtain two new matrices R and Y , where R contains r = O(k/) rows of S1 A and Y has size k × r. According to Theorem C.14 and Corollary C.15, this step takes n poly(k, 1/) time. We construct Vb = Y R, and choose S2> to be another sampling and rescaling diagonal matrix according to the leverage scores of Vb > with s2 = O(−2 k log k) nonzero entries. As in the case of constructing S1 , this step can be done in O(n poly(k, 1/)) time. We run GeneralizedMatrixRowSubsetSelection(Algorithm 7) on matrices (AS2 )> and b (V S2 )> . Then we can obtain two new matrices C > and Y > , where C > contains c = O(k/) rows of (AS2 )> and Z > has size k × c. According to Theorem C.14 and Corollary C.15, this step takes n poly(k, 1/) time. Thus, overall the running time is O(nnz(A) + n poly(k, 1/)). Correctness. Let X ∗ = arg min kX Vb − Ak2F . X∈Rn×k According to Corollary C.15, kCZ Vb S2 − AS2 k2F ≤ (1 + 00 ) min kX Vb S2 − AS2 k2F ≤ (1 + 00 )kX ∗ Vb S2 − AS2 k2F . X∈Rn×k According to Theorem C.52, 00 = 0.0010 , kCZ Vb − Ak2F ≤ (1 + 0 )kX ∗ Vb − Ak2F . Let e = arg min kU b X − Ak2 . X F X∈Rk×n According to Corollary C.15, b Y R − S1 Ak2F ≤ (1 + 00 ) min kS1 U b X − S1 Ak2F ≤ (1 + 00 )kS1 U bX e − S1 Ak2F . kS1 U X∈Rk×n 76 (26) According to Theorem C.52, since 00 = 0.0010 , b Y R − Ak2 ≤ (1 + 0 )kU bX e − Ak2 . kU F F Then, we can conclude (27) kCU R − Ak2F = kCZY R − Ak2F = kCZ Vb − Ak2F ≤ (1 + 0 ) min kX Vb − Ak2F X∈Rn×k b Vb − Ak2F ≤ (1 + 0 )kU b X − Ak2 ≤ (1 + 0 )2 min kU F X∈Rk×n 0 3 ≤ (1 +  ) OPT ≤ (1 + ) OPT . The first equality follows since U = ZY . The second equality follows since Y R = Vb . The first inequality follows by Equation (26). The third inequality follows by Equation (27). The fourth inequality follows by Equation (25). The last inequality follows since 0 = 0.1. Notice that C has O(k/) reweighted columns of AS2 , and AS2 is a subset of reweighted columns of A, so C has O(k/) reweighted columns of A. Similarly, we can prove that R has O(k/) reweighted rows of A. Thus, CU R is a CUR decomposition of A. C.11.2 Stronger property achieved by leverage scores Claim C.49. Given matrix A ∈ Rn×m , for any distribution p = (p1 , p2 , · · · , pn ) define random variable X such that X = kAi k22 /pi with probability pi , where P Ai is the i-th row of matrix A. Then m 1 j take m independent samples X 1 , X 2 , · · · , X m , and let Y = m j=1 X . We have Pr[Y ≤ 100kAk2F ] ≥ .99. Proof. We can compute the expectation of X j , for any j ∈ [m], E[X j ] = n X kAi k2 2 i=1 Then E[Y ] = 1 m Pm j=1 E[X j] pi · pi = kAk2F . = kAk2F . Using Markov’s inequality, we have Pr[Y ≥ kAk2F ] ≤ .01. Theorem C.50 (The leverage score case of Theorem 39 in [CW13]). Let A ∈ Rn×k , B ∈ Rn×d . Let S ∈ Rn×n denote a sampling and rescaling diagonal matrix according to the leverage scores of A. If √ the event occurs that S satisfies (/ k)-Frobenius norm approximate matrix product for A, and also S is a (1 + )-subspace embedding for A, then let X ∗ be the optimal solution of minX kAX − Bk2F , e ≡ AX ∗ − B. Then, for all X ∈ Rk×d , and B e 2 − kS Bk e 2 ≤ (1 + 2)kAX − Bk2 . (1 − 2)kAX − Bk2F ≤ kS(AX − B)k2F + kBk F F F Furthermore, if S has m = O(−2 k log(k)) nonzero entries, the above event happens with probability at least 0.99. 77 Note that Theorem 39 in [CW13] is stated in a way that holds for general sketching matrices. However, we are only interested in the case when S is a sampling and rescaling diagonal matrix according to the leverage scores. For completeness, we provide the full proof of the leverage score case with certain parameters. Proof. Suppose S is a sampling and rescaling diagonal matrix according to the leverage scores of A, and it has m = O(−2 k log k) nonzero entries. Then, according to Lemma C.22, S is a (1 + )subspace embedding for A with probability at least 0.999, and according to Lemma C.29, S satisfies √ (/ k)-Frobenius norm approximate matrix product for A with probability at least 0.999. Let U ∈ Rn×k denote an orthonormal basis of the column span of A. Then the leverage scores of U are the same as the leverage scores of A. Furthermore, for any X ∈ Rk×d , there is a matrix Y such that AX = U Y , and vice versa, so we can now assume A has k orthonormal columns. Then, e 2F kS(AX − B)k2F − kS Bk e 2F = kSA(X − X ∗ ) + S(AX ∗ − B)k2F − kS Bk   e 2 = kSA(X − X ∗ )k2F + kS(AX ∗ − B)k2F + 2 tr (X − X ∗ )> A> S > S(AX ∗ − B) − kS Bk F   e . = kSA(X − X ∗ )k2F + 2 tr (X − X ∗ )> A> S > S B (28) {z } | α The second equality follows using kC + Dk2F = kCk2F + kDk2F + 2 tr(C > D). The third equality e = AX ∗ − B. Now, let us first upper bound the term α in Equation (28): follows from B   e kSA(X − X ∗ )k2F + 2 tr (X − X ∗ )> A> S > S B e F ≤ (1 + )kA(X − X ∗ )k2F + 2kX − X ∗ kF kA> S > S Bk √ e F ≤ (1 + )kA(X − X ∗ )k2F + 2(/ k) · kX − X ∗ kF kAkF kBk e F. ≤ (1 + )kA(X − X ∗ )k2F + 2kA(X − X ∗ )kF kBk > The first inequality follows since S is a (1+) subspace √ embedding of A, and tr(C D) ≤ kCkF kDkF . The second inequality follows since S satisfies (/ k)-Frobenius norm approximate matrix product √ for A. The last inequality follows using that kAkF ≤ k since A only has k orthonormal columns. Now, let us lower bound the term α in Equation (28):   e kSA(X − X ∗ )k2F + 2 tr (X − X ∗ )> A> S > S B e F ≥ (1 − )kA(X − X ∗ )k2F − 2kX − X ∗ kF kA> S > S Bk √ e F ≥ (1 − )kA(X − X ∗ )k2F − 2(/ k) · kX − X ∗ kF kAkF kBk e F. ≥ (1 − )kA(X − X ∗ )k2 − 2kA(X − X ∗ )kF kBk F > The first inequality follows since S is a (1+) subspace √ embedding of A, and tr(C D) ≥ −kCkF kDkF . The second inequality follows since S satisfies (/ k)-Frobenius norm approximate matrix product √ for A. The last inequality follows using that kAkF ≤ k since A only has k orthonormal columns. Therefore, e F ≤ kS(AX − B)k2F − kS Bk e 2F , (1 − )kA(X − X ∗ )k2F − 2kA(X − X ∗ )kF kBk 78 (29) and e F ≥ kS(AX − B)k2 − kS Bk e 2. (1 + )kA(X − X ∗ )k2F + 2kA(X − X ∗ )kF kBk F F (30) e = AX ∗ − B = AA† B − B = (AA† − I)B, so according to the Pythagorean theorem, Notice that B we have e 2, kAX − Bk2F = kA(X − X ∗ )k2F + kBk F which means that e 2. kA(X − X ∗ )k2F = kAX − Bk2F − kBk F (31) Using Equation (31), we can rewrite and lower bound the LHS of Equation (29), = = ≥ ≥ e F (1 − )kA(X − X ∗ )k2F − 2kA(X − X ∗ )kF kBk   e F kA(X − X ∗ )k2F −  kA(X − X ∗ )k2F + 2kA(X − X ∗ )kF kBk   e 2F −  kA(X − X ∗ )k2F + 2kA(X − X ∗ )kF kBk e F kAX − Bk2F − kBk  2 e 2F −  kA(X − X ∗ )kF + kBk e F kAX − Bk2F − kBk   e 2 − 2 kA(X − X ∗ )k2 + kBk e 2 kAX − Bk2F − kBk F F F e 2F . = (1 − 2)kAX − Bk2F − kBk (32) The second step follows by Equation (31). The first inequality follows using a2 + 2ab < (a + b)2 . The second inequality follows using (a + b)2 ≤ 2(a2 + b2 ). The last equality follows using kA(X − e 2 = kAX − Bk2 . Similarly, using Equation (31), we can rewrite and upper bound the X ∗ )k2F + kBk F F LHS of Equation (30) e F ≤ (1 + 2)kAX − Bk2 − kBk e 2. (1 + )kA(X − X ∗ )k2F + 2kA(X − X ∗ )kF kBk F F (33) Combining Equations (29),(32),(30),(33), we conclude that e 2F ≤ kS(AX − B)k2F − kS Bk e 2F ≤ (1 + 2)kAX − Bk2F − kBk e 2F . (1 − 2)kAX − Bk2F − kBk Theorem C.51. Let A ∈ Rn×k , B ∈ Rn×d , and 12 >  > 0. Let X ∗ be the optimal solution to e ≡ AX ∗ − B. Let S ∈ Rn×n denote a sketching matrix which satisfies the minX kAX − Bk2F , and B following: e 2 ≤ 100 · kBk e 2, 1. kS Bk F F 2. for all X ∈ Rk×d , e 2 − kS Bk e 2 ≤ (1 + )kAX − Bk2 . (1 − )kAX − Bk2F ≤ kS(AX − B)k2F + kBk F F F Then, for all X1 , X2 ∈ Rk×d satisfying we have    kSAX1 − SBk2F ≤ 1 + · kSAX2 − SBk2F , 100 kAX1 − Bk2F ≤ (1 + 5) · kAX2 − Bk2F . 79 Proof. Let A, B, S,  be the same as in the statement of the theorem, and suppose S satisfies those two conditions. Let X1 , X2 ∈ Rk×d satisfy    kSAX1 − SBk2F ≤ 1 + kSAX2 − SBk2F . 100 We have ≤ ≤ = ≤ ≤ ≤ kAX1 − Bk2F  1  e 2 − kS Bk e 2 kS(AX1 − B)k2F + kBk F F 1−    1  e 2F − kS Bk e 2F 1+ · kS(AX2 − B)k2F + kBk 1− 100    1     e 2F − kS Bk e 2F −  · kBk e 2F − kS Bk e 2F 1+ · kS(AX2 − B)k2F + kBk 1− 100 100      1  1 e 2 − kS Bk e 2 · 1+ · kAX2 − Bk2F − · · kBk F F 1− 100 1 −  100 1  e 2F (1 + 3)kAX2 − Bk2F + · kS Bk 1 −  100 e 2 (1 + 3)kAX2 − Bk2 + 2kBk ≤ (1 + 5)kAX2 − F Bk2F . F The first inequality follows since S satisfies the second condition. The second inequality follows by the relationship between X1 and X2 . The third inequality follows since S satisfies the second condition. The fifth inequality follows using that  < 12 and that S satisfies the first condition. The e 2 = kAX ∗ − Bk2 ≤ kAX2 − Bk2 . last inequality follows using that kBk F F F Theorem C.52. Let A ∈ Rn×k , B ∈ Rn×d , and 21 >  > 0. Let S ∈ Rn×n denote a sampling and rescaling diagonal matrix according to the leverage scores of A. If S has at least m = O(k log(k)/2 ) nonzero entries, then with probability at least 0.98, for all X1 , X2 ∈ Rk×d satisfying kSAX1 − SBk2F ≤ (1 +  ) · kSAX2 − SBk2F , 500 we have kAX1 − Bk2F ≤ (1 + ) · kAX2 − Bk2F . Proof. The proof directly follows by Claim C.49, Theorem C.50 and Theorem C.51. Because of Claim C.49, S satisfies the first condition in the statement of Theorem C.51 with probability at least 0.99. According to Theorem C.50, S satisfies the second condition in the statement of Theorem C.51 with probability at least 0.99. Thus, with probability 0.98, by Theorem C.51, we complete the proof. 80 Entry-wise `1 Norm for Arbitrary Tensors D In this section, we provide several different algorithms for tensor `1 -low rank approximation. Section D.1 provides some useful facts and definitions. Section D.2 presents several existence results. Section D.3 describes a tool that is able to reduce the size of the objective function from poly(n) to poly(k). Section D.4 discusses the case when the problem size is small. Section D.5 provides several bicriteria algorithms. Section D.6 summarizes a batch of algorithms. Section D.7 provides an algorithm for `1 norm CURT decomposition. Notice that if the rank −k solution does not exist, then every bicriteria algorithm in Section D.5 can be stated in a form similar to Theorem 1.1, and every algorithm which can output a rank −k solution in Section D.6 can be stated in a form similar to Theorem 1.2. See Section 1 for more details. D.1 Facts We present a method that is able to reduce the entry-wise `1 -norm objective function to the Frobenius norm objective function. Fact D.1. Given a 3rd order tensor C ∈ Rc1 ×c2 ×c3 , three matrices V1 ∈ Rc1 ×b1 , V2 ∈ Rc2 ×b2 , V3 ∈ Rc3 ×b3 , for any k ∈ [1, mini bi ], if X10 ∈ Rb1 ×k , X20 ∈ Rb2 ×k , X30 ∈ Rb3 ×k satisfies that, k(V1 X10 ) ⊗ (V2 X20 ) ⊗ (V3 X30 ) − CkF ≤ α min X1 ,X2 ,X3 k(V1 X1 ) ⊗ (V2 X2 ) ⊗ (V3 X3 ) − CkF , then √ k(V1 X10 ) ⊗ (V2 X20 ) ⊗ (V3 X30 ) − Ck1 ≤ α c1 c2 c3 min X1 ,X2 ,X3 k(V1 X1 ) ⊗ (V2 X2 ) ⊗ (V3 X3 ) − Ck1 . We extend Lemma C.15 in [SWZ17] to tensors: Fact D.2. Given tensor A ∈ Rn×n×n , let OPT = min rank −k Ak tensor B ∈ Rn×n×n is an f -approximation to A, i.e., kA − Ak k1 . For any r ≥ k, if rank-r kB − Ak1 ≤ f · OPT, and U, V, W ∈ Rn×k is a g-approximation to B, i.e., kU ⊗ V ⊗ W − Bk1 ≤ g · min rank −k Bk kBk − Bk1 , then, kU ⊗ V ⊗ W − Ak1 . gf · OPT . e , Ve , W f ∈ Rn×k to be three matrices, such that Proof. We define U e ⊗ Ve ⊗ W f − Bk1 ≤ g kU and also define, b , Vb , W c= U min rank −k Bk kBk − Bk1 , arg min kU ⊗ V ⊗ W − Bk1 and U ∗ , V ∗ , W ∗ = U,V,W ∈Rn×k 81 arg min kU ⊗ V ⊗ W − Ak1 . U,V,W ∈Rn×k It is obvious that, b ⊗ Vb ⊗ W c − Bk1 ≤ kU ∗ ⊗ V ∗ ⊗ W ∗ − Bk1 . kU Then, e ⊗ Ve ⊗ W f − Ak1 kU e ⊗ Ve ⊗ W f − Bk1 + kB − Ak1 ≤ kU b ⊗ Vb ⊗ W c − Bk1 + kB − Ak1 ≤ gkU (34) by the triangle inequality by definition ∗ ∗ ∗ by Equation (34) ∗ ∗ ∗ by the triangle inequality ≤ gkU ⊗ V ⊗ W − Bk1 + kB − Ak1 ≤ gkU ⊗ V ⊗ W − Ak1 + gkB − Ak1 + kB − Ak1 = g OPT +(g + 1)kB − Ak1 ≤ g OPT +(g + 1)f · OPT by definition of OPT since B is an f -approximation to A . gf OPT . This completes the proof. Using the above fact, we are able to optimize our approximation ratio. D.2 Existence results Definition D.3 (`1 multiple regression cost preserving sketch - Definition D.5 in [SWZ17]). Given matrices U ∈ Rn×r , A ∈ Rn×d , let S ∈ Rm×n . If ∀β ≥ 1, Vb ∈ Rr×d which satisfy kSU Vb − SAk1 ≤ β · min kSU V − SAk1 , V ∈Rr×d it holds that kU Vb − Ak1 ≤ β · c · min kU V − Ak1 , V ∈Rr×d then S provides a c-`1 -multiple-regression-cost-preserving-sketch for (U, A). Theorem D.4. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, there exist three matrices 2 2 2 S1 ∈ Rn ×s1 , S2 ∈ Rn ×s2 , S3 ∈ Rn ×s3 such that min X1 ,X2 ,X3 k X (A1 S1 X1 )i ⊗ (A2 S2 X2 )i ⊗ (A3 S3 X3 )i − A i=1 holds with probability 99/100. (I). Using a dense Cauchy transform, e e 1.5 ) log3 n. s1 = s2 = s3 = O(k), α = O(k (II). Using a sparse Cauchy transform, e 5 ), α = O(k e 13.5 ) log3 n. s1 = s2 = s3 = O(k (III). Guessing Lewis weights, e e 1.5 ). s1 = s2 = s3 = O(k), α = O(k 82 1 ≤α min rank −k Ak ∈Rn×n×n kAk − Ak1 , Proof. We use OPT to denote OPT := min rank −k Ak ∈Rn×n×n kAk − Ak1 . Given a tensor A ∈ Rn1 ×n2 ×n3 , we define three matrices A1 ∈ Rn1 ×n2 n3 , A2 ∈ Rn2 ×n3 n1 , A3 ∈ Rn3 ×n1 n2 such that, for any i ∈ [n1 ], j ∈ [n2 ], l ∈ [n3 ], Ai,j,l = (A1 )i,(j−1)·n3 +l = (A2 )j,(l−1)·n1 +i = (A3 )l,(i−1)·n2 +j . We fix V ∗ ∈ Rn×k and W ∗ ∈ Rn×k , and use V1∗ , V2∗ , · · · , Vk∗ to denote the columns of V ∗ and , Wk∗ to denote the columns of W ∗ . We consider the following optimization problem, W1∗ , W2∗ , · · · min U1 ,··· ,Uk ∈Rn k X i=1 Ui ⊗ Vi∗ ⊗ Wi∗ − A , 1 which is equivalent to min U1 ,··· ,Uk ∈Rn  U1 U2 · · ·   ∗ V1 ⊗ W1∗  V2∗ ⊗ W2∗   Uk   ···  − A Vk∗ ⊗ Wk∗ . 1  We use matrix Z1 to denote V ∗> W ∗> ∈ R and matrix U to denote U1 U2 · · · Then we can obtain the following equivalent objective function, k×n2  Uk . min kU Z1 − A1 k1 . U ∈Rn×k 2 ×s Choose an `1 multiple regression cost preserving sketch S1 ∈ Rn obtain the optimization problem, min kU Z1 S1 − A1 S1 k1 = min U ∈Rn×k U ∈Rn×k n X i=1 1 for (Z1> , A> 1 ). We can kU i Z1 S1 − (A1 S1 )i k1 , where U i denotes the i-th row of matrix U ∈ Rn×k and (A1 S1 )i denotes the i-th row of matrix A1 S1 . Instead of solving it under the `1 -norm, we consider the `2 -norm relaxation, min kU Z1 S1 − U ∈Rn×k A1 S1 k2F = min U ∈Rn×k n X i=1 kU i Z1 S1 − (A1 S1 )i k22 . b ∈ Rn×k denote the optimal solution of the above optimization problem. Then, U b = Let U † b A1 S1 (Z1 S1 ) . We plug U into the objective function under the `1 -norm. According to Claim B.13, we have, b Z1 S1 − A1 S1 k1 = kU Since S1 ∈ Rn 2 ×s 1 n X i=1 b i Z1 S1 − (A1 S1 )i k1 ≤ kU √ s1 min kU Z1 S1 − A1 S1 k1 . U ∈Rn×k satisfies Definition D.3, we have b Z1 − A1 k1 ≤ α min kU Z1 − A1 k1 = α OPT, kU U ∈Rn×k 83 √ where α = s1 β and β (see Definition D.3) is a parameter which depends on which kind of sketching matrix we actually choose. It implies b ⊗ V ∗ ⊗ W ∗ − Ak1 ≤ α OPT . kU b ∈ Rn×k and W ∗ ∈ Rn×k , and convert tensor A into matrix A2 . Let As a second step, we fix U b > W ∗> . We consider the following objective function, matrix Z2 denote U min kV Z2 − A2 k1 , V ∈Rn×k and the optimal cost of it is at most α OPT. 2 Choose an `1 multiple regression cost preserving sketch S2 ∈ Rn ×s2 for (Z2> , A> 2 ), and sketch on the right of the objective function to obtain this new objective function, min kV Z2 S2 − A2 S2 k1 = min V ∈Rn×k U ∈Rn×k n X i=1 kV i Z2 S2 − (A2 S2 )i k1 , where V i denotes the i-th row of matrix V and (A2 S2 )i denotes the i-th row of matrix A2 S2 . Instead of solving this under the `1 -norm, we consider the `2 -norm relaxation, min kV Z2 S2 − A2 S2 k2F = min kV i (Z2 S2 ) − (A2 S2 )i k22 . V ∈Rn×k U ∈Rn×k Let Vb ∈ Rn×k denote the optimal solution of the above problem. Then Vb = A2 S2 (Z2 S2 )† . By 2 properties of the sketching matrix S2 ∈ Rn ×s2 , we have, kVb Z2 − A2 k1 ≤ α min kV Z2 − A2 k1 ≤ α2 OPT, V ∈Rn×k which implies b ⊗ Vb ⊗ W ∗ − Ak1 ≤ α2 OPT . kU b ∈ Rn×k and Vb ∈ Rn×k . We can convert tensor A ∈ Rn×n×n As a third step, we fix the matrices U 2 b > Vb > ∈ Rk×n2 . We consider the following into matrix A3 ∈ Rn ×n . Let matrix Z3 denote U objective function, min kW Z3 − A3 k1 , W ∈Rn×k and the optimal cost of it is at most α2 OPT. 2 Choose an `1 multiple regression cost preserving sketch S3 ∈ Rn ×s3 for (Z3> , A> 3 ) and sketch on the right of the objective function to obtain the new objective function, min kW Z3 S3 − A3 S3 k1 . W ∈Rn×k c ∈ Rn×k denote the optimal solution of the above problem. Then W c = A3 S3 (Z3 S3 )† . By Let W 2 ×s n 3 , we have, properties of sketching matrix S3 ∈ R c Z3 − A3 k1 ≤ α min kW Z3 − A3 k1 ≤ α3 OPT . kW W ∈Rn×k 84 Thus, we obtain, X1 ∈Rs1 ×k ,X min s ×k ,X ∈Rs3 ×k 2 ∈R 2 3 k X (A1 S1 X1 )i ⊗ (A2 S2 X2 )i ⊗ (A3 S3 X3 )i − A i=1 1 ≤ α3 OPT . Proof of (I) By Theorem C.1 in [SWZ17], √ we can use dense Cauchy transforms for S1 , S2 , S3 , and then s1 = s2 = s3 = O(k log k) and α = O( k log k log n). Proof of (II) By Theorem C.1 in [SWZ17], we can use sparse Cauchy transforms for S1 , S2 , S3 , and then s1 = s2 = s3 = O(k 5 log5 k) and α = O(k 4.5 log4.5 k log n). Proof of (III) By Theorem C.1 in [SWZ17], we can sample by Lewis weights. Then S1 , S2 , S3 ∈ 2 ×n2 n R √ are diagonal matrices, and each of them has O(k log k) nonzero rows. This gives α = O( k log k). D.3 Polynomial in k size reduction Definition D.5 (Definition D.1 in [SWZ17]). Given a matrix M ∈ Rn×d , if matrix S ∈ Rm×n satisfies kSM k1 ≤ βkM k1 , then S has at most β dilation on M . Definition D.6 (Definition D.2 in [SWZ17]). Given a matrix U ∈ Rn×k , if matrix S ∈ Rm×n satisfies ∀x ∈ Rk , kSU xk1 ≥ 1 kU xk1 , β then S has at most β contraction on U . Theorem D.7. Given a tensor A ∈ Rn1 ×n2 ×n3 and three matrices V1 ∈ Rn1 ×b1 , V2 ∈ Rn2 ×b2 , V3 ∈ Rn3 ×b3 , let X1∗ ∈ Rb1 ×k , X2∗ ∈ Rb2 ×k , X3∗ ∈ Rb3 ×k satisfies X1∗ , X2∗ , X3∗ = arg min X1 ∈Rb1 ×k ,X2 ∈Rb2 ×k ,X3 ∈Rb3 ×k kV1 X1 ⊗ V2 X2 ⊗ V3 X3 − Ak1 . Let S ∈ Rm×n have at most β1 ≥ 1 dilation on V1 X1∗ · ((V2 X2∗ )> (V3 X3∗ )> ) − A1 and S have at b1 ∈ Rb1 ×k , X b2 ∈ Rb2 ×k , X b3 ∈ Rb3 ×k satisfies most β2 ≥ 1 contraction on V1 . If X b 1 ⊗ V2 X b 2 ⊗ V3 X b3 − SAk1 ≤ β kSV1 X min X1 ∈Rb1 ×k ,X2 ∈Rb2 ×k ,X3 ∈Rb3 ×k kSV1 X1 ⊗ V2 X2 ⊗ V3 X3 − SAk1 , where β ≥ 1, then b 1 ⊗ V2 X b 2 ⊗ V3 X b3 − Ak1 . β1 β2 β kV1 X min X1 ,X2 ,X3 kV1 X1 ⊗ V2 X2 ⊗ V3 X3 − Ak1 . The proof idea is similar to [SWZ17]. b1 ∈ Proof. Let A, V1 , V2 , V3 , S, X1∗ , X2∗ , X3∗ , β1 , β2 be the same as stated in the theorem. Let X b ×k b ×k b ×k 1 2 3 b b R , X2 ∈ R , X3 ∈ R satisfy b1 ⊗ V2 X b 2 ⊗ V3 X b3 − SAk1 ≤ β kSV1 X min X1 ∈Rb1 ×k ,X2 ∈Rb2 ×k ,X3 ∈Rb3 ×k 85 kSV1 X1 ⊗ V2 X2 ⊗ V3 X3 − SAk1 . We have, b1 ⊗ V2 X b 2 ⊗ V3 X b3 − SAk1 kSV1 X b3 − SV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ k1 − kSV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − SAk1 b 2 ⊗ V3 X b1 ⊗ V2 X ≥ kSV1 X 1 b3 − V1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ k1 − β1 kV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − Ak1 b 2 ⊗ V3 X b1 ⊗ V2 X ≥ kV1 X β2 1 b3 − Ak1 − 1 kV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − Ak1 b 2 ⊗ V3 X b1 ⊗ V2 X ≥ kV1 X β2 β2 − β1 kV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − Ak1 1 b3 − Ak1 − ( 1 + β1 )kV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − Ak1 . b 2 ⊗ V3 X b1 ⊗ V2 X = kV1 X (35) β2 β2 The first and the third inequality follow by the triangle inequalities. The second inequality follows using that b1 ⊗ V2 X b 2 ⊗ V3 X b3 − SV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ k1 kSV1 X   b1 − X1∗ ) · (V2 (X b2 − X2∗ ))> (V3 (X b3 − X3∗ ))> = SV1 (X 1   1 ∗ ∗ > ∗ > b1 − X1 ) · (V2 (X b2 − X2 )) b3 − X3 )) V 1 (X (V3 (X ≥ β2 1 1 b 1 ⊗ V2 X b2 ⊗ V3 X b3 − V1 X ∗ ⊗ V2 X ∗ ⊗ V3 X ∗ k1 , ≥ kV1 X 1 2 3 β2 and kSV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − SAk1 = kS(V1 X1∗ · ((V2 X2∗ )> ≤ kV1 X1∗ · ((V2 X2∗ )> (V3 X3∗ )> ) − A1 )k1 (V3 X3∗ )> ) − A1 k1 = β1 kV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − Ak1 . (36) Then, we have b1 ⊗ V2 X b 2 ⊗ V3 X b3 − Ak1 kV1 X b1 ⊗ V2 X b 2 ⊗ V3 X b3 − SAk1 + (1 + β1 β2 )kV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − Ak1 ≤ β2 kSV1 X ≤ β2 βkSV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − SAk1 + (1 + β1 β2 )kV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − Ak1 ≤ β1 β2 βkV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − Ak1 + (1 + β1 β2 )kV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − Ak1 ≤ β(1 + 2β1 β2 )kV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − Ak1 . The first inequality follows by Equation (35). The second inequality follows by b1 ⊗ V2 X b 2 ⊗ V3 X b3 − SAk1 ≤ β min kSV1 X1 ⊗ V2 X2 ⊗ V3 X3 − SAk1 . kSV1 X X1 ,X2 ,X3 The third inequality follows by Equation (36). The final inequality follows using that β ≥ 1. Lemma D.8. Let min(b1 , b2 , b3 ) ≥ k. Given three matrices V1 ∈ Rn×b1 , V2 ∈ Rn×b2 , and V3 ∈ Rn×b3 , there exists an algorithm that takes O(nnz(A)) + n poly(b1 , b2 , b3 ) time and outputs a tensor 86 Algorithm 21 Reducing the Size of the Objective Function to poly(k) 1: 2: 3: 4: 5: 6: 7: 8: 9: procedure L1PolyKSizeReduction(A, V1 , V2 , V3 , n, b1 , b2 , b3 , k) . Lemma D.8 for i = 1 → 3 do e i ). ci ← O(b Choose sampling and rescaling matrices Ti ∈ Rci ×n according to the Lewis weights of Vi . Vbi ← Ti Vi ∈ Rci ×bi . end for C ← A(T1 , T2 , T3 ) ∈ Rc1 ×c2 ×c3 . return Vb1 , Vb2 , Vb3 and C. end procedure C ∈ Rc1 ×c2 ×c3 and three matrices Vb1 ∈ Rc1 ×b1 , Vb2 ∈ Rc2 ×b2 and Vb3 ∈ Rc3 ×b3 with c1 = c2 = c3 = poly(b1 , b2 , b3 ), such that with probability 0.99, for any α ≥ 1, if X10 , X20 , X30 satisfy that, k X (Vb1 X10 )i ⊗ (Vb2 X20 )i ⊗ (Vb3 X30 )i − C i=1 1 ≤ α min X1 ,X2 ,X3 then, k X (V1 X10 )i ⊗ (V2 X20 )i ⊗ (V3 X30 )i − A i=1 .α 1 min X1 ,X2 ,X3 k X (Vb1 X1 )i ⊗ (Vb2 X2 )i ⊗ (Vb3 X3 )i − C i=1 k X (V1 X1 )i ⊗ (V2 X2 )i ⊗ (V3 X3 )i − A i=1 , 1 . 1 Proof. For simplicity, we define OPT to be min X1 ,X2 ,X3 k X (V1 X1 )i ⊗ (V2 X2 )i ⊗ (V3 X3 )i − A i=1 . 1 e 1 ). Let Let T1 ∈ Rc1 ×n sample according to the Lewis weights of V1 ∈ Rn×b1 , where c1 = O(b c ×n n×b 2 2 e T2 ∈ R sample according to the Lewis weights of V2 ∈ R , where c2 = O(b2 ). Let T3 ∈ Rc3 ×n e 3 ). sample according to the Lewis weights of V3 ∈ Rn×b3 , where c3 = O(b 0 b ×k 0 b ×k 0 b ×k 1 2 3 For any α ≥ 1, let X1 ∈ R , X2 ∈ R , X3 ∈ R satisfy kT1 V1 X10 ⊗ T2 V2 X20 ⊗ T3 V3 X30 − A(T1 , T2 , T3 )k1 ≤α min X1 ∈Rb1 ×k ,X2 ∈Rb2 ×k ,X3 ∈Rb3 ×k kT1 V1 X1 ⊗ T2 V2 X2 ⊗ T3 V3 X3 − A(T1 , T2 , T3 )k1 . First, we regard T1 as the sketching matrix for the remainder. Then by Lemma D.11 in [SWZ17] and Theorem D.7, we have kV1 X10 ⊗ T2 V2 X20 ⊗ T3 V3 X30 − A(I, T2 , T3 )k1 .α min X1 ∈Rb1 ×k ,X2 ∈Rb2 ×k ,X3 ∈Rb3 ×k kV1 X1 ⊗ T2 V2 X2 ⊗ T3 V3 X3 − A(I, T2 , T3 )k1 . Second, we regard T2 as a sketching matrix for V1 X1 ⊗ V2 X2 ⊗ T3 V3 X3 − A(I, I, T3 ). Then by Lemma D.11 in [SWZ17] and Theorem D.7, we have kV1 X10 ⊗ V2 X20 ⊗ T3 V3 X30 − A(I, I, T3 )k1 .α min X1 ∈Rb1 ×k ,X2 ∈Rb2 ×k ,X3 ∈Rb3 ×k kV1 X1 ⊗ V2 X2 ⊗ T3 V3 X3 − A(I, I, T3 )k1 . 87 Third, we regard T3 as a sketching matrix for V1 X1 ⊗ V2 X2 ⊗ V3 X3 − A. Then by Lemma D.11 in [SWZ17] and Theorem D.7, we have k X (V1 X10 )i ⊗ (V2 X20 )i ⊗ (V3 X30 )i − A i=1 .α 1 min X1 ,X2 ,X3 k X (V1 X1 )i ⊗ (V2 X2 )i ⊗ (V3 X3 )i − A i=1 . 1 Lemma D.9. Given tensor A ∈ Rn1 ×n2 ×n3 , and two matrices U ∈ Rn1 ×s , V ∈ Rn2 ×s with rank(U ) = r, let T ∈ Rt×n1 be a sampling/rescaling matrix according to the Lewis weights of U e with t = O(r). Then with probability at least 0.99, for all X 0 ∈ Rn3 ×s , α ≥ 1 which satisfy kT1 U ⊗ V ⊗ X 0 − T1 Ak1 ≤ α · X∈Rn3 ×s kU ⊗ V ⊗ X 0 − Ak1 . α · X∈Rn3 ×s min kT1 U ⊗ V ⊗ X − T1 Ak1 , min kU ⊗ V ⊗ X − Ak1 . it holds that The proof is similar to the proof of Lemma D.8. Proof. Let X ∗ = arg min kU ⊗ V ⊗ X − Ak1 . Then according to Lemma D.11 in [SWZ17], T has X∈Rn3 ×s at most constant dilation (Definition D.5) on U · (V > contraction (Definition D.6) on U . We first look at (X ∗ )> ) − A1 , and has at most constant kT U ⊗ V ⊗ X 0 − T Ak1 = kT U · (V > (X 0 )> ) − T A1 k1 ≥ kT U · ((V > (X 0 )> ) − (V > (X ∗ )> ))k1 − kT U · (V > (X ∗ )> ) − T A1 k1 1 1 ≥ kU · ((V > (X 0 )> ) − A1 k1 − ( + β1 )kU · (V > (X ∗ )> ) − A1 k1 , β2 β2 where β1 ≥ 1, β2 ≥ 1 are two constants. Then we have: kU ⊗ V ⊗ X 0 − Ak1 ≤ β2 kT U · (V > ≤ αβ2 kT U · (V > ≤ αβ1 β2 kU · (V > (X 0 )> ) − T A1 k1 + (1 + β1 β2 )kU · (V > (X ∗ )> ) − T A1 k1 + (1 + β1 β2 )kU · (V > (X ∗ )> ) − A1 k1 + (1 + β1 β2 )kU · (V > . αkU ⊗ V ⊗ X ∗ − Ak1 . (X ∗ )> ) − A1 k1 (X ∗ )> ) − A1 k1 (X ∗ )> ) − A1 k1 Corollary D.10. Given tensor A ∈ Rn×n×n , and two matrices U ∈ Rn×s , V ∈ Rn×s with rank(U ) = r1 , rank(V ) = r2 , let T1 ∈ Rt1 ×n be a sampling/rescaling matrix according to the Lewis weights of U , and let T2 ∈ Rt2 ×n be a sampling/rescaling matrix according to the Lewis weights of V with e 1 ), t2 = O(r e 2 ). Then with probability at least 0.99, for all X 0 ∈ Rn×s , α ≥ 1 which satisfy t1 = O(r kT1 U ⊗ T2 V ⊗ X 0 − A(T1 , T2 , I)k1 ≤ α · min kT1 U ⊗ T2 V ⊗ X − A(T1 , T2 , I)k1 , X∈Rn×s it holds that kU ⊗ V ⊗ X 0 − Ak1 . α · min kU ⊗ V ⊗ X − Ak1 . X∈Rn×s 88 Proof. We apply Lemma D.9 twice: if kT1 U ⊗ T2 V ⊗ X 0 − A(T1 , T2 , I)k1 ≤ α · min kT1 U ⊗ T2 V ⊗ X − A(T1 , T2 , I)k1 , X∈Rn×s then kU ⊗ T2 V ⊗ X 0 − A(I, T2 , I)k1 . α · min kU ⊗ T2 V ⊗ X − A(I, T2 , I)k1 . X∈Rn×s Then, we have kU ⊗ V ⊗ X 0 − Ak1 . α · min kU ⊗ V ⊗ X − Ak1 . X∈Rn×s D.4 Solving small problems Theorem D.11. Let maxi {ti , di } ≤ n. Given a t1 × t2 × t3 tensor A and three matrices: a t1 × d1 matrix T1 , a t2 × d2 matrix T2 , and a t3 × d3 matrix T3 , if for δ > 0 there exists a solution to min X1 ,X2 ,X3 k X (T1 X1 )i ⊗ (T2 X2 )i ⊗ (T3 X3 )i − A i=1 := OPT, 1 such that each entry of Xi can be expressed using O(nδ ) bits, then there exists an algorithm that b1 , X b2 , and X b3 such that k(T1 X b1 ) ⊗ takes nO(δ) · 2O(d1 k+d2 k+d3 k) time and outputs three matrices: X b2 ) ⊗ (T3 X b3 ) − Ak1 = OPT. (T2 X Proof. For each i ∈ [3], we can create ti × Pdki variables to represent matrix Xi . Let x denote the list of these variables. Let B denote tensor i=1 (T1 X1 )i ⊗ (T2 X2 )i ⊗ (T3 X3 )i . Then we can write the following objective function, min x t1 X t2 X t3 X i=1 j=1 l=1 |Bi,j,l (x) − Ai,j,l |. To remove the | · |, we create t1 t2 t3 extra variables σi,j,l . Then we obtain the objective function: min x,σ s.t. t1 X t2 X t3 X i=1 j=1 l=1 2 σi,j,l = 1, σi,j,l (Bi,j,l (x) − Ai,j,l ) σi,j,l (Bi,j,l (x) − Ai,j,l ) ≥ 0, δ) kxk22 + kσk22 ≤ 2O(n where the last constraint is unharmful, because there exists a solution that can be written using O(nδ ) bits. Note that the number of inequality constraints in the above system is O(t1 t2 t3 ), the degree is O(1), and the number of variables is v = (t1 t2 t3 +d1 k +d2 k +d3 k). Thus by Theorem B.11, we know that the minimum nonzero cost is at least δ e O(v) (2O(n ) )−2 89 . δ It is immediate that the upper bound on cost is at most 2O(n ) , and thus the number of binary δ e search steps is at most log(2O(n ) )2O(v) . In each step of the binary search, we need to choose a cost C between the lower bound and the upper bound, and write down the polynomial system, t1 X t2 X t3 X i=1 j=1 l=1 2 σi,j,l = 1, σi,j,l (Bi,j,l (x) − Ai,j,l ) ≤ C, σi,j,l (Bi,j,l (x) − Ai,j,l ) ≥ 0, δ kxk22 + kσk22 ≤ 2O(n ) . Using Theorem B.10, we can determine if there exists a solution to the above polynomial system. Since the number of variables is v, and the degree is O(1), the number of inequality constraints is t1 t2 t2 . Thus, the running time is poly(bitsize) · (# constraints · degree)# variables = nO(δ) 2O(v) e D.5 Bicriteria algorithms We present several bicriteria algorithms with different tradeoffs. We first present an algorithm that e 3 ) in Theorem D.12. Then we show runs in nearly linear time and outputs a solution with rank O(k an algorithm that runs in nnz(A) time but outputs a solution with rank poly(k) in Theorem D.13. Then we explain an idea which is able to decrease the cubic rank to quadratic rank, and thus we can obtain Theorem D.14 and Theorem D.15. D.5.1 Input sparsity time e 3 ), Nearly Input SparAlgorithm 22 `1 -Low Rank Approximation, Bicriteria Algorithm, rank-O(k sity Time 1: 2: 3: 4: 5: 6: procedure L1BicriteriaAlgorithm(A, n, k) . Theorem D.12 e s1 ← s2 ← s3 ← O(k). 2 For each i ∈ [3], choose Si ∈ Rn ×si to be a dense Cauchy transform. . Part (I) of Theorem D.2 Compute A1 · S1 , A2 · S2 , A3 · S3 . Y1 , Y2 , Y3 , C ←L1PolyKSizeReduction(A, A1 S1 , A2 S2 , A3 S3 , n, s1 , s2 , s3 , k) . Algorithm 21 Form objective function min X∈Rs1 ×s2 ×s3 s1 X s2 X s3 X i=1 j=1 l=1 Xi,j,l (Y1 )i ⊗ (Y2 )j ⊗ (Y3 )l − C . 1 Run `1 -regression solver to find X. 8: return A1 S1 , A2 S2 , A3 S3 and X. 9: end procedure 7: 90 e 3 ). Theorem D.12. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1,  ∈ (0, 1), let r = O(k e + O(n) poly(k) + poly(k) time and outputs three There exists an algorithm which takes nnz(A) · O(k) n×r matrices U, V, W ∈ R such that r X Ui ⊗ Vi ⊗ Wi − A i=1 1 holds with probability 9/10. e 3/2 ) log3 n ≤ O(k min rank −k Ak kAk − Ak1 2 Proof. We first choose three dense Cauchy transforms Si ∈ Rn ×si . According to Section B.7, for e each i ∈ [3], Ai Si can be computed in nnz(A)·O(k) time. Then we apply Lemma D.8 (Algorithm 21). We obtain three matrices Y1 , Y2 , Y3 and a tensor C. Note that for each i ∈ [3], Yi can be computed e in n poly(k) time. Because C = A(T1 , T2 , T3 ) and T1 , T2 , T3 ∈ Rn×O(k) are three sampling and e 3 ) time. At the end, we just need to run an rescaling matrices, C can be computed in nnz(A) + O(k `1 -regression solver to find the solution to the problem, min X∈Rs1 ×s2 ×s3 s1 X s2 X s3 X i=1 j=1 l=1 Xi,j,l (Y1 )i ⊗ (Y2 )j ⊗ (Y3 )j , 1 where (Y1 )i denotes the i-th column of matrix Y1 . Since the size of the above problem is only poly(k), this can be solved in poly(k) time. Algorithm 23 `1 -Low Rank Approximation, Bicriteria Algorithm, rank-poly(k), Input Sparsity Time 1: procedure L1BicriteriaAlgorithm(A, n, k) . Theorem D.13 e 5 ). 2: s1 ← s2 ← s3 ← O(k 2 3: For each i ∈ [3], choose Si ∈ Rn ×si to be a sparse Cauchy transform. . Part (II) of Theorem D.4 4: Compute A1 · S1 , A2 · S2 , A3 · S3 . 5: Y1 , Y2 , Y3 , C ←L1PolyKSizeReduction(A, A1 S1 , A2 S2 , A3 , S3 , n, s1 , s2 , s3 , k) . Algorithm 21 6: Form objective function min X∈Rs1 ×s2 ×s3 s1 X s2 X s3 X i=1 j=1 l=1 Xi,j,l (Y1 )i ⊗ (Y2 )j ⊗ (Y3 )l − C . 1 Run `1 -regression solver to find X. return A1 S1 , A2 S2 , A3 S3 and X. 9: end procedure 7: 8: e 15 ). Theorem D.13. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1,  ∈ (0, 1), let r = O(k There exists an algorithm that takes nnz(A)+O(n) poly(k)+poly(k) time and outputs three matrices U, V, W ∈ Rn×r such that r X i=1 Ui ⊗ Vi ⊗ Wi − A 1 ≤ poly(k, log n) holds with probability 9/10. 91 min rank −k Ak kAk − Ak1 2 Proof. We first choose three dense Cauchy transforms Si ∈ Rn ×si . According to Section B.7, for each i ∈ [3], Ai Si can be computed in O(nnz(A)) time. Then we apply Lemma D.8 (Algorithm 21), and can obtain three matrices Y1 , Y2 , Y3 and a tensor C. Note that for each i ∈ [3], Yi can e be computed in O(n) poly(k) time. Because C = A(T1 , T2 , T3 ) and T1 , T2 , T3 ∈ Rn×O(k) are three e 3 ) time. At the end, we just sampling and rescaling matrices, C can be computed in nnz(A) + O(k need to run an `1 -regression solver to find the solution to the problem, min X∈Rs1 ×s2 ×s3 s1 X s2 X s3 X i=1 j=1 l=1 Xi,j,l (Y1 )i ⊗ (Y2 )j ⊗ (Y3 )l − C , 1 where (Y1 )i denotes the i-th column of matrix Y1 . Since the size of the above problem is only poly(k), it can be solved in poly(k) time. D.5.2 Improving cubic rank to quadratic rank e 2 ), Nearly Input SparAlgorithm 24 `1 -Low Rank Approximation, Bicriteria Algorithm, rank-O(k sity Time 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: procedure L1BicriteriaAlgorithm(A, n, k) . Theorem D.14 e s1 ← s2 ← s3 ← O(k). 2 For each i ∈ [3], choose Si ∈ Rn ×si to be a dense Cauchy transform. . Part (I) of Theorem D.2 Compute A1 · S1 , A2 · S2 . For each i ∈ [2], choose Ti to be a sampling and rescaling diagonal matrix according to the e Lewis weights of Ai Si , with ti = O(k) nonzero entries. C ← A(T1 , T2 , I). B i+(j−1)s1 ← vec((T1 A1 S1 )i ⊗ (T2 A2 S2 )j ), ∀i ∈ [s1 ], j ∈ [s2 ]. Form objective function minW kW B − C3 k1 c. Run `1 -regression solver to find W b by using A1 S1 according to Equation (38). Construct U b Construct V by using A2 S2 according to Equation (39). b , Vb , W c. return U end procedure e 2 ). Theorem D.14. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1,  ∈ (0, 1), let r = O(k e + O(n) poly(k) + poly(k) time and outputs three There exists an algorithm which takes nnz(A) · O(k) n×r matrices U, V, W ∈ R such that r X i=1 Ui ⊗ Vi ⊗ Wi − A holds with probability 9/10. Proof. Let OPT = min Ak ∈Rn×n×n 1 e 3/2 ) log3 n ≤ O(k min rank −k Ak kAk − Ak1 2 ×s kAk −Ak1 . We first choose three dense Cauchy transforms Si ∈ Rn i , e ∀i ∈ [3]. According to Section B.7, for each i ∈ [3], Ai Si can be computed in nnz(A) · O(k) time. Then we choose Ti to be a sampling and rescaling diagonal matrix according to the Lewis weights of Ai Si , ∀i ∈ [2]. 92 According to Theorem D.4, we have k X (A1 S1 X1 )l ⊗ (A2 S2 X2 )l ⊗ (A3 S3 X3 )l − A min X1 ∈Rs1 ×k ,X2 ∈Rs2 ×k ,X3 ∈Rs3 ×k l=1 e 1.5 ) log3 n OPT ≤ O(k 1 Now we fix an l and we have: (A1 S1 X1 )l ⊗ (A2 S2 X2 )l ⊗ (A3 S3 X3 )l  ! s s1 2 X X = (A1 S1 )i (X1 )i,l ⊗  (A2 S2 )j (X2 )j,l  ⊗ (A3 S3 X3 )l i=1 = j=1 s1 X s2 X i=1 j=1 (A1 S1 )i ⊗ (A2 S2 )j ⊗ (A3 S3 X3 )l (X1 )i,l (X2 )j,l Thus, we have min X1 ,X2 ,X3 s1 X s2 X (A1 S1 )i ⊗ (A2 S2 )j ⊗ i=1 j=1 k X (A3 S3 X3 )l (X1 )i,l (X2 )j,l l=1 ! −A 1 e 1.5 ) log3 n OPT . ≤ O(k (37) b ∈ Rn×s1 s2 by copying matrix A1 S1 s2 times, i.e., We create matrix U   b = A1 S1 A1 S1 · · · A1 S1 . U (38) We create matrix Vb ∈ Rn×s1 s2 by copying the i-th column of A2 S2 a total of s1 times into the columns (i − 1)s1 , · · · , is1 of Vb , for each i ∈ [s2 ], i.e.,   (39) Vb = (A2 S2 )1 · · · (A2 S2 )1 (A2 S2 )2 · · · (A2 S2 )2 · · · (A2 S2 )s2 · · · (A2 S2 )s2 . According to Equation (37), we have: min W ∈Rn×s1 s2 Let b ⊗ Vb ⊗ W − Ak1 ≤ O(k e 1.5 ) log3 n · OPT . kU c = arg min kT1 U b ⊗ T2 Vb ⊗ W − A(T1 , T2 , I)k1 . W W ∈Rn×s1 s2 Due to Corollary D.10, we have b ⊗ Vb ⊗ W c − Ak1 ≤ O(k e 1.5 ) log3 n · OPT . kU b , Vb , W c gives a rank-O(k e 2 ) bicriteria algorithm to the original Putting it all together, we have that U problem. e 10 ). Theorem D.15. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1,  ∈ (0, 1), let r = O(k There exists an algorithm which takes nnz(A) + O(n) poly(k) + poly(k) time and outputs three matrices U, V, W ∈ Rn×r such that r X i=1 Ui ⊗ Vi ⊗ Wi − A 1 ≤ poly(k, log n) holds with probability 9/10. 93 min rank −k Ak kAk − Ak1 Algorithm 25 `1 -Low Rank Approximation, Bicriteria Algorithm, rank-poly(k), Input Sparsity Time 1: procedure L1BicriteriaAlgorithm(A, n, k) . Theorem D.15 5 e 2: s1 ← s2 ← s3 ← O(k ). 2 3: For each i ∈ [3], choose Si ∈ Rn ×si to be a sparse Cauchy transform. . Part (II) of Theorem D.2 4: Compute A1 · S1 , A2 · S2 . 5: For each i ∈ [2], choose Ti to be a sampling and rescaling diagonal matrix according to the e Lewis weights of Ai Si , with ti = O(k) nonzero entries. 6: C ← A(T1 , T2 , I). 7: B i+(j−1)s1 ← vec((T1 A1 S1 )i ⊗ (T2 A2 S2 )j ), ∀i ∈ [s1 ], j ∈ [s2 ]. 8: Form objective function minW kW B − C3 k1 . c. 9: Run `1 -regression solver to find W b 10: Construct U by using A1 S1 according to Equation (38). 11: Construct Vb by using A2 S2 according to Equation (39). b , Vb , W c. 12: return U 13: end procedure Proof. The proof is similar to the proof of Theorem D.14. The only difference is that instead of choosing dense Cauchy matrices S1 , S2 , we choose sparse Cauchy matrices. Notice that if we firstly apply a sparse Cauchy transform, we can reduce the rank of the matrix to poly(k). Then we apply a dense Cauchy transform and can further reduce the dimension while only incurring another poly(k) factor in the approximation ratio. By combining a sparse Cauchy e transform and a dense Cauchy transform, we can improve the running time from nnz(A) · O(k) to nnz(A). e 2 ). Corollary D.16. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1,  ∈ (0, 1), let r = O(k There exists an algorithm which takes nnz(A) + O(n) poly(k) + poly(k) time and outputs three matrices U, V, W ∈ Rn×r such that r X i=1 Ui ⊗ Vi ⊗ Wi − A 1 ≤ poly(k, log n) min rank −k Ak kAk − Ak1 holds with probability 9/10. D.6 Algorithms In this section, we show two different algorithms by using different kind of sketches. One is shown in Theorem D.17 which gives a fast running time. Another one is shown in Theorem D.19 which gives the best approximation ratio. D.6.1 Input sparsity time algorithm Theorem D.17. Given a 3rd tensor A ∈ Rn×n×n , for any k ≥ 1, there exists an algorithm that e 2 e takes nnz(A) · O(k) + O(n) poly(k) + 2O(k ) time and outputs three matrices U, V, W ∈ Rn×k such that, kU ⊗ V ⊗ W − Ak1 ≤ poly(k, log n) 94 min rank −k A0 kA0 − Ak1 . e 2 ), Input Sparsity Algorithm 26 `1 -Low Rank Approximation, Bicriteria Algorithm, rank-O(k Time 1: procedure L1BicriteriaAlgorithm(A, n, k) . Corollary D.16 e 2: s1 ← s2 ← s3 ← O(k). 2 3: For each i ∈ [3], choose Si ∈ Rn ×si to be the composition of a sparse Cauchy transform and a dense Cauchy transform. . Part (I,II) of Theorem D.2 4: Compute A1 · S1 , A2 · S2 . 5: For each i ∈ [2], choose Ti to be a sampling and rescaling diagonal matrix according to the e Lewis weights of Ai Si , with ti = O(k) nonzero entries. 6: C ← A(T1 , T2 , I). 7: B i+(j−1)s1 ← vec((T1 A1 S1 )i ⊗ (T2 A2 S2 )j ), ∀i ∈ [s1 ], j ∈ [s2 ]. 8: Form objective function minW kW B − C3 k1 . c. 9: Run `1 -regression solver to find W b by using A1 S1 according to Equation (38). 10: Construct U b 11: Construct V by using A2 S2 according to Equation (39). b , Vb , W c. 12: return U 13: end procedure Algorithm 27 `1 -Low Rank Approximation, Input sparsity Time Algorithm 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: procedure L1TensorLowRankApproxInputSparsity(A, n, k) . Theorem D.17 5 e s1 ← s2 ← s3 ← O(k ). 2 Choose Si ∈ Rn ×si to be a dense Cauchy transform, ∀i ∈ [3]. . Part (I) of Theorem D.4 Compute A1 · S1 , A2 · S2 , and A3 · S3 . Y1 , Y2 , Y3 , C ←L1PolyKSizeReduction(A, A1 S1 , A2 S2 , A3 S3 , n, s1 , s2 , s3 , k). . Algorithm 21 Create variables s1 × k + s2 × k + s3 × k variables for each entry of X1 , X2 , X3 . Form objective function k(Y1 X1 ) ⊗ (Y2 X2 ) ⊗ (Y3 X3 ) − Ck2F . Run polynomial system verifier. return A1 S1 X1 , A2 S2 X2 , A3 S3 X3 . end procedure holds with probability at least 9/10. Proof. First, we apply part (II) of Theorem D.4. Then Ai Si can be computed in O(nnz(A)) time. Second, we use Lemma D.8 to reduce the size of the objective function from O(n3 ) to poly(k) in n poly(k) time by only losing a constant factor in approximation ratio. Third, we use Claim B.15 to relax the objective function from entry-wise `1 -norm to Frobenius norm, and this step causes us to lose some other poly(k) factors in approximation ratio. As a last step, we use Theorem C.45 to solve the Frobenius norm objective function. Notice again that if we first apply a sparse Cauchy transform, we can reduce the rank of the matrix to poly(k). Then as before we can apply a dense Cauchy transform to further reduce the dimension while only incurring another poly(k) factor in the approximation ratio. By combining a sparse Cauchy transform and a dense Cauchy transform, we can improve the running time from e nnz(A) · O(k) to nnz(A), while losing some additional poly(k) factors in approximation ratio. 95 Corollary D.18. Given a 3rd tensor A ∈ Rn×n×n , for any k ≥ 1, there exists an algorithm that e 2 takes nnz(A) + O(n) poly(k) + 2O(k ) time and outputs three matrices U, V, W ∈ Rn×k such that, kU ⊗ V ⊗ W − Ak1 ≤ poly(k, log n) min rank −k A0 kA0 − Ak1 . holds with probability at least 9/10. D.6.2 e 3/2 )-approximation algorithm O(k e 3/2 )-approximation Algorithm 28 `1 -Low Rank Approximation Algorithm, O(k 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: procedure L1TensorLowRankApproxK(A, n, k) . Theorem D.19 e s1 ← s2 ← s3 ← O(k). 2 Guess diagonal matrices Si ∈ Rn ×si with si nonzero entries, ∀i ∈ [3]. . Part (III) of Theorem D.4 Compute A1 · S1 , A2 · S2 , and A3 · S3 . Y1 , Y2 , Y3 , C ←L1PolyKSizeReduction(A, A1 S1 , A2 S2 , A3 S3 , n, s1 , s2 , s3 , k). . Algorithm 21 Create s1 × k + s2 × k + s3 × k variables for each entry of X1 , X2 , X3 . Form objective function k(Y1 X1 ) ⊗ (Y2 X2 ) ⊗ (Y3 X3 ) − Ck1 . Run polynomial system verifier. return U, V, W . end procedure Theorem D.19. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, there exists an algorithm e e 3 that takes nO(k) 2O(k ) time and output three matrices U, V, W ∈ Rn×k such that, e 3/2 ) kU ⊗ V ⊗ W − Ak1 ≤ O(k min rank −k A0 kA0 − Ak1 . holds with probability at least 9/10. Proof. First, we apply part (III) of Theorem D.4. Then, guessing Si requires nO(k) time. Second, we use Lemma D.8 to reduce the size of the objective from O(n3 ) to poly(k) in polynomial time while only losing a constant factor in approximation ratio. Third, we use Theorem D.11 to solve the entry-wise `1 -norm objective function directly. e D.7 CURT decomposition Theorem D.20. Given a 3rd order tensor A ∈ Rn×n×n , let k ≥ 1, let UB , VB , WB ∈ Rn×k denote a rank-k, α-approximation to A. Then there exists an algorithm which takes O(nnz(A)) + O(n2 ) poly(k) time and outputs three matrices: C ∈ Rn×c with columns from A, R ∈ Rn×r with rows from A, T ∈ Rn×t with tubes from A, and a tensor U ∈ Rc×r×t with rank(U ) = k such that c = r = t = O(k log k), and c X r X t X i=1 j=1 l=1 Ui,j,l · Ci ⊗ Rj ⊗ Tl − A 1 holds with probability 9/10. 96 e 1.5 )α ≤ O(k min rank −k A0 kA0 − Ak1 Algorithm 29 `1 -CURT Decomposition Algorithm 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: procedure L1CURT(A, UB , VB , WB , n, k) . Theorem D.20 2 > > k×n Form B1 = VB WB ∈ R . 2 2 Let D1> ∈ Rn ×n be the sampling and rescaling diagonal matrix corresponding to the Lewis weights of B1> , and let D1 have d1 = O(k log k) nonzero entries. b = A1 D1 (B1 D1 )† ∈ Rn×k . Form U b > W > ∈ Rk×n2 . Form B2 = U B 2 2 Let D2> ∈ Rn ×n be the sampling and rescaling diagonal matrix corresponding to the Lewis weights of B2> , and let D2 have d2 = O(k log k) nonzero entries. Form Vb = A2 D2 (B2 D2 )† ∈ Rn×k . b > Vb > ∈ Rk×n2 . Form B3 = U 2 2 Let D3> ∈ Rn ×n be the sampling and rescaling diagonal matrix corresponding to the Lewis weights of B3> , and let D3 have d3 = O(k log k) nonzero entries. C←A P1 D1 , R ← A2 D2 , T ← A3 D3 . U ← ki=1 ((B1 D1 )† )i ⊗ ((B2 D2 )† )i ⊗ ((B3 D3 )† )i . return C, R, T and U . end procedure Proof. We define OPT := min rank −k A0 kA0 − Ak1 . We already have three matrices UB ∈ Rn×k , VB ∈ Rn×k and WB ∈ Rn×k and these three matrices provide a rank-k, α approximation to A, i.e., k X (UB )i ⊗ (VB )i ⊗ (WB )i − A i=1 1 ≤ α OPT (40) 2 Let B1 = VB> WB> ∈ Rk×n denote the matrix where the i-th row is the vectorization of (VB )i ⊗ 2 2 (WB )i . By Section B.3, we can compute D1 ∈ Rn ×n which is a sampling and rescaling matrix corresponding to the Lewis weights of B1> in O(n2 poly(k)) time, and there are d1 = O(k log k) 2 nonzero entries on the diagonal of D1 . Let Ai ∈ Rn×n denote the matrix obtained by flattening A along the i-th direction, for each i ∈ [3]. b = A1 D1 (B1 D1 )† ∈ Rn×k , Define U ∗ ∈ Rn×k to be the optimal solution to min kU B1 −A1 k1 , U U ∈Rn×k V0 ∈ Rn×k to be the optimal solution to solution to min kU B1 D1 − A1 D1 k1 . U ∈Rn×k b> min kV · (U V ∈Rn×k WB> ) − A2 k1 , and U 0 to be the optimal By Claim B.13, we have b B1 D1 − A1 D1 k1 ≤ kU p d1 kU 0 B1 D1 − A1 D1 k1 Due to Lemma D.11 and Lemma D.8 (in [SWZ17]) with constant probability, we have p b B1 − A1 k1 ≤ d1 αD kU ∗ B1 − A1 k1 , kU 1 where αD1 = O(1). 97 (41) b > W > ) ∈ Rk×n2 denotes the matrix where the i-th row is the vectorization of Recall that (U B bi ⊗ (WB )i , ∀i ∈ [k]. Now, we can show, U b> kV0 · (U b B 1 − A1 k 1 WB> ) − A2 k1 ≤ kU b> by V0 = arg minkV · (U V p . d1 kU ∗ B1 − A1 k1 p ≤ d1 kUB B1 − A1 k1 ∈Rn×k WB> ) − A2 k1 by Equation (41) ∗ by U = arg minkU B1 − A1 k1 U ∈Rn×k p ≤ O( d1 )α OPT by Equation (40) (42) b > W > . We can compute D2 ∈ Rn2 ×n2 which is a sampling and rescaling maWe define B2 = U B trix corresponding to the Lewis weights of B2> in O(n2 poly(k)) time, and there are d2 = O(k log k) nonzero entries on the diagonal of D2 . Define V ∗ ∈ Rn×k to be the optimal solution of minV ∈Rn×k kV B2 − A2 k1 , Vb = A2 D2 (B2 D2 )† ∈ b > Vb > ) − A3 k1 , and V 0 to be the Rn×k , W0 ∈ Rn×k to be the optimal solution of min kW · (U W ∈Rn×k optimal solution of min kV B2 D2 − A2 D2 k1 . V ∈Rn×k By Claim B.13, we have kVb B2 D2 − A2 D2 k1 ≤ p d2 kV 0 B2 D2 − A2 D2 k1 . Due to Lemma D.11 and Lemma D.8(in [SWZ17]) with constant probability, we have p kVb B2 − A2 k1 ≤ d2 αD2 kV ∗ B2 − A2 k1 , (43) where αD2 = O(1). b > Vb > ) ∈ Rk×n2 denotes the matrix for which the i-th row is the vectorization Recall that (U bi ⊗ Vbi , ∀i ∈ [k]. Now, we can show, of U b> kW0 · (U Vb > ) − A3 k1 ≤ kVb B2 − A2 k1 p d2 kV ∗ B2 − A2 k1 p ≤ d2 kV0 B2 − A2 k1 . b> by W0 = arg minkW · (U p ≤ O( d1 d2 )α OPT W ∈Rn×k Vb > ) − A3 k1 by Equation (43) ∗ by V = arg minkV B2 − A2 k1 V ∈Rn×k by Equation (42) (44) b > Vb > . We can compute D3 ∈ Rn2 ×n2 which is a sampling and rescaling maWe define B3 = U trix corresponding to the Lewis weights of B3> in O(n2 poly(k)) time, and there are d3 = O(k log k) nonzero entries on the diagonal of D3 . c = A3 D3 (B3 D3 )† ∈ Define W ∗ ∈ Rn×k to be the optimal solution to minW ∈Rn×k kW B3 −A3 k1 , W n×k 0 R , and W to be the optimal solution to min kW B3 D3 − A3 D3 k1 . W ∈Rn×k By Claim B.13, we have c B3 D3 − A3 D3 k1 ≤ kW p d3 kW 0 B3 D3 − A3 D3 k1 . Due to Lemma D.11 and Lemma D.8(in [SWZ17]) with constant probability, we have p c B3 − A3 k1 ≤ d3 αD kW ∗ B3 − A3 k1 , kW 3 98 (45) where αD3 = O(1). Now we can show, p c B3 − A3 k1 . d3 kW ∗ B3 − A3 k1 , kW p ≤ d3 kW0 B3 − A3 k1 , Thus, it implies, by Equation (45) ∗ by W = arg minkW B3 − A3 k1 W ∈Rn×k p ≤ O( d1 d2 d3 )α OPT k X i=1 bi ⊗ Vbi ⊗ W ci − A U by Equation (44) 1 ≤ poly(k, log n) OPT . b = A1 D1 (B1 D1 )† , Vb = A2 D2 (B2 D2 )† , W c = A3 D3 (B3 D3 )† . where U Algorithm 30 `1 -CURT decomposition algorithm 1: 2: 3: 4: 5: procedure L1CURT+ (A, n, k) UB , VB , WB ←L1LowRankApproximation(A, n, k). C, R, T, U ← L1CURT(A, UB , VB , WB , n, k). return C, R, T and U . end procedure . Theorem D.21 . Corollary D.18 . Algorithm 29 Theorem D.21. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, there exists an algorithm e 2 which takes O(nnz(A)) + O(n2 ) poly(k) + 2O(k ) time and outputs three matrices C ∈ Rn×c with columns from A, R ∈ Rn×r with rows from A, T ∈ Rn×t with tubes from A, and a tensor U ∈ Rc×r×t with rank(U ) = k such that c = r = t = O(k log k), and c X r X t X i=1 j=1 l=1 Ui,j,l · Ci ⊗ Rj ⊗ Tl − A ≤ poly(k, log n) min rank −k A0 1 holds with probability 9/10. Proof. This follows by combining Corollary D.18 and Theorem D.20. 99 kA0 − Ak1 , Entry-wise `p Norm for Arbitrary Tensors, 1 < p < 2 E There is a long line of research dealing with `p norm-related problems [DDH+ 09, MM13, CDMI+ 13, CP15, BCKY16, YCRM16, BBC+ 17]. In this section, we provide several different algorithms for tensor `p -low rank approximation. Section E.1 formally states the `p version of Theorem C.1 in [SWZ17]. Section E.2 presents several existence results. Section E.3 describes a tool that is able to reduce the size of the objective function from poly(n) to poly(k). Section E.4 discusses the case when the problem size is small. Section E.5 provides several bicriteria algorithms. Section E.6 summarizes a batch of algorithms. Section E.7 provides an algorithm for `p norm CURT decomposition. Notice that if the rank-k solution does not exist, then every bicriteria algorithm in Section E.5 can be stated in the form as Theorem 1.1, and every algorithm which can output a rank-k solution in Section E.6 can be stated in the form as Theorem 1.2. See Section 1 for more details. E.1 Existence results for matrix case Theorem E.1 ([SWZ17]). Let 1 ≤ p < 2. Given V ∈ Rk×n , A ∈ Rd×n . Let S ∈ Rn×s be a proper random sketching matrix. Let b = arg min kU V S − ASk2F , U U ∈Rd×k i.e., Then with probability at least 0.999, b = AS(V S)† . U b V − Akp ≤ α · min kU V − Akp . kU p p U ∈Rd×k (I). S denotes a dense p-stable transform, e e 1−p/2 ) log d. s = O(k), α = O(k (II). S denotes a sparse p-stable transform, e 5 ), α = O(k e 5−5p/2+2/p ) log d. s = O(k > (III). S denotes a sampling/rescaling matrix according to the `p Lewis weights of V > , e e 1−p/2 ). s = O(k), α = O(k We give the proof for completeness. e ∈ Rd×k Proof. Let S ∈ Rn×s be a sketching matrix which satisfies the property (∗): ∀c ≥ 1, U which satisfy e V S − ASkpp ≤ c · min kU V S − ASkpp , kU U ∈Rd×k we have e V − Akp ≤ cβS · min kU V − Akp , kU p p U ∈Rd×k where βS ≥ 1 only depends on the sketching matrix S. Let b i )> = arg min kx> V S − Ai Sk22 , ∀i ∈ [d], (U x∈Rk 100 i.e., b = AS(V S)† . U Let e = arg min kU V S − ASkp . U p U ∈Rd×k Then, we have: = b V S − ASkpp kU d X i=1 b i V S − Ai Skp kU p d X b i V S − Ai Sk2 )p ≤ (s1/p−1/2 kU ≤ ≤ i=1 d X e i V S − Ai Sk2 )p (s1/p−1/2 kU i=1 d X e i V S − Ai Skp )p (s1/p−1/2 kU i=1 1−p/2 ≤s e V S − ASkpp . kU The first inequality follows using ∀x ∈ Rs , kxkp ≤ s1/p−1/2 kxk2 since p < 2. The third inequality follows using ∀x ∈ Rs , kxk2 ≤ kxkp since p < 2. Thus, according to the property (∗) of S, b V − Akpp ≤ s1−p/2 βS min kU V − Akpp . kU U ∈Rd×k Due to Lemma E.8 and Lemma E.11 of [SWZ17], we have: e e 1−p/2 ) log d, for (I), s = O(k), βS = O(log d), α = s1−p/2 βS = O(k 5 2/p 1−p/2 e e e 5−5p/2+2/p ) log d, for (II), s = O(k ), βS = O(k log d), α = s βS = O(k 1−p/2 1−p/2 e e for (III), s = O(k), βS = O(1), α = s βS = O(k ). E.2 Existence results Theorem E.2. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, there exist three matrices 2 2 2 S1 ∈ Rn ×s1 , S2 ∈ Rn ×s2 , S3 ∈ Rn ×s3 such that min X1 ,X2 ,X3 k X (A1 S1 X1 )i ⊗ (A2 S2 X2 )i ⊗ (A3 S3 X3 )i − A i=1 holds with probability 99/100. (I). Using a dense p-stable transform, e e 3−1.5p ) log3 n. s1 = s2 = s3 = O(k), α = O(k (II). Using a sparse p-stable transform, e 5 ), α = O(k e 15−7.5p+6/p ) log3 n. s1 = s2 = s3 = O(k (III). Guessing Lewis weights, e e 3−1.5p ). s1 = s2 = s3 = O(k), α = O(k 101 p p ≤α min rank −k Ak ∈Rn×n×n kAk − Akpp , Proof. We use OPT to denote OPT := min rank −k Ak ∈Rn×n×n kAk − Akpp . Given a tensor A ∈ Rn1 ×n2 ×n3 , we define three matrices A1 ∈ Rn1 ×n2 n3 , A2 ∈ Rn2 ×n3 n1 , A3 ∈ Rn3 ×n1 n2 such that, for any i ∈ [n1 ], j ∈ [n2 ], l ∈ [n3 ] Ai,j,l = (A1 )i,(j−1)·n3 +l = (A2 )j,(l−1)·n1 +i = (A3 )l,(i−1)·n2 +j . We fix V ∗ ∈ Rn×k and W ∗ ∈ Rn×k , and use V1∗ , V2∗ , · · · , Vk∗ to denote the columns of V ∗ and W1∗ , W2∗ , · · · , Wk∗ to denote the columns of W ∗ . We consider the following optimization problem, min U1 ,··· ,Uk ∈Rn k X i=1 p Ui ⊗ Vi∗ ⊗ Wi∗ −A , p which is equivalent to min U1 ,··· ,Uk ∈Rn  U1 U2 · · ·   ∗ V1 ⊗ W1∗  V2∗ ⊗ W2∗   Uk   ···  − A Vk∗ ⊗ Wk∗ p . p  2 We use matrix Z1 to denote V ∗> W ∗> ∈ Rk×n and matrix U to denote U1 U2 · · · Then we can obtain the following equivalent objective function,  Uk . min kU Z1 − A1 kpp . U ∈Rn×k Choose a sketching matrix (a dense p-stable, a sparse p-stable or an `p Lewis weight sam2 pling/rescaling matrix to Z1 ) S1 ∈ Rn ×s1 . We can obtain the optimization problem, min kU Z1 S1 − A1 S1 kpp = min U ∈Rn×k U ∈Rn×k n X i=1 kU i Z1 S1 − (A1 S1 )i kpp , where U i denotes the i-th row of matrix U ∈ Rn×k and (A1 S1 )i denotes the i-th row of matrix A1 S1 . Instead of solving it under the `p -norm, we consider the `2 -norm relaxation, min kU Z1 S1 − A1 S1 k2F = min U ∈Rn×k U ∈Rn×k n X i=1 kU i Z1 S1 − (A1 S1 )i k22 . b ∈ Rn×k denote the optimal solution of the above optimization problem. Then, U b = Let U † b into the objective function under the `p -norm. By choosing s1 and A1 S1 (Z1 S1 ) . We plug U by the properties of sketching matrices (a dense p-stable, a sparse p-stable or an `p Lewis weight 2 sampling/rescaling matrix to Z1 ) S1 ∈ Rn ×s1 , we have b Z1 − A1 kpp ≤ α min kU Z1 − A1 kpp = α OPT . kU U ∈Rn×k This implies b ⊗ V ∗ ⊗ W ∗ − Akp ≤ α OPT . kU p 102 b ∈ Rn×k and W ∗ ∈ Rn×k , and convert tensor A into matrix A2 . Let As a second step, we fix U b > W ∗> . We consider the following objective function, matrix Z2 denote U min kV Z2 − A2 kpp , V ∈Rn×k and the optimal cost of it is at most α OPT. We choose a sketching matrix (a dense p-stable, a sparse p-stable or an `p Lewis weight sam2 pling/rescaling matrix to Z2 ) S2 ∈ Rn ×s2 and sketch on the right of the objective function to obtain the new objective function, min kV Z2 S2 − V ∈Rn×k A2 S2 kpp = min V ∈Rn×k n X i=1 kV i Z2 S2 − (A2 S2 )i kpp , where V i denotes the i-th row of matrix V and (A2 S2 )i denotes the i-th row of matrix A2 S2 . Instead of solving this under the `p -norm, we consider the `2 -norm relaxation, min kV Z2 S2 − A2 S2 k2F = min V ∈Rn×k V ∈Rn×k n X i=1 kV i (Z2 S2 ) − (A2 S2 )i k22 . Let Vb ∈ Rn×k denote the optimal solution of the above problem. Then Vb = A2 S2 (Z2 S2 )† . By 2 properties of sketching matrix S2 ∈ Rn ×s2 , we have, kVb Z2 − A2 kpp ≤ α min kV Z2 − A2 kpp ≤ α2 OPT, V ∈Rn×k which implies b ⊗ Vb ⊗ W ∗ − Akp ≤ α2 OPT, kU p b ∈ Rn×k and Vb ∈ Rn×k . We can convert tensor A ∈ Rn×n×n As a third step, we fix the matrices U 2 b > Vb > ∈ Rk×n2 . We consider the following into matrix A3 ∈ Rn ×n . Let matrix Z3 denote U objective function, min kW Z3 − A3 kpp , W ∈Rn×k and the optimal cost of it is at most α2 OPT. We choose sketching matrix (a dense p-stable, a sparse p-stable or an `p Lewis weight sam2 pling/rescaling matrix to Z3 ) S3 ∈ Rn ×s3 and sketch on the right of the objective function to obtain the new objective function, min kW Z3 S3 − A3 S3 kpp . W ∈Rn×k Instead of solving this under the `p -norm, we consider the `2 -norm relaxation, min kW Z3 S3 − A3 S3 k2F = W ∈Rn×k min W ∈Rn×k n X i=1 kW i (Z3 S3 ) − (A3 S3 )i k22 . c ∈ Rn×k denote the optimal solution of the above problem. Then W c = A3 S3 (Z3 S3 )† . By Let W 2 ×s n 3 , we have, properties of sketching matrix S3 ∈ R c Z3 − A3 kpp ≤ α min kW Z3 − A3 kpp ≤ α3 OPT . kW W ∈Rn×k 103 Thus, we obtain, min X1 ∈Rs1 ×k ,X2 ∈Rs2 ×k ,X3 ∈Rs3 ×k k X (A1 S1 X1 )i ⊗ (A2 S2 X2 )i ⊗ (A3 S3 X3 )i − A i=1 p p ≤ α3 OPT . According to Theorem E.1, we let s = s1 = s2 = s3 and take the corresponding α. We can directly get the results for (I), (II) and (III). E.3 Polynomial in k size reduction Definition E.3 (Definition E.1 in [SWZ17]). Given a matrix M ∈ Rn×d , if matrix S ∈ Rm×n satisfies kSM kpp ≤ βkM kpp , then S has at most β dilation on M in the `p case. Definition E.4 (Definition E.2 in [SWZ17]). Given a matrix U ∈ Rn×k , if matrix S ∈ Rm×n satisfies ∀x ∈ Rk , kSU xkpp ≥ 1 kU xkpp , β then S has at most β contraction on U in the `p case. Theorem E.5. Given a tensor A ∈ Rn1 ×n2 ×n3 and three matrices V1 ∈ Rn1 ×b1 , V2 ∈ Rn2 ×b2 , V3 ∈ Rn3 ×b3 , let X1∗ ∈ Rb1 ×k , X2∗ ∈ Rb2 ×k , X3∗ ∈ Rb3 ×k satisfy X1∗ , X2∗ , X3∗ = arg min X1 ∈Rb1 ×k ,X2 ∈Rb2 ×k ,X3 ∈Rb3 ×k kV1 X1 ⊗ V2 X2 ⊗ V3 X3 − Akpp . Let S ∈ Rm×n have at most β1 ≥ 1 dilation on V1 X1∗ · ((V2 X2∗ )> (V3 X3∗ )> ) − A1 and S have at b1 ∈ Rb1 ×k , X b2 ∈ Rb2 ×k , X b3 ∈ Rb3 ×k satisfy most β2 ≥ 1 contraction on V1 in the `p case. If X b 1 ⊗ V2 X b2 ⊗ V3 X b3 − SAkpp ≤ β kSV1 X min X1 ∈Rb1 ×k ,X2 ∈Rb2 ×k ,X3 ∈Rb3 ×k kSV1 X1 ⊗ V2 X2 ⊗ V3 X3 − SAkpp , where β ≥ 1, then b 1 ⊗ V2 X b2 ⊗ V3 X b3 − Akpp . β1 β2 β kV1 X min X1 ,X2 ,X3 kV1 X1 ⊗ V2 X2 ⊗ V3 X3 − Akpp . The proof is essentially the same as the proof of Theorem D.7: b1 ∈ Rb1 ×k , X b2 ∈ Proof. Let A, V1 , V2 , V3 , S, X1∗ , X2∗ , X3∗ , β1 , β2 be as stated in the theorem. Let X b ×k b ×k b3 ∈ R 3 satisfy R 2 ,X b 1 ⊗ V2 X b2 ⊗ V3 X b3 − SAkp ≤ β kSV1 X p min X1 ∈Rb1 ×k ,X2 ∈Rb2 ×k ,X3 ∈Rb3 ×k kSV1 X1 ⊗ V2 X2 ⊗ V3 X3 − SAkpp . Similar to the proof of Theorem D.7, we have, b 1 ⊗ V2 X b2 ⊗ V3 X b3 − SAkp kSV1 X p 1 b 2 ⊗ V3 X b3 − Akp − (21−p 1 + β1 )kV1 X ∗ ⊗ V2 X ∗ ⊗ V3 X ∗ − Akp b1 ⊗ V2 X = 22−2p kV1 X p 1 2 3 p β2 β2 104 The only difference from the proof of Theorem D.7 is that instead of using triangle inequality, we actually use kx + ykpp ≤ 2p−1 kxkpp + kykpp . Then, we have b 1 ⊗ V2 X b2 ⊗ V3 X b3 − Akp kV1 X p 2p−2 b b b3 − SAkp + (2p−1 + 22p−2 β1 β2 )kV1 X ∗ ⊗ V2 X ∗ ⊗ V3 X ∗ − Akp ≤2 β2 kSV1 X1 ⊗ V2 X2 ⊗ V3 X p 1 2 3 p ≤ 22p−2 β2 βkSV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − SAkpp + (2p−1 + 22p−2 β1 β2 )kV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − Akpp ≤ 22p−2 β1 β2 βkV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − Akpp + (2p−1 + 22p−2 β1 β2 )kV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − Akpp ≤ 2p−1 β(1 + 2β1 β2 )kV1 X1∗ ⊗ V2 X2∗ ⊗ V3 X3∗ − Akpp . Lemma E.6. Let min(b1 , b2 , b3 ) ≥ k. Given three matrices V1 ∈ Rn×b1 , V2 ∈ Rn×b2 , and V3 ∈ Rn×b3 , there exists an algorithm which takes O(nnz(A))+n poly(b1 , b2 , b3 ) time and outputs a tensor C ∈ Rc1 ×c2 ×c3 and three matrices Vb1 ∈ Rc1 ×b1 , Vb2 ∈ Rc2 ×b2 and Vb3 ∈ Rc3 ×b3 with c1 = c2 = c3 = poly(b1 , b2 , b3 ), such that with probability 0.99, for any α ≥ 1, if X10 , X20 , X30 satisfy that, k X (Vb1 X10 )i ⊗ (Vb2 X20 )i ⊗ (Vb3 X30 )i − C p k X (V1 X10 )i ⊗ (V2 X20 )i ⊗ (V3 X30 )i − A p i=1 p ≤ α min X1 ,X2 ,X3 then, i=1 .α p min X1 ,X2 ,X3 k X (Vb1 X1 )i ⊗ (Vb2 X2 )i ⊗ (Vb3 X3 )i − C p i=1 p k X (V1 X1 )i ⊗ (V2 X2 )i ⊗ (V3 X3 )i − A p i=1 , . p Proof. For simplicity, we define OPT to be min X1 ,X2 ,X3 k X (V1 X1 )i ⊗ (V2 X2 )i ⊗ (V3 X3 )i − A i=1 p . p Let T1 ∈ Rc1 ×n correspond to sampling according to the `p Lewis weights of V1 ∈ Rn×b1 , where c1 = be1 . Let T2 ∈ Rc2 ×n be sampling according to the `p Lewis weights of V2 ∈ Rn×b2 , where c2 = be2 . Let T3 ∈ Rc3 ×n be sampling according to the `p Lewis weights of V3 ∈ Rn×b3 , where c3 = be3 . For any α ≥ 1, let X10 ∈ Rb1 ×k , X20 ∈ Rb2 ×k , X30 ∈ Rb3 ×k satisfy kT1 V1 X10 ⊗ T2 V2 X20 ⊗ T3 V3 X30 − A(T1 , T2 , T3 )kpp ≤α min X1 ∈Rb1 ×k ,X2 ∈Rb2 ×k ,X3 ∈Rb3 ×k kT1 V1 X1 ⊗ T2 V2 X2 ⊗ T3 V3 X3 − A(T1 , T2 , T3 )kpp . First, we regard T1 as the sketching matrix for the remainder. Then by Lemma D.11 in [SWZ17] and Theorem D.7, we have kV1 X10 ⊗ T2 V2 X20 ⊗ T3 V3 X30 − A(I, T2 , T3 )kpp .α min X1 ∈Rb1 ×k ,X2 ∈Rb2 ×k ,X3 ∈Rb3 ×k kV1 X1 ⊗ T2 V2 X2 ⊗ T3 V3 X3 − A(I, T2 , T3 )kpp . Second, we regard T2 as the sketching matrix for V1 X1 ⊗ V2 X2 ⊗ T3 V3 X3 − A(I, I, T3 ). Then by Lemma D.11 in [SWZ17] and Theorem D.7, we have kV1 X10 ⊗ V2 X20 ⊗ T3 V3 X30 − A(I, I, T3 )kpp .α min X1 ∈Rb1 ×k ,X2 ∈Rb2 ×k ,X3 ∈Rb3 ×k kV1 X1 ⊗ V2 X2 ⊗ T3 V3 X3 − A(I, I, T3 )kpp . 105 Third, we regard T3 as the sketching matrix for V1 X1 ⊗ V2 X2 ⊗ V3 X3 − A. Then by Lemma D.11 in [SWZ17] and Theorem D.7, we have p k X (V1 X10 )i ⊗ (V2 X20 )i ⊗ (V3 X30 )i − A .α i=1 E.4 p min X1 ,X2 ,X3 k X (V1 X1 )i ⊗ (V2 X2 )i ⊗ (V3 X3 )i − A i=1 p . p Solving small problems Combining Section B.5 in [SWZ17] and the proof of Theorem D.4, for any p = a/b with a, b are integers, we can obtain the `p version of Theorem D.4. E.5 Bicriteria algorithm We present several bicriteria algorithms with different tradeoffs. We first present an algorithm that e 3 ) in Theorem E.7. Then we show runs in nearly linear time and outputs a solution with rank O(k an algorithm that runs in nnz(A) time but outputs a solution with rank poly(k) in Theorem E.8. Then we explain an idea which is able to decrease the cubic rank to quadratic, and thus we can obtain Theorem E.9. e 3 ). There Theorem E.7. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, let r = O(k e exists an algorithm which takes nnz(A) · O(k) + n poly(k) + poly(k) time and outputs three matrices n×r U, V, W ∈ R such that r X i=1 p Ui ⊗ Vi ⊗ Wi − A p holds with probability 9/10. e 3−p/2 ) log3 n ≤ O(k min rank −k Ak kAk − Akpp 2 Proof. We first choose three dense Cauchy transforms Si ∈ Rn ×si . According to Section B.7, e for each i ∈ [3], Ai Si can be computed in nnz(A) · O(k) time. Then we apply Lemma E.6. We obtain three matrices Y1 = T1 A1 S1 , Y2 = T2 A2 S2 , Y3 = T3 A3 S3 and a tensor C = A(T1 , T2 , T3 ). Note that for each i ∈ [3], Yi can be computed in n poly(k) time. Because C = A(T1 , T2 , T3 ) and e e 3) T1 , T2 , T3 ∈ Rn×O(k) are three sampling and rescaling matrices, C can be computed in nnz(A)+O(k time. At the end, we just need to run an `p -regression solver to find the solution for the problem: min X∈Rs1 ×s2 ×s3 s1 X s2 X s3 X i=1 j=1 l=1 p Xi,j,l (Y1 )i ⊗ (Y2 )j ⊗ (Y3 )j , p where (Y1 )i denotes the i-th column of matrix Y1 . Since the size of the above problem is only poly(k), this can be solved in poly(k) time. e 15 ). There exists Theorem E.8. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, let r = O(k an algorithm that takes nnz(A)+n poly(k)+poly(k) time and outputs three matrices U, V, W ∈ Rn×r such that r X i=1 p Ui ⊗ Vi ⊗ Wi − A p ≤ poly(k, log n) holds with probability 9/10. 106 min rank −k Ak kAk − Akpp 2 Proof. We first choose three sparse p-stable transforms Si ∈ Rn ×si . According to Section B.7, for each i ∈ [3], Ai Si can be computed in O(nnz(A)) time. Then we apply Lemma E.6, and can obtain three matrices Y1 = T1 A1 S1 , Y2 = T2 A2 S2 , Y3 = T3 A3 S3 and a tensor C = A(T1 , T2 , T3 ). Note that for each i ∈ [3], Yi can be computed in n poly(k) time. Because C = A(T1 , T2 , T3 ) and e e 3) T1 , T2 , T3 ∈ Rn×O(k) are three sampling and rescaling matrices, C can be computed in nnz(A)+O(k time. At the end, we just need to run an `p -regression solver to find the solution to the problem, min X∈Rs1 ×s2 ×s3 s1 X s2 X s3 X i=1 j=1 l=1 p Xi,j,l (Y1 )i ⊗ (Y2 )j ⊗ (Y3 )l − C , p where (Y1 )i denotes the i-th column of matrix Y1 . Since the size of the above problem is only poly(k), it can be solved in poly(k) time. e 2 ). Theorem E.9. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1,  ∈ (0, 1), let r = O(k e There exists an algorithm which takes nnz(A) · O(k) + n poly(k) + poly(k) time and outputs three n×r matrices U, V, W ∈ R such that r X i=1 p Ui ⊗ Vi ⊗ Wi − A holds with probability 9/10. p e 3−1.5p ) log3 n ≤ O(k min rank −k Ak kAk − Akpp Proof. The proof is similar to Theorem D.14. e 2 ), Input Sparsity Algorithm 31 `p -Low Rank Approximation, Bicriteria Algorithm, rank-O(k Time 1: procedure LpBicriteriaAlgorithm(A, n, k) . Corollary E.10 e 2: s1 ← s2 ← s3 ← O(k). 2 3: For each i ∈ [3], choose Si ∈ Rn ×si to be the composition of a sparse p-stable transform and a dense p-stable transform. . Part (I,II) of Theorem E.2 4: Compute A1 · S1 , A2 · S2 . 5: For each i ∈ [2], choose Ti to be a sampling and rescaling diagonal matrix according to the e Lewis weights of Ai Si , with ti = O(k) nonzero entries. 6: C ← A(T1 , T2 , I). 7: B i+(j−1)s1 ← vec((T1 A1 S1 )i ⊗ (T2 A2 S2 )j ), ∀i ∈ [s1 ], j ∈ [s2 ]. 8: Form objective function minW kW B − C3 k1 . c. 9: Run `p -regression solver to find W b b. 10: Construct U by copying (A1 S1 )i to the (i, j)-th column of U 11: Construct Vb by copying (A2 S2 )j to the (i, j)-th column of Vb . b , Vb , W c. 12: return U 13: end procedure As for `1 , notice that if we first apply a sparse Cauchy transform, we can reduce the rank of the matrix to poly(k). Theyn we can apply a dense Cauchy transform and further reduce the dimension, while only incurring another poly(k) factor in the approximation ratio. By combining e sparse p-stable and dense p-stable transforms, we can improve the running time from nnz(A) · O(k) to be nnz(A) by losing some additional poly(k) factors in the approximation ratio. 107 e 2 ). Corollary E.10. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1,  ∈ (0, 1), let r = O(k There exists an algorithm which takes nnz(A) + n poly(k) + poly(k) time and outputs three matrices U, V, W ∈ Rn×r such that r X i=1 p Ui ⊗ V i ⊗ W i − A p ≤ poly(k, log n) min rank −k Ak kAk − Akpp holds with probability 9/10. E.6 Algorithms In this section, we show two different algorithms by using different kind of sketches. One is shown in Theorem E.11 which gives a fast running time. Another one is shown in Theorem E.12 which gives the best approximation ratio. Theorem E.11. Given a 3rd tensor A ∈ Rn×n×n , for any k ≥ 1, there exists an algorithm which e 2 takes O(nnz(A)) + n poly(k) + 2O(k ) time and outputs three matrices U, V, W ∈ Rn×k such that, kU ⊗ V ⊗ W − Akpp ≤ poly(k, log n) min rank −k A0 kA0 − Akpp . holds with probability at least 9/10. Proof. First, we apply part (II) of Theorem E.2. Then Ai Si can be computed in O(nnz(A)) time. Second, we use Lemma E.6 to reduce the size of the objective function from O(n3 ) to poly(k) in n poly(k) time by only losing a constant factor in approximation ratio. Third, we use Claim B.15 to relax the objective function from entry-wise `p -norm to Frobenius norm, and this step causes us to lose some other poly(k) factors in approximation ratio. As a last step, we use Theorem C.45 to solve the Frobenius norm objective function. Theorem E.12. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, there exists an algorithm e e 3 that takes nO(k) 2O(k ) time and output three matrices U, V, W ∈ Rn×k such that, e 3−1.5p ) kU ⊗ V ⊗ W − Akpp ≤ O(k min rank −k A0 kA0 − Akpp . holds with probability at least 9/10. Proof. First, we apply part (III) of Theorem E.2. Then, guessing Si requires nO(k) time. Second, we use Lemma E.6 to reduce the size of the objective from O(n3 ) to poly(k) in polynomial time while only losing a constant factor in approximation ratio. Third, we solve the small optimization problem. e E.7 CURT decomposition Theorem E.13. Given a 3rd order tensor A ∈ Rn×n×n , let k ≥ 1, and let UB , VB , WB ∈ Rn×k denote a rank-k, α-approximation to A. Then there exists an algorithm which takes O(nnz(A)) + O(n2 ) poly(k) time and outputs three matrices C ∈ Rn×c with columns from A, R ∈ Rn×r with rows from A, T ∈ Rn×t with tubes from A, and a tensor U ∈ Rc×r×t with rank(U ) = k such that c = r = t = O(k log k log log k), and c X r X t X i=1 j=1 l=1 p Ui,j,l · Ci ⊗ Rj ⊗ Tl − A p holds with probability 9/10. 108 e 3−1.5p )α ≤ O(k min rank −k A0 kA0 − Akpp Proof. We define OPT := min rank −k A0 kA0 − Akpp . We already have three matrices UB ∈ Rn×k , VB ∈ Rn×k and WB ∈ Rn×k and these three matrices provide a rank-k, α approximation to A, i.e., k X (UB )i ⊗ (VB )i ⊗ (WB )i − A i=1 p p ≤ α OPT . (46) 2 Let B1 = VB> WB> ∈ Rk×n denote the matrix where the i-th row is the vectorization of 2 2 (VB )i ⊗ (WB )i . By Section B.3 in [SWZ17], we can compute D1 ∈ Rn ×n which is a sampling and rescaling matrix corresponding to the Lewis weights of B1> in O(n2 poly(k)) time, and there are 2 d1 = O(k log k log log k) nonzero entries on the diagonal of D1 . Let Ai ∈ Rn×n denote the matrix obtained by flattening A along the i-th direction, for each i ∈ [3]. b = A1 D1 (B1 D1 )† ∈ Rn×k , Define U ∗ ∈ Rn×k to be the optimal solution to min kU B1 −A1 kpp , U V0 ∈ Rn×k solution to to be the optimal solution to min kU B1 D1 − A1 D1 kpp . min V ∈Rn×k U ∈Rn×k U ∈Rn×k b> kV · (U WB> ) − A2 kpp , and U 0 to be the optimal By Claim B.13, we have 1−p/2 b B1 D1 − A1 D1 kpp ≤ d kU 1 kU 0 B1 D1 − A1 D1 kpp . Due to Lemma E.11 and Lemma E.8 in [SWZ17], with constant probability, we have 1−p/2 b B1 − A1 kp ≤ d kU p 1 αD1 kU ∗ B1 − A1 kpp , (47) where αD1 = O(1). b > W > ) ∈ Rk×n2 denotes the matrix where the i-th row is the vectorization of Recall that (U B bi ⊗ (WB )i , ∀i ∈ [k]. Now, we can show, U b> kV0 · (U b B1 − A1 kpp WB> ) − A2 kpp ≤ kU 1−p/2 . d1 b> by V0 = arg minkV · (U V ∈Rn×k kU ∗ B1 − A1 kpp ≤ 1−p/2 d1 kUB B1 ≤ 1−p/2 O(d1 )α OPT . WB> ) − A2 kpp by Equation (47) by U ∗ = arg minkU B1 − A1 kpp − A1 kpp U ∈Rn×k by Equation (46) (48) b > W > . We can compute D2 ∈ Rn2 ×n2 which is a sampling and rescaling We define B2 = U B matrix corresponding to the `p Lewis weights of B2> in O(n2 poly(k)) time, and there are d2 = O(k log k log log k) nonzero entries on the diagonal of D2 . Define V ∗ ∈ Rn×k to be the optimal solution of minV ∈Rn×k kV B2 − A2 kpp , Vb = A2 D2 (B2 D2 )† ∈ b > Vb > ) − A3 kpp , and V 0 to be the Rn×k , W0 ∈ Rn×k to be the optimal solution of min kW · (U optimal solution of min kV B2 D2 − V ∈Rn×k A2 D2 kpp . W ∈Rn×k By Claim B.13, we have 1−p/2 kVb B2 D2 − A2 D2 kpp ≤ d2 109 kV 0 B2 D2 − A2 D2 kpp . Due to Lemma E.11 and Lemma E.8 in [SWZ17], with constant probability, we have 1−p/2 kVb B2 − A2 kpp ≤ d2 αD2 kV ∗ B2 − A2 kpp , (49) where αD2 = O(1). b > Vb > ) ∈ Rk×n2 denotes the matrix for which the i-th row is the vectorization Recall that (U bi ⊗ Vbi , ∀i ∈ [k]. Now, we can show, of U b > Vb > ) − A3 kp kW0 · (U p p b ≤ kV B2 − A2 k b> by W0 = arg minkW · (U p . ≤ W ∈Rn×k 1−p/2 d2 kV ∗ B2 − A2 kpp 1−p/2 d2 kV0 B2 − A2 kpp 1−p/2 ≤ O((d1 d2 ) Vb > ) − A3 kpp by Equation (49) ∗ by V = arg minkV B2 − A2 kpp V ∈Rn×k )α OPT . by Equation (48) (50) b > Vb > . We can compute D3 ∈ Rn2 ×n2 which is a sampling and rescaling We define B3 = U matrix corresponding to the `p Lewis weights of B3> in O(n2 poly(k)) time, and there are d3 = O(k log k log log k) nonzero entries on the diagonal of D3 . c = A3 D3 (B3 D3 )† ∈ Define W ∗ ∈ Rn×k to be the optimal solution to minW ∈Rn×k kW B3 −A3 kpp , W p Rn×k , and W 0 to be the optimal solution to min kW B3 D3 − A3 D3 kp . W ∈Rn×k By Claim B.13, we have 1−p/2 c B3 D3 − A3 D3 kp ≤ d kW p 3 kW 0 B3 D3 − A3 D3 kpp . Due to Lemma E.11 and Lemma E.8 in [SWZ17], with constant probability, we have 1−p/2 c B3 − A3 kp ≤ d kW p 3 αD3 kW ∗ B3 − A3 kpp , (51) where αD3 = O(1). Now we can show, 1−p/2 c B3 − A3 kpp . d kW 3 1−p/2 ≤ d3 kW ∗ B3 − A3 kpp , by Equation (51) by W ∗ = arg minkW B3 − A3 kpp kW0 B3 − A3 kpp , W ∈Rn×k ≤ O((d1 d2 d3 )1−p/2 )α OPT . by Equation (50) Thus, it implies, k X i=1 p ci − A bi ⊗ Vbi ⊗ W U p ≤ poly(k, log n) OPT . b = A1 D1 (B1 D1 )† , Vb = A2 D2 (B2 D2 )† , W c = A3 D3 (B3 D3 )† . where U 110 F Robust Subspace Approximation (Asymmetric Norms for Arbitrary Tensors) Recently, [CW15b] and [CW15a] study the linear regression problem and low-rank approximation problem under M-Estimator loss functions. In this section, we extend the matrix version of the low rank approximation problem to tensors, i.e., in particular focusing on tensor low-rank approximation under M-Estimator norms. Note that M-Estimators are very different from Frobenius norm and Entry-wise `1 norm, which are symmetric norms. Namely, flattening the tensor objective function along any of the dimensions does not change the cost if the norm is Frobenius or Entry-wise `1 norm. However, for M-Estimator norms, we cannot flatten the tensor along all three dimensions. This property makes the tensor low-rank approximation problem under M-Estimator norms more difficult. This section can be split into two independent parts. Section F.2 studies the `1 -`2 -`2 norm setting, and Section F.3 studies the `1 -`1 -`2 norm setting. F.1 Preliminaries Definition F.1 (Nice functions for M -Estimators, M2 , Lp , [CW15a]). We say an M -Estimator is nice if M (x) = M (−x), M (0) = 0, M is non-decreasing in |x|, there is a constant CM > 0 and a constant p ≥ 1 so that for all a, b ∈ R>0 with a ≥ b, we have Cm |a| M (a) a ≤ ≤ ( )p , |b| M (b) b 1 1 1 1 and also that M (x) p is subadditive, that is, M (x + y) p ≤ M (x) p + M (y) p . Let M2 denote the set of such nice M -estimators, for p = 2. Let Lp denote M -Estimators with M (x) = |x|p and p ∈ [1, 2). F.2 `1 -Frobenius (a.k.a `1 -`2 -`2 ) norm Section F.2.1 presents basic definitions and facts for the `1 -`2 -`2 norm setting. Section F.2.2 introduces some useful tools. Section F.2.3 presents the “no dilation” and “no contraction” bounds, which are the key ideas for reducing the problem to a “generalized” Frobenius norm low rank approximation problem. Finally, we provide our algorithms in Section F.2.6. F.2.1 Definitions We first give the definition for the v-norm of a tensor, and then give the definition of the v-norm for a matrix and a weighted version of the v-norm for a matrix. Definition F.2 (Tensor v-norm). For an n × n × n tensor A, we define the v-norm of A, denoted kAkv , to be n X i=1 !1/p M (kAi,∗,∗ kF ) , where Ai,∗,∗ is the i-th face of A (along the 1st direction), and p is a parameter associated with the function M (), which defines a nice M -Estimator. 111 Definition F.3 (Matrix v-norm). For an n×d matrix A, we define the v-norm of A, denoted kAkv , to be n X i=1 M (kAi,∗ k2 )1/p , where Ai,∗ is the i-th row of A, and p is a parameter associated with the function M (), which defines a nice M -Estimator. Definition F.4. Given matrix A ∈ Rn×d , let Ai,∗ denote the i-th row of A. Let TS ⊂ [n] denote the indices i such that ei is chosen for S. Using a probability vector q and a sampling and rescaling matrix S ∈ Rn×n from q, we will estimate kAkv using S and a re-weighted version, kS · kv,w0 of k · kv , with  kSAkv,w0 =  X i∈TS 1/p wi0 M (kAi,∗ k2 ) , where wi0 = wi /qi . Since w0 is generally understood, we will usually just write kSAkv . We will also need an “entrywise row-weighted” version :  1/p  X wi |||SA||| =  kAi,∗ kpM  =  qi i∈TS X i∈TS ,j∈[d] 1/p wi M (Ai,j ) qi , where Ai,j denotes the entry in the i-th row and j-th column of A. Fact F.5. For p = 1, for any two matrices A and B, we have kA + Bkv ≤ kAkv + kBkv . For any two tensors A and B, we have kA + Bkv ≤ kAkv + kBkv . F.2.2 Sampling and rescaling sketches Note that Lemmas 42 and 44 in [CW15a] are stronger than stated. In particular, we do not need to assume X is a square matrix. For any m ≥ z, if X ∈ Rd×m , then we have the same result. Lemma F.6 (Lemma 42 in [CW15a]). Let ρ > 0 and integer z > 0. For sampling matrix S, suppose for a given y ∈ Rd with failure probability δ it holds that kSAykM = (1 ± 1/10)kAykM . There is K1 = O(z 2 /CM ) so that with failure probability δ(KN /CM )(1+p)d , for a constant KN , any rank-z matrix X ∈ Rd×m has the property that if kAXkv ≥ K1 ρ, then kSAXkv ≥ ρ, and that if kAXkv ≤ ρ/K1 , then kSAXkv ≤ ρ. Lemma F.7 (Lemma 44 in [CW15a]). Let δ, ρ > 0 and integer z > 0. Given matrix A ∈ Rn×d , there exists a sampling and rescaling matrix S ∈ Rn×n with r = O(γ(A, M, w)−2 dz 2 log(z/) log(1/δ)) nonzero entries such that, with probability at least 1 − δ, for any rank-z matrix X ∈ Rd×m , we have either kSAXkv ≥ ρ, or (1 − )kAXkv − ρ ≤ kSAXkv ≤ (1 + )kAXkv + ρ. 112 Lemma F.8 (Lemma 43 in [CW15a]). For r > 0, let rb = r/γ(A, M, w), and let q ∈ Rn have qi = min{1, rbγi (A, M, w)}. Let S be a sampling and rescaling matrix generated using q, with weights as usual wi0 = wi /qi . Let W ∈ Rd×z , and δ > 0. There is an absolute constant C so that for rb ≥ Cz log(1/δ)/2 , with probability at least 1 − δ, we have (1 − )kAW kv,w ≤ kSAW kv,w0 ≤ (1 + )kAW kv,w . F.2.3 No dilation and no contraction Lemma F.9. Given matrices A ∈ Rn×m , U ∈ Rn×d , let V ∗ = arg min rank −k V ∈Rd×m kU V − Akv . If S ∈ Rs×n has at most c1 -dilation on U V ∗ − A, i.e., kS(U V ∗ − A)kv ≤ c1 kU V ∗ − Akv , and it has at most c2 -contraction on U , i.e., ∀x ∈ Rd , kSU xkv ≥ then S has at most (c2 , c1 + 1 c2 )-contraction 1 kU xkv , c2 on (U, A), i.e., ∀ rank −k V ∈ Rd×m , kSU V − SAkv ≥ 1 1 kU V − Akv − (c1 + )kU V ∗ − Akv . c2 c2 Proof. Let A ∈ Rn×m , U ∈ Rn×d and S ∈ Rs×n be the same as that described in the lemma. Let (V − V ∗ )j denote the j-th column of V − V ∗ . Then ∀ rank −k V ∈ Rd×m , kSU V − SAkv ≥ kSU V − SU V ∗ kv − kSU V ∗ − SAkv ≥ kSU V − SU V ∗ kv − c1 kU V ∗ − Akv = kSU (V − V ∗ )kv − c1 kU V ∗ − Akv m X = kSU (V − V ∗ )j kv − c1 kU V ∗ − Akv ≥ j=1 m X j=1 1 kU (V − V ∗ )j kv − c1 kU V ∗ − Akv c2 1 kU V − U V ∗ kv − c1 kU V ∗ − Akv c2 1 1 ≥ kU V − Akv − kU V ∗ − Akv − c1 kU V ∗ − Akv c2 c 2  1 1 ∗ = kU V − Akv − ( + c2 )kU V − Akv , c2 c2 = where the first inequality follows by the triangle inequality, the second inequality follows since S has at most c1 dilation on U V ∗ − A, the third inequality follows since S has at most c2 contraction on U , and the fourth inequality follows by the triangle inequality. 113 Claim F.10. Given matrix A ∈ Rn×m , for any distribution p = (p1 , p2 , · · · , pn ) define random variable X such that X = kAi k2 /pi with probability pi where A i is the i-th row of matrix A. Then 1 Pm j take m independent samples X 1 , X 2 , · · · , X m , and let Y = m j=1 X . We have Pr[Y ≤ 1000kAkv ] ≥ .999. Proof. We can compute the expectation of X j , for any j ∈ [m], E[X j ] = n X kAi k2 pi i=1 Then E[Y ] = 1 m Pm j=1 E[X j] · pi = kAkv . = kAkv . Using Markov’s inequality, we have Pr[Y ≥ kAkv ] ≤ .001. Lemma F.11. For any fixed U ∗ ∈ Rn×d and rank-k V ∗ ∈ Rd×m with d = poly(k), there exists an algorithm that takes poly(n, d) time to compute a sampling and rescaling diagonal matrix S ∈ Rn×n with s = poly(k) nonzero entries such that, with probability at least .999, we have: for all rank-k V ∈ Rd×m , kU ∗ V ∗ − U ∗ V kv . kSU ∗ V ∗ − SU ∗ V kv . kU ∗ V ∗ − U ∗ V kv . Lemma F.12 (No dilation). Given matrices A ∈ Rn×m , U ∗ ∈ Rn×d with d = poly(k), define V ∗ ∈ Rd×m to be the optimal solution min kU ∗ V − Akv . Choose a sampling and rescaling rank −k V ∈Rd×m diagonal matrix S ∈ Rn×n with s = poly(k) according to Lemma F.8. Then with probability at least .99, we have: for all rank-k V ∈ Rd×m , kSU ∗ V − SAkv . kU ∗ V ∗ − U ∗ V kv + O(1)kU ∗ V ∗ − Akv . kU ∗ V − Akv . Proof. Using Claim F.10 and Lemma F.11, we have with probability at least .99, for all rank-k V ∈ Rd×m , kSU ∗ V − SAkv ≤ kSU ∗ V − SU ∗ V ∗ kv + kSU ∗ V ∗ − SAkv ∗ ∗ ∗ ∗ by triangle inequality ∗ . kSU V − SU V kv + O(1)kU V − Akv ∗ ∗ ∗ ∗ . kU V − U V kv + O(1)kU V − Akv ∗ ∗ ∗ by Claim F.10 ∗ ∗ by Lemma F.11 ∗ . kU V − Akv + kU V − Akv + O(1)kU V − Akv by triangle inequality ∗ . kU V − Akv . Lemma F.13 (No contraction). Given matrices A ∈ Rn×m , U ∗ ∈ Rn×d with d = poly(k), define V ∗ ∈ Rd×m to be the optimal solution min kU ∗ V − Akv . Choose a sampling and rescaling rank −k V ∈Rd×m diagonal matrix S ∈ Rn×n with s = poly(k) according to Lemma F.8. Then with probability at least .99, we have: for all rank-k V ∈ Rd×m , kU ∗ V − Akv . kSU ∗ V − SAkv + O(1)kU ∗ V ∗ − Akv . Proof. This follows by Lemma F.9, Claim F.10 and Lemma F.12. 114 F.2.4 Oblivious sketches, MSketch In this section, we recall a concept called M -sketches for M -estimators which is defined in [CW15b]. M -sketch is an oblivious sketch for matrices. Theorem F.14 (Theorem 3.1 in [CW15b]). Let OPT denote minx∈Rd kAx − bkG . There is an algorithm that in O(nnz(A)) + poly(d log n) time, with constant probability finds x0 such that kAx0 − bkG ≤ O(1) OPT. Definition F.15 (M-Estimator sketches or MSketch [CW15b]). Given parameters N, n, m, b > 1, define hmax = blogb (n/m)c, β = (b − b−hmax )/(b − 1) and s = N hmax . For each p ∈ [n], σp , gp , hp are generated (independently) in the following way, σp ← ±1, gp ∈ [N ], hp ← t, chosen with equal probability, chosen with equal probability, chosen with probability 1/(βbt ) for t ∈ {0, 1, · · · hmax }. For each p ∈ [n], we define jp = gp + N hp . Let w ∈ Rs denote the scaling vector such that, for each j ∈ [s], ( βbhp , if there exists p ∈ [n] s.t.j = jp , wj = 0 otherwise. Let S ∈ RN hmax ×n be such that, for each j ∈ [s],for each p ∈ [n], ( σp , if j = gp + N · hp , S j,p = 0, otherwise. Let Dw denote the diagonal matrix where the i-th entry on the diagonal is the i-th entry of w. Let S = Dw S. We say (S, w) or S is an MSketch. Definition F.16 (Tensor kkv,w -norm). For a tensor A ∈ Rd×n1 ×n2 and a vector w ∈ , we define kAkv,w = d X i=1 wi kAi,∗,∗ kF . Let (S, w) denote an MSketch, and let S = Dw S. If v corresponds to a scale-invariant MEstimator, then for any three matrices U, V, W , we have the following, k(SU ) ⊗ V ⊗ W kv,w = k(Dw SU ) ⊗ V ⊗ W kv = k(SU ) ⊗ V ⊗ W kv . Fact F.17. For a tensor A ∈ Rn×n×n , let S ∈ Rs×n denote an MSketch (defined in F.15) with s = poly(k, log n). Then SA can be computed in O(nnz(A)) time. Lemma F.18. For any fixed U ∗ ∈ Rn×d and rank-k V ∗ ∈ Rd×m with d = poly(k), let S ∈ Rs×n denote an MSketch (defined in Definition F.15) with s = poly(k, log n) rows. Then with probability at least .999, we have: for all rank-k V ∈ Rd×m , kU ∗ V ∗ − U ∗ V kv . kSU ∗ V ∗ − SU ∗ V kv . kU ∗ V ∗ − U ∗ V kv . 115 Lemma F.19 (No dilation, Theorem 3.4 in [CW15b]). Given matrices A ∈ Rn×m , U ∗ ∈ Rn×d with d = poly(k), define V ∗ ∈ Rd×m to be the optimal solution to min kU ∗ V − Akv . Choose rank −k V ∈Rd×m Rs×n an MSketch S ∈ with s = poly(k, log n) according to Definition F.15. Then with probability at least .99, we have: for all rank-k V ∈ Rd×m , kSU ∗ V − SAkv . kU ∗ V ∗ − U ∗ V kv + O(1)kU ∗ V ∗ − Akv . kU ∗ V − Akv . Lemma F.20 (No contraction). Given matrices A ∈ Rn×m , U ∗ ∈ Rn×d with d = poly(k), define V ∗ ∈ Rd×m to be the optimal solution to min kU ∗ V −Akv . Choose an MSketch S ∈ Rs×n rank −k V ∈Rd×m with s = poly(k, log n) according to Definition F.15. Then with probability at least .99, we have: for all rank-k V ∈ Rd×m , kU ∗ V − Akv . kSU ∗ V − SAkv + O(1)kU ∗ V ∗ − Akv . F.2.5 Running time analysis Lemma F.21. Given a tensor A ∈ Rn×d×d , let S ∈ Rs×n denote an MSketch with s rows. Let SA denote a tensor that has size s × d × d. For each i ∈ {2, 3}, let (SA)i ∈ Rd×ds denote a matrix obtained by flattening tensor SA along the i-th dimension. For each i ∈ {2, 3}, let Si ∈ Rds×si denote a CountSketch transform with si columns. For each i ∈ {2, 3}, let Ti ∈ Rti ×d denote a CountSketch transform with ti rows. Then (I) For each i ∈ {2, 3}, (SA)i Si can be computed in O(nnz(A)) time. (II) For each i ∈ {2, 3}, Ti (SA)i Si can be computed in O(nnz(A)) time. Proof. Proof of Part (I). First note that (SA)2 S2 has size n × S2 . Thus for each i ∈ [d], j ∈ [s2 ], we have, ((SA)2 S2 )i,j = = ds X by (SA)2 ∈ Rd×ds , S2 ∈ Rds×s2 ((SA)2 )i,x0 (S2 )x0 ,j x0 =1 d X s X ((SA)2 )i,(y−1)s+z (S2 )(y−1)s+z,j y=1 z=1 = d X s X (SA)z,i,y (S2 )(y−1)s+z,j y=1 z=1 = d X s n X X y=1 z=1 = x=1 d X s X n X y=1 z=1 x=1 Sz,x Ax,i,y ! by unflattening (S2 )(y−1)s+z,j Sz,x · Ax,i,y · (S2 )(y−1)s+z,j . For each nonzero entry Ax,i,y , there is only one z such that Sz,x is nonzero. Thus there is only one j such that (S2 )(y−1)s+z,j is nonzero. It means that Ax,i,y can only affect one entry of ((SA)2 S2 )i,j . Thus, (SA)2 S2 can be computed in O(nnz(A)) time. Similarly, we can compute (SA)3 S3 in O(nnz(A)) time. 116 Proof of Part (II). Note that T2 (SA)2 S2 has size t2 × s2 . Thus for each i ∈ [t2 ], j ∈ [s2 ], we have, (T2 (SA)2 S2 )i,j = d X ds X by (SA)2 ∈ Rd×ds (T2 )i,x ((SA)2 )x,y0 (S2 )y0 ,j x=1 y 0 =1 = d X d X s X (T2 )i,x ((SA)2 )x,(y−1)s+z (S2 )(y−1)s+z,j x=1 y=1 z=1 = d X d X s X (T2 )i,x (SA)z,x,y (S2 )(y−1)s+z,j x=1 y=1 z=1 d X d X s X = (T2 )i,x x=1 y=1 z=1 = d X d X s X n X n X Sz,w Aw,x,y w=1 ! by unflattening (S2 )(y−1)s+z,j (T2 )i,x · Sz,w · Aw,x,y · (S2 )(y−1)s+z,j . x=1 y=1 z=1 w=1 For each nonzero entry Aw,x,y , there is only one z such that Sz,w is nonzero. There is only one i such that (T2 )i,x is nonzero. Since there is only one z to make Sz,w nonzero, there is only one j, such that (S2 )(y−1)s+z,j is nonzero. Thus, T2 (SA)2 S2 can be computed in O(nnz(A)) time. Similarly, we can compute T3 (SA)3 S3 in O(nnz(A)) time. F.2.6 Algorithms We first give a “warm-up” algorithm in Theorem F.22 by using a sampling and rescaling matrix. Then we improve the running time to be polynomial in all the parameters by using an oblivious sketch, and thus we obtain Theorem F.23. Algorithm 32 `1 -Frobenius(`1 -`2 -`2 ) Low-rank Approximation Algorithm, poly(k)-approximation 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: procedure L122TensorLowRankApprox(A, n, k) . Theorem F.22  ← 0.1. s ← poly(k, 1/). Guess a sampling and rescaling matrix S ∈ Rs×n . s2 ← s3 ← O(k/). r ← s2 s3 . Choose sketching matrices S2 ∈ Rns×s2 , S3 ∈ Rns×s3 . Compute (SA)2 S2 , (SA)3 S3 . Form Ve ∈ Rn×r by repeating (SA)2 S2 s3 times according to Equation (59). f ∈ Rn×r by repeating (SA)3 S3 s2 times according to Equation (60). Form W f > ) − A1 kF . Form objective function minU ∈Rn×r kU · (Ve > W e. Use a linear regression solver to find a solution U Take the best solution found over all guesses. e , Ve , W f. return U end procedure Theorem F.22. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, let r = O(k 2 ). There exists 117 an algorithm which takes npoly(k) time and outputs three matrices U, V, W ∈ Rn×r such that kU ⊗ V ⊗ W − Akv ≤ poly(k) min rank −k A0 kA0 − Akv , holds with probability at least 9/10. Proof. We define OPT as follows, OPT = min U,V,W ∈Rn×k kU ⊗ V ⊗ W − Akv = min U,V,W ∈Rn×k k X i=1 Ui ⊗ Vi ⊗ Wi − A . v 2 Let A1 ∈ Rn×n denote the matrix obtained by flattening tensor A along the 1st dimension. Let U ∗ ∈ Rn×k denote the optimal solution. We fix U ∗ ∈ Rn×k , and consider this objective function, min V,W ∈Rn×k kU ∗ ⊗ V ⊗ W − Akv ≡ min V,W ∈Rn×k U ∗ · (V > W > ) − A1 v , (52) 2 which has cost at most OPT, and where V > W > ∈ Rk×n denotes the matrix for which the i-th row is a vectorization of Vi ⊗ Wi , ∀i ∈ [k]. (Note that Vi ∈ Rn is the i-th column of matrix V ∈ Rn×k ). Choose a sampling and rescaling diagonal matrix S ∈ Rn×n according to U ∗ , which has s = poly(k) non-zero entries. Using S to sketch on the left of the objective function when U ∗ is fixed (Equation (52)), we obtain a smaller problem, min V,W ∈Rn×k k(SU ∗ ) ⊗ V ⊗ W − SAkv ≡ min V,W ∈Rn×k SU ∗ · (V > W > ) − SA1 v . (53) Let V 0 , W 0 denote the optimal solution to the above problem, i.e., V 0 , W 0 = arg min k(SU ∗ ) ⊗ V ⊗ W − SAkv . V,W ∈Rn×k Then using properties (no dilation Lemma F.12 and no contraction Lemma F.13) of S, we have U∗ ⊗ V 0 ⊗ W0 − A v ≤ α OPT . where α is an approximation ratio determined by√S. By definition of k · kv and k · k2 ≤ k · k1 ≤ dimk · k2 , we can rewrite Equation (53) in the following way, k(SU ∗ ) ⊗ V ⊗ W − SAkv 1  s n X n  2 2 X X  = ((SU ∗ ) ⊗ V ⊗ W )i,j,l − (SA)i,j,l  i=1 j=1 l=1 1  n  s X n X 2 2 X √ ≤ s ((SU ∗ ) ⊗ V ⊗ W )i,j,l − (SA)i,j,l  = √ i=1 j=1 l=1 s k(SU ∗ ) ⊗ V ⊗ W − SAkF . (54) Given the above properties of S and Equation (54), for any β ≥ 1, let V 00 , W 00 denote a βapproximate solution of min k(SU ∗ ) ⊗ V ⊗ W − SAkF , i.e., V,W ∈Rn×k 118 (SU ∗ ) ⊗ V 00 ⊗ W 00 − SA F ≤β· min V,W ∈Rn×k k(SU ∗ ) ⊗ V ⊗ W − SAkF . (55) sαβ · OPT . (56) Then, U ∗ ⊗ V 00 ⊗ W 00 − A v ≤ √ In the next few paragraphs we will focus on solving Equation (55). We start by fixing W ∗ ∈ Rn×k to be the optimal solution of min V,W ∈Rn×k k(SU ∗ ) ⊗ V ⊗ W − SAkF . We use (SA)2 ∈ Rn×ns to denote the matrix obtained by flattening the tensor SA ∈ Rs×n×n along the second direction. We use Z2 = (SU ∗ )> (W ∗ )> ∈ Rk×ns to denote the matrix where the i-th row is the vectorization of (SU ∗ )i ⊗ Wi∗ . We can consider the following objective function, min kV Z2 − (SA)2 kF . V ∈Rn×k Choosing a sketching matrix S2 ∈ Rns×s2 with s2 = O(k/) gives a smaller problem, min kV Z2 S2 − (SA)2 S2 kF . V ∈Rn×k Letting Vb = (SA)2 S2 (Z2 S2 )† ∈ Rn×k , then kVb Z2 − (SA)2 kF ≤ (1 + ) min kV Z2 − (SA)2 kF V ∈Rn×k = (1 + ) min kV ((SU ∗ )> V ∈Rn×k (W ∗ )> ) − (SA)2 kF = (1 + ) min k(SU ∗ ) ⊗ V ⊗ W ∗ − SAkF V ∈Rn×k = (1 + ) 2 min V,W ∈Rn×k k(SU ∗ ) ⊗ V ⊗ W − SAkF . by unflattening by definition of W ∗ (57) 2 We define D2 ∈ Rn ×n to be a diagonal matrix obrained by copying the n × n identity matrix s times on n diagonal blocks of D2 . Then it has ns nonzero entries. Thus, D2 also can be thought of as a matrix that has size n2 × ns. We can think of (SA)2 S2 ∈ Rn×s2 as follows, (SA)2 S2 = (A(S, I, I))2 S2 = A2 · D2 · S2 by D2 can be thought of as having size n2 × ns |{z} |{z} |{z} n×n2 n2 ×n2 ns×s2  c2,1 In  c2,2 In  = A2 ·   ..  . c2,n In    · S2  where In is an n × n identity matrix, c2,i ≥ 0 for each i ∈ [n], and the number of nonzero c2,i is s. For the last step, we fix SU ∗ and Vb . We use (SA)3 ∈ Rn×ns to denote the matrix obtained by flattening the tensor SA ∈ Rs×n×n along the third direction. We use Z3 = (SU ∗ )> Vb > ∈ Rk×ns 119 to denote the matrix where the i-th row is the vectorization of (SU ∗ )i ⊗ Vbi . We can consider the following objective function, min kW Z3 − (SA)3 kF . W ∈Rn×k Choosing a sketching matrix S3 ∈ Rns×s3 with s3 = O(k/) gives a smaller problem, min kW Z3 S3 − (SA)3 S3 kF . W ∈Rn×k c = (SA)3 S3 (Z3 S3 )† ∈ Rn×k . Then Let W c Z3 − (SA)3 kF ≤ (1 + ) min kW Z3 − (SA)3 kF kW W ∈Rn×k = (1 + ) min kW ((SU ∗ )> W ∈Rn×k Vb > ) − (SA)3 kF = (1 + ) min k(SU ∗ ) ⊗ Vb ⊗ W − SAkF W ∈Rn×k 2 ∗ ≤ (1 + ) k(SU ) ⊗ V ⊗ W − SAkF . 2 by property of S3 by definition Z3 by unflattening by Equation (57) 2 We define D3 ∈ Rn ×n to be a diagonal matrix formed by copying the n × n identity matrix s times on n diagonal blocks of D3 . Then it has ns nonzero entries. Thus, D3 also can be thought of as a matrix that has size n2 × ns and D3 is uniquely determined by S. Similarly as to the 2nd dimension, for the 3rd dimension, we can think of (SA)3 S3 as follows, (SA)3 S3 = (A(S, I, I))3 S3 by D3 can be thought of as having size n2 × ns = A3 · D 3 · S 3 |{z} |{z} |{z} n×n2 n2 ×n2 ns×s3  c3,1 In  c3,2 In  = A3 ·   ..  . c3,n In    · S3  where In is an n × n identity matrix, c3,i ≥ 0 for each i ∈ [n] and the number of nonzero c3,i is s. Overall, we have proved that, min k(SU ∗ ) ⊗ (A2 D2 S2 X2 ) ⊗ (A3 D3 S3 X3 ) − SAkF ≤ (1 + )2 k(SU ∗ ) ⊗ V ⊗ W − SAkF , (58) X2 ,X3 2 2 2 2 where diagonal matrix D2 ∈ Rn ×n (with ns nonzero entries) and D3 ∈ Rn ×n (with ns nonzero entries) are uniquely determined by diagonal matrix S ∈ Rn×n (s nonzero entries). Let X20 and X30 denote the optimal solution to the above problem (Equation (58)). Let V 00 = (A2 D2 S2 X20 ) ∈ Rn×k and W 00 = (A3 D3 S3 X30 ) ∈ Rn×k . Then we have √ U ∗ ⊗ V 00 ⊗ W 00 − A v ≤ sαβ OPT . We construct matrix Ve ∈ Rn×s2 s3 by copying matrix (SA)2 S2 ∈ Rn×s2 s3 times,   Ve = (SA)2 S2 (SA)2 S2 · · · (SA)2 S2 . 120 (59) f ∈ Rn×s2 s3 by copying the i-th column of matrix (SA)3 S3 ∈ Rn×s3 into We construct matrix W f, (i − 1)s2 + 1, · · · , is2 columns of W f = [((SA)3 S3 )1 · · · ((SA)3 S3 )1 ((SA)3 S3 )2 · · · ((SA)3 S3 )2 · · · W ((SA)3 S3 )s3 · · · ((SA)3 S3 )s3 .] (60) Although we don’t know S, we can guess all of the possibilities. For each possibility, we can find e ∈ Rn×s2 s3 to the following problem, a solution U min U ∈Rn×s2 s3 = = = = = min U ∈Rn×s2 s3 min U ∈Rn×s2 s3 min U ∈Rn×s2 s3 min U ∈Rn×s2 s3 min U ∈Rn×s2 s3 s2 X s3 X U(i−1)s3 +j ⊗ ((SA)2 S2 )i ⊗ ((SA)3 S3 )j − A s2 X s3 X U(i−1)s3 +j · vec(((SA)2 S2 )i ⊗ ((SA)3 S3 )j ) − A1 i=1 j=1 i=1 j=1 s2 X s3 X i=1 j=1 v v U(i−1)s3 +j · (Ve > e> U · (V f> W ) − A1 f > )(i−1)s3 +j − A1 W v v kU Z − A1 kv sX 2 s3 i=1 kU i Z − Ai1 k2 , where the first step follows by flattening the tensor along the 1st dimension, U(i−1)s3 +j denotes the 2 (i−1)s3 +j-th column of U ∈ Rn×s2 s3 , A1 ∈ Rn×n denotes the matrix obtained by flattening tensor f > ∈ Rs2 s3 ∈n2 is defined to be the A along the 1st dimension, the second step follows since Ve > W matrix where the (i − 1)s3 + j-th row is vectorization of ((SA)2 S2 )i ⊗ ((SA)3 S3 )j , the fourth step f > , and the last step follows by definition of k · kv norm. Thus, follows by defining Z to be Ve > W we obtain a multiple regression problem and it can be solved directly by using [CW13, NN13]. e , Ve , W f over all the guesses. The entire running time is dominated by Finally, we take the best U poly(k) the number of guesses, which is n . This completes the proof. Theorem F.23. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, let r = O(k 2 ). There exists an algorithm which takes O(nnz(A)) + n poly(k, log n) time and outputs three matrices U, V, W ∈ Rn×r such that kU ⊗ V ⊗ W − Akv ≤ poly(k, log n) min rank −k A0 kA0 − Akv holds with probability at least 9/10. Proof. We define OPT as follows, OPT = min U,V,W ∈Rn×k kU ⊗ V ⊗ W − Akv = 121 min U,V,W ∈Rn×k k X i=1 Ui ⊗ Vi ⊗ Wi − A . v Algorithm 33 approximation 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: `1 -Frobenius(`1 -`2 -`2 ) Low-rank Approximation Algorithm, poly(k, log n)- procedure L122TensorLowRankApprox(A, n, k) . Theorem F.23  ← 0.1. s ← poly(k, log n). Choose S ∈ Rs×n to be an MSketch. . Definition F.15 s2 ← s3 ← O(k/). t2 ← t3 ← poly(k/). r ← s2 s3 . Choose sketching matrices S2 ∈ Rns×s2 , S3 ∈ Rns×s3 . Choose sketching matrices T2 ∈ Rt2 ×n , T3 ∈ Rt3 ×n . Compute (SA)2 S2 , (SA)3 S3 . Compute T2 (SA)2 S2 , T3 (SA)3 S3 . Form Ve ∈ Rn×r by repeating (SA)2 S2 s3 times according to Equation (69). f ∈ Rn×r by repeating (SA)3 S3 s2 times according to Equation (70). Form W Form V ∈ Rt2 ×r by repeating T2 (SA)2 S2 s3 times according to Equation (67). Form W ∈ Rt3 ×r by repeating T3 (SA)3 S3 s2 times according to Equation (68). C ← A(I, T2 , T3 ). > > Form objective function minU ∈Rn×r kU · (V W ) − C1 kF . e. Use linear regression solver to find a solution U e e f return U , V , W . end procedure 2 Let A1 ∈ Rn×n denote the matrix obtained by flattening tensor A along the 1st dimension. Let U ∗ ∈ Rn×k denote the optimal solution. We fix U ∗ ∈ Rn×k , and consider the objective function, min V,W ∈Rn×k kU ∗ ⊗ V ⊗ W − Akv ≡ min V,W ∈Rn×k U ∗ · (V > W > ) − A1 v , (61) 2 which has cost at most OPT, and where V > W > ∈ Rk×n denotes the matrix for which the i-th row is a vectorization of Vi ⊗ Wi , ∀i ∈ [k]. (Note that Vi ∈ Rn is the i-th column of matrix V ∈ Rn×k ). Choose an (oblivious) MSketch S ∈ Rs×n with s = poly(k, log n) according to Definition F.15. Using MSketch S, w to sketch on the left of the objective function when U ∗ is fixed (Equation (61)), we obtain a smaller problem, min V,W ∈Rn×k k(SU ∗ ) ⊗ V ⊗ W − SAkv ≡ min V,W ∈Rn×k SU ∗ · (V > W > ) − SA1 v . (62) Let V 0 , W 0 denote the optimal solution to the above problem, i.e., V 0 , W 0 = arg min k(SU ∗ ) ⊗ V ⊗ W − SAkv . V,W ∈Rn×k Then using properties (no dilation Lemma F.19 and no contraction Lemma F.20) of S, we have U∗ ⊗ V 0 ⊗ W0 − A where α is an approximation ratio determined by S. 122 v ≤ α OPT . By definition of k · kv and k · k2 ≤ k · k1 ≤ following way, √ dimk · k2 , we can rewrite Equation (62) in the k(SU ∗ ) ⊗ V ⊗ W − SAkv  1 s n X n  2 2 X X  = ((SU ∗ ) ⊗ V ⊗ W )i,j,l − (SA)i,j,l  i=1 j=1 l=1  1 s X n X n  2 2 X √ ≤ s ((SU ∗ ) ⊗ V ⊗ W )i,j,l − (SA)i,j,l  = √ i=1 j=1 l=1 s k(SU ∗ ) ⊗ V ⊗ W − SAkF (63) Using the properties of S and Equation (63), for any β ≥ 1, let V 00 , W 00 denote a β-approximation solution of min k(SU ∗ ) ⊗ V ⊗ W − SAkF , i.e., V,W ∈Rn×k (SU ∗ ) ⊗ V 00 ⊗ W 00 − SA F ≤β· min V,W ∈Rn×k k(SU ∗ ) ⊗ V ⊗ W − SAkF . (64) sαβ · OPT . (65) Then, U ∗ ⊗ V 00 ⊗ W 00 − A v ≤ √ b denote SA. Choose Si ∈ Rns×si to be Gaussian matrix with si = O(k/), ∀i{2, 3}. By a Let A similar proof as in Theorem F.22, we have if X20 , X30 is a β-approximate solution to b2 S2 X2 ) ⊗ (A b3 S3 X3 ) − SAkF , min k(SU ∗ ) ⊗ (A X2 ,X3 then, b2 S2 X2 ) ⊗ (A b3 S3 X3 ) − Akv ≤ kU ∗ ⊗ (A √ sαβ. To reduce the size of the objective function from poly(n) to poly(k/), we use perform an “input sparsity reduction” (in Lemma C.3). Note that, we do not need to use this idea to optimize the running time in Theorem F.22. The running time of Theorem F.22 is dominated by guessing sampling and rescaling matrices. (That running time is  nnz(A).) Choose Ti ∈ Rti ×n to be a sparse subspace embedding matrix (CountSketch transform) with ti = poly(k, 1/), ∀i ∈ {2, 3}. Applying the proof of Lemma C.3 here, we obtain, if X20 , X30 is a β-approximate solution to min k(SU ∗ ) ⊗ (T2 (SA)2 S2 X2 ) ⊗ (T3 (SA)3 S3 X3 ) − SAkF , X2 ,X3 then, kU ∗ ⊗ ((SA)2 S2 X2 ) ⊗ ((SA)3 S3 X3 ) − Akv ≤ √ sαβ. (66) Similar to the bicriteria results in Section C.4, Equation (66) indicates that we can construct a bicriteria solution by using two matrices (SA)2 S2 and (SA)3 S3 . The next question is how to obtain b , Vb , W c . We first show how to obtain U b . Then we show to construct Vb and W c. the final results U 123 b , we need to solve a regression problem related to two matrices V , W c and a tensor To obtain U t ×s s t 2 2 3 2 A(I, T2 , T3 ). We construct matrix V ∈ R by copying matrix T2 (SA)2 S2 ∈ R ×s2 s3 times,   (67) V = T2 (SA)2 S2 T2 (SA)2 S2 · · · T2 (SA)2 S2 . We construct matrix W ∈ Rt3 ×s2 s3 by copying the i-th column of matrix T3 (SA)3 S3 ∈ Rt3 ×s3 into (i − 1)s2 + 1, · · · , is2 columns of W ,   (68) W = F1 · · · F1 F2 · · · F2 · · · Fs3 · · · Fs3 , where F = T3 (SA)3 S3 . e ∈ Rs2 s3 , we just need to use a linear regression solver to solve a smaller Thus, to obtain U problem, kU · (V min s s U ∈R > 2 3 > W ) − A(I, T2 , T3 )kF , f. which can be solved in O(nnz(A)) + n poly(k, log n) time. We will show how to obtain Ve and W n×s s n×s 2 3 2 e by copying matrix (SA)2 S2 ∈ R s3 times, We construct matrix V ∈ R   Ve = (SA)2 S2 (SA)2 S2 · · · (SA)2 S2 . (69) f ∈ Rn×s2 s3 by copying the i-th column of matrix (SA)3 S3 ∈ Rn×s3 into We construct matrix W f, (i − 1)s2 + 1, · · · , is2 columns of W   f = F1 · · · F1 F2 · · · F2 · · · Fs · · · Fs , W (70) 3 3 where F = (SA)3 S3 . F.3 `1 -`1 -`2 norm Section F.3.1 presents some definitions and useful facts for the tensor `1 -`1 -`2 norm. We provide some tools in Section F.3.2. Section F.3.3 presents a key idea which shows we are able to reduce the original problem to a new problem under entry-wise `1 norm. Section F.3.4 presents several existence results. Finally, Section F.3.6 introduces several algorithms with different tradeoffs. F.3.1 Definitions Definition F.24. (Tensor u-norm) For an n × n × n tensor A, we define the u-norm of A, denoted kAku , to be  1/p n X n X  M (kAi,j,∗ k2 ) , i=1 j=1 where Ai,j,∗ is the (i, j)-th tube of A, and p is a parameter associated with the function M (), which defines a nice M -Estimator. Definition F.25. (Matrix u-norm) For an n × n matrix A, we define u-norm of A, denoted kAku , to be !1/p n X M (kAi,∗ k2 ) , i=1 where Ai,∗ is the i-th row of A, and p is a parameter associated with the function M (), which defines a nice M -Estimator. 124 Fact F.26. For p = 1, for any two matrices A and B, we have kA + Bku ≤ kAku + kBku . For any two tensors A and B, we have kA + Bku ≤ kAku + kBku . F.3.2 Projection via Gaussians n−1 Definition F.27. Let p ≥ 1. Let `Sp be an infinite dimensional `p metric which consists of a coordinate for each vector r in the unit sphere S n−1 . Define function f : S n−1 → R. The `1 -norm of any such f is defined as follows: kf k1 = Z p r∈S n−1 |f (r)| dr 1/p . Claim F.28. Let fv (r) = hv, ri. There exists a universal constant αp such that kfv kp = αp kvk2 . Proof. We have, kfv kp = = Z p r∈S n−1 |hv, ri| dr θ∈S n−1 kvkp2 Z = kvk2 Z 1/p p · | cos θ| dθ p θ∈S n−1 | cos θ| dθ = αp kvk2 . 1/p 1/p This completes the proof. Lemma F.29. Let G ∈ Rk×n denote i.i.d. random Gaussian matrices with rescaling. Then for any v ∈ Rn , we have 2 Pr[(1 − )kvk2 ≤ kGvk1 ≤ (1 + )kvk2 ] ≥ 1 − 2−Ω(k ) . Proof. For each i ∈ [k], we define Xi = hv, gi i,Pwhere gi ∈ Rn is the i-th row of G. Then Xi = Pn k j=1 vj gi,j and E[|Xi |] = αp kvk2 . Define Y = i=1 |Xi |. We have E[Y ] = kα1 kvk2 = kα1 . We can show Pr[Y ≥ (1 + )α1 k] = Pr[esY ≥ es(1+)α1 k ] sY ≤ E[e ]/e = e−s(1+)α1 k · E[ =e for all s > 0 s(1+)α1 k −s(1+)α1 k k Y by Markov’s inequality es|Xi | ] i=1 s|X1 | k · (E[e ]) by Y = k X i=1 |Xi | 2 /2 It remains to bound E[es|X1 | ]. Since X1 ∼ N (0, 1), we have that X1 has density function e−t 125 . Thus, we have, E[e s|X1 | Z +∞ 1 2 es|t| · e−t /2 dt ]= √ 2π −∞ Z +∞ 1 2 2 = √ es /2 · e−(|t|−s) /2 dt 2π −∞ √ s2 /2 =e (erf(s/ 2) + 1) 2 /2 ≤ es Thus, we have ((1 − exp(−2s2 /π))1/2 + 1) p 2 ≤ es /2 ( 2/πs + 1). by 1 − exp(−4x2 /π) ≥ erf(x)2 by 1 − e−x ≤ x p (1 + s 2/π)k √ 2 = e−s(1+)α1 k eks /2 ek·log(1+s 2/π) √ 2 ≤ e−s(1+)α1 k+ks /2+k·s 2/π 2 /2 Pr[Y ≥ (1 + )α1 k] ≤ e−s(1+)k eks 2 ≤ e−Ω(k ) . by α1 ≥ p 2/π and setting s =  Lemma F.30. For any  ∈ (0, 1), let k = O(n/2 ). Let G ∈ Rk×n denote i.i.d. random Gaussian 2 matrices with rescaling. Then for any v ∈ Rn , with probability at least 1 − 2−Ω(n/ ) , we have : for all v ∈ Rn , (1 − )kvk2 ≤ kGvk1 ≤ (1 + )kvk2 . Proof. Let S denote {y ∈ Rn | kyk2 = 1}. We construct a γ-net so that for all y ∈ S, there exists a vector w ∈ N for which ky − wk2 ≤ γ. We set γ = 1/2. For any unit vector y, we can write y = y0 + y1 + y2 + · · · , where ky i k2 ≤ 1/2i and y i is a scalar multiple of a vector in N . Thus, we have kGyk1 = kG(y 0 + y 1 + y 2 + · · · )k1 ∞ X ≤ kGy i k1 ≤ by triangle inequality i=0 ∞ X i=0 (1 + )ky i k2 ∞ X 1 ≤ (1 + ) i 2 i=0 ≤ 1 + Θ(). Similarly, we can lower bound kGyk1 by 1 − Θ(). By Lemma 2.2 in [Woo14], we know that for any γ ∈ (0, 1), there exists a γ-net N of S for which |N | ≤ (1 + 4/γ)n . 126 F.3.3 Reduction, projection to high dimension Lemma F.31. Given a 3rd order tensor A ∈ Rn×n×n , let S ∈ Rn×s denote a Gaussian matrix with 2 s = O(n/2 ) columns. With probability at least 1 − 2−Ω(n/ ) , for any U, V, W ∈ Rn×k , we have (1 − ) kU ⊗ V ⊗ W − Aku ≤ k(U ⊗ V ⊗ W )S − ASk1 ≤ (1 + ) kU ⊗ V ⊗ W − Aku . Proof. By definition of the ⊗ product between matrices and · product between a tensor and a matrix, we have (U ⊗ V ⊗ W )S = U ⊗ V ⊗ (SW ) ∈ Rn×n×s . We use Ai,j,∗ ∈ Rn to denote the (i, j)-th tube (the column in the 3rd dimension) of tensor A. We first prove the upper bound, k(U ⊗ V ⊗ W )S − ASk1 = ≤ n X n X i=1 j=1 n X n X i=1 j=1 k((U ⊗ V ⊗ W )i,j,∗ − Ai,j,∗ ) Sk1 (1 + ) k(U ⊗ V ⊗ W )i,j,∗ − Ai,j,∗ k2 = (1 + ) kU ⊗ V ⊗ W − Aku , where the first step follows by definition of tensor k·ku norm, the second step follows by Lemma F.30, and the last step follows by tensor entry-wise `1 norm. Similarly, we can prove the lower bound, k(U ⊗ V ⊗ W )S − ASk1 ≥ n X n X (1 − ) k(U ⊗ V ⊗ W )i,j,∗ − Ai,j,∗ k2 i=1 j=1 = (1 − ) kU ⊗ V ⊗ W − Aku . This completes the proof. Corollary F.32. For any α ≥ 1, if U 0 , V 0 , W 0 satisfy k(U 0 ⊗ V 0 ⊗ W 0 − A)Sk1 ≤ γ min rank −k Ak k(Ak − A)Sk1 , then kU 0 ⊗ V 0 ⊗ W 0 − Aku ≤ γ 1+ min kAk − Aku . 1 −  rank −k Ak b , Vb , W c denote the optimal solution to minrank −k Proof. Let U denote the optimal solution to minrank −k Ak kAk − Aku . Then, Ak k(Ak − A)Sk1 . Let U ∗ , V ∗ , W ∗ 1 k(U 0 ⊗ V 0 ⊗ W 0 − A)Sk1 1− 1 b ⊗ Vb ⊗ W c − A)Sk1 ≤γ k(U 1− 1 ≤γ k(U ∗ ⊗ V ∗ ⊗ W ∗ − A)Sk1 1− 1+ ∗ kU ⊗ V ∗ ⊗ W ∗ − Aku , ≤γ 1− kU 0 ⊗ V 0 ⊗ W 0 − Aku ≤ which completes the proof. 127 F.3.4 Existence results Theorem F.33 (Existence results). Given a 3rd order tensor A ∈ Rn×n×n and a matrix S ∈ Rn×n , b = AS ∈ Rn×n×n . For any k ≥ 1, there let OPT denote minrank −k Ak ∈Rn×n×n k(Ak − A)Sk1 , let A 2 exist three matrices S1 ∈ Rnn×s1 , S2 ∈ Rnn×s2 , S3 ∈ Rn ×s3 such that b1 S1 X1 ) ⊗ (A b2 S2 X2 ) ⊗ (A b3 S3 X3 ) − A b (A min X1 ∈Rs1 ×k ,X2 ∈Rs2 ×k ,X3 ∈Rs3 ×k or equivalently, min X1 ∈Rs1 ×k ,X2 ∈Rs2 ×k ,X3 ∈Rs3 ×k  1 ≤ α OPT,  b1 S1 X1 ) ⊗ (A b2 S2 X2 ) ⊗ (A3 S3 X3 ) − A S (A 1 ≤ α OPT, holds with probability 99/100. (I). Using a dense Cauchy transform, e e 1.5 ) log3 n. s1 = s2 = s3 = O(k), α = O(k (II). Using a sparse Cauchy transform, e 5 ), α = O(k e 13.5 ) log3 n. s1 = s2 = s3 = O(k (III). Guessing Lewis weights, e e 1.5 ). s1 = s2 = s3 = O(k), α = O(k Proof. We use OPT to denote the optimal cost, OPT := min rank −k Ak ∈Rn×n×n k(Ak − A)Sk1 . We fix V ∗ ∈ Rn×k and W ∗ ∈ Rn×k to be the optimal solution to min k(U ⊗ V ⊗ W − A)Sk1 . U,V,W We define Z1 ∈ Rk×nn to be the matrix where the i-th row is the vectorization of Vi∗ ⊗ (SWi∗ ). We define tensor b = AS ∈ Rn×n×n . A b = A(I, I, S) according to the definition of the · product between a tensor and Then we also have A a matrix. b1 ∈ Rn×nn denote the matrix obtained by flattening tensor A b along the first direction. We Let A can consider the following optimization problem, min U ∈Rn×k b1 U Z1 − A 1 . Choosing S1 to be one of the following sketching matrices: (I) a dense Cauchy transform, (II) a sparse Cauchy transform, (III) a sampling and rescaling diagonal matrix according to Lewis weights. Let αS1 denote the approximation ratio produced by the sketching matrix S1 . We use S1 ∈ Rnn×s1 to sketch on right of the above problem, and obtain the problem: b1 S1 k1 = min min kU Z1 S1 − A U ∈Rn×k U ∈Rn×k 128 n X i=1 b1 S1 )i k1 , kU i Z1 S1 − (A b1 S1 )i denotes the i-th row of matrix where U i denotes the i-th row of matrix U ∈ Rn×k and (A b1 S1 . Instead of solving it under `1 -norm, we consider the `2 -norm relaxation, A b1 S1 k2 = min min kU Z1 S1 − A F U ∈Rn×k U ∈Rn×k n X i=1 b1 S1 )i k2 . kU i Z1 S1 − (A 2 b ∈ Rn×k denote the optimal solution of the above optimization problem, so that U b = Let U † b1 S1 (Z1 S1 ) . We plug U b into the objective function under the `1 -norm. By the property of A nn×s 1 , we have, sketching matrix S1 ∈ R b1 k1 = αS OPT, b Z1 − A b1 k1 ≤ αS min kU Z1 − A kU 1 1 U ∈Rn×k which implies that, b ⊗ V ∗ ⊗ (SW ∗ ) − Ak b 1 = k(U b ⊗ V ∗ ⊗ W ∗ )S − Ak b 1 ≤ αS OPT . kU 1 b ∈ Rn×k and W ∗ ∈ Rn×k . Let A b2 ∈ Rn×nn denote the matrix In the second step, we fix U n×n×n b ∈ R obtained by flattening tensor A along the second direction. We choose a sketching nn×s > ∗ > 2 b matrix S2 ∈ R . Let Z2 = U (SW ) ∈ Rk×nn denote the matrix where the i-th row is the ∗ b b2 S2 (Z2 S2 )† . By the properties of sketching matrix S2 , vectorization of Ui ⊗ (SWi ). Define Vb = A we have b2 k1 ≤ αS αS OPT, kVb Z2 − A 2 1 b ∈ Rn×k and Vb ∈ Rn×k . Let A b3 ∈ Rn×n2 denote the matrix In the third step, we fix U b ∈ Rn×n×n along the third direction. We choose a sketching matrix obtained by flattening tensor A 2 ×s 2 n k×n 3 bi ⊗ Vbi . S3 ∈ R . Let Z3 ∈ R denote the matrix where the i-th row is the vectorization of U 0 † n×k † n×k b3 S3 (Z3 S3 ) ∈ R c = A3 S3 (Z3 S3 ) ∈ R Define W = A and W . Then we have, b3 S3 (Z3 S3 )† W0 = A = (A(I, I, S))3 S3 (Z3 S3 )† = (S > A3 )S3 (Z3 S3 )† c = S>W By properties of sketching matrix S3 , we have b3 k1 ≤ αS αS αS OPT . kW 0 Z3 − A 3 2 1 c , we obtain, Replacing W 0 by S > W b3 k1 = kS > W c Z3 − A b3 k1 = kS > W c Z3 − S > A3 k1 = k(U b ⊗ Vb ⊗ W c − A)Sk1 . kW 0 Z3 − A Thus, we have min X1 ∈Rs1 ×k ,X2 ∈Rs2 ×k ,X3 ∈Rs3 ×k b1 S1 X1 ) ⊗ (A b2 S2 X2 ) ⊗ (A b3 S3 X3 ) − A b (A 129 1 ≤ αS1 αS2 αS3 OPT . F.3.5 Running time analysis Fact F.34. Given tensor A ∈ Rn×n×n and a matrix B ∈ Rn×d with d = O(n), let AB denote an n × n × d size tensor, For each i ∈ [3], let (AB)i denote a matrix obtained by flattening tensor AB along the i-th dimension, then 2 (AB)1 ∈ Rn×nd , (AB)2 ∈ Rn×nd , (AB)3 ∈ Rd×n . For each i ∈ [3], let Si ∈ Rnd×si denote a sparse Cauchy transform, Ti ∈ Rti ×n . Then we have, (I) If T1 denotes a sparse Cauchy transform or a sampling and rescaling matrix according to the Lewis weights, T1 (AB)1 S1 can be computed in O(nnz(A)d) time. Otherwise, it can be computed in O(nnz(A)d + ns1 t1 ). (II) If T2 denotes a sparse Cauchy transform or a sampling and rescaling matrix according to the Lewis weights, T2 (AB)2 S2 can be computed in O(nnz(A)d) time. Otherwise, it can be computed in O(nnz(A)d + ns2 t2 ). (III) If T3 denotes a sparse Cauchy transform or a sampling and rescaling matrix according to the Lewis weights, T3 (AB)3 S3 can be computed in O(nnz(A)d) time. Otherwise, it can be computed in O(nnz(A)d + ds3 t3 ). Proof. Part (I). Note that T1 (AB)1 S1 ∈ Rt1 ×s1 and (AB)1 ∈ Rn×nd , for each i ∈ [t1 ], j ∈ [s1 ], (T1 (AB)1 S1 )i,j = n X nd X (T1 )i,x ((AB)1 )x,y0 (S1 )y0 ,j x=1 y 0 =1 = n X n X d X (T1 )i,x ((AB)1 )x,(y−1)d+z (S1 )(y−1)d+z,j x=1 y=1 z=1 = n X n X d X (T1 )i,x (AB)x,y,z (S1 )(y−1)d+z,j x=1 y=1 z=1 n X n X d n X X = (T1 )i,x (Ax,y,w Bw,z )(S1 )(y−1)d+z,j x=1 y=1 z=1 = n X n X w=1 (T1 )i,x x=1 y=1 n X w=1 Ax,y,w d X Bw,z (S1 )(y−1)d+z,j . z=1 We look at a non-zero entry Ax,y,w and the entry Bw,z . If T1 denotes a sparse Cauchy transform or a sampling and rescaling matrix according to the Lewis weights, then there is at most one pair (i, j) such that (T1 )i,x Ax,y,w Bw,z (S1 )(y−1)d+z,j is non-zero. Therefore, computing T1 (AB)1 S1 only needs nnz(A)d time. If T1 is not in the above case, since S1 is sparse, we can compute (AB)1 S1 in nnz(A)d time by a similar argument. Then, we can compute T1 (AB)1 S1 in nt1 s1 time. Part (II). It is as the same as Part (I). 130 2 Part (III). Note that T3 (AB)3 S3 ∈ Rt3 ×s3 and (AB)3 ∈ Rd×n . For each i ∈ [t3 ], j ∈ [s3 ], 2 (T3 (AB)3 S3 )i,j = d X n X x=1 (T3 )i,x ((AB)3 )x,y0 (S3 )y0 ,j y 0 =1 d X n X n X = (T3 )i,x ((AB)3 )x,(y−1)n+z (S3 )(y−1)n+z,j x=1 y=1 z=1 d X n X n X = (T3 )i,x (AB)y,z,x (S3 )(y−1)n+z,j x=1 y=1 z=1 n d X n X n X X Ay,z,w Bw,x (S3 )(y−1)n+z,j = (T3 )i,x w=1 x=1 y=1 z=1 Similar to Part (I), if T1 denotes a sparse Cauchy transform or a sampling and rescaling matrix according to the Lewis weights, computing T3 (AB)3 S3 only needs nnz(A)d time. Otherwise, it needs dt3 s3 + nnz(A)d running time. F.3.6 Algorithms Algorithm 34 `1 -`1 -`2 -Low Rank Approximation algorithm, input sparsity time 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: procedure L112TensorLowRankApproxInputSparsity(A, n, k) . Theorem F.35 n ← O(n). e 5 ). s1 ← s2 ← s3 ← O(k Choose S ∈ Rn×n to be a Gaussian matrix. Choose S1 ∈ Rnn×s1 to be a sparse Cauchy transform. . Part (II) of Theorem F.33 Choose S2 ∈ Rnn×s2 to be a sparse Cauchy transform. 2 Choose S3 ∈ Rn ×s3 to be a sparse Cauchy transform. b = AS. Form A b1 S1 , A b2 S2 , and A b3 S3 Compute A b A b1 S1 , A b2 S2 , A b3 S3 , n, n, n, s1 , s2 , s3 , k) Y1 , Y2 , Y3 , C ←L1PolyKSizeReduction(A, . Algorithm 21 Create s1 k + s2 k + s3 k variables for each entry of X1 , X2 , X3 . Form objective function k(Y1 X1 ) ⊗ (Y2 X2 ) ⊗ (Y3 X3 ) − Ck2F . Run polynomial system verifier. return A1 S1 X1 , A2 S2 X2 , A3 S3 X3 end procedure Theorem F.35. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, there exists an algorithm e 2 e which takes O(nnz(A)n) + O(n) poly(k) + n2O(k ) time and outputs three matrices U, V, W ∈ Rn×k such that, kU ⊗ V ⊗ W − Aku ≤ poly(k, log n) holds with probability at least 9/10. 131 min rank −k A0 kA0 − Aku , Proof. We first choose a Gaussian matrix S ∈ Rn×n with n = O(n). By applying Corollary F.32, we can reduce the original problem to a “generalized” `1 low rank approximation problem. Next, we use the existence results (Theorem F.33) and polynomial in k size reduction (Lemma D.8). At the end, we relax the `1 -norm objective function to a Frobenius norm objective function (Fact D.1). e 2/3 ) Algorithm 35 `1 -`1 -`2 -Low Rank Approximation Algorithm, O(k 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: procedure L112TensorLowRankApproxK(A, n, k) . Theorem F.36 n ← O(n). e s1 ← s2 ← s3 ← O(k). n×n to be a Gaussian matrix. Choose S ∈ R Guess a diagonal matrix S1 ∈ Rnn×s1 with s1 nonzero entries. . Part (III) of Theorem F.33 Guess a diagonal matrix S2 ∈ Rnn×s2 with s2 nonzero entries. 2 Guess a diagonal matrix S3 ∈ Rn ×s3 with s3 nonzero entries. b = AS. Form A b1 S1 , A b2 S2 , and A b3 S3 Compute A b A b1 S1 , A b2 S2 , A b3 S3 , n, n, n, s1 , s2 , s3 , k) Y1 , Y2 , Y3 , C ←L1PolyKSizeReduction(A, . Algorithm 21 Create s1 k + s2 k + s3 k variables for each entry of X1 , X2 , X3 . Form objective function k(Y1 X1 ) ⊗ (Y2 X2 ) ⊗ (Y3 X3 ) − Ck1 . Run polynomial system verifier. return A1 S1 X1 , A2 S2 X2 , A3 S3 X3 end procedure Theorem F.36. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, there exists an algorithm e e 3 which takes nO(k) 2O(k ) time and outputs three matrices U, V, W ∈ Rn×k such that, kU ⊗ V ⊗ W − Aku ≤ O(k 3/2 ) min rank −k A0 kA0 − Aku , holds with probability at least 9/10. Proof. We first choose a Gaussian matrix S ∈ Rn×n with n = O(n). By applying Corollary F.32, we can reduce the original problem to a “generalized” `1 low rank approximation problem. Next, we use the existence results (Theorem F.33) and polynomial in k size reduction (Lemma D.8). At the end, we solve an entry-wise `1 norm objective function directly. e 2 ). There is an Theorem F.37. Given a 3rd order tensor A ∈ Rn×n×n , for any k ≥ 1, let r = O(k e algorithm which takes O(nnz(A)n) + O(n) poly(k) time and outputs three matrices U, V, W ∈ Rn×r such that kU ⊗ V ⊗ W − Aku ≤ poly(log n, k) min rank −k Ak kAk − Aku , holds with probability at least 9/10. Proof. We first choose a Gaussian matrix S ∈ Rn×n with n = O(n). By applying Corollary F.32, we can reduce the original problem to a “generalized” `1 low rank approximation problem. Next, we use the existence results (Theorem F.33) and polynomial in k size reduction (Lemma D.8). At the end, we solve an entry-wise `1 norm objective function directly. 132 Algorithm 36 `1 -`1 -`2 -Low Rank Approximation Algorithm, Bicriteria Algorithm 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: procedure L112TensorLowRankApproxBicteriteria(A, n, k) . Theorem F.37 n ← O(n). e 5 ). s2 ← s3 ← O(k e t2 ← t3 ← O(k). r ← s2 s3 . Choose S ∈ Rn×n to be a Gaussian matrix. b = AS ∈ Rn×n×n . Form A Choose a sketching matrix S2 ∈ Rnn×s2 with s2 nonzero entries (Sparse Cauchy transform), for each i ∈ {2, 3}. . Part (II) of Theorem F.33 bi Si Choose a sampling and rescaling diagonal matrix Di according to the Lewis weights of A with ti nonzero entries, for each i ∈ {2, 3}. b2 S2 )i . Form Vb ∈ Rn×r by setting the (i, j)-th column to be (A n×r c∈R Form W by setting the (i, j)-th column to be (A3 S3 )j . Form matrix B ∈ Rr×t2 t3 by setting the (i, j)-th column to be the vectorization of b2 S2 )i ⊗ (T3 A b3 S3 )j . (T2 A b T2 , T3 ))1 k1 . Solve minU kU · B − (A(I, b , Vb , W c return U end procedure G Weighted Frobenius Norm for Arbitrary Tensors This section presents several tensor algorithms for the weighted case. For notational purposes, instead of using U, V, W to denote the ground truth factorization, we use U1 , U2 , U3 to denote the ground truth factorization. We use A to denote the input tensor, and W to denote the tensor of weights. Combining our new tensor techniques with existing weighted low rank approximation algorithms [RSW16] allows us to obtain several interesting new results. We provide some necessary definitions and facts in Section G.1. Section G.2 provides an algorithm when W has at most r distinct faces in each dimension. Section G.3 studies relationships between r distinct faces and r distinct columns. Finally, we provides an algorithm with a similar running time but weaker assumption, where W has at most r distinct columns and r distinct rows in Section G.4. The result in Theorem G.2 is fairly similar to Theorem G.5, except for the running time. We only put a very detailed discussion in the statement of Theorem G.5. Note that Theorem G.2 also has other versions which are similar to the Frobnius norm rank-k algorithms described in Section 1. For simplicity of presentation, we only present one clean and simple version (which assumes Ak exists and has factor norms which are not too large). G.1 Definitions and Facts For a matrix A ∈ Rn×m and a weight matrix W ∈ Rn×m , we define kW ◦ AkF as follows,  1 2 n X m X 2 2   kW ◦ AkF = Wi,j Ai,j . i=1 j=1 133 For a tensor A ∈ Rn×n×n and a weight tensor W ∈ Rn×n×n , we define kW ◦ AkF as follows,  kW ◦ AkF =  n X n X n X i=1 j=1 l=1 1 2 2 Wi,j,l A2i,j,l  . For three matrices A ∈ Rn×m , U ∈ Rn×k , V ∈ Rk×m and a weight matrix W , from one perspective, we have k(U V − A) ◦ W k2F = n X i=1 k(U i V − Ai ) ◦ W i k22 = n X i=1 k(U i V − Ai )DW i k22 , where W i denote the i-th row of matrix W , and DW i ∈ Rm×m denotes a diagonal matrix where the j-th entry on diagonal is the j-th entry of vector W i . From another perspective, we have k(U V − A) ◦ W k2F = m X j=1 k(U Vj − Aj ) ◦ Wj k22 = m X j=1 k(U Vj − Aj )DWj k22 , where Wj denotes the j-th column of matrix W , and DWj ∈ Rn×n denotes a diagonal matrix where the i-th entry on the diagonal is the i-th entry of vector Wj . One of the key tools we use in this section is, Lemma G.1 (Cramer’s rule). Let R be an n × n invertible matrix. Then, for each i ∈ [n], j ∈ [n], ¬i (R−1 )ji = det(R¬j )/ det(R), ¬i is the matrix R with the i-th row and the j-th column removed. where R¬j G.2 r distinct faces in each dimension Notice that in the matrix case, it is sufficient to assume that kA0 kF is upper bounded [RSW16]. Once we have that kA0 kF is bounded, without loss of generality, we can assume that U1∗ is an orthonormal basis[CW15a, RSW16]. If U1∗ is not an orthonormal basis, then let U10 R denote a QR factorization of U1∗ , and then write U20 = RU2∗ . However, in the case of tensors we have to assume that each factor kUi∗ kF is upper bounded due to border rank issues (see, e.g., [DSL08]). Theorem G.2. Given a 3rd order n × n × n tensor A and an n × n × n tensor W of weights with r distinct faces in each of the three dimensions for which each entry can be written using O(nδ ) bits, for δ > 0, define OPT = inf rank −k Ak kW ◦ (Ak − A)k2F . Let k ≥ 1 be an integer and let 0 <  < 1. If OPT > 0, and there exists a rank-k Ak = U1∗ ⊗ U2∗ ⊗ U3∗ tensor (with size n × n × n) such that δ kW ◦ (Ak − A)k2F = OPT, and maxi∈[3] kUi∗ kF ≤ 2O(n ) , then there exists an algorithm that takes 2 (nnz(A) + nnz(W ) + n2O(rk /) )nO(δ) time in the unit cost RAM model with words of size O(log n) bits10 and outputs three n × k matrices U1 , U2 , U3 such that e kW ◦ (U1 ⊗ U2 ⊗ U3 − A)k2F ≤ (1 + ) OPT holds with probability 9/10. 10 The entries of A and W are assumed to fit in nδ words. 134 (71) Algorithm 37 Weighted Tensor Low-rank Approximation Algorithm when the Weighted Tensor has r Distinct Faces in Each of the Three Dimensions. procedure WeightedRDistinctFacesIn3Dimensions(A, W, n, r, k, ) . Theorem G.2 for j = 1 → 3 do sj ← O(k/). 2 Choose a sketching matrix Sj ∈ Rn ×sj . for i = 1 → r do Create k × s1 variables for matrix Pi,j ∈ Rk×sj . end for for i = 1 → n do bj )i = Aj D j Sj P > (Pj,i P > )−1 . Write down (U j,i j,i i W1 end for end for b1 ⊗ U b2 ⊗ U b3 − A)k2 . Form kW ◦ (U F Run polynomial system verifier. return U1 , U2 , U3 end procedure Proof. Note that W has r distinct columns, rows, and tubes. Hence, each of the matrices W1 , W2 , W3 2 ∈ Rn×n has at most r distinct columns, and at most r distinct rows. Let U1∗ , U2∗ , U3∗ ∈ Rn×k denote the matrices satisfying kW ◦ (U1∗ ⊗ U2∗ ⊗ U3∗ − A)k2F = OPT. We fix U2∗ and U3∗ , and consider a flattening of the tensor along the first dimension, min k(U1 Z1 − A1 ) ◦ W1 k2F = OPT, U1 ∈Rn×k where matrix Z1 = U2∗> U3∗> has size k × n2 and for each i ∈ [k] the i-th row of Z1 is vec((U2∗ )i ⊗ (U3∗ )i ). For each i ∈ [n], let W1i denote the i-th row of n × n2 matrix W1 . For each i ∈ [n], let DW i 1 2 denote the diagonal matrix of size n2 × n2 , where each diagonal entry is from the vector W1i ∈ Rn . Without loss of generality, we can assume the first r rows of W1 are distinct. We can rewrite the objective function along the first dimension as a sum of multiple regression problems. For any n × k matrix U1 , k(U1 Z1 − A1 ) ◦ W1 k2F = n X i=1 kU1i Z1 DW i − Ai1 DW i k22 . 1 (72) 1 Based on the observation that W1 has r distinct rows, we can group the n rows of W 1 into r groups. We use g1,1 , g1,2 , · · · , g1,r to denote r sets of indices such that, for each i ∈ g1,j , W1i = W1j . Thus we can rewrite Equation (72), k(U1 Z1 − A1 ) ◦ W1 k2F = = n X i=1 r X kU1i Z1 DW i − Ai1 DW i k22 1 X j=1 i∈g1,j 1 kU1i Z1 DW i − Ai1 DW i k22 . 1 1 2 ×s We can sketch the objective function by choosing Gaussian matrices S1 ∈ Rn n X i=1 kU1i Z1 DW i S1 − Ai1 DW i S1 k22 . 1 1 135 1 with s1 = O(k/). b1 denote the optimal solution of the sketch problem, Let U b1 = arg min U U1 ∈Rn×k n X i=1 kU1i Z1 DW i S1 − Ai1 DW i S1 k22 . 1 1 b ∈ Rn×k into the original problem, we obtain, By properties of S1 ([RSW16]), plugging U n X i=1 b1i Z1 D i − Ai1 D i k22 ≤ (1 + ) OPT . kU W W 1 1 b1 ∈ Rn×k also has the following form. For each i ∈ [n], Note that U b i = Ai D i S1 (Z1 D i S1 )† U 1 1 W W 1 1 = Ai1 DW i S1 (Z1 DW i S1 )> ((Z1 DW i S1 )(Z1 DW i S1 )> )−1 . 1 1 1 1 Note that W1 has r distinct rows. Thus, we only have r distinct DW i . This implies that there are r 1 distinct matrices Z1 DW i S1 ∈ Rk×s1 . Using the definition of g1,j , for j ∈ [r], for each i ∈ g1,j ⊂ [n], 1 we have b i = Ai D i S1 (Z1 D i S1 )† U 1 1 W W 1 1 by W1i = W1j , = Ai1 DW j S1 (Z1 DW j S1 )† 1 1 which means we only need to write down r different Z1 DW j S1 . For each k × s1 matrix Z1 DW j S1 , 1 1 we create k × s1 variables to represent it. Thus, we need to create rks1 variables to represent r matrices, {Z1 DW11 S1 , Z1 DW12 S1 , · · · , Z1 DW1r S1 }. b i ∈ Rk as follows, For simplicity, let P1,i ∈ Rk×s1 denote Z1 DW i S1 . Then we can rewrite U 1 b i = Ai D i S1 P > (P1,i P > )−1 . U 1 1 W 1,i 1,i 1 > ∈ Rk×k has rank k, then we can use Cramer’s rule (Lemma G.1) to write down the inverse If P1,i P1,i > . However, vector W i could have many zero entries. Then the rank of P P > can be of P1,i P1,i 1,i 1,i 1 smaller than k. There are two different ways to solve this issue. > ∈ Rk×k One way is by using the argument from [RSW16], which allows us to assume that P1,i P1,i has rank k. The other way is straightforward: we can guess the rank. There are k possibilities. Let ti ≤ k denote the rank of P1,i . Then we need to figure out a maximal linearly independent subset of rows of P1,i . There are 2O(k) possibilities. Next, we need to figure out a maximal linearly independent subset of columns of P1,i . We can also guess all the possibilities, which is at most 2O(k) . Because we have r different P1,i , the total number of guesses we have is at most 2O(rk) . Thus, we can write > )−1 according to Cramer’s rule. down (P1,i P1,i b1 is obtained, we will fix U b1 and U ∗ in the next round. We consider the flattening of the After U 3 tensor along the second direction, min k(U2 Z2 − A2 ) ◦ W2 k2F , U2 ∈Rn×k 136 where n×n2 matrix A2 is obtained by flattening tensor A along the second dimension, k ×n2 matrix b > U ∗> , and n × n2 matrix W2 is obtained by flattening tensor W along the second Z2 denotes U 1 3 dimension. For each i ∈ [n], let W2i denote the i-th row of n × n2 matrix W2 . For each i ∈ [n], let DW i denote the diagonal matrix which has size n2 × n2 and for which each entry is from vector 1 2 W2i ∈ Rn . Without loss of generality, we can assume the first r rows of W2 are distinct. We can rewrite the objective function along the second dimension as a sum of multiple regression problems. For any n × k matrix U2 , k(U2 Z2 − A2 ) ◦ W2 k2F = n X i=1 kU2i Z2 DW i − Ai2 DW i k22 . 2 (73) 2 Based on the observation that W2 has r distinct rows, we can group the n rows of W 2 into r groups. We use g2,1 , g2,2 , · · · , g2,r to denote r sets of indices such that, for each i ∈ g2,j , W2i = W2j . Thus we obtain, k(U2 Z2 − A2 ) ◦ W2 k2F = = n X i=1 r X kU2i Z2 DW i − Ai2 DW i k22 2 X j=1 i∈g2,j 2 kU2i Z2 DW i − Ai2 DW i k22 . 2 2 2 We can sketch the objective function by choosing a Gaussian sketch S2 ∈ Rn ×s2 with s2 = O(k/). b2 denote the optimal solution to the sketch problem. Then U b2 has the form, for each i ∈ [n], Let U b2i = Ai2 D i S2 (Z2 D i S2 )† . U W W 2 2 Similarly as before, we only need to write down r different matrices Z2 DW i S1 , and for each of 2 them, create k × s2 variables. Let P2,i ∈ Rk×s2 denote Z2 DW i S2 . By our guessing argument, we 2 b2 . can obtain U b1 and U b2 . We then write down U b3 . Overall, by creating l = O(rk 2 /) In the last round, we fix U b1 (x), U b2 (x), U b3 (x). Putting it all together, we can write variables, we have rational polynomials U this objective function, b1 (x) ⊗ U b2 (x) ⊗ U b3 (x) − A) ◦ W k2 . min k(U F x∈Rl s.t. h1,i (x) 6= 0, ∀i ∈ [r]. h2,i (x) 6= 0, ∀i ∈ [r]. h3,i (x) 6= 0, ∀i ∈ [r]. where h1,i (x) denotes the denominator polynomial related to a full rank sub-block of P1,i (x). By a perturbation argument in Section 4 in [RSW16], we know that the h1,i (x) are nonzero. By a similar argument as in Section 5 in [RSW16], we can show a lower bound on the cost of the denominator polynomial h1,i (x). Thus we can create new bounded variables xl+1 , · · · , x3r+l to rewrite the objective function, 137 min q(x)/p(x). x∈Rl+3r s.t. h1,i (x)xl+i = 0, ∀i ∈ [r]. h2,i (x)xl+r+i = 0, ∀i ∈ [r]. h3,i (x)xl+2r+i = 0, ∀i ∈ [r]. r Y p(x) = h21,i (x)h22,i (x)h23,i (x) i=1 Note that the degree of the above system is poly(kr) and all the equality constraints can be merged into one single constraint. Thus, the number of constraints is O(1). The number of variables is O(rk 2 /). Using Theorem B.11 and a similar argument from Section 5 of [RSW16], we have that the 2 /) e δ O(rk minimum nonzero cost is at least 2−n 2 . Combining the binary search explained in Section C(similar techniques also can be found in Section 6 of [RSW16]) with the lower bound we obtained, we can find the solution for the original problem in time, (nnz(A) + nnz(W ) + n2O(rk e G.3 2 /) )nO(δ) . r distinct columns, rows and tubes Lemma G.3. Let W ∈ Rn×n×n denote a tensor that has r distinct columns and r distinct rows, then W has (I) r distinct column-tube faces. (II) r distinct row-tube faces. Proof. Proof of Part (I). Without loss of generality, we consider the first (which is the bottom one) column-row face. Assume it has r distinct rows and r distinct columns. We can re-order all the column-tube faces to make sure that all the n columns in the bottom face have been split into r continuous disjoint groups Ci , e.g., {C1 , C2 , · · · , Cr } = [n]. Next, we can re-order all the row-tube faces to make sure that all the n rows in the bottom face have been split into r continuous disjoint groups Ri , e.g., {R1 , R2 , · · · , Rr } = [n]. Thus, the new bottom face can be regarded as r × r groups, and the number in each position of the same group is the same. Suppose that the tensor has r + 1 distinct column-tube faces. By the pigeonhole principle there exist two different column-tube faces belonging to the same group Ci , for some i ∈ [r]. Note that these two column-tube faces are the same by looking at the bottom (column-row) face. Since they are distinct faces, there must exist one row vector v which is not in the bottom (column-row) face, and it has a different value in coordinates belong to group Ci . Note that, considering the bottom face, for each row vector, it has the same value over coordinates belonging to group Ci . But v has different values in coordinates belong to group Ci . Also, note that the bottom (column-row) face also has r distinct rows, and v is not one of them. This means there are at least r + 1 distinct rows, which contradicts that there are r distinct rows in total. Thus, there are at most r distinct column-tube faces. Proof of Part (II). It is similar to Part (I). 138 (W1 )i,(j−1)n+l = Wi,j,l (W2 )j,(l−1)n+i = Wi,j,l (W3 )l,(i−1)n+j = Wi,j,l Figure 7: Let W denote a tensor that has columns(red), rows(green) and tubes(blue). For each i ∈ [3], let Wi denote the matrix obtained by flattening tensor W along the i-th dimension. C1 C2 C3 R1 ······ R2 R3 W∗,∗,1 W∗,∗,2 W∗,∗,n Figure 8: Each face W∗,∗,i is a column-row face. W∗,∗,1 is the bottom column-row face. r = 3. The blue blocks represent column-tube faces, the red blocks represent column-tube faces. Corollary G.4. Let W ∈ Rn×n×n denote a tensor that has r distinct columns, r distinct rows, and r distinct rubes. Then W has r distinct column-tube faces, r distinct row-tube faces, and r distinct column-row faces. Proof. This follows by applying Lemma G.3 twice. 139 Thus, we obtain the same result as in Theorem G.2 by changing the assumption from r distinct faces in each dimension to r distinct columns, r distinct rows and r distinct tubes. G.4 r distinct columns and rows The main difference between Theorem G.2 and Theorem G.5 is the running time. The first one 2 e 2 2 e takes 2O(rk /) time and the second one is slightly longer, 2O(r k /) . By Lemma G.3, r distinct columns in two dimensions implies r distinct faces in two of the three kinds of faces. Thus, the following theorem also holds for r distinct columns in two dimensions. Algorithm 38 Weighted Tensor Low-rank Approximation Algorithm when the Weighted Tensor has r Distinct Faces in Each of the Two Dimensions. procedure WeightedRDistinctFacesIn2Dimensions(A, W, n, r, k, ) . Theorem G.5 for j = 1 → 3 do sj ← O(k/). 2 Choose a sketching matrix Sj ∈ Rn ×sj . if j 6= 3 then for i = 1 → r do Create k × s1 variables for matrix Pi,j ∈ Rk×sj . end for end if for i = 1 → n do bj )i = Aj D j Sj P > (Pj,i P > )−1 . Write down (U j,i j,i i W1 end for end for b1 ⊗ U b2 ⊗ U b3 − A)k2 . Form kW ◦ (U F Run polynomial system verifier. return U1 , U2 , U3 end procedure Theorem G.5. Given a 3rd order n × n × n tensor A and an n × n × n tensor W of weights with r distinct faces in two dimensions (out of three dimensions) such that each entry can be written using O(nδ ) bits for some δ > 0, define OPT = inf rank −k Ak kW ◦ (Ak − A)k2F . For any k ≥ 1 and any 0 <  < 1. (I) If OPT > 0, and there exists a rank-k Ak = U1∗ ⊗ U2∗ ⊗ U3∗ tensor (with size n × n × n) such δ that kW ◦ (Ak − A)k2F = OPT, and maxi∈[3] kUi∗ kF ≤ 2O(n ) , then there exists an algorithm that 2 2 takes (nnz(A) + nnz(W ) + n2O(r k /) )nO(δ) time in the unit cost RAM model with words of size O(log n) bits11 and outputs three n × k matrices U1 , U2 , U3 such that e kW ◦ (U1 ⊗ U2 ⊗ U3 − A)k2F ≤ (1 + ) OPT (74) holds with probability 9/10. (II) If OPT > 0, Ak does not exist, and there exist three n × k matrices U10 , U20 , U30 where each entry can be written using O(nδ ) bits and kW ◦ (U10 ⊗ U20 ⊗ U30 − A)k2F ≤ (1 + /2) OPT, then we can find U, V, W such that (74) holds. 11 The entries of A and W are assumed to fit in nδ words. 140 (III) If OPT = 0, Ak exists, and there exists a solution U1∗ , U2∗ , U3∗ such that each entry of the matrix can be written using O(nδ ) bits, then we can obtain (74). (IV) If OPT = 0, and there exist three n × k matrices U1 , U2 , U3 such that maxi∈[3] kUi∗ kF ≤ δ 2O(n ) and δ kW ◦ (U1 ⊗ U2 ⊗ U3 − A)k2F ≤ (1 + ) OPT +2−Ω(n ) , (75) then we can output U1 , U2 , U3 such that (75) holds. (V) Further if Ak exists, we can output a number Z for which OPT ≤ Z ≤ (1 + ) OPT. For all the cases, the algorithm succeeds with probability at least 9/10. Proof. By Lemma G.3, we have W has r distinct column-tube faces and r distinct row-tube faces. By Claim G.7, we know that W has R = 2O(r log r) distinct column-row faces. We use the same approach as in proof of Theorem G.2 (which is also similar to Section 8 of [RSW16]) to create variables, write down the polynomial systems and add not equal constraints. Instead of having 3r distinct denominators as in the proof of Theorem G.2, we have 2r + R. We create l = O(rk 2 /) variables for {Z1 DW11 S1 , Z1 DW12 S1 , · · · , Z1 DW1r S1 }. Then we can write b1 with r distinct denominators gi (x). Each gi (x) is non-zero in an optimal solution using down U the perturbation argument in Section 4 in [RSW16]. We create new variables x2l+i to remove b1 are polynomials as opposed to rational the denominators gi (x), ∀i ∈ [r]. Then the entries of U functions. We create l = O(rk 2 /) variables for {Z2 DW21 S2 , Z2 DW22 S2 , · · · , Z2 DW2r S2 }. Then we can write b2 with r distinct denominators gr+i (x). Each gr+i (x) is non-zero in an optimal solution using down U the perturbation argument in Section 4 in [RSW16]. We create new variables x2l+r+i to remove b2 are polynomials as opposed to rational the denominators gr+i (x), ∀i ∈ [r]. Then the entries of U functions. b1 and U b2 we can express U b3 with R distinct denominators fi (x), which are also non-zero Using U by using the perturbation argument in Section 4 in [RSW16], and using that W3 has at most this number of distinct rows. Finally we can write the following optimization problem, min x∈R2l+2r s.t. p(x)/q(x) gi (x)x2l+i − 1 = 0, ∀i ∈ [r] gr+i (x)x2l+r+i − 1 = 0, ∀i ∈ [r] fj2 (x) 6= 0, ∀j ∈ [R] q(x) = R Y fj2 (x) j=1 We then determine if there exists a solution to the above semi-algebraic set in time (poly(k, r)R)O(rk 2 /) = 2O(r e 2 k 2 /) . Using similar techniques from Section 5 of [RSW16], we can show a lower bound on the cost similar to Section 8.3 of [RSW16], namely, the minimum nonzero cost is at least e 2 k2 /) δ 2O(r 2−n 141 . C1 C2 C3 C1 R1 R1 R2 R2 R3 R3 C2 C3 ······ R2 R2 R3 R3 C2 W∗,∗,n C3 C1 ······ R2 R2 R3 R3 C2 C3 R2 R3 C1 R1 W∗,∗,1 R2 W∗,∗,2 R1 C3 R1 W∗,∗,1 C3 C2 R3 C1 R1 C2 C1 W∗,∗,2 R1 C1 C3 R1 W∗,∗,1 C1 C2 C2 W∗,∗,n C3 C1 C2 C3 R1 ······ R2 R3 W∗,∗,2 W∗,∗,n Figure 9: Each face W∗,∗,i is a column-row face. W∗,∗,1 is the bottom column-row face. r = 3. The blue blocks represent |C3 | column-tube faces. The green blocks represet |R3 | row-tube faces. In each column-row face, the intersection between blue faces and green faces is a size |R3 | × |C3 | block, and all the entries in this block are the same. Combining the binary search explained in Section C (a similar techniques also can be found in Section 6 of [RSW16]) with the lower bound we obtained, we can find a solution for the original problem in time e 2 2 (nnz(A) + nnz(W ) + n2O(r k /) )nO(δ) . Remark G.6. Note that the running time for the Frobenius norm and for the `1 norm are of the form poly(n) + exp(poly(k/)) rather than poly(n) · exp(k/). The reason is, we can use an input sparsity reduction to reduce the size of the objective function from poly(n) to poly(k). Claim G.7. Let W ∈ R denote a third order tensor that has r distinct columns and r distinct rows. Then it has 2O(r log r) distinct column-row faces. 142 Proof. By similar arguments as in the proof of Lemma G.3, the bottom (column-row) face can be split into r groups C1 , C2 , · · · , Cr based on r columns, and split into r groups R1 , R2 , · · · , Rr based on rows. Thus, the bottom (column-row) face can be regarded as having r × r groups, and the number in each position of the same group is the same. We can assume that all the r2 blocks in the bottom column-row face have the same size. Otherwise, we can expand the tensor to the situation that all the r2 blocks have the same size. Because this small tensor is a sub-tensor of the big tensor, if the big tensor has at most t distinct column-row faces, then the small tensor has at most t distinct column-row faces. By Lemma G.3, we know that the tensor W has at most r distinct column-tube faces and rowtube faces. Because it has r distinct column-tube faces, then all the faces belonging to coordinates in Cr are the same. Thus, all the columns belonging to Cr and in the second column-row face are the same. Similarly, we have that all the rows belonging to Rr and in the second column-row face are the same. Thus we have that all the entries in block CR ∪ Rr and in the second column-row faces are the same. Further, we can conclude, for every column-row face, for every Ci ∪ Rj block, all the entries in the same block are the same. The next observation is, if there exist r2 + 1 different values in the tensor, then there exist either r distinct columns or r distinct rows. Indeed, otherwise since we have r distinct columns, each column has at most r distinct entries given our bound on the nunber of distinct rows. Thus, the r distinct columns could have at most r2 distinct entries in total, a contradiction. For each column-row face, there are at most r2 blocks, and the value in each block can have at 2 2 most r2 possibilities. Thus, overall we have at most (r2 )r = 2O(r log r) column-row faces. By using different argument, we can improve the above bound. Note that we already show in each column-row face of a tensor, it has r2 blocks, and all the values in each block have to be the same. Since we have r distinct rows, we can fix the those r distinct rows. If we copy row v into one row of Ri , then we have to copy row v into every row of Ri . This is because if Ri contains two distinct rows, then there must exist a block Cj for which the entries in block Ri ∪ Cj are not all the same. Thus, for each row group, all the rows in that group are the same. Now, for each column-row face, consider the leftmost r blocks, R1 ∪ C1 , R2 ∪ C1 , · · · , Rr ∪ C1 . There are at most r possible values in each block, because we have r distinct rows in total. Overall the total number of possibilities for the leftmost r blocks is at most (r)r = 2O(r log r) . Once the leftmost r blocks are determined, the remaining r(r − 1) are also determined. This completes the proof. Also, notice that there is an example that has 2Ω(r log r) distinct column-row faces. For the bottom column-row faces, there are r × r blocks for which all the blocks have the same size, the blocks on the diagonal have all 1s, and all the other blocks contain 0s everywhere. For the later column-row faces, we can arbitrarily permute this block diagonal matrix, and the total number of possibilities is Ω(r!) ≥ 2Ω(r log r) . 143 H Hardness We first provide definitions and results for some fundamental problems in Section H.1. Section H.2 presents our hardness result for the symmetric tensor eigenvalue problem. Section H.3 presents our hardness results for symmetric tensor singular value problems, computing tensor spectral norm, and rank-1 approximation. We improve Håstad’s NP-hardness[Hås90] result for tensor rank in Section H.4. We also show a better hardness result for robust subspace approximation in Section H.5. Finally, we discuss several other tensor hardness results that are implied by matrix hardness results in Section H.6. H.1 Definitions We first provide the definitions for 3SAT , ETH , MAX-3SAT , MAX-E3SAT and then state some fundamental results related to those definitions. Definition H.1 (3SAT problem). Given n variables and m clauses in a conjunctive normal form CNF formula with the size of each clause at most 3, the goal is to decide whether there exists an assignment to the n Boolean variables to make the CNF formula be satisfied. Hypothesis H.2 (Exponential Time Hypothesis (ETH) [IPZ98]). There is a δ > 0 such that the 3SAT problem defined in Definition H.1 cannot be solved in O(2δn ) time. Definition H.3 (MAX-3SAT). Given n variables and m clauses, a conjunctive normal form CNF formula with the size of each clause at most 3, the goal is to find an assignment that satisfies the largest number of clauses. We use MAX-E3SAT to denote the version of MAX-3SAT where each clause contains exactly 3 literals. Theorem H.4 ([Hås01]). For every δ > 0, it is NP-hard to distinguish a satisfiable instance of MAX-E3SAT from an instance where at most a 7/8 + δ fraction of the clauses can be simultaneously satisfied. 1−o(1) ) time Theorem H.5 ([Hås01, MR10]). Assume ETH holds. For every δ > 0, there is no 2o(n algorithm to distinguish a satisfiable instance of MAX-E3SAT from an instance where at most a fraction 7/8 + δ of the clauses can be simultaneously satisfied. We use MAX-E3SAT(B) to denote the restricted special case of MAX-3SAT where every variable occurs in at most B clauses. Håstad [Hås00] proved that the problem is approximable to within a factor 7/8 + 1/(64B) in polynomial time, and that it is hard to approximate within a factor 7/8 + 1/(log B)Ω(1) . In 2001, Trevisan improved the hardness result, √ Theorem H.6 ([Tre01]). Unless RP=NP, there is no polynomial time (7/8 + 5/ B)-approximate algorithm for MAX-E3SAT(B) . √ 1−o(1) ) Theorem H.7 ([Hås01, Tre01, MR10]). Unless ETH fails, there is no 2o(n time (7/8+5/ B)approximate algorithm for MAX-E3SAT(B) . Theorem H.8 ([LMS11]). Unless ETH fails, there is no 2o(n) time algorithm for the Independent Set problem. Definition H.9 (MAX-CUT decision problem). Given a positive integer c∗ and an unweighted graph G = (V, E) where V is the set of vertices of G and E is the set of edges of G, the goal is to determine whether there is a cut of G that has at least c∗ edges. 144 Note that Feige’s original assumption[Fei02] states that there is no polynomial time algorithm for the problem in Assumption H.10. We do not know of any better algorithm for the problem in Assumption H.10 and have consulted several experts12 about the assumption who do not know a counterexample to it. Assumption H.10 (Random Exponential Time Hypothesis). Let c > ln 2 be a constant. Consider a random 3SAT formula on n variables in which each clause has 3 literals, and in which each of the 8n3 clauses is picked independently with probability c/n2 . Then any algorithm which always outputs 1 when the random formula is satisfiable, and outputs 0 with probability at least 1/2 when the random 0 formula is unsatisfiable, must run in 2c n time on some input, where c0 > 0 is an absolute constant. The 4SAT-version of the above random-ETH assumption has been used in [GL04] and [RSW16] (Assumption 1.3). H.2 Symmetric tensor eigenvalue Definition H.11 (Tensor Eigenvalue [HL13]). An eigenvector of a tensor A ∈ Rn×n×n is a nonzero vector x ∈ Rn such that n X n X i=1 j=1 Ai,j,k xi xj = λxk , ∀k ∈ [n] for some λ ∈ R, which is called an eigenvalue of A. Theorem H.12 ([N+ 03]). Let G = (V, E) on v vertices have stability number (the size of a maximum independent set) α(G). Let n = v + v(v−1) and Sn−1 = {(x, y) ∈ Rv ×Rv(v−1)/2 : kxk22 +kyk22 = 2 1}. Then, s X p 1 1− = 3 3/2 max xi xj yi,j . α(G) (x,y)∈Sn−1 i<j,(i,j)∈E / For any graph G(V, E), we can construct a symmetric tensor A ∈ Rn×n×n . For any 1 ≤ i < j < k ≤ v, let ( 1 1 ≤ i < j ≤ v, k = v + φ(i, j), (i, j) ∈ / E, Ai,j,k = 0 otherwise, where φ(i, j) = (i − 1)v − i(i − 1)/2 + j − i is a lexicographical enumeration of the v(v − 1)/2 pairs i < j. For the other cases i < k < j, · · · , k < j < i, we set Ai,j,k = Ai,k,j = Aj,i,k = Aj,k,i = Ak,i,j = Ak,j,i . If two or more indices are equal, we set Ai,j,k = 0. Thus tensor T has the following property, A(z, z, z) = 6 X xi xj yi,j , i<j,(i,j)∈E / where z = (x, y) ∈ Rn . 12 Personal communication with Russell Impagliazzo and Ryan Williams. 145 Thus, we have λ = max A(z, z, z) = z∈Sn−1 max (x,y)∈Sn−1 6 X xi xj yi,j . i<j,(i,j)∈E / Furthermore, λ is the maximum eigenvalue of A. √ Theorem H.13. Unless ETH fails, there is no 2o( n) time to approximate the largest eigenvalue of an n-dimensional symmetric tensor within (1 ± Θ(1/n)) relative error. Proof. The additive error is at least p p 1 − 1/v − 1 − 1/(v − 1) = p 1/(v − 1) − 1/v p & 1/(v − 1) − 1/v ≥ 1/v 2 . 1 − 1/v + 1 − 1/(v − 1) Thus, the relative error is (1 ± Θ(1/v 2 )). By the definition of n, we know n = Θ(v 2 ). Assuming ETH , there is no 2o(v) time algorithm to compute the clique number of G. Because the clique number of G is α(G), there is no 2o(v) time algorithm to compute α(G). Furthermore, there is no 2o(v) time algorithm to approximate the maximum eigenvalue within (1 ± Θ(1/v 2 )) relative error. Thus, we complete the proof. Corollary H.14. Unless ETH fails, there is no polynomial running time algorithm to approximate the largest eigenvalue of an n-dimensional tensor within (1 ± Θ(1/ log2+γ (n))) relative-error, where γ > 0 is an arbitrarily small constant. Proof. We can apply a padding argument here. According to Theorem H.13, there is a d-dimensional √ tensor such that there is no 2o( d) time algorithm that can give a (1 + Θ(1/d)) relative error 0 d(1−γ )/2 , where approximation. If we pad 0s everywhere to extend the size √ of the tensor to 0n = 2 γ 0 > 0 is a sufficiently small constant, then poly(n) = 2o( d) , so d = log2+O(γ ) (n). Thus, it means that there is no polynomial running time algorithm which can output a (1 + 1/(log2+γ ))-relative approximation to the tensor which has size n. H.3 Symmetric tensor singular value, spectral norm and rank-1 approximation [HL13] defines two kinds of singular values of a tensor. In this paper, we only consider the following kind: Definition H.15 (`2 singular value in [HL13]). Given a 3rd order tensor A ∈ Rn1 ×n2 ×n3 , the number σ ∈ R is called a singular value and the nonzero u ∈ Rn1 ,v ∈ Rn2 ,w ∈ Rn3 are called singular vectors of A if n2 X n3 X j=1 k=1 n1 X n3 X Ai,j,k vj wk = σui , ∀i ∈ [n1 ] Ai,j,k ui wk = σvj , ∀j ∈ [n2 ] i=1 k=1 n1 X n2 X i=1 j=1 Ai,j,k ui vj = σwk , ∀k ∈ [n3 ]. 146 Definition H.16 (Spectral norm [HL13]). The spectral norm of a tensor A is: |A(x, y, z)| x,y,z6=0 kxk2 kyk2 kzk2 kAk2 = sup Notice that the spectral norm is the absolute value of either the maximum value of kxkA(x,y,z) 2 kyk2 kzk2 or the minimum value of it. Thus, it is an `2 -singular value of A. Furthermore, it is the maximum `2 -singular value of A. Theorem H.17 ([Ban38]). Let A ∈ Rn×n×n be a symmetric 3rd order tensor. Then, A(x, y, z) |A(x, x, x)| . = sup kxk32 x,y,z6=0 kxk2 kyk2 kzk2 x6=0 kAk2 = sup It means that if a tensor is symmetric, then its largest eigenvalue is the same as its largest singular value and its spectral norm. Then, by combining with Theorem H.13, we have the following corollary: Corollary H.18. Unless ETH fails, √ 1. There is no 2o( n) time algorithm to approximate the largest singular value of an n-dimensional symmetric tensor within (1 + Θ(1/n)) relative-error. √ 2. There is no 2o( n) time algorithm to approximate the spectral norm of an n-dimensional symmetric tensor within (1 + Θ(1/n)) relative-error. By Corollary H.14, we have: Corollary H.19. Unless ETH fails, 1. There is no polynomial time algorithm to approximate the largest singular value of an ndimensional tensor within (1 + Θ(1/ log2+γ (n))) relative-error, where γ > 0 is an arbitrarily small constant. 2. There is no polynomial time algorithm to approximate the spectral norm of an n-dimensional tensor within (1+Θ(1/ log2+γ (n))) relative-error, where γ > 0 is an arbitrarily small constant. Now, let us consider Frobenius norm rank-1 approximation. Theorem H.20 ([Ban38]). Let A ∈ Rn×n×n be a symmetric 3rd order tensor. Then, min σ≥0,kuk2 =kvk2 =kwk2 =1 kA − σu ⊗ v ⊗ wkF = min λ≥0,kvk2 =1 kA − λv ⊗ v ⊗ vkF . Furthermore, the optimal σ and λ may be chosen to be equal. Notice that kA − σu ⊗ v ⊗ wk2F = kAk2F − 2σA(u, v, w) + σ 2 ku ⊗ v ⊗ wk2F . Then, if kuk2 = kvk2 = kwk2 = 1, we have: kA − σu ⊗ v ⊗ wk2F = kAk2F − 2σA(u, v, w) + σ 2 . When A(u, v, w) = σ, then the above is minimized. Thus, we have: min σ≥0,kuk2 =kvk2 =kwk2 =1 kA − σu ⊗ v ⊗ wk2F + kAk22 = kAk2F . It is sufficient to prove the following theorem: 147 √ Theorem H.21. Given A ∈ Rn×n×n , unless ETH fails, there is no 2o( u0 , v 0 , w0 ∈ Rn such that kA − u0 ⊗ v 0 ⊗ w0 k2F ≤ (1 + ) min u,v,w∈Rn n) time algorithm to compute kA − u ⊗ v ⊗ wk2F , where  = O(1/n2 ). Proof. Let A ∈ Rn×n×n be the same hard instance mentioned in Theorem H.12. Notice that 2 each entry of A is either 0 or 1. Thus, minu,v,w∈Rn kA − u ⊗ v ⊗ wk2F ≤ kAk Notice that p F. p Theorem p H.12 also 2 2/3 · 1 − 1/c or p implies that it is hard to distinguish the two cases kAk2 ≤√ 2/3 · p 1 − 1/(c + 1) wherepc is anp integer which is no greater than n. So the difference kAk2 ≥ 2 p between (2 2/3 · 1 − 1/c)2 and (2 2/3 · 1 − 1/(c + 1))2 is at least Θ(1/n). Since kAk2F is at most n (see construction of A in the proof of Lemma H.12), Θ(1/n) is an  = O(1/n2 ) fraction of minu,v,w∈Rn kA − u ⊗ v ⊗ wk2F . Because min u,v,w∈Rn √ if we have a 2o( n) kA − u ⊗ v ⊗ wk2F + kAk22 = kAk2F , time algorithm to compute u0 , v 0 , w0 ∈ Rn such that kA − u0 ⊗ v 0 ⊗ w0 k2F ≤ (1 + ) min u,v,w∈Rn kA − u ⊗ v ⊗ wk2F 2 for the fact that we cannot distinguish whether kAk2 ≤ 2 p  = O(1/n ), it will p contradict p 1 − 1/c or kAk2 ≥ 2 2/3 · 1 − 1/(c + 1). p 2/3 · Corollary H.22. Given A ∈ Rn×n×n , unless ETH fails, for any  for which 12 ≥  ≥ c/n2 where c −1/4 ) is any constant, there is no 2o( time algorithm to compute u0 , v 0 , w0 ∈ Rn such that kA − u0 ⊗ v 0 ⊗ w0 k2F ≤ (1 + ) min u,v,w∈Rn kA − u ⊗ v ⊗ wk2F . √ Proof. If  = Ω(1/n2 ), it means that n = Ω(1/ ). Then, we can construct a hard instance B √ with size m × m × m where m = Θ(1/ ), and we can put B into A, and let A have zero entries −1/2 ) −1/4 ) elsewhere. Since B is hard, i.e., there is no 2o(m = 2o( running time to compute a rank-1 −1/4 o( ) approximation to B, this means there is no 2 running time algorithm to find an approximate rank-1 approximation to A. Corollary H.23. Unless ETH fails, there is no polynomial time algorithm to approximate the best rank-1 approximation of an n-dimensional tensor within (1 + Θ(1/ log2+γ (n))) relative-error, where γ > 0 is an arbitrarily small constant. Proof. We can apply a padding √ argument here. According to Theorem H.21, there is a d-dimensional o( tensor such that there is no 2 d) time algorithm which can give a (1 + Θ(1/d4 )) relative approxi0 d(1−γ )/2 where mation. Then, if we pad with 0s everywhere to extend the size of the tensor to n = 2 √ 0 γ 0 > 0 is a sufficiently small constant, then poly(n) = 2o( d) , and d4 = log2+O(γ ) (n). Thus, it means that there is no polynomial time algorithm which can output a (1 + 1/(log2+γ ))-relative error approximation to the tensor which has size n. H.4 Tensor rank is hard to approximate This section presents the hardness result for approximating tensor rank under ETH . According to our new result, we notice that not only deciding the tensor rank is a hard problem, but also approximating the tensor rank is a hard problem. This therefore strengthens Håstad’s NP-Hadness [Hås90] for computing tensor rank. 148 x1 C1 x2 C2 x3 C3 x4 C4 x5 C5 x6 C6 x7 C7 C8 C9 C10 Figure 10: Cover number. For a 3SAT instance with n variables and m clauses, we can draw a bipartite graph which has n nodes on the left and m nodes on the right. Each node (blue) on the left corresponds to a variable xi , each node (green) on the right corresponds to a clause Cj . If either xi or xi belongs to clause Cj , then we draw a line between these two nodes. Consider an input string y ∈ {0, 1}7 . There exists some unsatisfied clauses with respect to this input string y. For for example, let C1 , C2 and C3 denote those unsatisfied clauses. We want to pick a smallest set of nodes on the left partition of the graph to guarantee that for each unsatisfied clause in the right partition, there exists a node on the left to cover it. The cover number is defined to be the smallest such number over all possible input strings. H.4.1 Cover number Before getting into the details of the reduction, we provide a definition of an important concept called the “cover number” and discuss the cover number for the MAX-E3SAT(B) problem. Definition H.24 (Cover number). For any 3SAT instance S with n variables and m clauses, we are allowed to assign one of three values {0, 1, ∗} to each variable. For each clause, if one of the literals outputs true, then the clause outputs true. For each clause, if the corresponding variable of one of the literals is assigned to ∗, then the clause outputs true. We say y ∈ {0, 1}n is a string, and z ∈ {0, 1, ∗}n is a star string. For an instance S, if there exists a string y ∈ {0, 1}n that causes all the clauses to be true, then we say that S is satisfiable, otherwise it is unsatisfiable. For an instance S, let ZS denote the set of star strings which cause all of the clauses of S to be true. For each star string z ∈ {0, 1, ∗}n , let star(z) denote the number of ∗s in the star-string z. We define the “cover number” of instance S to be cover-number(S) = min star(z). z∈ZS Notice that for a satisfiable 3SAT instance S, the cover number p is 0. Also, for any unsatisfiable 3SAT instance S, the cover number p is at least 1. This is because for any input string, there exists at least one clause which cannot be satisfied. To fix that clause, we have to assign ∗ to a variable 149 belonging to that clause. (Assigning ∗ to a variable can be regarded as assigning both 0 and 1 to a variable) Lemma H.25. Let S denote a MAX-E3SAT(B) instance with n variables and m clauses and S suppose S is at most 7/8 + A satisfiable, where A ∈ (0, 1/8). Then the cover number of S is at least (1/8 − A)m/B. Proof. For any input string y ∈ {0, 1}n , there exists at least (1/8 − A)m clauses which are not satisfied. Since each variable appears in at most B clauses, we need to assign ∗ to at least (1/8 − A)m/B variables. Thus, the cover number of S is at least (1/8 − A)m/B. We say x1 , x2 , · · · , xn are variables and x1 , x1 , x2 , x2 , · · · , xn , xn are literals. Definition H.26. For a list of clauses C and a set of variables P , if for each clause, there exists at least one literal such that the corresponding variable of that literal belongs to P , then we say P covers L. H.4.2 Properties of 3SAT instances Fact H.27. For any 3SAT instance S with n variables and m = Θ(n) clauses, let c > 0 denote a constant. If S is (1−c)m satisfiable, then let y ∈ {0, 1}n denote a string for which S has the smallest number of unsatisfiable clauses. Let T denote the set of unsatisfiable clauses and let b denote the number of variables in T . Then Ω((cm)1/3 ) ≤ b ≤ O(cm). Proof. Note that in S, there is no duplicate clause. Let T denote the set of unsatisfiable clauses by assigning string y to S. First, we can show that any two literals xi , xi cannot belong to T at the same time. If xi and xi belong to the same clause, then that clause must be an “always” satisfiable clause. If xi and xi belong to different clauses, then one of the clauses must be satisfiable. This contradicts the fact that that clause belongs to T . Thus, we can assume that literals x1 , x2 , · · · , xb belong to T . There are two extreme cases: one is that each clause only contains three literals and each literal appears in exactly one clause in T . Then b = 3cm. The other case is that each clause contains 3 literals, and each literal appears in as many clauses as possible. Then 3b = cm, which gives b = Θ((cm)1/3 ). Lemma H.28. For a random 3SAT instance, with probability 1 − 2−Ω(log n log log n) there is no literal appearing in at least log n clauses. Proof. By the property of random 3SAT , for any literal x and any clause C, the probability that x 3 3 appears in C is 2n , i.e., Pr[x ∈ C] = 2n = Θ(1/n). Let p denote this probability. For any literal x, 150 the probability of x appearing in at least log n clauses (out of m clauses) is Pr[ x appearing in ≥ log n clauses ] m   X m i = p (1 − p)m−i i i=log n m   X X m m i pi (1 − p)m−i + p (1 − p)m−i i i m/2 = i=log n i=m/2 m   X X m i i i (em/i) p + p i m/2 ≤ i=log n i=m/2   m by (1 − p) ≤ 1, ≤ (em/i)i i ≤ (Θ(1/ log n))log n + 2 · (2e)m/2 · Θ(1/n)m/2 ≤ 2−Ω(log n·log log n) . Taking a union bound over all the literals, we complete the proof, Pr[ @ x appearing in ≥ log n clauses ] ≥ 1 − 2−Ω(log n log log n) . Lemma H.29. For a sufficiently large constant c0 > 0 and a constant c > 0, for any random 3SAT instance which has n variables and m = c0 n clauses, suppose it is (1 − c)m satisfiable. Then with probability 1 − 2−Ω(log n log log n) , for all input strings y, among the unsatisfied clauses, each literal appears in O(log n) places. Proof. This follows by Lemma H.28. Next, we show how to reduce the O(log n) to O(1). Lemma H.30. For a sufficiently large constant c, for any random 3SAT instance that has n variables 9m , there exist and m = cn clauses, for any constant B ≥ 1, b ∈ (0, 1), with probability at least 1 − Bbn at least (1 − b)m clauses such that each variable (in these (1 − b)m clauses) only appears in at most B clauses (out of these (1 − b)m clauses). Proof. For each i ∈ [m], we use zi to denote the indicator variable such that it is 1, if for each variable in the ith clause, it appears in at most a clauses. Let B ∈ [1, ∞) denote a sufficiently large constant, which we will decide upon later. For each variable x, the probability of it appearing in the i-th clause is n3 . Then we have E[ # clauses that contain x] = m X i=1 E[i-th clause contains x] = 3m n By Markov’s inequality, Pr[ # clauses that contain x ≥ a] ≤ E[ # clauses that contain x]/B = 151 3m Bn By a union bound, we can compute E[zi ] , E[zi ] = Pr[zi = 1] ≥ 1 − 3 Pr[ one variable in i-th clause appearing ≥ B clauses ] 9m ≥ 1− . Bn Furthermore, we have E[z] = E[ m X i=1 zi ] = m X i=1 E[zi ] ≥ (1 − 9m )m. Bn Note that z ≤ m. Thus E[z] ≤ m. Let b ∈ (0, 1) denote a sufficiently small constant. We can show E[m − z] bm m − E[z] = bm 9m m − (1 − Bn )m ≤ bm 9m = . Bbn Pr[m − z ≥ bm] ≤ 9m , we have m − z ≤ bm. Notice that in randomThis implies that with probability at least 1 − Bbn ETH , m = cn for a constant c. Thus, by choosing a sufficiently large constant B (which is a function of c, b), we can obtain arbitrarily large constant success probability. H.4.3 Reduction We reduce 3SAT to tensor rank by following the same construction in [Hås90]. To obtain a stronger hardness result, we use the property that each variable only appears in at most B (some constant) clauses and that the cover number of an unsatisfiable 3SAT instance is large. Note that both MAXE3SAT(B) instances and random-ETH instances have that property. Also each MAX-E3SAT(B) is also a 3SAT instance. Thus if the reduction holds for 3SAT , it also holds for MAX-E3SAT(B) , and similarly for random-ETH . Recall the definition of 3SAT : 3SAT is the problem of given a Boolean formula of n variables in CNF form with at most 3 variables in each of the m clauses, is it possible to find a satisfying assignment to the formula? We say x1 , x2 , · · · , xn are variables and x1 , x1 , x2 , x2 , · · · , xn , xn are literals. We transform this to the problem of computing the rank of a tensor of size n1 × n2 × n3 where n1 = 2 + n + 2m, n2 = 3n and n3 = 3n + m. T has the following n3 column-row faces, where each of the faces is an m1 × n2 matrix, • n variable matrices Vi ∈ Rn1 ×n2 . It has a 1 in positions (1, 2i − 1) and (2, 2i) while all other elements are 0. • n help matrices Si ∈ Rn1 ×n2 . It has a 1 position in (1, 2n + i) and is 0 otherwise. • n help matrices Mi ∈ Rn1 ×n2 . It has a 1 in positions (1, 2i − 1), (2 + i, 2i) and (2 + i, 2n + i) and is 0 otherwise. 152 2n 2 n 2n 1 n 2m 2m 2i − 1 2i 2n + i Si 2n 2 n 1 2 1 n Vi n n 2n 1 2 1 n ul,1 n 1 ul,1 − ul,2 ul,1 − ul,3 2m Mi 2m 2i − 1 2i 2n + i Cl Figure 11: There are 3n + m column-row faces, Vi , ∀i ∈ [n], Si , ∀i ∈ [n], Mi , ∀i ∈ [n], Cl , ∀l ∈ [m]. In face Cl , each ul,j is either xi or xi where xi = e2i−1 and xi = e2i−1 + e2i . • m clause matrices Cl ∈ Rn1 ×n2 . Suppose the clause cl contains the literals ul,1 , ul,2 and ul,3 . For each j ∈ [3], ul,j ∈ {x1 , x2 , · · · , xn , x1 , x2 , · · · , xn }. Note that xi , xi are the literals of the 3SAT formula. We can also think of xi , xi as length 3n vectors. Let xi denote the vector that has a 1 in position 2i − 1, i.e., xi = e2i−1 . Let xi denote the vector that has a 1 in positions 2i − 1 and 2i, xi = e2i−1 + e2i . – Row 1 is the vector ul,1 ∈ R3n , – Row 2 + n + 2l − 1 is the vector ul,1 − ul,2 ∈ R3n , – Row 2 + n + 2l is the vector ul,1 − ul,3 ∈ R3n . 153 First, we can obtain Lemma H.31 which follows by Lemma 2 in [Hås90]. For completeness, we provide a proof. Lemma H.31. If the formula is satisfiable, then the constructed tensor has rank at most 4n + 2m. (1) (2) (1) (1) (1) Proof. We will construct 4n + 2m rank-1 matrices Vi , Vi , Si , Mi , Cl goal is to show that for each matrix in the set (2) and Cl . Then the {V1 , V2 , · · · , Vn , S1 , S2 , · · · , Sn , M1 , M2 , · · · , Mn , C1 , C2 , · · · , Cm }, it can be written as a linear combination of these constructed matrices. (1) (2) (1) • Matrices Vi and Vi . Vi has the first row equal to xi iff αi = 1 and otherwise xi . All the (2) (1) other rows are 0. We set Vi = Vi − Vi . (1) (1) • Matrices Si . Si = Si . (1) • Matrices Mi . (1) Mi (1) = ( (1) Mi − Vi Mi − (1) Vi if αi = 1 − Si if αi = 0 (2) • Matrices Cl and Cl . Let xi = αi be the assignment that makes the clause cl true. Then (1) Cl − Vi has rank 2, since either it has just two nonzero rows (in the case where xi is the first variable in the clause) or it has three nonzero rows of which two are equal. In both cases we just need two additional rank 1 matrices. Once the 3SAT instance S is unsatisfiable, then its cover number is at least 1. For each unsatisfiable 3SAT instance S with cover number p, we can show that the constructed tensor has rank at most 4n + 2m + O(p) and also has rank at least 4n + 2m + Ω(p). We first prove an upper bound, Lemma H.32. For a 3SAT instance S, let y ∈ {0, 1} denote a string such that S(y) has a set L that contains unsatisfiable clauses. Let p denote the smallest number of variables that cover all clauses in L. Then the constructed tensor T has rank at most 4n + 2m + p. Proof. Let y denote a length-n Boolean string (α1 , α2 , · · · , αn ). Based on the assignment y, all the clauses of S can be split into two sets: L contains all the unsatisfied clauses and L contains all the satisfied clauses. We use set P to denote a set of variables that covers all the clauses in set L. Let (1) (2) (1) (1) (1) (2) p = |P |. We will construct 4n + 2m + p rank-1 matrices Vi , Vi , Si , Mi , ∀i ∈ [n], Cl , Cl , (3) ∀l ∈ [m], and Vj , ∀j ∈ P . Then the goal is to show that the Vi , Si , Mi and Cl can be written as linear combinations of these constructed matrices. (1) (2) (1) • Matrices Vi and Vi . Vi has first row equal to xi iff αi = 1 and otherwise xi . All the (2) (1) other rows are 0. We set Vi = Vi − Vi . (3) (3) • Matrices Vj . For each j ∈ P , Vj (1) (1) • Matrices Si . Si has the first row equal to xi iff αi = 0 and otherwise xi . = Si . 154 2n 2 n 1 2n 2 n 2n 2 1 n n n 2m 2m 2m (1) Vi 2i − 1 (2) 2n 2 2i Vi xi = 1 (1) 2n −1 1 1 2m 2m 2m (2) 2i Vi xi = 0 (1) Mi xi = 0 n −1 n 2i − 1 2i 2n + i 2 n (1) xi = 1 2n n Vi 1 2i n −1 1 2 1 Mi xi = 1 n 1 1 n (1) 2i xi = 0 2n + i (1) Figure 12: Two possibilities for Vi , ∀i ∈ [n], V (2) , ∀i ∈ [n], Mi , ∀i ∈ [n]. (1) • Matrices Mi . (1) Mi (1) • Matrices Cl = ( (1) Mi − V i Mi − (1) Vi if αi = 1 − Si if αi = 0 (2) and Cl . – For each l ∈ / L, clause cl is satisfied according to assignment y. Let xi = αi be the (1) assignment that makes the clause cl true. Then Cl − Vi has rank 2, since either it has just two nonzero rows (in the case where xi is the first variables in the clause) or it has three nonzero rows of which two are equal. In both cases we just need two additional rank 1 matrices. – For each l ∈ L. It means clause cl is unsatisfied according to assignment y. Let xj1 = αj1 , xj2 = αj2 , xj3 = αj3 be an assignment that makes the clause cl false. In other words, one of j1 , j2 , j3 must be P according to the definition that P covers L. Then matrix (3) Cl − Vj1 has rank 2, since either it has just two nonzero rows (in the case where xj1 is the first variables in the clause) or it has three nonzero rows of which two are equal. In both cases we just need two additional rank 1 matrices. 155 2n Vei , i ∈ [n] n 1 1 1 Sei , i ∈ [n] fi , i ∈ [n] M el , l ∈ [m] C 1 βi,1 βi,1 βi,2 βi,2 (1 + γl,1 + γl,2 )ul,1 − γl,1 ul,2 − γl,2 ul,3 (γl,3 + γl,4 )ul,1 − γl,3 ul,2 − γl,4 ul,3 2n + i 2i-1 2i fi ,C el . Figure 13: Vei ,Sei ,M We finish the proof by taking the P that has the smallest size. Further, we have: Corollary H.33. For a 3SAT instance S, let p denote the cover number of S, then the constructed tensor T has rank at most 4n + 2m + p. Proof. This follows by applying Lemma H.32 to all the input strings and the definition of cover number (Definition H.24). We can split the tensor T ∈ R(2+n+3m)×3n×(3n+m) into two sub-tensors, one is T1 ∈ R2×3n×(3n+m) (that contains the first two row-tube faces of T and linear combination of the remaining 2m rowtube faces of T ), and the other is T2 ∈ R(n+2m)×3n×(3n+m) (that contains the next n + 2m row-tube faces of T ). We first analyze the rank of T1 and then analyze the rank of T2 . Claim H.34. The rank of T2 is n + 2m. Proof. According to Figure 11, the nonzero rows are distributed in n+m fully separated sub-tensors. It is obvious that the rank of each one of those n sub-tensors is 1, and the rank of each of those m sub-tensors is 2. Thus, overall, the rank T2 is n + 2m. To make sure rank(T ) = rank(T1 ) + rank(T2 ), the T1 ∈ R2×3n×(3n+m) can be described as the following 3n + m column-row faces, and each of the faces is a 2 × 3n matrix. • Matrices Vei , ∀i ∈ [n]. The two rows are from the first two rows of Vi in Figure 11, i.e., the first row is e2i−1 and the second row is e2i . • Matrices Sei , ∀i ∈ [n]. The two rows are from the first two rows of Si in Figure 11, i.e., the first row is e2n+i and the second row is zero everywhere else. fi , ∀i ∈ [n]. The first row is e2i−1 + βi,1 (e2i + e2n+i ), while the second row is • Matrices M βi,2 (e2i + e2n+i ). el , ∀i ∈ [m]. The first row is (1 + γl,1 + γl,2 )ul,1 − γl,1 ul,2 − γl,2 ul,3 and the second is • Matrices C (γl,3 + γl,4 )ul,1 − γl,3 ul,2 − γl,4 ul,3 , 156 p 2n Ai , i ∈ [n] An+i , i ∈ [p] 1 unknown 1 1 βi,1 unknown βi,2 βi,2 2n + i 2i-1 2i p n B2i−1 , i ∈ [p] B2i , i ∈ [p] 1 1 βi,1 βi,2 1 1 B2i−1 , i ∈ [n]\[p] B2i , i ∈ [n]\[p] 1 unknown B2n+i , i ∈ [p] βi,2 i(≤ p) i(> p) n+i Figure 14: There are n + p matrices Ai ∈ R2×(2n+p) , ∀i ∈ [n + p] and 2n + p matrices Bi ∈ R2×(n+p) , ∀i ∈ [2n + p]. Tensor A and tensor B represet the same tensor, and for each i ∈ [n + p], j ∈ [2], l ∈ [2n + p], (Ai )j,l = (Bl )j,i . where for each i ∈ [3n], we use vector ei to denote a length 3n vector such that it only has a 1 in position i and 0 otherwise. β, γ are variables. The goal is to show a lower bound for, rank(T1 ). β,γ fi is nonzero, ∀i ∈ [n]}. Then Lemma H.35. Let P denote the set {i | the second row of matrix M the rank of T1 is at least 3n + |P |. Proof. We define p = |P |. Without loss of generality, we assume that for each i ∈ [p], the second fi is nonzero. row of matrix M fi have size 2 × 3n, but we only focus on the first 2n + p columns. Notice that matrices Vei , Sei , M Thus, we have n + p column-row faces (from the 3rd dimension) Aj ∈ R2×(2n+p) , P • Aj , 1 ≤ j ≤ n, Aj is the first 2n + p columns of Vej − ni=1 αi,j Sei ∈ R2×3n , where αi,j are some coefficients. fj − Pn αi,n+j Sei ∈ R2×3n , where αi,j • An+j , 1 ≤ j ≤ p, Aj is the first 2n + p columns of M i=1 are some coefficients. Consider the first 2n + p column-tube faces (from 2nd dimension), Bj , ∀j ∈ [2n + p], of T1 . Notice that these matrices have size 2 × (n + p). • B2i−1 , 1 ≤ i ≤ p, it has a 1 in positions (1, i) and (1, n + i). • B2i , 1 ≤ i ≤ p, it has βi,1 in position (1, n + i), 1 in position (2, i) and βi,2 in position (2, n + i). • B2i−1 , p + 1 ≤ i ≤ n, it has 1 in position (1, i). 157 • B2i , p + 1 ≤ i ≤ n, it has 1 in position (2, i). • B2n+i , 1 ≤ i ≤ p, the first row is unknown, the second row has βi,2 in position in (2, n + i). It is obvious that the first 2n matrices are linearly independent, thus the rank is at least 2n. We choose the first 2n matrices as our basis. For B2n+1 , we try to write it as a linear combination of the first 2n matrices {Bi }i∈[2n] . Consider the second row of B2n+1 . The first n positions are all 0. The matrices B2i all have disjoint support for the second row of the first n columns. Thus, the matrices B2i should not be used. Consider the second row of B2i−1 , ∀i ∈ [n]. None of them has a nonzero value in position n + 1. Thus B2n+1 cannot be written as a linear combination of of the first 2n matrices. Thus, we can show for any i ∈ [p], B2n+i cannot be written as a linear combination of matrices {Bi }i∈[2n] . Consider the p matrices {B2n+i }i∈[p] . Each of them has a different nonzero position in the second row. Thus these matrices are all linearly independent. Putting it all together, we know that the rank of matrices {Bi }i∈[2n+p] is at least 2n + p. Next, we consider another special case when βi,2 = 0, for all i ∈ [n]. If we subtract βi,1 times Sei fi and leave the other column-row faces (from the 3rd dimension) as they are, and we make from M all column-tube faces(from the 2nd dimension) for j > 2n identically 0, then all other choices do not change the first 2n column-tube faces (from the 2nd dimension) and make some other column-tube faces (from the 2nd dimension) nonzero. Such a choice could clearly only increase the rank of T . Thus, we obtain, rank(T ) = 2n + 2m + min rank(T3 ), where T3 is a tensor of size 2 × 2n × (2n + m) given by the following column-row faces (from 3rd dimension) Ai , ∀i ∈ [2n + m] and each matrix has size 2 × 2n (shown in Figure 15). • Ai , i ∈ [n], the first 2n columns of Vei . fi . The first row is e2i−1 + βi,1 e2i , and the second row • An+i , i ∈ [n], the first 2n columns of M is 0. el . The first row is (1+γl,1 +γl,2 )ul,1 −γl,1 ul,2 −γl,2 ul,3 , • A2n+l , l ∈ [m], the first 2n columns of C and the second row is (γl,3 + γl,4 )ul,1 − γl,3 ul,2 − γl,4 ul,3 . We can show Lemma H.36. Let p denote the cover number of the 3SAT instance. T3 has rank at least 2n + Ω(p). Proof. First, we can show that all matrices An+i − Ai and An+i (for all i ∈ [n] ) are in the expansion of tensor T3 . Thus, the rank of T3 is at least 2n. We need the following claim: Claim H.37. For any l ∈ [m], if A2n+l can be written as a linear combination of {An+i − Ai }i∈[n] and {An+i }i∈[n] , then the second row of A2n+l is 0, and the first row of one of the An+i is ui where ui is one of the literals appearing in clause cl . Proof. We prove this for the second row first. For each l ∈ [m], we consider the possibility of using all matrices An+i − Ai and An+i to express matrix A2n+l . If the second row of A2n+l is nonzero, then it must have a nonzero entry in an odd position. But there is no nonzero in an odd position of the second row of any of matrices An+i − Ai and An+i . 158 2n Ai , i ∈ [n] An+i , i ∈ [n] 1 1 1 βi,1 (1 + γl,1 + γl,2 )ul,1 − γl,1 ul,2 − γl,2 ul,3 A2n+l , l ∈ [m] (γl,3 + γl,4 )ul,1 − γl,3 ul,2 − γl,4 ul,3 2i-1 2i Figure 15: For any i ∈ [n], βi,1 ∈ R, for any l ∈ [m], γl,1 , γl,2 ∈ R, for any l ∈ [m], if the first literal of clause l is xj , then row vector ul,1 = e2i−1 ∈ R2n ; if the first literal of clause l is xj , then row vector ul,1 = e2i−1 + e2i ∈ R2n . For the first row. It is obvious that the first row of A2n+l must have at least one nonzero position, for any γl,1 , γl,2 . Let uj be a literal belonging to the variable xi which appears in the first row of A2n+l with a nonzero coefficient. Since only An+i of all the other An+s , ∀s ∈ [n] matrices has nonzero elements in either of the positions (1, 2i − 1) or (1, 2i), then An+i must be used to cancel these elements. Thus, the first row of An+i must be a multiple of uj and since the element in position (1, 2i − 1) of An+i is 1, this multiple must be 1. Note that matrices Ai , ∀i ∈ [n] have the property that, for any matrix in {An+1 , · · · , A2n+m }, it e ∈ R(n+m)×2n denote a cannot be written as the linear combination of matrices Ai , ∀i ∈ [n]. Let A matrix that consists of the first rows of {An+1 , · · · , A2n+m }. According to the property of matrices Ai , ∀i ∈ [n], and that the rank of a tensor is always greater than or equal to the rank of any sub-tensor, we know that e rank(T3 ) ≥ n + min rank(A). Claim H.38. For a 3SAT instance S, for any input string y ∈ {0, 1}n , set β∗,1 to be the entry-wise e ∈ R(n+m)×2n can be written flipping of y, (I) if the clause l is satisfied, then the (n + l)-th row of A e as a linear combination of the first n rows of A. (II) if the clause l is unsatisfied, then the (n + l)-th e cannot be written as a linear combination of the first n rows of A. e row of A Proof. Part (I), consider a clause l which is satisfied with input string y. Then there must exist a variable xi belonging to clause l (either literal xi or literal xi ) and one of the following holds: if xi belongs to clause l, then αi = 1; if xi belongs to clause l, then αi = 0. Suppose clause l contains literal xi . The other case can be proved in a similar way. We consider the (n + l)-th row. One of e to the following assignments (0, 0), (−1, 0), (0, −1) to γl,1 , γl,1 is going to set the (n + l)-th row of A e Since we set αi = 1, then we set βi,1 = 0, it follows be vector e2i−1 . We consider the i-th row of A. e can be written as a linear that the i-th row of A becomes e2i−1 . Therefore, the (n + l)-th row of A e combination of A. Part (II), consider a clause l which is unsatisfied with input string y. Suppose that clause contains three literals xi1 , xi2 , xi3 (the other seven possibilities can be proved in a similar way). Then for input string y, we have αi1 = 0, αi2 = 0 and αi3 = 0, otherwise this clause l is satisfied. e It becomes e2i −1 + e2i . Similarly for the i2 -th row and i3 -th row. Consider i1 -th row of A. 1 1 Consider the (n + l)-th row. We can observe that all of positions 2i1 , 2i2 , 2i3 must be 0. Any 159 e must have one nonzero in one of positions linear combination formed by the i1 , i2 , i3 -th row of A e one of the positions 2i1 , 2i2 , 2i3 must 2i1 , 2i2 , 2i3 . However, if we consider the (n + l)-th row of A, e be 0. Also, the remaining n − 3 of the first n rows of A also have 0 in positions 2i1 , 2i2 , 2i3 . Thus, e cannot be written as a linear combination of the first n we can show that the (n + l)-th row of A rows. Similarly, for the other seven cases. Note that in order to make sure as many as possible rows in n + 1, · · · , n + m can be written e the βi,1 should be set to either 0 or 1. Also each as linear combinations of the first n rows of A, possibility of input string y is corresponding to a choice of βi,1 . According to the above Claim H.38, let l0 denote the smallest number of unsatisfied clauses over the choices of all the 2n input strings. en+1 , · · · A en+m , such that each of Then over all choices of β, γ, there must exist at least l0 rows of A those rows cannot be written as the linear combination of the first n rows. e ∈ R(n+m)×2n denote a matrix that consists of the first rows of An+i , ∀i ∈ [n] Claim H.39. Let A e ≥ n+Ω(p). and An+l , ∀l ∈ [m]. Let p denote the cover number of 3SAT instance. Then min rank(A) Proof. For any choices of {βi,1 }i∈[n] , there must exist a set of rows out of the next m rows such that, each of those rows cannot be written as a linear combination of the first n rows. Let L denote the set of those rows. Let t denote the maximum size set of disjoint rows from L. Since those t rows in L all have disjoint support, they are always linearly independent. Thus the rank is at least n + t. Note that each row corresponds to a unique clause and each clause corresponds to a unique row. We can just pick an arbitrary clause l in L, then remove the clauses that are using the same literal as clause l from L. Because each variable occurs in at most B clauses, we only need to remove at most 3B clauses from L. We repeat the procedure until there is no clause L. The corresponding rows of all the clauses we picked have disjoint supports, thus we can show a lower bound for t, t ≥ |L|/(3B) ≥ l0 /(3B) ≥ p/(9B) & p, where the second step follows by |L| ≥ l0 , the third step follows 3l0 ≥ p, and the last step follows by B is some constant. Thus, putting it all together, we complete the proof. Now, we consider a general case when there are q different i ∈ [n] satisfying that βi,2 6= 0. Similar to tensor T3 , we can obtain T4 such that, rank(T ) = 2n + 2m + min rank(T4 ) where T4 is a tensor of size 2 × 2n × (2n + m) given by the following column-row faces (from 3rd dimension) Ai , ∀i ∈ [2n + m] and each matrix has size 2 × 2n (shown in Figure 16). • Ai , i ∈ [n], the first 2n columns of Vei . fi . The first row is e2i−1 + βi,1 e2i , and the second row • An+i , i ∈ [q], the first 2n columns of M is βi,2 e2i . fi . The first row is e2i−1 + βi,1 e2i , and the • An+i , i ∈ {q + 1, · · · , n}, the first 2n columns of M second row is 0. el . The first row is (1+γl,1 +γl,2 )ul,1 −γl,1 ul,2 −γl,2 ul,3 , • A2n+l , l ∈ [m], the first 2n columns of C and the second row is (γl,3 + γl,4 )ul,1 − γl,3 ul,2 − γl,4 ul,3 . 160 2n Ai , i ∈ [n] An+i , i ∈ [q] 1 1 1 βi,1 βi,2 1 βi,1 An+i , i ∈ [n]\[q] (1 + γl,1 + γl,2 )ul,1 − γl,1 ul,2 − γl,2 ul,3 A2n+l , l ∈ [m] (γl,3 + γl,4 )ul,1 − γl,3 ul,2 − γl,4 ul,3 2i-1 2i Figure 16: For any i ∈ [n], βi,1 ∈ R. For any i ∈ [q], βi,2 ∈ R. For any l ∈ [m], γl,1 , γl,2 ∈ R. For any l ∈ [m], if the first literal of clause l is xj , then row vector ul,1 = e2i−1 ∈ R2n ; if the first literal of clause l is xj , then row vector ul,1 = e2i−1 + e2i ∈ R2n . Note that modifying q entries(from Figure 15 to Figure 16) of a tensor can only decrease the rank by q, thus we obtain Lemma H.40. Let q denote the number of i such that βi,2 6= 0, and let p denote the cover number of the 3SAT instance. Then T4 has rank at least 2n + Ω(p) − q. Combining the two perspectives we have Lemma H.41. Let p denote the cover number of an unsatisfiable 3SAT instance. Then the tensor has rank at least 4n + 2m + Ω(p). Proof. Let q denote the q in Figure 16. From one perspective, we know that the tensor has rank at least 4n + 2m + Ω(p) − q. From another perspective, we know that the tensor has rank at least 4n + 2m + q. Combining them together, we obtain the rank is at least 4n + 2m + Ω(p)/2, which is still 4n + 2m + Ω(p). Theorem H.42. Unless ETH fails, there is a δ > 0 and an absolute constant c0 > 1 such that the following holds. For the problem of deciding if the rank of a q-th order tensor, q ≥ 3, with each 1−o(1) dimension n, is at most k or at least c0 k, there is no 2δk time algorithm. Proof. The reduction can be split into three parts.13 The first part reduces the MAX-3SAT problem to the MAX-E3SAT problem by [MR10]. For each MAX-3SAT instance with size n, the corresponding MAX-E3SAT instance has size n1+o(1) . The second part is by reducing the MAX-E3SAT problem to MAX-E3SAT(B) by [Tre01]. For each MAX-E3SAT instance with size n, the corresponding MAX-E3SAT(B) instance has size Θ(n) when B is a constant. The third part is by reducing the MAX-E3SAT(B) problem to the tensor problem. Combining Theorem H.7, Lemma H.25 with this reduction, we complete the proof. Theorem H.43. Unless random-ETH fails, there is an absolute constant c0 > 1 for which any deterministic algorithm for deciding if the rank of a q-th order tensor is at most k or at least c0 k, requires 2Ω(k) time. Proof. This follows by combining the reduction with random-ETH and Lemma H.30. 13 The first two parts are accomplished by personal communication with Dana Moshkovitz and Govind Ramnarayan. 161 Note that, if BPP = P then it also holds for randomized algorithms which succeed with probability 2/3. Indeed, we know that any deterministic algorithm requires 2Ω(n) running time on tensors that have size n × n × n. Let g(n) denote a fixed function of n, and g(n) = o(n). We change the original tensor from size n×n×n to 2g(n) ×2g(n) ×2g(n) by adding zero entries. Then the number of entries in the new tensor is 23g(n) and the deterministic algorithm still requires 2Ω(n) running time on this new tensor. Assume there is a randomized algorithm that runs in 2cg(n) time, for some constant c > 3. Then considering the size of this new tensor, the deterministic algorithm is a super-polynomial time algorithm, but the randomized algorithm is a polynomial time algorithm. Thus, by assuming BPP = P, we can rule out randomized algorithms, which means Theorem H.43 also holds for randomized algorithms which succeed with probability 2/3. We provide some some motivation for the BPP = P assumption: this is a standard conjecture in complexity theory, as it is implied by the existence of strong pseudorandom generators or if any problem in deterministic exponential time has exponential size circuits [IW97]. H.5 Hardness result for robust subspace approximation This section improves the previous hardness for subspace approximation [CW15a] from 1±1/ poly(d) to 1 ± 1/ poly(log d). (Note that, we provide the algorithmic results for this problem in Section F.) Lemma H.44 ([Dem14]). For any graph G with n nodes, m edges, for which the maximum degree in graph G is d, there exists a d-regular graph G0 with 2nd − 2m nodes such that the clique size of G0 is the same as the clique size of G. Proof. First we create d copies of the original graph G. For each i ∈ [n], let vi,1 , vi,2 , · · · , vi,d denote the set of nodes in G0 that are corresponding to vi in G. Let dvi denote the degree of node vi in 0 , v0 , · · · , v0 graph G. In graph G0 , we create d − dvi new nodes vi,1 i,2 i,dvi and connect each of them to 0 has degree d. 2. For each all of the v1 , v2 , · · · , vd . Therefore, 1. For each i ∈ [n], j ∈ [dvi ], node vi,j i ∈ [n], j ∈ [d], node vi,j has degree dvi (from the original graph), and d − dvi degree (from the edges 0 , v0 , · · · , v0 to all the vi,1 i,2 i,dvi ). Thus, we proved the graph G is d-regular. The number of nodes in the new graph G0 is, nd + n n X X (d − dvi ) = 2nd − dvi = 2nd − 2m. i=1 i=1 It remains to show the clique size is the same in graph G and G0 . Since we can always reorder the indices for all the nodes, without loss of generality, let us assume the the first k nodes v1 , v2 , · · · , vk forms a k-clique that has the largest size. It is obvious that the clique size k 0 in graph G0 is at least k, since we make k copies of the original graph and do not delete any edges and nodes. Then we just need to show k 0 ≤ k. By the property of the construction, the node in one copy does not connect 0 , consider to a node in any other copy. Consider the new nodes we created. For each node vi,j the neighbors of this node. None of them share a edge. Combining the above two properties gives k 0 ≤ k. Thus, we finish the proof. Theorem H.45 (Theorem 2.6 in [GJS76]). Any n variable m clauses 3SAT instance can be reduced to a graph G with 24m vertices, which is an instance of 10m-independent set. Furthermore G is a 3-regular graph. We give the proof for completeness here. 162 u2 u3 u u1 u4 u5 Figure 17: In the original graph G, vertex u has degree 2. We create 5 new “artificial” vertices for u to guarantee that the new graph G0 is 3-regular. This construction was suggested to us by Syed Mohammad Meesum. Proof. Define oi to be the number of occurrences of {xi , xi } in the m clauses. For each variable xi , we construct 2oi vertices, namely vi,1 , vi,2 , · · · , vi,2oi . We make these 2oi vertices be a circuit, i.e., there are 2oi edges: (vi,1 , vi,2 ), (vi,2 , vi,3 ), · · · , (vi,2oi −1 , vi,2oi ), (vi,2oi , vi,1 ). For each clause with 3 literals a, b, c, we create 3 vertices va , vb , vc where they form a triangle, i.e., there are edges (va , vb ), (vb , vc ), (vc , va ). Furthermore, assume a is the j th occurrence of xi (occurrence of xi means a = xi or a = xi ). Then if a = xi , we add edge (va , vi,2j ), otherwise we add edge (va , vi,2j−1 ). Thus, we can see that every vertex in the triangle corresponding to a clause has degree 3, half of vertices of the circuit corresponding to variable xi have degree 3 and the other half have degree 2. Notice that the maximum independent set of a 2oi circuit is at most oi , and the maximum independent set of a triangle is at most 1. Thus, the maximum independent set of the whole graph Pn has size at most m + i=1 oi = m + 3m = 4m. Another observation is that if there is a satisfiable assignment for the 3SAT instance, then we can choose a 4m-independent set in the following way: if xi is true, then we choose all the vertices in set {vi,1 , vi,3 , · · · , vi,2j−1 , · · · vi,2oi −1 }; otherwise, we choose all the vertices in set {vi,2 , vi,4 , · · · , vi,2j , · · · vi,2oi }. For a clause with literals a, b, c: if a is satisfied, it means that vi,t which connected to va is not chosen in the independent set, thus we can pick va . The P issue remaining is to reduce the above graph to a 3 regular graph. Notice that there are exactly ni=1 oi = 3m vertices which have degree 2. For each of this kind of vertex u, we construct 5 additional vertices u1 , u2 , u3 , u4 , u5 and edges (u1 , u2 ), (u2 , u3 ), (u3 , u4 ), (u4 , u5 ), (u5 , u1 ), (u2 , u4 ), (u3 , u5 ) and (u1 , u). Because we can always choose exactly two vertices among u1 , u2 , · · · , u5 no matter we choose Pn vertex u or not, the value of the maximum independent set will increase the size by exactly 2 i=1 oi = 6m. To conclude, we construct a 3-regular graph reduced from a 3SAT instance. The graph has exactly 24m vertices. Furthermore, if the 3SAT instance is satisfiable, the graph has 10m-independent set. Otherwise, it does not have a 10m-independent set. 1− Corollary H.46. There is a constant 0 < c < 1, such that for any  > 0, there is no O(2n ) time algorithm which can solve k-clique for an n-vertex (n − 3)-regular graph where k = cn unless ETH fails. Proof. According to Theorem H.45, for a given n variable m = O(n) clauses 3SAT instance, we can reduce it to a 3-regular graph with 24m vertices which is a 10m-independent set instance. If 163 1− 1 1 B1 √c r B1 √c r B1 √c r B1 1− 1 B1 √c r B1 2 3 √c r B1 √c r B1 1− 1 B1 √c r B1 5 √c r B1 1− √c r B1 4 √c r B1 1 B1 1− 1 B1 Figure 18: The left graph has 5 nodes, and we convert it into a 5 × 5 symmetric matrix. 1− there exists  > 0 such that we have an algorithm with running time O(2(24m) ) which can solve 10m-clique for a 24m − 3 regular graph with 24m vertices, then we can solve the 3SAT problem in 1−0 O(2n ) time, where 0 = Θ(). Thus, it contradicts ETH . Definition H.47. Let V be a k-dimensional subspace of Rd , represented as the column span of a d × k matrix with orthonormal columns. We abuse notation and let V be both the subspace and the corresponding matrix. For a set Q of points, let X X X c(Q, V ) = d(q, V )p = kq > (I − V V > )kp2 = (kqk2 − kq > V k2 )p/2 , q∈Q q∈Q q∈Q be the sum of p-th powers of distances of points in Q, i.e., kQ−QV V > kv with associated M (x) = |x|p . Lemma  H.48. For any k ∈ [d], the k-dimensional subspaces V which minimize c(E, V ) are exactly n the k subspaces formed by taking the span of k distinct standard unit vectors ei , i ∈ [d]. The cost of any such V is d − k. Theorem H.49. Given a set Q of poly(d) points in Rd , for a sufficiently small  = 1/ poly(d), it is NP-hard to output a k-dimensional subspace V of Rd for which c(Q, V ) ≤ (1 + )c(Q, V ∗ ), where V ∗ is the k-dimensional subspace minimizing the expression c(Q, V ), that is c(Q, V ) ≥ c(Q, V ∗ ) for all k-dimensional subspaces V . Theorem H.50. For a sufficiently small  = 1/ poly(log(d)), there exist 1 ≤ k ≤ d, unless ETH fails, there is no algorithm that can output a k-dimensional subspace V of Rd for which c(Q, V ) ≤ (1 + )c(Q, V ∗ ), where V ∗ is the k-dimensional subspace minimizing the expression c(Q, V ), that is c(Q, V ) ≥ c(Q, V ∗ ) for all k-dimensional subspaces V . Proof. The reduction is from the clique problem of d-vertices (d − 3)-regular graph. We construct the hard instance in the same way as in [CW15a]. Given a d-vertes (d − 3)-regular graph graph G, let B1 = dα , B2 = dβ where β > α ≥ 1 are two sufficiently large constants. Let c be such that (1 − 1/B1 )2 + c2 /B1 = 1. 164 We construct = √ a d × d matrix A as the following: ∀i ∈ [d], let Ai,i = 1 − 1/B1 and ∀i 6=0 j, Ai,j 2d×d Aj,i = c/ B1 r if (i, j) is an edge in G, and Ai,j = Aj,i = 0 otherwise. Let us construct A ∈ R as follows:   A 0 A = , B2 · Id where Id ∈ Rd is a d × d identity matrix. Claim H.51 (In proof of Theorem 54 in [CW15a]). Let V 0 ∈ Rd×k satisfy that c(A0 , V 0 ) ≤ (1 + 1/dγ )c(A0 , V ∗ ), where A0 is constructed as the above corresponding to the given graph G, and γ > 1 is a sufficiently large constant, V ∗ is the optimal solution which minimizes c(A0 , V ). Then if G has a k-Clique , given V 0 , there is a poly(d) time algorithm which can find the clique which has size at least k. Now, to apply ETH here, we only need to apply a padding argument. We can construct a matrix A00 ∈ RN ×d as follows:  0 A  A0   A00 =  · · · . A0 1−α Basically, A00 contains N/(2d) copies of A0 where N = 2d , and 0 < α is a constant which can be arbitrarily small. Notice that ∀V ∈ Rd×k , X X c(V, A00 ) = d(q, V )p = N/(2d) d(q, V )p = N/(2d)c(V, A0 ). q∈A00 q∈A0 So if V 00 gives a (1 + 1/dγ ) approximation to A00 , it also gives a (1 + 1/dγ ) approximation to A0 . So if we can find V 00 in poly(N, d) time, we can output a k-Clique of G in poly(N, d) time. But 1−α0 unless ETH fails, for a sufficiently small constant α0 > 0 there is no poly(N, d) = O(2d ) time algorithm that can output a k-Clique of G. It means that there is no poly(N, d) time algorithm that can compute a (1 + 1/dγ ) = (1 + 1/ poly(log(N ))) approximation to A00 . To make A00 be a square matrix, we can just pad with 0s to make the size of A00 be N × N . Thus, we can conclude, unless ETH fails, there is no polynomial algorithm that can compute a (1 + 1/ poly(log(N ))) rank-k subspace approximation to a point set with size N . H.6 Extending hardness from matrices to tensors In this section, we briefly state some hardness results which are implied by hardness for matrices. The intuition is that, if there is a hard instance for the matrix problem, then we can always construct a tensor hard instance for the tensor problem as follos: the first face of the tensor is the hard instance matrix and it has all 0s elsewhere. We can prove that the optimal tensor solution will always fit the first face and will have all 0s elsewhere. Then the optimal tensor solution gives an optimal matrix solution. 165 H.6.1 Entry-wise `1 norm and `1 -`1 -`2 norm In the following we will show that the hardness for entry-wise `1 norm low rank matrix approximation implies the hardness for entry-wise `1 norm low rank tensor approximation and asymmetric tensor norm (`1 -`1 -`2 ) low rank tensor approximation problems. Theorem H.52 (Theorem H.13 in [SWZ17]). Unless ETH fails, for an arbitrarily small constant γ > 0, given some matrix A ∈ Rn×n , there is no algorithm that can compute x b, yb ∈ Rn s.t.   1 > kA − x byb k1 ≤ 1 + minn kA − xy > k1 , 1+γ x,y∈R log (n) in poly(n) time. We can get the hardness for tensors directly. Theorem H.53. Unless ETH fails, for an arbitrarily small constant γ > 0, given some tensor A ∈ Rn×n×n , 1. there is no algorithm that can compute x b, yb, zb ∈ Rn s.t.   1 kA − x b ⊗ yb ⊗ zbk1 ≤ 1 + min kA − x ⊗ y ⊗ zk1 , log1+γ (n) x,y,z∈Rn in poly(n) time. 2. there is no algorithm can compute x b, yb, zb ∈ Rn s.t.   1 kA − x b ⊗ yb ⊗ zbku ≤ 1 + min kA − x ⊗ y ⊗ zku , log1+γ (n) x,y,z∈Rn in poly(n) time. b ∈ Rn×n be the hard instance in Theorem H.52. We construct tensor A ∈ Proof. Let matrix A bi,j , Ai,j,l = 0. Rn×n×n as follows: ∀i, j, l ∈ [n], l 6= 1 we let Ai,j,1 = A n Suppose x b, yb, zb ∈ R satisfies   1 kA − x b ⊗ yb ⊗ zbk1 ≤ 1 + min kA − x ⊗ y ⊗ zk1 . log1+γ (n) x,y,z∈Rn Then letting z 0 = (1, 0, 0, · · · , 0)> , we have  kA − x b ⊗ yb ⊗ z k1 ≤ kA − x b ⊗ yb ⊗ zbk1 ≤ 1 + 0 1 log1+γ (n)  min kA − x ⊗ y ⊗ zk1 . x,y,z∈Rn The first inequality follows since ∀i, j, l ∈ [n], l 6= 1, we have Ai,j,l = 0. Let b − xy > k1 . x∗ , y ∗ = arg minn kA x,y∈R Then  kA − x b ⊗ yb ⊗ z k1 ≤ 1 + 0 1 log1+γ (n)  kA − x b ⊗ yb ⊗ zbk1 ≤ 166  1+ 1 log1+γ (n)  kA − x∗ ⊗ y ∗ ⊗ z 0 k1 . Thus, we have b−x kA byb> k1 ≤  1+ 1 log1+γ (n)  b − x∗ (y ∗ )> k1 . kA Combining with Theorem H.52, we know that unless ETH fails, there is no poly(n) running time algorithm which can output   1 kA − x b ⊗ yb ⊗ zbk1 ≤ 1 + min kA − x ⊗ y ⊗ zk1 . log1+γ (n) x,y,z∈Rn Similarly, we can prove that if x e, ye, ze ∈ Rn satisfies:   1 kA − x e ⊗ ye ⊗ zeku ≤ 1 + min kA − x ⊗ y ⊗ zku , log1+γ (n) x,y,z∈Rn then We complete the proof. b−x kA eye> k1 ≤  1+ 1 log1+γ (n)  b − x∗ (y ∗ )> k1 . kA Corollary H.54. Unless ETH fails, for arbitrarily small constant γ > 0, 1. there is no algorithm that can compute (1 + ) entry-wise `1 norm rank-1 tensor approximation 1−γ in 2O(1/ ) running time. (k · k1 -norm is defined in Section D) 2. there is no algorithm that can compute (1 + ) `u -norm rank-1 tensor approximation in 1−γ 2O(1/ ) running time. (k · ku -norm is defined in Section F.3) H.6.2 `1 -`2 -`2 norm Theorem H.55. Unless ETH fails, for arbitrarily small constant γ > 0, given some tensor A ∈ b , Vb , W c ∈ Rn×k s.t. Rn×n×n , there is no algorithm can compute U   1 b ⊗ Vb ⊗ W c kv ≤ 1 + kA − U min kA − U ⊗ V ⊗ W kv , poly(log n) U,V,W ∈Rn×k in poly(n) running time. (k · kv -norm is defined in Section F.2) b ∈ Rn×n be the hard instance in Theorem H.50. We construct tensor A ∈ Proof. Let matrix A bi,j , Ai,j,l = 0. Rn×n×n as follows: ∀i, j, l ∈ [n], l 6= 1 we let Ai,j,1 = A b , Vb , W c ∈ Rn×k satisfies Suppose U   1 b ⊗ Vb ⊗ W c kv ≤ 1 + min kA − U ⊗ V ⊗ W kv . kA − U poly(log n) U,V,W ∈Rn×k Let W 0 ∈ Rn×k be the following:  1  0  W0 =   0 · · · 0 1 0 0 ··· 0 167 ··· ··· ··· ··· ···  1 0  0 , · · · 0 then we have b ⊗ Vb ⊗ W 0 kv ≤ kA − U b ⊗ Vb ⊗ W c kv ≤ kA − U  1+ 1 poly(log n)  min U,V,W ∈Rn×k kA − U ⊗ V ⊗ W kv . The first inequality follows since ∀i, j, l ∈ [n], l 6= 1, we have Ai,j,l = 0. Let U ∗ , V ∗ = arg min U,V ∈Rn×k Then b − U V > kv . kA   1 b ⊗ Vb ⊗ W c kv 1+ kA − U poly(log n)   1 ≤ 1+ kA − U ∗ ⊗ V ∗ ⊗ W 0 kv . poly(log n) b ⊗ Vb ⊗ W 0 kv ≤ kA − U Thus, we have b−U b Vb > kv ≤ kA  1+ 1 poly(log n)  b − U ∗ (V ∗ )> kv . kA Combining with Theorem H.50, we know that unless ETH fails, there is no poly(n) time algorithm which can output   1 b b c kA − U ⊗ V ⊗ W kv ≤ 1 + min kA − U ⊗ V ⊗ W kv . poly(log n) U,V,W ∈Rn×k 168 I Hard Instance This section provides some hard instances for tensor problems. I.1 Frobenius CURT decomposition for 3rd order tensor In this section we will prove that a relative-error Tensor CURT is not possible unless C has Ω(k/) columns from A, R has Ω(k/) rows from A, T has Ω(k/) tubes from A and U has rank Ω(k). We use a similar construction from [BW14, BDM11, DR10] and extend it to the tensor setting. Theorem I.1. There exists a tensor A ∈ Rn×n×n with the following property. Consider a factorization CURT, with C ∈ Rn×c containing c columns of A, R ∈ Rn×r containing r rows of A, T ∈ Rn×t containing r tubes of A, and U ∈ Rc×r×t , such that A− n X n X n X i=1 j=1 l=1 2 ≤ (1 + )kA − Ak k2F . Ui,j,l · Ci ⊗ Rj ⊗ Tl F Then, for any  < 1 and any k ≥ 1, c = Ω(k/), r = Ω(k/), t = Ω(k/) and rank(U ) ≥ k/3. Proof. For any i ∈ [d], let ei ∈ Rd denote the i-th standard basis vector. For α > 0 and integer d > 1, consider the matrix D ∈ R(d+1)×(d+1) ,   D = e1 + αe2 e1 + αe3 · · · e1 + αed+1 0   1 1 ··· 1 0 α 0    α 0 =    ..  ..  . . α 0 We construct matrix B ∈ R(d+1)k/3×(d+1)k/3 by repeating matrix D k/3 times along its main diagonal,   D   D   B=  ..   . D Let m = (d + 1)k/3. We construct a tensor A ∈ Rn×n×n with n = 3m by repeating matrix B three times in the following way, A1,j,l = Bj,l , ∀j, l ∈ [m] × [m] Am+i,m+1,m+l = Bi,l , ∀i, l ∈ [m] × [m] A2m+i,2m+j,2m+1 = Bi,j , ∀j, i ∈ [m] × [m] and 0 everywhere else. We first state some useful properties for matrix D,  >  1d 1d + α2 Id 0 > D D= ∈ R(d+1)×(d+1) 0 0 169 where σ12 (D) = d + α2 , σi2 (D) = α2 , 2 σd+1 (D) ∀i = 2, · · · , d = 0. By definition of matrix B, we can obtain the following properties, σi2 (B) = d + α2 , σi2 (B) σi2 (B) ∀i = 1, · · · , k/3 2 ∀i = k/3 + 1, · · · , dk/3 =α , ∀i = dk + 1, · · · , dk/3 + k/3 = 0, By definition of A, we can copy B into three disjoint n × n × n sub-tensors on the main diagonal of tensor A. Thus, we have σi2 (A) = d + α2 , ∀i = 1, · · · , k σi2 (A) = α2 , σi2 (A) ∀i = k + 1, · · · , dk ∀i = dk + 1, · · · , dk + k = 0, Let A(k) denote the best rank-k approximation to A, and let D1 denote the best rank-1 approximation to D. Using the above properties, for any k ≥ 1, we can compute kA − A(k) k2F , kA − Ak k2F = kkD − D1 k2F = k(d − 1)α2 . (76) Suppose we have a CUR decomposition with c0 = o(k/) columns, r0 = o(k/) rows or t0 = o(k/) tubes. Since the tensor is equivalent by looking through any of the 3 dimensions/directions, we just need to show why the cost will be at least (1 + )kA − Ak k2F if we choose t = o(k/) columns and t = o(k/) rows. Let C ∈ Rn×c denote the optimal solution. Then it should have the following form,   C1  C2 C= C3 where C1 ∈ Rm×c1 contains c1 columns from A1:m,1:m,1:m ∈ Rm×m×m , C2 ∈ Rm×c2 contains c2 columns from Am+1:2m,m+1:2m,m+1:2m ∈ Rm×m×m , C3 ∈ Rm×c3 contains c3 columns from A2m+1:3m,2m+1:3m,2m+1:3m ∈ Rm×m×m . Let R ∈ Rn×r denote the optimal solution. Then it should have the following form,   R1  R2 R= R3 kA − A(CC † , RR† , I)k2F ≥ kB − R1 R1† Bk2F + kB − C2 C2† Bk2F + kB > − C3 C3† B > k2F . (77) By the analysis in Proposition 4 of [DV06], we have kB − R1 R1† Bk2F ≥ (k/3)(1 + b · α)kD − D(1) k2F . 170 (78) and kB − C2 C2† Bk2F ≥ (k/3)(1 + b · α)kD − D(1) k2F . (79) Let C3 ∈ Rm×c3 contain any c3 columns from B > . Note that C3 contains c3 (≤ t) columns from B > , equivalently C2> contains c2 rows from B. Recall that B contains k copies of D ∈ R(d+1)×(d+1) along its main diagonal. Even if we choose t columns of B > , the cost is at least kB > − C3 C3† B > k2F ≥ (k/3)kD − D(t) k2F ≥ (k/3)(d − t)α2 . (80) Combining Equations (76), (77), (78), (79), (80), α =  gives, kA − CC † Ak2F kA − A(k) k2F ≥ ≥ ≥ = = = ≥ kB − R1 R1† Bk2F + kB − C2 C2† Bk2F + kB > − C3 C3† B > k2F kA − A(k) k2F kB − R1 R1† Bk2F + kB − C2 C2† Bk2F + kB > − C3 C3† B > k2F k(d − 1)α2 2(k/3)(1 + b)(d − 1)2 + (k/3)(d − t)2 k(d − 1)2 2 k(d − 1) + (k/3)(−t + 1)2 + 2(k/3)b(d − 1)2 k(d − 1)2 (k/3)2 (2b(d − 1) − t + 1) 1+ k(d − 1)2 2b(d − 1) − t + 1 1+ 3(d − 1) 1 + (b/3) by Eq. (77) by Eq. (76) by Eq. (78),(79),(80) and α =  by 2t ≤ b(d − 1)/2 ≥ 1 + . by b > 3. which gives a contradiction. I.2 General Frobenius CURT decomposition for q-th order tensor In this section, we extend the hard instance for 3rd order tensors to q-th order tensors. Theorem I.2. For any constant q ≥ 1, there exists a tensor A ∈ Rn×n×···×n with the following property. Define OPT = min rank −k Ak ∈Rc1 ×c2 ×···×cq kA − Ak k2F . Consider a q-th order factorization CURT, with C1 ∈ Rn×c1 containing c columns from the 1st dimension of A, C2 ∈ Rn×c2 containing c2 columns from the 2nd dimension of A, · · · , Cq ∈ Rn×cq containing cq columns from the q-th dimension of A and a tensor U ∈ Rc1 ×c2 ×···×cq , such that A− n X n X i1 =1 i2 =1 There exists a constant ··· c0 n X iq =1 2 Ui1 ,i2 ,··· ,iq · C1,i1 ⊗ C2,i2 ⊗ · · · ⊗ Cq,iq ≤ (1 + ) OPT . F < 1 such that for any  < c0 and any k ≥ 1, c1 = Ω(k/), c2 = Ω(k/), · · · , cq = Ω(k/) and rank(U ) ≥ c0 k. 171 Proof. We use the same matrix D ∈ R(d+1)×(d+1) as the proof of Theorem I.1. Then we can construct matrix B ∈ R(d+1)k/q×(d+1)k/q by repeating matrix D k/q times along the its main diagonal,   D   D   B=  ..   . D Let m = (d + 1)/q. We construct a tensor A ∈ Rn×n×···×n with n = qm by repeating the matrix q times in the following way, A[1:m],[1:m],1,1,1,··· ,1,1 = B, Am+1,[m+1:2m],[m+1:2m],m+1,m+1,··· ,m+1,m+1 = B > , A2m+1,2m+1,[2m+1:3m],[2m+1:3m],2m+1,··· ,2m+1,2m+1 = B, A3m+1,3m+1,3m+1,[3m+1:4m],[3m+1:4m],··· ,2m+1,3m+1 = B > , ········· A(q−2)m+1,(q−2)m+1,(q−2)m+1,(q−2)m+1,(q−2)m+1,··· ,[(q−2)m+1:(q−1)m],[(q−2)m+1:(q−1)m] = B, A[(q−1)m+1:qm],(q−1)m+1,(q−1)m+1,(q−1)m+1,(q−1)m+1,··· ,(q−1)m+1,[(q−1)m+1:qm] = B > , where there are q/2 Bs and q/2 B > s on the right when q is even, and there are (q + 1)/2 Bs and (q − 1)/2 Bs on the right when q is odd. Note that this tensor A is equivalent if we look through any of the q dimensions/directions. Similarly as before, we have kA − A(k) k2F = kkD − D(1) k2F = k(d − 1)α2 . Suppose there is a general CURT decomposition (of this q-th order tensor), with c1 = c2 = · · · cq = o(k/) columns from each dimension. Let C1 ∈ Rn×c1 , C2 ∈ Rn×c2 , · · · , Cq ∈ Rn×cq denote the optimal solution. Then the Ci should have the following form,       C1,1 C2,1 Cq,1       C1,2 C2,2 Cq,2       C1 =  , C = , · · · , C =      2 q . . . . . .       . . . C1,q C2,q Cq,q (In the rest of the proof, we focus on the case when q is even. Similarly, we can show the same thing when q is odd.) We have kA − A(C1 C1† , C2 C2† , · · · , Cq Cq† )k2F ≥ q/2 X i=1 † † kB − C2i−1,2i−1 C2i−1,2i−1 Bk2F + kB > − C2i,2i C2i,2i B > k2F ≥ (q/2) (k/q)(1 + bα)kD − D(1) k2F + (k/q)(d − t)α2  = (q/2) (k/q)(1 + bα)(d − 1)α2 + (k/q)(d − t)α2  where the second inequality follows by Equations (79) and (80), and the third step follows by kD − D(1) k2F = (d − 1)α2 . 172 Putting it all together, we have kA − A(C1 C1† , C2 C2† , · · · , Cq Cq† )k2F kA − A(k) k2F ≥ = = ≤ =  (q/2) (k/q)(1 + bα)(d − 1)α2 + (k/q)(d − t)α2 k(d − 1)α2 2 k(d − 1)α + (k/2)bα(d − 1)α2 + (k/q)(−t + 1)α2 k(d − 1)α2 (k/2)bα(d − 1)α2 + (k/q)(−t + 1)α2 1+ k(d − 1)α2 (k/3)bα(d − 1)α2 1+ k(d − 1)α2 1 + (b/3) > 1+ by  = α by b > 3. which leads to a contradiction. Similarly we can show the rank is at least Ω(k). 173 J Distributed Setting Input data to large-scale machine learning and data mining tasks may be distributed across different machines. The communication cost becomes the major bottleneck of distributed protocols, and so there is a growing body of work on low rank matrix approximations in the distributed model [TD99, QOSG02, BCL05, BRB08, MBZ10, FEGK13, PMvdG+ 13, KVW14, BKLW14, BLS+ 16, BWZ16, WZ16, SWZ17] and also many other machine learning problems such as clustering, boosting, and column subset selection [BBLM14, BLG+ 15, ABW17]. Thus, it is natural to ask whether our algorithm can be applied in the distributed setting. This section will discuss the distributed Frobenius norm low rank tensor approximation protocol in the so-called arbitrary-partition model (see, e.g. [KVW14, BWZ16]). In the following, we extend the definition of the arbitrary-partition model [KVW14] to fit our tensor setting. Definition J.1 (Arbitrary-partition model [KVW14]). There are s machines, and the ith machine n×n×n as its local data tensor. The global data tensor is implicit and is denoted holds a tensor P s Ai ∈ R as A = i=1 Ai . Then, we say that A is arbitrarily partitioned into s matrices distributed in the s machines. In addition, there is also a coordinator. In this model, the communication is only allowed between the machines and the coordinator. The total communication cost is the total number of words delivered between machines and the coordinator. Each word has O(log(sn)) bits. Now, let us introduce the distributed Frobenius norm low rank tensor approximation problem in the arbitrary partition model: Definition J.2 (Arbitrary-partition model Frobenius norm rank-k tensor approximation). Tensor A ∈ Rn×n×n is arbitrarily partitioned into s matrices A1 , A2 , · · · , As distributed in s machines respectively, and ∀i ∈ [s], each entry of Ai is at most O(log(sn)) bits. Given tensor A, k ∈ N+ and an error parameter 0 <  < 1, the goal is to find a distributed protocol in the model of Definition J.1 such that 1. Upon termination, the protocol leaves three matrices U ∗ , V ∗ , W ∗ ∈ Rn×k on the coordinator. 2. U ∗ , V ∗ , W ∗ satisfies that k X i=1 2 Ui∗ ⊗ Vi∗ ⊗ Wi∗ −A F ≤ (1 + ) min rank −k A0 kA0 − Ak2F . 3. The communication cost is as small as possible. Theorem J.3. Suppose tensor A ∈ Rn×n×n is distributed in the arbitrary partition model (See Definition J.1). There is a protocol( in Algorithm 39) which solves the problem in Definition J.2 with constant success probability. In addition, the communication complexity of the protocol is s(poly(k/) + O(kn)) words. Proof. Correctness. 2 and Algorithm 3 (Theorem C.1.) Ps The correctness Ps is implied byPAlgorithm s Notice that A1 = i=1 Ai,1 , A2 = i=1 Ai,2 , A3 = i=1 Ai,3 , which means that Y1 = T1 A1 S1 , Y2 = T2 A2 S2 , Y3 = T3 A3 S3 , and C = A(T1 , T2 , T3 ). 174 According to line 23, X1∗ , X2∗ , X3∗ = arg min X1 ,X2 ,X3 k X (Y1 X1 )j ⊗ (Y2 X2 )j ⊗ (Y3 X3 )j − C j=1 . F According to Lemma C.3, we have k X (T1 A1 S1 X1∗ )j ⊗ (T2 A2 S2 X2∗ )j ⊗ (T3 A3 S3 X3∗ )j − A(T1 , T2 , T3 ) j=1 ≤(1 + O()) min X1 ,X2 ,X3 ≤(1 + O()) min U,V,W k X (A1 S1 X1 )j ⊗ (A2 S2 X2 )j ⊗ (A3 Y3 X3 )j − A j=1 k X i=1 2 F 2 F 2 Ui ⊗ Vi ⊗ Wi − A , F where the last inequality follows by the proof of Theorem C.1. By scaling a constant of , we complete the proof of correctness. Communication complexity. Since S1 , S2 , S3 are w1 -wise independent, and T1 , T2 , T3 are w2 -wise independent, the communication cost of sending random seeds in line 5 is O(s(w1 + w2 )) words, where w1 = O(k), w2 = O(1) (see [KVW14, CW13, Woo14, KN14]). The communication cost in line 18 is s · poly(k/) words due to T1 Ai,1 S1 , T2 Ai,2 S2 , T3 Ai,3 S3 ∈ Rpoly(k/)×O(k/) and Ci = Ai (T1 , T2 , T3 ) ∈ Rpoly(k/)×poly(k/)×poly(k/) . Notice that, since ∀i ∈ [s] each entry of Ai has at most O(log(sn)) bits, each entry of Y1 , Y2 , Y3 , C has at most O(log(sn)) bits. Due to Theorem J.7, each entry of X1∗ , X2∗ , X3∗ has at most O(log(sn)) bits, and the sizes of X1∗ , X2∗ , X3∗ are poly(k/) words. Thus the communication cost in line 24 is s · poly(k/) words. Finally, since ∀i ∈ [s], Ui∗ , Vi∗ , Wi∗ ∈ Rn×k , the communication here is at most O(skn) words. The total communication cost is s(poly(k/) + O(kn)) words. Remark J.4. If we slightly change the goal in Definition J.2 to the following: the coordinator does Ps ∗, V ∗ = ∗ , V ∗ , W ∗ , but each machine i holds U ∗ , V ∗ , W ∗ such that U ∗ = not need to output U U i i i i=1 i Ps Ps ∗, W ∗ = ∗ , then the protocol shown in Algorithm 39 does not have to do the line 28. V W i i=1 i=1 i Thus the total communication cost is at most s · poly(k/) words in this setting. Remark J.5. Algorithm 39 needs exponential in poly(k/) running time since it solves a polynomial solver in line 23. Instead of solving line 23, we can solve the following optimization problem: α∗ = arg min α∈Rs1 ×s2 ×s3 s1 X s2 X s3 X i=1 j=1 l=1 αi,j,l · (Y1 )i ⊗ (Y2 )j ⊗ (Y3 )l − C . F Since it is actually a regression problem, it only takes polynomial running time to get α∗ . And according to Lemma C.5, s1 X s2 X s3 X i=1 j=1 l=1 ∗ αi,j,l · (Y1 )i ⊗ (Y2 )j ⊗ (Y3 )l 175 Algorithm 39 Distributed Frobenius Norm Low Rank Approximation Protocol 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: procedure DistributedFnormLowRankApproxProtocol(A,,k,s) A ∈ Rn×n×n was arbitrarily partitioned into s matrices A1 , · · · , As ∈ Rn×n×n on s machines. Coordinator Machines i Chooses a random seed. Sends it to all machines. −−−−−−−−−> si ← O(k/), ∀i ∈ [3]. 2 Agree on Si ∈ Rn ×si , ∀i ∈ [3] which are w1 -wise independent random N (0, 1/si ) Gaussian matrices. ti ← poly(k/), ∀i ∈ [3]. Agree on Ti ∈ Rti ×n , ∀i ∈ [3] which are w2 -wise independent random sparse embedding matrices. Compute Yi,1 ← T1 Ai,1 S1 , Yi,2 ← T2 Ai,2 S2 , Yi,3 ← T3 Ai,3 S3 . Send Yi,1 , Yi,2 , Yi,3 to the coordinator. Send Ci ← Ai (T1 , T2 , T3 ) to the coordinator. <−−−−−−−−− s s P P Compute Y1 ← Yi,1 , Y2 ← Yi,2 , Y3 ← s P i=1 Yi,3 , C ← i=1 s P i=1 Ci . i=1 X1∗ , X2∗ , X3∗ by solving Compute min k(Y1 X1 ) ⊗ (Y2 X2 ) ⊗ (Y3 X3 ) − CkF X1 ,X2 ,X3 Send X1∗ , X2∗ , X3∗ to machines. −−−−−−−−−> Compute Ui∗ ← Ai,1 S1 X1∗ , Vi∗ ← Ai,2 S2 X2∗ , Wi∗ ← Ai,3 S3 X3∗ . Send Ui∗ , Vi∗ , Wi∗ to the coordinator. <−−−−−−−−− P Compute U ∗ ← Psi=1 Ui∗ . Compute V ∗ ← Psi=1 Vi∗ . Compute W ∗ ← si=1 Wi∗ . return U ∗ , V ∗ , W ∗ . end procedure gives a rank-O(k 3 /3 ) bicriteria solution. Further, similar to Theorem C.8, we can solve min U ∈Rn×s2 s3 where C = P i Ai (I, T2 , T3 ). s1 X s2 X i=1 j=1 Ui+s1 (j−1) ⊗ (Y2 )i ⊗ (Y3 )j − C , F Thus, we can obtain a rank-O(k 2 /2 ) in polynomial time. Remark J.6. If we select sketching matrices S1 , S2 , S3 , T1 , T2 , T3 to be random Cauchy matrices, 176 then we are able to compute distributed entry-wise `1 norm rank-k tensor approximation (see Theorem D.17). The communication cost is still s(poly(k/) + O(kn)) words. If we only require a bicriteria solution, then it only needs polynomial running time. Using similar techniques as in the proof of Theorem C.45, we can obtain: Theorem J.7. Let maxi {ti , di } ≤ n. Given a t1 × t2 × t3 tensor A and three matrices: a t1 × d1 matrix T1 , a t2 × d2 matrix T2 , and a t3 × d3 matrix T3 . For any δ > 0, if there exists a solution to min X1 ,X2 ,X3 k X (T1 X1 )i ⊗ (T2 X2 )i ⊗ (T3 X3 )i − A i=1 2 := OPT, F and each entry of Xi can be expressed using O(log n) bits, then there exists an algorithm that b1 , X b2 , and X b3 such that takes poly(log n) · 2O(d1 k+d2 k+d3 k) time and outputs three matrices: X 2 b1 ) ⊗ (T2 X b2 ) ⊗ (T3 X b3 ) − Ak = OPT. k(T1 X F 177 K Streaming Setting One of the computation models which is closely related to the distributed model of computation is the streaming model. There is a growing line of work in the streaming model. Some problems are very fundamental in the streaming model such like Heavy Hitters [LNNT16, BCI+ 16, BCIW16], and streaming numerical linear algebra problems [CW09]. Streaming low rank matrix approximation has been extensively studied by previous work like [CW09, KL11, GP14, Lib13, KLM+ 14, BWZ16, SWZ17]. In this section, we show that there is a streaming algorithm which can compute a low rank tensor approximation. In the following, we introduce the turnstile streaming model and the turnstile streaming tensor Frobenius norm low rank approximation problem. The following gives a formal definition of the computation model we study. Definition K.1 (Turnstile model). Initially, tensor A ∈ Rn×n×n is an all zero tensor. In the turnstile streaming model, there is a stream of update operations, and the ith update operation is in the form (xi , yi , zi , δi ) where xi , yi , zi ∈ [n], and δi ∈ R has O(log n) bits. Each (xi , yi , zi , δi ) means that Axi ,yi ,zi should be incremented by δi . And each entry of A has at most O(log n) bits at the end of the stream. An algorithm in this computation model is only allowed one pass over the stream. At the end of the stream, the algorithm stores a summary of A. The space complexity of the algorithm is the total number of words required to compute and store this summary while scanning the stream. Here, each word has at most O(log(n)) bits. The following is the formal definition of the problem. Definition K.2 (Turnstile model Frobenius norm rank-k tensor approximation). Given tensor A ∈ Rn×n×n , k ∈ N+ and an error parameter 1 >  > 0, the goal is to design an algorithm in the streaming model of Definition K.1 such that 1. Upon termination, the algorithm outputs three matrices U ∗ , V ∗ , W ∗ ∈ Rn×k . 2. U ∗ , V ∗ , W ∗ satisft that k X i=1 2 Ui∗ ⊗ Vi∗ ⊗ Wi∗ −A F ≤ (1 + ) min rank −k A0 kA0 − Ak2F . 3. The space complexity of the algorithm is as small as possible. Theorem K.3. Suppose tensor A ∈ Rn×n×n is given in the turnstile streaming model (see Definition K.1), there is an streaming algorithm (in Algorithm 40) which solves the problem in Definition K.2 with constant success probability. In addition, the space complexity of the algorithm is poly(k/) + O(nk/) words. Proof. Correctness. Similar to the distributed protocol, the correctness of this streaming algorithm is also implied by Algorithm 2 and Algorithm 3 (Theorem C.1.) Notice that at the end of the stream V1 = A1 S1 ∈ Rn×s1 , V2 = A2 S2 ∈ Rn×s2 , V3 = A3 S3 ∈ Rn×s3 , C = A(T1 , T2 , T3 ) ∈ Rt1 ×t2 ×t3 . It also means that Y1 = T1 A1 S1 , Y2 = T2 A2 S2 , Y3 = T3 A3 S3 . 178 According to line 26 of procedure TurnstileStreaming, X1∗ , X2∗ , X3∗ = arg min X1 ∈Rs1 ×k ,X2 ∈Rs2 ×k ,X3 ∈Rs3 ×k k X (Y1 X1 )j ⊗ (Y2 X2 )j ⊗ (Y3 X3 )j − C j=1 F According to Lemma C.3, we have k X (Y1 X1 )j ⊗ (Y2 X2 )j ⊗ (Y3 X3 )j − C j=1 = k X (T1 A1 S1 X1∗ )j j=1 ≤ (1 + O()) min X1 ,X2 ,X3 ≤ (1 + O()) min U,V,W ⊗ (T2 A2 S2 X2∗ )j ⊗ 2 F 2 (T3 A3 S3 X3∗ )j − A(T1 , T2 , T3 ) k X (A1 S1 X1 )j ⊗ (A2 S2 X2 )j ⊗ (A3 Y3 X3 )j − A j=1 k X i=1 F 2 F 2 Ui ⊗ Vi ⊗ Wi − A , F where the last inequality follows by the proof of Theorem C.1. By scaling a constant of , we complete the proof of correctness. Space complexity. Since S1 , S2 , S3 are w1 -wise independent, and T1 , T2 , T3 are w2 -wise independent, the space needed to construct these sketching matrices in line 3 and line 5 of procedure TurnstileStreaming is O(w1 + w2 ) words, where w1 = O(k), w2 = O(1) (see [KVW14, CW13, Woo14, KN14]). The cost to maintain V1 , V2 , V3 is O(nk/) words, and the cost to maintain C is poly(k/) words. Notice that, since each entry of A has at most O(log(sn)) bits, each entry of Y1 , Y2 , Y3 , C has at most O(log(sn)) bits. Due to Theorem J.7, each entry of X1∗ , X2∗ , X3∗ has at most O(log(sn)) bits, and the sizes of X1∗ , X2∗ , X3∗ are poly(k/) words. Thus the space cost in line 26 is poly(k/) words. The total space cost is poly(k/) + O(nk/) words. Remark K.4. In the Algorithm 40, for each update operation, we need O(k/) time to maintain matrices V1 , V2 , V3 , and we need poly(k/) time to maintain tensor C. Thus the update time is poly(k/). At the end of the stream, the time to compute X1∗ , X2∗ , X3∗ = arg min X1 ,X2 ,X3 ∈RO(k/)×k k X (Y1 X1 )j ⊗ (Y2 X2 )j ⊗ (Y3 X3 )j − C j=1 , F is exponential in poly(k/) running time since it should use a polynomial system solver. Instead of computing the rank-k solution, we can solve the following: α∗ = arg min α∈Rs1 ×s2 ×s3 s1 X s2 X s3 X i=1 j=1 l=1 αi,j,l · (Y1 )i ⊗ (Y2 )j ⊗ (Y3 )l − C F 179 Algorithm 40 Turnstile Frobenius Norm Low Rank Approximation Algorithm 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: procedure TurnstileStreaming(k,S) s1 ← s2 ← s3 ← O(k/). 2 Construct sketching matrices Si ∈ Rn ×si , ∀i ∈ [3] where entries of S1 , S2 , S3 are w1 -wise independent random N (0, 1/si ) Gaussian variables. t1 ← t2 ← t3 ← poly(k/). Construct sparse embedding matrices Ti ∈ Rti ×n , ∀i ∈ [3] where entries are w2 -wise independent. Initialize matrices: Vi ← {0}n×si , ∀i ∈ [3]. C ← {0}t1 ×t2 ×t3 for i ∈ [l] do Receive update operation (xi , yi , zi , δi ) from the data stream S. for r = 1 → s1 do (V1 )xi ,r ← (V1 )xi ,r + δi · (S1 )(yi −1)n+zi ,r . end for for r = 1 → s2 do (V2 )yi ,r ← (V2 )yi ,r + δi · (S2 )(zi −1)n+xi ,r . end for for r = 1 → s3 do (V3 )zi ,r ← (V3 )zi ,r + δi · (S3 )(xi −1)n+yi ,r . end for for r = 1 → t1 , p = 1 → t2 , q = 1 → t3 do Cr,p,q ← Cr,p,q + δi · (T1 )r,xi (T2 )p,yi (T3 )q,zi . end for end for Compute Y1 ← T1 V1 , Y2 ← T2 V2 , Y3 ← T3 V3 . Compute Xi∗ ∈ Rsi ×k , ∀i ∈ [3] by solving min k(Y1 X1 ) ⊗ (Y2 X2 ) ⊗ (Y3 X3 ) − CkF X1 ,X2 ,X3 Compute U ∗ ← V1 X1∗ , V ∗ ← V2 X2∗ , W ∗ ← V3 X3∗ . 28: return U ∗ , V ∗ , W ∗ 29: end procedure 27: which will then give s1 X s2 X s3 X i=1 j=1 l=1 ∗ αi,j,l · (Y1 )i ⊗ (Y2 )j ⊗ (Y3 )l to be a rank-O(k 3 /3 ) bicriteria solution. Further, similar to Theorem C.8, we can solve min U ∈Rn×s2 s3 where C = P i Ai (I, T2 , T3 ). s1 X s2 X i=1 j=1 Ui+s1 (j−1) ⊗ (Y2 )i ⊗ (Y3 )j − C F Thus, we can obtain a rank-O(k 2 /2 ) in polynomial time. 180 Remark K.5. If we choose S1 , S2 , S3 , T1 , T2 , T3 to be random Cauchy matrices, then we are able to apply the entry-wise `1 norm low rank tensor approximation algorithm (see Theorem D.17) in turnstile model. 181 L Extension to Other Tensor Ranks The tensor rank studied in the previous sections is also called the CP rank or canonical rank. The tensor rank can be thought of as a direct extension of the matrix rank. We would like to point out that there are other definitions of tensor rank, e.g., the tucker rank and train rank. In this section we explain how to extend our proofs to other notions of tensor rank. Section L.1 provides the extension to tucker rank, and Section L.2 provides the extension to train rank. L.1 Tensor Tucker rank Tensor Tucker rank has been studied in a number of works [KC07, PC08, MH09, ZW13, YC14]. We provide the formal definition here: L.1.1 Definitions Definition L.1 (Tucker rank). Given a third order tensor A ∈ Rn×n×n , we say A has tucker rank k if k is the smallest integer such that there exist three matrices U, V, W ∈ Rn×k and a (small) tensor C ∈ Rk×k×k satisfying Ai,j,l = k X k X k X i0 =1 j 0 =1 l0 =1 Ci0 ,j 0 ,l0 Ui,i0 Vj,j 0 Wl,l0 , ∀i, j, l ∈ [n] × [n] × [n], or equivalently, A = C(U, V, W ). L.1.2 Algorithm Algorithm 41 Frobenius Norm Low (Tucker) Rank Approximation 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: procedure FLowTuckerRankApprox(A, n, k, ) . Theorem L.2 s1 ← s2 ← s3 ← O(k/). t1 ← t2 ← t3 ← poly(k, 1/). 2 2 2 Choose sketching matrices S1 ∈ Rn ×s1 , S2 ∈ Rn ×s2 , S3 ∈ Rn ×s3 . . Definition B.18 t ×n t ×n t ×n 1 2 3 Choose sketching matrices T1 ∈ R , T2 ∈ R , T3 ∈ R . Compute Ai Si , ∀i ∈ [3]. Compute Ti Ai Si , ∀i ∈ [3]. Compute B ← A(T1 , T2 , T3 ). Create variables for Xi ∈ Rsi ×k , ∀i ∈ [3]. Create variables for C ∈ Rk×k×k . Run a polynomial system verifier for kC((Y1 X1 ), (Y2 X2 ), (Y3 X3 )) − Bk2F . return C,A1 S1 X1 , A2 S2 X2 , and A3 S3 X3 . end procedure Theorem L.2. Given a third order tensor A ∈ Rn×n×n , for any k ≥ 1 and  ∈ (0, 1), there exists 2 3 an algorithm which takes O(nnz(A)) + n poly(k, 1/) + 2O(k /+k ) time and outputs three matrices U, V, W ∈ Rn×k , and a tensor C ∈ Rk×k×k for which kC(U, V, W ) − Ak2F ≤ (1 + ) min tucker rank −k Ak 182 kAk − Ak2F holds with probability 9/10. Proof. We define OPT to be OPT = min tucker rank −k A0 kA0 − Ak2F . Suppose the optimal Ak = C ∗ (U ∗ , V ∗ , W ∗ ). We fix C ∗ ∈ Rk×k×k , V ∗ ∈ Rn×k and W ∗ ∈ Rn×k . We use V1∗ , V2∗ , · · · , Vk∗ to denote the columns of V ∗ and W1∗ , W2∗ , · · · , Wk∗ to denote the columns of W ∗ . We consider the following optimization problem, min U1 ,··· ,Uk ∈Rn kC ∗ (U, V ∗ , W ∗ ) − Ak2F , which is equivalent to min U1 ,··· ,Uk ∈Rn kU · C ∗ (I, V ∗ , W ∗ ) − Ak2F , because C ∗ (U, V ∗ , W ∗ ) = U · C ∗ (I, V ∗ , W ∗ ) according to Definition A.6. Recall that C ∗ (I, V ∗ , W ∗ ) denotes a k × n × n tensor. Let (C ∗ (I, V ∗ , W ∗ ))1 denote the matrix obtained by flattening C ∗ (I, V ∗ , W ∗ ) along the first dimension. We use matrix Z1 to denote 2 (C ∗ (I, V ∗ , W ∗ ))1 ∈ Rk×n . Then we can obtain the following equivalent objective function, min kU Z1 − A1 k2F . U ∈Rn×k Notice that minU ∈Rn×k kU Z1 − A1 k2F = OPT, since Ak = U ∗ Z1 . 2 Let S1> ∈ Rs1 ×n be the sketching matrix defined in Definition B.18, where s1 = O(k/). We obtain the following optimization problem, min kU Z1 S1 − A1 S1 k2F . U ∈Rn×k b ∈ Rn×k denote the optimal solution to the above optimization problem. Let U A1 S1 (Z1 S1 )† . By Lemma B.22 and Theorem B.23, we have b = Then U b Z1 − A1 k2 ≤ (1 + ) min kU Z1 − A1 k2 = (1 + ) OPT, kU F F U ∈Rn×k which implies b , V ∗, W ∗) − A C ∗ (U 2 F ≤ (1 + ) OPT . b1 , · · · , U bk , we use the given matrix A1 , and we create s1 × k variables for matrix To write down U † (Z1 S1 ) . b ∈ Rn×k and W ∗ ∈ Rn×k , and we convert tensor A into matrix A2 . As our second step, we fix U 2 ∗ b Let matrix Z2 denote (C (U , I, W ∗ ))2 ∈ Rk×n . We consider the following objective function, min kV Z2 − A2 k2F , V ∈Rn×k for which the optimal cost is at most (1 + ) OPT. 183 2 Let S2> ∈ Rs2 ×n be a sketching matrix defined in Definition B.18, where s2 = O(k/). We sketch S2 on the right of the objective function to obtain a new objective function, min kV Z2 S2 − A2 S2 k2F . V ∈Rn×k Let Vb ∈ Rn×k denote the optimal solution to the above problem. Then Vb = A2 S2 (Z2 S2 )† . By Lemma B.22 and Theorem B.23, we have, kVb Z2 − A2 k2F ≤ (1 + ) min kV Z2 − A2 k2F ≤ (1 + )2 OPT, V ∈Rn×k which implies b , Vb , W ∗ ) − A C ∗ (U 2 F ≤ (1 + )2 OPT . 2 To write down Vb1 , · · · , Vbk , we need to use the given matrix A2 ∈ Rn ×n , and we need to create s2 × k variables for matrix (Z2 S2 )† . b ∈ Rn×k and Vb ∈ Rn×k . We convert tensor A ∈ Rn×n×n As our third step, we fix the matrices U 2 b , Vb , I))3 ∈ Rk×n2 . We consider the following into matrix A3 ∈ Rn ×n . Let matrix Z3 denote (C ∗ (U objective function, min kW Z3 − A3 k2F , W ∈Rn×k which has optimal cost at most (1 + )2 OPT. 2 Let S3> ∈ Rs3 ×n be a sketching matrix defined in Definition B.18, where s3 = O(k/). We sketch S3 on the right of the objective function to obtain a new objective function, min kW Z3 S3 − A3 S3 k2F . W ∈Rn×k c ∈ Rn×k denote the optimal solution of the above problem. Then W c = A3 S3 (Z3 S3 )† . By Let W Lemma B.22 and Theorem B.23, we have, c Z3 − A3 k2F ≤ (1 + ) min kW Z3 − A3 k2F ≤ (1 + )3 OPT . kW W ∈Rn×k Thus, we have min X1 ,X2 ,X3 kC ∗ ((A1 S1 X1 ), (A2 S2 X2 ), (A3 S3 X3 )) − Ak2F ≤ (1 + )3 OPT . Let V1 = A1 S1 , V2 = A2 S2 , and V3 = A3 S3 . We then apply Lemma C.3, and we obtain Vb1 , Vb2 , Vb3 , B. We then apply Theorem C.45. Correctness follows by rescaling  by a constant factor. Running time. Due to Definition B.18, the running time of line 7 (Algorithm 41) is O(nnz(A)) + n poly(k, 1/). Due to Lemma C.3, line 7 and 8 can be executed in nnz(A) + n poly(k, 1/) time. The running time of line 11 is given by Theorem C.45. (For simplicity, we ignore the bit complexity in the running time.) 184 L.2 L.2.1 Tensor Train rank Definitions The tensor train rank has been studied in several works [Ose11, OTZ11, ZWZ16, PTBD16]. We provide the formal definition here. Definition L.3 (Tensor Train rank). Given a third order tensor A ∈ Rn×n×n , we say A has train rank k if k is the smallest integer such that there exist three tensors U ∈ R1×n×k , V ∈ Rk×n×k , W ∈ Rk×n×1 satisfying: Ai,j,l = 1 X k X k X 1 X i1 =1 i2 =1 i3 =1 i4 =1 or equivalently, Ai,j,l = Ui1 ,i,i2 Vi2 ,j,i3 Wi3 ,l,i4 , ∀i, j, l ∈ [n] × [n] × [n], k X k X (U2 )i,i2 (V2 )j,i2 +k(i3 −1) (W2 )l,i3 , i2 =1 i3 =1 2 where V2 ∈ Rn×k denotes the matrix obtained by flattening the tensor U along the second dimension, and (V2 )i,i1 +k(i2 −1) denotes the entry in the i-th row and i1 + k(i2 − 1)-th column of V2 . We similarly define U2 , W2 ∈ Rn×k . Algorithm 42 Frobenius Norm Low (Train) rank Approximation 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: procedure FLowTrainRankApprox(A, n, k, ) . Theorem L.4 s1 ← s3 ← O(k/). s2 ← O(k 2 /). t1 ← t2 ← t3 ← poly(k, 1/). 2 2 2 Choose sketching matrices S1 ∈ Rn ×s1 , S2 ∈ Rn ×s2 , S3 ∈ Rn ×s3 . . Definition B.18 Choose sketching matrices T1 ∈ Rt1 ×n , T2 ∈ Rt2 ×n , T3 ∈ Rt3 ×n . Compute Ai Si , ∀i ∈ [3]. Compute Ti Ai Si , ∀i ∈ [3]. Compute B ← A(T1 , T2 , T3 ). Create variables for X1 ∈ Rs1 ×k . Create variables for X3 ∈ Rs3 ×k . 2 Create variables for X2 ∈ Rs2 ×k . Create variables for C ∈ Rk×k×k . P P Run polynomial system verifier for k ki2 =1 ki3 =1 (Y1 X1 )i2 (Y2 X2 )i2 +k(i3 −1) (Y3 X3 )i3 − Bk2F . return A1 S1 X1 , A2 S2 X2 , and A3 S3 X3 . end procedure L.2.2 Algorithm Theorem L.4. Given a third order tensor A ∈ Rn×n×n , for any k ≥ 1,  ∈ (0, 1), there exists 4 an algorithm which takes O(nnz(A)) + n poly(k, 1/) + 2O(k /) time and outputs three tensors U ∈ R1×n×k , V ∈ Rk×n×k , W ∈ Rk×n×1 such that k X k X (U2 )i ⊗ (V2 )i+k(j−1) ⊗ (W2 )j − A i=1 j=1 185 2 ≤ (1 + ) F min train rank −k Ak kAk − Ak2F holds with probability 9/10. Proof. We define OPT as OPT = min train rank −k A0 kA0 − Ak2F . Suppose the optimal Ak = k X k X i=1 j=1 ∗ Ui∗ ⊗ Vi+k(j−1) ⊗ Wj∗ . 2 We fix V ∗ ∈ Rn×k and W ∗ ∈ Rn×k . We use V1∗ , V2∗ , · · · , Vk∗2 to denote the columns of V ∗ , and W1∗ , W2∗ , · · · , Wk∗ to denote the columns of W ∗ . We consider the following optimization problem, min U ∈Rn×k k X k X i=1 j=1 2 Ui ⊗ ∗ Vi+k(j−1) ⊗ Wj∗ −A , F which is equivalent to  min U ∈Rn×k  ∗ ∗ V ⊗ W j j=1 1+k(j−1)   P   k V∗ ⊗ Wj∗    2+k(j−1) U · j=1 −A     ···  k  P ∗  ∗ Vk+k(j−1) ⊗ Wj k P j=1 n×n2 2 . F Let A1 ∈ R denote the matrix obtained by flattening the tensor A along the first dimension. 2 We use matrix Z1 ∈ Rk×n to denote  k  P ∗ ∗) vec(V ⊗ W j  1+k(j−1) j=1   P   k vec(V ∗ ∗ ) ⊗ W  j  2+k(j−1) j=1 .     ···  k   P ∗ ∗ vec(Vk+k(j−1) ⊗ Wj ) j=1 Then we can obtain the following equivalent objective function, min kU Z1 − A1 k2F . U ∈Rn×k Notice that minU ∈Rn×k kU Z1 − A1 k2F = OPT, since Ak = U ∗ Z1 . 2 Let S1> ∈ Rs1 ×n be a sketching matrix defined in Definition B.18, where s1 = O(k/). We obtain the following optimization problem, min kU Z1 S1 − A1 S1 k2F . U ∈Rn×k 186 b ∈ Rn×k denote the optimal solution to the above optimization problem. Let U A1 S1 (Z1 S1 )† . By Lemma B.22 and Theorem B.23, we have b = Then U b Z1 − A1 k2 ≤ (1 + ) min kU Z1 − A1 k2 = (1 + ) OPT, kU F F U ∈Rn×k which implies k X k X i=1 j=1 2 bi ⊗ U ∗ Vi+k(j−1) ⊗ Wj∗ −A ≤ (1 + ) OPT . F b1 , · · · , U bk , we use the given matrix A1 , and we create s1 × k variables for matrix To write down U (Z1 S1 )† . b ∈ Rn×k and W ∗ ∈ Rn×k , and we convert the tensor A into matrix As our second step, we fix U 2 ×n2 k A2 . Let matrix Z2 ∈ R denote the matrix where the (i, j)-th row is the vectorization of ∗ b Ui ⊗ Wj . We consider the following objective function, min kV Z2 − A2 k2F , V ∈Rn×k for which the optimal cost is at most (1 + ) OPT. 2 Let S2> ∈ Rs2 ×n be a sketching matrix defined in Definition B.18, where s2 = O(k 2 /). We sketch S2 on the right of the objective function to obtain the new objective function, min kV Z2 S2 − A2 S2 k2F . V ∈Rn×k Let Vb ∈ Rn×k denote the optimal solution of the above problem. Then Vb = A2 S2 (Z2 S2 )† . By Lemma B.22 and Theorem B.23, we have, kVb Z2 − A2 k2F ≤ (1 + ) min kV Z2 − A2 k2F ≤ (1 + )2 OPT, V ∈Rn×k which implies k X k X i=1 j=1 2 bi ⊗ Vbi+k(j−1) ⊗ W ∗ − A U ≤ (1 + )2 OPT . F 2 To write down Vb1 , · · · , Vbk , we need to use the given matrix A2 ∈ Rn ×n , and we need to create s2 × k variables for matrix (Z2 S2 )† . b ∈ Rn×k and Vb ∈ Rn×k . We convert tensor A ∈ Rn×n×n As our third step, we fix the matrices U 2 ×n 2 n into matrix A3 ∈ R . Let matrix Z3 ∈ Rk×n denote  P  k bi ⊗ Vbi+k·0 ) vec( U   Pi=1 k b b  i=1 vec(Ui ⊗ Vi+k·1 )  .  ···   Pk b b i=1 vec(Ui ⊗ Vi+k·(k−1) ) We consider the following objective function, min kW Z3 − A3 k2F , W ∈Rn×k 187 which has optimal cost at most (1 + )2 OPT. 2 Let S3> ∈ Rs3 ×n be a sketching matrix defined in Definition B.18, where s3 = O(k/). We sketch S3 on the right of the objective function to obtain a new objective function, min kW Z3 S3 − A3 S3 k2F . W ∈Rn×k c ∈ Rn×k denote the optimal solution of the above problem. Then W c = A3 S3 (Z3 S3 )† . By Let W Lemma B.22 and Theorem B.23, we have, c Z3 − A3 k2 ≤ (1 + ) min kW Z3 − A3 k2 ≤ (1 + )3 OPT . kW F F W ∈Rn×k Thus, we have min X1 ,X2 ,X3 k X k X (A1 S1 X1 )i ⊗ (A2 S2 X2 )i+k(j−1) ⊗ (A3 S3 X3 )j − A i=1 j=1 2 ≤ (1 + )3 OPT . F Let V1 = A1 S1 , V2 = A2 S2 , and V3 = A3 S3 . We then apply Lemma C.3, and we obtain Vb1 , Vb2 , Vb3 , B. We then apply Theorem C.45. Correctness follows by rescaling  by a constant factor. Running time. Due to Definition B.18, the running time of line 7 (Algorithm 42) is O(nnz(A)) + n poly(k, 1/). Due to Lemma C.3, lines 8 and 9 can be executed in nnz(A) + n poly(k, 1/) time. 4 The running time of 2O(k /) comes from running Theorem C.45 (For simplicity, we ignore the bit complexity in the running time.) 188 M Acknowledgments The authors would like to thank Udit Agarwal, Alexandr Andoni, Arturs Backurs, Saugata Basu, Lijie Chen, Xi Chen, Thomas Dillig, Yu Feng, Rong Ge, Daniel Hsu, Chi Jin, Ravindran Kannan, J. M. Landsberg, Qi Lei, Fu Li, Syed Mohammad Meesum, Ankur Moitra, Dana Moshkovitz, Cameron Musco, Richard Peng, Eric Price, Govind Ramnarayan, Ilya Razenshteyn, James Renegar, Rocco Servedio, Tselil Schramm, Clifford Stein, Wen Sun, Yining Wang, Zhaoran Wang, Wei Ye, Huacheng Yu, Huan Zhang, Kai Zhong, David Zuckerman for useful discussions. 189 References [AAB+ 07] Evrim Acar, Canan Aykut-Bingöl, Haluk Bingol, Rasmus Bro, and Bülent Yener. Multiway analysis of epilepsy tensors. In Proceedings 15th International Conference on Intelligent Systems for Molecular Biology (ISMB) & 6th European Conference on Computational Biology (ECCB), Vienna, Austria, July 21-25, 2007, pages 10–18, 2007. [ABF+ 16] Jason Altschuler, Aditya Bhaskara, Gang Fu, Vahab Mirrokni, Afshin Rostamizadeh, and Morteza Zadimoghaddam. Greedy column subset selection: New bounds and distributed algorithms. In International Conference on Machine Learning (ICML). https://arxiv.org/pdf/1605.08795, 2016. [ABSV14] Pranjal Awasthi, Avrim Blum, Or Sheffet, and Aravindan Vijayaraghavan. Learning mixtures of ranking models. In Advances in Neural Information Processing Systems (NIPS). https://arxiv.org/pdf/1410.8750, 2014. [ABW17] Pranjal Awasthi, Maria-Florina Balcan, and Colin White. General and robust communication-efficient algorithms for distributed clustering. In arXiv preprint. https://arxiv.org/pdf/1703.00830, 2017. [AÇKY05] Evrim Acar, Seyit A Çamtepe, Mukkai S Krishnamoorthy, and Bülent Yener. Modeling and multiway analysis of chatroom tensors. In International Conference on Intelligence and Security Informatics, pages 256–268. Springer, 2005. [ACY06] Evrim Acar, Seyit A Camtepe, and Bülent Yener. Collective sampling and analysis of high order tensors for chatroom communications. In International Conference on Intelligence and Security Informatics, pages 213–224. Springer, 2006. [ADGM16] Anima Anandkumar, Yuan Deng, Rong Ge, and Hossein Mobahi. Homotopy analysis for tensor pca. In arXiv preprint. https://arxiv.org/pdf/1610.09322, 2016. [AFdLGTL09] Santiago Aja-Fernández, Rodrigo de Luis Garcia, Dacheng Tao, and Xuelong Li. Tensors in image processing and computer vision. Springer Science & Business Media, 2009. [AFH+ 12] Anima Anandkumar, Dean P Foster, Daniel J Hsu, Sham M Kakade, and Yi-Kai Liu. A spectral algorithm for latent dirichlet allocation. In Advances in Neural Information Processing Systems(NIPS), pages 917–925. https://arxiv.org/pdf/ 1204.6703, 2012. [AGH+ 14] Animashree Anandkumar, Rong Ge, Daniel J. Hsu, Sham M. Kakade, and Matus Telgarsky. Tensor decompositions for learning latent variable models. In Journal of Machine Learning Research, volume 15(1), pages 2773–2832. https://arxiv.org/ pdf/1210.7559, 2014. [AGHK14] Animashree Anandkumar, Rong Ge, Daniel J Hsu, and Sham M Kakade. A tensor approach to learning mixed membership community models. In Journal of Machine Learning Research, volume 15(1), pages 2239–2312. https://arxiv.org/pdf/1302. 2684, 2014. 190 [AGKM12] Sanjeev Arora, Rong Ge, Ravindran Kannan, and Ankur Moitra. Computing a nonnegative matrix factorization - provably. In Proceedings of the 44th Symposium on Theory of Computing Conference (STOC), New York, NY, USA, May 19 - 22, 2012, pages 145–162. https://arxiv.org/pdf/1111.0952, 2012. [AGMR16] Sanjeev Arora, Rong Ge, Tengyu Ma, and Andrej Risteski. Provable learning of noisy-or networks. In Proceedings of the 49th Annual Symposium on the Theory of Computing (STOC). ACM, https://arxiv.org/pdf/1612.08795, 2016. [AKDM10] E. Acar, T. G. Kolda, D. M. Dunlavy, and M. Morup. Scalable Tensor Factorizations for Incomplete Data. In arXiv preprint. https://arxiv.org/pdf/1005.2197, 2010. [AKO11] Alexandr Andoni, Robert Krauthgamer, and Krzysztof Onak. Streaming algorithms via precision sampling. In Foundations of Computer Science (FOCS), 2011 IEEE 52nd Annual Symposium on, pages 363–372. IEEE, https://arxiv.org/pdf/1011. 1263, 2011. [ALA16] Kamyar Azizzadenesheli, Alessandro Lazaric, and Animashree Anandkumar. Reinforcement learning of POMDPs using spectral methods. In 29th Annual Conference on Learning Theory (COLT), pages 193–256. https://arxiv.org/pdf/1602.07764, 2016. [ALB13] Mohammad Gheshlaghi Azar, Alessandro Lazaric, and Emma Brunskill. Sequential transfer in multi-armed bandit with finite set of models. In Advances in Neural Information Processing Systems(NIPS), pages 2220–2228. https://arxiv.org/pdf/ 1307.6887, 2013. [All12a] Genevera Allen. Sparse higher-order principal components analysis. In AISTATS, volume 15, 2012. [All12b] Genevera I Allen. Regularized tensor factorizations and higher-order principal components analysis. In arXiv preprint. https://arxiv.org/pdf/1202.2476, 2012. [AM07] Dimitris Achlioptas and Frank McSherry. Fast computation of low-rank matrix approximations. J. ACM, 54(2):9, 2007. [ANW14] Haim Avron, Huy Nguyen, and David Woodruff. Subspace embeddings for the polynomial kernel. In Advances in Neural Information Processing Systems(NIPS), pages 2258–2266, 2014. [Ban38] Stefan Banach. Über homogene polynome in (l2 ). Studia Mathematica, 7(1):36–44, 1938. [BBC+ 17] Jaroslaw Blasiok, Vladimir Braverman, Stephen R Chestnut, Robert Krauthgamer, and Lin F Yang. Streaming symmetric norms via measure concentration. In Proceedings of the 49th Annual Symposium on the Theory of Computing(STOC). ACM, https://arxiv.org/pdf/1511.01111, 2017. [BBLM14] MohammadHossein Bateni, Aditya Bhaskara, Silvio Lattanzi, and Vahab Mirrokni. Distributed balanced clustering via mapping coresets. In Advances in Neural Information Processing Systems (NIPS), pages 2591–2599, 2014. 191 [BCI+ 16] Vladimir Braverman, Stephen R Chestnut, Nikita Ivkin, Jelani Nelson, Zhengyu Wang, and David P Woodruff. Bptree: an `2 heavy hitters algorithm using constant memory. In Proceedings of the 35th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems (PODS). https://arxiv.org/pdf/1603.00759, 2016. [BCIW16] Vladimir Braverman, Stephen R Chestnut, Nikita Ivkin, and David P Woodruff. Beating countsketch for heavy hitters in insertion streams. In Proceedings of the 48th Annual Symposium on the Theory of Computing (STOC). https://arxiv. org/pdf/1511.00661, 2016. [BCKY16] Vladimir Braverman, Stephen R Chestnut, Robert Krauthgamer, and Lin F Yang. Sketches for matrix norms: Faster, smaller and more general. In arXiv preprint. https://arxiv.org/pdf/1609.05885, 2016. [BCL05] Zheng-Jian Bai, Raymond H Chan, and Franklin T Luk. Principal component analysis for distributed data sets with updating. In Advanced Parallel Processing Technologies, pages 471–483. Springer, 2005. [BCMV14] Aditya Bhaskara, Moses Charikar, Ankur Moitra, and Aravindan Vijayaraghavan. Smoothed analysis of tensor decompositions. In Proceedings of the 46th Annual ACM Symposium on Theory of Computing, pages 594–603. ACM, https://arxiv. org/pdf/1311.3651, 2014. [BCS97] Peter Bürgisser, Michael Clausen, and Amin Shokrollahi. Algebraic complexity theory, volume 315. Springer Science & Business Media, 1997. [BCV14] Aditya Bhaskara, Moses Charikar, and Aravindan Vijayaraghavan. Uniqueness of tensor decompositions with applications to polynomial identifiability. In 27th Annual Conference on Learning Theory (COLT), pages 742–778. https://arxiv.org/pdf/ 1304.8087, 2014. [BDL16] Amitabh Basu, Michael Dinitz, and Xin Li. Computing approximate PSD factorizations. In arXiv preprint. https://arxiv.org/pdf/1602.07351, 2016. [BDM11] Christos Boutsidis, Petros Drineas, and Malik Magdon-Ismail. Near optimal columnbased matrix reconstruction. In IEEE 52nd Annual Symposium on Foundations of Computer Science (FOCS), 2011, Palm Springs, CA, USA, October 22-25, 2011, pages 305–314. https://arxiv.org/pdf/1103.0995, 2011. [Bin80] Dario Bini. Border rank of a p × q × 2 tensor and the optimal approximation of a pair of bilinear forms. Automata, languages and programming, pages 98–108, 1980. [Bin86] Dario Bini. Border rank of m × n × (mn-q) tensors. Linear Algebra and Its Applications, 79:45–51, 1986. [BKLW14] Maria-Florina Balcan, Vandana Kanchanapally, Yingyu Liang, and David Woodruff. Improved distributed principal component analysis. In Advances in Neural Information Processing Systems (NIPS). https://arxiv.org/pdf/1408.5823, 2014. [BKS15] Boaz Barak, Jonathan A Kelner, and David Steurer. Dictionary learning and tensor decomposition via the sum-of-squares method. In Proceedings of the Forty-Seventh 192 Annual ACM on Symposium on Theory of Computing (STOC), pages 143–151. ACM, https://arxiv.org/pdf/1407.1543, 2015. [BLG+ 15] Aurélien Bellet, Yingyu Liang, Alireza Bagheri Garakani, Maria-Florina Balcan, and Fei Sha. A distributed frank-wolfe algorithm for communication-efficient sparse learning. In Proceedings of the 2015 SIAM International Conference on Data Mining (ICDM), pages 478–486. SIAM, https://arxiv.org/pdf/1404.2644, 2015. [BLS+ 16] Maria-Florina Balcan, Yingyu Liang, Le Song, David Woodruff, and Bo Xie. Communication efficient distributed kernel principal component analysis. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), pages 725–734. ACM, https://arxiv.org/pdf/1503.06858, 2016. [BM16] Boaz Barak and Ankur Moitra. Noisy tensor completion via the sum-of-squares hierarchy. In Proceedings of the 29th Conference on Learning Theory, COLT 2016, New York, USA, June 23-26, 2016, pages 417–445. https://arxiv.org/pdf/1501. 06521, 2016. [BMD09] Christos Boutsidis, Michael W Mahoney, and Petros Drineas. An improved approximation algorithm for the column subset selection problem. In Proceedings of the twentieth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 968–977. Society for Industrial and Applied Mathematics, https://arxiv.org/pdf/ 0812.4293, 2009. [BNR+ 15] Guillaume Bouchard, Jason Naradowsky, Sebastian Riedel, Tim Rocktäschel, and Andreas Vlachos. Matrix and tensor factorization methods for natural language processing. In ACL (Tutorial Abstracts), pages 16–18, 2015. [Bou11] Christos Boutsidis. Topics in matrix sampling algorithms. In Ph.D. Thesis. arXiv preprint. https://arxiv.org/pdf/1105.0709, 2011. [BPR96] Saugata Basu, Richard Pollack, and Marie-Françoise Roy. On the combinatorial and algebraic complexity of quantifier elimination. J. ACM, 43(6):1002–1045, 1996. [BRB08] Yann-Ael Le Borgne, Sylvain Raybaud, and Gianluca Bontempi. Distributed principal component analysis for wireless sensor networks. Sensors, 2008. [BS15] Srinadh Bhojanapalli and Sujay Sanghavi. A new sampling technique for tensors. In arXiv preprint. https://arxiv.org/pdf/1502.05023, 2015. [BSS12] Joshua Batson, Daniel A Spielman, and Nikhil Srivastava. Twice-ramanujan sparsifiers. In SIAM Journal on Computing, volume 41(6), pages 1704–1721. https: //arxiv.org/pdf/0808.0163, 2012. [BW14] Christos Boutsidis and David P Woodruff. Optimal cur matrix decompositions. In Proceedings of the 46th Annual ACM Symposium on Theory of Computing (STOC), pages 353–362. ACM, https://arxiv.org/pdf/1405.7910, 2014. [BWZ16] Christos Boutsidis, David P Woodruff, and Peilin Zhong. Optimal principal component analysis in distributed and streaming models. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 236–249. ACM, https://arxiv.org/pdf/1504.06729, 2016. 193 [CC70] J Douglas Carroll and Jih-Jie Chang. Anaylsis of individual differences in multidimensional scaling via an n-way generalization of eckart-young decomposition. Psychometrika, 35(3):283–319, 1970. [CC10] Cesar F Caiafa and Andrzej Cichocki. Generalizing the column–row matrix decomposition to multi-way arrays. Linear Algebra and its Applications, 433(3):557–573, 2010. [CDMI+ 13] Kenneth L Clarkson, Petros Drineas, Malik Magdon-Ismail, Michael W Mahoney, Xiangrui Meng, and David P Woodruff. The fast cauchy transform and faster robust linear regression. In Proceedings of the Twenty-Fourth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 466–477. Society for Industrial and Applied Mathematics, https://arxiv.org/pdf/1207.4684, 2013. [CEM+ 15] Michael B Cohen, Sam Elder, Cameron Musco, Christopher Musco, and Madalina Persu. Dimensionality reduction for k-means clustering and low rank approximation. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing (STOC), pages 163–172. ACM, https://arxiv.org/pdf/1410.6801, 2015. [Cla05] Kenneth L Clarkson. Subgradient and sampling algorithms for `1 regression. In Proceedings of the sixteenth annual ACM-SIAM symposium on Discrete algorithms (SODA), pages 257–266, 2005. [CLK+ 15] Fengyu Cong, Qiu-Hua Lin, Li-Dan Kuang, Xiao-Feng Gong, Piia Astikainen, and Tapani Ristaniemi. Tensor decomposition of eeg signals: a brief review. Journal of neuroscience methods, 248:59–69, 2015. [CLM+ 15] Michael B Cohen, Yin Tat Lee, Cameron Musco, Christopher Musco, Richard Peng, and Aaron Sidford. Uniform sampling for matrix approximation. In Proceedings of the 2015 Conference on Innovations in Theoretical Computer Science (ITCS), pages 181–190. ACM, https://arxiv.org/pdf/1408.5099, 2015. [CLZ17] Longxi Chen, Yipeng Liu, and Ce Zhu. Iterative block tensor singular value thresholding for extraction of low rank component of image data. In ICASSP 2017, 2017. [CMDL+ 15] Andrzej Cichocki, Danilo Mandic, Lieven De Lathauwer, Guoxu Zhou, Qibin Zhao, Cesar Caiafa, and Huy Anh Phan. Tensor decompositions for signal processing applications: From two-way to multiway component analysis. IEEE Signal Processing Magazine, 32(2):145–163, 2015. [CNW15] Michael B Cohen, Jelani Nelson, and David P Woodruff. Optimal approximate matrix product in terms of stable rank. In Proceedings of the 43rd International Colloquium on Automata, Languages and Programming (ICALP), Rome, Italy, July 12-15, 2016. https://arxiv.org/pdf/1507.02268, 2015. [Com09] P. Comon. Tensor Decompositions, State of the Art and Applications. ArXiv eprints, 2009. [CP15] Michael B. Cohen and Richard Peng. `p row sampling by lewis weights. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing (STOC), STOC ’15, pages 183–192, New York, NY, USA, 2015. https: //arxiv.org/pdf/1412.0588. 194 [CV15] Nicoló Colombo and Nikos Vlassis. Fastmotif: spectral sequence motif discovery. Bioinformatics, pages 2623–2631, 2015. [CW87] Don Coppersmith and Shmuel Winograd. Matrix multiplication via arithmetic progressions. In Proceedings of the nineteenth annual ACM symposium on Theory of computing, pages 1–6. ACM, 1987. [CW09] Kenneth L. Clarkson and David P. Woodruff. Numerical linear algebra in the streaming model. In Proceedings of the 41st Annual ACM Symposium on Theory of Computing, STOC 2009, Bethesda, MD, USA, May 31 - June 2, 2009, pages 205–214, 2009. [CW13] Kenneth L. Clarkson and David P. Woodruff. Low rank approximation and regression in input sparsity time. In Symposium on Theory of Computing Conference, STOC’13, Palo Alto, CA, USA, June 1-4, 2013, pages 81–90. https: //arxiv.org/pdf/1207.6365, 2013. [CW15a] Kenneth L Clarkson and David P Woodruff. Input sparsity and hardness for robust subspace approximation. In 2015 IEEE 56th Annual Symposium on Foundations of Computer Science (FOCS), pages 310–329. IEEE, https://arxiv.org/pdf/1510. 06073, 2015. [CW15b] Kenneth L Clarkson and David P Woodruff. Sketching for m-estimators: A unified approach to robust regression. In Proceedings of the Twenty-Sixth Annual ACMSIAM Symposium on Discrete Algorithms (SODA), pages 921–939. SIAM, 2015. [CYYM14] Kai-Wei Chang, Scott Wen-tau Yih, Bishan Yang, and Chris Meek. Typed tensor decomposition of knowledge bases for relation extraction. In Empirical Methods in Natural Language Processing (EMNLP), pages 1568–1579, 2014. [DDH+ 09] Anirban Dasgupta, Petros Drineas, Boulos Harb, Ravi Kumar, and Michael W Mahoney. Sampling algorithms and coresets for `p regression. SIAM Journal on Computing, 38(5):2060–2078, 2009. [Dem14] Erik Demaine. Algorithmic lower bounds: Fun with hardness proofs, lecture 13. In MIT Course 6.890, 2014. [DLDM98] Lieven De Lathauwer and Bart De Moor. From matrix to tensor: Multilinear algebra and signal processing. In Institute of Mathematics and Its Applications Conference Series, volume 67, pages 1–16. Citeseer, 1998. [DMIMW12] Petros Drineas, Malik Magdon-Ismail, Michael W Mahoney, and David P Woodruff. Fast approximation of matrix coherence and statistical leverage. Journal of Machine Learning Research, 13(Dec):3475–3506, 2012. [DMM06a] Petros Drineas, Michael W. Mahoney, and S. Muthukrishnan. Subspace sampling and relative-error matrix approximation: Column-based methods. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, 9th International Workshop on Approximation Algorithms for Combinatorial Optimization Problems, APPROX 2006 and 10th International Workshop on Randomization and Computation, RANDOM 2006, Barcelona, Spain, August 28-30 2006, Proceedings, pages 316–326, 2006. 195 [DMM06b] Petros Drineas, Michael W. Mahoney, and S. Muthukrishnan. Subspace sampling and relative-error matrix approximation: Column-row-based methods. In Algorithms - ESA 2006, 14th Annual European Symposium, Zurich, Switzerland, September 1113, 2006, Proceedings, pages 304–314, 2006. [DMM08] Petros Drineas, Michael W. Mahoney, and S. Muthukrishnan. Relative-error CUR matrix decompositions. SIAM J. Matrix Analysis Applications, 30(2):844–881, 2008. [DR10] Amit Deshpande and Luis Rademacher. Efficient volume sampling for row/column subset selection. In 2010 51st Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 329–338. IEEE, https://arxiv.org/pdf/1004.4057, 2010. [DSL08] Vin De Silva and Lek-Heng Lim. Tensor rank and the ill-posedness of the best lowrank approximation problem. SIAM Journal on Matrix Analysis and Applications, 30(3):1084–1127, 2008. [DV06] Amit Deshpande and Santosh Vempala. Adaptive sampling and fast low-rank matrix approximation. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, pages 292–303. Springer, 2006. [Dvo61] AP Dvoredsky. Some results on convex bodies and banach spaces. In Proc. Internat. Sympos. Linear Spaces (Jerusalem, 1960), pages 123–160, 1961. [DW17] Huaian Diao and David P. Woodruff. Kronecker product and spline regression. manuscript, 2017. [ES09] Lars Eldén and Berkant Savas. A newton-grassmann method for computing the best multilinear rank-(r1,r2,r3) approximation of a tensor. SIAM J. Matrix Analysis Applications, 31(2):248–271, 2009. [FEGK13] Ahmed K Farahat, Ahmed Elgohary, Ali Ghodsi, and Mohamed S Kamel. Distributed column subset selection on mapreduce. In 2013 IEEE 13th International Conference on Data Mining (ICDM), pages 171–180. IEEE, 2013. [Fei02] Uriel Feige. Relations between average case complexity and approximation complexity. In Proceedings of the thiry-fourth annual ACM symposium on Theory of computing(STOC), pages 534–543. ACM, 2002. [FKV04] Alan M. Frieze, Ravi Kannan, and Santosh Vempala. Fast monte-carlo algorithms for finding low-rank approximations. J. ACM, 51(6):1025–1041, 2004. [FMMN11] Shmuel Friedland, V Mehrmann, A Miedlar, and M Nkengla. Fast low rank approximations of matrices and tensors. Electron. J. Linear Algebra, 22(10311048):462, 2011. [FMPS13] Shmuel Friedland, Volker Mehrmann, Renato Pajarola, and Susanne K. Suter. On best rank one approximation of tensors. Numerical Lin. Alg. with Applic., 20(6):942– 955, 2013. [FS99] Roger Fischlin and Jean-Pierre Seifert. Tensor-based trapdoors for cvp and their application to public key cryptography. Cryptography and Coding, pages 801–801, 1999. 196 [FT07] Shmuel Friedland and Anatoli Torokhti. Generalized rank-constrained matrix approximations. SIAM Journal on Matrix Analysis and Applications, 29(2):656–659, 2007. [FT15] Shmuel Friedland and Venu Tammali. Low-rank approximation of tensors. In Numerical Algebra, Matrix Theory, Differential-Algebraic Equations and Control Theory, pages 377–411. Springer, 2015. [GGH14] Quanquan Gu, Huan Gui, and Jiawei Han. Robust tensor decomposition with gross corruption. In Advances in Neural Information Processing Systems(NIPS), pages 1422–1430, 2014. [GHK15] Rong Ge, Qingqing Huang, and Sham M Kakade. Learning mixtures of gaussians in high dimensions. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing (STOC), pages 761–770. ACM, https://arxiv.org/pdf/ 1503.00424, 2015. [GJS76] Michael R Garey, David S. Johnson, and Larry Stockmeyer. Some simplified npcomplete graph problems. Theoretical computer science, 1(3):237–267, 1976. [GL04] Andreas Goerdt and André Lanka. An approximation hardness result for bipartite clique. In Electronic Colloquium on Computational Complexity, Report, volume 48. https://eccc.weizmann.ac.il/report/2004/048/, 2004. [GM15] Rong Ge and Tengyu Ma. Decomposing overcomplete 3rd order tensors using sumof-squares algorithms. In The 18th. International Workshop on Approximation Algorithms for Combinatorial Optimization Problems (APPROX’2015), and the 19th. International Workshop on Randomization and Computation (RANDOM’2015). https://arxiv.org/pdf/1504.05287, 2015. [GP14] Mina Ghashami and Jeff M Phillips. Relative errors for deterministic low-rank matrix approximations. In Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 707–717. Society for Industrial and Applied Mathematics, https://arxiv.org/pdf/1307.7454, 2014. [GQ14] Donald Goldfarb and Zhiwei Qin. Robust low-rank tensor recovery: Models and algorithms. SIAM Journal on Matrix Analysis and Applications, 35(1):225–253, 2014. [Har70] Richard A Harshman. Foundations of the parafac procedure: Models and conditions for an “explanatory” multi-modal factor analysis. ., 1970. [Hås90] Johan Håstad. Tensor rank is np-complete. Journal of Algorithms, 11(4):644–654, 1990. [Hås00] Johan Håstad. On bounded occurrence constraint satisfaction. Information Processing Letters, 74(1-2):1–6, 2000. [Hås01] Johan Håstad. Some optimal inapproximability results. (JACM), 48(4):798–859, 2001. 197 Journal of the ACM [HD08] Heng Huang and Chris Ding. Robust tensor factorization using r 1 norm. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1–8. IEEE, 2008. [HK13] Daniel Hsu and Sham M Kakade. Learning mixtures of spherical gaussians: moment methods and spectral decompositions. In Proceedings of the 4th conference on Innovations in Theoretical Computer Science(ITCS), pages 11–20. ACM, https://arxiv.org/pdf/1206.5766, 2013. [HL13] Christopher J Hillar and Lek-Heng Lim. Most tensor problems are np-hard. In Journal of the ACM (JACM), volume 60(6), page 45. https://arxiv.org/pdf/ 0911.1393, 2013. [HPS05] Tamir Hazan, Simon Polak, and Amnon Shashua. Sparse image coding using a 3d non-negative tensor factorization. In Tenth IEEE International Conference on Computer Vision(ICCV), volume 1, pages 50–57. IEEE, 2005. [HSS15] Samuel B Hopkins, Jonathan Shi, and David Steurer. Tensor principal component analysis via sum-of-square proofs. In 28th Annual Conference on Learning Theory (COLT), pages 956–1006. https://arxiv.org/pdf/1507.03269, 2015. [HSSS16] Samuel B Hopkins, Tselil Schramm, Jonathan Shi, and David Steurer. Fast spectral algorithms from sum-of-squares proofs: tensor decomposition and planted sparse vectors. In Proceedings of the 48th Annual Symposium on the Theory of Computing. ACM, https://arxiv.org/pdf/1512.02337, 2016. [IPZ98] Russell Impagliazzo, Ramamohan Paturi, and Francis Zane. Which problems have strongly exponential complexity? In Proceedings. 39th Annual Symposium on Foundations of Computer Science (FOCS), pages 653–662. IEEE, 1998. [IW97] Russell Impagliazzo and Avi Wigderson. P= BPP if E requires exponential circuits: Derandomizing the XOR lemma. In Proceedings of the twenty-ninth annual ACM symposium on Theory of computing (STOC), pages 220–229. ACM, 1997. [JMZ15] Bo Jiang, Shiqian Ma, and Shuzhong Zhang. Tensor principal component analysis via convex optimization. Mathematical Programming, 150(2):423–457, 2015. [JO14a] Prateek Jain and Sewoong Oh. Learning mixtures of discrete product distributions using spectral decompositions. In 27th Annual Conference on Learning Theory (COLT), pages 824–856. https://arxiv.org/pdf/1311.2972, 2014. [JO14b] Prateek Jain and Sewoong Oh. Provable tensor factorization with missing data. In Advances in Neural Information Processing Systems (NIPS), pages 1431–1439. https://arxiv.org/pdf/1406.2784, 2014. [JPT13] Gabriela Jeronimo, Daniel Perrucci, and Elias Tsigaridas. On the minimum of a polynomial function on a basic closed semialgebraic set and applications. SIAM Journal on Optimization, 23(1):241–255, 2013. [JSA15] Majid Janzamin, Hanie Sedghi, and Anima Anandkumar. Beating the perils of nonconvexity: Guaranteed training of neural networks using tensor methods. In arXiv preprint. https://arxiv.org/pdf/1506.08473, 2015. 198 [KABO10] Alexandros Karatzoglou, Xavier Amatriain, Linas Baltrunas, and Nuria Oliver. Multiverse recommendation: n-dimensional tensor factorization for context-aware collaborative filtering. In Proceedings of the fourth ACM conference on Recommender systems, pages 79–86. ACM, 2010. [KB06] Tamara Kolda and Brett Bader. The tophits model for higher-order web link analysis. In Workshop on link analysis, counterterrorism and security, volume 7, pages 26–29, 2006. [KB09] Tamara G. Kolda and Brett W. Bader. Tensor decompositions and applications. SIAM Review, 51(3):455–500, 2009. [KC07] Yong-Deok Kim and Seungjin Choi. Nonnegative tucker decomposition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR)., pages 1–8. IEEE, 2007. [KDS08] Wim P Krijnen, Theo K Dijkstra, and Alwin Stegeman. On the non-existence of optimal solutions and the occurrence of “degeneracy” in the candecomp/parafac model. Psychometrika, 73(3):431–439, 2008. [KHL89] JB Kruskal, RA Harshman, and ME Lundy. How 3-mfa data can cause degenerate parafac solutions, among other relationships. Multiway data analysis, pages 115–121, 1989. [KL11] J. Kelner and A. Levin. Spectral sparsification in the semi-streaming setting. In Symposium on Theoretical Aspects of Computer Science (STACS), 2011. [KLM+ 14] Michael Kapralov, Yin Tat Lee, Cameron Musco, Christopher Musco, and Aaron Sidford. Single pass spectral sparsification in dynamic streams. In 2014 IEEE 55th Annual Symposium on Foundations of Computer Science (FOCS), pages 561–570. IEEE, https://arxiv.org/pdf/1407.1289, 2014. [KM11] Tamara G Kolda and Jackson R Mayo. Shifted power method for computing tensor eigenpairs. SIAM Journal on Matrix Analysis and Applications, 32(4):1095–1124, 2011. [KN14] Daniel M Kane and Jelani Nelson. Sparser johnson-lindenstrauss transforms. In Journal of the ACM (JACM), volume 61(1), page 4. https://arxiv.org/pdf/1012. 1577, 2014. [Knu98] Donald E. Knuth. The art of computer programming, vol. 2 : seminumerical algorithms, 1998. [Kro83] Pieter M Kroonenberg. Three-mode principal component analysis: Theory and applications, volume 2. DSWO press, 1983. [KS08] Tamara G Kolda and Jimeng Sun. Scalable tensor decompositions for multi-aspect data mining. In Eighth IEEE International Conference on Data Mining (ICDM), pages 363–372. IEEE, 2008. [KVW14] Ravindran Kannan, Santosh S Vempala, and David P Woodruff. Principal component analysis and higher correlations for distributed data. In Proceedings of The 27th Conference on Learning Theory (COLT), pages 1040–1057, 2014. 199 [KYFD15] Liwei Kuang, Laurence Yang, Jun Feng, and Mianxiong Dong. Secure tensor decomposition using fully homomorphic encryption scheme. IEEE Transactions on Cloud Computing, 2015. [Lan06] J Landsberg. The border rank of the multiplication of 2× 2 matrices is seven. In Journal of the American Mathematical Society, volume 19(2), pages 447–459, 2006. [Lan12] Joseph M Landsberg. Tensors: geometry and applications, volume 128. American Mathematical Society Providence, RI, USA., http://www.math.tamu.edu/ ~joseph.landsberg/Tbookintro.pdf, 2012. [LFC+ 16] Canyi Lu, Jiashi Feng, Yudong Chen, Wei Liu, Zhouchen Lin, and Shuicheng Yan. Tensor robust principal component analysis: Exact recovery of corrupted low-rank tensors via convex optimization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5249–5257, 2016. [Lib13] Edo Liberty. Simple and deterministic matrix sketching. In Proceedings of the 19th ACM SIGKDD international conference on Knowledge discovery and data mining (KDD), pages 581–588. ACM, 2013. [LMS11] Daniel Lokshtanov, Dániel Marx, and Saket Saurabh. Lower bounds based on the exponential time hypothesis. In Bull. EATCS 105, pages 41–72, 2011. [LMV00a] Lieven De Lathauwer, Bart De Moor, and Joos Vandewalle. A multilinear singular value decomposition. SIAM J. Matrix Analysis Applications, 21(4):1253–1278, 2000. [LMV00b] Lieven De Lathauwer, Bart De Moor, and Joos Vandewalle. On the best rank-1 and rank-(R1 , R2 , · · · , Rn ) approximation of higher-order tensors. SIAM J. Matrix Analysis Applications, 21(4):1324–1342, 2000. [LMWY13] Ji Liu, Przemyslaw Musialski, Peter Wonka, and Jieping Ye. Tensor completion for estimating missing values in visual data. IEEE Trans. Pattern Anal. Mach. Intell., 35(1):208–220, 2013. [LNNT16] Kasper Green Larsen, Jelani Nelson, Huy L Nguyen, and Mikkel Thorup. Heavy hitters via cluster-preserving clustering. In Foundations of Computer Science (FOCS), 2016 IEEE 57th Annual Symposium on, pages 61–70. IEEE, https://arxiv.org/ pdf/1604.01357, 2016. [LRHG13] Ben London, Theodoros Rekatsinas, Bert Huang, and Lise Getoor. Multi-relational learning using weighted tensor decomposition with modular loss. In arXiv preprint. https://arxiv.org/abs/1303.1733, 2013. [LZBJ14] Tao Lei, Yuan Zhang, Regina Barzilay, and Tommi Jaakkola. Low-rank tensors for scoring dependency structures. In Association for Computational Linguistics(ACL), Best student paper award, 2014. [LZMB15] Tao Lei, Yuan Zhang, Alessandro Moschitti, and Regina Barzilay. High-order lowrank tensors for semantic role labeling. In In Proceedings of the 2015 Conference of the North America Chapter of the Association For Computational Linguistics– Human Language Technologies (NAACLHLT 2015. Citeseer, 2015. 200 [MBZ10] Sergio V Macua, Pavle Belanovic, and Santiago Zazo. Consensus-based distributed principal component analysis in wireless sensor networks. In Signal Processing Advances in Wireless Communications (SPAWC), 2010 IEEE Eleventh International Workshop on, pages 1–5. IEEE, 2010. [MH09] Morten Mørup and Lars Kai Hansen. Sparse coding and automatic relevance determination for multi-way models. In SPARS’09-Signal Processing with Adaptive Sparse Structured Representations, 2009. [MHG15] Cun Mu, Daniel Hsu, and Donald Goldfarb. Successive rank-one approximations for nearly orthogonally decomposable symmetric tensors. SIAM Journal on Matrix Analysis and Applications, 36(4):1638–1659, 2015. [MHWG14] Cun Mu, Bo Huang, John Wright, and Donald Goldfarb. Square deal: Lower bounds and improved relaxations for tensor recovery. In The Thirty-first International Conference on Machine Learning (ICML), pages 73–81. https://arxiv.org/pdf/1307. 5870, 2014. [MM13] Xiangrui Meng and Michael W Mahoney. Low-distortion subspace embeddings in input-sparsity time and applications to robust linear regression. In Proceedings of the forty-fifth annual ACM symposium on Theory of computing, pages 91–100. ACM, https://arxiv.org/pdf/1210.3135, 2013. [MMD08] Michael W Mahoney, Mauro Maggioni, and Petros Drineas. Tensor-cur decompositions for tensor-based data. SIAM Journal on Matrix Analysis and Applications, 30(3):957–987, 2008. [Moi13] Ankur Moitra. An almost optimal algorithm for computing nonnegative rank. In Proceedings of the Twenty-Fourth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), New Orleans, Louisiana, USA, January 6-8, 2013, pages 1454–1464. https://arxiv.org/pdf/1205.0044, 2013. [Mør11] Morten Mørup. Applications of tensor (multiway array) factorizations and decompositions in data mining. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 1(1):24–40, 2011. [MR05] Elchanan Mossel and Sébastien Roch. Learning nonsingular phylogenies and hidden markov models. In Proceedings of the thirty-seventh annual ACM symposium on Theory of computing (STOC), pages 366–375. ACM, https://arxiv.org/pdf/cs/ 0502076, 2005. [MR10] Dana Moshkovitz and Ran Raz. Two-query pcp with subconstant error. In Journal of the ACM (JACM), volume 57(5), page 29. A preliminary version appeared in the Proceedings of The 49th Annual IEEE Symposium on Foundations of Computer Science (FOCS 08), FOCS 08 Best paper award, https://eccc.weizmann.ac.il/ eccc-reports/2008/TR08-071/, 2010. [MSS16] Tengyu Ma, Jonathan Shi, and David Steurer. Polynomial-time tensor decompositions with sum-of-squares. In Foundations of Computer Science (FOCS), 2016 IEEE 57th Annual Symposium on, pages 438–446. IEEE, https://arxiv.org/pdf/1610. 01980, 2016. 201 [MW10] Morteza Monemizadeh and David P Woodruff. 1-pass relative-error lp-sampling with applications. In Proceedings of the twenty-first annual ACM-SIAM symposium on Discrete Algorithms, pages 1143–1160. SIAM, 2010. [N+ 03] Yurii Nesterov et al. Random walk in a simplex and quadratic optimization over convex polytopes. CORE, 2003. [NN13] Jelani Nelson and Huy L Nguyên. Osnap: Faster numerical linear algebra algorithms via sparser subspace embeddings. In 2013 IEEE 54th Annual Symposium on Foundations of Computer Science (FOCS), pages 117–126. IEEE, https: //arxiv.org/pdf/1211.1002, 2013. [NW14] Jelani Nelson and David P. Woodruff. Personal communication. ., 2014. [OS14] Sewoong Oh and Devavrat Shah. Learning mixed multinomial logit model from ordinal data. In Advances in Neural Information Processing Systems (NIPS), pages 595–603. https://arxiv.org/pdf/1411.0073, 2014. [Ose11] Ivan V. Oseledets. Tensor-train decomposition. SIAM J. Scientific Computing, 33(5):2295–2317, 2011. [OST08] Ivan V Oseledets, DV Savostianov, and Eugene E Tyrtyshnikov. Tucker dimensionality reduction of three-dimensional arrays in linear time. SIAM Journal on Matrix Analysis and Applications, 30(3):939–956, 2008. [OT09] Ivan V Oseledets and Eugene E Tyrtyshnikov. Breaking the curse of dimensionality, or how to use svd in many dimensions. SIAM Journal on Scientific Computing, 31(5):3744–3759, 2009. [OTZ11] Ivan Oseledets, Eugene Tyrtyshnikov, and Nickolai Zamarashkin. Tensor-train ranks for matrices and their inverses. Computational Methods in Applied Mathematics Comput. Methods Appl. Math., 11(3):394–403, 2011. [Paa97] Pentti Paatero. A weighted non-negative least squares algorithm for threeway “parafac” factor analysis. Chemometrics and Intelligent Laboratory Systems, 38(2):223–242, 1997. [Paa00] Pentti Paatero. Construction and analysis of degenerate parafac models. Journal of chemometrics, 14(3):285–299, 2000. [Pag13] Rasmus Pagh. Compressed matrix multiplication. ACM Transactions on Computation Theory (TOCT), 5(3):9, 2013. [PBLJ15] Anastasia Podosinnikova, Francis Bach, and Simon Lacoste-Julien. Rethinking lda: moment matching for discrete ica. In Advances in Neural Information Processing Systems(NIPS), pages 514–522. https://arxiv.org/pdf/1507.01784, 2015. [PC08] Anh Phan and Andrzej Cichocki. Fast and efficient algorithms for nonnegative tucker decomposition. Advances in Neural Networks-ISNN 2008, pages 772–782, 2008. [PLY10] Yanwei Pang, Xuelong Li, and Yuan Yuan. Robust tensor analysis with l1-norm. IEEE Transactions on Circuits and Systems for Video Technology, 20(2):172–178, 2010. 202 [PMvdG+ 13] Jack Poulson, Bryan Marker, Robert A van de Geijn, Jeff R Hammond, and Nichols A Romero. Elemental: A new framework for distributed memory dense matrix computations. ACM Transactions on Mathematical Software (TOMS), 39(2):13, 2013. [PP13] Ninh Pham and Rasmus Pagh. Fast and scalable polynomial kernels via explicit feature maps. In Proceedings of the 19th ACM SIGKDD international conference on Knowledge discovery and data mining(KDD), pages 239–247. ACM, 2013. [PS17] Aaron Potechin and David Steurer. Exact tensor completion with sum-of-squares. In arXiv preprint. https://arxiv.org/pdf/1702.06237, 2017. [PTBD16] Ho N Phien, Hoang D Tuan, Johann A Bengua, and Minh N Do. Efficient tensor completion: Low-rank tensor train. In arXiv preprint. https://arxiv.org/pdf/ 1601.01083, 2016. [QOSG02] Yongming Qu, George Ostrouchov, Nagiza Samatova, and Al Geist. Principal component analysis for dimension reduction in massive distributed data sets. In Proceedings of IEEE International Conference on Data Mining (ICDM), 2002. [Ren92a] James Renegar. On the computational complexity and geometry of the first-order theory of the reals, part I: introduction. preliminaries. the geometry of semi-algebraic sets. the decision problem for the existential theory of the reals. J. Symb. Comput., 13(3):255–300, 1992. [Ren92b] James Renegar. On the computational complexity and geometry of the first-order theory of the reals, part II: the general decision problem. preliminaries for quantifier elimination. J. Symb. Comput., 13(3):301–328, 1992. [RM14] Emile Richard and Andrea Montanari. A statistical model for tensor pca. In Advances in Neural Information Processing Systems, pages 2897–2905. https://arxiv. org/pdf/1411.1076, 2014. [RNSS16] Avik Ray, Joe Neeman, Sujay Sanghavi, and Sanjay Shakkottai. The search problem in mixture models. In arXiv preprint. https://arxiv.org/pdf/1610.00843, 2016. [RST10] Steffen Rendle and Lars Schmidt-Thieme. Pairwise interaction tensor factorization for personalized tag recommendation. In Proceedings of the third ACM international conference on Web search and data mining(WSDM), pages 81–90. ACM, 2010. [RSW16] Ilya Razenshteyn, Zhao Song, and David P Woodruff. Weighted low rank approximations with provable guarantees. In Proceedings of the 48th Annual Symposium on the Theory of Computing (STOC), 2016. [RTP16] Thomas Reps, Emma Turetsky, and Prathmesh Prabhu. Newtonian program analysis via tensor product. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages(POPL), volume 51:1, pages 663–677. ACM, 2016. [RV09] Mark Rudelson and Roman Vershynin. Smallest singular value of a random rectangular matrix. Communications on Pure and Applied Mathematics, 62(12):1707–1739, 2009. 203 [Sar06] Tamás Sarlós. Improved approximation algorithms for large matrices via random projections. In 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS) , 21-24 October 2006, Berkeley, California, USA, Proceedings, pages 143– 152, 2006. [SBG04] Age K. Smilde, Rasmus Bro, and Paul Geladi. Multi-way Analysis with Applications in the Chemical Sciences. Wiley, 2004. [SC15] Jimin Song and Kevin C Chen. Spectacle: fast chromatin state annotation using spectral learning. Genome biology, 16(1):33, 2015. [Sch12] Leonard J Schulman. Cryptography from tensor problems. In IACR Cryptology ePrint Archive, volume 2012, page 244. https://eprint.iacr.org/2012/244, 2012. [SH05] Amnon Shashua and Tamir Hazan. Non-negative tensor factorization with applications to statistics and computer vision. In Proceedings of the 22nd international conference on Machine learning(ICML), pages 792–799. ACM, 2005. [SHW+ 16] Mao Shaowu, Zhang Huanguo, Wu Wanqing, Zhang Pei, Song Jun, and Liu Jinhui. Key exchange protocol based on tensor decomposition problem. China Communications, 13(3):174–183, 2016. [SS17] Tselil Schramm and David Steurer. Fast and robust tensor decomposition with applications to dictionary learning. manuscript, 2017. [Ste06] Alwin Stegeman. Degeneracy in candecomp/parafac explained for p × p × 2 arrays of rank p+1 or higher. Psychometrika, 71(3):483–501, 2006. [Ste08] Alwin Stegeman. Low-rank approximation of generic p × q × 2 arrays and diverging components in the candecomp/parafac model. SIAM Journal on Matrix Analysis and Applications, 30(3):988–1007, 2008. [STLS14] Marco Signoretto, Dinh Quoc Tran, Lieven De Lathauwer, and Johan A. K. Suykens. Learning with tensors: a framework based on convex optimization and spectral regularization. Machine Learning, 94(3):303–351, 2014. [Str69] Volker Strassen. Gaussian elimination is not optimal. Numerische Mathematik, 13(4):354–356, 1969. [SWZ16] Zhao Song, David P. Woodruff, and Huan Zhang. Sublinear time orthogonal tensor decomposition. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems (NIPS) 2016, December 5-10, 2016, Barcelona, Spain, pages 793–801, 2016. [SWZ17] Zhao Song, David P Woodruff, and Peilin Zhong. Low rank approximation with entrywise `1 -norm error. In Proceedings of the 49th Annual Symposium on the Theory of Computing (STOC). ACM, https://arxiv.org/pdf/1611.00898, 2017. [TD99] Françoise Tisseur and Jack Dongarra. A parallel divide and conquer algorithm for the symmetric eigenvalue problem on distributed memory architectures. SIAM Journal on Scientific Computing, 20(6):2223–2236, 1999. 204 [TK11] Petr Tichavsky and Zbyněk Koldovsky. Weight adjusted tensor method for blind separation of underdetermined mixtures of nonstationary sources. IEEE Transactions on Signal Processing, 59(3):1037–1047, 2011. [TM17] Davoud Ataee Tarzanagh and George Michailidis. Fast monte carlo algorithms for tensor operations. In arXiv preprint. https://arxiv.org/pdf/1704.04362, 2017. [Tre01] Luca Trevisan. Non-approximability results for optimization problems on bounded degree instances. In Proceedings of the thirty-third annual ACM symposium on Theory of computing (STOC), pages 453–461. ACM, 2001. [TSHK11] Ryota Tomioka, Taiji Suzuki, Kohei Hayashi, and Hisashi Kashima. Statistical performance of convex tensor decomposition. In Advances in Neural Information Processing Systems 24: 25th Annual Conference on Neural Information Processing Systems (NIPS). Proceedings of a meeting held 12-14 December 2011, Granada, Spain., pages 972–980, 2011. [Vas09] M Alex O Vasilescu. A multilinear (tensor) algebraic framework for computer graphics, computer vision, and machine learning. PhD thesis, Citeseer, 2009. [VT02] M Alex O Vasilescu and Demetri Terzopoulos. Multilinear analysis of image ensembles: Tensorfaces. In European Conference on Computer Vision, pages 447–460. Springer, 2002. [VT04] M Alex O Vasilescu and Demetri Terzopoulos. Tensortextures: Multilinear imagebased rendering. In ACM Transactions on Graphics (TOG), volume 23:3, pages 336–342. ACM, 2004. [WA03] Hongcheng Wang and Narendra Ahuja. Facial expression decomposition. In Computer Vision, 2003. Proceedings. Ninth IEEE International Conference on, pages 958–965. IEEE, 2003. [WA16] Yining Wang and Animashree Anandkumar. Online and differentially-private tensor decomposition. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems (NIPS) 2016, December 5-10, 2016, Barcelona, Spain. https://arxiv.org/pdf/1606.06237, 2016. [Wes94] Carl-Fredrik Westin. A tensor framework for multidimensional signal processing. PhD thesis, Linköping University Electronic Press, 1994. [Wil12] Virginia Vassilevska Williams. Multiplying matrices faster than coppersmithwinograd. In Proceedings of the forty-fourth annual ACM symposium on Theory of computing (STOC), pages 887–898. ACM, 2012. [WM01] B. Walczak and DL Massart. Dealing with missing data: Part i. Chemometrics and Intelligent Laboratory Systems, 58(1):15–27, 2001. [Woo14] David P. Woodruff. Sketching as a tool for numerical linear algebra. Foundations and Trends in Theoretical Computer Science, 10(1-2):1–157, 2014. [WS15] Yining Wang and Aarti Singh. Column subset selection with missing data via active sampling. In The 18th International Conference on Artificial Intelligence and Statistics (AISTATS), pages 1033–1041, 2015. 205 [WTSA15] Yining Wang, Hsiao-Yu Tung, Alexander J Smola, and Anima Anandkumar. Fast and guaranteed tensor decomposition via sketching. In Advances in Neural Information Processing Systems (NIPS), pages 991–999. https://arxiv.org/pdf/1506. 04448, 2015. [WWS+ 05] Hongcheng Wang, Qing Wu, Lin Shi, Yizhou Yu, and Narendra Ahuja. Out-of-core tensor approximation of multi-dimensional matrices of visual data. ACM Transactions on Graphics (TOG), 24(3):527–535, 2005. [WZ16] David P Woodruff and Peilin Zhong. Distributed low rank approximation of implicit functions of a matrix. In 32nd IEEE International Conference on Data Engineering (ICDE). https://arxiv.org/pdf/1601.07721, 2016. [YC14] Tatsuya Yokota and Andrzej Cichocki. Multilinear tensor rank estimation via sparse tucker decomposition. In Soft Computing and Intelligent Systems (SCIS), 2014 Joint 7th International Conference on and Advanced Intelligent Systems (ISIS), 15th International Symposium on, pages 478–483. IEEE, 2014. [YCRM16] Jiyan Yang, Yin-Lam Chow, Christopher Ré, and Michael W Mahoney. Weighted sgd for `p regression with randomized preconditioning. In Proceedings of the TwentySeventh Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 558–569. Society for Industrial and Applied Mathematics, https://arxiv.org/pdf/ 1502.03571, 2016. [YCS11] Yusuf Kenan Yilmaz, Ali Taylan Cemgil, and Umut Simsekli. Generalised coupled tensor factorisation. In Advances in Neural Information Processing Systems 24: 25th Annual Conference on Neural Information Processing Systems 2011. Proceedings of a meeting held 12-14 December 2011, Granada, Spain., pages 2151–2159, 2011. [YCS16] Xinyang Yi, Constantine Caramanis, and Sujay Sanghavi. Solving a mixture of many random linear equations by tensor decomposition and alternating minimization. In arXiv preprint. https://arxiv.org/pdf/1608.05749, 2016. [YFS16] Yuning Yang, Yunlong Feng, and Johan AK Suykens. Robust low-rank tensor recovery with regularized redescending m-estimator. IEEE transactions on neural networks and learning systems, 27(9):1933–1946, 2016. [ZCZJ14] Yuchen Zhang, Xi Chen, Denny Zhou, and Michael I Jordan. Spectral methods meet em: A provably optimal algorithm for crowdsourcing. In Advances in Neural Information Processing Systems (NIPS), pages 1260–1268. https://arxiv.org/ pdf/1406.3824, 2014. [ZG01] Tong Zhang and Gene H. Golub. Rank-one approximation to high order tensors. SIAM J. Matrix Analysis Applications, 23(2):534–550, 2001. [ZSJ+ 17] Kai Zhong, Zhao Song, Prateek Jain, Peter L. Bartlett, and Inderjit S. Dhillon. Recovery guarantees for one-hidden-layer neural networks. manuscript, 2017. [ZW13] Syed Zubair and Wenwu Wang. Tensor dictionary learning with sparse tucker decomposition. In Digital Signal Processing (DSP), 2013 18th International Conference on, pages 1–6. IEEE, 2013. 206 [ZWZ16] Junyu Zhang, Zaiwen Wen, and Yin Zhang. Subspace methods with local refinements for eigenvalue computation using low-rank tensor-train format. Journal of Scientific Computing, pages 1–22, 2016. [ZX17] Anru Zhang and Dong Xia. Guaranteed tensor pca with optimality in statistics and computation. In arXiv preprint. https://arxiv.org/pdf/1703.02724, 2017. 207
8cs.DS
Compressed Dynamic Range Majority Data Structures Travis Gagie1,2 , Meng He3 , and Gonzalo Navarro2,4 1 arXiv:1611.01835v1 [cs.DS] 6 Nov 2016 Diego Portales University [email protected] 2 CeBiB 3 4 University of Chile Dalhousie University [email protected] [email protected] Abstract In the range α-majority query problem, we preprocess a given sequence S[1..n] for a fixed threshold α ∈ (0, 1], such that given a query range [i..j], the symbols that occur more than α(j−i+1) times in S[i..j] can be reported efficiently. We design the first compressed solution to this problem in dynamic settings. Our data structure represents S using nHk + o(n lg σ) bits for any k = o(logσ n), where σ is the alphabet size and Hk is the k-th order empirical lg n entropy of S. It answers range α-majority queries in O( α lg lg n ) time, and supports insertions and deletions in O( lgαn ) amortized time. The best previous solution [1] has the same query and update times, but uses O(n) words. 1 Introduction Given a threshold α ∈ (0, 1], a symbol c is an α-majority in a sequence S[1..n] if c occurs more than αn times in S. Thus α-majorities are often used to represent frequent symbols and, naturally, the problem of finding α-majorities is important in data mining [2, 3]. Misra and Gries [4] proposed an optimal solution that computes all α-majorities using O(n lg(1/α)) comparisons, and when implemented in word RAM for a sequence over an alphabet of size σ, the running time becomes O(n) [3]. In the range α-majority query problem, we further preprocess S such that given a query range [i..j], the α-majorities of S[i..j], i.e., the symbols that occur more than α(j − i + 1) times in S[i..j], can be reported efficiently. Karpinski and Nekrich [5] first considered this problem and proposed a solution that uses O(n/α) words to support queries in O((lg lg n)2 /α) time. Durocher et al. [6] presented the first solution that achieves O(1/α) optimal query time, and their structure occupies O(n/α) words. Subsequently, much work has been done to make the space cost independent of α [7, 8, 9], and even to achieve compression [7, 9] when S is drawn from a fixed alphabet. For example, Gagie et al. [9] showed how to represent S using (1 + ǫ)nH0 + o(n) bits for any constant σ ∈ (0, 1) to answer range α-majority queries in O(1/α) time, where H0 is the 0-th order empirical entropy of S. We refer to [9] for a more thorough survey. In dynamic settings, we wish to maintain S to support range α-majority queries under the following update operations: i) insert(c, i), which inserts symbol c between A[i − 1] and A[i], shifting the symbols in positions i to n to positions i + 1 and n + 1, respectively; ii) delete(c, i), which deletes A[i], shifting the symbols in positions i to n to positions i − 1 and n − 1, respectively. Elmasry et al. [1] considered this problem, Funded with basal funds FB0001, Conicyt, Chile and by NSERC of Canada. and they designed an O(n)-word structure that can answer range α-majority queries lg n ) time, and supports insertions and deletions in O( lgαn ) amortized time.1 in O( α lg lg n Previously, no succinct data structures have been designed for dynamic range αmajorities. We thus design the first compressed data structure for this problem. Our data structure represents S using nHk + o(n lg σ) bits for any k = o(logσ n), where σ is the alphabet size and Hk is the k-th order empirical entropy of S. It answers lg n range α-majority queries in O( α lg ) time, and supports insertions and deletions in lg n lg n O( α ) amortized time. Hence, its query and update times match the best previous solution by Elmasry et al. [1], while using compressed space. 2 Preliminaries In this section, we summarize some existing data structures that will be used in our solution. One such data structure is designed for the problem of maintaining a string S under insert and delete operations to support the following operations: access(i), which returns S[i]; rank(c, i), which returns the number of occurrences of character c in S[1..i]; and select(c, i), which returns the position of the i-th occurrence of c in S. The following lemma summarizes the currently best compressed solution to this problem, which also supports the extraction of an arbitrary substring in optimal time: Lemma 1 ([10]). A string of length n over an alphabet of size σ can be represented using nHk + o(n lg σ) bits for any k = o(logσ n) to support access, rank, select, insert and delete in O(lg n/ lg lg n) time. It also supports the extraction of a substring of length l in O(lg n/ lg lg n + l/ logσ n) time. Raman et al. [11] considered the problem of representing a dynamic P integer sequence Q to support the following operations: sum(Q, i), which computes ij=1 Q[j]; search(Q, x), which returns the smallest i with sum(Q, i) ≥ x; and update(Q, i, δ), which sets Q[i] to Q[i]+δ. One building component of their solution is a data structure for small sequences, which will also be used in our data structures: Lemma 2 ([11]). A sequence, Q, of O(lgǫ n) nonnegative integers of O(lg n) bits each, where 0 ≤ ǫ < 1, can be represented using O(lg1+ǫ n) bits to support sum, search, and update(Q, i, δ) where |δ| ≤ lg n, in O(1) time. This data structure can be constructed ′ in O(lgǫ n) time, and requires a precomputed universal table occupying O(nǫ ) bits for any fixed ǫ′ > 0. 3 Compressed Dynamic Range Majority Data Structures In this section we design compressed dynamic data structures for range α-majority queries. We define three different types of queries as follows. Given an α-majority 1 Karpinski and Nekrich [5] also considered the dynamic case, though they defined the data set as a set of colored points in 1D. With a reduction developed in [1], the solutions by Karpinski and Nekrich can also be used to encode dynamic sequences, though the results are inferior to those of Elmasry et al. [1]. query with range [i..j], we compute the size, r, of the query range as j − i + 1. If r ≥ L, where L = ⌈ α1 (⌈ lglglgnn ⌉)2 ⌉, then we say that this query is a large-sized query. The query is called a medium-sized query if L′ < r < L, where L′ = ⌈ α1 ⌈ lglglgnn ⌉⌉. If r ≤ L′ , then it is a small-sized query. We represent the input sequence S using Lemma 1. This supports small-sized queries immediately: By Lemma 1, we can compute the content of the subsequence lg n S[i..j], where [i..j] is the query range, in O( lglglgnn + j−i+1 ) = O( α lg ) time. We log n lg n σ lg n can then compute the α-majorities in S[i..j] in O(j − i + 1) = O( α lg ) time using lg n the algorithm of Misra and Gries [4]. Thus it suffices to construct additional data structures for large-sized and medium-sized queries. 3.1 Supporting Large-Sized Range α-Majority Queries To support large-sized queries, we construct a weight-balanced B-tree [12] T with branching parameter 8 and leaf parameter L. We augment T by adding, for each node, a pointer to the node immediately to its left at the same level, and another pointer to the node immediately to its right. These pointers can be maintained easily under updates, and will not affect the space cost of T asymptotically. Each leaf of T represents a contiguous subsequence, or block, of S, and the entire sequence S can be obtained by concatenating all the blocks represented by the leaves of T from left to right. Each internal node of T then represents a block that is the concatenation of all the blocks represented by its leaf descendants. We number the levels of T by 0, 1, 2, . . . from the leaf level to the root level. Thus level a is higher than level b if a > b. Let v be a node at the l-th level of T , and let B(v) denote the block it represents. Then, by the properties of weight-balanced B-trees, if v is a leaf, the length of its block, denoted by |B(v)|, is at least L and at most 2L − 1. If v is an internal node, then 1 · 8l · L < |B(v)| < 2 · 8l · L. We also have that each internal node has at least 2 and 2 at most 32 children. We do not store the actual content of a block in the corresponding node of T . Instead, for each v, we store the size of the block that it represents, and in addition, compute and store information in a structure C(v) called candidate list about symbols that can possibly be the α-majorities of subsequences that meet certain conditions. More precisely, let l be the level of v, u be the parent of v, and SB(v) be the concatenation of the blocks represented by the node immediately to the left of u at level l + 1, the node u, and the node immediately to the right of u at level l + 1. Then C(v) contains each symbol that appears more than αbl times in SB(v), where bl = 12 ·8l ·L is the minimum size of a block at level l. Since the maximum length of each block at level l + 1 is 4bl+1 = 32bl , we have |SB(v)| ≤ 96bl , and thus |C(v)| = O(1/α). To show the idea behind the candidate lists, we say that two subsequences touch each other if their corresponding sets of indices in S are not disjoint. We then observe that, since the size of any block at level l + 1 is greater than 8bl , any subsequence S[i..j] touching B(v) is completely contained in SB(v) if r = j − i + 1 is within (bl , 8bl ). Since each α-majority in S[i..j] appears at least αr > αbl times, it is also contained in C(v). Therefore, to find the α-majority in S[i..j], it suffices to verify whether each element in C(v) is indeed an answer; more details are to be given in our query algorithm later. Even though it only requires O(|SB(v)|) time to construct C(v) [4], it would be costly to reconstruct it every time an update operation is performed on SB(v). To make the cost of maintaining C(v) acceptable, we only rebuild it periodically by adopting a strategy by Karpinski and Nekrich [5]. More precisely, when we construct C(v), we store symbols that occur more than αbl /2 times in SB(v). We also keep a counter U(v) that we increment whenever we perform insert or delete in SB(v). Only when U(v) reaches αbl /2 do we reconstruct CB , and then we reset U(v) to 0. Since at most αbl /2 updates can be performed to |SB(v)| between two consecutive reconstructions, any symbol that becomes an α-majority in |SB(v)| any time during these updates must have at least αbl /2 occurrences in SB(v) before these updates are performed. Thus we can guarantee that any symbol that appears more than αbl times in SB(v) is always contained in C(v) during updates. The size of C(v) is still O(bl /α), and, as to be shown later, it only requires O((lg n)/α) amortized time per update to S to maintain all the candidate lists. We also construct data structures to speed up a top-down traversal in T . These data structures are defined for the marked levels of T , where the k-th marked level is level k⌈(1/6) lg lg n⌉ of T for k = 0, 1, . . .. Given a node v at the k-th marked level, the number of its descendants at the (k − 1)-st marked level is at most 32⌈(1/6) lg lg n⌉−1 ≤ 32(1/6) lg lg n = lg5/6 n. Thus, the sizes of the blocks represented by these descendants, when listed from left to right, form an integer sequence, Q(v), of at most lg5/6 n entries. We represent Q(v) using Lemma 2, and store a sequence of pointers P (v), in which P (v)[i] points to the i-th leftmost descendant at the (k − 1)-st marked level. We next prove the following key lemma regarding an arbitrary subsequence S[i..j] of length greater than L, which will be used in our query algorithm: Lemma 3. If r = j − i + 1 > L, then each α-majority element in S[i..j] is contained in C(v) for any node v at level l = ⌈ 13 lg 2r − 1⌉ whose block touches S[i..j]. L Proof. Let u be v’s parent. Then S[i..j] also touches u, and u is at level l + 1. Let u1 and u2 be the nodes immediately to the left and right of u at level l + 1, respectively. Let bl and bl+1 denote the minimum block size represented by nodes at level l and l + 1 of T , respectively. Then, by the properties of weight-balanced B-trees, if l > 0, 1 2r 1 2r bl = 21 · 8l · L = 12 · 8⌈ 3 lg L −1⌉ · L < 12 · 8 3 lg L · L = r. When l = 0, bl = L < r. Thus, we always have bl < r. Therefore, any α-majority of S[i..j] occurs more than αr > αbl times in S[i..j]. 1 2r 1 2r On the other hand, bl+1 = 21 · 8⌈ 3 lg L ⌉ · L ≥ 21 · 8 3 lg L · L = r. Since S[i..j] touches B(u), this inequality means that S[i..j] is entirely contained in either the concatenation of B(u1 ) and B(u), or the concatenation of B(u) and B(u2 ). In either case, S[i..j] is contained in SB(v). Since any α-majority of S[i..j] occurs more than αbl times in S[i..j], it also occurs more than αbl times in SB(v). As C(v) includes any symbol that appears more than αbl times in SB(v), any α-majority of S[i..j] is contained in C(v). We now describe our query and update algorithms, and analyze space cost. lg n ) time. Lemma 4. Large-sized range α-majority queries can be supported in O( α lg lg n Proof. Let [i..j] be the query range, r = j − i + 1 and l = ⌈ 13 lg 2r − 1⌉. We first L look for a node v at level l whose block touches S[i..j]. The obvious approach is to perform a top-down traversal of T to look for a node at level l whose block contains position i. During the traversal, we make use of the information about the lengths of the blocks represented by the nodes of T to decide which node at the next level to descend to, and to keep track of the starting position in S of the block represented by the node that is currently being visited. More precisely, suppose that we visit node u at the current level as we have determined previously that B(u) contains S[i]. We also know that the first element in B(u) is S[p]. Let u1 , u2 , . . . , ud denote the children of u, where d ≤ 32. To decide which child of u represents a block that contains S[i], we retrieve the lengths of all |B(uk )|’s, and look for the smallest q such that P q whose block contains k=1 |B(uk )| ≥ i. Node uq is then the node at the level Pbelow q−1 S[i], and the starting position of its block in S is p + k=1 |B(uk )|. As d ≤ 32 and we store the length of the block that each node represents, these steps use constant time. However, if we follow the approach described in the previous paragraph, we would use O(lg n) time in total, as T has O(lg n) levels. Thus we make use of the additional data structures stored at marked levels to speed up this process. If there is no marked level between the root level and l, then the top down traversal only descends O(lg lg n) levels, requiring O(lg lg n) time only. Otherwise, we perform the top-down traversal until we reach the highest marked level. Let x be the node that we visit at the highest marked level. As Q(x) stores the lengths of the blocks at the next marked level, we can perform a search operation in Q(x) and then follow an appropriate pointer in P (x) to look for the node y at the second highest level that contains S[i], and perform a sum operation in Q(x) to determine the starting position of B(y) in S. These operations require constant time. We repeat this process until we reach the lowest marked level above level l, and then we descend level by level until we find node v. As there are O(lg n/ lg lg n) marked levels, the entire process requires O(lg n/ lg lg n) time. By Lemma 3, we know that the α-majorities of S[i..j] are contained in C(v). We then verify, for each symbol, c, in C(v), whether it is indeed an α-majority by computing its number, m, of occurrences in S[i..j] and comparing m to αr. As m = rank(c, j) − rank(c, i − 1), m can be computed in O(lg n/ lg lg n) time by Lemma 1. n As |C(v)| = O(1/α), it requires O( α lglg lg ) time in total to find out which of these n symbols should be included in the answer to the query. Therefore, the total query lg n lg n time is O( lglglgnn + α lg ) = O( α lg ). lg n lg n Lemma 5. The data structures described in Section 3.1 can be maintained in O( lgαn ) amortized time under update operations. Proof. We only show how to support insert; the support for delete is similar. To perform insert(c, i), we first perform a top down traversal to look for the node v at level 0 whose block contains S[i]. During this traversal, we descend level by level as in Lemma 4, but we do not use the marked levels to speed up the process. For each node u that we visit, we increment the recorded length of B(u). In addition, we update the counters U stored in the children of u and in the children of the two nodes that surround u. There are a constant number of these nodes, and they can all be located in constant time by following either the edges of T , or the pointers between two nodes that are next to each other at the same level where we augment T . When incrementing the counter U of each node, we find out whether the candidate list of this node has to be rebuilt. To reconstruct the candidate list of a node x at level l, we first compute the starting and ending positions of SB(x) in S. This can be computed in constant time because, during the top down traversal, we have already computed the starting and ending positions of B(v) in S, and the three nodes whose blocks form SB(x), as well as the sizes of these three blocks, can be retrieved by following a constant number of pointers starting from v. We then extract the content of SB(x). As |SB(x)| ≤ 96bl (see discussions earlier in this section) and bl ≥ L, by Lemma 1, SB(x) can be extracted from S in O(bl ) time. We next compute all the symbols that appear in SB(x) more than αbl /2 times in O(bl ) time [4], and these are the elements in the reconstructed C(x). Since the counter U(x) has to reach αbl /2 before C(x) has to be rebuilt, the amortized cost per update is O(1/α). If u is at a marked level, we perform a search operation in O(1) time to locate the entry of Q(u) that corresponds to the node at the next lower marked level whose block contains i, and perform an update, again in O(1) time, to increment the value stored in this entry. So far we have used O(1/α) amortized time for each node we visit during the top-down traversal. Since T has O(lg n) levels, the overall cost we have calculated up to this point is O((lg n)/α) amortized time. When a node, z, at level l of T splits, we reconstruct C(z) in O(bl ) time. If l is a marked level, but it is not the lowest marked level, we also rebuild Q(z) and P (z) in O(lg1/6 n) = o(bl ) time. By the properties of a weight-balanced B-tree, after a node at level l has been split, it requires at least 21 · 8l · L = bl insertions before it can be split again. Therefore, we can amortize the cost of reconstructing these data structures over the insertions between reconstructions, and each insert is thus charged with O(1) amortized cost. As each insert may cause one node at each level of T to split, the overall cost charged to an insert operation is thus O(lg n). Finally, update operations may cause the value of L to change. To make it happen, the value of ⌈ lglglgnn ⌉ must change, and this requires Ω(n) updates. It is clear that our data structures can be constructed in O(n lg n) time, incurring O(lg n) amortized time for each update. To summarize, insert can be supported in O((lg n)/α) amortized time. Lemma 6. The data structures described in Section 3.1 occupy o(n lg σ) bits. Proof. As T has O(n/L) nodes, the structure of T , pointers between nodes at the same level, as well as counters and block lengths stored with the nodes, occupy 2 O(n/L × lg n) = O( αn(lglg lgn n) ) bits in total. Each candidate list can be stored in O((lg σ)/α) bits, so the candidate lists stored in all the nodes use O(n/L×(lg σ)/α) = lg n)2 O( n lg σ(lg ) bits in total. The size of the structures Q(v) and P (v) can be charged lg2 n to the pointed nodes, so there are O(n/L) entries to store. As each entry of Q(v) 2 uses O(lg n) bits, all the Q(v)’s occupy O(n/L × lg n) = O( αn(lglg lgn n) ) bits. The same analysis applies to P (v). Therefore, the data structures described in this section use 2 lg n)2 ) = o(n lg σ) bits. O( αn(lglg lgn n) + n lg σ(lg 2 lg n 3.2 Supporting Medium-Sized Range α-Majority Queries We could use the same structures designed in Section 3.1 to support medium-sized queries if we simply set the leaf parameter of T to be L′ instead of L, but then the resulting data structures would not be succinct. To save space, we build a data structure D(v) for each leaf node v of T . Our idea for supporting medium-sized queries is similar to that for large-sized queries, but since the block represented by a leaf node of T is small, we are able to simplify the idea and the data structures in Section 3.1. Such simplifications allow us to maintain a multi-level decomposition of B(v) in a hierarchy of lists instead of in a tree, which are further laid out in one contiguous chunk of memory for each leaf node of T , to avoid using too much space for pointers. We now describe this multi-level decomposition of B(v), which will be used to define the data structure components of D(v). As we define one set of data structure components in D(v) for each level of this decomposition, we use D(v) to refer to both the data structure that we build for B(v) and the decomposition of B(v). To distinguish a level of D(v) from a level of T , we number each level of D(v) using a nonpositive integer. At level −l, for l = 0, 1, 2, . . . , ⌈lg(L/L′ )−1⌉, B(v) is partitioned into mini-blocks of length between L/2l and L/2l−1 . Note that the level 0 decomposition contains simply one mini-block, which is B(v) itself, as the length of any leaf block in T is between L and 2L already. We define ml = L/2l , which is the minimum length of a mini-block at level −l. As L′ < m⌈lg(L/L′ )−1⌉ ≤ 2L′ , the minimum length of a mini-block at the lowest level, i.e., level −⌈lg(L/L′ ) − 1⌉, is between L′ and 2L′ . For each mini-block M at level −l of D(v), we define its predecessor, pred(M), as follows: If M is not the leftmost mini-block at level −l of D(v), then pred(M) is the mini-block immediately to its left at the same level. Otherwise, if v is not the leftmost leaf (pred(M) is null otherwise), let v1 be the leaf immediately to the left of v in T , and pred(M) is defined to be the rightmost mini-block at level −l of D(v1 ). Similarly, we define the successor, succ(M), of M as the mini-block immediately to the right of M at level −l of D(v) if such a mini-block exists. Otherwise, succ(M) is the leftmost mini-block at level −l of D(v2 ) where v2 is the leaf immediately to the right of v in T if v2 exists, or null otherwise. Then, the candidate list, C(M), of M contains each symbol that occurs more than αml /2 times in the concatenation of M, pred(M) and succ(M). To maintain C(M) during updates, we use the same strategy in Section 3.1 that is used to maintain C(v). More specifically, we store a counter U(M) so that we can rebuild C(M) after exactly αml /4 update operations have been performed to M, pred(M) and succ(M). Whenever we perform the reconstruction, we include in C(M) each symbol that occurs more than αml /4 times in the concatenation of M, pred(M) and succ(M). Since |pred(M)| + |M| + |succ(M)| ≤ 6ml , the number of symbols included in C(M) is at most 24/α. The precomputed information for each mini-block M includes |M|, C(M), and U(M). These data for mini-blocks at the same level, −l, of D(v) are chained together in a doubly linked list Ll (v). D(v) then contains these O(lg(L/L′ )) = O(lg lg n) lists. We however cannot afford storing each list in the standard way using pointers of O(lg n) bits each, as this would use too much space. Instead, we lay them out in a contiguous chunk of memory as follows. We first observe that the number of miniblocks at level −l of D(v) is less than 2L/(L/2l ) = 2l+1 . Thus, the total number ′ of mini-blocks across all levels is less than 2 · 2⌈lg(L/L )−1⌉+1 − 1 < 4L/L′ . We then use an array A(v) of ⌈4L/L′ ⌉ fix-sized slots to store D(v), and each slot stores the precomputed information of a mini-block. To determine the size of a slot, we compute the maximum number of bits needed to encode the precomputed information for each mini-block M. C(M) can be stored in ⌈lg σ⌉ · ⌈24/α⌉ bits. As M has less than 2L elements, its length can be encoded in ⌈lg(2L)⌉ bits. The counter U(M) can be encoded in ⌈lg(αml /4)⌉ < ⌈lg(αL/2)⌉ ≤ ⌈lg(L/2)⌉ bits. The two pointers to the neighbours of M in the linked list can be encoded as the indices of these mini-blocks in the memory chunk. Since there are ⌈4L/L′ ⌉ slots, each pointer can be encoded in ⌈lg⌈4L/L′ ⌉⌉ bits. Therefore, we set the size of each slot to be ⌈lg σ⌉ · ⌈24/α⌉ + 2⌈lg L⌉ + 2⌈lg⌈4L/L′ ⌉⌉ bits. We prepend this memory chunk with a header. This header encodes the indices of the slots that store the head of each Ll (v). As there are ⌈lg(L/L′ )⌉ levels and each index can be encoded in ⌈lg⌈4L/L′ ⌉⌉ bits, the header uses ⌈lg(L/L′ )⌉ · ⌈lg⌈4L/L′ ⌉⌉ bits. Clearly our memory management scheme allows us to traverse each doubly linked list Ll (v) easily. When mini-blocks merge or split during updates, we need to perform insertions and deletions in the doubly linked lists. To facilitate these updates, we always store the precomputed information for all mini-blocks in D(v) in a prefix of A(v), and keep track of the number of used slots of A(v). When we perform an insertion into a list Ll (v), we use the first unused slot of A to store the new information, and update the header if the newly inserted list element becomes the head. When we perform a deletion, we copy the content of the last used slot (let M ′ be the mini-block that corresponds to it) into the slot corresponding to the deleted element of Ll (v). We also follow the pointers encoded in the slot for M ′ to locate the neighbours of M ′ in its doubly linked list, and update pointers in these neighbours that point to M ′ . If M ′ is the head of a doubly linked list (we can determine which list it is using |M ′ |), we update the header as well. The following lemma shows that our memory management strategy indeed saves space: Lemma 7. The data structures described in Section 3.2 occupy o(n lg σ) bits. Proof. We first analyze the size of the memory chunk storing D(v) for each leaf v of T . By our analysis in previous paragraphs, we observe that the header of this chunk uses O((lg lg n)2 ) bits. Each slot of A(v) uses O(lg σ/α + lg lg n) bits, and A(v) has n O(lg n/ lg lg n) entries. Therefore, A(v) occupies O( αlglgσ lg + lg n) bits. Hence the lg n lg σ lg n total size of the memory chunk of each leaf of T is O( α lg lg n + lg n) bits. As there are σ lg lg n O(n/L) leaves in T , the data structures described in this section uses O( n lg lg + n αn(lg lg n)2 ) lg n = o(n lg σ) bits. We now show how to support query and update operations. lg n ) Lemma 8. Medium-sized range α-majority queries can be supported in O( α lg lg n time. Proof. Let [i..j] be the query range and let r = j − i + 1. We first perform a top down traversal in T to locate the leaf, v, that represents a block containing S[i] in O( lglglgnn ) time using the approach described in the proof of Lemma 4. In this process, we can also find the starting position of B(v) in S. We next make use of D(v) to answer the query as follows. Let l = ⌈lg(L/r) − 1⌉. As ml = L/2⌈lg(L/r)−1⌉ , we have ml /2 ≤ r < ml . We then scan the list Ll (v) to look for a mini-block, M, that contains S[i] at level −l. This can be done by first locating the head of Ll (v) from the header of the memory chunk that stores D(v), and then perform a linear scan, computing the starting position of each mini-block in Ll (v) along the way. As Ll (v) has at most O(L/L′ ) = O( lglglgnn ) entries, we can locate M in O( lglglgnn ) time. Since ml > r, S[i..j] is either entirely contained in the concatenation of pred(M) and M, or the concatenation of M and succ(M). Thus each α-majority of S[i..j] must occur more than αr > αml /2 times in the concatenation of pred(M), M and succ(M). Therefore, each α-majority of S[i..j] is contained in C(M). We can then perform rank operations in S to verify whether each symbol in C(M) is indeed an α-majority of S[i..j]. As C(M) has O(1/α) symbols, this process requires n O( α lglg lg ) time. n Lemma 9. The data structures described in Section 3.2 can be maintained in O( lglglgnn + lg lg n ) amortized time under update operations. α Proof. We only show how to support insert; the support for delete is similar. To perform insert(c, i), we first perform a top down traversal in T to locate the leaf, v, that represents a block containing S[i] in O( lglglgnn ) time. We then increment the recorded lengths of all the mini-blocks that contain S[i]. We also increment the counters U of these mini-blocks, as well as the counters of their predecessors and successors. All the mini-blocks whose counters should be incremented are located in D(v), D(v1 ) and D(v2 ), where v1 and v2 are the leaves immediately to the left and right of v in T . We scan each doubly linked list Ll (v), Ll (v1 ) and Ll (v2 ) to locate these mini-blocks. Since D(v), D(v1 ) and D(v2 ) have O( lglglgnn ) mini-blocks in total over all levels, it requires O( lglglgnn ) to find these mini-blocks and update them. The above process can find all these mini-blocks, as well as their starting and ending positions in S. It may be necessary to reconstruct the candidate list of these mini-blocks. Similarly to the analysis in the proof of Lemma 5, the candidate list of each of these mini-blocks can be maintained in O(1/α) amortized time. Since there are O(lg lg n) levels in D(v), D(v1 ) and D(v2 ) and only a constant number of miniblocks at each level may need to be rebuilt, it requires O((lg lg n)/α) amortized time to reconstruct all of them. An insertion may also cause a mini-block to split. As in the proof of Lemma 5, we compute the candidate list and other required information for the mini-block created as a result of the merge, and amortize the cost to the insertions that lead to the merge. The amortized cost is again O(1). As there can possibly be a merge at each level of D(v), it requires O(lg lg n) amortized time to handle them. Finally, when the value of L′ changes, we rebuild all the data structures designed in this section, incurring O(lg lg n) amortized time. Therefore, the total time required to support insert is O( lglglgnn + lg αlg n ). Combining Lemma 1 and Lemmas 4-9, we have our main result: Theorem 10. A sequence of length n over an alphabet of size σ can be represented using nHk + o(n lg σ) bits for any k = o(logσ n) to answer range alpha-majority lg n ) time, and to support insert and delete in O( lgαn ) amortized queries in O( α lg lg n time. 4 Concluding Remarks In this paper, we have designed the first compressed data structure for dynamic range α-majority. To achieve this result, our key strategy is to perform a multi-level decomposition of the sequence S, and, for each block of S, precompute a candidate set which includes all the α-majorities of any query range of the right size that touches this block. Thus, when answering a query, we need not find a set of blocks whose union forms the query range as is required in the solution of Elmasry et al. [1]. Instead, we only look for a single block that touches the query range. This simpler strategy allows us to achieve compressed space. Furthermore, it is possible to generalize our solution to design the first dynamic data structure that can maintain S in the same space and update time, to support the computation of the β-majorities in a given query range for any β ∈ [α, 1] in O( β lglg lgn n ) time. Note that here β is given in a query and only α is fixed and given beforehand. This type of query is more general than range α-majority queries and was only studied in the static case before [7, 9]. The details are deferred to the full version of this paper. References [1] A. Elmasry, M. He, J. I. Munro, and P. K. Nicholson, “Dynamic range majority data structures,” Theoretical Comp. Sci., vol. 647, pp. 59–73, 2016. [2] M. Fang, N. Shivakumar, H. Garcia-Molina, R. Motwani, and J. D. Ullman, “Computing iceberg queries efficiently,” in Proc. VLDB, 1998, pp. 299–310. [3] E. D. Demaine, A. López-Ortiz, and J. I. Munro, “Frequency estimation of internet packet streams with limited space,” in Proc. ESA, 2002, pp. 348–360. [4] J. Misra and D. Gries, “Finding repeated elements,” Sci. Comp. Prog., vol. 2, pp. 143–152, 1982. [5] M. Karpinski and Y. Nekrich, “Searching for frequent colors in rectangles,” in Proc. CCCG, 2008, pp. 11–14. [6] S. Durocher, M. He, J. I. Munro, P. K. Nicholson, and M. Skala, “Range majority in constant time and linear space,” Inf. Comp., vol. 222, pp. 169–179, 2013. [7] T. Gagie, M. He, J. I. Munro, and P. K. Nicholson, “Finding frequent elements in compressed 2d arrays and strings,” in Proc. SPIRE, 2011, pp. 295–300. [8] T. M. Chan, S. Durocher, M. Skala, and B. T. Wilkinson, “Linear-space data structures for range minority query in arrays,” Algorithmica, vol. 72, pp. 901–913, 2015. [9] D. Belazzougui, T. Gagie, J. Ian Munro, G. Navarro, and Y. Nekrich, “Range majorities and minorities in arrays,” CoRR, vol. abs/1606.04495, 2016. [10] J. I. Munro and Y. Nekrich, “Compressed data structures for dynamic sequences,” in Proc. ESA, 2015, pp. 891–902. [11] R. Raman, V. Raman, and S. S. Rao, “Succinct dynamic data structures,” in Proc. WADS, 2001, pp. 426–437. [12] L. Arge and J. S. Vitter, “Optimal external memory interval management,” SIAM J. Comp., vol. 32, pp. 1488–1508, 2003.
8cs.DS
The Automatic Synthesis of Linear Ranking Functions: The Complete Unabridged Version✩ Roberto Bagnaraa,b, Fred Mesnardc , Andrea Pescettid , Enea Zaffanellaa,b arXiv:1004.0944v2 [cs.PL] 1 Apr 2012 a Dipartimento di Matematica, Università di Parma, Italy srl, http://bugseng.com c IREMIA, LIM, Université de la Réunion, France d Università di Parma, Italy b BUGSENG Abstract The classical technique for proving termination of a generic sequential computer program involves the synthesis of a ranking function for each loop of the program. Linear ranking functions are particularly interesting because many terminating loops admit one and algorithms exist to automatically synthesize it. In this paper we present two such algorithms: one based on work dated 1991 by Sohn and Van Gelder; the other, due to Podelski and Rybalchenko, dated 2004. Remarkably, while the two algorithms will synthesize a linear ranking function under exactly the same set of conditions, the former is mostly unknown to the community of termination analysis and its general applicability has never been put forward before the present paper. In this paper we thoroughly justify both algorithms, we prove their correctness, we compare their worst-case complexity and experimentally evaluate their efficiency, and we present an open-source implementation of them that will make it very easy to include termination-analysis capabilities in automatic program verifiers. Keywords: Static analysis, computer-aided verification, termination analysis. 1. Introduction Termination analysis of computer programs (a term that here we interpret in its broadest sense) consists in attempting to determine whether execution of a given program will definitely terminate for a class of its possible inputs. The ability to anticipate the termination behavior of programs (or fragments thereof) is essential to turn assertions of partial correctness (if the program reaches a certain control point, then its state satisfies some requirements) into ✩ This work has been partly supported by PRIN project “AIDA—Abstract Interpretation: Design and Applications” and by the Faculty of Sciences of the University of Parma. Email addresses: [email protected] (Roberto Bagnara), [email protected] (Fred Mesnard), [email protected] (Andrea Pescetti), [email protected] (Enea Zaffanella) Preprint submitted to Information and Computation assertions of total correctness (the program will reach that point and its state will satisfy those requirements). It is worth observing that the property of termination of a program fragment is not less important than, say, properties concerning the absence of run-time errors. For instance, critical reactive systems (such as fly-by-wire avionics systems) must maintain a continuous interaction with the environment: failure to terminate of some program components can stop the interaction the same way as if an unexpected, unrecoverable run-time error occurred. Developing termination proofs by hand is, as any other program verification task, tedious, error-prone and, to keep it short, virtually impossible to conduct reliably on programs longer than a few dozens of lines. For this reason, automated termination analysis has been a hot research topic for more than two decades. Of course, due to well-known limitative results of computation theory, any automatic termination analysis can only be expected to give the correct answer (“the program does —or does not— terminate on these inputs”) for some of the analyzed programs and inputs: for the other programs and inputs the analysis will be inconclusive (“don’t know”). It is worth noticing that there is no need to resort to the halting problem to see how hard proving termination can be. A classical example is the 3x + 1 problem,1 whose termination for any n has been a conjecture for more than 70 years: while n > 1 do if (n mod 2) 6= 0 then n := 3n + 1 else n := n div 2 The classical technique for proving termination of a generic sequential computer program consists in selecting, for each loop w of the program: 1. a set Sw that is well-founded with respect to a relation Rw ⊆ Sw × Sw ; namely, for each U ⊆ Sw such that U 6= ∅, there exists v ∈ U such that (u, v) ∈ / Rw for each u ∈ U ; 2. a function fw from the set of program states that are relevant for w (e.g., those concerning the head of the loop and that are reachable from a designated set of initial states) to the set Sw , such that the values of fw computed at any two subsequent iterations of w are in relation Rw . The function fw is called ranking function, since it ranks program states according to their “proximity” to the final states. Let us focus on deterministic programs, and consider a loop w and a set of initial states ΣIw for w. Assume further that the body of w always terminates when w is initiated in a state σ ∈ ΣIw and that ΣF w is a set of final states for w, that is, w immediately terminates when it is initiated in a state σ ∈ ΣF w . If we fix any enumeration of ΣIw = {σ00 , σ10 , . . .}, then the computations of w we are interested in can be 1 Also known as the Collatz problem, the Syracuse problem, Kakutani’s problem, Hasse’s algorithm, and Ulam’s problem: see, e.g., [1]. 2 represented by the (possibly infinite) sequence of (possibly infinite) sequences σ00 .. . σ01 .. . σi0 .. . σi1 .. . ... .. . ... .. . (1) Let Σw be the set of all states that occur in (1). Suppose that we succeed in finding a ranking function fw : Σw → Sw , where Sw is well-founded with n n+1 respect to Rw and,  for each m, n ∈ N, if σm and σm occur in (1), then n+1 n fw (σm ), fw (σm ) ∈ Rw . In this case we know that all the sequences in (1), and hence all the computations they represent, are finite. Example 1.1. Consider the following loop, where x takes values in Z: while x 6= 0 do x := x − 1 Here the state at the loop head can be simply characterized by an integer number: the value of x. If we take ΣI := N then the computation sequences of interest are 0 1 0 .. .. .. . . . n .. . n − 1 ... 0 .. . .. . F We thus have Σ = N and Σ  = {0}. If we define S := N, f as the identity function over N, and R := (h, k) h, k ∈ N, h < k , then S is well founded with respect to R and f is a ranking function (with respect to Σ, S and R). Observe  that, in the example above, taking R as the predecessor relation, i.e., R := (h, k) h, k ∈ N, h = k − 1 , would have worked too; or f could have been defined as the function mapping h to 2h, in which case S could have been left as before or defined as the set of even nonnegative integers. . . . In general, if a ranking function exists, an infinite number of them do exist. The next example shows that freedom in the choice of the well-founded ordering can be used to obtain simpler ranking functions. Example 1.2. Consider the following program, where variables take values in N and comments in braces describe the behavior of deterministic program 3 fragments that are guaranteed to terminate and whose details are unimportant: var a : array[1 .. n] of unsigned integer; { all elements of a are written } while a[1] > 0 do { i takes a value between 1 and n such that a[i] 6= 0 } a[i] := a[i] − 1 { positions i + 1, i + 2, . . . , n of a are possibly modified } Here we can take ΣI = Σ = Nn and ΣF = {0} × Nn−1 . If we define S := Nn , f as the identity function over Nn , and R ⊂ Nn × Nn as the lexicographic ordering over Nn , then f is a ranking function with respect to Σ, S and R. Finding a ranking function having N as codomain would have been much more difficult and could not be done without a complete knowledge of the program fragments we have summarized with the comments between braces. We have seen that, if there exists a ranking function, then all computations summarized by (1) terminate. What is interesting is that the argument works also the other way around: if all the computations summarized by (1) do terminate, then there exists a ranking function (actually, there exists an infinite number of them). In fact, suppose all the sequences in (1) are finite. Since the program is deterministic, any state occurs only once in every sequence. Moreover, if a state σ occurs in more than one sequence, then the suffixes of these sequences that immediately follow σ are all identical (since the future of any computation is completely determined by its current state). The function mapping each σ in Σw to the natural number representing the length of such suffixes is thus well defined and is a ranking function with respect to Σw and N with the well-founded ordering given by the ‘<’ relation. It is worth observing that the above argument implies that if any ranking function exists, then there exists a ranking function over (N, <). This observation can be generalized to programs having bounded nondeterminism [2]: therefore, ranking functions on the naturals are sufficient, for instance, when modeling the input of values for commonly available built-in data types. However, as illustrated by Example 1.2, the use of more general well-founded orderings can simplify the search for a ranking function. Moreover, such a generalization is mandatory when dealing with unbounded nondeterminism [2] (see also [3, Section 10]). The termination of a set of computations and the existence of a ranking function for such a set are thus completely equivalent. On the one hand, this means that trying to prove that a ranking function exists is, at least in principle, not less powerful than any other method we may use to prove termination. On the other hand, undecidability of the termination problem implies that the existence of a ranking function is also undecidable. An obvious way to prove the existence of a ranking function is to synthesize one from the program text and a description of the initial states: because of undecidability, there exists no algorithm that can do that in general. 4 The use of ranking functions as a tool to reason about termination can be traced back to the seminal work of R. W. Floyd in [4], where they are introduced under the name of W -functions. Since then, several variations of the method have been proposed so as to extend its applicability from the realm of classical sequential programs to more general constructs (e.g., concurrency). In particular, in [3], seven different ‘à la Floyd ’ induction principles for nondeterministic transition systems are formally shown to be sound, semantically complete and equivalent. For instance, it is shown that it is sufficient to consider a single, global ranking function, instead of a different ranking function for each program control point, as originally proposed in [4]; and that the decrease of such a global ranking function need not be verified at all program control points, but it is enough to consider a minimal set of loop cut-points; moreover, when trying to prove properties that only depend on the current state of the system (e.g., termination of a deterministic program), it is always possible to find a ranking function depending on the current state only, i.e., independent of the initial state of the system. Note that these results have been implicitly exploited in the examples above so as to simplify the presentation of the method. In this paper we present, in very general terms so as to encompass any programming paradigm, the approach to termination analysis based on the explicit search of ranking functions. We then restrict attention to linear ranking functions obtained from linear approximations of the program’s semantics. For this restriction, we present and fully justify two methods to prove the existence of linear ranking functions: one, based on work dated 1991 by Sohn and Van Gelder, that is almost unknown outside the field of logic programming even though, as we demonstrate in the present paper, it is completely general; the other, due to Podelski and Rybalchenko, dated 2004, was proved correct by the authors but the reasons why it works were never presented. We then provide a proof of equivalence of the two methods, thus providing an independent assessment of their correctness and relative completeness. We also compare their theoretical complexity and practical efficiency on three related problems: 1. proving that one linear ranking function exists; 2. exhibiting one such function; 3. computing the space of all linear ranking functions. The experimental evaluation is based on the implementation of the two methods provided by the Parma Polyhedra Library [5], a free software library of numerical abstraction targeted at software/hardware analysis and verification. These implementations are, to the best of our knowledge, the first ones that are being made available, in source form, to the community. For this reason, the implementations should be regarded as complementary to the present paper in the common aim of making the automatic synthesis of linear ranking functions known outside programming language barriers, understandable and accessible. The plan of the paper is as follows: Section 2 recalls preliminary notions and introduces the notation used throughout the paper; Section 3 introduces the problem of automatic termination analysis of individual loops and its solution technique based on the synthesis of ranking functions; Section 4 presents 5 a simple generalization of the approach of [6] that is generally applicable to termination analysis of any language; Section 5 shows and fully justifies the approach of [7]; Section 6 proves the two methods are equivalent and compares them from the point of view of computational complexity; Section 7 presents the implementation of the two approaches offered by the Parma Polyhedra Library and the corresponding experimental evaluation, providing a comparison of their practical efficiency; Section 8 concludes. 2. Preliminaries 2.1. Set Theory The set of all finite sequences of elements of S is denoted by S ∗ . The empty sequence is denoted by ε and the length of a sequence w is denoted by |w|. The set of non-negative integers, rationals and reals are denoted by N, Q+ and R+ , respectively. 2.2. Linear Algebra For each i ∈ {1, . . . , n}, vi denotes the i-th component of the real (column) vector v = hv1 , . . . , vn i ∈ Rn . A vector v ∈ Rn can also be interpreted as a matrix in Rn×1 and manipulated accordingly with the usual definitions for addition, multiplication (both by a scalar and by another matrix), and transposition, which is denoted by v T , so that hv1 , . . . , vn i = (v1 , . . . , vn )T . If v ∈ Rn and w ∈ Rm , we will write hv, wi to denote the column vector in Rn+m obtained by “concatenating” v and w, so that hv, wi = hv1 , . . . , P vn , w1 , . . . , wm i. n The scalar product of v, w ∈ Rn is the real number v T w = i=1 vi wi . The n×n identity matrix in R is denoted by I n . We write 0 to denote a matrix in Rn×m having all of its components equal to zero; the dimensions n and m will be clear from context. We sometimes treat scalars as vectors in R1 or matrices in R1×1 . For any relational operator ⊲⊳V∈ {<, ≤, =, ≥, >}, we write v ⊲⊳ w to den note the conjunctive proposition i=1 (vi ⊲⊳ wi ). Moreover, v 6= w will denote the proposition ¬(v = w). We will sometimes use the convenient notation a ⊲⊳1 b ⊲⊳2 c to denote the conjunction a ⊲⊳1 b ∧ b ⊲⊳2 c and we will not distinguish conjunctions of propositions from sets of propositions. The same notation applies to vectors defined over other numeric fields and, for the supported operations, to vectors defined over numeric sets such as N and Q+ . 2.3. First-Order Logic A triple Σ = (S, F, R) is a signature if S is a set of sort symbols, F := (Fw,s )w∈S ∗ ,s∈S is a family of sets of function symbols and R := (Rw )w∈S ∗ is a family of sets of relation symbols (or predicate symbols). If Fs1 ···sn ,s ∋ f we use the standard notation for functions and write F ∋ f : s1 × · · · × sn → s. Similarly, if Rs1 ···sn ∋ p we use the standard notation for relations and write R ∋ p ⊆ s1 × · · · × sn . A Σ-structure A = (S A , F A , RA ) consists of: a set S A containing one arbitrary set sA for each sort symbol s ∈ S; a family F A of sets of 6 A functions such that, for each f : s1 ×· · ·×sn → s, a function f A : sA 1 ×· · ·×sn → A A A s belongs to F ; a family R of sets of relations defined similarly. Let X be a denumerable set of variable symbols. The set of (Σ, X)-terms (or, briefly, terms) is inductively defined as usual: elements of X are terms and, for each f ∈ Fw,s with |w| = k, if t1 , . . . , tk are terms, then f (t1 , . . . , tk ) is a term. If p ∈ Rw with |w| = k and t1 , . . . , tk are terms, then p(t1 , . . . , tk ) is an atomic (Σ, X)-formula. (Σ, X)-formulas are built as usual from atomic formulas and logical connectives and quantifiers. The first-order language L(Σ, X) is the set of all (Σ, X)-formulas. The notion of bound and free variable occurrence in a formula are also defined in the standard way. We will routinely confuse a tuple of variables with the set of its components. So, if φ is a (Σ, X)-formula, we will write φ[x̄] to denote φ itself, yet emphasizing that the set of free variables in φ is included in x̄. Let x̄, ȳ ∈ X ∗ be of the same length and let φ be a (Σ, X)formula: then φ[ȳ/x̄] denotes the formula obtained by simultaneous renaming of each free occurrence in φ of a variable in x̄ with the corresponding variable in ȳ, possibly renaming bound variable occurrences as needed to avoid variable  capture. Notice that φ[x̄] implies φ[ȳ/x̄] [ȳ], for each admissible ȳ ∈ X ∗ . A formula with no free variable occurrences is termed closed or called a sentence. The universal closure of a formula φ is denoted by ∀(φ). If φ is a closed (Σ, X)-formula and A is a Σ-structure, we write A |= φ if φ is satisfied when interpreting each symbol in Σ as the corresponding object in A. A set T of closed (Σ, X)-formulas is called a (Σ, X)-theory. We write A |= T if A |= φ for each φ ∈ T . If φ is a closed (Σ, X)-formula and T is a (Σ, X)-theory, we write T |= φ if, for each Σ-structure A, A |= T implies A |= φ. In this case we say that φ is a logical consequence of T . 3. Termination Analysis of Individual Loops We will start by restricting our attention to individual loops of the form { I } while B do C (2) where • I is a loop invariant that a previous analysis phase has determined to hold just before any evaluation of B; • B is a Boolean guard expressing the condition on the state upon which iteration continues; • C is a command that, in the context set by (2), is known to always terminate. Notice that, for maximum generality, we do not impose any syntactic restriction on I, B and C and will only observe their interaction with the program state: I and B express conditions on the state, and C is seen as a state transformer, that is, a condition constraining the program states that correspond to its initial 7 and final states. We assume that such conditions are expressed in a fragment of some first-order language L = L(Σ, X) that is closed under finite conjunction and implication (indeed a limited form of implication is often enough). We assume further that the meaning of the sentences in L is given by some theory T for which we are given a sound inference procedure denoted by ‘⊢’, that is, for each sentence φ ∈ L, if T ⊢ φ then T |= φ. Finally, we fix a Σ-structure D such that D |= T , which captures the domain over which computation and program reasoning take place. Let x̄ be the tuple of variables containing (among possible others) all the free variables of (2). The effect of C within the loop can be captured by stipulating that x̄ characterizes the state before execution of C, introducing a tuple of new variables x̄′ that characterizes the state after C’s execution, and by imposing restrictions on the combined tuple x̄x̄′ . Our last assumption is that we are given formulas of L that correctly express the semantics of I, B, and C: let us call these formulas φI , φB and φC , respectively. With these definitions and assumptions, the semantics of loop (2) is correctly approximated as follows: 1. 2. 3. 4. whenever the loop guard B is evaluated, φI [x̄] holds; if φI [x̄] ∧ φB [x̄] is inconsistent, iteration of the loop terminates; just before execution of C, φI [x̄] ∧ φB [x̄] holds; just after execution of C, φI [x̄] ∧ φB [x̄] ∧ φC [x̄x̄′ ] holds. It is worth observing that the presence of the externally-generated invariant I is not restrictive: on the one hand, φI [x̄] can simply be the “true” formula, when nothing better is available; on the other hand, non trivial invariants are usually a decisive factor for the precision of termination analysis. As observed in [8], the requirement that I must hold before any evaluation of B can be relaxed by allowing I not to hold finitely many times.2 The same kind of approximation can be applied to φI , φB and φC by only requesting that they eventually hold. We would like to stress that, at this stage, we have not lost generality. While the formalization of basic iteration units in terms of while loops has an unmistakable imperative flavor, it is general enough to capture iteration in other programming paradigms. To start with, recall that a reduction system is a pair (R, →), where R is a set and → ⊆ R × R. A term-rewrite system is a reduction system where R is a set of terms over some signature and ‘→’ is encoded by a finite set of rules in such a way that, for each term s, the set of terms t such that s → t is finitely computable from s and from the system’s rules. Maximal reduction sequences of a term-rewrite system can be expressed by the following algorithm, for each starting term s: term := s while { t | term → t } 6= ∅ do choose u ∈ { t | term → t }; term := u 2 Such an invariant is called tail invariant in [8]. 8 Here, the choose construct encodes the rewriting strategy of the system. Let R = { t | s →⋆ t } denote the set of terms that can be obtained by any finite number of rewritings of the initial term s. Then, the algorithm above can be transformed into the form (2) by considering, as the invariant I, a property expressing that variable ‘term’ can take values in any over-approximation S ⊇ R of all the possible rewritings. Namely, { term ∈ S } while { t | term → t } 6= ∅ do choose u ∈ { t | term → t }; term := u Termination of the rewritten while loop implies termination of the original one; the reverse implication holds if S = R. The semantics of logic programs, functional programs, concurrent programs and so forth can be (and often are) formalized in terms of rewriting of goals and various kinds of expressions: hence no generality is lost by considering generic while loops of the form (2). The approach to termination analysis based on ranking functions requires that: 1. a set O and a binary relation ≺ ⊆ O × O are selected so that O is wellfounded with respect to ‘≺’; 2. a term δ[ȳ] of L is found such that    T ⊢ ∀ φI [x̄] ∧ φB [x̄] ∧ φC [x̄x̄′ ] → ω δ[x̄′ /ȳ], δ[x̄/ȳ] , (3) where the interpretation of ω over D corresponds to ‘≺’; the function associated to δ in D is called ranking function for the loop (2). Termination of (2) follows by the correctness of φI , φB , φC and ‘⊢’, and by well-foundedness of O with respect to ‘≺’. To see this, suppose, towards a contradiction, that loop (2) does not terminate. The mentioned soundness conditions would imply the existence of an infinite sequence of elements of O o0 ≻ o1 ≻ o2 ≻ · · · (4) Let U ⊆ O be the (nonempty) set of elements in the sequence. Since O is well founded with respect to ‘≺’, there exists j ∈ N such that, for each i ∈ N, oi ⊀ oj . But this is impossible, as, for each j ∈ N, oj+1 ≺ oj . This means that the infinite chain (4) cannot exist and loop (2) terminates. Example 3.1. Let Σ = (S, F, R) with S = {i}, F = Fε,i ∪ Fi,i , Fε,i =  {0}, Fi,i = {s} and R = Ri·i = {=, <}. Let also D = {Z}, {0, s}, {e, l} be a Σ-structure where s = { (n, n + 1) | n ∈ Z }, e = { (n, n) | n ∈ Z } and l = { (n, m) | n, m ∈ Z, n < m }. Let X be a denumerable set of variable 9 symbols and let T be a suitable subtheory of arithmetic restricted to L(Σ, X). Consider now the loop {x ≥ 0} while x 6= 0 do x := x − 1  We have φI = (x = 0 ∨ 0 < x), φB = ¬(x = 0) and φC = s(x′ ) = x . If we take (O, ≺) = (N, l ∩ N2 ), δ[y] = y, and ω(τ, υ) = (τ = 0 ∨ 0 < τ ) ∧ τ < υ , we can substitute into (3) and obtain   T ⊢ ∀x, x′ : (x = 0∨0 < x)∧¬(x = 0)∧s(x′ ) = x → (x′ = 0∨0 < x′ )∧x′ < x which simplifies to   T ⊢ ∀x, x′ : 0 < x ∧ s(x′ ) = x → (x′ = 0 ∨ 0 < x′ ) ∧ x′ < x which a reasonable inference engine can easily check to be true. This general view of the ranking functions approach to termination analysis allows us to compare the methods in the literature on a common ground and focusing on what, besides mere presentation artifacts, really distinguishes them from one another. Real differences have to do with: • the choice of the well-founded ordering (O, ≺); • the class of functions in which the method “searches” for the ranking functions; • the choice of the signature Σ, the domain D and theory T ; this has to accommodate the programming formalism at hand, the semantic characterization upon which termination reasoning has to be based, the axiomatization of (O, ≺), and the representation of ranking functions; • the class of algorithms that the method uses to conduct such a search. We now briefly review these aspects. The most natural well-founded ordering is, of course, (N, <). This is especially indicated when the termination arguments are based on quantities that can be expressed by natural numbers. This is the case, for instance, of the work by Sohn and Van Gelder for termination analysis of logic programs [6, 9]. Orderings based on Q+ or R+ can be obtained by  imposing over them relations like those defined, for each ǫ > 0, by <ǫ := (h, k) ∈ S2+ h + ǫ ≤ k , where ǫ ∈ S+ and S+ = Q+ or S+ = R+ , respectively. Of course, this is simply a matter of convenience: a ranking function f with codomain (R+ , <ǫ ) can always be converted into a ranking function g with codomain (N, <) by taking g(ȳ) = ⌊f (ȳ)ǫ−1 ⌋. Similarly, any ranking function over (R+ , <ǫ ) can be converted into a ranking function over (R+ , <1 ). On tuples, the lexicographic ordering is the most common choice for a well-founded relation: given a finite 10 number of well-founded relations ≺i for i = 1, . . . , n over a set S, the lexicographic ordering over Sn is induced by saying that s ≺ t if and only if si ≺i ti for an index i and sj = tj for all indices j < i. The termination analyzer of the Mercury programming language [10, 11] first attempts an analysis using the (N, <) ordering; if that fails then it resorts to lexicographic orderings. Lexicographic orderings on Cartesian products of (R+ , <ǫ ) are also used in [12]. The synthesis of ranking functions is easily seen to be a search problem. All techniques impose limits upon the universe of functions that is the domain of the search. For instance, in the logic programming community, thePworks in n [10, 11, 13, 14] use ranking functions of the form f (x1 , . . . , xn ) = i=1 µi xi , where, for i = 1, . . . , n, µi ∈ {0, 1} and the variable xi takes values in N. The method of Sohn and Pn Van Gelder [6, 9] is restricted to linear functions of the form f (x1 , . . . , xn ) = i=1 µi xi , where, for i = 1, . . . , n, µi ∈ N and the variable xi takes values in N. Its generalization to Q+ was proposed in [15] and further generalized by Mesnard andPSerebrenik [16, 17] to obtain affine functions of the form f (x1 , . . . , xn ) = µ0 + ni=1 µi xi , where µi ∈ Z and xi take values in Q or R, for i = 0, . . . , n. Use of the method of Podelski and Rybalchenko [7] was presented in [18] and is a component of Terminator, a termination prover of C systems code [19]. Nguyen and De Schreye [20] proposed, in the context of logic programming and following a thread of work in termination of term rewrite systems that can be traced back to [21], to use polynomial ranking functions. Qn Pm k These are of the basic form f (x1 , . . . , xn ) = µ0 + j=1 µj i=1 xi ij where µ0 ∈ Z and, for i = 1, . . . , n and j = 1, . . . , m, µj ∈ Z, kij ∈ N and the variable xi takes values in Z [22]. Several further restriction are usually imposed: first a domain A ⊆ N is selected; then it is demanded that, for each x1 , . . . , xn ∈ A, f (x1 , . . . , xn ) ∈ A and that f is strictly monotone over A on all its arguments. The set of all such polynomials is itself well-founded with respect to ‘<A ’: f <A g if and only if, for each x1 , . . . , xn ∈ A, f (x1 , . . . , xn ) < g(x1 , . . . , xn ). The condition of strict monotonicity, namely, for each x1 , . . . , xn ∈ A, each i = 1, . . . , n, and each y, z ∈ A with y < z, f (x1 , . . . , xi−1 , y, xi+1 , . . . , xn ) < f (x1 , . . . , xi−1 , z, xi+1 , . . . , xn ), is ensured if, for each j = 1, . . . , m, we have µj ∈ N and, for each i = 0, . . . , n, there exists j such that µj 6= 0 and kij 6= 0. Choosing A 6= N brings some advantages. For example, if A ⊆ { n ∈ N | n ≥ 2 } then multiplication of polynomials is strictly monotone on both its arguments (i.e., f <A f ·g and g <A f ·g). Additional restrictions are often imposed in order to make the search of ranking functions tractable: both the maximum degree of polynomials and their coefficients —the µj ’s above— can be severely limited (an upper bound of 2 both on degrees and on coefficients is typical). Quadratic ranking functions of the form f (x1 , . . . , xn ) = hx1 , . . . , xn , 1iT M hx1 , . . . , xn , 1i are considered in [23], where the variables xi and the unknown coefficients µij of the (n + 1) × (n + 1) symmetric matrix M take values in R. [12] considers a search space of tuples of (up to a fixed number of) linear functions. The logic used in most papers about the synthesis of linear (or affine) ranking functions (such as [6, 7, 24]) is restricted to finite conjunctions of linear equalities or inequalities and simple implications (e.g., of a single inequality by 11 a conjunction). In [12] this logic is extended to include disjunction, so as to capture precisely the effect of the loop body. Concerning algorithms, the restriction to conjunctions of linear equalities or inequalities allows the use of the simplex algorithm (or other algorithms for linear programming) to prove the existence of linear ranking functions in [6, 7] or to synthesize one of them. When a space of ranking functions is sought, these can be obtained by projecting the systems of constraints onto a designated set of variables using, for instance, Fourier-Motzkin elimination. In these approaches, standard algorithms from linear programming work directly on an abstraction of the loop to be analyzed and are able to decide the existence of linear ranking functions for that abstraction. The algorithms used in other approaches belong to the category of “generate and test” algorithms: the “generate” phase consists in the selection, possibly guided by suitable heuristics, of candidate functions, while the “test” phase amounts to prove that a candidate is indeed a ranking function. This is the case, for instance, of [12], where generation consists in the instantiation of template functions and testing employs an algorithm based on a variant of Farkas’ Lemma. Non-linear constraints generated by the method described in [23] are handled by first resorting to semidefinite programming solvers and then validating the obtained results by using some other tools, since these solvers are typically based on interior point algorithms and hence may incur into unsafe rounding errors. Note that, in principle, the very same observation would apply to the case of linear constraints, if the corresponding linear programming problem is solved using an interior point method or even a floating-point based implementation of the simplex algorithm; however, there exist implementations of the simplex algorithm based on exact arithmetic, so that linear programming problems can be numerically solved incurring no rounding errors at all and with a computational overhead that is often acceptable.3 It should be noted that the fact that in this paper we only consider simple while loops and linear ranking functions is not as restrictive as it may seem. Actually, one can trade the existence of a potentially complex global ranking function for the whole program for the existence of elementary local ranking functions of some selected individual simple loops appearing in a transformation of the whole program. General formulations of this idea are given in [18, 25] and provide a useful sufficient condition for termination. Now the question is: can one specify a particular class of programs and a particular class of elementary local ranking functions such that this sufficient condition turns out to be a correct and complete decision procedure for termination of this class of programs? The Size-Change Principle proposed by [26] presents such a class of programs where the local ranking functions can be safely restricted to linear functions with 0/1 coefficients. Moreover, in a generalization of this work presented in [27, 28], the authors prove that, under certain hypotheses, linear functions are a large enough class of local ranking functions for a sound and 3 In contrast, an exact solver for non-linear constraints would probably require a truly symbolic computation, incurring a much more significant computational overhead. 12 complete termination criterion. Hence, for the class of programs they consider, termination is a decidable property. 4. The Approach of Sohn and Van Gelder, Generalized As far as we know, the first approach to the automatic synthesis of ranking functions is due to Kirack Sohn and Allen Van Gelder [6, 9]. Possibly due to the fact that their original work concerned termination of logic programs, Sohn and Van Gelder did not get the recognition we believe they deserve. In fact, as we will show, some key ideas of their approach can be applied, with only rather simple modifications, to the synthesis of ranking functions for any programming paradigm. In this section we present the essentials of the work of Sohn and Van Gelder in a modern setting: we will first see how the termination of logic programs can be mapped onto the termination of binary CLP(N) programs; then we will show how termination of these programs can be mapped to linear programming; we will then review the generalization of Mesnard and Serebrenik to CLP(Q) and CLP(R) programs and, finally, its generalization to the termination analysis of generic loops. 4.1. From Logic Programs to Binary CLP(N) Programs  Consider a signature Σt = {t}, F, R and a denumerable set X of variable symbols. Let Tt be the set of all (Σt , X)-terms. A substitution θ is a total function θ : X → Tt that is the identity almost everywhere; in other words, the  set x ∈ X θ(x) 6= x is finite. The application of θ to t ∈ Tt gives the term θ(t) ∈ Tt obtained by simultaneously replacing all occurrences of a variable x in t with θ(x). Consider a system of term equations E = {t1 = u1 , . . . , tn = un }: a substitution θ is a unifier of E if θ(ti ) = θ(ui ) for i = 1, . . . , n. A substitution θ is a most general unifier (mgu) of E if it is a unifier for E and, for any unifier η of E, there exists a substitution ξ such that η = ξ ◦ θ. Let t and u be terms: we say that t and u are variants if there exist substitutions θ and η such that t = θ(u) and u = η(t). A formula of the form r(t1 , . . . , tn ), where r ∈ R and t1 , . . . , tn ∈ Tt is called an atom. A goal is a formula of the form B1 , . . . , Bn , where n ∈ N and B1 , . . . , Bn are atoms. The goal where n = 0, called the empty goal, is denoted by . A logic program is a finite set of clauses of the form H :− G, where H is an atom, called the head of the clause, and G is a goal, called its body. The notions of substitution, mgu and variant are generalized to atoms, goals and clauses in the expected way. For example, θ is an mgu for atoms r(t1 , . . . , tn ) and s(u1 , . . . , um ) if r = s, n = m and θ is an mgu for {t1 = u1 , . . . , tn = un }. Left-to-right computation for logic programs can be defined in terms of ′ rewriting of goals. Goal B1 , . . . , Bn can be rewritten to C1′ , . . . , Cm , B2′ , . . . , Bn′ if there exists a variant of program clause H :− C1 , . . . , Cm with no variables in common with B1 , . . . , Bn , the atoms H and B1 are unifiable with mgu θ, and Ci′ = θ(Ci ), for i = 1, . . . , m, Bj′ = θ(Bj ), for j = 2, . . . , n. Computation 13 terminates if and when rewriting produces the empty goal. Notice that the computation, due to the fact that there may be several clauses that can be used at each rewriting step, is nondeterministic. Let nil, cons ∈ F , perm, select ∈ R and v, w, x, y, z ∈ X. The following logic program defines relations over lists inductively defined by the constant nil, the empty list, and the binary constructor cons, which maps a term t and a list l to the list whose first element is t and the remainder is l: list(nil) :− ; list(cons(x, y)) :− list(y); select(x, cons(x, y), y) :− list(y); select(x, cons(y, z), cons(y, w)) :− select(x, z, w); (5) perm(nil, nil) :− ; perm(x, cons(v, z)) :− select(v, x, y), perm(y, z). The program defines the unary relation list to be the set of such lists. The ternary relation select contains all (x, y, z) such that x appears in the list y, and z is y minus one occurrence of x. The binary relation perm contains all the pairs of lists such that one is a permutation of the other. A computation of a logic program starting from some initial goal can: terminate with success, when rewriting ends up with the empty goal; terminate with failure, when rewriting generates a goal whose first atom is not unifiable with the head of any (variant of) program clause; loop forever, when the rewriting process continues indefinitely. Because of nondeterminism, the same program and initial goal can give rise to computations that succeed, fail or do not terminate. A goal G enjoys the universal termination property with respect to a program P if all the computations starting from G in P do terminate, either with success or failure.4 The idea behind this approach to termination analysis of logic programs is that termination is often ensured by the fact that recursive “invocations” involve terms that are “smaller”. Rewriting of list(cons(t1 , cons(t2 , nil))), for example, results in list(cons(t2 , nil)) and then list(nil). Various notions of “smaller term” can be captured by linear symbolic norms [6, 30]. Consider  the signature Σe = {e}, {0, 1, +}, P ∪ {=, ≤} . The set Te of (Σe , X)-terms contains affine expressions with natural coefficients. A linear symbolic norm is a function of the form k · k : Tt → Te such that ( t, if t ∈ X, ktk := Pn c + i=1 ai kti k, if t = f (t1 , . . . , tn ), where c and a1 , . . . , an are natural numbers that only depend on f and n. The term-size norm, for example, is characterized by c = 0 for each f ∈ Fε,t and by 4 The related concept of existential termination has a number of drawbacks and will not be considered here. See [29] for more information. 14 c = 1 and ai = 1 for each f ∈ Fw,t ⊆ F \ Fε,t and i = 1, . . . , |w|.5 The list-length norm is, instead, characterized by c = 0 and ai = 0 for each f 6= cons ∈ Ftt,t , and by c = a2 = 1 and a1 = 0 for the cons binary constructor. Once a linear symbolic norm has been chosen, a logic program can be converted by replacing each term with its image under the norm. For example, using the list-length norm the above program becomes: list(0) :− ; list(1 + y) :− list(y); select(x, 1 + y, y) :− list(y); select(x, 1 + z, 1 + w) :− select(x, z, w); perm(0, 0) :− ; perm(x, 1 + z) :− select(v, x, y), perm(y, z). (6) (7) (8) (9) (10) (11) The program obtained by means of this abstraction process —we have replaced terms by an expression of their largeness— is a CLP(N) program. In the CLP (Constraint Logic Programming) framework [31], the notion of unifiability is generalized by the one of solvability in a given structure. The application of most general unifiers is, in addition, generalized by the collection of constraints into a set of constraints called constraint store.6 In CLP(N), the constraints are equalities between affine expressions in Te and computation proceeds by rewriting a goal and augmenting a constraint store Γ, which is initially empty, with new constraints. Goal B1 , B2 , . . . , Bn can be rewritten to C1 , . . . , Cm , B2 , . . . , Bn if there exists a variant H :− C1 , . . . , Cm of some program clause with no variables in common with B1 , . . . , Bn such that H = p(t1 , . . . , tn ), B1 = p(u1 , . . . , un ) and Γ′ := Γ ∪ {t1 = u1 , . . . , tn = un } is satisfiable over the Σe -structure given by the naturals, the functions given by the constants 0 and 1 and the binary sum operation, and the identity relation over the naturals. In this case Γ′ becomes the new constraint store. The interesting thing about the abstract CLP(N) program —let us denote it by α(P )— is that the following holds: if an abstract goal α(G) universally terminates with respect to α(P ), then the original goal G universally terminates with respect to the original program P , and this for each linear symbolic norm that is used in the abstraction (see [33, Section 6.1] for a very general proof of this fact). The converse does not hold because of the precision loss abstraction involves. We will now show, appealing to intuition, that the ability to approximate the termination behavior of programs constituted by a single binary CLP(N) clause, that is, of the form p(x̄) :− c[x̄, x̄′ ], p(x̄′ ), (12) 5 The variant used in [6], called structural term size, can be obtained by letting, for each f ∈ Fw,t , c = |w| and ai = 1 for i = 1, . . . , |w|. 6 We offer a self-contained yet very simplified view of the CLP framework. The interested reader is referred to [31, 32]. 15 where p is a predicate symbol, gives a technique to approximate the termination behavior of any CLP(N) program. The first step is to compute affine relations that correctly approximate the success set of the CLP(N) program. For our program, we can obtain (e.g., by standard abstract interpretation techniques [34, 35]) list(x) succeeds =⇒ true; select(x, y, z) succeeds =⇒ z = y − 1; perm(x, y) succeeds =⇒ x = y. We now consider the clauses of the CLP(N) program one by one. Clause (6) does not pose any termination problem. Clause (7) is already of the form (12): we can call the engine described in the next section and obtain the ranking function f (x) = x for list(x), meaning that the argument of list strictly decreases in the recursive call. We thus note that list(x) terminates if called with x ∈ N. (13) Consider now clauses (8) and (9): for the former we simply have to note that we need to satisfy (13) in order to guarantee termination; for the latter, which is of the form (12), we can obtain an infinite number of ranking functions for select(x, y, z), among which are f (x, y, z) = y (the second argument decreases) and f (x, y, z) = z (the third argument decreases). Summing up, for the select predicate we have select(x, y, z) terminates if called with y ∈ N and/or z ∈ N. (14) Now, clause (10) does not pose any termination problem, but clause (11) is not of the form (12). However we can use the computed model to “unfold” the invocation to select and obtain perm(x, 1 + z) :− y = x − 1, perm(y, z), (11’) which has the right shape and, as far as the termination behavior of the entire program is concerned, is equivalent to (11) [36]. From (11’) we obtain, for perm(x, y), the ranking functions f (x, y) = x and f (x, y) = y. We thus note: perm(x, y) terminates if called with x ∈ N and/or y ∈ N and the call to select in (11) terminates. (15) Summarizing, we have that goals of the form perm(k, y), where k ∈ N, satisfy (15); looking at clause (11) it is clear that they also satisfy (14); in turn, inspection of clause (8) reveals that also (13) is satisfied. As a result, we have proved that any invocation in the original logic program (5) of perm(x, y) with x bound to an argument whose list-length norm is constant, universally terminates. It may be instructive to observe that this implementation of perm is not symmetric: goals of the form perm(x, k), where k ∈ N, fail to satisfy (15) and, 16 indeed, it is easy to come up with goals perm(x, y) with y bound to a complete list that do not universally terminate in the original program. The procedure outlined in the previous example can be extended (in different ways) to any CLP(N) programs. As the precise details are beyond the scope of this paper, we only illustrate the basic ideas and refer the interested reader to the literature. The methodology is simpler for programs that are directly recursive, i.e., such that all “recursive calls” to p only happen in clauses for p.7 Consider a directly recursive clause. This has the general form p(x̄) :− c, β0 , p(x̄1 ), β1 , p(x̄2 ), β2 , . . . , p(x̄k ), βk , where the goals β0 , β1 , . . . , βk do not contain atoms involving p. The computed model is used to “unfold” β0 obtaining a sound approximation, in the form of a conjunction of linear arithmetic constraints, of the conditions upon which the first recursive call, p(x̄1 ) takes place. If we call c1 the conjunction of c with the constraint arising from the unfolding of β0 , we obtain the binary, directly recursive clause p(x̄) :− c1 , p(x̄1 ). We can now use the model to unfold the goals p(x̄1 ) and β1 and obtain a constraint that, conjoined with c1 , gives us c2 , a sound approximation of the “call pattern” for the second recursive call. Repeating this process we will obtain the binary clauses p(x̄) :− c2 , p(x̄2 ), .. . p(x̄) :− ck , p(x̄k ). We repeat this process for each clause defining p and end up with a set of binary clauses, for which a set of ranking functions is computed, using the technique to be presented in the next section. The same procedure is applied to each predicate symbol in the program. A final pass over the original CLP(N) program is needed to ensure that each body atom is called within a context that ensures the termination of the corresponding computation. This can be done as follows: 1. A standard global analysis is performed to obtain, for each predicate that can be called in the original CLP(N) program, possibly approximated but 7 For a CLP(N) program P , let Π be the set of predicate symbols appearing in P . On the P set ΠP , we define the relation ‘→’ such that p → q if and only if P contains a clause with p as the predicate symbol of its head and q as the predicate symbol of at least one body atom. Let ‘→⋆ ’ be the reflexive and transitive closure of ‘→’. The relation defined by p ≃ q if and only if p →⋆ q and q →⋆ p is an equivalence relation; we denote by [p]≃ the equivalence class including p. A program P is directly recursive if and only if, for each p ∈ ΠP , [p]≃ = {p}. A program P is mutually recursive if it is not directly recursive. 17 correct information about which arguments are known to be definite, i.e., constrained to take a unique value, in each call to that predicate (see, e.g., [37]). 2. For each recursive predicate that may be called, it is checked that, for each possible combination of definite and not-known-to-be-definite arguments, there is at least one ranking function that depends only on the definite arguments. The overall methodology can be adapted to mutually recursive programs, either by a direct extension of the above approach (see, e.g., [9]) or by more advanced program transformations (see, e.g., [38]). 4.2. Ranking Functions for Binary, Directly Recursive CLP(N) Programs In order to show how ranking functions can be computed from directly recursive binary CLP(N) clauses, we deal first with a single clause p(x̄) :− c[x̄, x̄′ ], p(x̄′ ), where p is a predicate symbol, x̄ and x̄′ are disjoint n-tuples of variables, and c[x̄, x̄′ ] is a linear constraint involving variables in x̄ ∪ x̄′ .8 The meaning of such a clause is that, if p is called on some tuple of integers x̄, then there are two cases: • c[x̄, x̄′ ] is unsatisfiable (i.e., there does not exist a tuple of integers x̄′ that, together with x̄, satisfies it), in which case the computation will fail, and thus terminate; • there exists x̄′ such that c[x̄, x̄′ ] holds, in which case the computation proceeds with the (recursive) calls p(x̄′ ), for each x̄′ such that c[x̄, x̄′ ]. The question is now to see whether that recursive procedure is terminating, that is whether, for each x̄ ∈ Nn , the call p(x̄) will only give rise to chains of recursive calls of finite length. The approach of Sohn and Van Gelder allows to synthesize a function fp : Nn → N such that ∀x̄, x̄′ ∈ Nn : c[x̄, x̄′ ] =⇒ fp (x̄) > fp (x̄′ ). (16) This means that the measure induced by fp strictly decreases when passing from a call of p to its recursive call. Since the naturals are well founded with respect to ‘<’, this entails that p, as defined in (12), is terminating. A very important contribution of Sohn and Van Gelder consists in the algorithm they give to construct a class of functions that satisfy (16). The class is constituted by linear functions of the form fp (y1 , . . . , yn ) = n X µi y i , i=1 8 As usual, we abuse notation by confusing a tuple with the set of its elements. 18 (17) where µi ∈ N, for i = 1, . . . , n. For this class of functions and by letting µ̄ = (µ1 , . . . , µn ), condition (16) can be rewritten as ∃µ̄ ∈ Nn . ∀x̄, x̄′ ∈ Nn : c[x̄, x̄′ ] =⇒ n X µi xi − i=1 n X µi x′i ≥ 1. (18) i=1 Given that c[x̄, x̄′ ] is a linear constraint, for any choice of µ̄ ∈ Nn we can easily express (18) as an optimization problem over the naturals. In order to move from tuple notation to the more convenient vector notation, assume without loss of generality that, for some m ∈ N, Ac ∈ Zm×2n and bc ∈ Zm are such that Ac hx, x′ i ≥ bc is logically equivalent to c[x̄, x̄′ ] under the obvious, respective interpretations. Then, for any candidate choice of µ ∈ Nn , condition (18) is equivalent to imposing that the optimization problem minimize subject to θ = hµ, −µiT hx, x′ i Ac hx, x′ i ≥ bc ′ x, x ∈ N (19) n is either unsolvable or has an optimal solution whose cost θ̂ is such that θ̂ ≥ 1. If this is the case, then µ induces, according to (17), a function fp satisfying (16). Notice that, for any fixed choice of µ ∈ Nn , θ is a linear expression and hence (19) is an integer linear programming (ILP) problem. This gives us an expensive way (since ILP is an NP-complete problem [39]) to test whether a certain µ ∈ Nn is a witness for termination of (12), but gives us no indication about where to look for such a tuple of naturals. A first step forward consists in considering the relaxation of (19) obtained by replacing the integrality constraints x, x′ ∈ Nn with x, x′ ∈ Qn+ . This amounts to trading precision for efficiency. In fact, since any feasible solution of (19) is also feasible for the relaxed problem, if the optimum solution of the latter has a cost greater than or equal to 1, then either (19) is unfeasible or θ̂ ≥ 1. However, we may have θ̂ ≥ 1 even if the optimum of the relaxation is less than 1.9 On the other hand, the relaxed problem is a linear problem: so by giving up completeness we have passed from an NP-complete problem to a problem in P for which we have, in addition, quite efficient algorithms.10 Furthermore, we observe that although the parameters µ are naturals in (18), this condition can be relaxed as well: if µ ∈ Qn+ gives a relaxed problem with optimum greater than 1, then we can multiply this vector by a positive natural so as to obtain a tuple of naturals satisfying (18). The relaxation can now be written using the 9 Let us consider the clause: p(x) :− 2x ≥ 2x′ + 1, p(x′ ) with µ = 1. The optimization over the integers leads to θ̂ = 1, whereas the optimization for the relaxation has θ̂ = 12 . 10 We denote by P the class of problems solvable in weakly polynomial time. For a formal definition of P and the notion of NP-completeness we refer the reader to, e.g., [40]. 19 standard linear programming (LP) notation: minimize subject to hµ, −µiT hx, x′ i Ac hx, x′ i ≥ bc (20) ′ hx, x i ≥ 0. We still do not know how to determine the vector of parameters µ so that the optimum of (20) is at least 1, but here comes one of the brilliant ideas of Sohn and Van Gelder: passing to the dual. It is a classical result of LP theory that every LP problem can be converted into an equivalent dual problem. The dual of (20) is maximize bTc y subject to ATc y ≤ hµ, −µi (21) y ≥ 0, where y is an m-column vector of (dual) unknowns. Duality theory ensures that if both (20) and (21) have bounded feasible solutions, then both of them have optimal solutions and these solutions have the same cost. More formally, for every choice of the parameters µ ∈ Qn+ , if hx̂, x̂′ i ∈ Q2n is an optimal solution for (20) and ŷ ∈ Qm is an optimal solution for (21), then hµ, −µiT hx̂, x̂′ i = bTc ŷ. Moreover, if one of (20) and (21) is unfeasible, then the other is either unbounded or unfeasible. In contrast, if one of (20) and (21) is unbounded, then the other is definitely unfeasible. Thus, thanks to duality theory, the LP problems (20) and (21) are equivalent for our purposes and we can consider any one of them. Suppose we analyze the dual problem (21): • If (21) is unfeasible then either (20) is unfeasible, which implies trivial termination of (12), or (20) is unbounded, in which case —since we are working on relaxations— nothing can be concluded about whether µ defines a ranking function for (12). • If (21) is feasible and unbounded then (20) is unfeasible and (12) trivially terminates. • If (21) is feasible and bounded, then we have proved termination (µ induces a ranking function) if the cost of the optimal solution is at least 1 (actually, any positive rational could be used instead of 1). The analysis is inconclusive otherwise. The crucial point is that, in (21), the parameters µ occur linearly, whereas in (20) they are multiplied by hx, x′ i. So we can treat µ as a vector of variables and transform (21) into the new LP problem in m + n variables maximize subject to hbc , 0iT hy, µi   −I n T hy, µi ≤ 0 Ac In hy, µi ≥ 0. 20 (22) The requirement that, in order to guarantee termination of (12), the optimal solutions of (20) and (21) should not be less than 1 can now be captured by incorporating bTc y ≥ 1 into the constraints of (22), yielding maximize subject to hbc , 0iT hy, µi     −I n T 0  Ac I n  hy, µi ≤ −1 T −bc 0 (23) hy, µi ≥ 0. There are several possibilities: 1. If (23) is unfeasible, then: (a) if (22) is unfeasible, then, for each µ ∈ Qn+ , (21) is unfeasible and: i. if (20) is unfeasible, then (12) trivially terminates; ii. otherwise (20) is unbounded and we can conclude nothing about the termination of (12). (b) If (22) is feasible, then it is bounded by a rational number q < 1. Thus, for each µ̌ ∈ Qn+ extracted from a feasible solution hy̌, µ̌i ∈ Qm+n of (22), the corresponding LP problem (21) is also feasible, + bounded, and its optimum q ′ ∈ Q is such that q ′ ≤ q < 1. Moreover, we must have q ′ ≤ 0. In fact, if q ′ > 0, problem (20) instantiated over µ̌′ := µ̌/q ′ would have an optimal solution of cost 1; the same would hold for the corresponding dual (21), but this would contradict the hypothesis that (22) is bounded by q < 1. Hence q ′ ≤ 0. Since by duality the optimum of problem (20) is q ′ , the analysis is inconclusive. 2. If (23) is feasible, let hy̌, µ̌i ∈ Qm+n be any of its feasible solutions. Choosing µ̌ for the values of the parameters, (21) is feasible. There are two further possibilities: (a) either (21) is unbounded, so (12) trivially terminates; (b) or it is bounded by a rational q ≥ 1 and the same holds for its dual (20). In both cases, µ̌, possibly multiplied by a positive natural in order to get a tuple of naturals, defines, via (17), a ranking function for (12). The above case analysis boils down to the following algorithm: 1. Use the simplex algorithm to determine the feasibility of (23), ignoring the objective function. If it is feasible, then any feasible solution induces a linear ranking function for (12); exit with success. 2. If (23) is unfeasible, then try to determine the feasibility of (19) (e.g., by using the simplex algorithm again to test whether the relaxation (20) is feasible). If (19) is unfeasible then (12) trivially terminates; exit with success. 3. Exit with failure (the analysis is inconclusive). An example should serve to better clarify the methodology we have employed. 21 Example 4.1. In the CLP(N) program p(x1 , x2 ) :− x1 ≤ 1 ∧ x2 = 0, p(x1 , x2 ) :− x1 ≥ 2 ∧ 2x′1 + 1 ≥ x1 ∧ 2x′1 ≤ x1 ∧ x′2 + 1 = x2 , p(x′1 , x′2 ), p(x1 , x2 ) is equivalent to x2 = ( ⌊log2 (x1 )⌋, if x1 6= 0; 0, otherwise. The relaxed optimization problem in LP notation (20) is11 minimize subject to hµ1 , µ2 , −µ1 , −µ2 iT hx1 , x2 , x′1 , x′2 i     1 0 0 0   2 −1 0 −1  x1 2 0   x2    1     0 −2 0    x′1  ≥  0  0 1 1 0 −1 x′2 0 −1 0 1 −1 hx1 , x2 , x′1 , x′2 i ≥ 0, and the dual optimization problem (21) is maximize subject to h2, −1, 0, 1, −1iThy1 , y2 , y3 , y4 , y5 i      y  µ1 1 −1 1 0 0  1 y2    0 0 0 1 −1   y 3  ≤  µ2    −µ1  0 2 −2 0 0  y4  −µ2 0 0 0 −1 1 y5 hy1 , y2 , y3 , y4 , y5 i ≥ 0. Incorporation of the unknown coefficients of µ among the problem variables finally yields as the transformed problem (23): maximize subject to h2, −1, 0, 1, −1, 0, 0iThy1 , y2 , y3 , y4 , y5 , µ1 , µ2 i     y1    1 −1 1 0 0 −1 0  0  y2  0   y3   0  0 0 1 −1 0 −1      0     2 −2 0 0 1 0    y4  ≤  0   0 0  0 0 −1 1 0 1   y5   µ1  −2 1 0 −1 1 0 0 −1 µ2 (24) hy1 , y2 , y3 , y4 , y5 , µ1 , µ2 i ≥ 0 11 We will tacitly replace an equality in the form α = β by the equivalent pair of inequalities α ≥ β and −α ≥ −β whenever the substitution is necessary to fit our framework. 22 This problem is feasible so this CLP(N) program terminates. Projecting the constraints of (24) onto µ we obtain, in addition, the knowledge that every µ with µ1 + µ2 ≥ 1 gives a ranking function. In other words, µ1 x1 + µ2 x2 is a ranking function if the non-negative numbers µ1 and µ2 satisfy µ1 + µ2 ≥ 1. The following result illustrates the strength of the method: Theorem 4.2. Let C be the binary CLP(Q+ ) clause p(x̄) :− c[x̄, x̄′ ], p(x̄′ ), where p is an n-ary predicate and c[x̄, x̄′ ] is a linear satisfiable constraint. Let plrf(C) be the set of positive linear ranking functions for C and svg(C) be the set of solutions of (23) projected onto µ, that is, plrf(C) := svg(C) :=   µ∈ Qn+ ′ ∀x̄, x̄ ∈ Qn+ ′ : c[x̄, x̄ ] =⇒ n X i=1 µ̌ ∈ Qn+ hy̌, µ̌i is a solution of (23) . µi xi − n X i=1 µi x′i  ≥1 , Then plrf(C) = svg(C). Proof. As c[x̄, x̄′ ] is satisfiable, problem (20) is feasible. We prove each inclusion separately. svg(C) ⊆ plrf(C). Assume that (23) is feasible and let hy̌, µ̌i be a solution of (23). For this choice of µ̌, the corresponding LP problems (20) and (21) are bounded by q ≥ 1 (case 2b of the discussion above). So µ̌ ∈ plrf(C). plrf(C) ⊆ svg(C). Let us pick µ ∈ plrf(C). For this choice, the corresponding LP problem (20) is bounded by r ≥ 1, so is its dual (21). Let ŷ be an optimal solution for (21). Thus hŷ, µi is a feasible solution of (22) and (23). Hence µ ∈ svg(C). As an immediate consequence, the question “does a given binary recursive clause with linear constraint admit a positive linear mapping?” can be solved in weakly polynomial time. Corollary 4.3. Let C be the binary CLP(Q+ ) clause p(x̄) :− c[x̄, x̄′ ], p(x̄′ ), where c[x̄, x̄′ ] is a linear satisfiable constraint. The decision problem plrf(C) = ∅ is in P. Proof. By Theorem 4.2 the problems plrf(C) = ∅ and svg(C) = ∅ are equivalent. So, if (23) is feasible then the answer is no: as c[x̄, x̄′ ] is satisfiable, we are in case (2)(b). Otherwise, again because of the satisfiability of c[x̄, x̄′ ], either (20) is unbounded (case (1)(a)ii. or it is bounded by q ′ < 0 (case (1)(b)). In both cases, the answer is yes. Finally, testing the satisfiability of a linear system, as well as computing one of its solutions —and thus computing one concrete linear ranking function—, is in P (see, e.g., [40]). 23 For the case where we have more than one directly recursive binary CLP(N) clauses, C1 , . . . , Cn , the set of global positive linear ranking functions, i.e., that ensure termination whichever clause is selected at each computation step, is Tn given by i=1 svg(Ci ). This can be computed by taking the conjunction of the constraints obtained, for each clause, from the projection of the constraints of the corresponding linear problem (23) onto µ. To summarize, the main contribution of Sohn and Van Gelder lies in their encoding of the ranking function search problem into linear programming and their use of the duality theorem. As we will see, this idea is amenable to a generalization that makes it widely applicable to any programming paradigm, not just (constraint) logic programming. 4.3. The Generalization by Mesnard and Serebrenik Fred Mesnard and Alexandre Serebrenik have generalized the method of Sohn and Van Gelder from the analysis of logic programs to the analysis of CLP(Q) and CLP(R) programs in [16, 17]. In the following, for presentation purposes and without loss of generality, we consider the case of rational-valued variables. They use a class of affine ranking functions of the form fp (y1 , . . . , yn ) = µ0 + n X µi y i , (25) i=1 where µi ∈ Q, for i = 0, . . . , n. Allowing for rational-valued coefficients µi and variables yi (both the µi ’s and the yi ’s were naturals in [6]) implies that (25) does not necessarily define a nonnegative function and that Zeno sequences12 are not automatically excluded. Consequently, to avoid these two problems, condition (16) is strengthened to13  ∀x̄, x̄′ ∈ Qn : c[x̄, x̄′ ] =⇒ fp (x̄) ≥ 1 + fp (x̄′ ) ∧ fp (x̄) ≥ 0 . (26) Note that the choice of the numbers 1 and 0 in the right hand side of the above implication preserves generality: the general form of the former condition, i.e., fp (x̄) ≥ ǫ + fp (x̄′ ) for a fixed and strictly positive ǫ ∈ Q+ , can be transformed as shown in Section 3, and the general form of the latter, i.e., fp (x̄) ≥ b for a fixed b ∈ Q, can be transformed into fp (x̄) ≥ 0 by a suitable choice of µ0 . Condition (26) can be rewritten as ′ n ′ ∀x̄, x̄ ∈ Q : c[x̄, x̄ ] =⇒ X n i=1 µi xi − n X i=1 µi x′i ≥ 1 ∧ µ0 + n X i=1  µi xi ≥ 0 . (27) Using the same notation chosen for (19), the existence of a ranking function can now be equivalently expressed as the existence of a solution of cost at least as 1, 12 , 41 , 81 , . . . . presentation is strictly more general than the formulation in [16, 17], which imposes that fp (x̄) ≥ 1 + fp (x̄′ ) ∧ fp (x̄′ ) ≥ 0. 12 Such 13 Our 24 1 to the former and a solution of cost at least 0 to the latter of the following optimization problems: minimize hµ, −µiT hx, x′ i minimize hµ̃, 0iT hx̃, x′ i subject to Ac hx, x′ i ≥ bc subject to Ãc hx̃, x′ i ≥ b̃c (28) where the extended vectors µ̃ := hµ0 , µi and x̃ := hx0 , xi include the parameter µ0 and the new variable x0 , respectively, and the extended matrix and vector   1 0 Ãc := −1 0  and b̃c := h1, −1, bc i 0 Ac encode the additional constraint x0 = 1. Reasoning as in Section 4.2, the problems (28) can then be transformed, applying the suitable form of the duality theorem, into the following dual problems over new vectors of variables y and z, ranging over Qm and Qm+2 , respectively: maximize subject to bTc y ATc y = hµ, −µi maximize b̃Tc z subject to ÃTc z = hµ̃, 0i z≥0 y≥0 (29) Now the condition that the optimal solution is at least 1 (resp., 0) can be added to the constraints, thus reducing the optimization problems (28) to testing the satisfiability of the system:  T bc y ≥ 1    T  A  c y = hµ, −µi    y  ≥0   b̃Tc z ≥ 0      ÃT z = hµ̃, 0i   c z≥0 or equivalently, after incorporating the parameters µ (resp., µ̃) into the variables, to the generalization to Q of problem (23):       −I n+1 −I n T T Ãc   Ac  0   0 In                   I n+1  T   −ATc I n   0 ^ − Ã c      0 −I n   hz, µ̃i ≤ 0. (30)     hy, µi ≤             −I    0  −I m 0   0   m+2        T T −bc 0 −1 −b̃c 0 The following completeness result generalizes Theorem 4.2: 25 Theorem 4.4. Let C be the binary CLP(Q) clause p(x̄) :− c[x̄, x̄′ ], p(x̄′ ), where p is an n-ary predicate and c[x̄, x̄′ ] is a linear satisfiable constraint. Let lrf(C) be the set of linear ranking functions for C and ms(C) be the set of solutions of (30) projected onto µ̃, that is, ) ( ′ n ′ n+1 ∀x̄, x̄ ∈ Q : c[x̄, x̄ ] =⇒ , lrf(C) := µ̃ ∈ Q Pn Pn Pn ′ i=1 µi xi − i=1 µi xi ≥ 1 ∧ µ0 + i=1 µi xi ≥ 0  ms(C) := µ̃ ∈ Qn+1 hy, µi and hz, µ̃i are solutions of the problems (30) . Then lrf(C) = ms(C). Proof. We use l and r as subscripts of our references to the LP problems (28), (29), and (30) to denote the LP problems on the left and the LP problems on the right. ms(C) ⊆ lrf(C). Assume that (30) is feasible and let hy̌, µ̌i be a solution of (30)l and hž, µ̌i be a solution of (30)r . For this choice of µ̌, the corresponding LP problems (29)l and (28)l are bounded by 1 while the corresponding LP problems (29)r and (28)r are bounded by 0. Hence we have ∀x̄, x̄′ ∈ Qn : c[x̄, x̄′ ] =⇒ n X µi xi − n X µi x′i ≥ 1 i=1 i=1 and ∀x̄, x̄′ ∈ Qn : c[x̄, x̄′ ] =⇒ µ0 + n X µi xi ≥ 0. i=1 Thus ′ n ′ ∀x̄, x̄ ∈ Q : c[x̄, x̄ ] =⇒ n X µi xi − n X i=1 i=1 µi x′i ≥ 1 ∧ µ0 + n X µi xi ≥ 0, i=1 so that µ̌ ∈ lrf(C). lrf(C) ⊆ ms(C). Let us pick µ̃ ∈ lrf(C). For this choice, the corresponding LP problem (28) are bounded by 1 and 0, and so are their duals (29). Let ŷ be an optimal solution for (29)l . Thus hŷ, µi is a feasible solution of (30)l . Similarly, let ẑ be an optimal solution for (29)r . Thus hẑ, µ̃i is a feasible solution of (30)r . Hence µ̃ ∈ ms(C). Moreover, even for the case of the linear fragment of CLP(Q) —and CLP(R)— checking for the existence of a linear ranking function is a weakly polynomial problem. Corollary 4.5. Let C be the binary CLP(Q) clause p(x̄) :− c[x̄, x̄′ ], p(x̄′ ), where c[x̄, x̄′ ] is a linear satisfiable constraint. The decision problem lrf(C) = ∅ is in P. 26 A space of ranking functions can be obtained (at a computational price that is no longer polynomial) by projecting the constraints of (30) onto µ̃. Any µ̃ satisfying all the projected constraints corresponds to one ranking function that, subject to c[x̄, x̄′ ], is bounded from below by 0 and that decreases by at least 1 at each iteration. From these “normalized” ranking functions, the opposite of the transformation outlined in Section 3 allows to recover all affine ranking functions: these are induced by the set of parameters  hh, kµi hµ0 , µi ∈ lrf(C), h ∈ Q, k ∈ Q+ \ {0} . (31) 4.4. Application to the Analysis of Imperative While Loops The generalization of Mesnard and Serebrenik can be used, almost unchanged, to analyze the termination behavior of imperative while loops with integer- or rational-valued variables. Consider a loop of the form (2), i.e., { I } while B do C where I is known to hold before any evaluation of B and C is known to always terminate in that loop. Termination analysis is conducted as follows: 1. Variables are duplicated: if x̄ are the n variables of the original loop, we introduce a new tuple of variables x̄′ . 2. An analyzer based on convex polyhedra [41] is used to analyze the following program: {I} x′1 := x1 ; . . . ; x′n := xn ; if B[x̄′ /x̄] then C[x̄′ /x̄] (32) ⋆ Let the invariant obtained for the program point marked with ‘⋆’ be c[x̄, x̄′ ]; this is a finite conjunction of linear constraints. 3. The method of Mesnard and Serebrenik is now applied to the CLP(Q) clause p(x̄) :− c[x̄, x̄′ ], p(x̄′ ): if termination can be established for that clause, then the while loop we started with will terminate. Notice how the clause p(x̄) :− c[x̄, x̄′ ], p(x̄′ ) approximates the termination behavior of the loop: if we interpret the predicate p applied to x̄ as “the loop guard is evaluated on values x̄,” then the clause can be read as “if the loop guard is evaluated on values x̄, and c[x̄, x̄′ ] holds, then the loop guard will be evaluated again on values x̄′ .” We illustrate the overall methodology with an example. 27 Example 4.6. The following program, where x1 and y take values in Z, computes and stores in x2 the integer base-2 logarithm of x1 if x1 > 0, 0 otherwise: x2 := 0; {x1 ≥ 0 ∧ x2 ≥ 0} while x1 ≥ 2 do x1 := x1 div 2; x2 := x2 + 1 where the loop invariant {x1 ≥ 0 ∧ x2 ≥ 0} has been obtained by static analysis. After the duplication of variables, we submit to the analyzer the program {x1 ≥ 0 ∧ x2 ≥ 0} x′1 := x1 ; x′2 := x2 ; if x′1 ≥ 2 then x′1 := x′1 div 2; x′2 := x′2 + 1 ⋆ and we obtain, for program point ‘⋆’, the invariant x1 ≥ 2 ∧ 2x′1 + 1 ≥ x1 ∧ 2x′1 ≤ x1 ∧ x′2 = x2 + 1 ∧ x′2 ≥ 1. Applying the method of Mesnard and Serebrenik we obtain that, for each µ0 , µ1 , µ2 ∈ Q such that µ1 − µ2 ≥ 1, µ2 ≥ 0, and µ0 + 2µ1 ≥ 0, the function f (x1 , x2 ) := µ0 + µ1 x1 + µ2 x2 is a ranking function for the given while loop. It is interesting to observe that the first constraint guarantees strict decrease (at least 1), the addition of the second constraint guarantees boundedness from below, while the further addition of the third constraint ensures nonnegativity, i.e., that 0 is a lower bound. 4.5. Application to Conditional Termination Analysis An important observation is that the method of Mesnard and Serebrenik is immediately applicable in conditional termination analysis. This is the problem of (automatically) inferring the preconditions under which code that does not universally terminate (i.e., there are inputs for which it does loop forever) is guaranteed to terminate. This problem has been recently studied in [42], where preconditions are inferred under which functions that are either decreasing or bounded become proper ranking functions. The two systems in (30), projected onto µ̃, exactly define the space of non-negative candidate ranking functions and the space of decreasing candidate ranking functions, respectively. While this is subject for future research, we believe that the availability of these two spaces allows to improve the techniques presented in [42]. 28 5. The Approach of Podelski and Rybalchenko Andreas Podelski and Andrey Rybalchenko [7] introduce a method for finding linear ranking functions for a particular class of unnested while loops that, with the help of a preliminary analysis phase, is indeed completely general. Consider a while loop of the form {I} while B do H (33) C ⋆ in which variables x1 , . . . , xn occur. Suppose we have determined (e.g., by a data-flow analysis based on convex polyhedra) that the invariant n X gk,i xi ≤ bk , for k = 1, . . . , r, (34) i=1 holds at the program point marked with ‘H’, while the invariant n X i=1 a′k,i x′i ≤ n X ak,i xi + bk , for k = r + 1, . . . , r + s, (35) i=1 holds at the program point marked with ‘⋆’, where unprimed variables represent the values before the update and primed variables represent the values after the update, and all the coefficients and variables are assumed to take values in Q.14 The inequalities in (34) can be expressed in the form (35) by just defining a′k,i := 0 and ak,i := −gk,i for i = 1, . . . , n and k = 1, . . . , r. The conjunction of (34) and (35) can now be stated in matrix form as    x ′ A A ≤ b, (36) x′  where the matrix A A′ is obtained by juxtaposition of the two (r + s) × n matrices A := (−ak,i ) and A′ := (a′k,i ), b := hb1 , b2 , . . . , br+s i and, as explained in Section 2, hx, x′ i is obtained by juxtaposing the vectors x := hx1 , x2 , . . . , xn i and x′ := hx′1 , x′2 , . . . , x′n i. Podelski and Rybalchenko have proved that (33) is guaranteed to terminate on all possible inputs if there exist two (r + s)-dimensional non-negative rational vectors λ1 and λ2 such that:15 14 In [7] variables are said to have integer domain, but this restriction seems unnecessary and, in fact, it is not present in [43]. 15 For an informal justification of these equations, see Section 5.2; a more detailed explanation is provided in Section 5.3. 29 λT1 A′ = 0, (37a) (λT1 − λT2 )A = 0, λT2 (A + A′ ) = 0, (37b) (37c) λT2 b < 0. (37d) Note that we have either zero or infinitely many solutions, since if the pair of vectors λ1 and λ2 satisfies the constraints, then the pair kλ1 and kλ2 satisfies them as well, for any k ∈ Q+ \ {0}. Podelski and Rybalchenko proved also the following completeness result: if the iterations of (33) are completely characterized by conditions (34) and (35) —in which case they call it a “simple linear r+s loop”— then λ1 , λ2 ∈ Q+ satisfying conditions (37a)–(37d) exist if and only if the program terminates for all inputs. 5.1. Generation of Ranking Functions For each pair of vectors λ1 and λ2 satisfying the conditions (37a)–(37d), a linear ranking function for the considered program can be obtained as f (x) := λT2 A′ x. (38) In [7] a slightly more complex form is proposed, namely:    λT A′ x, ′ if there exists x such that A 2 g(x) :=   T (λ2 − λT1 )b, otherwise, ′ A  x x′ ! ≤b, (39) but the extra provisions are actually necessary only if one is interested into an “extended ranking function” that is strictly decreasing also on the very last iteration of the loop, that is, when the effect of the command C is such that x would violate the loop guard B at the following iteration. As this more complex definition does not seem to provide any additional benefit, we disregard it and consider only the linear ranking function (38). Example 5.1. Consider again the program of Example 4.6. The invariants in the forms dictated by (34) and (35) are given by the systems {−x1 ≤ −2, −x′2 ≤ −1} and {2x′1 ≤ x1 , −2x′1 −1 ≤ −x1 , −x′2 ≤ −x2 −1, x′2 ≤ x2 +1}, respectively. These can be expressed in the matrix form (36) by letting       −1 0 0 0 −2 −1   2   0 0 0        1    0 0  , A′ := −2  , b =  1 . A :=   0    −1 1   0 −1    0 −1  0   1 1 0 0 0 −1 −1 Two non-negative rational vectors solving the system (37) are, for instance, λ1 = h2, 0, 0, 0, 0, 0iT and λ2 = h1, 1, 0, 0, 0, 0iT. 30 5.2. Justification of the Approach A reader of [7] wonders where the method of Podelski and Rybalchenko comes from. In fact, the paper does not give an intuition about why conditions (37a)–(37d) imply termination of (33). Those conditions can be mapped into a strengthening, tailored to the linear case, of the well known Floyd termination verification conditions,16 but such a higher level view needs to be extracted, with some effort, from the details of the proof of [7, Theorem 1]. The relative completeness of the approach is then proved in [7, Theorem 2] by exploiting the affine form of Farkas’ Lemma, showing that such a strengthening is unconsequential for the case of linear ranking functions and simple linear loops. 5.3. Interpretation in Terms of Lagrangian Relaxation The intuitive reading hidden in the proof details mentioned above is made explicit in [23, Section 6.2], where Patrick Cousot hints that the method by Podelski and Rybalchenko can be derived from the Floyd termination verification conditions by application of Lagrangian relaxation.17 We now show that this is indeed the case. Assuming we are dealing with affine ranking functions and adding the limitation that r = 1 in (34), in [23] the existence of an affine ranking function is formalized, following Floyd’s method, by requiring the existence of µ ∈ Qn and µ0 , δ ∈ Q such that: ∀x ∈ Qn : σ1 (x, x′ ) ≥ 0 =⇒ µT x + µ0 ≥ 0, m ^  ∀x, x′ ∈ Qn : σk (x, x′ ) ≥ 0 =⇒ µT (x − x′ ) − δ ≥ 0, k=1 δ > 0, where the loop is described by the inequalities σk (x, x′ ) ≥ 0, with σ1 being the inequality in (34). These are provided with the usual intuitive reading: the first implication states that the ranking function is always nonnegative at the head of the loop body; the second implication makes sure that the ranking function is decreasing on each loop iteration; the last constraint makes sure that such a decrease is strictly positive. By applying Langrangian relaxation, the two implications can be simplified away by introducing new, existentially quantified variables α ∈ Q+ and β ∈ Qm +, 16 A. Rybalchenko, personal communication, 2011. relaxation is a standard device to convert entailment into constraint solving: given a finite dimensional vector space V, a positive integer n and functions fk : V → Q for V k = 0, . . . , n, the property that, for each x ∈ V, n k=1 fk (x) ≥ 0 =⇒ f0 (x) P≥n 0 can be relaxed to proving the existence of a vector a ∈ Qn + such that, for all x ∈ V, f0 (x)− k=1 ak fk (x) ≥ 0. If the fk are affine functions, the latter condition is equivalent to the former. 17 Lagrangian 31 obtaining: µT x + µ0 − ασ1 (x, x′ ) ≥ 0, m X T ′ µ (x − x ) − δ − βk σk (x, x′ ) ≥ 0, k=1 δ > 0. The limitation that r = 1 can actually be removed as long as α is replaced by a vector α ∈ Qr+ . The generalization yields µ T x + µ0 − µT (x − x′ ) − δ − r X k=1 m X αk σk (x, x′ ) ≥ 0 βk σk (x, x′ ) ≥ 0 k=1 δ > 0. If, and this is the case in the Podelski and Rybalchenko method, the constraints σk (x, x′ ) for k = 1, . . . , m are affine functions of hx, x′ i, the sums can be interpreted as matrix products and the conditions rewritten as follows, where A, A′ and b are the same as in (36):   hµ, 0, µ0 iT − hα, 0iT −A −A′ b hx, x′ , 1i ≥ 0 (40a)    (40b) hµ, −µ, −δiT − βT −A −A′ b hx, x′ , 1i ≥ 0 δ>0 (40c) Note that the inequalities (40a)–(40c) must hold for every possible value of x and x′ in the whole space Qn . Therefore, by a suitable choice of x and x′ , each element of the coefficient vectors in (40a) and (40b) can be shown to be necessarily zero. We define λ1 = hα, 0i 18 and λ2 = β, obtaining: µ = −λT1 A, 0 = −λT1 A′ , µ0 = λT1 b, µ = −λT2 A, −µ = −λT2 A′ , −δ = λT2 b, δ > 0. These relations can finally be rearranged to yield: λT1 A′ = 0, (λT1 − λT2 )A = 0, λT2 (A + A′ ) = 0, λT2 b < 0, µ = λT2 A′ , µ0 = λT1 b, δ = −λT2 b, 18 We explicitly require that the extra coefficients added to α be zero for consistency with the derivation. However, even though Podelski and Rybalchenko admit any nonnegative rational numbers to appear in those positions of λ1 , there is no loss of generality: the synthesized ranking functions (38) do not depend on these coefficients. 32 where the conditions (37a)–(37d) appear on the left hand side and the conditions on the coefficients of the synthesized ranking functions appear on the right hand side, expressed in terms of λ1 and λ2 . 5.4. An Alternative Implementation Approach As long as the distinction between invariants (34) and (35) is retained, the method of Podelski and Rybalchenko can be implemented following an alternative approach. The linear invariants (36) are more precisely described by !    AB 0 x bB (41) ≤ x′ bC AC A′C where AB ∈ Qr×n , AC ∈ Qs×n , A′C ∈ Qs×n , bB ∈ Qr , bC ∈ Qs . As shown in Section 5.3, the existence of a linear ranking function for the system (41) is equivalent to the existence of three vectors v 1 ∈ Qr+ , v 2 ∈ Qr+ , v 3 ∈ Qs+ such that (v 1 − v 2 )T AB − v T3 AC = 0, v 2 AB + v 3 (AC + T A′C ) (42a) = 0, (42b) v 2 bB + v 3 bC < 0. (42c) T As already noted, the two vectors of the original Podelski and Rybalchenko method can be reconstructed as λ1 = hv 1 , 0i and λ2 = hv 2 , v 3 i. Note that the same approach is still valid when starting from the single matrix form (36) in full generality, i.e., when we can’t assume that the distinction between invariants (34) and (35) has been retained or that invariants are listed in the order we used to build the matrix form (36): it is enough to apply a straightforward permutation to (36) to rearrange it in the form (41). In that case, due to the permutation involved, we would solve a different linear programming problem; however, we still obtain the same space of linear ranking functions we would have obtained by applying the original method starting from the matrix form (36), as we prove using the following lemma. Lemma 5.2. Let S be the space of linear ranking functions obtained by applying  the method of Podelski and Rybalchenko to A A′ hx, x′ i ≤ b, i.e., S :=  hλT2 A′ , λT1 bi ∈ Qn+1 hλ1 , λ2 i is a solution of (37) , and let P ∈ Q(r+s)×(r+s) be a permutation matrix.19 Then the application of the method of Podelski and Rybalchenko to P A A′ hx, x′ i ≤ P b yields the same space of linear ranking functions S. 19 We recall that a k-dimensional permutation matrix is a square matrix obtained by a permutation of the rows or columns of the k-dimensional identity matrix. 33  Proof. The system (37) corresponding to P A A′ hx, x′ i ≤ P b becomes η T1 P A′ = 0, (η 1 − η T2 )P A = 0, (43a) (43b) η T2 P (A + A′ ) = 0, η T2 P b < 0, (43c) (43d) T to be solved for the two (r + s)-dimensional non-negative rational vectors η 1 and η 2 . Now, hλ1 , λ2 i is a solution of (37) if and only if hλ1 , λ2 iP −1 is a solution of (43): on one side, if hλ1 , λ2 i is a solution of (37) then hη 1 , η 2 i defined as hη 1 , η 2 i := hλ1 , λ2 iP −1 is a solution of (43); on the other side, if hη 1 , η 2 i is a solution of (43) then hλ1 , λ2 i defined as hλ1 , λ2 i := hη 1 , η 2 iP is a solution of (37) and the desired property can be verified by right-multiplying by P −1 both solutions. The space of linear ranking functions for the permuted system is  SP = hη T2 P A′ , η T1 P bi ∈ Qn+1 hη 1 , η 2 i is a solution of (43)  = hλT2 P −1 P A′ , λT1 P −1 P bi ∈ Qn+1 hλ1 , λ2 i is a solution of (37) = S, and thus it is unaltered with respect to the space of linear ranking functions S corresponding to the non-permuted system. Since the system (41) is obtained by applying a suitable permutation to (36), a straightforward application of this lemma proves that the space of linear ranking functions obtained is the same in both cases. Moreover, as λT2 A′ = v T3 A′C and λ1 b = v 1 bB , we can express the space of linear ranking functions as  S := hv T3 A′C , v 1 bB i ∈ Qn+1 hv 1 , v 2 , v 3 i is a solution of (42) . 6. Comparison of the Two Methods In this section we compare the method by Mesnard and Serebrenik with the method by Podelski and Rybalchenko: we first prove that they have the same “inferential power”, then we compare their worst-case complexities, then we experimentally evaluate them on a representative set of benchmarks. 6.1. Equivalence of the Two Methods We will now show that the method proposed in [7] is equivalent to the one given in [44] on the class of simple linear loops, i.e., that if one of the two methods can prove termination of a given simple linear loop, then the other one can do the same. This is an expected result since both methods claim to be complete on the class of programs considered. 34 It is worth noting that a completeness result was already stated in [15, Theorem 5.1] for the case of single predicate CLP(Q+ ) procedures, which can be seen to be a close variant of the binary, directly recursive CLP(Q+ ) programs considered in Theorem 4.2 and Corollary 4.3. Probably due to the programming paradigm mismatch, Podelski and Rybalchenko [7] fail to recognize the actual strength and generality of the mentioned result, thereby claiming originality for their completeness result. Theorem 6.1. Let C be the binary CLP(Q) clause p(x̄) :− c[x̄, x̄′ ], p(x̄′ ), where p is an n-ary predicate and c[x̄, x̄′ ] is a linear satisfiable constraint. Let pr(C) and ms(C) c be the spaces of linear ranking functions for C obtained through the method of Podelski and Rybalchenko and through the method of Mesnard and Serebrenik, respectively, that is,  pr(C) := hλT2 A′ , λT1 bi ∈ Qn+1 hλ1 , λ2 i is a solution of (37) , ( ) n+1 hy, µi and hz, µ̃i are solutions of (30), ms(C) c := k µ̃ ∈ Q . k ∈ Q+ \ {0}  where c[x̄, x̄′ ] is equivalent to A A′ hx, x′ i ≤ b or to Ac hx, x′ i ≥ bc , respectively. Then pr(C) = ms(C). c Proof. We will, as customary, prove the two inclusions pr(C) ⊆ ms(C) c and pr(C) ⊇ ms(C). c pr(C) ⊆ ms(C). c Suppose that there exist two non-negative rational vectors λ1 and λ2 satisfying (37), i.e., λT1 A′ = (λT1 − λT2 )A = λT2 (A + A′ ) = 0 and c which is equivalent λT2 b < 0. We need to show that hλT2 A′ , λT1 bi ∈ ms(C), to proving that there exists a positive coefficient (that we can denote with k1 without loss of generality) k1 ∈ Q+ \ {0} such that h k1 λT2 A′ , k1 λT1 bi ∈ ms(C), or, by Theorem 4.4, that h k1 λT2 A′ , k1 λT1 bi ∈ lrf(C), which is in turn equivalent, by definition, to λT2 A′ x − λT2 A′ x′ ≥ k and λT1 b + λT2 A′ x ≥ 0. We have    x A A′ ≤ b =⇒ Ax + A′ x′ ≤ b x′ =⇒ − Ax ≥ A′ x′ − b =⇒ − λT2 Ax ≥ λT2 A′ x′ − λT2 b T ′ T ′ ′ T =⇒ λ2 A x ≥ λ2 A x − λ2 b [by λ2 ≥ 0] [by (37c)] and the former property is satisfied if we choose k = −λT2 b, which is nonnegative by relation (37d). For the latter property, we have Ax + A′ x′ ≤ b =⇒ λT1 Ax + λT1 A′ x′ ≤ λT1 b T T as λT1 is non-negative =⇒ λ1 Ax ≤ λ1 b =⇒ λT2 Ax ≤ λT1 b [by (37a)] [by (37b)] =⇒ − λT2 A′ x ≤ λT1 b [by (37c)] and both properties are thus proved. 35 pr(C) ⊇ ms(C). c In order to prove the inverse containment, we will need to recall the affine form of Farkas’ Lemma (see [40]). Lemma 6.2 (Affine form of Farkas’ lemma). Let P be a nonempty polyhedron defined by the inequalities Cx + d ≥ 0. Then an affine function f (x) is non-negative everywhere in P if and only if it is a positive affine combination of the columns of Cx + d: f (x) = λ0 + λT (Cx + d) with λ0 ≥ 0, λ ≥ 0. Let µ̃ ∈ ms(C). c Then there exists h ∈ Q+ \ {0} such that hµ̃ ∈ lrf(C) describes a linear ranking function f for C.  The inequalities A A′ hx, x′ i ≤ b define a polyhedron; according to the affine form of Farkas’ lemma, a function is non-negative on this polyhedron, i.e., throughout the loop, if and only if it is a positive affine combination of the column vectors A A′ hx, x′ i ≤ b. In particular this holds for the ranking function f and its two properties: f (x) ≥ 0 and f (x) − f (x′ ) ≥ 1. Hence there exist two non-negative rational vectors λ1 and λ2 and two nonnegative numbers λ0,1 and λ0,2 such that   f (x) = λ0,1 + λT1 − A A′ hx, x′ i + b and   f (x) − f (x′ ) − 1 = λ0,2 + λT2 − A A′ hx, x′ i + b . Replacing f (x) by hµx + hµ0 , we get two equalities —one for the part containing variables and one for the remaining part— for each expression. After simplification we obtain the following equalities:  (44a) −λT1 A A′ hx, x′ i = hµx  T ′ ′ ′ −λ2 A A hx, x i = hµx − hµx (44b) T −λ2 b = 1 + λ0,2 (44c) From (44a) and (44b) we obtain λT1 A = −hµT , λT1 A′ = 0, λT2 A = −hµT and λT2 A′ = hµT . We can rewrite it as 0 = λT1 A′ = (λT1 − λT2 )A = λT2 (A + A′ ). From (44c) we deduce λT2 b < 0. The four conditions (37) to prove termination by [7] are thus satisfied. The combination of Theorems 4.4 and 6.1 gives: Theorem 6.3. Let C be the binary CLP(Q) clause p(x̄) :− c[x̄, x̄′ ], p(x̄′ ), where c p is an n-ary predicate and c[x̄, x̄′ ] is a linear satisfiable constraint. Let lrf(C) be the set of (positive multiples of ) linear ranking functions for C, ms(C) c be the set of (positive multiples of ) solutions of the Mesnard and Serebrenik system (30) projected onto µ and pr(C) be the set of the ranking function coefficients obtained 36 through the method of Podelski and Rybalchenko, that is,   ∀x̄, x̄′ ∈ Qn : c[x̄, x̄′ ] =⇒       Pn Pn   ′ µ x ≥ 1 µ x − i i i i n+1 i=1 i=1 c , lrf(C) := k µ̃ ∈ Q Pn   ∧ µ0 + i=1 µi xi ≥ 0,       k ∈ Q+ \ {0} ( ) n+1 hy, µi and hz, µ̃i are solutions of (30), ms(C) c := k µ̃ ∈ Q , k ∈ Q+ \ {0}  pr(C) := hλT2 A′ , λT1 bi ∈ Qn+1 hλ1 , λ2 i is a solution of (37) ,  where c[x̄, x̄′ ] is equivalent to A A′ hx, x′ i ≤ b or to Ac hx, x′ i ≥ bc , respecc tively. Then lrf(C) = ms(C) c = pr(C). 6.2. Worst-Case Complexity Using the Simplex Algorithm The computationally most expensive component in both methods is the resolution of a linear optimization problem that can always be expressed in the standard form minimize cT x subject to Ax = b x≥0 by applying well known transformations: inequalities and unconstrained (i.e., not subject to lower or upper bounds) variables can be replaced and the resulting equivalent problem in standard form has one more variable for each inequality or unconstrained variable appearing in the original problem. The most common way to solve this linear optimization problems involves using the simplex algorithm [45], an iterative algorithm that requires e+u e pivoting steps in the worst-case scenario, where e and u denote the number of equalities in A and unknowns in x respectively. For a simple linear loop of m inequalities over n variables, Podelski and Rybalchenko require to solve a linear problem in standard form having 3n equalities over 2m variables (the opposite of the expression appearing in (37d) can be used as the quantity to be minimized); this gives a worst-case complexity of 3n+2m pivoting steps, corresponding, by Stirling’s formula, to an exponential 3n complexity of exponent 3n + 2m approximately.20 If the alternative formalization of the Podelski and Rybalchenko method is adopted for the same loop, then we will have the same m constraints as above for the ‘⋆’ invariant, while the ‘H’ invariant will be described by other ℓ constraints. If redundant constraints are removed, we will have ℓ ≤ m. Hence,  a + b → ∞, by Stirling’s formula we have a+b ≤ C2a+b (a + b)−1/2 , where C is a an absolute constant. This inequality is sharp. Notice however that if a, say,  is knowna to be much smaller than b, a much stronger inequality can be given, namely a+b ≤ (a + b) /a!. a 20 When 37 the alternative approach will result in a linear programming problem having 2n equalities over m + 2ℓ variables. Hence, the worst-case number of pivoting steps will be an exponential of exponent approximately 2n + m + 2ℓ. For the same simple linear loop, Serebrenik and Mesnard require the resolution of two linear problems, that can be rewritten to contain 2n equalities over m + n variables (with n unconstrained variables) and 2n + 1 equalities over (m + 2) + (n + 1) variables (with n + 1 unconstrained variables), respectively. They can then be merged to generate a single linear problem of 4n + 1 equalities over m + (m + 2) + (n + 1) variables, n + 1 of which unconstrained, and an extra inequality replacing one of the two objective functions. In the end, we get a linear problem in standard form with 4n + 2 equalities  over 2m + 2n + 5 variables. This means a worst-case complexity of 6n+2m+7 pivoting steps and 4n+2 an exponential complexity of exponent 6n + 2m approximately. So the method proposed by Podelski and Rybalchenko has, in general, a lower worst-case complexity than the one proposed by Mesnard and Serebrenik, if the single linear problem approach is chosen. The comparison of the two alternative implementation approaches for the Podelski and Rybalchenko method depends on the relations between quantities n, m and ℓ. On the one hand, if ℓ is significantly smaller than m, then the alternative approach could result in an efficiency improvement. On the other hand, if the number of constraints is much higher than the number of variables, then the original implementation approach should be preferred. Note that the need for two loop invariants instead of a single one should not be seen as a big practical problem: in fact, most analysis frameworks will provide the ‘H’ invariant as the original input to the termination analysis tool, which will then use it to compute the ‘⋆’ invariant (via the abstract execution of a single iteration of the loop); that is, the computational cost for the ‘H’ invariant is implicitly paid anyway. It is well known, though, that the worst-case scenario for the simplex algorithm is extremely uncommon in practice. An average complexity analysis and, more recently, a smoothed complexity analysis [46] have been carried out on the simplex algorithm and showed why it usually takes polynomial time. Besides the theoretical studies, several experimental evaluations of implementations of the simplex algorithm reported that the average number of pivoting steps seems to grow linearly with the sum e + u of the number of equalities and unknowns of the problem. Therefore, for a more informative and meaningful comparison, the next section presents an experimental evaluation of the methods on a representative set of while loops. 7. Implementation and Experimental Evaluation The Parma Polyhedra Library (PPL) is a free software, professional library for the handling of numeric approximations targeted at static analysis and computer-aided verification of hardware and software systems [5, 47]. The PPL, which features several unique innovations [48, 49, 50, 51, 52], is employed by 38 numerous projects in this field, most notably by GCC, the GNU Compiler Collection, probably the most widely used suite of compilers.21 As an integral part of the overall project to which the present paper belongs —whose aim is to make the technology of the automatic synthesis of linear ranking functions thoroughly explained and generally available—, we have extended the PPL with all the methods discussed in the present paper. Previously, only a rather limited demo version of RankFinder was available, only in x86/Linux binary format, implementing the method by Podelski and Rybalchenko.22 In contrast, the PPL implementation is completely general and available, both in source and binary formats, with high-level interfaces to C, C++, Java, OCaml and six different Prolog systems. For each of the methods —Mesnard and Serebrenik (MS) or Podelski and Rybalchenko (PR)—, for each of the two possibilities to encode the input — either the single ⋆ invariant of (32) in Section 4.4, or the two H and ⋆ invariants of (33) in Section 5—, for each numerical abstractions supported by the PPL —including (not necessarily closed) convex polyhedra, bounded-difference shapes and octagonal shapes—, the PPL provides three distinct functionalities to investigate termination of the loop being analyzed: 1. a Boolean termination test; 2. a Boolean termination test that, in addition, returns the coefficients of one (not further specified) affine ranking function; 3. a function returning a convex polyhedron that encodes the space of all affine ranking functions. In addition, using the MS method and for each input method, the PPL provides 4. a function returning two convex polyhedra that encode the space of all decreasing functions (also known as quasi-ranking functions) and all bounded functions, respectively, for use in conditional termination analysis. We have evaluated the performance of the new algorithms implemented in the PPL using the termination analyzer built into Julia, a state-of-the-art analyzer for Java bytecode [53]. We have thus taken several Java programs in the Julia test suite and, using Julia, we have extracted the constraint systems that characterize the loops in the program that Julia cannot quickly resolve with syntax-based heuristics. This extraction phase allowed us to measure the performance of the methods described in the present paper, factoring out the time spent by Julia in all the analyses (nullness, sharing, path-length, unfolding, . . . ) that allow to obtain such constraint systems. We first tested the performance (and correctness) of the new PPL implementation with the implementation of the MS method, based on CLP(Q), previously used by Julia and with the implementation of PR, still based on CLP(Q), provided by the demo version of RankFinder. The reason we did this comparison 21 See 22 See "http://bugseng.com/products/ppl for more information. http://www7.in.tum.de/~ rybal/rankfinder/, last checked on August 18th, 2011. 39 Table 1: Benchmarks used in the experimental evaluation benchmark CaffeineMark JLex JavaCC Java_CUP Jess Kitten NQueens Raytracer Termination loops 151 467 136 29 151 1484 359 8 121 n [1,9] [1,14] [1,14] [2,14] [1,9] [1,15] [1,14] [2,9] [1,9] n 6.0 7.2 8.6 8.3 6.0 11. 6.3 4.5 4.2 σn 1.3 2.5 4.1 4.3 1.3 3.6 3.6 2.7 3.5 m [2,26] [2,45] [1,45] [5,45] [2,26] [2,45] [2,45] [5,26] [2,27] m 17. 17. 22. 23. 17. 29. 17. 11. 12. σm 3.8 6.7 12. 13. 3.8 10. 10. 7.8 9.9 is that, while we know that the infinite precision implementation of the simplex algorithm available in the PPL performs better than its direct competitors [5, Section 4, Table 3],23 we know there is much room for improvement: it could have been the case that the constraint solver employed in modern CLP systems made our implementation useless. The result was quite satisfactory: the PPL implementation is one to two orders of magnitude faster over the considered benchmark suite. The benchmark programs are: CaffeineMark, from Pendragon Software Corporation, measures the speed of Java; JLex is a lexical analyzer generator developed by Elliot Berk and C. Scott Ananian; JavaCC is a parser generator from Sun Microsystems; Java_CUP is a parser generator developed by Scott Hudson, Frank Flannery and C. Scott Ananian; Jess is a rule engine written by Ernest Friedman-Hill; Kitten is a didactic compiler for a simple imperative object-oriented language written by Fausto Spoto; NQueens is a solver of the n-queens problem which includes a library for binary decision diagrams; Raytracer is a ray-tracing program; Termination is a JAR file containing all the programs of [53, Figure 16]. In Table 1 we report, for each benchmark, the number of loops for which termination was investigated, the interval, mean and standard deviations —with two significant figures— of the quantities n (number of variables) and m (number of constraints) that characterize those loops. The results of the CPU-time comparison between the MS and PR methods are reported in Table 2. Measurements took place on a GNU/Linux system equipped with an Intel Core 2 Quad CPU Q9400 at 2.66 GHz and 8 Gbytes of main memory; a single core was used and the maximum resident set size over the entire set of tests was slightly above 53 Mbytes. From these we can conclude that the difference in performance between the two methods is rather limited. 23 I.e., Cassowary (http://www.cs.washington.edu/research/constraints/cassowary/ ) and Wallaroo (http://sourceforge.net/projects/wallaroo/ ). While GLPK, the GNU Linear Programming Toolkit (http://www.gnu.org/software/glpk/) includes a solver that is termed “exact,” it still depends critically on floating point computations; moreover, it has not yet been made available in the public interface. 40 Table 2: MS vs PR: CPU time in seconds benchmark CaffeineMark JLex JavaCC Java_CUP Jess Kitten NQueens Raytracer Termination term. test MS PR 0.42 0.26 1.62 0.83 0.86 0.43 0.35 0.14 0.42 0.26 11.8 6.87 1.43 0.76 0.04 0.03 0.25 0.15 one r. f. MS PR 0.43 0.25 1.64 0.84 0.87 0.45 0.35 0.14 0.43 0.26 11.9 6.84 1.44 0.74 0.04 0.03 0.25 0.15 all r. f. MS PR 0.31 0.34 1.17 1.14 0.67 0.65 0.29 0.22 0.29 0.34 8.41 10.2 0.99 1.03 0.03 0.03 0.18 0.21 Table 3: Precision results and application to conditional termination benchmark CaffeineMark JLex JavaCC Java_CUP Jess Kitten NQueens Raytracer Termination loops 151 467 136 29 151 1484 359 8 121 term 149 453 120 27 149 1454 271 6 119 w/ d.f. 0 3 4 0 0 3 4 0 0 w/o d.f. 2 11 12 2 2 27 84 2 2 The PR method is more efficient on the problem of semi-deciding termination, with or without the computation of a witness ranking function, while the MS method is superior on the problem of computing the space of all affine ranking functions. We also present, in Table 3, the precision results. For each benchmark, along with the total number of loops, we have the number of loops for which termination is decided positively, either with the MS or the PR method (column ‘term’); the remaining loops are divided, using the MS method, between those that admit a linear decreasing function (column ‘w/ d.f.’) and those who do not (column ‘w/o d.f.’). It can be seen that the percentage of loops for which termination is decided positively ranges from 75% to 99%, depending on the benchmark. This means that we are conducting the experimental evaluation with a termination analyzer, Julia, whose analysis algorithms —though certainly improvable— very often provide enough information for termination analysis. This is crucial for the meaningfulness of the experimental evaluation presented in this section. 41 8. Conclusions Linear ranking functions play a crucial role in termination analysis, as the termination of many programs can be decided by the existence on one such function. In this paper we have addressed the topic of the automatic synthesis of linear ranking functions with the aim of clarifying its origins, thoroughly explaining the underlying theory, and presenting new, efficient implementations that are being made available to the general public. In particular, we have introduced, in general terms independent from any programming paradigm, the problem of automatic termination analysis of individual loops —to which more general control flows can be reconducted— and its solution technique based on the synthesis of ranking functions. We have then presented and generalized a technique originally due to Sohn and Van Gelder, that was virtually unknown outside the logic programming field despite its general applicability and its relative completeness (given a linear constraint system approximating the behavior of a loop, if a linear ranking function exists for that system, then the method will find it). This method, due to its ability to characterize the spaces of all the linear decreasing functions and all the linear bounded functions, is also immediately applicable to conditional termination analysis; this theme is an excellent candidate for future work. We have also presented and, for the first time, fully justified, a more recent technique by Podelski and Rybalchenko. For this we also present an alternative formulation that can lead to efficiency improvements. We have compared the two methods, first proving their equivalence — thus obtaining an independent confirmation on their correctness and relative completeness— and then studying their worst-case complexity. Finally, we have presented the implementation of all the techniques described in the paper recently included in the Parma Polyhedra Library, along with an experimental evaluation covering both the efficiency and the precision of the analysis. Acknowledgments We would like to express our gratitude to Amir Ben-Amram, David Merchat, Andrey Rybalchenko, Alessandro Zaccagnini and the anonymous reviewers for their useful comments and suggestions. The connection between the MS method and conditional termination analysis was indicated to us during a discussion with Samir Genaim. References [1] J. C. Lagarias, The 3x+1 problem and its generalizations, American Mathematical Monthly 92 (1985) 3–23. [2] E. W. Dijkstra, A Discipline of Programming, Prentice Hall, 1976. 42 [3] P. Cousot, R. Cousot, ‘A la Floyd’ induction principles for proving inevitability properties of programs, in: M. Nivat, J. C. Reynolds (Eds.), Algebraic Methods in Semantics, Cambridge University Press, 1985, pp. 277–312. [4] R. W. Floyd, Assigning meanings to programs, in: J. T. Schwartz (Ed.), Mathematical Aspects of Computer Science, Vol. 19 of Proceedings of Symposia in Applied Mathematics, American Mathematical Society, Providence RI, New York City, USA, 1967, pp. 19–32. [5] R. Bagnara, P. M. Hill, E. Zaffanella, The Parma Polyhedra Library: Toward a complete set of numerical abstractions for the analysis and veri Science of Computer Programming 72 (1–2) (2008) 3–21. [6] K. Sohn, A. Van Gelder, Termination detection in logic programs using argument sizes (extended abstract), in: Proceedings of the Tenth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, ACM, Association for Computing Machinery, Denver, Colorado, United States, 1991, pp. 216–226. [7] A. Podelski, A. Rybalchenko, A complete method for the synthesis of linear ranking functions, in: B. Steffen, G. Levi (Eds.), Verification, Model Checking and Abstract Interpretation: Proceedings of the 5th International Conference, VMCAI 2004, Vol. 2937 of Lecture Notes in Computer Science, Springer-Verlag, Berlin, Venice, Italy, 2004, pp. 239–251. [8] M. A. Colón, H. B. Sipma, Practical methods for proving program termination, in: E. Brinksma, K. G. Larsen (Eds.), Computer Aided Verification: Proceedings of the 14th International Conference (CAV 2002), Vol. 2404 of Lecture Notes in Computer Science, Springer-Verlag, Berlin, Copenhagen, Denmark, 2002, pp. 442–454. [9] K. Sohn, Automated termination analysis for logic programs, Ph.D. thesis, University of California Santa Cruz, Santa Cruz, CA, USA (1993). [10] J. Fischer, Termination analysis for Mercury using convex constraints, Honours report, Department of Computer Science and Software Engineering, The University of Melbourne, Melbourne, Australia (Aug. 2002). [11] C. Speirs, Z. Somogyi, H. Søndergaard, Termination analysis for Mercury, in: P. Van Hentenryck (Ed.), Static Analysis: Proceedings of the 4th International Symposium, Vol. 1302 of Lecture Notes in Computer Science, Springer-Verlag, Berlin, Paris, France, 1997, pp. 157–171. [12] A. R. Bradley, Z. Manna, H. B. Sipma, Linear ranking with reachability, in: Computer Aided Verification: Proceedings of the 15th International Conference, Vol. 3576 of Lecture Notes in Computer Science, SpringerVerlag, Berlin, Edinburgh, Scotland, UK, 2005, pp. 491–504. 43 [13] K. Verschaetse, D. De Schreye, Deriving termination proofs for logic programs, using abstract procedures, in: K. Furukawa (Ed.), Proceedings of the 8th International Conference on Logic Programming, The MIT Press, Paris, France, 1991, pp. 301–315. [14] M. Codish, C. Taboch, A semantic basis for the termination analysis of logic programs, Journal of Logic Programming 41 (1) (1999) 103–123. [15] F. Mesnard, Inferring left-terminating classes of queries for constraint logic programs by means of approximations, in: M. J. Maher (Ed.), Logic Programming: Proceedings of the Joint International Conference and Symposium on Logic Programming, MIT Press Series in Logic Programming, The MIT Press, Bonn, Germany, 1996, pp. 7–21. [16] F. Mesnard, A. Serebrenik, A polynomial-time decidable class of terminating binary constraint logic programs, Tech. Rep. 05-11, Université de la Réunion (2005). [17] F. Mesnard, A. Serebrenik, Recurrence with affine level mappings is P-time decidable for CLP(R), Theory and Practice of Logic Programming 8 (1) (2008) 111–119. [18] A. Podelski, A. Rybalchenko, Transition invariants, in: Logic in Computer Science, Proceedings of the 19th IEEE Symposium, LICS 2004, IEEE Computer Society, Turku, Finland, 2004, pp. 32–41. [19] B. Cook, A. Podelski, A. Rybalchenko, Abstraction refinement for termination, in: C. Hankin, I. Siveroni (Eds.), Static Analysis: Proceedings of the 12th International Symposium, Vol. 3672 of Lecture Notes in Computer Science, Springer-Verlag, Berlin, London, UK, 2005, pp. 87–101. [20] M. T. Nguyen, D. De Schreye, Polynomial interpretations as a basis for termination analysis of logic programs, in: M. Gabbrielli, G. Gupta (Eds.), Proceedings of the 21st International Conference on Logic Programming, no. 3668 in Lecture Notes in Computer Science, Springer-Verlag, Berlin, Sitges, Spain, 2005, pp. 311–325. [21] D. S. Lankford, A finite termination algorithm, Internal memo, Southwestern University, Georgetown, TX, USA (1976). [22] H. Zantema, Termination of term rewriting, Tech. Rep. UU-CS-200004, Department of Computer Science, Universiteit Utrecht, Utrecht, The Netherlands (2000). [23] P. Cousot, Proving program invariance and termination by parametric abstraction, lagrangian relaxation and semidefinite programming, in: R. Cousot (Ed.), Verification, Model Checking and Abstract Interpretation: Proceedings of the 6th International Conference (VMCAI 2005), Vol. 3385 of Lecture Notes in Computer Science, Springer-Verlag, Berlin, Paris, France, 2005, pp. 1–24. 44 [24] M. A. Colón, H. B. Sipma, Synthesis of linear ranking functions, in: T. Margaria, W. Yi (Eds.), Tools and Algorithms for Construction and Analysis of Systems, 7th International Conference, TACAS 2001, Vol. 2031 of Lecture Notes in Computer Science, Springer-Verlag, Berlin, Genova, Italy, 2001, pp. 67–81. [25] N. Dershowitz, N. Lindenstrauss, Y. Sagiv, A. Serebrenik, A general framework for automatic termination analysis of logic programs, Appl. Algebra Eng. Commun. Comput. 12 (1/2) (2001) 117–156. [26] C. S. Lee, N. D. Jones, A. M. Ben-Amram, The size-change principle for program termination, in: C. Norris, J. J. B. Fenwick (Eds.), Proceedings of the 28th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2001), Vol. 36 of ACM SIGPLAN Notices, ACM Press, London, UK, 2001, pp. 81–92. [27] M. Codish, V. Lagoon, P. Stuckey, Testing for termination with monotonicity constraints, in: M. Gabbrielli, G. Gupta (Eds.), Twenty First International Conference on Logic Programming, Vol. 3668 of Lecture Notes in Computer Science, Springer-Verlag, Berlin, Sitges, Spain, 2005, pp. 326– 340. [28] A. M. Ben-Amram, Size-change termination, monotonicity constraints and ranking functions, Logical Methods in Computer Science 6 (3:2) (2010) 1–32. [29] T. Vasak, J. Potter, Characterisation of terminating logic programs, in: Proceedings of the 3rd IEEE Symposium on Logic Programming, IEEE Computer Society Press, Salt Lake City, Utah, USA, 1986, pp. 140–147. [30] N. Lindenstrauss, Y. Sagiv, Automatic termination analysis of logic programs, in: L. Naish (Ed.), Logic Programming: Proceedings of the Fourteenth International Conference on Logic Programming, MIT Press Series in Logic Programming, The MIT Press, Leuven, Belgium, 1997, pp. 63–77. [31] J. Jaffar, M. J. Maher, Constraint logic programming: A survey, Journal of Logic Programming 19&20 (1994) 503–582. [32] J. Jaffar, M. J. Maher, K. Marriott, P. J. Stuckey, The semantics of constraint logic programs, Journal of Logic Programming 37 (1-3) (1998) 1–46. [33] F. Mesnard, S. Ruggieri, On proving left termination of constraint logic programs, ACM Transactions on Computational Logic 4 (2) (2003) 207– 259 (paper) and 1–26 (electronic appendix). [34] P. Cousot, R. Cousot, Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints, in: Proceedings of the Fourth Annual ACM Symposium on Principles of Programming Languages, ACM Press, Los Angeles, CA, USA, 1977, pp. 238–252. 45 [35] P. Cousot, R. Cousot, Abstract interpretation and applications to logic programs, Journal of Logic Programming 13 (2&3) (1992) 103–179. [36] K. R. Apt, D. Pedreschi, Reasoning about termination of pure Prolog programs, Information and Computation 106 (1) (1993) 109–157. [37] N. Baker, H. Søndergaard, Definiteness analysis for CLP(R), in: G. Gupta, G. Mohay, R. Topor (Eds.), Proceedings of the Sixteenth Australian Computer Science Conference, Vol. 15 of Australian Computer Science Communications, Brisbane, Australia, 1993, pp. 321–332. [38] M. Codish, S. Genaim, M. Bruynooghe, J. Gallagher, W. Vanhoof, One loop at a time, in: A. Rubio (Ed.), Proceedings of the 6th International Workshop on Termination (WST’03), Departamento de Sistemas Informáticos y Computación, Universidad Politécnica de Valencia, Valencia, Spain, 2003, pp. 1–4, published as Technical Report DSIC-II/15/03. [39] M. R. Garey, D. S. Johnson, Computers and Intractability; A Guide to the Theory of NP-Completeness, W. H. Freeman & Co., New York, NY, 1990. [40] A. Schrijver, Theory of linear and integer programming, Wiley, Chichester, New York, 1986. [41] P. Cousot, N. Halbwachs, Automatic discovery of linear restraints among variables of a program, in: Conference Record of the Fifth Annual ACM Symposium on Principles of Programming Languages, ACM Press, Tucson, Arizona, 1978, pp. 84–96. [42] B. Cook, S. Gulwani, T. Lev-Ami, A. Rybalchenko, M. Sagiv, Proving conditional termination, in: A. Gupta, S. Malik (Eds.), Computer Aided Verification: Proceedings of the 20th International Conference (CAV 2008), Vol. 5123 of Lecture Notes in Computer Science, Springer-Verlag, Berlin, Princeton, NJ, USA, 2008, pp. 328–340. [43] A. Rybalchenko, Temporal verification with transition invariants, Ph.D. thesis, Universität des Saarlandes, Saarbrücken, Germany (2004). [44] A. Serebrenik, F. Mesnard, On termination of binary CLP programs, in: S. Etalle (Ed.), Logic Based Program Synthesis and Transformation: 14th International Symposium, Revised Selected Papers, no. 3573 in Lecture Notes in Computer Science, Springer-Verlag, Berlin, Verona, Italy, 2005, pp. 231–244. [45] C. H. Papadimitriou, K. Steiglitz, Combinatorial Optimization: Algorithms and Complexity, Prentice Hall, Englewood Cliffs, NJ, USA, 1982. [46] D. A. Spielman, S.-H. Teng, Smoothed analysis: Why the simplex algorithm usually takes polynomial time, Journal of the ACM 51 (2004) 385– 463. 46 [47] R. Bagnara, P. M. Hill, E. Zaffanella, Applications of polyhedral computations to the analysis and verification of hardware and software system Theoretical Computer Science 410 (46) (2009) 4672–4691. [48] R. Bagnara, P. M. Hill, E. Ricci, E. Zaffanella, Precise widening operators for convex polyhedra, Science of Computer Programming 58 (1–2) (2005) 28–56. [49] R. Bagnara, P. M. Hill, E. Zaffanella, Not necessarily closed convex polyhedra and the double description method, Formal Aspects of Computing 17 (2) (2005) 222–257. [50] R. Bagnara, P. M. Hill, E. Zaffanella, Widening operators for powerset domains, Software Tools for Technology Transfer 8 (4/5) (2006) 449–466. [51] R. Bagnara, P. M. Hill, E. Zaffanella, Weakly-relational shapes for numeric abstractions: Improved algorithms and proofs of correctness, Formal Methods in System Design 35 (3) (2009) 279–323. [52] R. Bagnara, P. M. Hill, E. Zaffanella, Exact join detection for convex polyhedra and other numerical abstractions, Computational Geometry: Theory and Applications 43 (5) (2010) 453–473. [53] F. Spoto, F. Mesnard, É. Payet, A termination analyzer for Java bytecode based on path-length, ACM Transactions on Programming Languages and Systems 32 (3). 47
6cs.PL
1 A Convex Cycle-based Degradation Model for Battery Energy Storage Planning and Operation arXiv:1703.07968v2 [math.OC] 5 Apr 2017 Yuanyuan Shi, Bolun Xu, Yushi Tan, and Baosen Zhang Abstract A vital aspect in energy storage planning and operation is to accurately model its operational cost, which mainly comes from the battery cell degradation. Battery degradation can be viewed as a complex material fatigue process that based on stress cycles. Rainflow algorithm is a popular way for cycle identification in material fatigue process, and has been extensively used in battery degradation assessment. However, the rainflow algorithm does not have a closed form, which makes the major difficulty to include it in optimization. In this paper, we prove the rainflow cycle-based cost is convex. Convexity enables the proposed degradation model to be incorporated in different battery optimization problems and guarantees the solution quality. We provide a subgradient algorithm to solve the problem. A case study on PJM regulation market demonstrates the effectiveness of the proposed degradation model in maximizing the battery operating profits as well as extending its lifetime. I. I NTRODUCTION Battery energy storage (BES) is becoming an essential resource in energy systems with high renewable penetrations. Applications of BES include peak shaving [1], frequency regulation [2], demand response [3], [4], renewable integration [5], grid transmission and distribution support [6], and many others. Although each application has different objectives and constraints, a common theme among them is that accurately accounting for the operational cost of batteries is of critical importance. Battery operating cost is mainly caused by the degradation effect of repeated charging and discharging [7]. Battery cells typically reach end-of-life (EoL) if their capacity degrades beyond a certain minimum threshold (for example, 80% of original capacity) [8], after which cells can no longer perform as expected. The resulting cell replacement cost represents the predominate operating cost of batteries, because of high manufacturing price for most electrochemical battery cells [9]. The goal of this paper is to present an electrochemically accurate and tractable battery degradation model that can be used in multiple applications. To account for battery degradation, two main classes of models have been considered. The first kind of degradation model is based on battery charging/discharging power [3], [2], [10]. For example, [2] used a linear degradation cost while considering peak shaving and regulation services, and [3] adopts a general convex cost for battery demand response. This power-based model decouples the degradation cost in time, since the costs at each of the time steps are independent. It is easy to be incorporated in battery optimization. However, the major concern of the power-based The authors are with the Department of Electrical Engineering, University of Washington, Seattle, Washington 98125, (e-mail:{yyshi, xubolun, ystan, zhangbao}@uw.edu) 2 model is about its accuracy in capturing the actual degradation cost. For example, a Lithium Nickel Manganese Cobalt Oxide (NMC) battery has ten times more degradation when operated at near 100% cycle depth of discharge (DoD) compared to operated at 10% DoD for the same amount of charged power [11]. Power-based degradation model fails to capture such cumulative effect of battery cell aging and may severely deviate the operation from optimal. Therefore, we consider a more accurate model to account for battery degradation, which is called cycle-based model. This model is based on fundamental battery aging mechanism. It views the battery degradation process as a complex material fatigue process [12] that based on stress cycles. Battery aging at each time is not independent, but closely related to accumulation of previous charging and discharging. To accurately identify cycles in an irregular battery state of charge (SoC) profile, we adopt the rainflow cycle counting method. Rainflow algorithm has been extensively used for cycle identification in material fatigue analysis [13], [14], [15] as well as battery degradation model [16], [17], [18]. Fig. 1 gives an example of rainflow cycle identification results of a battery SoC profile. The total battery degradation cost is modeled as the sum of degradation from all cycles. !"# ,-'./01)2%-2.01+*3/4/+'. 5%6/"-7%-8"86.%-.7%&' !"# ()"*%+' ,-'./01)2%-2.01+*3/4/+' ,-'.5%6/01)2%-2.01+*3/4/+' $%&' Fig. 1: Rainflow cycle counting example. There are three half cycles, one charging half-cycle (the red one) is discontinuous in time. The green discharging half-cycle and yellow charging half-cycle are of the same cycle depth. Cycle-based degradation model can accurately model the fundamental battery aging. However, it is considerably more cumbersome and computationally difficult than the power-based cost model. The rainflow algorithm, despite its wide array of applications, is a procedure that does not have a closed form. This makes it difficult to be incorporated in optimization problems. Most previous works (see [12] and references within) apply the rainflow algorithm for a posterior battery degradation assessment with fixed operating strategies. Instead of posterior degradation assessment, we want to incorporate rainflow algorithm in battery optimization. Several efforts have been made by simplifying the algorithm procedure, either simplifying the rainflow counting 3 procedure [19], [20], or using more trivial cycle definition [21], [22]. These approaches improve the problem solvability, however the simplifications introduce additional errors and sacrifices the optimality of solutions. The main contribution of our paper is two-folded: 1) We prove the rainflow cycle-based degradation model is convex. Convexity enables the proposed cost model to be used in various battery optimization problems and guarantees the solution quality. 2) We provide a subgradient algorithm to solve the battery optimization problems. The proposed degradation model and subgradient solver algorithm have a broad application scope for battery operation optimization. We implement it for a case study on PJM regulation market, and verify this model accurately captures the battery cell aging, significantly improve the operational revenue (up to 30%) and almost doubled the expected BES lifetime compared with previous degradation models. The rest of the paper is organized as follows. Section II describes the proposed rainflow cycle-based degradation model. Section III sketches the convexity proof. Section IV gives a subgradient algorithm. We provide a case study in Section V using real data from PJM regulation market, and demonstrate the effectiveness of the proposed degradation model in maximizing the BES operating profits as well as extending battery lifetime. Finally, Section VII concludes the paper and outlines directions for future work. II. M ODEL A. Battery degradation model We consider a battery operating in power markets and providing certain profitable service. We use c(t) to denote battery charging and d(t) for discharging at time t, where t = 1, 2, ..., T . The battery SoC is s ∈ RT , which is an accumulation of charged/discharged power. In Section IV, we will describe in detail how we model the battery operation and constraints. Here, we focus on degradation model. Suppose the operation revenue from battery application is R(·), which is a function of battery power output. The battery degradation is captured by rainflow cycle-based degradation model. Therefore, a utility function U (·) that quantifies the profits BES owner obtains over t ∈ [1, T ] is, U = R(c, d) − λr N X Φ(di ) , (1) i=1 where [d1 , d2 , ..., dN ] are cycle depths. We use rainflow algorithm for cycle identification, which is defined as below, [d1 , d2 , ..., dN ] = Rainflow(s(1), s(2), . . . , s(T )) , (2) The second term in Eq. (1) together with Eq. (2) constitute the proposed rainflow cycle-based degradation model, where [d1 , d2 , ..., dN ] are cycle depths identified by rainflow algorithm. Φ(·) is the DoD stress function, P which defines the degradation of one cycle under reference condition. N i=1 Φ(di ) calculates the total degradation by summing over all cycles, and λr is the battery cell replacement price. It’s worth to point out that DoD stress function can be fitted with test data of different types of batteries, which offers the proposed degradation model strong generalization ability. 4 1 D H 0.8 F d2 0.6 SoC d1 B 0.4 0 E’ d4 E 0.2 A d6 d7 d5 d3 I C G 0 20 40 60 Turning Point 80 100 (a) Battery SoC time history. Red stars mark the local maximum and local minimum points (b) Rainflow cycle counting results, based on extracted local maximum and minimum points Fig. 2: Rainflow cycle counting algorithm procedures Path SoC range Cycle A-B 0.3 half B-C 0.4 half C-D 0.8 half D-G 0.9 half E-F-E’ 0.3 full G-H 0.8 half H-I 0.6 half TABLE I: Rainflow cycle counting results of the SoC profile in Fig. 2a. The “SoC range” is calculated as the absolute difference between the cycle starting and ending SoC. B. Rainflow cycle counting algorithm The process of reducing a strain/time history into a number of smaller cycles is termed as cycle counting. Rainflow algorithm is the most popular cycle counting algorithm used for analyzing fatigue data [13], [14], [15]. When used for battery life assessment, it takes a time series of battery’s state of charge (SoC) as input, and identifies the depth of all cycles contained in this series. Fig. 2 gives an example on the rainflow algorithm implementation for cycle counting of a battery SoC profile, and the cycle analysis results are reported in Table I. The standard rainflow algorithm procedures based on paper [13] are given in Algorithm 1. Following the procedures in Algorithm 1, we count cycles in Fig. 2a. First, all local extremes points of the SoC profile are extracted and arranged as Fig. 2b. Then the deepest half cycle D-G is identified. Next, half cycles before D are identified, which are C-D(d2 ), B-C (d3 ), A-B (d4 ); also half cycles after G are counted, which are G-H (d5 ) and H-I (d6 ). Finally, there is one remaining full cycle E-F-E’ with depth d7 , which could also be viewed as one charging half cycle plus one discharging half cycle with equal depth. 5 Algorithm 1: Rainflow Cycle Counting Algorithm 1 2 3 4 Input : Battery SoC profiles, s ∈ RT Output: Cycle counting results: d1 , d2 , ...dN Reduce the time history to a sequence of turning points – local maximum and local minimum. Find the global maximum and global minimum, counted as a half cycle. If the global maximum happens first: a. Half cycles are counted between the global maximum and the most negative minimum occurs before it, the most positive maximum occurring prior to this minimum, and so on to the beginning of the history. b. Half cycles are also counted after the global minimum in the history and terminates at the most positive maximum occurring subsequently, the most negative minimum occurring after this maximum, and so on to the end of the history. c. Remains are full cycles. If the global minimum happens first: Adjust step 3a, 3b, 3c accordingly to pair up sequential most positive maximum and most negative minimum that happen prior to the global minimum, or after the global maximum. Remains are small full cycles. C. DoD stress function DoD stress function Φ(·) is a critical part of the degradation model since it captures the cell aging caused by one cycle under reference conditions [12]. Different types of batteries may have different stress function forms. Some commonly used DoD stress functions are given below. (1) Linear DoD stress model [2], Φ(d) = k1 d , This linear DoD stress function is equivalent to the linear power-based degradation model. It is simple and suitable under some conditions. However, lab tests show that cycle DoD has a highly nonlinear impact on degradation under most conditions. The following two types of nonlinear DoD stress models are commonly used in literature. (2) Exponential DoD stress model [23], Φ(d) = k2 dek3 d , (3) Polynomial DoD stress model [21], where Φ(d) = k4 dk5 , (3) where all k’s are model coefficients, which could be estimated by fitting battery cycling aging test data. In paper, the DoD stress function is assumed to be a convex function, where a higher cycle DoD leads to a more severe damage. III. C ONVEXITY The major difficulty of incorporating the rainflow cycle-based degradation model to optimization is that the rainflow algorithm does not have a closed form. It could be solved by some computer numerical methods, however the computational complexity is high and there is no guarantee for the solution quality. We prove that the rainflow 6 cycle-based degradation cost f (s), given a convex DoD stress function, is convex in terms of s. It helps to overcome the difficulty of incorporating the rainflow algorithm to battery optimization. We provide a sketch of the convexity proof below. A detailed version of the proof is given in Section VI. Theorem 1. Rainflow cycle cost is convex The rainflow cycle-based battery degradation model, f (s) = N X Φ(di ), where [d1 , d2 , ..., dN ] = Rainflow(s) , i=1 is convex. That is, ∀s1 , s2 ∈ RT , f (λs1 + (1 − λ)s2 ) ≤ λf (s1 ) + (1 − λ)f (s2 ), ∀λ ∈ [0, 1] (4) This above theorem is intuitively pleasing. Consider two SoC series s1 and s2 , if they change in different directions, the two signals can cancel each other out partially so that the cost of left side is less than the right side. When s1 changes in the same direction as s2 for all time steps, the equality holds. We prove Theorem 1 by induction. It contains three steps, 1) unit step function decompostion of battery SoC, 2) the initial condition proof and 3) the induction relation proof from K to K+1 step. Here we sketch a proof for the conveixty. A. Unit step function decompostion First, we introduce the step function decompostion of SoC signal. We notice that, any SoC series s, could be written out as a finite sum of step functions, where s= T X Pi u(t − i) , (5) i=1 where u(t − i) is a unit step function with a jump at time i, and Pi is the jump amplitude.   1 t ≥ i u(t − i) = ∀t = 1, 2, ..., T ,  0 otherwise (6) For notation convenience, we use Ui to denote u(t − i). Fig. 3 gives an example of step function decomposition results of s1 . B. Initial condition proof Since all SoC profiles can be written as the sum of step functions. We first need to prove that f (s) is convex up to one step function as the base case. As shown in Fig. 4, we want to prove that, f (λs1 + (1 − λ)Pi Ui ) ≤ λf (s1 ) + (1 − λ)f (Pi Ui ) , λ ∈ [0, 1] , where s1 ∈ RT , and Pi Ui is a step function with a jump happens at time i with amplitude Pi . SoC 7 P2U2 P3U3 S1 P4U4 P1U1 Time SoC Fig. 3: Step function decomposition of SoC. s1 is decomposed to four step functions P1 U1 , P2 U2 , P3 U3 and P4 U4 . S SoC i T i Ui i Time T Fig. 4: Single step convexity. The upper plot is a SoC profile s1 ∈ RT , the bottom plot is a step function with a amplitude Pi jump at time i. C. Induction relation Having proved the single step convexity, we know that Theorem 1 is true if both s1 , s2 ∈ R1 . Now, let’s assume that, f (s) is convex up to the sum of K step changes (arranged by time index),  f λs1 + (1 − λ)s2 ≤ λf (s1 ) + (1 − λ)f (s2 ) , λ ∈ [0, 1] where s1 , s1 ∈ RK . Considering proof by induction, we need to show f (s) is convex up to the sum of K + 1 step changes (see Fig. 5), where s1 , s2 ∈ RK+1 .  f λs1 + (1 − λ)s2 ≤ λf (s1 ) + (1 − λ)f (s2 ) , λ ∈ [0, 1] The above three-step sketch builds the overall framework for convexity proof. For a more detailed proof step by 8 SoC K K+1 SoC Time Time T Fig. 5: Induction step from K to K+1. Both S1 and S2 are decomposed as the sum of T step functions. step, interested readers could refer to Section VI. IV. S UBGRADIENT A LGORITHM In this section, we formulate a general optimization problem of battery operation in power market. We use the rainflow cycle-based model for battery degradation calculation. The optimization problem is convex, but the objective function is not differentiable at some points (cycle junction points). Therefore, we provide a subgradient algorithm. With proper step size, the subgradient algorithm is guaranteed to converge to the optimal solution with a user-defined precision level. A. Battery operation in markets Assume we have a battery operating in power markets and providing some profitable service (eg. regulation service, demand response), the battery operation is defined over a finite discrete time intervals, where t = 1, 2, ..., T with time resolution ts . Following the same formulation in Section II-A, we aim to maximize the utility of battery 9 operation over a period of time t ∈ [1, T ]. max U (·) = R(c, d) − λr c,d h X i∈N ch Φ(dch i )+ X j∈N dc i Φ(ddc j ) , s.t.[dch ddc ]T = Rainflow(s(1), . . . , s(T )) , (7a) (7b) s(1) = s0 , (7c) s(t + 1) = s(t) + [c(t)ηc − d(t)/ηd ] ts , (7d) smin ≤ s(t) ≤ smax , (7e) 0 ≤ c(t) ≤ P max , (7f) 0 ≤ d(t) ≤ P max . (7g) where in Eq. (7a), the first term represents the operation revenue and the second term captures the battery degradation cost by rainflow cycle model. Eq. (7c) and (7d) describes the evolution of battery SoC, where s0 is the given initial state. Battery SoC is limited within [smin , smax ], in general, smin = 0 (empty) and smax = 1 (full charge). We include the battery charging/discharging efficiency ηc and ηd in the optimization model. The battery output power is subject to power rating in (7f) - (7g). Note, different from previous notations, we seperate cycles into charging half cycles (CHC) dch and discharging half cycles (DHC) ddc in Eq. (7b) for optimization convenience1. Assume we have N ch number of CHCs, each dc one is indexed by i with cycle depth dch number of DHCs, each is indexed by j with depth ddc i ; and N i . Battery SoC s is a linear function of battery power output c and d according to Eq. (7d). We have proved that the rainflow cycle cost is convex in terms of s. Therefore, the rainflow cycle cost is also convex in terms of c and d. If the revenue function R(·) is concave, the overall battery operation optimization problem formulated in (7a) - (7g) is a convex optimization problem. B. Subgradient algorithm To solve the convex battery operation problem in Eq. (7a) - (7g), we provide a subgradient algorithm. Using a log-barrier function [24], we re-write the constrained optimization problem to an unconstrained optimization 1 This is because charging and discharging response have different subgradient forms, which will be discussed in Section IV-B 10 problem. min U (·) := −R(c, d) + λr c,d h X Φ(dch i )+ j∈N dc i∈N ch − X i Φ(ddc j ) T T X 1 nX · log[smax − s(t)] + log[s(t) − smin ] λ t=1 t=1 + T X log[P max − c(t)] + t=1 + T X T X log[c(t)] t=1 log[P max − d(t)] + t=1 T X log[d(t)] t=1 o (8) when λ → +∞, the uncontrained problems (8) equals to the original constrained problem Eq. (7a) - (7g). Note here we change the original maximization problem to an equivalent minimization problem for standard form expression. The major challenge of solving Eq. (8) lies in the second term. We need to find the mathematical relationship between charging cycle depth dch i and charging power c(t), as well as the relationship between discharging cycle depth ddc j and discharging power d(t). Recall that the rainflow cycle counting algorithm introcuded in Section II-B, each time index is mapped to at least one charging half cycle (CHC) or at least one discharging half cycle (DHC). ′ Some time steps sit on the junction of two cycles. For example, in Fig. 2b, E lies on the junction of discharging ′ cycle D − G and discharging cycle F − E . No time step belongs to more than two cycles. Let the time index mapped to the CHC i belong to the set Tich , and let the time index mapped to the DHC j belong to the set Tjdc , it follows that T1ch ∪ . . . ∪ TNchch ∪ T1dc ∪ . . . ∪ TNdcch = T , Tich ∩ Tjdc = ∅ , ∀i, j . (9) (10) Eq. (10) shows there is no overlapping between a charging and a discharging interval. That is, each half-cycle is either charging or discharging. The cycle depth therefore equals to the sum of battery charging or battery discharging within the cycle time frame, dch i = X c(t)ts ηc , E ch (11) t∈Ti ddc j = X d(t)ts /ηd , E dc (12) t∈Tj P Φ(dch i ) is not continuously differentiable. At cycle junction points, it has more P than one subgradient. Therefore, we use ∂ i∈N ch Φ(dch i )|c(t) to denote a subgradient at c(t), The rainflow cycle cost i∈N ch ∂ X i∈N ch ′ ch Φ(dch i )|c(t) = Φ (di ) ts · ηc , t ∈ Tich , E (13) where dch i is the depth of cycle that c(t) belongs to. Note, at junction points, c(t) belongs to two cycles so that the ch ch ch ch subgradient is not unique. We can set dch i to any value between di1 and di2 , where di1 and di2 are the depths of 11 two junction cycles c(t) belongs to. Similarly for discharging cycle, a subgradient at d(t) is ∂ X ′ dc Φ(ddc j )|d(t) = Φ (dj ) j∈N dc ts , t ∈ Tjdc ηd · E (14) dc where ddc j is the depth of the cycle that d(t) belongs to. At the junction point, dj could be set to any value between dc ddc j1 and dj2 , which are the two junction cycles d(t) belongs to. Therefore, we write the subgradient of U (·) with respect to c(t) and d(t) as ∂Uc(t) and ∂Ud(t) , where ′ ts ηc ∂R + λr Φ (dch i ) ∂c(t) E T T X 1nX 1 1 ηc ts ηc ts − ( ) + ( ) min λ τ =t s(τ ) − smax E s(τ ) − s E τ =t 1 o 1 , t ∈ Tich + + max c(t) − P c(t) ∂Uc(t) = − ′ ∂R ts + λr Φ (ddc j ) ∂d(t) ηd · E T T X 1 1 ts ts 1n X − ( ) − ( ) − max η E min η E λ s(τ ) − s s(τ ) − s d d τ =t τ =t 1 o 1 , t ∈ Tjdc + + d(t) − P max d(t) (15) ∂Ud(t) = − (16) The update rules for c(t) and d(t) at the k-th iteration are, c(k) (t) = c(k−1) (t) − αk · ∂Uc(t) , d(k) (t) = d(k−1) (t) − αk · ∂Ud(t) , where αk is the step length at k-th iteration. Since the subgradient method is not a decent method [25], it is common to keep track of the best point found so far, i.e., the one with smallest function value. At each step, we set  best best , U (c(k) , d(k) ) , = min U(k−1) U(k) Since the U (·) is convex, for constant step length (αk is constant), the subgradient algorithm is guaranteed to converge to the global optima within certain gap bound. best − U∗ → U(k) G2 α , 2 where U ∗ as the global minimum of Eq. (8), α is the contant step size, and G is the upper bound of the 2-norm 12 of the following sub-gradient vectors, ∂Uc = [∂Uc(1) , ∂Uc(2) , ..., ∂Uc(T ) ] , ∂Ud = [∂Yd(1) , ∂Ud(2) , ..., ∂Ud(T ) ] , If we set the step size α to be small enough, we could guarantee the precision of the subgradient algorithm. V. C ASE STUDY The proposed battery degradation model has a wide application scope in battery planning and operation problems. In this section, we provide a case study on PJM regulation market to demonstrate the effectiveness of the proposed degradation model in optimizing BES operation utilities and extending BES lifetime. A. Frequency regulation market We consider the optimal operation of a BES in frequency regulation market. In particular, we adopt a simplified version of the PJM fast regulation market [26]. For market rules, the grid operator pays a per-MW option fee (λc ) to a battery storage with stand-by power capacity C that it can provide for the grid. While during the regulation procurement period, a regulation instruction signal r(t) is sent to the battery. Battery should respond to follow the instruction signal and is subjected to a per-MWh regulation mismatch penalty λp for the absolute error between the instructed dispatch Cr(t) and the resource’s actual response b(t). Fig. 6 gives an example of the PJM fast regulation signal for 2 hours. Regulation signal 1 0.5 0 -0.5 -1 0 20 40 60 80 time[Min] 100 120 Fig. 6: PJM fast regulation signal for 2 hours We decompose the regulation signal r(t) into charging and discharging parts, r(t) = rd (t) − rc (t), where rc (t) is the charging instruction signal and rd (t) is the discharging signal. Thus, the regulation service revenue is, R(c, d) = λc C · T − X λp ts |(rc (t) − c(t)) + (rd (t) − d(t))| , (17) t∈T where the first part represents the regulation capacity payment and the second part is the mismatch penalty. In this work, we assume the regulation capacity bidding C is fixed, and focus on the optimization of battery response. The regulation revenue R(c, d) is concave with respect to c, d. Therefore, plugging (17) to the battery market operation 13 model in (7a) - (7g), we obtain a convex optimization problem for optimizing battery usage in frequency regulation market. B. Benchmark To demonstrate the efficiency of the proposed battery degradation model in maximizing the BES operation utilities as well as extending BES lifetime, we describe two benchmark battery degradation models: assuming zero operating cost [27] and a linear power-based degradation cost [2]. Assume the battery optimization horizon is 2 hours and the time granularity ts is 4s, so that T = 1800. We adopted the regulation market price and linear battery cost model coefficients from paper [28], where the regulation capacity payment is 50$/M W h and the mismatch penalty is 150$/M W h. We fixed the regulation capacity bidding as 1MW, with the same value as the battery power capacity. The battery energy capacity E is 15 minute max power output, and cell replacement price is 0.6$/W h. Assume battery DoD stress model has a polynomial form as Eq. (3), where k4 = 4.5e − 4 and k5 = 1.3 [12]. What’s more, we set both the charging/discharging efficiency ηc , ηd to 0.95. 1 reg rainflow no cost linear Power[MW] 0.5 0 -0.5 -1 20 40 60 80 time[min] 100 120 Fig. 7: Battery response to the regulation signal under three different battery cost models SoC curve 0.75 no cost rainflow linear 0.7 SoC[%] 0.65 0.6 0.55 0.5 0.45 0.4 20 40 60 80 time[min] 100 120 Fig. 8: Battery SoC under different battery cost models Fig. 7 and Fig. 8 compare the power output and SoC evolution for the same battery optimized under three different degradation models: assuming no operating cost, linear power-based model and the proposed rainflow cycle-based model. The grey curve in Fig. 7 is the regulation instruction signal. We find that under no cost model (light yellow curve) and linear power-based degradation model (blue dashed line), the battery response is completely following 14 Annual cost Total regulation utility (k$) Regulation service payment (k$) Modeled battery degradation (k$) Actual battery degradation (k$) Battery life expectancy (month) Rainflow 176 338.9 162.9 162.9 11.1 No cost 137.9 438 0 300.1 6 Linear 137.9 438 207.2 300.1 6 TABLE II: Annual economics of BES operation under three battery cost models. “Modeled battery degradation” refers to the battery operation cost captured by the model in use, “actual degradation cost” is assessed by posterior rainflow algorithm, and “total regulation utility” is calculated by payment subtracting actual battery degradation cost. the regulation instruction signal. However, for the rainflow cycle-based model, instead of the “blindly following” strategy, the battery response strives a good balance between mismatch penalty and degradation cost. In Fig. 8, we observed that the battery SoC is restricted to a moderate range and evolves smoothly for the rainflow cycle-based cost. Table II summarizes the annual economics of the same battery optimized using three different degradation models. We find that, using the rainflow cycle-based degradation model, we have the highest operational utility and longest expected battery lifetime. The total regulation revenue increases by 27.6% and the battery lifetime almost doubles compared with the other two cases. VI. P ROOF Section III provides a sketch of the convexity proof. Here we extends the sketch and explain the critical proof steps. A full version of the convexity proof could be found in the Appendix. Proof. Firstly, we use step function decomposition method to write out s1 , s2 and λs1 + (1 − λ)s2 as a finite sum of step functions, where s1 = T X Qi Ui , s2 = i=1 λs1 + (1 − λ)s1 = T X Pi Ui i=1 T X Xi U i , (18) i=1 We obtain the overall proof by induction. We first prove that f (s) is convex up to any single step change. Lemma 1. The rainflow cycle-based cost function f (s) is convex up to one step change of the original SoC profile, f (λs1 + (1 − λ)Pi Ui ) ≤ λf (s1 ) + (1 − λ)f (Pi Ui ) , λ ∈ [0, 1] , We need the following proposition to prove Lemma 1. 15 Proposition 1. Let g(·) be a convex function where g(0) = 0. Let x1 , x2 , x3 , ..., xN be real numbers, suppose PN i=1 xi = D > 0 and |xi | ≤ D, ∀i ∈ {1, 2, 3, ..., N } Then, ! n X X X g(|xi |) , (19) g(xi ) − g xi ≥ i=1 {i:xi <0} {i:xi ≥0} Proposition 1 basically says that the function value of a large number D is larger than the sum of function values PN of N small numbers x1 , ..., xN , where i=1 xi = D. Now, let’s consider a step function added to λs1 , where ′ s1 = λs1 + (1 − λ)Pi Ui . Suppose the rainflow cycle counting results are, Rainflow(λs1 ) : λd1 , λd2 , ..., λdM , 0, 0, ... , | {z } L ′ ′ ′ ′ Rainflow(s1 ) : d1 , d2 , ..., dN , 0, 0, ... , | {z } L where [d1 , d2 , ..., dM ] are cycle counting results for s1 . We add some cycles with 0 depth in the end to ensure that ′ Rainflow(λs1 ) and Rainflow(s1 ) have the same number of cycles. Define ∆di such that, ′ di = λdi + (1 − λ)∆di , ∀i = 1, 2, ..., L , (20) We observe that, L X ∆di ≤ |Pi | and |∆di | ≤ |Pi | , i=1 P ∆di = |Pi |, Lemma 1 is directly proved by applying Proposition 1. When − |Pi | ≤ L i=1 ∆di < |Pi |,  PL we first add some “virtual cycles” to make i=1 ∆di = |Pi |. Then we prove the original cost f λs1 +(1−λ)Ui Pi When PL i=1 is strictly less than the cost after adding the “virtual cycles”. Lemma 1 proved the convexity for base case. Next, we want to prove the induction relation from K to K + 1 step. Assume that f (s) is convex up to the sum of K step changes (arranged by time index), let’s show f (s) is convex up to the sum of K + 1 step changes, where f (λs1 + (1 − λ)s1 ) ≤ λf (s1 ) + (1 − λ)f (s1 ) , λ ∈ [0, 1] , where s1 , s1 ∈ RK+1 . The following Proposition is needed for the proof. Proposition 2. f K X t=1 ! Xt Ut ≥ f i−1 X t=1 Xt Ut +(Xi +Xi+1 )Ui + K X t=i+2 Xt Ut ! , In other words, the cycle stress cost will reduce if combining adjacent unit changes. Recall the step function decomposition results for s1 , s2 and λs1 + (1 − λ)s2 in (18). There are three cases when we go from T = K to T = K + 1, classified by the value and sign of XK , XK+1 . Case 1: XK and XK+1 are same direction. 16 If XK+1 and XK are same direction, we could move XK+1 to the previous step without affecting the total cost f (s1 + (1 − λ)s2 ). Then we prove the K + 1 convexity by applying Proposition 2. f (λs1 + (1 − λ)s2 )  =f λs1 K + (1 − λ)s2 K + XK+1 UK  =f λs1 K + (1 − λ)s2 K + [λQK+1 + (1 − λ)PK+1 ]UK   ≤λf s1 K + QK+1 UK + (1 − λ)f s2 K + PK+1 UK ≤λf (s1 ) + (1 − λ)f (s2 ) (by Lemma 1) Case 2: XK and XK+1 are different directions, with |XK | ≥ |XK+1 |. In this case, the last step XK+1 could be separated out from the previous SoC profile. Therefore f (λs1 + (1 − λ)s2 )   =f λs1 K + (1 − λ)s2 K + Φ (XK+1 UK+1 ) ≤λf (s1 K)+(1−λ)f (s2 K)+Φ [λQK+1 UK+1 +(1−λ)PK+1 UK+1 ]     ≤λ f (s1 K)+Φ(QK+1 UK+1) +(1−λ) f (s2 K)+Φ(PK+1 UK+1 ) ≤λf (s1 ) + (1 − λ)f (s2 ) Case 3: XK and XK+1 are different directions, with |XK | < |XK+1 |. In such condition, XK+1 is not easily separated out from previous SoC. It further contains three cases. • XK−1 and XK are the same direction. We could use the same “trick” in Case 1 to combine step K − 1 and K. Proof is trivial for this case. • XK−1 and XK are different directions, XK and XK+1 form a cycle that is separate from the rest of the signal (eg. it is the deepest cycle). We can separate XK+1 out, and proof will be similar to Case 2. • XK−1 and XK are different directions, XK and XK+1 do not form a separate cycle. This condition is the most complicated case, since it’s hard to move XK+1 to the previous step, or separate it out. Therefore, we need to look into QK , QK+1 , PK , PK+1 in order to show the K + 1 step convexity. It further contains four sub-cases as given in Fig. 9, showing convexity for each sub-case finishes the overall convexity proof. VII. C ONCLUSION Battery operational cost modeling is very important for BES planning and operation. An ideal cost model needs to both capture the fundamental battery degradation, and be easy to incorporate in optimization and computational tractable to solve. Cycle-based degradation models, mainly using the rainflow algorithm for cycle counting is electrochemically accurate. However, it does not have a closed form thus hard to be optimized. In this paper, we prove the rainflow cycle-based degradation cost is convex (with respect to charging/discharging power). Convexity enables the degradation model easy to be incorporated and guarantee the solution quality. We provide a subgradient solver algorithm. The proposed degradation model and subgradient algorithm have a broad application scope in 17 S1 QK+1 S1 QK QK QK+1 S2 S2 PK+1 PK+1 PK PK a) b) S1 QK+1 QK+1 S1 QK QK S2 PK+1 PK S2 PK PK+1 d) c) Fig. 9: Four cases of QK , QK+1 , PK , PP +1 various battery planning and operation optimization problems. From the case study in frequency regulation market, we verified the proposed degradation model can significantly improve the operational utility and extend battery lifetime. In future, we will apply the proposed degradation model to more BES applications besides frequency regulation. R EFERENCES [1] B. Dunn, H. Kamath, and J.-M. Tarascon, “Electrical energy storage for the grid: a battery of choices,” Science, vol. 334, no. 6058, pp. 928–935, 2011. [2] Y. Shi, B. Xu, B. Zhang, and D. Wang, “Leveraging energy storage to optimize data center electricity cost in emerging power markets,” in Proceedings of the Seventh International Conference on Future Energy Systems. ACM, 2016, p. 18. [3] N. Li, L. Chen, and S. H. Low, “Optimal demand response based on utility maximization in power networks,” in Power and Energy Society General Meeting, 2011 IEEE. IEEE, 2011, pp. 1–8. [4] P. Li and B. Zhang, “An optimal treatment assignment strategy to evaluate demand response effect,” arXiv preprint arXiv:1610.00362, 2016. [5] E. Bitar, R. Rajagopal, P. Khargonekar, and K. Poolla, “The role of co-located storage for wind power producers in conventional electricity markets,” in American Control Conference (ACC), 2011. IEEE, 2011, pp. 3886–3891. [6] H. Pandi, Y. Wang, T. Qiu, Y. Dvorkin, and D. S. Kirschen, “Near-optimal method for siting and sizing of distributed storage in a transmission network,” IEEE Transactions on Power Systems, vol. 30, no. 5, Sept 2015. [7] B. Zakeri and S. Syri, “Electrical energy storage systems: A comparative life cycle cost analysis,” Renewable and Sustainable Energy Reviews, vol. 42, pp. 569–596, 2015. 18 [8] J. Vetter, P. Novák, M. Wagner, C. Veit, K.-C. Möller, J. Besenhard, M. Winter, M. Wohlfahrt-Mehrens, C. Vogler, and A. Hammouche, “Ageing mechanisms in lithium-ion batteries,” Journal of power sources, vol. 147, no. 1, pp. 269–281, 2005. [9] B. Nykvist and M. Nilsson, “Rapidly falling costs of battery packs for electric vehicles,” Nature Climate Change, vol. 5, no. 4, pp. 329–332, 2015. [10] Y. Guo and Y. Fang, “Electricity cost saving strategy in data centers by using energy storage,” IEEE Transactions on Parallel and Distributed Systems, vol. 24, no. 6, pp. 1149–1160, 2013. [11] M. Ecker, N. Nieto, S. Käbitz, J. Schmalstieg, H. Blanke, A. Warnecke, and D. U. Sauer, “Calendar and cycle life study of li (nimnco) o 2-based 18650 lithium-ion batteries,” Journal of Power Sources, vol. 248, pp. 839–851, 2014. [12] B. Xu, A. Oudalov, A. Ulbig, G. Andersson, and D. Kirschen, “Modeling of lithium-ion battery degradation for cell life assessment,” IEEE Transactions on Smart Grid, 2016. [13] I. Rychlik, “A new definition of the rainflow cycle counting method,” International journal of fatigue, vol. 9, no. 2, pp. 119–121, 1987. [14] S. D. Downing and D. Socie, “Simple rainflow counting algorithms,” International Journal of Fatigue, vol. 4, no. 1, pp. 31–40, 1982. [15] C. Amzallag, J. Gerey, J. Robert, and J. Bahuaud, “Standardization of the rainflow counting method for fatigue analysis,” International journal of fatigue, vol. 16, no. 4, pp. 287–293, 1994. [16] V. Muenzel, J. de Hoog, M. Brazil, A. Vishwanath, and S. Kalyanaraman, “A multi-factor battery cycle life prediction methodology for optimal battery management,” in Proceedings of the 2015 ACM Sixth International Conference on Future Energy Systems. ACM, 2015, pp. 57–66. [17] T. Dragičević, H. Pandžić, D. Škrlec, I. Kuzle, J. M. Guerrero, and D. S. Kirschen, “Capacity optimization of renewable energy sources and battery storage in an autonomous telecommunication facility,” IEEE Transactions on Sustainable Energy, vol. 5, no. 4, pp. 1367–1378, 2014. [18] M. Musallam and C. M. Johnson, “An efficient implementation of the rainflow counting algorithm for life consumption estimation,” IEEE Transactions on Reliability, vol. 61, no. 4, pp. 978–986, 2012. [19] G. He, Q. Chen, C. Kang, P. Pinson, and Q. Xia, “Optimal bidding strategy of battery storage in power markets considering performancebased regulation and battery cycle life,” IEEE Transactions on Smart Grid, vol. 7, no. 5, pp. 2359–2367, 2016. [20] K. Abdulla, J. De Hoog, V. Muenzel, F. Suits, K. Steer, A. Wirth, and S. Halgamuge, “Optimal operation of energy storage systems considering forecasts and battery degradation,” IEEE Transactions on Smart Grid, 2016. [21] M. Koller, T. Borsche, A. Ulbig, and G. Andersson, “Defining a degradation cost function for optimal control of a battery energy storage system,” in 2013 IEEE Grenoble Conference, June 2013, pp. 1–6. [22] D. Tran and A. M. Khambadkone, “Energy management for lifetime extension of energy storage system in micro-grid applications,” IEEE Transactions on Smart Grid, vol. 4, no. 3, Sept 2013. [23] A. Millner, “Modeling lithium ion battery degradation in electric vehicles,” in Innovative Technologies for an Efficient and Reliable Electricity Supply (CITRES), 2010 IEEE Conference on. [24] S. Boyd and L. Vandenberghe, Convex optimization. IEEE, 2010, pp. 349–356. Cambridge university press, 2004. [25] B. Stephen, L. Xiao, and A. Mutapcic, “Subgradient methods,” in lecture notes of EE392, Stanford University, Autume 2004. [26] B. Xu, Y. Dvorkin, D. S. Kirschen, C. A. Silva-Monroy, and J. P. Watson, “A comparison of policies on the participation of storage in u.s. frequency regulation markets,” in 2016 IEEE Power and Energy Society General Meeting (PESGM), July 2016. [27] D. Pozo, J. Contreras, and E. E. Sauma, “Unit commitment with ideal and generic energy storage units,” IEEE Transactions on Power Systems, vol. 29, no. 6, Nov 2014. [28] Y. Shi, B. Xu, D. Wang, and B. Zhang, “Using battery storage for peak shaving and frequency regulation: Joint optimization for superlinear gains,” arXiv preprint arXiv:1702.08065, 2017. 19 VIII. A PPENDIX Here we provide a detailed proof that the rainflow cycle life loss model is convex. We use s to denote the battery SoC profile, and the battery degradation cost based on the rainflow method is denoted by f, which is defined by, N X f (s) = Φ(di ) , (21) i=1 where Φ is a convex depth of discharge (DoD) stress function, N is the number charging/discharging cycles, and di is the depth of the ith charging/discharging cycle. Theorem 1. Cost Model Convexity PN The rainflow cycle-based battery life loss model f (s) = i=1 Φ(di ), where [d1 , d2 , ..., dN ] = Rainflow(s) is convex given function Φ(·) is convex. In mathematical form, ∀s1 , s2 ∈ RT : f (λs1 + (1 − λ)s2 ) ≤ λf (s1 ) + (1 − λ)f (s2 ), ∀λ ∈ [0, 1] (22) A. Step function decomposition First, we introduce the step function decompostion of SOC signal. Notice that any SoC series S, could be written out as a finite sum of step functions: s= T X Pi u(t − i) , (23) i=1 where u(t-i) is the unit step function and Pi is the signal amplitude.   1 t ≥ i , ∀t = 1, 2, ..., T u(t − i) =  0 otherwise (24) For notation convenience, we use Ui to denote u(t−i). Fig. 10 gives an example of the step function decomposition SoC method. An SoC signal s1 is decomposed into 4 step functions P1 U1 , P2 U2 , P3 U3 and P4 U4 . P2U2 P3U3 S1 P4U4 P1U1 Time Fig. 10: Step function decomposition of S1 20 B. Single step change convexity Since all SoC profile can be written as the sum of step functions, by induction method, we first need to prove that f (s) is convex up to a step function as base case. Lemma 1. Rainflow Convexity for single step The rainflow cycle-based degradation cost function is convex up to one step change of the orginal SoC profile, where  f λs1 + (1 − λ)Pi Ui ≤ λf (s1 ) + (1 − λ)f (Pi Ui ) , λ ∈ [0, 1] In order to prove the Lemma 1, we need the following propositions. Proposition 1. Let g(·) be a convex function where g(0) = 0. Let x1 , x2 be positive real numbers. Then g(x1 + x2 ) ≥ g(x1 ) + g(x2 ) , Proof. By convexity of g, we have x2 x1 g(x1 + x2 ) + g(0) ≥ g(x1 ) , x1 + x2 x1 + x2 and x1 x2 g(x1 + x2 ) + g(0) ≥ g(x2 ) , x1 + x2 x1 + x2 Adding the two equations finish the proof. Proposition 2. Let g(·) be a convex function where g(0) = 0. Let x1 , x2 be positive real numbers, and x1 ≥ x2 . Then g(x1 − x2 ) ≤ g(x1 ) − g(x2 ) , Proof. By Proposition 1, g(x + y) ≥ g(x) + g(y), ∀x, y > 0 , Let x = x1 − x2 > 0, y = x2 > 0, so that g(x1 − x2 + x2 ) ≥ g(x1 − x2 ) + g(x2 ) , Q.E.D. 21 Proposition 3. Let g(·) be a convex function where g(0) = 0. Let x1 ≥ x2 > 0 be positive real numbers. Then 1 1 1 1 g( x1 − x2 ) ≤ g(x1 ) − g(x2 ) , 2 2 2 2 Proof. From Proposition 2, 1 1 1 1 g( x1 − x2 ) ≤ g( x1 ) − g( x2 ), ∀x1 ≥ x2 > 0 2 2 2 2 Therefore, it suffices to show, 1 1 1 1 g( x1 ) − g( x2 ) ≤ g(x1 ) − g(x2 ) , 2 2 2 2 Define h(z) = g( 21 z) − 21 g(z), h′ (z) =   1 ′ 1  ′ 1 ′ 1  1 g z − g z = [g z −g z ] < 0, 2 2 2 2 2 h(·) is a monotone decreasing function. For x1 ≥ x2 > 0, h(x1 ) ≤ h(x2 ) 1 1 1 g( x1 ) − g(x1 ) ≤ g( x2 ) − 2 2 2 1 1 1 g( x1 ) − g( x2 ) ≤ g(x1 ) − 2 2 2 1 g(x2 ) , 2 1 g(x2 ) 2 If g(·) is continous, we can generalize the midpoint property to a more broad λ, g(λx1 − (1 − λ)x2 ) ≤ λg(x1 ) − (1 − λ)g(x2 ), ∀λx1 ≥ (1 − λ)x2 > 0 Q.E.D. Proposition 4. Let g(·) be a convex function where g(0) = 0. Let x1 , x2 , x3 be positive real numbers, which satisfy that x1 + x2 − x3 ≥ 0, and xi ≤ x1 + x2 − x3 , ∀i ∈ [1, 2, 3]. Then g(x1 + x2 − x3 ) ≥ g(x1 ) + g(x2 ) − g(x3 ) , Proof. From x1 ≤ x1 + x2 − x3 we have x2 ≥ x3 . From x2 ≤ x1 + x2 − x3 , we have x1 ≥ x3 Let’s further assume x1 ≥ x2 , ′ g(x1 + x2 − x3 ) − g(x1 ) = (x2 − x3 ) · g (θ1 ), θ1 ∈ [x1 , x1 + x2 − x3 ] , ′ g(x2 ) − g(x3 ) = (x2 − x3 ) · g (θ2 ), θ2 ∈ [x3 , x2 ] , ′ ′ Since g(·) is a convex function, for θ2 ≤ x2 ≤ x1 ≤ θ1 , we have g (θ2 ) ≤ g (θ1 ). Therefore, g(x2 ) − g(x3 ) ≤ g(x1 + x2 − x3 ) − g(x1 ) , 22 g(x1 + x2 − x3 ) ≥ g(x1 ) + g(x2 ) − g(x3 ) If x1 < x2 , similarly we have g(x1 ) − g(x3 ) ≤ g(x1 + x2 − x3 ) − g(x2 ) , g(x1 + x2 − x3 ) ≥ g(x1 ) + g(x2 ) − g(x3 ) Q.E.D Proposition 5. Let g(·) be a convex function where g(0) = 0. Let x1 , x2 , x3 , ..., xn be real numbers, suppose Pn • i=1 xi = D > 0 • |xi | ≤ D, ∀i ∈ {1, 2, 3, ..., n} Then, n X xi ) ≥ g( i=1 X g(xi ) − X g(|xi |) , {i:xi <0} {i:xi ≥0} P Pn Proof. (1) If all xn ’s are positive, it is trivial to show g( i=1 xi ) ≥ i g(xi ) by Proposition 1. (2) If xn contains both positive and negative numbers, we order them in an ascending order and renumber them as, x1 ≤ x2 ≤ ... ≤ 0 ≤ ... ≤ xn , Pick x1 (the most negative number), and find some positive xi , xi+1 such that xi+1 ≥ xi ≥ |x1 | > 0 , Applying Proposition 4, we have g(xi+1 + xi + x1 ) = g(xi+1 + xi − |x1 |) ≥ g(xi+1 ) + g(xi ) − g(|x1 |) , Note, if we can not find such xi , xi+1 , eg. xn < |x1 |. We could group a bunch of postive xi ’s to form two new P P variables y1 = i∈N1 xi , y2 = i∈N2 xi where N1 ∩ N2 = ∅. For sure there exists such y1 ≥ y2 ≥ |x1 |, since | n X xi | = | X xi + i:xi ≥0 i=1 = X xj + x1 | j:xj <0,j6=1 xi − | i:xi ≥0 X X xj | − |x1 | j:xj <0,j6=1 =D X i:xi ≥0 xi = | X j:xj <0,j6=1 xj | + |x1 | + D ≥ 2|x1 | 23 Applying Proposition 4, g(y1 + y2 + x1 ) = g(y1 + y2 − |x1 |) ≥ g(y1 ) + g(y2 ) − g(|x1 |) X X ≥ g(xi ) + g(xj ) − g(|x1 |), N1 ∩ N2 = ∅ i∈N1 j∈N2 ′ ′ Define x1 = xi+1 + xi + x1 > 0 and re-order x1 , x2 , x3 , ..., xi−1 , xi+2 , ..., xn .  ′ ′ Or define x1 = y1 + y2 + x1 > 0, re-order xi : i 6= 1, i ∈ / N1 ∪ N2 , x1 ′ Repeat the above steps till all xi are postive and finish the proof. ′ Proposition 6. Consider a step change added to s1 , where s1 (t) = s1 (t) + Pi Ui , t ∈ [0, T ]. Suppose Pi is positive 2 ′ , the rainflow cycle decomposition results for s1 and s1 are, S1 : d1 , d2 , ..., dm , ..., dM , ′ ′ ′ ′ ′ S1 : d1 , d2 , ..., dn , ..., dN , ′ Define L = max(M, N ), we could re-write the cycles in s1 and s1 as, s1 : d1 , d2 , ..., dM , 0, 0, ... , {z } | L ′ ′ ′ ′ s1 : d1 , d2 , ..., dN , 0, 0, ... , | {z } L Define ∆di such that, ′ di = di + ∆di , ∀i = 1, 2, ..., L The following relations always holds, L X ∆di ≤ Pi , (25) i=1 |∆di | ≤ Pi , Proof. There exists a small enough ∆P such that only one cycle depth di will change. |∆di | ≤ ∆P , 2 The proof for negative Pi is the same, just change Pi to |Pi | (26) 24 −∆P ≤ ∆di ≤ ∆P , Consider Pi as a cumulation of small ∆P , by the principle of integration, we have − Z ∆P dp ≤ L X ∆di ≤ i=1 Z ∆P dp , Such that, L X ∆di ≤ Pi i=1 |∆di | ≤ Pi holds for the worst case where all cycle depth changes happen at one certain cycle. Therefore, it is trivial to show that |∆di | ≤ Pi hold in all conditions. Q.E.D. Now, by Proposition 1-6, we finish the following proof of Lemma 1. ′ Proof. Let’s consider s (t) = λs1 (t) + (1 − λ)Pi Ui , t ∈ [0, T ]. Then the rainflow cycle decomposition results for ′ λs1 and s are λs1 : λd1 , λd2 , ..., λdM , 0, 0, ... {z } | L ′ ′ ′ ′ s1 : d1 , d2 , ..., dN , 0, 0, ... {z } | L Define ∆di such that, ′ di = λdi + (1 − λ)∆di , ∀i = 1, 2, ..., L f λs1 + (1 − λ)Pi Ui = L X  Φ λdi + (1 − λ)∆di i=1 + = l X  ∆di ≥0 ∆di <0 + ≤ − l  X  Φ λdi + (1 − λ)∆di + Φ λdi − (1 − λ)|∆di | | {z } i=1 | {z } i=1 − l l X X [λΦ(di ) − (1 − λ)Φ(|∆di |)] [λΦ(di ) + (1 − λ)Φ(∆di )] + i=1 i=1 ≤λ L X i=1 + − i=1 i=1 l l X  X Φ(|∆di |) Φ(∆di ) − Φ(di ) + (1 − λ) By Proposition 6, we have | L X ∆di | ≤ Pi , i=1 |∆di | ≤ Pi , (27a) 25 (1) Assume PL i=1 ∆di = Pi , |∆di | ≤ Pi . By Proposition 5, f λs1 + (1 − λ)Pi Ui ≤λ L X Φ(di ) + (1 − λ) i=1 ≤λ L X L X + l X − Φ(∆di ) − i=1 Φ(di ) + (1 − λ)Φ( i=1 =λ  L X l X Φ(|∆di |) i=1  ∆di ) i=1 Φ(di ) + (1 − λ)Φ(Pi ) i=1 (2) Assume −Pi ≤ PL i=1 ∆di < Pi , |∆di | ≤ Pi . ′ ′ ′ ′ ′ Add some “virtual cycles” dL+1 , dL+2 , ..., dL+K at the end of s1 , each dL+i is positive and satisfies that PL+K ′ |dL+i | ≤ Pi . So that i=1 ∆di = Pi , |∆di | ≤ Pi , ∀i ∈ [1, 2, ..., L + K]. Write 0 at the end of λs1 to achieve the same cycle number. λs1 : λd1 , λd2 , ..., λdM , 0, 0, 0, ..., 0 {z } | L+K ′ ′ ′ ′ ′ ′ ′ s1 : d1 , d2 , ..., dN , 0, 0, ..., 0, dL+1, dL+2 , ..., dL+K | {z } L+K f λs1 + (1 − λ)Pi Ui ≤λ L X i=1 <λ L X i=1 ≤λ L X To sum up, L X + − i=1 i=1 l l X  X Φ(∆di ) − Φ(|∆di |) Φ(di ) + (1 − λ)  Φ(di ) + (1 − λ) l+ X Φ(∆di ) + i=1 L+K X Φ(di ) + (1 − λ)Φ( i=1 =λ  L+K X Φ(∆di ) − i=L+1 − l X i=1  Φ(|∆di |) ∆di ) i=1 Φ(di ) + (1 − λ)Φ(Pi ) i=1 L X  Φ(di ) + (1 − λ)Φ(Pi ) f λs1 + (1 − λ)Pi Ui ≤ λ i=1 = λf (s1 ) + (1 − λ)f (Pi Ui ) , (28) where λ ∈ [0, 1]. Thus, f (s) is convex up to every step change in s. Lemma 1 shows that f (s) is convex up to every step change in s. Next, we will prove the general rainflow convexity by induction method. 26 C. General rainflow cycle life loss convexity We will prove the general rainflow convexity by induction. I). Initial condiction: By Lemma 1, K = 1  f λs1 + (1 − λ)s2 ≤ λf (s1 ) + (1 − λ)f (s2 ) , λ ∈ [0, 1] II). Suppose that, f (s) is convex up to the sum of K step changes (arranged by time index)  f λs1 + (1 − λ)s2 ≤ λf (s1 ) + (1 − λ)f (s2 ) , λ ∈ [0, 1], s1 , s2 ∈ RK Then we prove f (s) is convex up to the sum of K + 1 step changes (see Fig. 5),  f λs1 + (1 − λ)s2 ≤ λf (s1 ) + (1 − λ)f (s2 ) , λ ∈ [0, 1], s1 , s2 ∈ RK+1 The following proposition is needed for the proof. Proposition 7. K i−1 K X X X Xt U t ) , f( Xt U t ) ≥ f ( Xt Ut + (Xi + Xi+1 )Ui + t=1 t=1 (29) t=i+2 In other words, the cycle stress cost will reduce if combining adjacent unit changes. Proof. Rainflow cycle counting algorithm only considers local extreme points. I) If Xi and Xi+1 are the same direction, combining them doesn’t affect the value of local extreme points. Therefore the left side cost equals right side cost. II) If Xi and Xi+1 are different directions, suppose Xi is negative and Xi+1 positive (otherwise the same). Time t = i makes a local minimum point. • Case a: If |Xi+1 | ≤ |Xi |, combining them will raise the value of local minimum point i, thus reducing the depth of cycles which contains i. Therefore, the cost after combining is less than the original cost. • Case b: If |Xi+1 | > |Xi |, combining them will lead to the removal of local minimum point i. In one case, if Xi−1 and Xi are the same direction, time t = i − 1 will make a local minimum point taking the place of time t = i. Therefore, the magnitude of the local minimum point decreases, similar to case a, the total cost after combining is less than the original cost. In the other case, if Xi−1 and Xi are different directions, we lose a full cycle with depth |Xi | fater combining. So the cost after combining is also less than the original. To sum up, the cycle stress cost will reduce if combining adjacent unit changes. 27 Recall the step function decomposition results for s1 , s2 and λs1 + (1 − λ)s2 . s1 = T X Qi Ui , i=1 s2 = T X Pi Ui , i=1 λs1 + (1 − λ)s2 = T X Xi U i , i=1 There are three cases when we go from T = K to T = K + 1, classfied by the value and symbols of XK , XK+1 . Case 1: XK and XK+1 are same direction. Proof. If XK+1 and XK are same direction, we could move XK+1 to the previous step without affecting the total cost f (s1 + (1 − λ)s2 ). Then we prove the K + 1 convexity by applying Proposition 7. f (λs1 + (1 − λ)s2 )  =f λs1 K + (1 − λ)s2 K + XK+1 UK  =f λs1 K + (1 − λ)s2 K + [λQK+1 + (1 − λ)PK+1 ]UK   ≤λf s1 K + QK+1 UK + (1 − λ)f s2 K + PK+1 UK ≤λf (s1 ) + (1 − λ)f (s2 ) (by Lemma 1) Case 2: XK and XK+1 are different directions, with |XK | ≥ |XK+1 |. Proof. In this case, the last step XK+1 could be seperated out from the previous SoC profile. Therefore f (λs1 + (1 − λ)s2 )  =f λs1 + (1 − λ)s2 K + Φ (XK+1 UK+1 ) ≤λf (s1 K ) + (1 − λ)f (s2 K ) + Φ [λQK+1 UK+1 + (1 − λ)PK+1 UK+1 ]     ≤λ f (s1 K ) + Φ(QK+1 UK+1 ) + (1 − λ) f (s2 K ) + Φ(PK+1 UK+1 ) ≤λf (s1 ) + (1 − λ)f (s2 ) Case 3: XK and XK+1 are different directions, with |XK | < |XK+1 |. Proof. In such condition, XK+1 may not easily seperated out from previous SoC. It further contains three cases. • XK−1 and XK are the same direction. We could use the same “trick” in Case 1 to combine step K − 1 and K. Proof is trivial for this case. 28 • XK−1 and XK are diffrent directions, XK and XK+1 form a cycle that is separate from the rest of the signal (eg. it is the deepest cycle). We can separate XK+1 out, and proof will be similar to Case 2. • XK−1 and XK are diffrent directions, XK and XK+1 do not form a separate cycle. This condition is the most complicated case, since it’s hard to move XK+1 to the previous step, or seperate it out. For example, in Fig. 11, δK+1 was counted as a part of the previous charging cycle while ∆K+1 forms a closed full cycle together with XK by Rainflow counting algorithm. Therefore, we need to look into QK , QK+1 , PK , PK+1 in order to show the K + 1 step convexity. Xk-1 Xk Xk+1 …… Fig. 11: XK and XK+1 are different directions, with |XK | < |XK+1 | There are further four sub-cases (Fig. 12), for simplicity we only consider the cost of charging cycles. Showing convexity for each sub-case finishes the overall convexity proof. S1 QK+1 S1 QK QK QK+1 S2 S2 PK+1 PK+1 PK PK a) b) S1 QK+1 QK+1 S1 QK QK S2 PK+1 PK c) S2 PK PK+1 d) Fig. 12: Four cases of QK , QK+1 , PK , PP +1 29 Case a) f (λs1 + (1 − λ)s2 ) K =f λsK 1 + (1 − λ)s2 + XK+1 UK+1  K =f (λsK 1 + (1 − λ)s2 + XK+1 UK ) + Φ(∆K+1 )   K ≤λf sK 1 + QK+1 UK + (1 − λ)f s2 + PK+1 UK  + Φ λ∆Q,K+1 + (1 − λ)∆P,K+1   ≤λ f (sK 1 + QK+1 UK ) + Φ(∆Q,K+1 )   + (1 − λ) f (sK 2 + PK+1 UK ) + Φ(∆P,K+1 ) =λf (s1 ) + (1 − λ)f (s2 ) Case c) f (λs1 + (1 − λ)s2 ) K =f (λsK 1 + (1 − λ)s2 + XK+1 UK+1 ) K =f (λsK 1 + (1 − λ)s2 + XK+1 UK ) + Φ(∆K+1 )   K ≤λf sK 1 + QK+1 UK + (1 − λ)f s2 + PK+1 UK + Φ(∆K+1 )   K ≤λf sK 1 + QK+1 UK + (1 − λ)f s2 + PK+1 UK   + Φ (1 − λ)∆P,K+1 − λQK+1   K ≤λf sK 1 + QK+1 UK + (1 − λ)f s2 + PK+1 UK   + Φ (1 − λ)∆P,K+1 ≤λf (s1 ) + (1 − λ)f (s2 ) Then we try to finish the proof for case b) and d). First, note that b) implies d). To show this, for case P d), define sˆ1 = K+1 t=1 Q̂t Ut as a modified version of s1 , where Q̂t = Qt for t = 1, ..., K − 1, Q̂K = 0, Q̂K+1 = QK + QK+1 . We have f (ŝ1 ) = f (s1 ). We also have f (λŝ1 + (1 − λ)s2 ) ≥ f (λs1 + (1 − λ)s2 ) because of the decreasing signal at K for s2 . Thus, f (λs1 + (1 − λ)s2 ) ≤ f (λŝ1 + (1 − λ)s2 ) i) ≤ λf (sˆ1 ) + (1 − λ)f (s2 ) = λf (s1 ) + (1 − λ)f (s2 ) where i) follows from assuming b) is true and letting ∆P,K+1 = 0 and reversing the label of P and Q. Therefore we only need to prove case b). Case b) contains two different circumstances in terms of PK and PK+1 . We need the following proposition 30 for the two cases. To not use too many negative signs, we denote Q̄t = −Qt , P̄t = −Pt . Proposition 8. Let g be a convex increasing function and given numbers a > b > 0. Then g(a) + g(b) ≥ g(a − δ) + g(b + δ) if δ > 0 and b + δ < a, Proof. Define h(x) = g(x) − g(x − δ) and x, x − δ ≥ 0. We have ′ ′ ′ h (x) = g (x) − g (x − δ) ≥ 0 , because g is convex and x > x − δ. Therefore, h(·) is an increasing function, ∀a > b + δ, h(a) ≥ h(b + δ) g(a) − g(a − δ) ≥ g(b + δ) − g(b) Moving g(b) to the left side and g(a − δ) to the right side of the inequation finish the proof. Case b) 1 PK , PK+1 do not form a cycle that is separate from the rest of S2 . f (λs1 + (1 − λ)s2 ) K =f (λsK 1 + (1 − λ)s2 + XK+1 UK ) + Φ(∆K+1 ) K =f (λsK 1 + (1 − λ)s2 + λQK+1 UK + (1 − λ)PK+1 UK ) + f (λQ̄K UK+1 + (1 − λ)P̄K UK+1 )  K =f λsK 1 + λQ̄K UK − λQ̄K UK + (1 − λ)s2 + λQK+1 UK + (1 − λ)PK+1 UK  + f λQK+1 UK+1 − λQK+1 UK+1 + λQ̄K UK+1 + (1 − λ)P̄K UK+1   λ K (QK+1 UK − Q̄K UK ) =f λsK 1 + λQ̄K UK + (1 − λ) s2 + PK+1 UK + 1−λ   λ + f λQK+1 UK+1 + (1 − λ) P̄K UK+1 + (Q̄K UK+1 − QK+1 UK+1 ) 1−λ ≤λf (sK 1 + Q̄K UK ) + λf (QK+1 UK+1 )   λ (Q̄K − QK+1 ) UK 1−λ   λ P̄K + (Q̄K − QK+1 ) UK+1 1−λ + (1 − λ)f sK 2 + PK+1 − + (1 − λ)f Only considering charging cycles, the first line is the cost of λf (s1 ). Now we show,   λ (Q̄K − QK+1 ) UK 1−λ   λ P̄K + (Q̄K − QK+1 ) UK+1 ≤ f (s2 ) , 1−λ f sK 2 + PK+1 − +f We can write out the cost of charging cycles in s2 as f (s2 ), f (s2 ) = N −1 X Φ(Zi ) + Φ(P̄K ) , i where ZN −1 is the cycle that s2 (K + 1) is assigned to. 31 By assumption that PK and PK+1 do not form a separate cycle, so that ZN −1 ≥ PK+1 . By assumption, λ 1−λ (Q̄K − QK+1 ) > 0. Let δ = λ 1−λ (Q̄K − QK+1 ), and since PK+1 + QK+1 ≥ P̄K + Q̄K in case b), P̄K + δ ≤ PK+1 ≤ ZN −1 . Therefore applying Proposition 8, a = ZN −1 and b = P̄K , δ = λ 1−λ (Q̄K − QK+1 ), we have the desired result. Case b) 2 The other case is that PK , PK+1 form a cycle that is separate from the rest of s2 . Similar as 1 , we need to show f sK 2 + PK+1 − +f P̄K + λ (Q̄K 1−λ   λ (Q̄K − QK+1 ) UK 1−λ   − QK+1 ) UK+1 ≤ f (s2 ) Since PK+1 = P̄K + δP,K+1 , we re-write the above inequation as,   λ (Q̄K − QK+1 ) UK 1−λ   λ (Q̄K − QK+1 ) UK+1 ≤ f (s2 ) , PK+1 − δP,K+1 + 1−λ f sK 2 + P̄K + δP,K+1 − +f Denote δ = δP,K+1 − λ 1−λ (Q̄K − QK+1 ) > 0 f (s2 ) = N −2 X Φ(Zi ) + Φ(ZN −1 ) + Φ(PK+1 ) , i ZN −1 is the deepest charging cycle with ending SoC equals the PK ’s starting SoC, and ZN −1 ≤ PK+1 since PK+1 forms a separate cycle. Applying Proposition 8 by setting a = PK+1 , b = ZN −1 , we have the desired results.
3cs.SY
Aggregative Coarsening for Multilevel Hypergraph Partitioning∗ arXiv:1802.09610v1 [cs.DS] 26 Feb 2018 Ruslan Shaydulin School of Computing Clemson University [email protected] Ilya Safro School of Computing Clemson University [email protected] February 28, 2018 Abstract Algorithms for many hypergraph problems, including partitioning, utilize multilevel frameworks to achieve a good trade-off between the performance and the quality of results. In this paper we introduce two novel aggregative coarsening schemes and incorporate them within state-of-the-art hypergraph partitioner Zoltan. Our coarsening schemes are inspired by the algebraic multigrid and stable matching approaches. We demonstrate the effectiveness of the developed schemes as a part of multilevel hypergraph partitioning framework on a wide range of problems. Reproducibility: [link to code, data and results will be available upon acceptance of the paper] 1 Introduction Hypergraph is a generalization of graph. Whereas in a graph each edge connects only two vertices, in a hypergraph a hyperedge can connect an arbitrary number of vertices. In many cases this allows hypergraph to better capture the underlying structure of the problem. In graph partitioning (GP), the goal is to split the vertex set of a graph into approximately even parts while minimizing the number of the edges in a cut [8]. Hypegraph partitioning problem (HGP) extends it to hypergraphs. Hypergraph partitioning has many applications in fields ranging from VLSI design [28] to parallel matrix multiplication [10] to classification [49] to optimizing distributed systems [31, 13], among others [16, 26]. Hypergraph partitioning is NP-hard [20] and relies on heuristics in practice. Many state-of-theart graph and hypergraph partitioners utilize the multilevel approach [8]. In multilevel methods, the original problem is iteratively coarsened by creating a hierarchy of smaller problems, until it becomes small enough to be solved. Then the coarsest problem is solved and the solution is iteratively projected onto finer levels and refined. Multilevel algorithms for HGP are typically generalizations of multilevel algorithms for graph partitioning, those in turn drawing inspiration from multigrid and other multiscale optimization techniques [6]. Hypergraph partitioning is less well-studied than graph partitioning [13] and there is a relative lack of advanced coarsening schemes compared to GP. Our main contribution are two novel aggregative coarsening schemes for HGP that are inspired by algebraic multigrid and stable matching methods. We expand and build on the insights from an unfinished attempt to build a coarsening scheme for HGP using algebraic multigrid ideas, published in Sandia Labs Summer Reports [7]. At each coarsening level we split the set of vertices into the ∗ This material is based upon work supported by the National Science Foundation under Grant No. 1522751. 1 set of seeds and the set of non-seeds. Each seed becomes a center of an aggregate which will, in turn, create a node at the next, coarser level. Aggregation rules are established to specify which aggregate a non-seed joins. We investigate two approaches to establishing aggregation rules. One approach is algebraic multigrid-based generatlization of an inner-product matching similar to the matching scheme used in Zoltan[11] and PaToH[10]. Another approach is inspired by stable matching. Both approaches take advantage of the algebraic distance on hypergraphs when making coarsening decisions. Algebraic distance is a vertex similarity measure that extends simple measures such as hyperedge weights to better capture the structure of the hypergraphs [45]. While we outperform existing solvers on many instances, it is clear that final performance of HGP solvers heavily depends on the refinement. It is not the goal of this paper to outperform all existing HGP solvers. Instead, we would like to demonstrate that given similar uncoarsening schemes, the proposed coarsening schemes are at least as beneficial as traditional matching-based approaches. 2 Preliminaries A hypergraph is an ordered pair of sets (V, E), where V is the set of vertices and E is the set of hyperedges. Each hyperedge e ∈ E is a nonempty subset of V . In this paper we make use of a graph representation of a hypergraph called ”star expansion”. Star expansion graph (V 0 , E 0 ) of a hypergraph (V, E) is an undirected bipartite graph with hypergraph vertices V on one side, hyperedges E on another and edges connecting hyperedges with the vertices they contain. Concretely, V 0 = V ∪ E, E 0 = {(v, e) | e ∈ E, v ∈ e ⊂ V }. We will be referring to hyperedges as simply edges where it does not cause confusion. Both vertices and edges of the hypergraph are positively weighted. By w(v) and w(e), we denote weighting functions for nodes and edges, where v ∈ V and e ∈ E. For both nodes and edges, a weight of zero practically means that corresponding nodes or edges do not exist (or do not affect the optimization and solution). 2.1 Hypergraph partitioning In hypergraph k-partitioning the goal is to split the set of vertices V into k disjoint subsets (V1 , . . . , Vk ) such that a metric on the cut is minimized subject to imbalance constraint. Here the cut is defined as the set of edges that span more than one partition, i.e., Ecut = {e ∈ E | ∃i 6= j and k 6= l for which vi , vj ∈ e, vi ∈ Vk and vj ∈ Vl }. (1) There are multiple ways to define imbalance constraint. We will follow the definition used by the developers of state-of-the-art hypergraph partitioner Zoltan [15]. The imbalance is therefore defined as the ratio between the total weight of vertices in the largest partition and the average sum of weights of vertices over all partitions. We define the imbalance as P v∈Vmax w(v) imbal = 1 P , (2) v∈V w(v) k  P P where Vmax is the largest partition by weight (i.e., v∈Vmax w(v) = maxi v∈Vi w(v) ). Imbalance constraint imposes a limit on the value of imbal, e.g., imbalance of 5% meansPimbal < 1.05. The cut metric used in this paper is simply total weight of the cut edges, namely, e∈Ecut w(e). 2.2 Multilevel method The main objective of multilevel methods is to construct a hierarchy of problems, each approximating the original problem but with fewer degrees of freedom. This is achieved by introducing a 2 CUT=23 ENT REF INEM CUT=25 VTX=172 EDGES=88 LEVEL 5 CUT=25 VTX=300 EDGES=220 LEVEL 4 ING VTX=412 EDGES=387 LEVEL 3 N RSE CUT=25 VTX=524 EDGES=674 LEVEL 2 CUT=23 VTX=660 EDGES=1200 LEVEL 1 COA INITIAL PARTITIONING Figure 1: Multilevel partitioning of a hypergraph constructed from LPnetlib/lp_scfxm2 matrix from SuiteSparse Matrix Collection [14] using row-net model: each column becomes a vertex and each row becomes a hyperedge. On the left side of the ”V” the hypergraph (represented here as the sparsity pattern of the underlying matrix) is iteratively coarsened. At the bottom of the ”V” the hypergraph is partitioned into two parts. This is represented by coloring the columns corresponding to vertices from one part into blue and another into red. On the right side of the ”V” the hypergraph is uncoarsened and the partitioning is refined. chain of successive restrictions of the problem domain into low-dimensional or smaller-size domains (coarsening) and solving the coarse problems in them using local processing (uncoarsening) [36]. The coarsening-uncoarsening pipeline is often referred to as V-cycle. The multilevel frameworks combine solutions obtained by the local processing at different levels of coarseness into one global solution. Typically, for combinatorial optimization problems, the multilevel algorithms are suboptimal metaheuristics [47] that incorporate other methods as refinement at all levels of coarseness. Except partitioning, examples can be found in linear ordering [25, 38, 39, 41], clustering and community detection [37, 5], and traveling salesman problems [48]. In (H)GP, these algorithms were initially introduced to speed up existing algorithms [4] but later proved to improve the quality of the solution [23, 29]. A multilevel hypergraph partitioning of a hypergraph constructed from LPnetlib/lp_scfxm2 matrix is presented in Figure 1. During the coarsening stage, for a hypergraph H = (V, E) a hierarchy of decreasing in size hypergraphs H 0 = (V 0 , E 0 ), . . . , H l = (V l , E l ) is constructed. Here l denotes the number of levels in multilevel hierarchy. During the initial partitioning stage, the coarsest hypergraph H l = (V l , E l ) is partitioned. Finally, during the refinement stage the solution from coarser levels is projected onto finer ones and refined, typically using a local search heuristic. 3 2.3 Algebraic distance Algebraic distance for hypergraphs is a relaxation-based vertex similarity measure [45]. It extends the algebraic distance for graphs [12, 36, 27] by taking into account the non-pairwise nature of the connections between vertices in a hypergraph. Algebraic distance improves on simpler similarity metrics, such as hyperedge weights, by incorporating information about more distant vertex neighborhood, thus better capturing vertex’s place in the global structure of the hypergraph. Algebraic distance is inspired by iterative techniques for solving linear systems. An iterative method can be represented in a standard form: x(i) = Hx(i−1) i = 1, 2, 3 . . . (3) where H is the iteration matrix. Similarly, algebraic distances are computed at each coarsening level using the following stationary iterative relaxation. Let A ∈ R|E|×|V | be hypergraph incidence matrix, i.e., Aij = 1 if the hyperedge i contains the vertex j. Let S v ∈ R|V |×|V | and S h ∈ R|E|×|E| be diagonal matrices such that v Sjj = w(vj ) and Siih = w(hi ) , |hi | (4) where |hi | denotes the cardinality of the ith hyperedge. Denote   0 AT S h (5) W = AS v 0 P and let D be the diagonal matrix with elements Djj = i Wij . Then the iterative step is defined as x(i) = i 1 h r+l ωD−1 W x(i−1) + (1 − ω)x(i−1) − 1 {z } r−l | 2(r − l) (6) x∗(i−1) where 1 is the vector of all ones, and r and l are the maximum and the minimum of the elements in x∗ (i−1) , respectively. We can simplify the update formula as x(i) = α(i−1) Hx(i−1) + β (i−1) 1, where H = ωD−1 W + (1 − ω)I, α(i−1) = 1 , r−l and β (i−1) = − (7) r+l . 2(r − l) (8) (0) (0) The iterative scheme is performed multiple times for different random initial values x0 , . . . xR (called test vectors in algebraic multigrid [32]) . Then, the algebraic distance between vertices i and j is set to be the maximum over R random initializationsm namely, algdistij = maxR |xi − xj |. For the detailed discussion of algebraic distances on hypergraphs and for convergence analysis of the described iterative scheme the reader is referred to [45]. 3 Related work Practical approaches to solving HGP typically rely on heuristics. Many have been developed over the years, but the most common approach is multilevel. It is implemented in many state-of-the-art hypergraph partitioners including but not limited to Zoltan [15], hMetis [28], KaHyPar [44] and PaToH [10]. In this section we will briefly describe the multilevel approach used by those state-ofthe-art partitioners and discuss existing advanced coarsening schemes for hypergraphs. For a more detailed review of hypergraph partitioning, the reader is referred to [2, 3, 35, 46]. 4 Densely connected cluster v3 "bridge" w=1 v4 v1 w=2 w=1 v2 v5 Densely connected cluster Figure 2: An example demonstrating the limitations of schemes based on edge weights. Here the ”bridge” edge (green) connecting v1 and v2 has weight two and all other edges (red) have unitary weights. The best cut is achieved by cutting the green ”bridge” between v1 and v2 and therefore matching v1 with one of the vertices on the left (v3,v4 or v5). However, matching schemes based on edge weights can match v1 with v2 instead and increase the cut. 3.1 Brief overview of multilevel hypergraph partitioning The HGP multilevel frameworks consist of three stages: coarsening, initial partitioning and uncoarsening with refinement. During the coarsening, the hypergraph is approximated via a series of decreasing in size hypergraphs. At each coarsening step, the next hypergraph is formed by matching a group of vertices into one, such that a set of vertices at level k becomes one vertex at level k + 1. The decision as to which vertices to match is made based on similarity metrics such as inner product (i.e., the total weight of hyperedges connecting two vertices). However, simple metrics often result in a decision that ignores the structure of the hypergraph. Consider the example in Figure 2. It shows two densely connected clusters, separated by a ”bridge” between vertices v1 and v2. Schemes that use naive similarity metrics like hyperedge weights might match v1 with v2, whereas an algorithm that considers larger neighborhoods to minimize a cut would prefer to match v1 with either v3, v4 or v5 instead. This example demonstrates the challenges of capturing the hypergraph structure by using only local information. In the refinement stage all the aforementioned state-of-the-art partitioners use a combination of Fiduccia-Mattheyses [18] or Kernighan-Lin [30] with the exception of KaHyPar, which uses a novel localized adaptive local search heuristic [1]. 3.2 Aggregative coarsening The standard approach to coarsening used in most state-of-the-art hypergraph partitioners is matching-based. Originally, this meant that at each level pairs of adjacent vertices are selected to become one vertex at the next level. This technique has later been extended to include non-pairwise matchings (i.e., more than two fine vertices can form a coarse vertex). One of the alternative approaches is aggregative coarsening inspired by algebraic multigrid. In aggregative coarsening, the set of vertices V is separated into disjoint sets of seeds and non-seeds, namely, C and F such that F ∪ C = V . The non-seed vertices aggregate themselves around the seeds (hence the name aggregative coarsening). The aggregation can be strict (F -vertices are not split) and weighted (F -vertices can be split between multiple seeds with vertex weight conservation). At the refinement stage, the partitioning decision (i.e., partition assignment) is interpolated from each seed to the non-seeds in its aggregate. This separation between seed and non-seeds helps to introduce additional guarantees. For example, on graphs Safro et al. [40] introduce the notion of strong connection and guarantee that each vertex in the graph is strongly connected to at least one seed. The weighted aggregation was initially introduced for several cut problems on graphs [43, 36, 41] including GP [42]. There was an unfinished attempt to extend this approach to hypergraphs. Buluç and Boman [7] 5 describe several challenges in applying aggregative coarsening to hypergraphs, as well as propose two very similar coarsening schemes, strict and weighted. In this paper, we limit our discussion to strict aggregation. In aggregative coarsening, two main questions have to be addressed: seed selection and aggregation of non-seeds around seeds. In the process of seed selection, Buluç and Boman [7] follow Safro et al. [40] in using the concept of future volumes. Future volume is a measure of how many vertices a seed can incorporate into itself (in other words, how large a vertex can grow). They propose computing future volumes on the star expansion of the hypergraph (thus limiting the complexity), then iteratively adding vertices with high future volumes to the set of seeds C until |C| reaches a certain threshold. Aggregation rules are established on the star expansion of the hypergraph. Seeds and non-seeds select a constant number of adjacent hyperedges to ”invade” based on the exclusive coarseness (a metric indicating how many seeds an hyperedge contains). 4 Two Aggregation Algorithms Our algorithm combines the ideas of aggregative coarsening described in [40] and [7] with the algebraic distance [36, 45]. Aggregative coarsening is a two-step process, so we have to address both the seed selection and the rules of aggregation. At each coarsening level, a set of seeds is selected and each seed is assigned a set of non-seeds to form a cluster. The cluster at a given coarsening level becomes one vertex at the next level. Both introduced schemes utilize algebraic distances by augmenting hyperedge weights with algebraic weights. We define the algebraic weight of hyperedge e as an inverse of the algebraic distance between two farthest apart vertices in e, i.e., ρ(e) = 1 / max algdistij . (9) i,j∈e 4.1 Seed selection For the seed selection we utilize two core concepts: future volumes and strong connection. The main goal is to construct a set of seeds C such that every vertex in the graph is strongly connected to C. We define strong connection as follows: the vertex i ∈ F is strongly connected to C if the sum of algebraic weights of the edges connecting it to C is more than a certain fraction of the total algebraic weight of incident edges: ⇐⇒ i is strongly connected to C Σj∈C ρ(eij ) > Q, Σj ρ(eij ) (10) where Q is a parameter (in our experiments Q = 0.5). The future volume of a vertex is a measure of how large an aggregate seeded by it can grow. Intuitively, we want to add the vertices with very high volume (or the ones that might become centers of the aggregates of very high volume) to the set of seeds. Future volume of a vertex is defined as follows (note that here we use the hyperedge weights w and not the algebraic weights ρ): f v(i) = w(i) + Σj w(j) w(eij ) . Σk w(ejk ) (11) We begin the construction of set C by computing future volumes for all vertices. Then, we initialize C with vertices with large future volumes (if mean future volume is mf v and standard deviation of the distribution of future volumes is σf v , then i ∈ C ⇐⇒ f v(i) > mf v + 2σf v ) 6 Listing 1: Seed selection f o r i i n V: f v [ i ] = w [ i ] + Σjw [ j ] ( w [ eij ] / Σkw [ ejk ] ) f o r i i n V: i f f v [ i ] > mean ( f v ) + 2 ∗ s t d e v ( f v ) : C. i n s e r t ( i ) else : F . remove ( i ) for i in F: f v [ i ] = w [ i ] + Σj∈F w [ j ] ( w [ eij ] / Σk∈F w [ ejk ] ) for i in s o r t i n d i c e s ( fv ) : i f Σj∈C w [ eij ] / Σjw [ eij ] < Q: C. i n s e r t ( i ) F . remove ( i ) Listing 2: Inner-product aggregation for i in F: j = argmax u∈C ipm ( v , u ) Cj . i n s e r t ( i ) and initialize F with all other vertices, such that F ∪ C = V . After that the future volumes of vertices in F are recomputed, only taking into account connections with other vertices in F (i.e., in Equation (11) assume w(eij ) = 0 if j ∈ C or i ∈ C). Finally, vertices in F are visited in order of decreasing future volume and added to the set C if they are not strongly connected to C. Note that at the end of this process each vertex in V is strongly connected to the set C and F ∪ C = V . Pseudocode for this procedure is presented in Listing 1. 4.2 Aggregation We investigate two approaches to establishing the rules of aggregation. First approach is a scheme similar to inner-product matching used in Zoltan[11] and PaToH[10] but applied in algebraic multigrid setting. Second approach consists of computing a stable assignment [22] between vertices of C and F . Both approaches take advantage of algebraic distances as a similarity measure when establishing aggregation rules. Inner-product aggregation proceeds by visiting the non-seed vertices in the random order. For each unmatched vertex v ∈ F , a neighboring seed u ∈ C with the highest inner product is selected and v is added to the cluster Cu seeded by it. The inner product is defined as the total algebraic weight of the edges connecting v with the seed u. Concretely, ipm(v, u) = Σe|v,u∈e ρ(e). See Listing 2 for pseudocode. We experimented with visiting the non-seeds in order of decreasing future volume and with using connectivity to make decisions when establishing aggregation rules. These approaches are more computationally intensive and do not produce better results (see Appendix B for the results). Stable assignment aggregation begins by constructing preference lists. Each seed orders adjacent non-seeds in the order of decreasing total algebraic weight of the hyperedges connecting them (and vice versa): prefi (j) = Σρ(eij ). Then the stable assignment is computed using an algorithm similar to the classical one described in [19]. Each seed in C proposes to non-seeds in its preference list. If the non-seed does not have a better offer, it tentatively accepts the proposal and is put 7 Listing 3: Stable matching aggregation def propose ( i ) : for j in p r e f l i s t [ i ] : i f w a i t l i s t [ i ] . size > threshold : return i f p r o p o s [ j ] == −1: // j h o l d s no p r o p o s a l propos [ j ] = i w a i t l i s t [ i ] . push back ( j ) continue i f i i s p r e f e r a b l e to propos [ j ] : r e j e c t e d = propos [ j ] propos [ j ] = i w a i t l i s t [ i ] . push back ( j ) propose ( r e j e c t e d ) // Step 1 : compute p r e f e r e n c e l i s t s for i in F: for j in seed neighbors [ i ] : p r e f [ j ] = Σρ(eij ) // p r e f i s a h a s h t a b l e f o r j in s o r t b y v a l u e ( p r e f ) . keys ( ) : p r e f l i s t [ i ] . push back ( j ) f o r i in C: for j in non seed neighbors [ i ] : p r e f [ j ] = Σρ(eij ) f o r j in s o r t b y v a l u e ( p r e f ) . keys ( ) : p r e f l i s t [ i ] . push back ( j ) // Step 2 : compute s t a b l e a s s i g n m e n t f o r i in C: propose ( i ) on the waitlist. If that non-seed later receives a better offer (i.e., an offer from a seed that ranks higher on its preference list), it rejects the current offer and the rejected seed proposes to the next candidate on its preference list. To discourage the creation of very large clusters, we limit the size of waitlist for a seed to the maximal vertex weight on a given coarsening level times three plus ten: len(waitlist) = 3 × max vtx wgt + 10. Procedure terminates when each non-seed has been assigned to a waitlist or a seed has been rejected by every non-seed. At this point each seed forms a cluster with all vertices on its waitlist, subject to size constraint (we guarantee that no cluster can be larger than total vertex weight over the number of parts). The fact that we use a classical problem as a subproblem in our heuristic allows us to potentially leverage the previous work in optimizing and parallelizing stable assignment, such as [33],[34] and [21]. The pseudocode is presented in Listing 3. 5 Results We implemented all algorithms described in this paper within Zoltan [15] package of the Trilinos Project [24]. Zoltan is an open-source toolkit of parallel combinatorial scientific computing algorithms [15]. It includes a hypergraph partitioning algorithm PHG (Parallel HyperGraph partitioner) and interfaces to PaToH and hMetis2. We added our new coarsening schemes and left other phases 8 of the multilevel framework unchanged. Our implementation, data, and full results are available at [link will be provided upon acceptance of the paper]. The hypergraphs in our benchmark are generated from a selection of matrices using the rownet model. In the row-net model, each column of the matrix represents a vertex, each row represents an edge and a vertex j belongs to the hyperedge i if there is a non-zero element at the intersection of j-th column and i-th row, i.e., Aij = 6 0. All matrices (more than 300) were obtained from SuiteSparse Matrix Collection [14] that includes other collections. For each combination of hypergraph/algorithm/set of parameters, we executed 20 experiments. We compare our algorithm with four state-of-the-art partitioners: hMetis2 [28], PaToH v3.2 [9], Zoltan PHG [15] and Zoltan-AlgD [45]. PaToH is used as a plug-in for Zoltan with default parameters described in Zoltan’s User Guide [17]. hMetis2 is used in k-way mode with all parameters set to default: greedy first-choice scheme for coarsening, random k-way refinement, and min-cut objective function. The reason we run hMetis in k-way mode is the way hMetis specifies imbalance constraint. In recursive bisection mode, the imbalance constraint is applied at each bisection step, therefore relaxing the constraint as the number of parts increases. We found it almost impossible to compare hMetis in recursive bisection mode fairly (i.e., with the same imbalance) with other partitioners. Both Zoltan and PaToH are used in serial mode. Optimizing the constants in the running time of the proposed algorithms is beyond the scope of this paper. Currently, for the existing unoptimized implementation the running time of other state-of-the-art hypergraph partitioners is not improved except for those that generate less levels in the hierarchy. However, we must point out that our algorithm utilizes the building blocks and ideas of algebraic multigrid, which makes it possible to improve the runtime drastically by leveraging a plethora of existing research in optimizing and parallelizing algebraic multigrid solvers. The situation with implementation of elements of stable matching is similar [34]. In Figures 3 and 4 the results are presented graphically. In the main body of the paper, we only plot the results for 10% imbalance. For results for other imbalance factors please refer to Appendix A. In Figure 3, we show the results of inner-product algebraic multirgid aggregation coarsening. In Figure 4, the stable matching aggregation is demonstrated. We use frequency histograms to present the distribution of cut differences between our methods and other state-of-the-art hypergraph partitioners. The value being represented (see horizontal axes) is the ratio ζ= cut obtained using another partitioner . cut obtained using our method (12) Each bin corresponds to a range of the ratios (for example, the middle bin corresponds to the differences of less than ±5% and the rightmost to the improvements of > 20%). Each rectangle corresponds to a partitioner: blue corresponds to PaToH, red corresponds to hMetis2, green corresponds to Zoltan PHG and cyan corresponds to Zoltan-AlgD. For the full results, please refer to http://bit.ly/aggregative2018 The results demonstrate that given the same refinement, the proposed schemes are at least as effective as traditional matching-based schemes, while outperforming them on many instances. Both proposed coarsening schemes almost equally succeed in improving the quality of solvers. Further investigation of the difference between them is a very interesting future research direction, because, in fact, they represent very different algorithms. Since Zoltan utilizes recursive bisectioning scheme, we can see that improvements decrease as number of parts increases. This can be attributed to refinement becoming more and more important as number of parts increases. 9 225 200 175 150 125 100 75 50 25 0 Number of parts: 2 Imbalance: 3% Number of parts: 4 Imbalance: 3% Number of parts: 8 Imbalance: 3% Number of parts: 16 Imbalance: 3% Number of parts: 32 Imbalance: 3% Number of parts: 64 Imbalance: 3% Number of parts: 128 Imbalance: 3% Number of parts: 256 Imbalance: 3% Number of parts: 512 Imbalance: 3% Number of parts: 1024 Imbalance: 3% 200 150 100 50 0 250 200 150 100 50 0 250 200 150 100 50 0 250 200 150 100 50 0 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 Figure 3: Histogram of ζ for coarsening using algebraic multigrid inner-product aggregation. Blue rectangle corresponds to PaToH, red to hMetis2, green to Zoltan PHG and cyan to Zoltan-AlgD 10 Number of parts: 2 Imbalance: 3% Number of parts: 4 Imbalance: 3% Number of parts: 8 Imbalance: 3% Number of parts: 16 Imbalance: 3% Number of parts: 32 Imbalance: 3% Number of parts: 64 Imbalance: 3% Number of parts: 128 Imbalance: 3% Number of parts: 256 Imbalance: 3% Number of parts: 512 Imbalance: 3% Number of parts: 1024 Imbalance: 3% 200 150 100 50 0 200 150 100 50 0 250 200 150 100 50 0 250 200 150 100 50 0 250 200 150 100 50 0 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 Figure 4: Histogram of ζ for coarsening using stable matching aggregation. Blue rectangle corresponds to PaToH, red to hMetis2, green to Zoltan PHG and cyan to Zoltan-AlgD 11 6 Conclusion We have presented two novel aggregative coarsening schemes for hypergraphs. The introduced schemes incorporate ideas of algebraic multigrid and stable matching into multilevel hypergraph partitioning framework. We have implemented the described algorithms within state-of-the-art hypergraph partitioner Zoltan and compared their performance against a number of other state-ofthe-art partitioners on a large benchmark. The experimental results demonstrate that given the same uncoarsening, the proposed coarsening schemes perform at least as well as traditional matching-based schemes, while outperforming them on many instances. This suggests that algebraic-multigrid-inspired coarsening schemes have great potential when combined with appropriate refinement. 12 A Results for additional imbalance factors Figures 5, 6, 7 and 8 present additional experimental results comparing the proposed schemes with state-of-the-art hypergraph partitioners. Figures 5 and 6 present the results for imbalance factor 3% and Figures 7 and 8 for imbalance factor 5%. B Interesting observation about algorithmic variations and additional parameters for algebraic multigrid inner-product aggregation We explore two additional approaches to inner-product aggregation (see Listing 2). First, instead of visiting the vertices in random order, we investigate visiting them in the order of decreasing future volume. Second, instead of using the inner-product as a metric when selecting a seed to join, we explore using the connectivity metric: each non-seed v a neighboring seed u with the highest connectivity is selected and v is added to the cluster Cu seeded by it. The connectivity is defined as Nv,Cu /Wv,Cu , where Nv,Cu = Σe|Cu ∩e6=∅,v∈e ρ(e) is the total algebraic weight of the edges connecting v with the vertices in the cluster Cu , and Wv,Cu = Σi∈Cu w(i) + w(v) is the total weight of the vertices in the potential cluster [10]. The results of combinations of these two variations are presented in Figures 9, 10 and 11. All include imbalance factors of 10%. Surprisingly for us, we observed relatively insignificant differences in the results of these two (on the first glance) very important variations. The variation related to the strength of connectivity that depends on the capacity of already chosen cluster directly affects the size of the coarse aggregate. Too big aggregates can result in additional work (and thus computational time) of the refinement and getting trapped in false local attraction basins with KL/FM refinement. However, we observe that the entire framework resolves this issue without any problems. 13 175 150 125 100 75 50 25 0 200 175 150 125 100 75 50 25 0 Number of parts: 2 Imbalance: 3% Number of parts: 4 Imbalance: 3% Number of parts: 8 Imbalance: 3% Number of parts: 16 Imbalance: 3% Number of parts: 32 Imbalance: 3% Number of parts: 64 Imbalance: 3% Number of parts: 128 Imbalance: 3% Number of parts: 256 Imbalance: 3% Number of parts: 512 Imbalance: 3% Number of parts: 1024 Imbalance: 3% 200 150 100 50 0 200 150 100 50 0 200 150 100 50 0 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 Figure 5: Histogram of ζ for coarsening using inner-product aggregation with imbalance factor 3%. Blue rectangle corresponds to PaToH, red to hMetis2, green to Zoltan PHG and cyan to Zoltan-AlgD 14 175 150 125 100 75 50 25 0 200 175 150 125 100 75 50 25 0 Number of parts: 2 Imbalance: 3% Number of parts: 4 Imbalance: 3% Number of parts: 8 Imbalance: 3% Number of parts: 16 Imbalance: 3% Number of parts: 32 Imbalance: 3% Number of parts: 64 Imbalance: 3% Number of parts: 128 Imbalance: 3% Number of parts: 256 Imbalance: 3% Number of parts: 512 Imbalance: 3% Number of parts: 1024 Imbalance: 3% 200 150 100 50 0 200 150 100 50 0 200 150 100 50 0 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 Figure 6: Histogram of ζ for coarsening using stable matching aggregation with imbalance factor 3%. Blue rectangle corresponds to PaToH, red to hMetis2, green to Zoltan PHG and cyan to Zoltan-AlgD 15 175 150 125 100 75 50 25 0 200 175 150 125 100 75 50 25 0 Number of parts: 2 Imbalance: 5% Number of parts: 4 Imbalance: 5% Number of parts: 8 Imbalance: 5% Number of parts: 16 Imbalance: 5% Number of parts: 32 Imbalance: 5% Number of parts: 64 Imbalance: 5% Number of parts: 128 Imbalance: 5% Number of parts: 256 Imbalance: 5% Number of parts: 512 Imbalance: 5% Number of parts: 1024 Imbalance: 5% 200 150 100 50 0 250 200 150 100 50 0 200 150 100 50 0 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 Figure 7: Histogram of ζ for coarsening using inner-product aggregation with imbalance factor 5%. Blue rectangle corresponds to PaToH, red to hMetis2, green to Zoltan PHG and cyan to Zoltan-AlgD 16 175 150 125 100 75 50 25 0 200 175 150 125 100 75 50 25 0 Number of parts: 2 Imbalance: 5% Number of parts: 4 Imbalance: 5% Number of parts: 8 Imbalance: 5% Number of parts: 16 Imbalance: 5% Number of parts: 32 Imbalance: 5% Number of parts: 64 Imbalance: 5% Number of parts: 128 Imbalance: 5% Number of parts: 256 Imbalance: 5% Number of parts: 512 Imbalance: 5% Number of parts: 1024 Imbalance: 5% 200 150 100 50 0 250 200 150 100 50 0 200 150 100 50 0 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 Figure 8: Histogram of ζ for coarsening using stable matching aggregation with imbalance factor 5%. Blue rectangle corresponds to PaToH, red to hMetis2, green to Zoltan PHG and cyan to Zoltan-AlgD 17 Number of parts: 2 Imbalance: 10% Number of parts: 4 Imbalance: 10% Number of parts: 8 Imbalance: 10% Number of parts: 16 Imbalance: 10% Number of parts: 32 Imbalance: 10% Number of parts: 64 Imbalance: 10% Number of parts: 128 Imbalance: 10% Number of parts: 256 Imbalance: 10% Number of parts: 512 Imbalance: 10% Number of parts: 1024 Imbalance: 10% 175 150 125 100 75 50 25 0 175 150 125 100 75 50 25 0 200 150 100 50 0 200 150 100 50 0 200 150 100 50 0 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 Figure 9: Histogram of ζ for coarsening using inner-product aggregation with additional parameters. Vertices are visited in the order of decreasing future volumes, inner-product metric is used. Blue rectangle corresponds to PaToH, red to hMetis2, green to Zoltan PHG and cyan to Zoltan-AlgD 18 200 175 150 125 100 75 50 25 0 200 175 150 125 100 75 50 25 0 Number of parts: 2 Imbalance: 10% Number of parts: 4 Imbalance: 10% Number of parts: 8 Imbalance: 10% Number of parts: 16 Imbalance: 10% Number of parts: 32 Imbalance: 10% Number of parts: 64 Imbalance: 10% Number of parts: 128 Imbalance: 10% Number of parts: 256 Imbalance: 10% Number of parts: 512 Imbalance: 10% Number of parts: 1024 Imbalance: 10% 200 150 100 50 0 250 200 150 100 50 0 200 150 100 50 0 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 Figure 10: Histogram of ζ for coarsening using inner-product aggregation with additional parameters. Vertices are visited in the order of decreasing future volumes, connectivity metric is used. Blue rectangle corresponds to PaToH, red to hMetis2, green to Zoltan PHG and cyan to Zoltan-AlgD 19 200 175 150 125 100 75 50 25 0 200 175 150 125 100 75 50 25 0 Number of parts: 2 Imbalance: 10% Number of parts: 4 Imbalance: 10% Number of parts: 8 Imbalance: 10% Number of parts: 16 Imbalance: 10% Number of parts: 32 Imbalance: 10% Number of parts: 64 Imbalance: 10% Number of parts: 128 Imbalance: 10% Number of parts: 256 Imbalance: 10% Number of parts: 512 Imbalance: 10% Number of parts: 1024 Imbalance: 10% 200 150 100 50 0 250 200 150 100 50 0 200 150 100 50 0 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 < 0.8 0.8..0.9 0.9..0.95 0.95..1.05 1.05..1.1 1.1..1.2 >1.2 Figure 11: Histogram of ζ for coarsening using inner-product aggregation with additional parameters. Vertices are visited in random order, connectivity metric is used. Blue rectangle corresponds to PaToH, red to hMetis2, green to Zoltan PHG and cyan to Zoltan-AlgD 20 References [1] Yaroslav Akhremtsev, Tobias Heuer, Peter Sanders, and Sebastian Schlag. Engineering a direct k -way hypergraph partitioning algorithm. In 19th Workshop on Algorithm Engineering and Experiments, (ALENEX 2017), pages 28–42, 2017. [2] Charles J Alpert and Andrew B Kahng. Recent directions in netlist partitioning: a survey. Integration, the VLSI journal, 19(1-2):1–81, 1995. [3] David A Bader, Henning Meyerhenke, Peter Sanders, and Dorothea Wagner. Graph partitioning and graph clustering: 10th dimacs implementation challenge, vol. 588. American Mathematical Society, 7:210–223, 2013. [4] Stephen T Barnard and Horst D Simon. Fast multilevel implementation of recursive spectral bisection for partitioning unstructured problems. Concurrency and computation: Practice and Experience, 6(2):101–117, 1994. [5] V. D. Blondel, J.-L. Guillaume, R. Lambiotte, and R. Lefebvre. Fast unfolding of communities in large networks. Journal of Statistical Mechanics: Theory and Experiment, 10:P10008, 2008. [6] Achi Brandt and Dorit Ron. Multigrid solvers and multilevel optimization strategies. In Multilevel optimization in VLSICAD, pages 1–69. Springer, 2003. [7] Aydin Buluç and Erik G Boman. Towards scalable parallel hypergraph partitioning. CSRI Summer Proceedings 2008, page 109, 2008. [8] Aydin Buluc, Henning Meyerhenke, Ilya Safro, Peter Sanders, and Christian Schulz. Recent advances in graph partitioning. In Algorithm Engineering: Selected Results and Surveys, volume 9220, pages 117–158. Springer, 2016. [9] Ümit Çatalyürek and Cevdet Aykanat. Patoh (partitioning tool for hypergraphs). In Encyclopedia of Parallel Computing, pages 1479–1487. Springer, 2011. [10] Umit V Catalyurek and Cevdet Aykanat. Hypergraph-partitioning-based decomposition for parallel sparse-matrix vector multiplication. IEEE Trans. Parallel Distrib. Syst., 10(7):673–693, 1999. [11] Umit V Catalyurek, Erik G Boman, Karen D Devine, Doruk Bozdağ, Robert T Heaphy, and Lee Ann Riesen. A repartitioning hypergraph model for dynamic load balancing. J. Parallel Distrib. Comput., 69(8):711–724, 2009. [12] Jie Chen and Ilya Safro. Algebraic distance on graphs. SIAM J. Sci. Comput., 33(6):3468–3490, 2011. [13] Carlo Curino, Evan Jones, Yang Zhang, and Sam Madden. Schism: a workload-driven approach to database replication and partitioning. Proceedings of the VLDB Endowment, 3(1-2):48–57, 2010. [14] Timothy A Davis and Yifan Hu. The university of florida sparse matrix collection. ACM Transactions on Mathematical Software (TOMS), 38(1):1, 2011. [15] Karen D Devine, Erik G Boman, Robert T Heaphy, Rob H Bisseling, and Umit V Catalyurek. Parallel hypergraph partitioning for scientific computing. In Parallel and Distributed Processing Symposium, 2006. IPDPS 2006. 20th International, pages 10–pp. IEEE, 2006. 21 [16] Karen D Devine, Erik G Boman, Robert T Heaphy, Bruce A Hendrickson, James D Teresco, Jamal Faik, Joseph E Flaherty, and Luis G Gervasio. New challenges in dynamic load balancing. Applied Numerical Mathematics, 52(2-3):133–152, 2005. [17] Karen D Devine, Vitus Leung, Erik G Boman, Sivasankaran Rajamanickam, Lee Ann Riesen, and Umit Catalyurek. Zoltan users guide, version 3.8.(2014), 2014. URL: http://www.cs. sandia.gov/zoltan/ug_html/ug_alg_patoh.html. [18] Charles M Fiduccia and Robert M Mattheyses. A linear-time heuristic for improving network partitions. In Papers on Twenty-five years of electronic design automation, pages 241–247. ACM, 1988. [19] David Gale and Lloyd S Shapley. College admissions and the stability of marriage. The American Mathematical Monthly, 69(1):9–15, 1962. [20] Michael R Garey and David S Johnson. Computers and intractability, volume 29. New York, 2002. [21] Giorgos Georgiadis and Marina Papatriantafilou. Overlays with preferences: Distributed, adaptive approximation algorithms for matching with preference lists. Algorithms, 6(4):824–856, 2013. [22] Dan Gusfield and Robert W Irving. The stable marriage problem: structure and algorithms. MIT press, 1989. [23] Bruce Hendrickson and Robert W Leland. A multi-level algorithm for partitioning graphs. SC, 95(28), 1995. [24] Michael A Heroux, Roscoe A Bartlett, Vicki E Howle, Robert J Hoekstra, Jonathan J Hu, Tamara G Kolda, Richard B Lehoucq, Kevin R Long, Roger P Pawlowski, Eric T Phipps, et al. An overview of the trilinos project. ACM Trans. Math. Software, 31(3):397–423, 2005. [25] Y. F. Hu and J. A. Scott. A multilevel algorithm for wavefront reduction. SIAM J. Sci. Comput., 23(4):1352–1375, 2001. doi:http://dx.doi.org/10.1137/S1064827500377733. [26] Ruoming Jin, Yang Xiang, David Fuhry, and Feodor F. Dragan. Overlapping matrix pattern visualization: A hypergraph approach. Data Mining, IEEE International Conference on, 0:313–322, 2008. doi:http://doi.ieeecomputersociety.org/10.1109/ICDM.2008.102. [27] Emmanuel John and Ilya Safro. Single-and multi-level network sparsification by algebraic distance. Journal of Complex Networks, 5(3):352–388, 2016. [28] George Karypis, Rajat Aggarwal, Vipin Kumar, and Shashi Shekhar. Multilevel hypergraph partitioning: applications in vlsi domain. IEEE Trans. Very Large Scale Integr. (VLSI) Syst., 7(1):69–79, 1999. [29] George Karypis and Vipin Kumar. A fast and high quality multilevel scheme for partitioning irregular graphs. SIAM J. Sci. Comput., 20(1):359–392, 1998. [30] Brian W Kernighan and Shen Lin. An efficient heuristic procedure for partitioning graphs. Bell Syst. Tech. J., 49(2):291–307, 1970. 22 [31] K Ashwin Kumar, Abdul Quamar, Amol Deshpande, and Samir Khuller. Sword: workloadaware data placement and replica selection for cloud data management systems. The VLDB Journal, 23(6):845–870, 2014. [32] Oren E Livne and Achi Brandt. Lean algebraic multigrid (lamg): Fast graph laplacian linear solver. SIAM Journal on Scientific Computing, 34(4):B499–B522, 2012. [33] Enyue Lu and SQ Zheng. A parallel iterative improvement stable matching algorithm. In International Conference on High-Performance Computing, pages 55–65. Springer, 2003. [34] Fredrik Manne, Md. Naim, Hkon Lerring, and Mahantesh Halappanavar. On Stable Marriages and Greedy Matchings, pages 92–101. URL: http://epubs.siam.org/doi/ abs/10.1137/1.9781611974690.ch10, arXiv:http://epubs.siam.org/doi/pdf/10.1137/ 1.9781611974690.ch10, doi:10.1137/1.9781611974690.ch10. [35] David A Papa and Igor L Markov. Hypergraph partitioning and clustering., 2007. [36] Dorit Ron, Ilya Safro, and Achi Brandt. Relaxation-based coarsening and multiscale graph organization. Multiscale Modeling & Simulation, 9(1):407–423, 2011. [37] Randolf Rotta and Andreas Noack. Multilevel local search algorithms for modularity clustering. Journal of Experimental Algorithmics (JEA), 16:2–3, 2011. [38] I. Safro, D. Ron, and A. Brandt. Graph minimum linear arrangement by multilevel weighted edge contractions. Journal of Algorithms, 60(1):24–41, 2006. [39] I. Safro, D. Ron, and A. Brandt. Multilevel algorithm for the minimum 2-sum problem. Journal of Graph Algorithms and Applications, 10(2):237–258, 2006. [40] Ilya Safro, Dorit Ron, and Achi Brandt. Graph minimum linear arrangement by multilevel weighted edge contractions. Journal of Algorithms, 60(1):24–41, 2006. [41] Ilya Safro, Dorit Ron, and Achi Brandt. Multilevel algorithms for linear ordering problems. ACM Journal of Experimental Algorithmics, 13, 2008. [42] Ilya Safro, Peter Sanders, and Christian Schulz. Advanced coarsening schemes for graph partitioning. ACM Journal of Experimental Algorithmics (JEA), 19:2–2, 2015. [43] Ilya Safro and Boris Temkin. Multiscale approach for the network compression-friendly ordering. J. Discrete Algorithms, 9(2):190–202, 2011. [44] Sebastian Schlag, Vitali Henne, Tobias Heuer, Henning Meyerhenke, Peter Sanders, and Christian Schulz. k -way hypergraph partitioning via n-level recursive bisection. In 18th Workshop on Algorithm Engineering and Experiments, (ALENEX 2016), pages 53–67, 2016. [45] Ruslan Shaydulin, Jie Chen, and Ilya Safro. Relaxation-based coarsening for multilevel hypergraph partitioning. arXiv preprint arXiv:1710.06552, 2017. [46] Aleksandar Trifunovic. Parallel algorithms for hypergraph partitioning. PhD thesis, University of London, 2006. [47] C. Walshaw. Multilevel refinement for combinatorial optimisation problems. Annals Oper. Res., 131:325–372, 2004. 23 [48] Chris Walshaw. A multilevel approach to the travelling salesman problem. Operations Research, 50(5):862–877, 2002. [49] Dengyong Zhou, Jiayuan Huang, and Bernhard Schölkopf. Learning with hypergraphs: Clustering, classification, and embedding. In NIPS, volume 19, pages 1633–1640, 2006. 24
8cs.DS
LETTERPLACE AND CO-LETTERPLACE IDEALS OF POSETS arXiv:1501.04523v3 [math.AC] 24 Jul 2016 GUNNAR FLØYSTAD, BJØRN MØLLER GREVE, AND JÜRGEN HERZOG Abstract. To a natural number n, a finite partially ordered set P and a poset ideal J in the poset Hom(P, [n]) of isotonian maps from P to the chain on n elements, we associate two monomial ideals, the letterplace ideal L(n, P ; J ) and the co-letterplace ideal L(P, n; J ). These ideals give a unified understanding of a number of ideals studied in monomial ideal theory in recent years. By cutting down these ideals by regular sequences of variable differences we obtain: multichain ideals and generalized Hibi type ideals, initial ideals of determinantal ideals, strongly stable ideals, d-partite d-uniform ideals, Ferrers ideals, edge ideals of cointerval d-hypergraphs, and uniform face ideals. Introduction Monomial ideals arise as initial ideals of polynomial ideals. For natural classes of polynomial ideals, like determinantal ideals of generic matrices, of generic symmetric matrices, and of Pfaffians of skew-symmetric matrices, their Gröbner bases and initial ideals [36], [26], [5] have been computed. In full generality one has the class of Borel-fixed ideals (in characteristic 0 these are the strongly stable ideals), which arise as initial ideals of any polynomial ideal after a generic change of coordinates. This is a very significant class in computational algebra [2], [19]. Monomial ideals have also grown into an active research area in itself. In particular one is interested in their resolution, and in properties like shellability (implying Cohen-Macaulayness), and linear quotients (implying linear resolution). Classes that in particular have been studied are generalized Hibi ideals [14], d-uniform hypergraph ideals [33], Ferrers ideals [7], [33], uniform face ideals [6] and [20], and cointerval d-hypergraph ideals [10]. This article presents a unifying framwork for these seemingly varied classes of monomial ideals by introducing the classes of letterplace and co-letterplace ideals associated to a a natural number n, a finite partially ordered set P , and a poset ideal J in the poset Hom(P, [n]) of isotone maps P → [n], where [n] is the chain on n elements. Many basic results of the abovementioned articles follow from the general results we give here. As it turns out, most of the abovementioned classes of ideals are not letterplace and co-letterplace ideals. Rather they derive from these ideals by dividing out by a regular sequence of variable differences. The main technical results of the present paper is to give criteria for when such a sequence of variable differences is regular, Theorems 2.1, 2.2, 5.6, and 5.12. Thus we get classes of ideals, with the same homological properties as letterplace and co-letterplace ideals. Also we show Date: July 26, 2016. 2000 Mathematics Subject Classification. Primary: 13F20, 05E40; Secondary: 06A11. Key words and phrases. Monomial ideal, letterplace ideal, co-letterplace ideal, Alexander dual, poset, regular sequence, determinantal ideal, strongly stable ideal, Ferrers ideal, hypergraph ideal, face ideal, multichain ideal, generalized Hibi ideal. 1 2 GUNNAR FLØYSTAD, BJØRN MØLLER GREVE, AND JÜRGEN HERZOG that letterplace and co-letterplace ideals in themselves may not be derived from other monomial ideals by cutting down by a regular sequence of varibale differences, Lemma 2.8. These ideals therefore have the flavor of beeing ”free” objects in the class of monomial ideals. We see this as accounting for many of their nice properties, see [8] and [16]. In [14] V.Ene, F.Mohammadi, and the third author introduced the classes of generalized Hibi ideals, associated to natural numbers s ≤ n and a finite partially ordered set P , and investigated these ideals. This article both generalizes this, and provides a hightened understanding of these ideals. There is an extra parameter s involved here, but we show that these ideals can be understood as the letterplace ideal associated to the natural number n and the partially ordered set P ×[n−s+1], after we divide this ideal out by a regular sequence of variable differences. The n’th letterplace ideal associated to n and P is the monomial ideal, written L(n, P ), generated by all monomials x1,p1 x2,p2 · · · xn,pn where p1 ≤ p2 ≤ · · · ≤ pn is a multichain in P . These ideals L(n, P ) were shown in [14] to be Cohen-Macaulay (CM) ideals (actually shellable) of codimension equal to the cardinality of P . These ideals are all generated in degree n. If P is the antichain on d elements, then L(n, P ) is a complete intersection, and defines a quotient ring of mulitplicity nd . If P is the chain on d elements, then L(n, P ) is the initial ideal of the ideal of maximal  minors of a generic n×(n+d−1) matrix. The quotient ring has n+d−1 multiplicity . These are respectively the maximal and minimal multiplicity d of CM ideals of codimension d generated in degree n. As P varies among posets of cardinality d we therefore get ideals interpolating between these extremal cases. Its Alexander dual, the n’th co-letterplace ideal associated to n and P , written L(P, n), is the ideal generated by all monomials Y xp,ip p∈P where p < q in P implies ip ≤ iq . This is an ideal with linear quotients [14], and therefore linear resolution. The Cohen-Macaulay ideals L(n, P ) are all generated in a single degree n. To obtain CM ideals with varying degrees on generators, we now add an extra layer of structure. Given a poset ideal J in the poset Hom(P, [n]) of isotone maps P → [n], we get first more generally the co-letterplace subideal L(P, n; J ) ⊆ L(P, n). This ideal also has linear quotients, Theorem 5.1. When P is a chain on d elements, all strongly stable ideals generated in degree d are regular quotients of these coletterplace ideals, Example 6.1. As P varies we therefore get a substantial generalization of the class of strongly stable ideals generated in a single degree, and with much the same nice homological behaviour. The Alexander dual of L(P, n; J ) we denote by L(n, P ; J ), and is explicitly described in Theorem 5.9. Since the former ideal has linear resolutions, by [11] the latter ideal is Cohen-Macaulay and it contains the letterplace ideal L(n, P ). Even when P is the chain on d elements, all h-vectors of embedding dimension d of graded Cohen-Macaulay ideals (in a polynomial ring), may be realized for such ideals L(P, n; J ). This is therefore a very large class of Cohen-Macaulay ideals. LETTERPLACE AND CO-LETTERPLACE IDEALS OF POSETS 3 Dividing out a monomial ring S/I by an difference of variables xa −xb , corresponds to setting the variables xa and xb equal in I to obtain a new monomial ideal J. In this article we therefore naturally introduce the notion of separation of variables, Definition 2.7, of a monomial ideals: I is obtained from J by a separation of variables, if xa − xb is a regular element for S/I. Surprisingly this simple and natural notion does not seem to have been a topic of study in itself before for monomial ideals, but see [15]. In particular the behaviour of Alexander duality when dividing out by such a regular sequence of variable differences, is given in Proposition 7.2, and Theorems 2.10 and 7.3. After the appearance of this article as a preprint, a number of further investigations has been done on letterplace and co-letterplace ideals. The article [27] studies more generally ideals L(P, Q) where both P and Q are finite partially orded sets, and [23] investigates Alexander duality of such ideals. In [9] resolutions of letterplace ideals L(n, P ) are studied, in particular their multigraded Betti numbers are computed. [8] gives explicitly the linear resolutions of co-letterplace ideal L(P, n; J ), thereby generalizing the Eliahou-Kervaire resolution for strongly stable ideals generated in a single degree. It computes the canonical modules of the Stanley-Reisner rings of letterplace ideals L(n, P ; J ). They have the surprising property of being multigraded ideals in these Stanley-Reisner rings. A related and remarkable consequence is that the simplicial complexes associated to letterplace ideals L(n, P ; J ) are triangulations of balls. Their boundaries are therefore triangulations of spheres, and this class of sphere triangulations comprehensively generalizes the class of Bier spheres [3]. The notion of separation is further investigated in [24] and in [1], which shows that separation corresponds to a deformation of the monomial ideal, and identifies the deformation directions in the cotangent cohomology it corresponds to. In [16] deformations of letterplace ideals L(2, P ) are computed when the Hasse diagram has the structure of a rooted tree. The situation is remarkably nice. These ideals are unobstruced, and the full deformation family can be explicitly computed. This deformed family has a polynomial ring as a base ring, and the ideal of the full family is a rigid ideal. In some simple example cases these are the ideals of 2-minors of a generic 2 × n matrix, and the ideal of Pfaffians of a generic skew-symmetric 5 × 5 matrix. The organization of the paper is as follows. In Section 1 we define ideals L(Q, P ) associated to pairs of posets Q and P . In particular for the totally ordered poset [n] on n elements, we introduce the letterplace ideals L([n], P ) and co-letterplace ideals L(P, [n]). We investigate how they behave under Alexander duality. In Section 2 we study when a sequence of variable differences is regular for letterplace and coletterplace ideals. We also define the notion of separation. Section 3 gives classes of ideals, including generalized Hibi ideals and initial ideals of determinantal ideals, which are quotients of letterplace ideals by a regular sequence. Section 4 describes in more detail the generators and facets of various letterplace and co-letterplace ideals. Section 5 considers poset ideals J in Hom(P, [n]) and the associated co-letterplace ideal L(P, n; J ). We show it has linear resolution, and compute its Alexander dual L(n, P ; J ). Section 6 gives classes of ideals which are quotients of co-letterplace ideals by a regular sequence. This includes strongly stable ideals, d-uniform dpartite hypergraph ideals, Ferrers ideals, and uniform face ideals. The last sections 7 and 8 contain proofs of basic results in this paper on when sequences of variable 4 GUNNAR FLØYSTAD, BJØRN MØLLER GREVE, AND JÜRGEN HERZOG differences are regular, and how Alexander duality behaves when cutting down by such a regular sequence. 1. Letterplace ideals and their Alexander duals If P is a partially ordered set (poset), a poset ideal J ⊆ P is a subset of P such that q ∈ J and p ∈ P with p ≤ q, implies p ∈ J. The term order ideal is also much used in the literature for this notion. If S is a subset of P , the poset ideal generated by S is the set of all elements p ∈ P such that p ≤ s for some s ∈ S. 1.1. Isotone maps. Let P and Q be two partially ordered sets. A map φ : Q → P is isotone or order preserving, if q ≤ q ′ implies φ(q) ≤ φ(q ′ ). The set of isotone maps is denoted Hom(Q, P ). It is actually again a partially ordered set with φ ≤ ψ if φ(q) ≤ ψ(q) for all q ∈ Q. The following will be useful. Lemma 1.1. If P is a finite partially ordered set with a unique maximal or minimal element, then an isotone map φ : P → P has a fix point. Proof. We show this in case P has a unique minimal element p = p0 . Then p1 = φ(p0 ) is ≥ p0 . If p1 > p0 , let p2 = φ(p1 ) ≥ φ(p0 ) = p1 . If p2 > p1 we continue. Since P is finite, at some stage pn = pn−1 and since pn = φ(pn−1 ), the element pn−1 is a fix point.  1.2. Alexander duality. Let k be a field. If R is a set, denote by k[xR ] the polynomial ring in the variables xr where r ranges over R. If A is a subset of R denote by mA the monomial Πa∈A xa . Let I be a squarefree monomial ideal in a polynomial ring k[xR ], i.e. its generators are monomials of the type mA . It corresponds to a simplicial complex ∆ on the vertex set R, consisting of all S ⊆ R, called faces of ∆, such that mS 6∈ I. The Alexander dual J of I, written J = I A , may be defined in different ways. Three definitions are the following. 1. The Alexander dual J is the monomial ideal in k[xR ] whose monomials are those with nontrivial common divisor with every monomial in I. 2. The Alexander dual J is the ideal generated by all monomials mS where the S are complements in R of faces of ∆. 3. If I = ∩ri=1 pr is a decomposition into prime monomial ideals pi where pi is generated by the variables xa as a ranges over the subset Ai of R, then J is the ideal generated by the monomials mAi , i = 1, . . . , r. (If the decomposition is a minimal primary decomposition, the mAi is a minimal generating set of J.) 1.3. Ideals from Hom-posets. To an isotone map φ : Q → P we associate its graph Γφ ⊆ Q × P where Γφ = {(q, φ(q)) | q ∈ Q}. As φ ranges over Hom(Q, P ), the monomials mΓφ generate a monomial ideal in k[xQ×P ] which we denote by L(Q, P ). More generally, if S is a subset of Hom(Q, P ) we get ideals L(S) generated by mΓφ where φ ∈ S. If R is a subset of the product Q × P , we denote by Rτ the subset of P × Q we get by switching coordinates. As L(Q, P ) is an ideal in k[xQ×P ], we may also consider it as an ideal in k[xP ×Q ]. In cases where we need to be precise about this, we write it then as L(Q, P )τ . LETTERPLACE AND CO-LETTERPLACE IDEALS OF POSETS 5 If Q is the totally ordered poset on n elements Q = [n] = {1 < 2 < · · · < n}, we call L([n], P ), written simply L(n, P ), the n’th letterplace ideal of P . It is generated by the monomials x1,p1 x2,p2 · · · xn,pn with p1 ≤ p2 ≤ · · · ≤ pn . This is precisely the same ideal as the multichain ideal In,n (P ) defined in [14] (but with indices switched). The ideal L(P, [n]), written simply L(P, n), is the n’th coletterplace ideal of P . In [14] it is denoted Hn (P ) and is called a generalized Hibi type ideal. For some background on the letterplace notion, see Remark 1.7 at the end of this section. The following is Theorem 1.1(a) in [14], suitably reformulated. Since it is a very basic fact, we include a proof of it. Proposition 1.2. The ideals L(n, P ) and L(P, n)τ are Alexander dual in k[x[n]×P ]. Proof. Let L(n, P )A be the Alexander dual of L(n, P ). First we show L(P, n) ⊆ L(n, P )A . This is equivalent to: For any φ ∈ Hom([n], P ) and any ψ ∈ Hom(P, [n]), the graphs Γφ and Γψ τ intersect in [n] × P . Let i be a fix point for ψ ◦ φ. Then φ ψ i −→ p −→ i and so (i, p) is in both Γφ and Γψ τ . Secondly, given a squarefree monomial m in L(n, P )A we show that it is divisible by a monomial in L(P, n). This will show that L(n, P )A ⊆ L(P, n) and force equality here. So let the monomial m correspond to the subset F of P × [n]. It intersects all graphs Γφτ where φ ∈ Hom([n], P ). We must show it contains a graph Γψ where ψ ∈ Hom(P, [n]). Given F , let Jn = P and let Jn−1 be the poset ideal of P generated by all p ∈ Jn = P such that (p, n) 6∈ F . Inductively let Ji−1 be the poset ideal in Ji generated by all p in Ji with (p, i) not in F . Claim 1. J0 = ∅. Proof. Otherwise let p ∈ J0 . Then there is p ≤ p1 with p1 ∈ J1 and (p1 , 1) 6∈ F . Since p1 ∈ J1 there is p1 ≤ p2 with p2 ∈ J2 such that (p2 , 2) 6∈ F . We may continue this and get a chain p1 ≤ p2 ≤ · · · ≤ pn with (pi , i) not in F . But this contradicts F intersecting all graphs Γφ where φ ∈ Hom([n], P ).  We thus get a filtration of poset ideals ∅ = J0 ⊆ J1 ⊆ · · · ⊆ Jn−1 ⊆ Jn = P. This filtration corresponds to an isotone map ψ : P → [n]. Claim 2. Γψ is a subset of F . Proof. Let (p, i) ∈ Γψ. Then p ∈ Ji \Ji−1 and so p 6∈ Ji−1 . Thus (p, i) ∈ F .  Remark 1.3. The case n = 2 was shown in [21] where the ideal HP generated by Q Q p∈J xp q∈P \J yq as J varies over the poset ideals in P , was shown to be Alexander dual to the ideal generated by xp yq where p ≤ q. In [21] it is also shown that the L(2, P ) are precisely the edge ideals of bipartite Cohen-Macaulay graphs. Remark 1.4. That L(m, n) and L(n, m) are Alexander dual is Proposition 4.5 of [17]. There the elements of these ideals are interpreted as paths in a m × n matrix with generic linear forms (xij ) and the generators of the ideals are the products of the variables in these paths. 6 GUNNAR FLØYSTAD, BJØRN MØLLER GREVE, AND JÜRGEN HERZOG 1.4. Alexander dual of L(Q, P ). In general L(Q, P ) and L(P, Q) are not Alexander dual. This is easily checked if for instance Q and P are antichains of sizes ≥ 2. However we have the following. Proposition 1.5. Suppose Q has a unique maximal or minimal element. The least degree of a generator of the Alexander dual L(Q, P )A and of L(P, Q) are both d = |P | and the degree d parts of these ideals are equal. In particular, since L(P, Q) is generated in this degree d, it is contained in L(Q, P )A . Note that the above is equivalent to say that the minimal primes of L(Q, P ) of height ≤ |P | are precisely the pψ = ({xψ(p),p p ∈ P }), where ψ ∈ Hom(P, Q). Proof. We show that: 1. L(Q, P ) ⊂ pψ for all ψ ∈ Hom(P, Q). 2. pψ is a minimal prime of L(Q, P ). 3. Any minimal prime p of L(Q, P ) is p = pψ for some ψ. This will prove the proposition. 1. Given φ ∈ Hom(Q, P ) and ψ ∈ Hom(P, Q). We have to show that mφ = Q q∈Q xq,φ(q) ∈ pψ . By Lemma 1.1 ψ ◦ φ has a fix point q, and let p = φ(q). Then ψ(p) = q. Therefore, xq,p is a factor of mφ and a generator of pψ . This implies that mφ ∈ pψ . 2. Next we show that pψ is a minimal prime ideal of L(Q, P ). Suppose this is not the case. Then we may skip one of its generators, say xψ(p),p , to obtain the prime ideal p ⊂ pψ with L(Q, P ) ⊂ p. Let φ ∈ Hom(Q, P ) be the constant isotone map Q with φ(q) = p for all q ∈ Q. Then mφ = q∈Q xq,p ∈ L(Q, P ). Since no factor of mφ is divisible by a generator of p, it follows that L(Q, P ) is not contained in p, a contradiction. 3. Now let p be any minimal prime ideal of L(Q, P ). Since L(Q, P ) ⊂ p it follows as in the previous paragraph that for each p ∈ P there exists an element ψ(p) ∈ Q such that xψ(p),p ∈ p. This show that height L(Q, P ) = |P |. Assume now that height p = |P |. Then p = ({xψ(p),p p ∈ P }). It remains to be shown that ψ P → Q is isotone. Suppose this is not the case. Then there exist p, p′ ∈ P such that p < p′ ′ and ψ(p) 6≤ ψ(p′ ). Let φ : Q → P the map with φ(q) = p ifQq ≤ ψ(p′ ) and Q φ(q) = p ′ if q 6≤ ψ(p ). Then φ is isotone, and it follow that mφ = q≤ψ(p′ ) xq,p q6≤ψ(p′ ) xq,p′ does not belong to p, a contradiction.  Remark 1.6. In [23] they determine precisely when L(P, Q) and L(Q, P ) are Alexander dual, for finite posets P and Q. Remark 1.7. Let X = {x1 , . . . , xn } be an alphabet. The letterplace correspondence is a way to encode non-commutative monomials xi1 xi2 · · · xir in khXi by commutative polynomials xi1 ,1 · · · xir ,r in k[X × N]. It is due to G.-C. Rota who again attributed it to a physicist, apparently Feynman. D. Buchsbaum has a survey article [4] on letterplace algebra, and the use of these technique in the resolution of Weyl modules. Recently [29] use letterplace ideals in computations of non-commutative Gröbner bases. LETTERPLACE AND CO-LETTERPLACE IDEALS OF POSETS 7 2. Quotients of letterplace ideals A chain c in the product of two posets Q × P is said to be left strict if for two elements in the chain, (q, p) < (q ′ , p′ ) implies q < q ′ . Analogously we define right strict. The chain is bistrict if it is both left and right strict. An isotone map of posets φ : Q × P → R is said to have left strict chain fibers if all its fibers φ−1 (r) are left strict chains in Q × P op . Here P op is the opposite poset of P , i.e. p ≤op p′ in P op iff p′ ≤ p in P . The map φ gives a map of linear spaces φ1 : hxQ×P i → hxR i (the brackets here mean the k-vector space spanned by the set of variables). The map φ1 induces a map of polynomial rings φ̂ : k[xQ×P ] → k[xR ]. In the following B denotes a basis for the kernel of the map of degree one forms φ1 , consisting of differences xq,p − xq′ ,p′ with φ1 (q, p) = φ1 (q ′ , p′ ). Theorem 2.1. Given an isotone map φ : [n] × P → R which has left strict chain fibers. Then the basis B is a regular sequence of the ring k[x[n]×P ]/L(n, P ). Theorem 2.2. Given an isotone map ψ : P × [n] → R which has left strict chain fibers. Then the basis B is a regular sequence of the ring k[xP ×[n] ]/L(P, n). We shall prove these in Section 8. For now we note that they require distinct proofs, with the proof of Theorem 2.2 the most delicate. In the setting of Theorem 2.1, we let Lφ (n, P ) be the ideal generated by the image of the n’th letterplace ideal L(n, P ) in k[xR ], and in the setting of Theorem 2.2, we let Lψ (P, n) be the ideal generated by the image of the n’th co-letterplace ideal L(P, n) in k[xR ], Note that Lφ (n, P ) is a squarefree ideal iff in the above the fibers φ−1 (r) are bistrict chains in [n] × P op , and similarly Lψ (P, n) is a squarefree ideal iff the fibers ψ −1 (r) are bistrict chains in P × [n]op . We get the following consequence of the above Theorems 2.1 and 2.2. Corollary 2.3. The quotient rings k[x[n]×P ]/L(n, P ) and k[xR ]/Lφ (n, P ) have the same graded Betti numbers. Similarly for k[xP ×[n] ]/L(P, n) and k[xR ]/Lψ (P, n). Proof. We prove the first statement. Let Lim φ (n, P ) be the image of L(n, P ) in k[xim φ ], and S = R\im φ. Thus k[xim φ ]/Lim φ (n, P ) is a quotient of k[x[n]×P ]/L(n, P ) by a regular sequence, and k[xR ]/Lφ (n, P ) is k[xim φ ]/Lim φ (n, P ) ⊗k k[xS ].  For the poset P consider the multichain ideal I(n, P ) in k[xP ] generated by monomials xp1 xp2 · · · xpn where p1 ≤ p2 ≤ · · · ≤ pn is a multichain of length n in P . The quotient k[xP ]/I(n, P ) is clearly artinian since xnp is in I(n, P ) for every p ∈ P . Corollary 2.4. The ring k[xP ]/I(n, P ) is an artinian reduction of k[x[n]×P ]/L(n, P ) by a regular sequence. In particular L(n, P ) is a Cohen-Macaulay ideal. It is Gorenstein iff P is an antichain. Proof. The first part is because the map [n] × P → P fulfills the criteria of Theorem 2.1 above. An artinian ideal is Gorenstein iff it is a complete intersection. Since all xnp are in I(n, P ), this holds iff there are no more generators of I(n, P ), which means precisely that P is an antichain.  This recovers part of Theorem 2.4 of [14] showing that L(n, P ) is Cohen-Macaulay. The Gorenstein case above is Corollary 2.5 of [14]. 8 GUNNAR FLØYSTAD, BJØRN MØLLER GREVE, AND JÜRGEN HERZOG Remark 2.5. The multigraded Betti numbers of the resolution of L(n, P ) is described in [9], as well as other properties of this resolution. Recall that a squarefree monomial ideal is bi-Cohen-Macaulay, [17], iff both the ideal and its Alexander dual are Cohen-Macaulay ideals. Corollary 2.6. L(n, P ) is bi-Cohen-Macaulay iff P is totally ordered. Proof. Since L(n, P ) is Cohen-Macaulay, it is bi-Cohen-Macaulay iff it has a linear resolution, [12]. Equivalently I(n, P ) in k[xP ] has a linear resolution. But since I(n, P ) gives an artinian quotient ring, this is equivalent to I(n, P ) being the n’th power of the maximal ideal. In this case every monomial xpn−1 xq is in I(n, P ) and so every pair p, q in P is comparable. Thus P is totally ordered. Conversely, if P is totally ordered, then clearly I(n, P ) is the n’th power of the maximal ideal.  Definition 2.7. Let R′ → R be a surjective map of sets with R′ of cardinality one more than R, and let r1 6= r2 in R′ map to the same element in R. Let I be a monomial ideal in k[xR ]. A monomial ideal J in k[xR′ ] is a separation of I if i) I is the image of J by the natural map k[xR′ ] → k[xR ], ii) xr1 occurs in some minimal generator of J and similarly for xr2 , and iii) xr1 −xr2 is a regular element of k[xR′ ]/J. The ideal I is separable if it has some separation J. Otherwise it is inseparable. If J is obtained from I by a succession of separations, we also call J a separation of I. We say that I is a regular quotient by variable differences of J, or simply a regular quotient of J. If J is inseparable, then J is a separated model for I. This notion also occurs in [15] where inseparable monomial ideals are called maximal. The canonical example of a separation of a non-squarefree monomial ideal is of course its polarization. Lemma 2.8. Let I be an ideal generated by a subset of the generators of L(Q, P ). Then I is inseparable. Proof. Let R′ → Q × P be a surjective map with R′ of cardinality one more than Q × P . Suppose there is a monomial ideal J in k[xR′ ] which is a separation of I. Let a and b in R′ both map to (q, p). For any other element of R′ , we identify it with its image in Q × P . Suppose m = xa m0 in J maps to a generator xq,p m0 of L(Q, P ), and m′ = xb m1 maps to another generator of L(Q, P ). Then m0 does not contain a variable xq,p′ with first index q, and similarly for m1 . Note that the least common multiple m01 of m0 and m1 does not contain a variable with first index q. Hence m01 is not in L(Q, P ) and so m01 is not in J. But (xb − xa )m01 is in J since xb m01 and xa m01 are in J. By the regularity of xb − xa this implies m01 in J, a contradiction.  As we shall see, many naturally occurring monomial ideals are separable and have separated models which are letterplace ideals L(n, P ) or are generated by a subset of the generators of co-letterplace ideals L(P, n). Remark 2.9. In [15, Section 2] the first author shows that the separated models of n−1 the squarefree power (x1 , . . . , xn )sq are in bijection with trees on n vertices. We now consider the Alexander dual of Lφ (n, P ). LETTERPLACE AND CO-LETTERPLACE IDEALS OF POSETS 9 Theorem 2.10. Let φ : [n] × P → R be an isotone map such that the fibers φ−1 (r) τ are bistrict chains in [n]×P op . Then the ideals Lφ (n, P ) and Lφ (P, n) are Alexander dual. We prove this in Section 7. Remark 2.11. The Alexander dual of the squarefree power in Remark 2.9 is the squarefree power (x1 , . . . , xn )2sq . Separations of this ideal are studied by H.Lohne, [30]. In particular he describes how the separated models are also in bijection with trees on n vertices. 3. Examples of regular quotients of letterplace ideals The ideals which originally inspired this paper are the multichain ideals of [14]. 3.1. Multichain ideals. Let Pm be P × [m] where m ≥ 1. Consider the surjective map [s] × Pm → P × [m + s − 1] (i, p, a) 7→ (p, a + i − 1). This map has left strict chain fibers. The image of L(s, Pm ) in k[xP ×[m+s−1] ] is exactly the multichain ideal Im+s−1,s (P ) of [14]. This is the ideal generated by monomials xp1 ,i1 xp2 ,i2 · · · xps ,is where p1 ≤ · · · ≤ ps , 1 ≤ i1 < · · · < is ≤ m + s − 1. By Theorem 2.1 it is obtained from the s’th letterplace ideal L(s, Pm ) = L(s, P ×[m]) by cutting down by a regular sequence. Thus we recover the fact, [14, Thm. 2.4], that these ideals are Cohen-Macaulay. The Alexander dual of L(s, Pm ) is L(Pm , s). An element r of Hom(P × [m], [s]) may be represented by sequences 1 ≤ rp1 ≤ · · · ≤ rpm ≤ s such that for each p ≤ q we have rpj ≤ rqj . The element r gives the monomial generator in L(Pm , s) mr = m YY xp,i,rpi . p∈P i=1 By Theorem 2.10, the Alexander dual of the multichain ideal Im+s−1,s (P ) is then generated by m YY xp,tpi , 1 ≤ tp1 < tp2 < · · · < tpm ≤ m + s − 1 p∈P i=1 (where tpi = rpi + i − 1) such that p < q implies tpj ≤ tqj . These are exactly the generators of the squarefree power ideal L(P, s + m − 1)hmi . This recovers Theorem 1.1(b) in [14]. 10 GUNNAR FLØYSTAD, BJØRN MØLLER GREVE, AND JÜRGEN HERZOG 3.2. Initial ideals of determinantal ideals: two-minors. We now let P = [n] and s = 2. Let e, f ≥ 0. There are isotone maps φe,f [2] × [n] × [m] = [2] × Pm −→ [n + e] × [m + f ] (1, a, b) 7→ (a, b) (2, a, b) 7→ (a + e, b + f ) These maps have left strict chain fibers and we get the ideal Lφe,f (2, Pm ). • When (e, f ) = (0, 1) we are in the situation of the previous Subsection 3.1, and we get the multichain ideal Im+1,2 ([n]). • When (e, f ) = (1, 0) we get the multichain ideal In+1,2 ([m]). • When (e, f ) = (1, 1) we get the ideal in k[x[n+1]×[m+1] ] generated by monomials xi,j xi′ ,j ′ where i < i′ and j < j ′ . This is precisely the initial ideal I of the ideal of two-minors of a generic (n + 1) × (m + 1) matrix of linear forms (xi,j ) with respect to a suitable monomial order with respect to a diagonal term order, [36]. In particular all of Im+1,2 ([n]), In+1,2 ([m]) and I have the same graded Betti numbers and the same h-vector, the same as L(2, [n] × [m]). Particularly noteworthy is the following: The ideal of two-minors of the generic (n + 1) × (m + 1) matrix is the homogeneous ideal of the Segre product of Pm × Pn in Pnm+n+m . By J.Kleppe [28], any deformation of a generic determinantal ideal is still a generic determinantal ideal. So if this Segre embedding is obtained from a variety X in a higher dimensional projective space, by cutting it down by a regular sequence of linear forms, this X must be a cone over the Segre embedding. Thus we cannot “lift” the ideal of two minors to an ideal in a polynomial ring with more variables than (n + 1)(m + 1). However its initial ideal may be separated to the monomial ideal L(2, [n] × [m]) with 2nm variables. Varying e and f , we get a whole family of ideals Lφe,f (2, [n] × [m]) with the same Betti numbers as the initial ideal of the ideal of two-minors. When e = 0 = f we get an artinian reduction, not of the initial ideal of the ideal of two-minors, but of its separated model L(2, [n] × [m]). When e ≥ n + 1 and f ≥ m + 1, the map φe,f is injective and Lφe,f (2, [n] ×[m]) is isomorphic to the ideal generated by L(2, [n] ×[m]) in a polynomial ring with more variables. 3.3. Initial ideals of determinantal ideals: higher minors. We may generalize to arbitrary s and two weakly increasing sequences e = (e1 = 0, e2 , . . . , es ), f = (f1 = 0, f2 , . . . , fs ). We get isotone maps [s] × [n] × [m] −→ [n + es ] × [m + fs ] (i, a, b) 7→ (a + ei , b + fi ) • When e = (0, . . . , 0) and f = (0, 1, . . . , s − 1) we get the multichain ideal Im+s−1,s ([n]). • When e = (0, 1, . . . , s − 1) and f = (0, . . . , 0) we get the multichain ideal In+s−1,s ([m]). LETTERPLACE AND CO-LETTERPLACE IDEALS OF POSETS 11 • When e = (0, 1, . . . , s−1) and f = (0, 1, . . . , s−1) we get the ideal I generated by monomials xi1 ,j1 xi2 ,j2 · · · xis ,js where i1 < · · · < is and j1 < · · · < js . This is the initial ideal I of the ideal of s-minors of a general (n + s − 1) × (m + s − 1) matrix (xi,j ) with respect to a diagonal term order, [36]. We thus see that this initial ideal I has a lifting to L(s, [n] × [m]) with snm variables, in contrast to the (n + s − 1)(m + s − 1) variables which are involved in the ideal of s-minors. We get maximal minors when, say m = 1. Then the initial ideal I involves sn variables. So in this case the initial ideal I involves the same number of variables as L(s, [n]), i.e. the generators of these two ideals are in one to one correspondence by a bijection of variables. 3.4. Initial ideal of the ideal of two-minors of a symmetric matrix. Let P = Hom([2], [n]). The elements here may be identified with pairs (i1 , i2 ) where 1 ≤ i1 ≤ i2 ≤ n. There is an isotone map φ : [2] × Hom([2], [n]) → Hom([2], [n + 1]) (1, i1 , i1 ) 7→ (i1 , i2 ) (2, i1 , i2 ) 7→ (i1 + 1, i2 + 1). This map has left strict chain fibers, and we get a regular quotient ideal Lφ (2, Hom([2], [n])), generated by xi1 ,i2 xj1 ,j2 where i1 < j1 and i2 < j2 (and i1 ≤ i2 and j1 ≤ j2 ). This is the initial ideal of the ideal generated by 2-minors of a symmetric matrix of size n + 1, see [5, Sec.5]. 3.5. Ladder determinantal ideals. Given a poset ideal J in [m] × [n]. This gives the letterplace ideal L(2, J ). There is a map φ : [2] × J → [m + 1] × [n + 1] (1, a, b) 7→ (a, b) (2, a, b) 7→ (a + 1, b + 1) The poset ideal J is sometimes also called a one-sided ladder in [m] × [n]. The ideal Lφ (2, J ) is the initial ideal of the ladder determinantal ideal associated to J , [34, Cor.3.4]. Hence we recover the fact that these are Cohen-Macaulay, [26, Thm.4.9]. 3.6. Pfaffians. Let T (n) be the poset in [n] × [n] consists of all (a, b) with a + b ≤ n + 1. Then Lφ (2, T (n)) is the initial ideal of the ideal of 4-Pfaffians of a skew-symmetric matrix of rank n + 3, [26, Sec.5]. It is also the initial ideal of the Grassmannian G(2, n + 3), [13, Ch.6]. The poset T (2) is the V poset. The letterplace ideals L(n, T (2)) are the initial ideals of the 2n-Pfaffians of a generic (2n + 1) × (2n + 1) skew-symmetric matrix, by [26, Thm.5.1]. The variables Xi,2n+2−i in loc.cit. correspond to our variables xi,(1,1) for i = 1, . . . , n, the variables Xi+1,2n+2−i correspond to the xi,(2,1) and the Xi,2n+1−i to the xi,(1,2) . 12 GUNNAR FLØYSTAD, BJØRN MØLLER GREVE, AND JÜRGEN HERZOG 4. Description of facets and ideals As we have seen Hom(Q, P ) is itself a poset. The product P × Q makes the category of posets Poset into a symmetric monoidal category, and with this internal Hom, it is a symmetric monoidal closed category [31, VII.7], i.e. there is an adjunction of functors −×P Poset ⇄ Poset Hom(P,−) so that Hom(Q × P, R) ∼ = Hom(Q, Hom(P, R)). This is an isomorphism of posets. Note that the distributive lattice D(P ) associated to P , consisting of the poset ideals in P , identifies with Hom(P, [2]). In particular [n + 1] identifies as Hom([n], [2]). The adjunction above gives isomorphisms between the following posets. 1. Hom([m], Hom(P, [n + 1])) 2. Hom([m] × P, [n + 1]) = Hom([m] × P, Hom([n], [2])) 3. Hom([m] × P × [n], [2]) 4. Hom([n] × P, Hom([m], [2])) = Hom([n] × P, [m + 1]) 5. Hom([n], Hom(P, [m + 1])) These Hom-posets normally give distinct letterplace or co-letterplace ideals associated to the same underlying (abstract) poset. There are natural bijections between the generators. The degrees of the generators are normally distinct, and so they have different resolutions. Letting P be the one element poset, we get from 2.,3., and 4. above isomorphisms (1) Hom([m], [n + 1]) ∼ = Hom([n], [m + 1]). = Hom([m] × [n], [2]) ∼ An element φ in Hom([m], [n + 1]) identifies as a partition λ1 ≥ · · · ≥ λm ≥ 0 with m parts of sizes ≤ n, by φ(i) = λm+1−i + 1. The left and right side of the isomorphisms above give the correspondence between a partition and its dual. This poset is the Young lattice. In Stanley’s book [35], Chapter 6 is about this lattice, there denoted L(m, n). Letting m = 1 we get by 2.,3., and 5. isomorphims: Hom(P, [n + 1]) ∼ = Hom(n, D(P )) = Hom(P × [n], [2]) ∼ and so we have ideals L(P, n + 1), L(P × [n], [2]), L(n, D(P )) whose generators are naturally in bijection with each other, in particular with elements of Hom([n], D(P )), which are chains of poset ideals in D(P ): (2) ∅ = J0 ⊆ J1 ⊆ · · · ⊆ Jn ⊆ Jn+1 = P. The facets of the simplicial complexes associated to their Alexander duals L(n + 1, P ), L(2, P × [n]), L(D(P ), n), are then in bijection with elements of Hom([n], D(P )). For a subset A of a set R, let Ac denote its complement R\A. LETTERPLACE AND CO-LETTERPLACE IDEALS OF POSETS 13 1. The facets of the simplicial complex associated to L(n + 1, P ) identifies as the complements (Γφ)c of graphs of φ : P → [n + 1]. This is because these facets correspond to the complements of the set of variables in the generators in the Alexander dual L(P, n + 1) of L(n + 1, P ). For isotone maps α : [n + 1] × P → R having bistrict chain fibers, the associated simplicial complex of the ideal Lα (n + 1, P ), has also facets in one-to-one correspondence with φ : P → [n + 1], or equivalently φ′ : [n] → D(P ), but the precise description varies according to α. 2. The facets of the simplicial complex associated to L(2, P × [n]) identifies as the complements (Γφ)c of the graphs of φ : P × [n] → [2]. Alternatively the facets identifies as the graphs Γφ′ of φ′ : P × [n] → [2]op . 3. Let α : [2] × P × [n] → P × [n + 1], (a, p, i) 7→ (p, a + i − 1). α The ideal L (2, P ×[n]) is the multichain ideal In+1,2 (P ). The generators of this ideal are xp,i xq,j where p ≤ q and i < j. The facets of the simplicial complex associated to this ideal are the graphs Γφ of φ : P → [n + 1]op . 5. Co-letterplace ideals of poset ideals 5.1. The ideal L(P, n; J ). Since Hom(P, [n]) is itself a partially ordered set, we can consider poset ideals J ⊆ Hom(P, [n]) and form the subideal L(P, n; J ) of L(P, n) generated by the monomials mΓφ where φ ∈ J . We call it the co-letterplace ideal of the poset ideal J . For short we often write L(J ) and call it simply a co-letterplace ideal. For the notion of linear quotients we refer to [22]. Theorem 5.1. Let J be a poset ideal in Hom(P, [n]). Then L(P, n; J ) has linear quotients, and so it has linear resolution. Proof. We extend the partial order ≤ on J to a total order, denoted ≤t , and define an order on the generators of L(J ) be setting mΓψ ≥ mΓφ if and only if ψ ≤t φ. We claim that L(J ) has linear quotients with respect to this total order of the monomial generators of L(J ). Indeed, let mΓψ > mΓφ where ψ ∈ J . Then ψ <t φ, and hence there exists p ∈ P such that ψ(p) < φ(p). We choose a p ∈ P which is minimal with this property. Therefore, if q < p, then φ(q) ≤ ψ(q) ≤ ψ(p) < φ(p). We set  ψ(r), if r = p, ′ ψ (r) = φ(r), otherwise. Then ψ ′ ∈ Hom(P, n) and ψ ′ < φ for the original order on P . It follows that ψ ′ ∈ J , and mΓψ′ > mΓφ . Since (mΓψ′ ) : mΓφ = (xp,ψ(p) ) and since xp,ψ(p) divides mΓψ , the desired conclusion follows.  Remark 5.2. One may fix a maximal element p ∈ P . The statement above still holds if J in Hom(P, [n]) is a poset ideal for the weaker partial order ≤w on Hom(P, [n]) where φ ≤w ψ if φ(q) ≤ ψ(q) for q 6= p and φ(p) = ψ(p). Just let the total order still refine the standard partial order on the Hom(P, [n]). Then one deduces either ψ ′ ≤w φ or ψ ′ ≤w ψ. In either case this gives ψ ′ ∈ J . For an isotone map φ : P → [n], we define the set (3) Λφ = {(p, i) | φ(q) ≤ i < φ(p) for all q < p}. 14 GUNNAR FLØYSTAD, BJØRN MØLLER GREVE, AND JÜRGEN HERZOG It will in the next subsection play a role somewhat analogous to the graph Γφ. For φ ∈ J we let Jφ be the ideal generated by all mΓψ with mΓψ > mΓφ , where we use the total order in the proof of Theorem 5.1 above. In analogy to [14, Lemma 3.1] one obtains: Corollary 5.3. Let φ ∈ J . Then Jφ : mΓφ is {xp,i | (p, i) ∈ Λφ}. Proof. The inclusion ⊆ has been shown in the proof of Theorem 5.1. Conversely, let xp,i be an element of the right hand set. We set  i, if r = p, ψ(r) = φ(r), otherwise. Then mΓψ ∈ Jφ and (mΓψ ) : mΓφ = (xp,i ). This proves the other inclusion.  Corollary 5.4. The projective dimension of L(P, n; J ) is the maximum of the cardinalities |Λφ| for φ ∈ J . Proof. This follows by the above Corollary 5.3 and Lemma 1.5 of [25].  Remark 5.5. By [14, Cor.3.3] the projective dimension of L(P, n) is (n − 1)s where s is the size of a maximal antichain in P . It is not difficult to work this out as a consequence of the above when J = Hom(P, [n]). An explicit form of the minimal free resolution of L(P, n) is given in [14, Thm. 3.6], and this is generalized to L(P, n; J ) in [8]. 5.2. Regular quotients of L(P, n; J ). We now consider co-letterplace ideals of poset ideals when we cut down by a regular sequence of variable differences. The following generalizes Theorem 2.2 and we prove it in Section 8. Theorem 5.6. Given an isotone map ψ : P × [n] → R with left strict chain fibers. Let J be a poset ideal in Hom(P, n). Then the basis B (as defined before Theorem 2.1) is a regular sequence for the ring k[xP ×[n] ]/L(P, n; J ). 5.3. Alexander dual of L(P, n; J ). We describe the Alexander dual of L(J ) = L(P, n; J ) when J is a poset ideal in Hom(P, [n]). We denote this Alexander dual ideal as L(J )A = L(n, P ; J ). Note that since L(P, n; J ) ⊆ L(P, n), the Alexander dual L(n, P ; J ) contains the letterplace ideal L(n, P ), and since L(P, n; J ) has linear resolution, the Alexander dual L(n, P ; J ) is a Cohen-Macaulay ideal, by [12]. Recall the set Λφ defined above (3), associated to a map φ ∈ Hom(P, [n]). Lemma 5.7. Let J be a poset ideal in Hom(P, [n]). Let φ ∈ J and ψ be in the complement J c . Then Λψ ∩ Γφ is nonempty. Proof. There is some p ∈ P with ψ(p) > φ(p). Choose p to be minimal with this property, and let i = φ(p). If (p, i) is not in Λψ, there must be q < p with ψ(q) > i = φ(p) ≥ φ(q). But this contradicts p being minimal. Hence (p, i) = (p, φ(p)) is both in Γφ and Λψ.  Lemma 5.8. Let S be a subset of P × [n] which is disjoint from Γφ for some φ in Hom(P, [n]). If φ is a minimal such element w.r.t. the partial order on Hom(P, [n]), then S ⊇ Λφ. Proof. Suppose (p, i) ∈ Λφ and (p, i) is not in S. Define φ′ : P → [n] by ( φ(q), q = 6 p φ′ (q) = i, q=p LETTERPLACE AND CO-LETTERPLACE IDEALS OF POSETS 15 By definition of Λφ we see that φ′ is an isotone map, and φ′ < φ. But since S is disjoint from Γφ, we see that it is also disjoint from Γφ′ . This contradicts φ being minimal. Hence every (p, i) ∈ Λφ is also in S.  For a subset S of Hom(P, [n]) define K(S) ⊆ k[x[n]×P ] to be the ideal generated by the monomials mΛφτ where φ ∈ S. Theorem 5.9. The Alexander dual L(n, P ; J ) is L(n, P )+K(J c ). This is a CohenMacaulay ideal of codimension |P |. Proof. It is Cohen-Macaulay, in fact shellable, since L(J ) has linear quotients by Theorem 5.1. The facets of the simplicial complex corresponding to L(J )A are the complements of the generators of L(J ). Hence these facets have codimension |P |. To prove the first statement we show the following. 1. The right ideal is contained in the Alexander dual of the left ideal: Every monomial in L(n, P ) + K(J c ) has non-trivial common divisor with every monomial in L(J ). 2. The Alexander dual of the left ideal is contained in the right ideal: If S ⊆ [n] × P intersects every Γφτ where φ ∈ J , the monomial mS is in L(n, P ) + K(J c ). 1a. Let ψ ∈ Hom([n], P ). Since L(n, P ) and L(P, n) are Alexander dual, Γψ ∩ Γφτ is non-empty for every φ ∈ Hom(P, [n]) and so in particular for every φ ∈ J . 1b. If ψ ∈ J c then Λψ ∩ Γφ is nonempty for every φ ∈ J by Lemma 5.7. Suppose now S intersects every Γφτ where φ is in J . 2a. If S intersects every Γφτ where φ is in Hom(P, [n]), then since L(n, P ) is the Alexander dual of L(P, n), the monomial mS is in L(n, P ). 2b. If S does not intersect Γφτ where φ ∈ J c , then by Lemma 5.8, for a minimal such φ we will have S ⊇ Λφτ . Since S intersects Γφτ for all φ ∈ J , a minimal such  φ is in J c . Thus mS is divided by mΛφτ in K(J c ). Remark 5.10. For a more concrete example, to Stanley-Reisner ideals with whiskers, see the end of Subsection 6.4. Remark 5.11. In [8, Thm.5.1] it is shown that the simplicial complex corresponding to L(n, P ; J ) is a triangulation of a ball. Its boundary is then a triangulation of a sphere. This gives a comprehensive generalization of Bier spheres, [3]. In [8, Sec.4] there is also a precise description of the canonical module of the Stanley-Reisner ring of L(n, P ; J ), as an ideal in this Stanley-Reisner ring. 5.4. Regular quotients of the Alexander dual L(n, P ; J ). We now take the Alexander dual of L(P, n; J ) and cut it down by a regular sequence of variable differences. We then get a generalization of Theorem 2.1 and we prove it in Section 8. Theorem 5.12. Given an isotone map φ : [n] × P → R with left strict chain fibers. Let J be a poset ideal in Hom(P, n). Then the basis B (as defined before Theorem 2.1) is a regular sequence for the ring k[x[n]×P ]/L(n, P ; J ). 6. Examples of regular quotients of co-letterplace ideals We give several examples of quotients of co-letterplace ideals which have been studied in the literature in recent years. 16 GUNNAR FLØYSTAD, BJØRN MØLLER GREVE, AND JÜRGEN HERZOG 6.1. Strongly stable ideals: Poset ideals in Hom([d], [n]). Elements of Hom([d], [n]) are in one to one correspondence with monomials in k[x1 , . . . , xn ] of degree d: A map φ gives the monomial Πdi=1 xφ(i) . By this association, the poset ideals in Hom([d], [n]) are in one to one correspondence with strongly stable ideals in k[x1 , . . . , xn ] generated in degree d. p2 Consider the projections [d] × [n] −→ [n]. The following is a consequence of Theorem 5.1 and Theorem 5.6. Corollary 6.1. Let J be a poset ideal of Hom([d], [n]). Then L(J ) has linear resolution. The quotient map pˆ2 k[x[d]×[n] ]/L(J ) −→ k[x[n] ]/Lp2 (J ) is a quotient map by a regular sequence, and Lp2 (J ) is the strongly stable ideal in k[x1 , . . . , xn ] associated to J . The ideals L(J ) are extensively studied by Nagel and Reiner in [33]. Poset ideals J of Hom([d], [n]) are there called strongly stable d-uniform hypergraphs, [33, Def. 3.3]. If M is the hypergraph corresponding to J , the ideal L(J ) is the ideal I(F (M)) of the d-partite d-uniform hypergraph F (M) of [33, Def.3.4, Ex.3.5]. Furthermore the ideal Lp2 (J ) is the ideal I(M) of [33, Ex. 3.5]. The squarefree ideal I(K) of [33, Ex.3.5] is the ideal Lφ (J ) obtained from the map: φ : [d] × [n] → [d + n − 1] (a, b) 7→ a + b − 1 Corollary 6.1 above is a part of [33, Thm. 3.13]. Given a sequence 0 = a0 ≤ a1 ≤ · · · ≤ ad−1 , we get an isotone map α : [d] × [n] (i, j) → [n + ad−1 ] 7→ j + ai−1 having left strict chain fibers. The ideal Lα (J ) is the ideal coming from the strongly stable ideal associated to J by the stable operator of S.Murai [32, p.707]. When ai−1 < ai they are called alternative squarefree operators in [37, Sec. 4]. Remark 6.2. In [18] Francisco, Mermin and Schweig consider a poset Q with underlying set {1, 2, . . . , n} where Q is a weakening of the natural total order, and study Q-Borel ideals. This is not quite within our setting, but adds extra structure: Isotone maps φ : [d] → [n] uses the total order on [n] but when studying poset ideals J the weaker poset structure Q is used on the codomain. Let n be the poset which is the disjoint union of the one element posets {1}, . . . {n}, so any two distinct elements are incomparable. This is the antichain on n elements. 6.2. Ferrers ideals: Poset ideals in Hom(2, [n]). By (1) partitions λ1 ≥ · · · ≥ λn ≥ 0 where λ1 ≤ n correspond to elements of: Hom([n], [n + 1]) ∼ = Hom([n] × [n], [2]). Thus λ gives a poset ideal J in [n] × [n] = Hom(2, [n]). The Ferrers ideal Iλ of [7, Sec. 2] is the ideal L(J ) in k[x2×[n] ]. In particular we recover the result from [7, Cor.3.8] that it has linear resolution. LETTERPLACE AND CO-LETTERPLACE IDEALS OF POSETS 17 More generally, the poset ideals J of Hom(d, [n]) correspond to the d-partite duniform Ferrers hypergraphs F in [33, Def. 3.6]. That L(J ) has linear resolution is [33, Thm. 3.13]. 6.3. Edge ideals of cointerval d-hypergraphs. Let Homs (Q, P ) be strict isotone maps φ, i.e. q < q ′ implies φ(q) < φ(q ′ ). There is an isomorphism of posets (4) Hom([d], [n]) ∼ = Homs ([d], [n + d − 1]), by sending φ to φs given by φs (j) = φ(j) + j − 1. Consider the weaker partial order on  on Hom([d], [n]) where φ  ψ if φ(i) ≤ ψ(i) for i < d and φ(d) = ψ(d). Via the isomorphism (4) this gives a partial order s on Homs ([d], [n + d − 1]). The poset ideals for the partial order s correspond to the cointerval d-hypergraphs of [10, Def. 4.1] on the set {1, 2, . . . , n + d − 1}. Let Js be such a poset ideal for s . It corresponds to a poset ideal J in Hom([d], [n]) for . Let (5) φ : [d] × [n] → [d + n − 1] (a, b) 7→ a + b − 1 The ideal Lφ (J ) is the edge ideal of the cointerval hypergraph corresponding to Js , see [10, Def. 2.1]. By remarks 5.2 and 8.2, theorems 5.6 and 5.1 still holds for the weaker partial order . Hence we recover the fact from [10, Cor. 4.7] that edge ideals of cointerval hypergraphs have linear resolution. In the case d = 2 these ideals are studied also in [7, Sec. 4] and [33, Sec. 2]. These are obtained by cutting down by a regular sequence of differences of variables from a skew Ferrers ideals Iλ−µ . The skewness implies the ideal comes from a poset ideal of Hom([2], [n]) rather than Hom(2, [n]). Due to this we get the map (5) which has left strict chain fibers, and so the ideal Iλ−µ , of [7, Sec. 4]. 6.4. Uniform face ideals: Poset ideals in Hom(n, [2]). The uniform face ideal of a simplicial complex ∆, introduced recently by D.Cook [6], see also [20], is the ideal generated by the monomials Y Y yi xi · i∈F i6∈F as F varies among the faces of ∆. The Boolean poset on n elements is the distributive lattice D(n) = Hom(n, [2]). A simplicial complex ∆ on the set {1, 2, . . . , n} corresponds to a poset ideal J of Hom(n, [2]), and the uniform face ideal of ∆ identifies as the subideal L(J ) of L(n, [2]). More generally Cook considers a set of vertices which is a disjoint union of k ordered sets C1 ∪ · · · ∪ Ck , each Ci considered a colour class. He then considers simplicial complexes ∆ which are nested with respect to these orders [6, Def.3.3, Prop.3.4]. He associates to this the uniform face ideal I(∆, C), [6, Def. 4.2]. Let ci be the cardinality of Ci and consider the poset which is the disjoint union ∪ki=1 [ci ]. Then such a ∆ corresponds precisely to a poset ideal J in Hom(∪k1 [ci ], [2]). In fact J is isomorphic to the index poset P (∆, C) of [6, Def. 6.1]. The uniform face ideal is obtained as follows: There are projection maps pi : [ci ] × [2] → [2] and so ∪k1 pi : (∪k1 [ci ]) × [2] → ∪k1 [2]. 18 GUNNAR FLØYSTAD, BJØRN MØLLER GREVE, AND JÜRGEN HERZOG k This map has left strict chain fibers and the ideal L∪1 pi (∪k1 [ci ], [2]) is exactly the uniform face ideal I(∆, C). In [6, Thm. 6.8] it is stated that this ideal has linear resolution. Returning again to the first case of the ideal L(J ) in L(n, [2]), its Alexander dual is by Theorem 5.9: L(J )A = L([2], n) + K(J c ). Here L([2], n) isQthe complete intersection of x1j x2j for j = 1, . . . , n, while K(J c ) is generated by j∈G x1j where G is a nonface of ∆. Thus K(J c ) is the associated ideal I∆ ⊆ k[x11 , . . . , x1n ]. This is [20, Thm.1.1]: L(J )A is the Stanley-Reisner ideal I∆ with whiskers x1j x2j . 7. Proof concerning Alexander duality In this section we prove Theorem 2.10 concerning the compatibility between Alexander duality and cutting down by a regular sequence. The following lemma holds for squarefree ideals. Surprisingly it does not hold for monomial ideals in general, for instance for (xn0 , xn1 ) ⊆ k[x0 , x1 ]. Lemma 7.1. Let I ⊆ S be a squarefree monomial ideal and let f ∈ S be such that x1 f = x0 f considered in S/I. Then for every monomial m in f we have x1 m = 0 = x0 m in S/I. Proof. Write f = xa0 fa + · · · x0 f1 + f0 where each fi does not contain x0 . The terms in (x1 − x0 )f = 0 of degree (a + 1) in x0 , are in xa+1 0 fa , and so this is zero. Since a−1 S/I is squarefree, x0 fa is zero, and so f = x0 fa−1 + · · · . We may continue and get f = f0 . But then again in (x1 − x0 )f = 0 the terms with x0 degree 1 is x0 f0 and so this is zero. The upshot is that x0 f = 0 = x1 f . But then each of the multigraded terms of these must be zero, and this gives the conclusion.  Let S be the polynomial ring k[x0 , x1 , x2 , . . . , xn ] and I ⊆ S a squarefree monomial ideal with Alexander dual J ⊆ S. Let S1 = k[x, x2 , . . . , xn ] and S → S1 be the map given by xi 7→ xi for i ≥ 2 and x0 , x1 7→ x. Let I1 be the ideal of S1 which is the image of I, so the quotient ring of S/I by the element x1 − x0 is the ring S1 /I1 . Similarly we define J1 . We now have the following. Part c. below is Theorem 3.1 in the unpublished paper [30]. Proposition 7.2. a) If x1 − x0 is a regular element of S/I, then J1 is squarefree. b) If I1 is squarefree then x1 − x0 is a regular element on S/J. c) If both x1 − x0 is a regular element on S/I and I1 is squarefree, then J1 is the Alexander dual of I1 . Proof. The Alexander dual J of I consists of all monomials in S with non-trivial common factor (ntcf.) with all monomials in I. Q a) Let F be a facet of the simplicial complex of I. Let mF = i∈F xi . Suppose F does not contain any of the vertices 0 and 1. Then x1 mF = 0 = x0 mF in S/I (since F is a facet). Since x1 − x0 is regular we get mF = 0 in S/I, aQcontradiction. Thus every facet F contains either 0 or 1. The generators of J are i∈[n]\F xi , and so no such monomial contains x0 x1 and therefore J1 will be squarefree. b) Suppose (x1 − x0 )f = 0 in S/J. By the above for the monomials m in f , we have x1 m = 0 = x0 m in S/J. We may assume m is squarefree. So x0 m has ntcf. with all monomials in I and the same goes for x1 m. If m does not have ntcf. LETTERPLACE AND CO-LETTERPLACE IDEALS OF POSETS 19 with the minimal monomial generator n in I, we must then have n = x0 x1 n′ . But then the image of n in I1 would not be squarefree, contrary to the assumption. The upshot is that m has ntcf. with every monomial in I and so is zero in S/J. c) A monomial m in J has ntcf. with all monomials in I. Then its image m in S1 has ntcf. with all monomials in I1 , and so J1 is contained in the Alexander dual of I1 . Assume now m in S1 has ntcf. with all monomials in I1 . We must show that m ∈ J1 . If m does not contain x then m has ntcf. with every monomial in I, and so m ∈ J1 . Otherwise m = xm′ and so m ∈ J1 . We will show that either x0 m′ or x1 m′ is in J. If not, then x0 m′ has no common factor with some monomial x1 n1 in I (it must contain x1 since m has ntcf. with every monomial in I1 ), and x1 m′ has no common factor with some monomial x0 n0 in I. Let n be the least common multiple of n0 and n1 . Then x0 n and x1 n are both in I and so by the regularity assumption n ∈ I. But n has no common factor with x0 m′ and x1 m′ , and so n ∈ I1 has no common factor with m = xm′ . This is a contradiction. Hence either x0 m′ or x1 m′ is in J  and so m is in J1 . We are ready to round off this section by the following extension of Theorem 2.10. Theorem 7.3. Let φ : [n] × P → R be an isotone map such that the fibers φ−1 (r) τ are bistrict chains in [n] × P op . Then the ideals Lφ (n, P ; J ) and Lφ (P, n; J ) are Alexander dual. Proof. Since L(P, n) is squarefree, the subideal L(P, n; J ) is also. Furthermore it is obtained by cutting down by a regular sequence of variable differences, by Theorem τ 5.12. Hence L(n, P ; J )φ is the Alexander dual of L(P, n; J )φ .  8. Proof that the poset maps induce regular sequences. To prove Theorems 2.1, 2.2 and 5.6, we will use an induction argument. Let φ [n] × P −→ R be an isotone map. Let r ∈ R have inverse image by φ of cardinality ≥ 2. Choose a partition into nonempty subsets φ−1 (r) = R1 ∪R2 such that (i, p) ∈ R1 and (j, q) ∈ R2 implies i < j. Let R′ be R\{r} ∪ {r1 , r2 }. We get the map (6) φ′ [n] × P −→ R′ → R factoring φ, where the elements of Ri map to ri . For an element p′ of R′ , denote by p′ its image in R. Let p′ , q ′ be distinct elements of R′ . We define a partial order on R′ by the following two types of strict inequalities: a. p′ < q ′ if p′ = r1 and q ′ = r2 , b. p′ < q ′ if p′ < q ′ Lemma 8.1. This ordering is a partial order on R′ . Proof. Transitivity: Suppose p′ ≤ q ′ and q ′ ≤ r ′ . Then p′ ≤ q ′ and q ′ ≤ r ′ and so p′ ≤ r ′ . If either p′ or r ′ is distinct from r we conclude that p′ ≤ r ′ . If both of them are equal to r, then q ′ = r also. Then either p′ = q ′ = r ′ or p′ = r1 and r ′ = r2 , and so p′ ≤ r ′. Reflexivity: Suppose p′ ≤ q ′ and q ′ ≤ p′ . Then p′ = q ′ . If this is not r we get p′ = q ′ . If it equals r, then since we do not have r2 ≤ r1 , we must have again have p′ = q ′ .  20 GUNNAR FLØYSTAD, BJØRN MØLLER GREVE, AND JÜRGEN HERZOG Proof of Theorem 2.1. We show this by induction on the cardinality of im φ. Assume that we have a factorization (6), such that ′ k[xR′ ]/Lφ (n, P ) (7) is obtained by cutting down from k[x[n]×P ]/L(n, P ) by a regular sequence of variable differences. For (a, p) in [n] × P denote its image in R′ by a, p and its image in R by a, p. Let (a, p) map to r1 ∈ R′ and (b, q) map to r2 ∈ R′ . We will show that xr1 − xr2 is a regular element in the quotient ring (7). So let f be a polynomial of this quotient ring such that f (xr1 − xr2 ) = 0. Then by Lemma 7.1, for any monomial m in f we have mxr1 = 0 = mxr2 in the quotient ring (7). We may assume m is nonzero in this quotient ring. ′ There is a monomial x1,p1 x1,p2 · · · xn,pn in Lφ (n, P ) dividing mxa,p considered as monomials in k[xR ]. Then we must have a, p = s, ps for some s. Furthermore there ′ is x1,q1 x1,q2 · · · xn,qn in Lφ (n, P ) dividing mxb,q in k[xR ], and so b, q = t, qt for some t. In R we now get s, ps = a, p = b, q = t, qt , so s = t would imply qt = ps since φ has left strict chain fibers. But then r1 = a, p = s, ps = t, qt = b, q = r2 which is not so. Assume, say s < t. Then ps ≥ qt since φ has left strict chain fibers, and so pt ≥ ps ≥ qt ≥ qs . 1. Suppose ps > qt . Consider x1,q · · · xt−1,qt−1 . This will divide m since x1,q1 x1,q2 · · · xn,qn divides mxt,qt . Similarly xs+1,ps+1 · · · xn,pn divides m. Chose s ≤ r ≤ t. Then pr ≥ ps > qt ≥ qr and so r, qr < r, pr . Then x1,q · · · xr−1,qr−1 and xr,pr · · · xn,pn do not have a common factor since i, qi ≤ r, qr < r, pr ≤ j, pj for i ≤ r ≤ j. Hence the product of these monomials will divide m and so m = 0 in the quotient ring k[xR ]/Lφ (n, P ). 2. Assume ps = qt and qt > qs . Then s, ps > s, qs since φ has left strict chain fibers. The monomials x1,q1 · · · xs,qs and xs+1,ps+1 · · · xn,pn then do not have any common factor, and the product divides m, showing that m = 0 in the quotient ring k[xR ]/Lφ (n, P ). If pt > ps we may argue similarly. 3. Assume now that pt = ps = qt = qs , and denote this element as p. Note that for s ≤ i ≤ t we then have ps ≤ pi ≤ pt , so pi = p, and the same argument shows that qi = p for i in this range. Since s, p = s, ps = a, p 6= b, q = t, qt = t, p there is s ≤ r ≤ t such that s, ps = · · · = r, pr < r + 1, pr+1 ≤ · · · ≤ t, pt . This is the same sequence as s, qs = · · · = r, qr < r + 1, qr+1 ≤ · · · ≤ t, qt . LETTERPLACE AND CO-LETTERPLACE IDEALS OF POSETS 21 Then x1,q1 · · · xr,qr and xr+1,pr+1 · · · xn,pn divide m and do not have a common factor, and so m = 0 in the quotient ring k[xR ]/Lφ (n, P ).  Proof of Theorem 5.12. There is a surjection (8) k[x[n]×P ]/L(n, P ) → k[x[n]×P ]/L(J )A and both are Cohen-Macaulay quotient rings of k[x[n]×P ] of codimension |P |. The basis B is a regular sequence for the first ring by the previous argument. Hence k[x[n]×P ]/(L(n, P ) + (B)) has codimension |P | + |B|. Since k[x[n]×P ]/(L(J )A + (B)) is a quotient of this it must have codimension ≥ |P | + |B|. But then B must be a regular sequence for the right side of (8) also.  Proof of Theorems 2.2 and 5.6. By induction on the cardinality of im φ. We assume we have a factorization φ′ P × [n] −→ R′ → R analogous to (6), such that ′ k[xR′ ]/Lφ (J ) (9) is obtained by cutting down from k[xP ×[n] ]/L(J ) by a regular sequence of variable differences. Let (p0 , a) map to r1 ∈ R′ and (q0 , b) map to r2 ∈ R′ . We will show that xr1 − xr2 is a regular element in the quotient ring (9). So let f be a polynomial of this quotient ring such that f (xr1 − xr2 ) = 0. Then by Lemma 7.1, for any monomial m in f we ′ have mxr1 = 0 = mxr2 in the quotient ring k[xR′ ]/Lφ (J ). We may assume m is nonzero in this quotient ring. Q ′ There is i ∈ J ⊆ Hom(P, n) such that the monomial mi = p∈P xp,ip in Lφ (J ) Q divides mxp0 ,a , and similarly a j ∈ J such that the monomial mj = p∈P xp,jp divides mxq0 ,b . Hence there are s and t in P such that s, is = p0 , a and t, jt = q0 , b. In R we then get: s, is = p0 , a = q0 , b = t, jt , so s = t would imply it = jt since φ has left strict chain fibers. But then r1 = p0 , a = s, is = t, jt = q0 , b = r2 which is not so. Assume then, say s < t. Then is ≥ jt since φ has left strict chain fibers, and so it ≥ is ≥ jt ≥ js . (10) Now form the monomials Q • mi>s = p>s xp,ip . Q • mii>j = xp,ip . ip >jp ,not (p>s) Q • mii<j = xp,ip . ip <jp ,not (p>s) Q • mii=j = xp,ip . ip =jp ,not (p>s) 22 GUNNAR FLØYSTAD, BJØRN MØLLER GREVE, AND JÜRGEN HERZOG Similarly we define mj∗ for the various subscripts ∗. Then mi = mii=j · mii>j · mii<j · mi>s divides xs,is m, and mj = mji=j · mji>j · mji<j · mj>s divides xt,jt m. There is now a map ℓ : P → [n] defined by ( ip for p > s ℓ(p) = min(ip , jp ) for not (p > s) . This is an isotone map as is easily checked. Its associated monomial is mℓ = mi=j · mji>j · mii<j · mi>s . We will show that this divides m. Since the isotone map ℓ is ≤ the isotone map i, this will prove the theorem. Claim 3. mji>j is relatively prime to mii<j and mi>s . Proof. Let xp,jp be in mji>j . 1. Suppose it equals the variable xq,iq in mii<j . Then p and q are comparable since φ has left strict chain fibers. If p < q then jp ≥ iq ≥ ip , contradicting ip > jp . If q < p then iq ≥ jp ≥ jq contradicting iq < jq . 2 Suppose xp,jp equals xq,iq in mi>s . Then p and q are comparable and so p < q since q > s and we do not have p > s. Then jp ≥ iq ≥ ip contradicting ip > jp .  Let abc = mii=j · mii<j · mi>s which divides mxs,is and ab′ = mji=j · mji>j which divides m since xt,jt is a factor of mj>s since t > s. Now if the product of monomials abc divides the monomial n and ab′ also divides n, and b′ is relatively prime to bc, then the least common multiple abb′ c divides n. We thus see that the monomial associated to the isotone map ℓ mℓ = mi=j · mji>j · mii<j · mi>s divides mxs,is . We need now only show that the variable xs,is occurs to a power in the above product for mℓ less than or equal to that of its power in m. Claim 4. xs,is is not a factor of mji>j or mii<j . Proof. 1. Suppose s, is = p, ip where ip < jp and not p > s. Since p and s are comparable (they are both in a fiber of φ), we have p ≤ s. Since φ is isotone ip ≤ is and since φ has left strict chain fibers ip ≥ is . Hence ip = is . By (10) js ≤ is and so jp ≤ js ≤ is = ip . This contradicts ip < jp . 2. Suppose s, is = p, jp where jp < ip and not p > s. Then again p ≤ s and ip ≤ is ≤ jp , giving a contradiction.  If now is > js then xs,is is a factor in mii>j but by the above, not in mji>j . Since mℓ is obtained from mi by replacing mii>j with mji>j , we see that mℓ contains a lower power of xs,is than mi and so mℓ divides m. Claim 5. Suppose is = js . Then the power of xs,is in mi>s is less than or equal to its power in mj>s . LETTERPLACE AND CO-LETTERPLACE IDEALS OF POSETS 23 Proof. Suppose s, is = p, ip where p > s. We will show that then ip = jp . This will prove the claim. The above implies p, ip = s, is = t, jt , so either s < p < t or s < t ≤ p. If the latter holds, then since φ has left strict chain fibers, is ≥ jt ≥ ip and also is ≤ ip by isotonicity, and so is = ip = jt . Thus s, is ≤ t, jt ≤ p, ip and since the extremes are equal, all three are equal contradicting the assumption that the two first are unequal. Hence s < p < t. By assumption on the fibre of φ we have is ≥ ip and by isotonicity is ≤ ip and so is = ip . Also by (10) and isotonicity is ≥ jt ≥ jp ≥ js . Since is = js we get equalities everywhere and so ip = jp , as we wanted to prove.  In case is > js we have shown before Claim 5 that mℓ divides m. So suppose is = js . By the above two claims, the xs,is in mℓ occurs only in mi=j · mi>s and to a power less than or equal to that in mi=j · mj>s . Since mj divides mxt,jt and s, is 6= t, jt the power of s, is in mj is less than or equal to its power in m. Hence the power of xs,is in mℓ is less or equal to its power in m and mℓ divides m.  Remark 8.2. Suppose P has a unique maximal element p. The above proof still holds if J in Hom(P, [n]) is a poset ideal for the weaker partial order ≤w on Hom(P, [n]) where the isotone maps φ ≤w ψ if φ(q) ≤ ψ(q) for q < p, and φ(p) = ψ(p). References 1. Klaus Altmann, Mina Bigdeli, Juergen Herzog, and Dancheng Lu, Algebraically rigid simplicial complexes and graphs, Journal of Pure and Applied Algebra 220 (2016), no. 8, 2914–2935. 2. David Bayer and Michael Stillman, A criterion for detecting m-regularity, Inventiones mathematicae 87 (1987), no. 1, 1–11. 3. Anders Björner, Andreas Paffenholz, Jonas Sjöstrand, and Günter M Ziegler, Bier spheres and posets, Discrete & Computational Geometry 34 (2005), no. 1, 71–86. 4. David A Buchsbaum, Selections from the Letter-Place Panoply, Commutative Algebra, Springer, 2013, pp. 237–284. 5. Aldo Conca, Serkan Hoşten, and Rekha R. Thomas, Nice initial complexes of some classical ideals, Algebraic and geometric combinatorics, Contemp. Math., vol. 423, Amer. Math. Soc., Providence, RI, 2006, pp. 11–42. 6. David Cook, The uniform face ideals of a simplicial complex, arXiv preprint arXiv:1308.1299 (2013). 7. Alberto Corso and Uwe Nagel, Specializations of Ferrers ideals, J. Algebraic Combin. 28 (2008), no. 3, 425–437. 8. Alessio D’Ali, Gunnar Fløystad, and Amin Nematbakhsh, Resolutions of co-letterplace ideals and generalizations of bier spheres, arXiv preprint arXiv:1601.02793 (2016). 9. , Resolutions of letterplace ideals of posets, arXiv preprint arXiv:1601.02792 (2016). 10. Anton Dochtermann and Alexander Engström, Cellular resolutions of cointerval ideals, Math. Z. 270 (2012), no. 1-2, 145–163. 11. John A Eagon and Victor Reiner, Resolutions of Stanley-Reisner rings and Alexander duality, Journal of Pure and Applied Algebra 130 (1998), no. 3, 265–275. 12. , Resolutions of Stanley-Reisner rings and Alexander duality, Journal of Pure and Applied Algebra 130 (1998), no. 3, 265–275. 13. Viviana Ene and Jürgen Herzog, Gröbner bases in commutative algebra, vol. 130, American Mathematical Soc., 2012. 24 GUNNAR FLØYSTAD, BJØRN MØLLER GREVE, AND JÜRGEN HERZOG 14. Viviana Ene, Jürgen Herzog, and Fatemeh Mohammadi, Monomial ideals and toric rings of Hibi type arising from a finite poset, European Journal of Combinatorics 32 (2011), no. 3, 404–421. 15. Gunnar Fløystad, Cellular resolutions of Cohen-Macaulay monomial ideals, J. Commut. Algebra 1 (2009), no. 1, 57–89. 16. Gunnar Fløystad and Amin Nematbakhsh, Rigid ideals by deforming quadratic letterplace ideals, arXiv preprint arXiv:1605.07417 (2016). 17. Gunnar Fløystad and Jon Eivind Vatne, (Bi-)Cohen-Macaulay Simplicial Complexes and Their Associated Coherent Sheaves, Communications in algebra 33 (2005), no. 9, 3121–3136. 18. Christopher A Francisco, Jeffrey Mermin, and Jay Schweig, Generalizing the Borel property, Journal of the London Mathematical Society 87 (2013), no. 3, 724–740. 19. Mark L Green, Generic initial ideals, Six lectures on commutative algebra, Springer, 1998, pp. 119–186. 20. J. Herzog and T. Hibi, The face ideal of a simplicial complex, ArXiv e-prints. 21. Jürgen Herzog and Takayuki Hibi, Distributive lattices, bipartite graphs and alexander duality, Journal of Algebraic Combinatorics 22 (2005), no. 3, 289–302. , Monomial ideals, Springer, 2011. 22. 23. Jürgen Herzog, Ayesha Asloob Qureshi, and Akihiro Shikama, Alexander duality for monomial ideals associated with isotone maps between posets, Journal of Algebra and Its Applications 15 (2016), no. 05, 1650089. 24. Jürgen Herzog and Ahad Rahimi, Bi-cohen-macaulay graphs, arXiv preprint arXiv:1508.07119 (2015). 25. Jürgen Herzog and Yukihide Takayama, Resolutions by mapping cones, Homology, Homotopy and Applications 4 (2002), no. 2, 277–294. 26. Jürgen Herzog and NgôViêt Trung, Gröbner bases and multiplicity of determinantal and pfaffian ideals, Advances in Mathematics 96 (1992), no. 1, 1–37. 27. Martina Juhnke-Kubitzke, Lukas Katthän, and Sara Saeedi Madani, Algebraic properties of ideals of poset homomorphisms, Journal of Algebraic Combinatorics (2015), 1–28. 28. Jan O Kleppe, Deformations of modules of maximal grade and the hilbert scheme at determinantal schemes, Journal of Algebra 407 (2014), 246–274. 29. Roberto La Scala and Viktor Levandovskyy, Letterplace ideals and non-commutative Gröbner bases, Journal of Symbolic Computation 44 (2009), no. 10, 1374–1393. 30. Henning Lohne, The many polarizations of powers of maximal ideals, arXiv preprint arXiv:1303.5780 (2013). 31. Saunders Mac Lane, Categories for the working mathematician, vol. 5, springer, 1998. 32. Satoshi Murai, Generic initial ideals and squeezed spheres, Adv. Math. 214 (2007), no. 2, 701–729. 33. Uwe Nagel and Victor Reiner, Betti numbers of monomial ideals and shifted skew shapes, Electron. J. Combin. 16 (2009), no. 2, Special volume in honor of Anders Bjorner, Research Paper 3, 59. 34. Himanee Narasimhan, The irreducibility of ladder determinantal varieties, Journal of Algebra 102 (1986), no. 1, 162–185. 35. Richard P Stanley, Algebraic Combinatorics: Walks, Trees, Tableaux and More, Undergraduate Texts in Mathematics (2013). 36. Bernd Sturmfels, Gröbner bases and stanley decompositions of determinantal rings, Mathematische Zeitschrift 205 (1990), no. 1, 137–144. 37. Kohji Yanagawa, Alternative polarizations of Borel fixed ideals, Nagoya Math. J. 207 (2012), 79–93. Matematisk institutt, University of Bergen E-mail address: [email protected] Matematisk institutt, University of Bergen E-mail address: [email protected] Matematisches Institut, Universität Essen E-mail address: [email protected]
0math.AC
1 Classification and regression using an outer approximation projection-gradient method arXiv:1506.02196v4 [math.ST] 23 Mar 2017 Michel Barlaud, Fellow, IEEE, Wafa Belhajali, Patrick L. Combettes Fellow, IEEE, and Lionel Fillatre Abstract—This paper deals with sparse feature selection and grouping for classification and regression. The classification or regression problems under consideration consists in minimizing a convex empirical risk function subject to an ℓ1 constraint, a pairwise ℓ∞ constraint, or a pairwise ℓ1 constraint. Existing work, such as the Lasso formulation, has focused mainly on Lagrangian penalty approximations, which often require ad hoc or computationally expensive procedures to determine the penalization parameter. We depart from this approach and address the constrained problem directly via a splitting method. The structure of the method is that of the classical gradientprojection algorithm, which alternates a gradient step on the objective and a projection step onto the lower level set modeling the constraint. The novelty of our approach is that the projection step is implemented via an outer approximation scheme in which the constraint set is approximated by a sequence of simple convex sets consisting of the intersection of two half-spaces. Convergence of the iterates generated by the algorithm is established for a general smooth convex minimization problem with inequality constraints. Experiments on both synthetic and biological data show that our method outperforms penalty methods. I. I NTRODUCTION multiplier λ can seldom be computed easily, which leaves the properties of the resulting solutions loosely defined. The main contribution of the present paper is to propose an efficient splitting algorithm to solve the constrained formulation minimize Φ(w) ϕ(w)6η (1) directly. As discussed in [11], the bound η defining the constraint can often be determined from prior information on the type of problem at hand. Our splitting algorithm proceeds by alternating a gradient step on the smooth classification risk Φ and a projection onto the lower level set  function w ∈ Rd ϕ(w) 6 η . The main focus is when ϕ models the ℓ1 , pairwise ℓ1 constraint, or pairwise ℓ∞ constraint. The projection onto the lower level set is implemented via an outer projection procedure which consists of successive projections onto the intersection of two simple half-spaces. The remainder of the paper is organized as follows. Section II introduces the constrained optimization model. Section III presents our new splitting algorithm, which applies to any constrained smooth convex optimization problem. In particular we also discuss the application to regression problems. Section IV presents experiments on both synthetic and real classical biological and genomics data base. In many classification and regression problems, the objective is to select a sparse vector of relevant features. For example in biological applications, DNA microarray and new RNA-seq devices provide high dimensional gene expression (typically 20,000 genes). The challenge is to select the smallII. C LASSIFICATION RISK AND CONVEX CONSTRAINTS est number of genes (the so-called biomarkers) which are A. Risk minimization necessary to achieve accurate biological classification and We assume that m samples (xi )16i6m in Rd are available. prediction. A popular approach to recover sparse feature vectors (under a condition of mutual incoherence) is to solve Typically m < d, where d is the dimension of the feature a convex optimization problem involving a data fidelity term vector. Each sample xi is annotated with a label yi taking its Φ and the ℓ1 norm [6], [17], [19], [34]. Recent Lasso penalty value in {−1, +1}. The classification risk associated with a d regularization methods take into account correlated data using linear classifier parameterized by a vector w ∈ R is given by m either the pairwise ℓ1 penalty [24], [27], [35] or the pairwise  1 X φ yi hxi | wi . (2) Φ : Rd → R : w 7→ ℓ∞ penalty [5] (see also [20] for further developments). The m i=1 sparsity or grouping constrained classification problem can be cast as the minimization of a smooth convex loss subject to We restrict our investigation to convex losses φ which satisfy an ℓ1 or a pairwise ℓ∞ constraint, say ϕ(w) 6 η. Most of the following assumption. the existing work has focused on Lagrangian penalty methods, which aim at solving the unconstrained problem of minimizing Assumption 1 Let f : R → [0, 1] be an increasing LipschitzΦ + λϕ. Although, under proper qualification conditions, there continuous function which is antisymmetric with respect to the is a formal equivalence between constrained and unconstrained point (0, f (0)) = (0, 1/2), integrable, and differentiable at 0 Lagrangian formulations [3, Chapter 19], the exact Lagrange with f ′ (0) = max f ′ . The loss φ : R → R is defined by Z t M. Barlaud, W. Belhajali, and L. Fillatre are with Université Côte d’Azur, (∀t ∈ R) φ(t) = −t + f (s)ds. (3) CNRS, 06900 Sophia Antipolis, France. E-mail: [email protected], [email protected] P. L. Combettes is with the Department of Mathematics, North Carolina State University, Raleigh, NC 27695-8205, USA. E-mail: [email protected] −∞ The main advantage of this class of smooth losses is that it allows us to compute the posterior estimation [4]. The function 2 f relates a prediction hxi | wi of a sample xi to the posteriori probability for the class +1 via   b Yi = +1 | xi = f (hxi | wi). (4) P edge in the graph to be similar. We define the problem of minimizing under the directed acyclic graph constraint as minimize P w∈Rd (i,j)∈S |ωi −ωj |6η Φ(w), (10) This property will be used in Section IV to compute without any approximation the area under the ROC curve (AUC). The for some suitable parameters η > 0. In the second, undirected loss φ in Assumption 1 is convex, everywhere differentiable graph, approach [5] one constrains the coefficients of features with a Lipschitz-continuous derivative, and it is twice differ- ωi and ωj connected by an edge using a pairwise ℓ∞ constraint. entiable at 0 with φ′′ (0) = max φ′′ . In turn, the function Φ of The problem is to (2) is convex and differentiable, and its gradient minimize Φ(w). (11) m w∈Rd  P 1 X f hxi | wi xi (5) ∇Φ : w 7→ (i,j)∈S max(|ωi |,|ωj |)6η m i=1 To approach the constrained problems (9) and (10), state of the has Lipschitz constant art methods employ a penalized variant [18], [19], [21], [34]. Pm Pm 2 ′ 2 ′′ In these Lagrangian approaches the objective is to minimize f (0) i=1 kxi k φ (0) i=1 kxi k β= = . (6) Φ+λϕ, where λ > 0 aims at controlling sparsity and grouping, m m and where the constraints are defined by one of the following Applications to classification often involve normalized features. (see (9), (10), and (11)) In this case, (6) reduces to β = f ′ (0) = φ′′ (0). Examples of   functions which satisfy Assumption 1 include that induced by 1 ϕ1 = k · kP the function f : t 7→ 1/(1 + exp(−t)), which leads to the ϕ2 : w 7→ (i,j)∈S max(|ωi |, |ωj |) (12)  P  logistic loss φ : t 7→ ln(1 + exp(−t)), for which φ′′ (0) = 1/4. ϕ3 : w 7→ (i,j)∈S |ωi − ωj |. Another example is the Matsusita loss [29]  The main drawback of current penalty formulations resides p 1 φ : t 7→ (7) in the cost associated with the reliable computation of the − t + 1 + t2 , 2 Lagrange multiplier λ using homotopy algorithms [18], [21], √  which is induced by f : t 7→ t/ 1 + t2 + 1 /2. [22], [28]. The worst complexity case is O(3d ) [28], which is usually intractable on real data. Although experiments using homotopy algorithms suggest that the actual complexity is B. Sparsity model In many applications, collecting a sufficient amount of O(d) [28], the underlying path algorithm remains computafeatures to perform prediction is a costly process. The chal- tionally expensive for high-dimensional data sets such as the lenge is therefore to select the smallest number of features genomic data set. To circumvent this computational issue, we (genes or biomarkers) necessary for an efficient classification propose a new general algorithm to solve either the sparse (9) and prediction. The problem can be cast as a constrained or the grouping (10) constrained convex optimization problems directly. optimization problem, namely, minimize Φ(w), w∈Rd kwk0 6δ (8) where kwk0 is the number of nonzero entries of w. Since k·k0 is not convex, (8) is usually intractable and an alternative approach is to use the norm k · k1 as a surrogate, which yields the Lasso formulation [34] minimize Φ(w). d D. Optimization model Our classification minimization problem is formally cast as follows. Problem 1 Suppose that φ satisfies Assumption 1 and let ϕ : Rd → R be convex. Set (9) Φ : Rd → R : w 7→ w∈R kwk1 6η It has been shown in the context of compressed sensing that under a so-called restricted isometry property, minimizing with the k · k1 norm is tantamount to minimizing with the k · k0 penalty in a sense made precise in [6]. C. Grouping model Let us consider the graph S of connected features (i, j). The basic idea is to introduce constraints on the coefficients for features ωi and ωj connected by an edge in the graph. In this paper we consider two approaches: directed acyclic graph and undirected graph. Fused Lasso [35] encourages the coefficients ωi and ωj of features i and j connected by an and C= m  1 X φ yi hxi | wi m i=1  w ∈ Rd  ϕ(w) 6 η , (13) (14) and let β be the Lipschitz constant of ∇Φ, as defined in (6). The problem is to minimize Φ(w). w∈C (15) In Section IV, we shall focus on the three instances of the function ϕ defined in (12). We assume throughout that there exists some ρ ∈ R such that x ∈ C Φ(x) 6 ρ is nonempty and bounded, which guarantees that (13) has at least one solution. In particular, this is true if Φ or ϕ is coercive. 3 III. S PLITTING ALGORITHM In this section, we propose an algorithm for solving constrained classification problem (15). This algorithm fits in the general category of forward-backward splitting methods, which have been popular since their introduction in data processing problem in [14]; see also [12], [13], [30], [32], [33]. These methods offer flexible implementations with guaranteed convergence of the sequence of iterates they generate, a key property to ensure the reliability of our variational classification scheme. A. General framework As noted in Section II, Φ is a differentiable convex function and its gradient has Lipschitz constant β, where β is given by (6). Likewise, since ϕ is convex and continuous, C is a closed convex set as a lower level set of ϕ. The principle of a splitting method is to use the constituents of the problems, here Φ and C, separately. In the problem at hand, it is natural to use the projection-gradient method to solve (15). This method, which is an instance of the proximal forward-backward algorithm [14], alternates a gradient step on the objective Φ and a projection step onto the constraint set C. It is applicable in the following setting, which captures Problem 1. p0 • sk H(pk , pk+1/2) • pk+1  C = p ∈ Rd ϕ(p) 6 η  p ∈ Rd • pk H(p0, pk ) • pk+1/2 ϕ(p) 6 ϕ(pk ) Fig. 1: A generic iteration for computing the projection of p0 onto C. At iteration k, the current iterate is pk and C is contained in the half-space H(p0 , pk ), onto which pk is the projection of p0 (see (22)). If ϕ(pk ) > η, a subgradient vector sk  ∈ ∂ϕ(pk ) is in the normal cone to the lower level set p ∈ Rd ϕ(p) 6 ϕ(pk ) at pk , and the subgradient projection pk+1/2 of pk is defined by (23); it is the projection of pk onto the half-space H(pk , pk+1/2 ) which contains C. The update pk+1 is the projection of p0 onto H(p0 , pk ) ∩ H(pk , pk+1/2 ). Problem 2 Let Φ : Rd → R be a differentiable convex function such that ∇Φ is Lipschitz-continuous with constant β ∈ ]0, +∞[, let ϕ : Rd → R be a convex function, let η ∈ R, Proposition 1 In Theorem 1 suppose that (∀n ∈ N) an = 0. and set C = w ∈ Rd ϕ(w) 6 η . The problem is to Then Φ(wn+1 ) − inf Φ(C) 6 ϑ/n + 1 for some ϑ > 0. minimize Φ(w). w∈C (16) Let PC denote the projection operator onto the closed convex set C. Given w0 ∈ Rd , a sequence (γn )n∈N of strictly positive parameters, and a sequence (an )n∈N in Rd modeling computational errors in the implementation of the projection operator PC , the projection-gradient algorithm for solving Problem 2 assumes the form for  n = 0, 1, . . . vn = wn − γn ∇Φ(wn ) (17) wn+1 = PC (vn ) + an . We derive at once from [14, Theorem 3.4(i)] the following convergence result, which guarantees the convergence of the iterates. The implementation of (17) is straightforward except for the computation of PC (vn ). Indeed, C is defined in (14) as the lower level set of a convex function, and no explicit formula exists for computing the projection onto such a set in general [3, Section 29.5]. Fortunately, Theorem 1 asserts that PC (vn ) need not be computed exactly. Next, we provide an efficient algorithm to compute an approximate projection onto C. B. Projection onto a lower level set Let p0 ∈ Rd , let ϕ : Rd → R be a convex function, and let η ∈ R be such that  (19) C = p ∈ Rd ϕ(p) 6 η 6= ∅. The objective is to compute iteratively the projection PC (p0 ) of p0 onto C. The principle of the algorithm is to replace this Theorem 1 Suppose that Problem 2 has at least one solution, (usually intractable) projection by a sequence of projections let w0 ∈ Rd , let (γn )n∈N be a sequence in ]0, +∞[, and let onto simple outer approximations to C consisting of the (an )n∈N be a sequence in Rd such that intersection of two affine half-spaces [10]. X We first recall that s ∈ Rd is called a subgradient of ϕ at 2 kan k < +∞, inf γn > 0, and sup γn < . (18) p ∈ Rd if [3, Chapter 16] n∈N β n∈N n∈N (∀y ∈ Rd ) hy − p | si + ϕ(p) 6 ϕ(y). (20) Then the sequence (wn )n∈N generated by (17) converges to a The set of all subgradients of ϕ at p is denoted by ∂ϕ(p). If ϕ solution to Problem 2. is differentiable at p, this set reduces to a single vector, namely Theorem 1 states that the whole sequence of iterates con- the gradient ∇ϕ(p). The projection P (p ) of p onto C is C 0 0 verges to a solution. Using classical results on the asymptotic characterized by behavior of the projection-gradient method [25], we can com( PC (p0 ) ∈ C plement this result with the following upper bound on the rate (21) of convergence of the objective value. (∀p ∈ C) hp − PC (p0 ) | p0 − PC (p0 )i 6 0. 4 Given x and y in Rd , define a closed affine half-space H(x, y) by  H(x, y) = p ∈ Rd hp − y | x − yi 6 0 . (22) Note that H(x, x) = Rd and, if x 6= y, H(x, y) is the closed affine half-space onto which the projection of x is y. According to (21), C ⊂ H(p0 , PC (p0 )). The principle of the algorithm is as follows (see Fig. 1). At iteration k, if ϕ(pk ) 6 η, then pk ∈ C and the algorithm terminates with pk = PC (p0 ). Indeed, since C ⊂ H(p0 , pk ) [10, Section 5.2] and pk is the projection of p0 onto H(p0 , pk ), we have kp0 − pk k 6 kp0 − PC (p0 )k. Hence pk ∈ C ⇔ pk = PC (p0 ), i.e., ϕ(pk ) 6 η ⇔ pk = PC (p0 ). Otherwise, one first computes the so-called subgradient projection of pk onto C. Recall that, given sk ∈ ∂ϕ(pk ), the subgradient projection of pk onto C is [3], [7], [9]  p + η − ϕ(pk ) s if ϕ(p ) > η k k k ksk k2 (23) pk+1/2 =  pk if ϕ(pk ) 6 η. As noted in [9], the closed half-space H(pk , pk+1/2 ) serves as an outer approximation to C at iteration k, i.e., C ⊂ H(pk , pk+1/2 ); moreover pk ∈ / C ⇒ pk ∈ / H(pk , pk+1/2 ). Thus, since we have also seen that C ⊂ H(p0 , pk ), we have C ⊂ Ck , where Ck = H(p0 , pk ) ∩ H(pk , pk+1/2 ). (24) The update pk+1 is computed as the projection of p0 onto the outer approximation Ck . As the following lemma from [23] (see also [3, Corollary 29.25]) shows, this computation is straightforward. Lemma 1 Let x, y, and z be points in Rd such that H(x, y) ∩ H(y, z) 6= ∅. (25) Proposition 2 Let p0 ∈ Rd , let ϕ : Rd → R be a convex function, and let η ∈ R be such that C = p ∈ Rd ϕ(p) 6 η 6= ∅. Then either (27) terminates in a finite number of iterations at PC (p0 ) or it generates an infinite sequence (pk )k∈N such that pk → PC (p0 ). To obtain an implementable version of the conceptual algorithm (17), consider its nth iteration and the computation of the approximate projection wn+1 of vn onto C using (27). We first initialize (27) with p0 = vn , and then execute only Kn iterations of it. In doing so, we approximate the exact projection onto C by the projection pKn onto CKn −1 . The resulting error is an = PC (p0 )−pKn . According to Theorem 1, this error must be controlled so as to yield overall a summable process. First, since PC is nonexpansive [3, Proposition 4.16], we have kPC (p0 ) − PC (pKn )k 6 kp0 − pKn k → 0. (28) Now suppose that ϕ(pKn ) > η (otherwise we are done). By convexity, ϕ is Lipschitz-continuous relative to compact sets [3, Corollary 8.41]. Therefore there exists ζ > 0 such that 0 < ϕ(pKn )−η = ϕ(pKn )−ϕ(PC (p0 )) 6 ζkpKn −PC (p0 )k → 0. In addition, assuming that int(C) 6= ∅, using standard error bounds on convex inequalities [26], there exists a constant ξ > 0 such that  (29) kpKn − PC (pKn )k 6 ξ ϕ(pKn ) − η → 0. Thus, kan k = kPC (p0 ) − pKn k 6 kPC (p0 ) − PC (pKn )k + kPC (pKn ) − pKn k  (30) 6 kp0 − pKn k + ξ ϕ(pKn ) − η . Thus, is suffices to take Kn large enough so that, for instance, Moreover, set a = x − y, b = y − z, χ = ha | bi, µ = kak2 , we have kp0 − pKn k 6 ξ1 /n1+ǫ and ϕ(pKn ) − η 6 ξ2 /n1+ǫ ν = kbk2, and ρ = µν − χ2 . Then the projection of x onto for some ξ1 > 0, ξ2 > 0, and ǫ > 0. This will guarantee that P H(x, y) ∩ H(y, z) is n∈N kan k < +∞ and therefore, by Theorem 1, the conver gence of the sequence (wn )n∈N generated by the following  z if ρ = 0 and χ > 0   algorithm to a solution to Problem 2.       χ for b if ρ > 0 and χν > ρ (26)  n = 0, 1, . . . Q(x, y, z) = x − 1 +  vn = wn − γn ∇Φ(wn ) ν       p0 = vn  ν    y + χa − µb if ρ > 0 and χν < ρ.  for k = 0, 1, . . . , Kn − 1 ρ     ζk = η − ϕ(pk )   To sum up, the projection of p0 onto the set C of (19) will   if ζk > 0 (31)   be performed by executing the following routine.   ⌊terminate.     sk ∈ ∂ϕ(pk ) for k = 0, 1, . . .     if ϕ(pk ) 6 η   pk+1/2 = pk + ζk sk /ksk k2    ⌊terminate.  pk+1 = Q(p0 , pk , pk+1/2 )   ζk = η − ϕ(pk ) (27) wn+1 = pKn .   sk ∈ ∂ϕ(pk )  Let us observe that, from a practical standpoint, we have found  pk+1/2 = pk + ζk sk /ksk k2 the above error analysis not to be required in our experiments pk+1 = Q(p0 , pk , pk+1/2 ). since an almost exact projection is actually obtainable with The next result from [10, Section 6.5] guarantees the conver- a few iterations of (27). For instance, numerical simulations gence of the sequence (pk )k∈N generated by (27) to the desired (see Fig. 2) on the synthetic data set described in Section IV-A point. show that (27) yields in about Kn ≈ 7 iterations a point very close to the exact projection of p0 onto C. Note that the 5 by (6). 3 2.5 2 1.5 1 0.5 0 1 2 3 4 5 6 7 Fig. 2: Convergence of the projection loop (7 iterations). number of iterations of (27) does not depend on the dimension d. for  n = 0, 1, . . .  γn ∈ [ε, (2 − ε)/β]  m X    vn = wn − γn yi φ′ yi hxi | wn i xi  m  i=1 p =v n  0  for k = 0, 1, . . . , K − 1 n     ζ = η − ϕ(p ) k   k   if ζ > 0 k     ⌊terminate.     s ∈ ∂ϕ(p ) k   k  p 2   k+1/2 = pk + ζk sk /ksk k  χ = p −p |p −p 0 k k k+1/2   k   µ = kp − p k2 0 k   k   ν = kp − p 2 k k+1/2 k   k   ρ = µ ν − χ2 k k   k k   if ρ = 0 and χ > 0 k   k   p   k+1 = pk+1/2     if ρ > 0 and χ ν > ρ k k k   k     χk   p pk+1/2 − pk   k+1 = p0 + 1 + ν   k     if ρk > 0 and χk νk < ρk       νk   p = p + p −p +µ p −p χ k+1 k k k 0 k k k+1/2  ρk wn+1 = pKn . (32) A subgradient of ϕ1 at (ξi )16i6d ∈ Rd is s = (sign(ξi ))16i6d , where   if ξ > 0 1 (33) sign : ξ 7→ 0 if ξ = 0   −1 if ξ < 0. d Remark 1 (multiple constraints) We have presented above The ith component of a subgradient of ϕ2 at (ξi )16i6d ∈ R the case of a single constraint, since it is the setting em- is given by ( ployed in subsequent sections. However, the results of [10, X sign(ξi ) if |ξi | > |ξj | (34) Section 6.5] enable us to extend this approach to problems 0 otherwise. (i,j)∈S with p constraints, see Appendix A. The ith component of a subgradient of ϕ3 at (ξi )16i6d ∈ Rd is given by ( X sign(ξi − ξj ) if ξi 6= ξj (35) 0 otherwise. (i,j)∈S C. Application to Problem 1 It follows from (5), (26), and (27), that (31) for the classification problem can be written explicitly as follows, where ε is an arbitrarily small number in ]0, 1[ and where β is given D. Application to regression A common approach in regression is to learn w ∈ Rd by employing the quadratic loss m 1 X 2 hxi | wi − yi (36) Ψ : Rd → R : w 7→ 2m i=1 instead of the function Φ of (13) in Problem 2. Since Ψ is convex and has a Lipschitz-continuous gradient with constant β = σ12 , where σ1 is the largest singular value of the matrix [x1 | · · · |xm ], it suffices to change the definition of vn in (32) by m  γn X (37) vn = wn − (hxi | wn i − yi xi . m i=1 6 IV. E XPERIMENTAL EVALUATION We illustrate the performance of the proposed constrained splitting method on both synthetic and real data sets. Example 3 This example is similar to Example 1, but we consider that 7 genes regulated by the same regulators are activated and 3 genes are inhibited. The true regressor is −5 −5 5 5 5, √ , . . ., √ , . . ., −5, √ , . . ., √ , . . ., 3, 10 10 10 10 | {z } | {z } | {z } | {z } 7 3 7 3 ! 3 −3 −3 3 √ , . . ., √ , . . ., −3, √ , . . ., √ , . . ., 0, . . ., 0 . 10 10 10 10 | {z } | {z } | {z } | {z } w= A. Synthetic data set We first simulate a simple regulatory network in genomic described in [27]. A genomic network is composed of regulators (transcription factors, cytokines, kinase, growth factors, etc.) and the genes they regulate. Our notation is as follows: • • • • 7 3 7 3 B. Breast cancer data set m: number of samples. Nreg : number of regulators. Ng : number of genes per regulator. d = Nreg (Ng + 1). The entry ξi,j of the matrix X = [x1 | · · · |xm ]⊤ , composed of m rows and d columns, is as follows. (i) The rth regulator of the ith sample is ξi,regr = ξi,Ng (r−1)+r = ξi,r(Ng +1)−Ng ∼ N (0, 1). This defines ξi,j for j of the form r(Ng + 1) − Ng . (ii) The genes associated with ξi,regr have a joint bivariate normal distribution with a correlation of ρ = 0.7  ξi,r(Ng +1)−Ng +k ∼ N ̺ ξi,regr , 1 − ̺2 . This defines ξi,j 6= r(Ng + 1) − Ng . We use the breast cancer data set [36], which consists of gene expression data for 8,141 genes in 295 breast cancer tumors (78 metastatic and 217 non-metastatic). In the time comparison evaluation, we select a subset of the 8141 genes (range 3000 to 7000) using a threshold on the mean of the genes. We use the network provided in [8] with p = 639 pathways as graph constraints in our classifier. In biological applications, pathways are genes grouped according to their biological functions [8], [27]. Two genes are connected if they belong to the same pathway. Let Si be the subset of genes that are connected to gene i. In this case, we have a subset of only 40,000 connected genes in Si . Note that we compute the subgradient (34) only on the subset Si of connected genes. C. Comparison between penalty method and our ℓ1 constrained method for classification The regression response Y is given by Y = Xw + ε, where ε ∼ N (0, σ 2 ) with σ = 2. First, we compare with the penalty approach using glmnet MATLAB software [31] on the breast cancer data set described in Section IV-B. We tuned the number of path iterations nλ for glmnet for different values of the feature dimension. The Example 1 In this example, we consider that 9 genes regnumber of nonzero coefficients kwk0 increases with nλ . The ulated by the same regulators are activated and 1 gene is glmnet method requires typically 200 path iterations or more inhibited. The true regressor is defined as (see Fig. 3). 5 −5 −5 5 5, √ , . . ., √ , . . ., −5, √ , . . ., √ , . . ., 3, 10 10 10 10 | {z } | {z } | {z } | {z } 9 1 9 1 ! −3 −3 3 3 √ , . . ., √ , . . ., −3, √ , . . ., √ , . . ., 0, . . ., 0 . 10 10 10 10 | {z } | {z } | {z } | {z } w= 9 1 9 5 −5 −5 5 5, √ , . . ., √ , . . ., −5, √ , . . ., √ , . . ., 3, 10 10 10 10 | {z } | {z } | {z } | {z } 8 2 8 2 ! −3 −3 3 3 √ , . . ., √ , . . ., −3, √ , . . ., √ , . . ., 0, . . ., 0 . 10 10 10 10 | {z } | {z } | {z } | {z } w= 2 8 200 150 1 Example 2 We consider that 8 genes regulated by the same regulators are activated and 2 genes are inhibited. The true regressor is defined as 8 250 2 100 50 0 0 20 40 60 80 100 120 140 160 180 200 Fig. 3: Glmnet: Number of nonzero coefficients as a function of nλ . Our classification implementation uses the logistic loss. Let kwk1 6 η be the surrogate sparsity constraint. Fig. 4 shows for different values of the feature dimension that the number of nonzero coefficients kwk0 decreases monotonically with the number of iterations. Consequently, the sweep search over η 7 TABLE I: Time comparison (Matlab and mex) versus glmnet [31]. Time(s) mex-sparse 0.0230 mex 0.0559 Matlab 0.169 Matlab-sparse 0.0729 mex [31] 0.198 TABLE II: Time comparison(s) with projection onto the ball [15] for dimension d = 3022 using Matlab. Time (s) Matlab 0.169 Matlab sparse 0.0729 ball [15] 0.149 TABLE III: Breast cancer AUC comparisons. 0.4 AUC (%) 0.35 glmnet [31] 64.5 Group Lasso [24] 66.7 ϕ1 71.3 ϕ2 72.3 0.3 0.25 0.2 0.15 0.1 0.05 0 1000 2000 3000 4000 5000 6000 7000 8000 Fig. 5: Computing time as a function of the dimension. consists in stopping the iterations of the algorithm when kwk0 reaches value specified a priori. 6000 5000 4000 3000 2000 1000 0 10 20 30 40 50 60 70 80 Fig. 4: Number of nonzero coefficients as a function of the number of iterations. seconds) in Table II for classification for the breast cancer data set (d = 3022) described in Section IV-B. Note that the most expensive part of our algorithm in terms of computation is the evaluation of the gradient. Although the projection onto the ball [15] is faster than our projection, our method is basically 12% slower than the specific ϕ1 constrained method for dimension d = 3022. However, our sparse implementation of scalar products is twice as fast. Moreover, since the complexity of our method relies on the computation of scalar products, it can be easily speed up using multicore CPU or Graphics Processing Unit (GPU) devices, while the speed up of the projection on the ball [15] using CPU or GPU is currently an open issue. In addition our method is more flexible since it can take into account more sophisticated constraints such as ϕ2 , ϕ3 , or any convex constraint. We evaluate classification performance using area under the ROC curve (AUC). The result of Table III show that our ϕ1 constrained method outperforms the ϕ1 penalty method by 5.8%. Our ϕ2 constraint improves slightly the AUC by 1% over the ϕ1 constrained method. We also observe a significant improvement of our constrained ϕ2 method over the penalty group Lasso approach discussed in [24]. In addition, the main benefit of the ϕ2 constraint is to provide a set of connected genes which is more relevant for biological analysis than the individual genes selected by the ϕ1 constraint. D. Comparison of various constraints for regression Our direct constrained strategy does not require the often heuristic search for meaningful and interpretable Lagrange multipliers. Moreover, we can improve processing time using sparse computing. Namely, at each iteration we compute scalar products using only the sparse sub-vector of nonzero values. We compare time processing using the breast cancer data set (n = 295 samples, d = 3022) described in Section IV-B. We provide time comparison using a 2.5 GHz Macbook Pro with an i7 processor and Matlab software. We report time processing in Table I using glmnet software [31] and our method using either Matlab ℓ1 or a standard mex ℓ1 file. Moreover, since the vector w is sparse, we provide mex-sparse and matlb-sparse times using sparse computing. Fig. 5 shows that our constrained method is ten times faster than glmnet [31]. A numerical experiment is available in [1]. A potentially competitive alternative ℓ1 constrained optimization algorithms for solving the projection part of our constrained classification splitting algorithm is that described in [15]. We plug the specific projection onto the ball algorithm into our splitting algorithm. We provide time comparison (in In biological applications, gene activation or inhibition are well known and summarized in the ingenuity pathway analysis (IPA) database [2]. We introduce this biological a priori knowledge by replacing the ϕ3 constraint by X |ωi − aij ωj |, (38) ϕ4 : w 7→ (i,j)∈S where aij = 1 if genes i and j are both activated or inhibited, and aij = −1 if gene i is activated and gene j inhibited. We compare the estimation of w for Example 3 using ϕ1 versus the ϕ2 and ϕ4 constraint. For each fold, we estimate the regression vector w on 100 training samples. Then we evaluate on new 100 testing samples. We evaluate regression using the mean square error (MSE) in the training set and the predictive mean square error (PMSE) in the test set. We use randomly half of the data for training and half for testing, and then we average the accuracy over 50 random folds. We show in Fig. 6a the true regression vector and, in Fig. 6b, the estimation using the ϕ1 constraint for Example 3. In Fig. 6c we show the results of the estimation with the ϕ2 constraint, 8 5 5 4 4 3 3 2 2 1 1 0 0 -1 -1 -2 -2 -3 -3 -4 -4 -5 0 10 20 30 40 50 60 70 80 90 100 -5 110 0 10 20 30 40 (a) 5 4 4 3 3 2 2 1 1 0 0 -1 -1 -2 -2 -3 -3 -4 -4 0 10 20 30 40 50 60 70 80 90 100 110 60 70 80 90 100 110 (b) 5 -5 50 60 70 80 90 100 -5 110 0 10 20 30 40 (c) 50 (d) Fig. 6: Example 3: (a): True vector w. (b): Estimation with the ϕ1 constraint. (c): Estimation with the ϕ2 constraint. (d): Estimation with the ϕ4 constraint. 4.5 6 4 5.5 5 3.5 4.5 3 4 2.5 3.5 2 3 1.5 2.5 2 45 50 55 60 65 70 75 80 85 90 Fig. 7: ϕ1 constraint for Examples 1, 2, and 3. Mean square error as a function of the parameter η. 1 0.4 0.45 0.5 0.55 0.6 0.65 0.7 Fig. 8: ϕ2 constraint for Examples 1, 2, and 3. Mean square error as a function of the parameter η. V. C ONCLUSION and in Fig. 6d with the ϕ4 constraint. We provide for the three examples the mean square error as a function of η for ϕ1 (Fig. 7), ϕ2 (Fig. 8), and ϕ4 (Fig. 9). We report for Example 2 in Fig. 10 the estimation of the mean square error in the training set as a function of the number of training samples for the ϕ1 , ϕ2 , and ϕ4 constraint. The ϕ4 constraint outperforms both the ϕ2 and the ϕ1 constrained method. However, the selection of the parameter η for constraint ϕ4 is more challenging. We have used constrained optimization approaches to promote sparsity and feature grouping in classification and regression problems. To solve these problems, we have proposed a new efficient algorithm which alternates a gradient step on the data fidelity term and an approximate projection step onto the constraint set. We have also discussed the generalization to multiple constraints. Experiments on both synthetic and biological data show that our constrained approach outperforms penalty methods. Moreover, the formulation using the ϕ4 constraint outperforms those using the pairwise ϕ2 and the 9 Then pk+1 = Q(p0 , pk , pk+1/2 ) → PC (p0 ) [10, Theorem 6.4] and therefore the generalization 1.2 1.1 1 0.9 0.8 0.7 0.6 0.5 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 Fig. 9: ϕ4 constraint for Examples 1, 2, and 3. Mean square error as a function of the parameter η. for  n = 0, 1, . . .  vn = wn − γn ∇Φ(wn )   p0 = vn   for k = 0, 1, . . . , Kn − 1      ζk = min16j6p ηj − ϕj (pk )     if ζk > 0     ⌊terminate.     for j = 1, . . . , p     ⌊sj,k ∈ ∂ϕj (pk )   compute pk+1/2 as in (A2)–(A4) wn+1 = pKn . (A5) of (31) solves (A1). R EFERENCES 101 100 10-1 100 200 300 400 500 600 700 800 900 1000 Fig. 10: MSE as a function of the number of samples m for Example 2. ϕ1 constraint. A PPENDIX A – T HE CASE OF MULTIPLE CONSTRAINTS Let Φ be as in Problem 2 and, for every j ∈ {1, . . . , p}, let ϕj : Rd →PR be convex, let ηj ∈ R, and let ωj ∈ ]0, 1] be p such that j=1 ωj = 1. Consider the problem minimize Φ(w). ϕ1 (w)6η1 .. . (A1) ϕp (w)6ηp  In other words, C = j=1 w ∈ Rd ϕj (w) 6 ηj in (16). Let k ∈ N. For every j ∈ {1, . . . , p}, let sj,k ∈ ∂ϕj (pk ) and set  p + ηj − ϕj (pk ) s if ϕj (pk ) > ηj j,k k ksj,k k2 (A2) pj,k =  pk if ϕj (pk ) 6 ηj . Tp Now define pk+1/2 = pk + Lk p X j=1 where Lk = p X j=1 ! ωj pj,k − pk , (A3) ωj kpj,k − pk k2 p X j=1 2. ωj pj,k − pk (A4) [1] http://www.i3s.unice.fr/~barlaud/code.html [2] http://www.ingenuity.com/products/ipal [3] H. H. Bauschke and P. L. Combettes, Convex Analysis and Monotone Operator Theory in Hilbert Spaces, 2nd ed. Springer, New York, 2017. [4] W. Belhajali, R. Nock, and M. Barlaud, “Boosting stochastic Newton with entropy constraint for large-scale image classification,” in Proc. 22nd Int. Conf. Pattern Recognit. (ICPR-14), 2014, pp. 232–237. [5] H. D. Bondell and B. J. Reich, “Simultaneous regression shrinkage, variable selection, and supervised clustering of predictors with OSCAR,” Biometrics, vol. 64, pp. 115–123, 2008. [6] E. J. Candès, “The restricted isometry property and its implications for compressed sensing,” C. R. Acad. Sci. Paris Sér. I, vol. 346, pp. 589–592, 2008. [7] Y. Censor and A. Lent, “Cyclic subgradient projections,” Math. Programming, vol. 24, pp. 233–235, 1982. [8] H.-Y. Chuang, E. Lee, Y.-T. Liu, D. Lee, and T. Ideker, “Network-based classification of breast cancer metastasis,” Mol. Syst. Biol., vol. 3, pp. 1175–1182, 2007. [9] P. L. Combettes, “Convex set theoretic image recovery by extrapolated iterations of parallel subgradient projections," IEEE Trans. Image Processing, vol. 6, pp. 493–506, 1997. [10] P. L. Combettes, “Strong convergence of block-iterative outer approximation methods for convex optimization,” SIAM J. Control Optim., vol. 38, pp. 538–565, 2000. [11] P. L. Combettes and J. C. Pesquet, “Image restoration subject to a total variation constraint," IEEE Trans. Image Process., vol. 13, pp. 1213– 1222, 2004. [12] P. L. Combettes and J.-C. Pesquet, “Proximal thresholding algorithm for minimization over orthonormal bases,” SIAM J. Optim., vol. 18, pp. 1351-1376, 2007. [13] P. L. Combettes and J.-C. Pesquet, “Proximal splitting methods in signal processing,” in Fixed-Point Algorithms for Inverse Problems in Science and Engineering. Springer, 2011, pp. 185–212. [14] P. L. Combettes and V. R. Wajs, “Signal recovery by proximal forwardbackward splitting,” Multiscale Model. Simul., vol. 4, pp. 1168–1200, 2005. [15] L. Condat, “Fast projection onto the simplex and the l1 ball,” Math. Programming, vol. A158, pp. 575–585, 2016. [16] I. Daubechies, R. DeVore, M. Fornasier, and C. S. Güntürk, “Iteratively reweighted least squares minimization for sparse recovery,” Comm. Pure Appl. Math., vol. 63, pp. 1–38, 2010. [17] D. L. Donoho and M. Elad, “Optimally sparse representation in general (nonorthogonal) dictionaries via ℓ1 minimization,” Proc. Natl. Acad. Sci. USA, vol. 100, pp. 2197–2202, 2003. [18] D. L. Donoho and B. F. Logan, “Signal recovery and the large sieve,” SIAM J. Appl. Math., vol. 52, pp. 577–591, 1992. [19] D. L. Donoho and P. B. Stark, “Uncertainty principles and signal recovery,” SIAM J. Appl. Math., vol. 49, pp. 906–931, 1989. [20] M. A. T. Figueiredo and R. D. Nowak, “Ordered weighted ℓ1 regularized regression with strongly correlated covariates: Theoretical aspects,” Proc. 19th Int. Conf. Artif. Intell. Stat. (AISTATS), Cadiz, Spain, 2016. [21] J. Friedman, T. Hastie, and R. Tibshirani, “Regularization paths for generalized linear models via coordinate descent,” J. Stat. Software, vol. 33, pp. 1–22, 2010. 10 [22] T. Hastie, S. Rosset, R. Tibshirani, and J. Zhu, “The entire regularization path for the support vector machine,” J. Mach. Learn. Res., vol. 5, pp. 1391–1415, 2004. [23] Y. Haugazeau, Sur les Inéquations Variationnelles et la Minimisation de Fonctionnelles Convexes. Thèse de doctorat, Université de Paris, 1968. [24] L. Jacob, G. Obozinski, and J.-P. Vert, “Group lasso with overlap and graph lasso,” in Proc. 26th Int. Conf. Mach. Learn. (ICML-09), 2009, pp. 353–360. [25] E. S. Levitin and B. T. Polyak, “Constrained minimization methods," USSR Comput. Math. Math. Phys., vol. 6, pp. 1–50, 1966. [26] A. S. Lewis and J.-S. Pang, “Error bounds for convex inequality systems,” in Generalized Convexity, Generalized Monotonicity: Recent Results. Springer, 1998, pp. 75–110. [27] C. Li and H. Li, “Network-constrained regularization and variable selection for analysis of genomic data,” Bioinformatics, vol. 24, pp. 1175–1182, 2008. [28] J. Mairal and B. Yu, “Complexity analysis of the lasso regularization path,” in Proc. 29th Int. Conf. Mach. Learn. (ICML-12), 2012, pp. 353– 360. [29] K. Matusita, “Distance and decision rules,” Ann. Inst. Statist. Math., vol. 16, pp. 305–315, 1964. [30] S. Mosci, L. Rosasco, M. Santoro, A. Verri, and S. Villa, “Solving structured sparsity regularization with proximal methods,”in Machine Learning and Knowledge Discovery in Databases. Springer, 2010, pp. 418–433. [31] J. Qian, T. Hastie, J. Friedman, R. Tibshirani, and N. Simon, “Glmnet for matlab,” http://web.stanford.edu/~hastie/glmnet_matlab/, 2013. [32] M. Schmidt, N. L. Roux, and F. R. Bach, “Convergence rates of inexact proximal-gradient methods for convex optimization,” in Advances in Neural Information Processing Systems, 2011, pp. 1458–1466. [33] S. Sra, S. Nowozin, and S. J. Wright, Optimization for Machine Learning. MIT Press, Cambridge, MA, 2012. [34] R. Tibshirani, Regression shrinkage and selection via the lasso, J. Roy. Stat. Soc., vol. B58, pp. 267–288, 1996. [35] R. Tibshirani, M. Saunders, S. Rosset, J. Zhu, and K. Knight, “Sparsity and smoothness via the fused lasso,” J. Roy. Stat. Soc., vol. B67, pp. 91–108, 2005. [36] M. J. van De Vijver et al., “A gene-expression signature as a predictor of survival in breast cancer,” New Engl. J. Med., vol. 347, pp. 1999–2009, 2002. 3500 3000 2500 2000 1500 1000 500 0 10 20 30
10math.ST
Compressing Convolutional Neural Networks arXiv:1506.04449v1 [cs.LG] 14 Jun 2015 Wenlin Chen, James T. Wilson Washington University in St. Louis {wenlinchen, j.wilson}@wustl.edu Stephen Tyree NVIDIA, Santa Clara, CA, USA [email protected] Kilian Q. Weinberger, Yixin Chen Washington University in St. Louis [email protected], [email protected] Abstract Convolutional neural networks (CNN) are increasingly used in many areas of computer vision. They are particularly attractive because of their ability to “absorb” great quantities of labeled data through millions of parameters. However, as model sizes increase, so do the storage and memory requirements of the classifiers. We present a novel network architecture, Frequency-Sensitive Hashed Nets (FreshNets), which exploits inherent redundancy in both convolutional layers and fully-connected layers of a deep learning model, leading to dramatic savings in memory and storage consumption. Based on the key observation that the weights of learned convolutional filters are typically smooth and low-frequency, we first convert filter weights to the frequency domain with a discrete cosine transform (DCT) and use a low-cost hash function to randomly group frequency parameters into hash buckets. All parameters assigned the same hash bucket share a single value learned with standard back-propagation. To further reduce model size we allocate fewer hash buckets to high-frequency components, which are generally less important. We evaluate FreshNets on eight data sets, and show that it leads to drastically better compressed performance than several relevant baselines. 1 Introduction In the recent years convolutional neural networks (CNN) have lead to impressive results in object recognition [17], face verification [24] and audio classification [20]. Problems that seemed impossibly hard only five years ago can now be solved at better than human accuracy [15]. Although CNNs have been known for a quarter of a century [12], only recently have their superb generalization abilities been accepted widely across the machine learning and computer vision communities. This broad acceptance coincides with the release of very large collections of labeled data [9]. Deep networks and CNNs are particularly well suited to learn from large quantities of data, in part because they can have arbitrarily many parameters. As data sets grow, so do model sizes. In 2012, the first winner of the ImageNet competition that used a CNN had already 240MB of parameters and the most recent winning model, in 2014, required 567MB [26]. Independently, there has been another parallel shift of computing from servers and workstations to mobile platforms. As of January 2014 there have already been more web searches through smart phones than computers1 . Today speech recognition is primarily used on cell phones with intelligent assistants such as Apple’s Siri, Google Now or Microsoft’s Cortana. As this trend continues, we are expecting machine learning applications to also shift increasingly towards mobile devices. However, the disjunction of deep learning with ever increasing model sizes and mobile computing reveals 1 http://tinyurl.com/omd58sq 1 an inherent dilemma. Mobile devices have tight memory and storage limitations. For example, even the most recent iPhone 6 only features 1GB of RAM, most of which must be used by the operating system or the application itself. In addition, developers must make their apps compatible with the most limited phone still in circulation, often restricting models to just a few megabytes of parameters. In response, there has been a recent interest in reducing the model sizes of deep networks. Denil et al. [10] use low-rank decomposition of the weight matrices to reduce the effective number of parameters in the network. Bucilu et al. [4] and Ba et al. [1] show that complex models can be compressed into 1-layer neural networks. Independently, the model size of neural networks can be reduced effectively through reduced bit precision [7]. In this paper we propose a novel approach for neural network compression targeted especially for CNNs. We build on recent work by Chen et al. [5], who show that weights of fully connected networks can be effectively compressed with the hashing trick [30]. Due to the nature of local pixel correlation in images (i.e. spatial locality), filters in CNNs tend to be smooth. We transform these filters into frequency domain with the discrete cosine transform (DCT) [22]. In frequency space, the filters are naturally dominated by low frequency components. Our compression takes this smoothness property into account and randomly hashes the frequency components of all CNN filters at a given layer into one common set of hash buckets. All components inside one hash bucket share the same value. As lower frequency components are more pronounced than higher frequencies, we allow collisions only between similar frequencies and allocate fewer hash buckets for the high frequencies (which are less important). Our approach has several compelling properties: 1. The number of parameters in the CNN is independent of the number of convolutional filters; 2. During testing we only need to add a low-cost hash function and the inverse DCT transformation to any existing CNN code for filter reconstruction; 3. During training, the hashed weights can be learned with simple back-propagation [2]—the gradient of a hash bucket value is the sum of gradients of all hashed frequency components in that bucket. We evaluate our compression scheme on eight deep learning image benchmark data sets and compare against four competitive baselines. Although all compression schemes lead to lower test accuracy as the compression increases, our FreshNets method is by far the most effective compression method and yields the lowest generalization error rates on almost all classification tasks. 2 Background Feature Hashing (a.k.a the hashing trick) [8, 25, 30] has been previously studied as a technique for reducing model storage size. In general, it can be regarded as a dimensionality reduction method that maps an input vector x ∈ Rd to a much smaller feature space via a mapping φ : Rd → Rk where k  d. The mapping φ is a composite of two approximately uniform auxiliary hash functions h : N → {1, . . . , k} and ξ : N → {−1, +1}. The j th element of the k-dimensional hashed input is defined as X φj (x) = ξ(i) xi . i:h(i)=j As shown in [30], a key property of feature hashing is its preservation of inner product operations, where inner products after hashing produce the correct pre-hash inner product in expectation: E[φ(x)> φ(y)]φ = x> y. This property holds because of the bias correcting sign factor ξ(i). With feature hashing, models are directly learned in the much smaller space Rk , which not only speeds up training and evaluation but also significantly conserves memory. For example, a linear classifier in the original space could occupy O(d) memory for model parameters, but when learned in the hashed space only requires O(k) parameters. The information loss induced by hash collision is much less severe for sparse feature vectors and can be counteracted through multiple hashing [25] or larger hash tables [30]. Discrete Cosine Transform (DCT) [22]. Methods built on the DCT are widely used for compressing images and movies, including forming the standard technique for JPEG [29]. DCT expresses a function as a weighted combination of sinusoids of different phases/frequencies where the weight of each sinusoid reflects the magnitude of the corresponding frequency in the input. When employed 2 with sufficient numerical precision and without quantization or other compression operations, the DCT and inverse DCT (projecting frequency inputs back to the spatial domain) are lossless. Compression is made possible in images by local smoothness of pixels (e.g. a blue sky) which can be well represented regionally by fewer non-zero frequency components. Though highly related to the discrete Fourier transformation (DFT), DCT is often preferable for compression tasks because of its spectral compaction property where weights for most images tend to be concentrated in a few low-frequency components of the DCT [22]. Further, the DCT transformation yields a real-valued representation, unlike the DFT whose representation has imaginary components. Given an input matrix V ∈ Rd×d , the corresponding matrix V ∈ Rd×d in frequency domain after DCT is defined as: Vj1 j2 = sj1 sj2 d−1 X d−1 X c(i1 , i2 , j1 , j2 ) Vi1 i2 , (1) i1 =0 i2 =0         π 1 π 1 where c(i1 , i2 , j1 , j2 ) = cos i1 + j1 cos i2 + j2 d 2 d 2 q q is the cosine basis function, and sj = d1 when j = 0 and sj = d2 otherwise. We use the shorthand fdct to denote the DCT operation in Eq. (1), i.e. V = fdct (V ). The inverse DCT converts V from the frequency domain back to the spatial domain, reconstructing V without loss: Vi1 i2 = d−1 d−1 X X j1 =0 j2 =0 sj1 sj2 c(i1 , i2 , j1 , j2 ) Vj1 j2 . (2) −1 −1 We denote the inverse DCT function in Eq. (2) as fdct , i.e. V = fdct (V). Filters in spatial and frequency domain. Let the matrix V k` ∈ Rd×d denote the weight matrix of the d × d convolutional filter that connects the k th input plane to the `th output plane. (For notational convenience we assume square filters and only consider the filters in a single layer of the network.) The weights of all filters in a convolutional layer can be denoted by a 4-dimensional tensor V ∈ Rm×n×d×d where m and n are the number of input planes and output planes, respectively, resulting in a total of m × n × d2 parameters. Convolutional filters can be represented equivalently in either the spatial or frequency domain, mapping between the two via the DCT and its inverse. We denote the filter in frequency domain as V k` = fdct (V k` ) ∈ Rd×d and recover the orig−1 inal spatial representation through V k` = fdct (V k` ), as defined in Eq. (1) and (2), respectively. The tensor of all filters is denoted V ∈ Rm×n×d×d . w w0 3.2 w1 2.9 2.5 hj , ⇠ frequency domain Here we present FreshNets, a method for using weight sharing to reduce the model size (and memory demands) of convolutional neural networks. Similar to the work of Chen et al. [5], we achieve smaller models by randomly forcing weights throughout the network to share identical values. Unlike previous work, we implement the weight sharing and gradient updates of convolutional filters in the frequency domain. These sharing constraints are made prior to training, and we learn frequency weights under the sharing assignments. Since the assignments are made with a hash function, they incur no additional storage. weights Frequency-Sensitive Hashed Nets V -2.1 w2 -0.5 1.5 reconstruct virtual frequencies w3 w4 1.1 1.3 hj , ⇠ 3.2 -2.1 -0.5 2.9 2.5 1.5 2.5 1.5 1.1 -2.1 -0.5 1.1 -0.5 1.1 1.3 -0.5 1.1 1.3 fdct1 V spatial domain 3 map to spatial domain fdct1 2.6 1.1 2.2 2.0 -1.8 2.2 -0.7 2.4 2.3 1.5 1.4 0.7 -1.6 0.4 0.9 3.5 1.2 0.4 Filter 1 Filter 2 Figure 1: A schematic illustration of FreshNets. Two spatial filters are reconstructed from the frequency weights in vector w. The frequency weights are accessed with two hash functions and then transformed to the spatial domain. The vector w is partitioned into subvectors wj shared by all entries with similar frequency (corresponding to index sum j = j1 + j2 ). Colors indicate which hash bucket was accessed. Random Weight Sharing by Hashing. We would like to reduce the number of model parameters to exactly K values stored in a weight vector w ∈ RK , where K  m × n × d2 . To achieve this, we 3 randomly assign a value from w to each filter frequency weight in V. A naı̈ve implementation of this random weight sharing would introduce an auxiliary matrix for V to track the weight assignments, using to significant additional memory. To address this problem, Chen et al. [5] advocate use of the hashing trick to (pseudo-)randomly assign shared parameters. Using the hashing trick, we tie each to an element of w indexed by the output of a hash function h(·): filter weight Vjk` 1 j2 Vjk` = ξ(k, `, j1 , j2 ) wh(k,`,j1 ,j2 ) , 1 ,j2 (3) where h(k, `, j1 , j2 ) ∈ {1, · · · , K}, and ξ(k, `, j1 , j2 ) ∈ {±1} is a sign factor computed by a second hash function ξ(·) to preserve inner-products in expectation as described in Section 2. With the mapping in Eq. (3), we can implement shared parameter assignments with no additional storage cost. (For a schematic illustration, see Figure 1. The figure also incorporates a frequency sensitive hashing scheme discussed later in this section.) Gradients over Shared Frequency Weights. Typical convolutional neural networks learn filters in the spatial domain. As our shared weights are stored in the frequency domain, we derive the gradient with respect to filter parameters in frequency space. Following Eq. (2), we express the gradient of parameters in the spatial domain w.r.t. their counterparts in the frequency domain: ∂Vik` 1 i2 = sj1 sj2 c(i1 , i2 , j1 , j2 ). ∂Vjk` 1 j2 (4) Let L be the loss function adopted for training. Using standard back-propagation, we can derive the gradient w.r.t. filter parameters in the spatial domain, ∂V∂L k` . By the chain rule with Eq. (4), we i1 i2 express the gradient of L in the frequency domain: d−1 X d−1 d−1 X d−1 X X ∂L ∂Vik` ∂L ∂L 1 i2 = = s . s c(i1 , i2 , j1 , j2 ) j j 1 2 k` k` k` ∂Vj1 j2 ∂Vi1 i2 ∂Vj1 j2 ∂Vik` 1 i2 i =0 i =0 i =0 i =0 1 2 1 (5) 2 Comparing with Eq. (1), we see that the gradient in the frequency domain is merely the DCT of the gradient in the spatial domain:   ∂L ∂L = fdct . (6) ∂V k` ∂V k` We compute gradient for each shared weight wh by simply summing over the gradient at each filter parameter where the weight is assigned, i.e. all Vjk` where h = h(k, `, j1 , j2 ): 1 j2    m X n X d−1 X d−1 X X ∂L ∂L ∂Vjk` ∂L 1 j2 (7) = = ξ(k, `, j , j ) f 1 2 dct ∂wh ∂wh ∂Vjk` ∂V k` j1 j2 1 j2 k=0 `=0 j1 =0 j2 =0 k,`,j1 ,j2 : h=h(k,`,j1 ,j2 ) where [A]j1 j2 denotes the (j1 , j2 ) entry in matrix A. er cy gh n hi ue q fre Frequency Sensitive Hashing. Figure 2 shows a filter in spatial (left) and frequency (right) domains. In the spatial domain CNN filters are smooth [17] due to the local pixel smoothness in natural images. In the frequency domain this corresponds to components with large magnitudes in the low frequencies, depicted in the upper V k` Vk` left half of V k` in Figure 2. Correspondingly, the high frequencies, k` in the bottom right half of V , have magnitudes near zero. Figure 2: An example of a As components of different frequency groups tend to be of different filter in spatial (left) and fremagnitudes (and thereby varying importance to the spatial structure quency domain (right). of the filter), we want to avoid collisions between high and low frequency components. Therefore, we assign separate hash spaces to different frequency groups. In 0 2d−2 particular, of sizes K0 , . . . , K2d−2 , P we partition the K values of w into sub-vectors w , . . . , w where j Kj = K. This partitioning allows parameters with the same frequency, corresponding to their index sum j = j1 + j2 , to be hashed into a corresponding dedicated hash space wj . We rewrite Eq. (3) with the new frequency sensitive shared weight assignments: Vjk` = ξ(k, `, j1 , j2 ) whj j (k,`,j1 ,j2 ) 1 ,j2 4 where hj (·) maps an input key to a natural number in {1, · · · , Kj } and j = j1 +j2 . We define a compression rate rj ∈ (0, 1] for each frequency region j and assign Kj = rj Nj . A smaller rj induces more collisions during hashing, leading to increased weight sharing. Since lower frequency components tend to be of higher importance, making collisions more hurtful, we commonly assign larger rj (fewer collisions) to low-frequency regions. Intuitively, given a size budget for the whole convolutional layer, we want to squeeze the hash space of high frequency region to save space for low frequency regions. These compression rates can either be assigned by hand or determined programmatically by cross-validation, as demonstrated in Section 5. 4 Related Work Several recent studies have confirmed that there is significant redundancy in the parameters learned in deep neural networks. Recent work by Denil et al. [10] learns parameters in fully-connected layers after decomposition into two low-rank matrices, i.e. W = AB where W ∈ Rm×n , A ∈ Rm×k and B ∈ Rk×n . In this way, the original O(mn) parameters could be stored with O(k(m + n)) storage, where k  min(m, n). Several works apply related approaches to speed up the evaluation time with convolutional neural networks. Two works propose to approximate convolutional filters by a weighted linear combination of basis filters [23, 16]. In this setting, the convolution operation only needs to be performed with the small set of basis filters. The desired output feature maps are computed by matrix multiplication as the weighted sum of these basis convolutions. Further speedup can be achieved by learning rank-one basis filters so that the convolution operations are very cheap to compute [11, 19]. Based on this idea, Denton et al. [11] advocate decomposing the four-dimensional tensor of the filter weights into a sum of different rank-one, four-dimensional tensors. In addition, they adopt bi-clustering to group filters such that each subgroup can be better approximated by rank-one tensors. In each of these works, evaluation time is the main focus, with any resulting storage reduction achieved merely as a side effect. Other works focus entirely on compressing the fully-connected layers of CNNs [13, 31]. However, with the trend toward architectures with fewer fully connected layers and additional convolutional layers [27], compression of filters is of increased importance. Another technique for speeding up convolutional neural network evaluation is computing convolutions in the Fourier frequency domain, as convolution in the spatial domain is equivalent to (comparatively lower-cost) element-wise multiplication in the frequency domain [21, 28]. Unlike FreshNets, for a filter of size d × d and an image of size n × n where n > d, Mathieu et al. [21] convert the filter to its frequency domain of size n × n by oversampling the frequencies, which is necessary for doing element-wise multiplication with a larger image but also increases the memory overhead at test time. Training in the Fourier frequency domain may be advantageous for similar reasons, particularly when convolutions are being performed over large 3-D volumes [3]. Most relevant to this work is HashedNets [5] which compresses the fully connected layers of deep neural networks. This method uses the hashing trick to efficiently implement parameter sharing prior to learning, achieving notable compression with less loss of accuracy than the competing baselines which relied on low-rank decomposition or learning in randomly sparse architectures. 5 Experimental Results In this section, we conduct several comprehensive experiments on benchmark datasets to evaluate the performance of FreshNets. Datasets. We experiment with eight benchmark datasets: CIFAR 10, CIFAR 100, SVHN and five challenging variants of MNIST. The CIFAR 10 dataset contains 60000 images of 32 × 32 pixels with three color channels. Images are selected from ten classes with each class consisting of 6000 unique instances. The CIFAR 100 dataset also contains 60000 32 × 32 images, but is more challenging since the images are selected from 100 classes (each class has 600 images). For both CIFAR datasets, 50000 images are designated for training and the remaining 10000 images for testing. To improve accuracy on CIFAR 100, we augment by horizontal reflection and cropping [17], resulting in 0.8M training images. The SVHN dataset is a large collection of digits (10 classes) cropped from realworld scenes, consisting of 73257 training images, 26032 testing images and 531131 less difficult 5 Layer Operation Input dim. Inputs Outputs C size MP size Parameters 1 C,RL 32×32 3 32 5×5 2K 2 C,MP,DO,RL 32×32 32 64 5×5 2×2(2) 51K 3 C,RL 16×16 64 64 5×5 102K 4 C,MP,DO,RL 16×16 64 128 5×5 2×2(2) 205K 5 C,MP,DO,RL 8×8 128 256 5×5 2×2(2) 819K 6 FC,Softmax − 4096 10/100 40/400K Table 1: Network architecture. C: Convolution. RL: ReLu. MP: Max-pooling. DO: Dropout. FC: Fully-connected. The number of parameters in the fully-connected layer is specific to 32×32 input images and varies with the number of classes, either 10 or 100 depending on the dataset. CIFAR 10 CIFAR 100 SVHN MNIST-07 ROT BG - ROT BG - RAND BG - IMG (a) Compression= 1/16 CNN DropFilt DropFreq LRD HashedNets FreshNets 14.91 54.87 30.45 23.23 24.70 21.42 33.66 81.17 55.93 51.88 48.64 47.49 3.71 30.93 14.96 10.67 9.00 8.01 0.80 4.90 2.20 1.18 1.10 0.94 3.42 29.74 8.39 4.79 5.53 3.87 11.42 88.88 56.63 20.19 16.15 18.43 2.17 90.10 8.83 2.94 2.80 2.63 2.61 89.41 27.89 4.35 3.26 3.97 CNN 14.37 33.76 3.69 0.85 3.32 11.28 1.77 2.38 (b) Compression= 1/64 LRD HashedNets FreshNets 34.35 43.08 30.79 66.44 67.06 62.33 22.32 23.31 18.37 1.95 1.77 1.24 9.90 10.10 6.60 35.64 32.40 27.91 4.57 5.10 3.62 7.23 6.68 8.04 Table 2: Test error rates (in %) with compression factors 1/16 and 1/64. Convolutional layers were compressed by the indicated methods (DropFilt, DropFreq, LRD, HashedNets, and FreshNets), with no convolutional layer compression applied to CNN. The fully connected layer is compressed by HashNets for all methods, including CNN. images for additional training. In our experiments, we use all available training images, for a total of 604388 training samples. For the MNIST variants [18], each variation either reduces the training size (MNIST-07) or amends the original digits by rotation (ROT), background superimposition (BG RAND and BG - IMG ), or a combination thereof ( BG - ROT ). We preprocess all datasets with whitening (except CIFAR 100 and SVHN which were prohibitively large). Baselines. We compare the proposed FreshNets with four baseline methods: HashedNets [5], low-rank decomposition (LRD) [10], filter dropping (DropFilt) and frequency dropping (DropFreq). HashedNets was first proposed to compress fully-connected layers in deep neural networks via the hashing trick. In this baseline, we apply the hashing trick directly to the convolutional layer by hashing filter weights in the spatial domain. This induces random weight sharing across all filters in a single convolutional layer. Additionally, we compare against low-rank decomposition of the convolutional filters [10]. Following the method in [11], we unfold the four-dimensional filter tensor to form a two dimensional matrix on which we apply the low-rank decomposition. The parameters of the decomposition are fine-tuned via back-propagation. DropFreq learns parameters in the DCT frequency domain but sets high frequency components to 0 to meet the compression requirement. DropFilt compresses simply by reducing the number of filters in each convolutional layer. All methods were implemented using Torch7 [6] and run on NVIDIA GTX TITAN graphics cards with 2688 cores and 6GB of global memory. Model parameters are stored and updated as 32 bit floating-point values.2 Comprehensive evaluation. We adopt the network network architecture shown in Table 1 for all datasets. The architecture is a deep convolutional neural network consisting of five convolutional layers (with 5 × 5 filters) and one fully-connected layer. Before convolution, input feature maps are zero-padded such that output maps remain the same size as the (un-padded) input maps after convolution. Max-pooling is performed after convolutions in layers 2, 4 and 5 with filter size 2 × 2 and stride 2, reducing both input map dimensions by half. Rectified linear units are adopted as the activation function throughout. The output of the network is a softmax function over labels. 2 The compression rates of all methods could be further improved by learning and storing parameters in lower precision [7, 14]. 6 Test Error (%) In this architecture, the convolu10 Standard Standard CNN CNN 40 tional layers hold the majority of LRD LRD 8 HashedNets HashedNets parameters (1.2 million in convo30 FreshNets freshCNN lutional layer v.s. 40 thousand 6 in the fully connected layer with 20 4 10 output classes). During train10 2 ing, we optimize parameters using mini-batch gradient descent 0 0 1/64 1/16 1/4 1 1/64 1/16 1/4 1 with batch size 64 and momencompression factor tum 0.9. We use 20 percent of the training set as a validation set Figure 3: Test error rates at varying compression levels for for early stopping. For FreshNets, datasets CIFAR 10 (left) and ROT (right). we use a frequency-sensitive compression scheme which increases weight sharing among higher frequency components.3 For all baselines, we apply HashedNets [5] to the fully connected layer at the corresponding level of compression. All error results are reported on the test set. Table 2(a) and (b) show the comprehensive evaluation of all methods under compression ratios 1/16 and 1/64, respectively. We exclude DropFilt and DropFreq in Table 2(b) because neither supports 1/64 compression in this architecture for all layers. For all methods, the fully connected layer (top layer) is compressed by HashedNets [5] at the corresponding compression rate. In this way, the final size of the entire network respects the specified compression ratio. For reference, we also show the error rate of a standard convolutional neural network (CNN, columns 2 and 8) with the fully-connected layer compressed by HashedNets and no compression in the convolutional layers. Excluding this reference, we highlight the method with best test error on each dataset in bold. 0.5 Normalized Test Error Normalized Test Error 1.4 1.4 alpha=0.2; beta=2.5; Classification Error err=0.94 alpha=0.5; 1.3 1.3 beta=0.5; err=0.97 alpha=1.0; beta=1.0; err=1.00 alpha=2.0; beta=2.0; err=1.04 1.1 1.1 alpha=2.5; beta=0.2; err=1.34 0.4 Compression Ratio We discern several general trends. In Table 2(a), we observe the performance of the DropFilt and DropFreq at 1/16 compression. At this compression rate, DropFilt corresponds to a network 1/16 filters at each layer: 2, 4, 4, 8, 16 at layers 1−5 respectively. This architecture yields particularly poor test accuracy, including essentially random predictions on three datasets. DropFreq, which at 1/16 compression parameterizes each filter in the original network by only 1 or 2 low-frequency values in the DCT frequency space, performs with similarly poor accuracy. Low rank decomposition (LRD) and HashedNets each yield similar performance at both 1/16 and 1/64 compression. Neither explicitly considers the smoothness inherent in learned convolutional filters, instead compressing the filters in the spatial domain. Our method, FreshNets, consistently outperforms all baselines, particularly at the higher compression rate as shown in Table 2(b). Using the same model in Table 1, Figure 3 shows more complete curves of test errors with multiple compression factors on the CIFAR 10 and ROT datasets. 1.2 1.2 0.3 11 0.9 0.9 1 2 ↵ 0.2 0.5 0.2 2.5 0.5 3 1.0 1.0 4 2.0 2.0 5 2.5 0.2 0.1 0 2 4 6 Frequency Partition Index 8 Figure 4: Results with different frequency sensitive compression schemes, each adopting a different beta distribution as the compression rate for each frequency. The inner figure shows normalized test error of each scheme on CIFAR 10 with the beta distribution hyper-parameters. The outer figure depicts the five beta distributions (with colors matching the inner figure). Varying compression by frequency. As mentioned in Section 3, we allow a higher collision rate in the high frequency components than in the low frequency components for each filter. To demonstrate the utility of this scheme, we evaluate several hash compression schemes. Systematically, we set the compression rate of the j th frequency band rj with a parameterized function, i.e. rj = f (j). 3 We evaluate several frequency-sensitive schemes later in this section, but for this comprehensive evaluation we set frequency compression rates by a rescaled beta distribution with α = 0.25 and β = 2.5 for all layers. 7 (a) Standard CNN (b) FreshNets (c) HashedNets Figure 5: Visualization of filters learning on MNIST in (a) an uncompressed CNN, (b) a CNN compressed with FreshNets, and (c) a CNN compressed with HashedNets (compression rate 1/16 in both (b) and (c)). FreshNets preserves the smoothness of the filters, whereas HashedNets does not. j+1 In this experiment, we use the beta distribution: f (j; α, β) = Zxα−1 (1 − x)β−1 , where x = 2k−1 is a real number between 0 and 1, k is the filter size, and Z is a normalizing factor such that the P2k−2 resulting distribution of parameters meets the target parameter budget K, i.e. j=0 rj Nj = K. We adjust α and β to control the compression rate for each frequency region. As shown in Figure 4, we have multiple pairs of α and β, each of which results in a different compression scheme. For example, if α = 0.25 and β = 2.5, the compression rate monotonically decreases as a function of component frequency, meaning more parameter sharing among high frequency components (blue curve in Figure 4). To quickly evaluate the performance of each scheme, we use a simple four-layer FreshNets where the first two layers are DCT-hashed convolutional layers (with 5 × 5 filters) containing 32 and 64 feature maps respectively, and the last two layers are fully connected layers. We test FreshNets on CIFAR 10 with each of the compression schemes shown in Figure 4. In each, weight sharing is limited to be within groups of similar frequencies, as described in Section 3, however number of unique weights shared within each group is varied. We denote the compression scheme with α, β = 1 (red curve) as a frequency-oblivious scheme since it produces a uniform compression independent of frequency. In the inset bar plot in Figure 4, we report test error normalized by the test error of the frequency-oblivious scheme and averaged over compression rates 1, 1/2, 1/4, 1/16, 1/64, and 1/256. We can see that the proposed scheme with fewer shared weights allocated to high frequency components (represented by the blue curve) outperforms all other compression schemes. An inverse scheme where the high frequency regions have the lowest collision rate (purple curve) performs the worst. These empirical results fit our assumption that the low frequency components of a filter are more important than the high frequency components. Filter visualization. We investigate the smoothness of the learned convolutional filters in Figure 5 by visualizing the filter weights (first layer) of (a) a standard, uncompressed CNN, (b) FreshNets, and (c) HashedNets (with weight sharing in the spatial domain). For this experiment, we again apply a four layer network with two convolutional layers but adopt larger filters (11 × 11) for better visualization. All three networks are trained on MNIST, and both FreshNets and HashedNets have 1/16 compression on the first convolutional layer. When plotting, we scale the values in each filter matrix to the range [0, 255]. Hence, white and black pixels stand for large positive and negative weights, respectively. We observe that, although more blurry due to the compression, the filter weights of FreshNets are still smooth while weights in HashedNets appear more chaotic. 6 Conclusion In this paper we present FreshNets, a method for learning convolutional neural networks with dramatically compressed model storage. Harnessing the hashing trick for parameter-free random weight sharing and leveraging the smoothness inherent in convolutional filters, FreshNets compresses parameters in a frequency-sensitive fashion such that significant model parameters (e.g. low-frequency components) are better preserved. As such, FreshNets preserves prediction accuracy significantly better than competing baselines at high compression rates. 8 References [1] J. Ba and R. Caruana. Do deep nets really need to be deep? In NIPS, pages 2654–2662, 2014. [2] C. M. Bishop. Neural Networks for Pattern Recognition. Oxford University Press, Inc., 1995. [3] T. Brosch and R. Tam. Efficient training of convolutional deep belief networks in the frequency domain for application to high-resolution 2d and 3d images. Neural Computation, 27(1):211–227, 2015. [4] C. Bucilua, R. Caruana, and A. Niculescu-Mizil. Model compression. In KDD, 2006. [5] W. Chen, J. T. Wilson, S. Tyree, K. Q. Weinberger, and Y. Chen. Compressing neural networks with the hashing trick. In ICML, 2015. [6] R. Collobert, K. Kavukcuoglu, and C. Farabet. Torch7: A matlab-like environment for machine learning. In BigLearn, NIPS Workshop, 2011. [7] M. Courbariaux, Y. Bengio, and J.-P. David. Low precision storage for deep learning. arXiv preprint arXiv:1412.7024, 2014. [8] A. Dasgupta, R. Kumar, and T. Sarlós. A sparse johnson: Lindenstrauss transform. In Proceedings of the forty-second ACM symposium on Theory of computing, pages 341–350. ACM, 2010. [9] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 248–255. IEEE, 2009. [10] M. Denil, B. Shakibi, L. Dinh, N. de Freitas, et al. Predicting parameters in deep learning. In NIPS, 2013. [11] E. L. Denton, W. Zaremba, J. Bruna, Y. LeCun, and R. Fergus. Exploiting linear structure within convolutional networks for efficient evaluation. In Advances in Neural Information Processing Systems, pages 1269–1277, 2014. [12] K. Fukushima. Neocognitron: A self-organizing neural network model for a mechanism of pattern recognition unaffected by shift in position. Biological cybernetics, 36(4):193–202, 1980. [13] Y. Gong, L. Liu, M. Yang, and L. Bourdev. Compressing deep convolutional networks using vector quantization. arXiv preprint arXiv:1412.6115, 2014. [14] S. Gupta, A. Agrawal, K. Gopalakrishnan, and P. Narayanan. Deep learning with limited numerical precision. arXiv preprint arXiv:1502.02551, 2015. [15] K. He, X. Zhang, S. Ren, and J. Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. arXiv preprint arXiv:1502.01852, 2015. [16] M. Jaderberg, A. Vedaldi, and A. Zisserman. Speeding up convolutional neural networks with low rank expansions. arXiv preprint arXiv:1405.3866, 2014. [17] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [18] H. Larochelle, D. Erhan, A. C. Courville, J. Bergstra, and Y. Bengio. An empirical evaluation of deep architectures on problems with many factors of variation. In ICML, pages 473–480, 2007. [19] V. Lebedev, Y. Ganin, M. Rakhuba, I. Oseledets, and V. Lempitsky. Speeding-up convolutional neural networks using fine-tuned cp-decomposition. arXiv preprint arXiv:1412.6553, 2014. [20] H. Lee, P. Pham, Y. Largman, and A. Y. Ng. Unsupervised feature learning for audio classification using convolutional deep belief networks. In Advances in neural information processing systems, pages 1096– 1104, 2009. [21] M. Mathieu, M. Henaff, and Y. LeCun. Fast training of convolutional networks through ffts. arXiv preprint arXiv:1312.5851, 2013. [22] K. R. Rao and P. Yip. Discrete cosine transform: algorithms, advantages, applications. Academic press, 2014. [23] R. Rigamonti, A. Sironi, V. Lepetit, and P. Fua. Learning separable filters. In CVPR, 2013. [24] F. Schroff, D. Kalenichenko, and J. Philbin. Facenet: A unified embedding for face recognition and clustering. arXiv preprint arXiv:1503.03832, 2015. [25] Q. Shi, J. Petterson, G. Dror, J. Langford, A. Smola, and S. Vishwanathan. Hash kernels for structured data. Journal of Machine Learning Research, 10:2615–2637, Dec. 2009. [26] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. [27] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. arXiv preprint arXiv:1409.4842, 2014. [28] N. Vasilache, J. Johnson, M. Mathieu, S. Chintala, S. Piantino, and Y. LeCun. Fast convolutional nets with fbfft: A gpu performance evaluation. arXiv preprint arXiv:1412.7580, 2014. [29] G. K. Wallace. The jpeg still picture compression standard. Communications of the ACM, 34(4):30–44, 1991. [30] K. Weinberger, A. Dasgupta, J. Langford, A. Smola, and J. Attenberg. Feature hashing for large scale multitask learning. In ICML, 2009. [31] Z. Yang, M. Moczulski, M. Denil, N. de Freitas, A. Smola, L. Song, and Z. Wang. Deep fried convnets. arXiv preprint arXiv:1412.7149, 2014. 9
9cs.NE
FI- AND OI-MODULES WITH VARYING COEFFICIENTS arXiv:1710.09247v2 [math.AC] 2 Nov 2017 UWE NAGEL AND TIM RÖMER Abstract. We introduce FI-algebras over a commutative ring K and the category of FI-modules over an FI-algebra. Such a module may be considered as a family of invariant modules over compatible varying K-algebras. FI-modules over K correspond to the well studied constant coefficient case where every algebra equals K. We show that a finitely generated FI-module over a noetherian polynomial FI-algebra is a noetherian module. This is established by introducing OI-modules. We prove that every submodule of a finitely generated free OI-module over a noetherian polynomial OI-algebra has a finite Gröbner basis. Applying our noetherianity results to a family of free resolutions, finite generation translates into stabilization of syzygies in any fixed homological degree. In particular, in the graded case this gives uniformity results on degrees of minimal syzygies. 1. Introduction Denote by FI the category whose objects are finite sets and whose morphisms are injections. An FI-module over a commutative ring K with unity is a functor from FI to the category of K-modules. FI-modules over K and its relatives provide a framework for studying a sequence of representations of symmetric and related groups on finitedimensional vector spaces of varying dimensions (see, e.g., [2, 3, 4, 19, 23, 24]). Stabilization results are derived as a consequence of finite generation of a suitable FI-module. A cornerstone of the theory is that, if K is noetherian, then a finitely generated FI-module over K is noetherian, that is, all its FI-submodules are also finitely generated. In a parallel development, originally motivated by questions in algebraic statistics, it was shown that every ideal in a polynomial ring K[X] in infinitely many variables x1 , x2 , . . . over a field K that is invariant under the action of the symmetric group Sym(N) is generated by finitely many Sym(N)-orbits (see [1, 5, 7, 14] and also [6, 10, 22] for related results). In this paper we introduce and utilize an extension of both research strands by studying families of modules over varying rings. More precisely, an FI-algebra over a commutative ring K is a functor A from FI to the category of commutative, associative, unital K-algebras with A(∅) = K. For example, we denote by X the FI-algebra with Xn = X([n]) = K[x1 , . . . , xn ] and homomorphisms X(ε) determined by ε(xi ) = xε(i) , where ε : [m] → [n] = {1, 2, . . . , n} is any morphism. Note that K itself may be considered as the constant FI-algebra that maps every finite set onto K. An FI-module over an FI-algebra A is a covariant functor M from FI to the category of K-modules which, informally, is compatible with the FI-algebra structure of A (see Definition 3.1 for details). It is finitely generated if there is a finite subset that is not contained in any proper FI-submodule. As in the classical case, M is said to be noetherian if every FI-submodule of M is finitely generated. The first author was partially supported by Simons Foundation grant #317096. He also is grateful to Daniel Erman and Greg Smith for organizing a very inspiring April 2016 Banff workshop on Free Resolutions, Representations, and Asymptotic Algebra. 1 2 UWE NAGEL AND TIM RÖMER Given an FI-module M over an FI-algebra A, there are natural colimits lim M and K[A] such that lim M is a K[A]-module. For example, if I is an ideal of X, then lim I is a Sym(N)-invariant ideal of K[X]. If M is noetherian, we show that lim M is Sym(N)-noetherian, that is, every Sym(N)invariant submodule of lim M is generated by finitely many Sym(N)-orbits (see Theorem 4.6). Since, as a special case of our results, X is a noetherian FI-algebra over K, this implies in particular [14, Theorems 1.1], that is, Sym(N)-invariant ideals of K[X] are generated by finitely many Sym(N)-orbits (see Corollary 6.21). In contrast to the category of FI-modules over K, it is not true that every finitely generated FI-module over any FI-algebra is noetherian. However, we prove that finitely generated FI-modules over (any finite tensor power of) X are noetherian (see Theorem 6.15 and Corollary 6.18 for a more general result). Since the constant FI-algebra K is a quotient of X, this also covers the noetherianity result for FI-modules over K mentioned above. As an application, we establish stabilization of p-syzygies for fixed p. More precisely, our results yield that every finitely generated FI-module M over X admits a free resolution over X, where each free module is again finitely generated. In particular, for every p ∈ N, the p-th syzygy module of M is a finitely generated FI-module. This implies that there are finitely many master syzygies whose orbits generate the p-th syzygy module of every module M([n]) over Xn if n is sufficiently large. In particular, for graded modules this shows that there is a uniform upper bound for the degrees of minimal p-th syzygies of every module M([n]). Uniformity means that the bound is independent of n. However, examples show that this bound depends on the homological degree p in general. Results of this kind appeared in [2, 20, 21, 23, 25]; see the discussion in Remark 7.8. In order to establish the above results, we also introduce OI-modules over an OIalgebra. They are defined analogously to their FI-counterparts as functors from the category OI. The objects of OI are totally ordered finite sets and its morphisms are orderpreserving injective maps. Every FI-module may be considered as an OI-module. The key technical advantage of OI-modules is that they are amenable to a theory of Gröbner bases. In fact, every finitely generated free OI-module over X has a finite Gröbner basis (see Theorem 6.14). This paper is organized as follows. OI- and FI-algebras are introduced in Section 2. In particular, we define polynomial algebras in this context. Every polynomial algebra is generated by a single element, and an algebra is finitely generated if and only if it is a quotient of a finite tensor product of polynomial algebras (see Proposition 2.19). In Section 3, we formally define FI- and OI-modules over a corresponding algebra A. Over any FI- or OI-algebra A, we introduce a class of modules that are the building blocks of the free modules (see Definition 3.16). A module over A is finitely generated if and only if it is a quotient of a finitely generated free module (see Proposition 3.18). General properties of noetherian FI-algebras and FI-modules are discussed in Section 4. In particular, we show there that a noetherian module has a finitely generated colimit. Section 5 is devoted to a combinatorial topic. The goal is to establish that a certain partial order is a well-partial-order (see Proposition 5.3). This is a key ingredient of the central result in Section 6: Every finitely generated free OI-module over the polynomial OI-algebra analog of X has a finite Gröbner basis with respect to any monomial order (see Theorem 6.14). We use it to derive the mentioned results about noetherian modules. Moreover, we show that certain subalgebras of X and its OI-analog such as Veronese subalgebras are again noetherian and that finitely generated modules over these noetherian algebras are noetherian modules (see Proposition 6.17). FI- AND OI-MODULES WITH VARYING COEFFICIENTS 3 In Section 7, we discuss free resolutions of FI and OI-modules. The mentioned stabilization results of p-syzygies are established in Theorems 7.1 and 7.7. Finally, in Section 8 we present an analog of the classical Koszul complex for OI-modules (see Proposition 8.4). It gives specific examples of resolutions that are used to establish the stabilization of syzygies in Section 7. 2. FI- and OI-algebras Before introducing modules we define the algebras from which the coefficients will be drawn. Our exposition is influenced by the approach in [3]. Definition 2.1. Denote by FI the category whose objects are finite sets and whose morphisms are injections (see [3] for more details). The category OI is the subcategory of FI whose objects are totally ordered finite sets and whose morphisms are order-preserving injective maps (see [23]). For an integer n ≥ 0, we set [n] = {1, 2, . . . , n}. Thus, [0] = ∅. We denote by N and N0 the set of positive integers and non-negative integers, respectively. Remark 2.2. The category OI is equivalent to the category with objects [n] for n ∈ N0 and morphisms being order-preserving injective maps ε : [m] → [n]. In particular, this implies ε(m) ≥ m. For later use we record the following observation. Its proof uses maps (2.1) ιm,n : [m] → [n], j 7→ j, where m ≤ n are any positive integers. They are OI morphisms. Lemma 2.3. For any positive integers m < n one has HomOI ([m], [n]) = HomOI ([m + 1], [n]) ◦ HomOI ([m], [m + 1]) and HomFI ([m], [n]) = HomFI ([m + 1], [n]) ◦ HomFI ([m], [m + 1]). Proof. In both cases the right-hand side is obviously contained in the left-hand side. The reverse inclusion in the first case follows by the arguments for [18, Proposition 4.6] by replacing Inc(N)m,n by HomOI ([m], [n]). In the second case, consider any ε ∈ HomFI ([m], [n]), and choose some i ∈ [n] \ im ε. Define εe: [m + 1] → [n] by ( ε(j) if j ∈ [m], εe(j) = i if j = m + 1. Then we get ε = εe ◦ ιm,m+1 , which concludes the proof.  Let K be a commutative ring with unity. Denote by K-Alg the category of commutative, associative, unital K-algebras whose morphisms are K-algebra homomorphisms that map the identity of the domain onto the identity of the codomain. Definition 2.4. (i) An OI-algebra over K is a covariant functor A from OI to the category K-Alg with A(∅) = K. (ii) An FI-algebra over K is defined analogously as a functor A from the category FI to K-Alg with A(∅) = K. 4 UWE NAGEL AND TIM RÖMER Since OI is a subcategory of FI, any FI-algebra may also be considered as an OI-algebra. We often will use the same symbol to denote both of these algebras. For a finite set S, we write AS for the K-algebra A(S), and we denote A[n] by An . Given a morphism ε : S → T , we often write ε∗ : AS → AT for the morphism A(ε). Example 2.5. (i) Fix an integer c > 0, and consider a polynomial ring K[X] := K[xi,j | i ∈ [c], j ∈ N]. It naturally gives rise to an FI-algebra as well as an OI-algebra P as follows: For a subset S ⊂ N, set PS = K[xi,j | i ∈ [c], j ∈ S]. Given an FI or OI morphism ε : S → T of subsets of N, define ε∗ : PS → PT by ε∗ (xi,j ) = xi,ε(j) . Moreover, an Inc(N)-invariant filtration I = (In )n∈N of ideals In ⊂ Pn (see, e.g., [14] or [18, Definition 5.1]) corresponds to an OI-algebra A over K, where An = Pn /In . (ii) Using the maps ιm,n with m ≤ n (see (2.1)), we can form a direct system (Pn , ι∗m,n ). Then one sees that, as K-algebras, K[X] ∼ = lim Pn . −→ The last construction can be considerably generalized. Definition 2.6. Given any OI-algebra A over K, define its colimit K[A] = lim An ∈ K- Alg −→ (An , ι∗m,n ) using the direct system with maps ιm,n as introduced in (2.1). Similarly, one defines the colimit K[A] for an FI-algebra A. Remark 2.7. (i) In the case A = P, the above colimit has been studied, for example, in [7, 14, 18] by using the monoid of increasing maps Inc(N) = {π : N → N | π(i) < π(i + 1) for all i ≥ 1}. The colimit K[P] ∼ = K[X] naturally admits an Inc(N)-action induced by π · xi,j = xi,π(j) for any π ∈ Inc(N). We will see below that every colimit K[A] admits an Inc(N)-action that is compatible with the OI-algebra structure of A. This close relation is one of the main motivations of our approach. (ii) Similarly, considering P as an FI-algebra, there is compatible Sym(∞)-action on its colimit K[X]. It is induced by π · xi,j = xi,π(j) with π ∈ Sym(∞). Here S Sym(∞) denotes the group n∈N Sym(n), where the symmetric group Sym(n) on n letters is naturally embedded into Sym(n + 1) as the stabilizer of {n + 1}. For introducing an Inc(N)-action or an Sym(∞)-action on arbitrary colimits, we need some further notation. Definition 2.8. (i) Given a map π ∈ Inc(N), denote by επ,m the map επ,m : [m] → [π(m)], j 7→ π(j). It is order-preserving and injective. FI- AND OI-MODULES WITH VARYING COEFFICIENTS 5 (ii) For π ∈ Sym(∞) and m ∈ N, let lm be the least integer such that π([m]) ⊆ [lm ]. Define a map επ,m : [m] → [lm ], j 7→ π(j). It is injective. One easily checks the following identities. Lemma 2.9. (i) For every π ∈ Inc(N) and any positive integers m ≤ k, one has ιπ(m),π(k) ◦ επ,m = επ,k ◦ ιm,k . (ii) For every π ∈ Sym(∞) and any positive integers m ≤ k, one has ιlm ,lk ◦ επ,m = επ,k ◦ ιm,k . For any a ∈ Am , denote by [a] its class in the colimit K[A] = lim An . −→ Proposition 2.10. (i) Let A be an OI-algebra. Then there is an Inc(N)-action on K[A] defined by π · [a] = [ε∗π,m (a)], where a ∈ Am and π ∈ Inc(N). (ii) Let A be an FI-algebra. Then there is a Sym(∞)-action on K[A] defined by π · [a] = [ε∗π,m (a)], where a ∈ Am and π ∈ Sym(∞). Proof. (i) First we show that the stated assignment gives a well-defined map. Consider any a ∈ Am and b ∈ An with [a] = [b], i.e., there is an integer k ≥ m, n such that ι∗m,k (a) = ι∗n,k (b). Using Lemma 2.9(i), we get ι∗π(m),π(k) (ε∗π,m (a)) = ε∗π,k (ι∗m,k (a)) = ε∗π,k (ι∗n,k (b)) = ι∗π(n),π(k) (ε∗π,n (b)), which shows π · [a] = π · [b]. The map yields an action on K[A] because επ̃◦π,m = επ̃,π(m) ◦ επ,m. (ii) is shown similarly using Lemma 2.9(ii).  For comparing structures, we need the following technical result. Lemma 2.11. (i) Let A be an OI-algebra. Given any ε ∈ HomOI ([m], [n]), there is some πε ∈ Inc(N) such that [ε∗ (a)] = πε · [a] for every a ∈ Am . (ii) Let A be an FI-algebra. Given any ε ∈ HomFI ([m], [n]), there is some πε ∈ Sym(n) such that [ε∗ (a)] = πε · [a] for every a ∈ Am . Proof. (i) Define a map πε ∈ Inc(N) by ( ε(j) if j ∈ [m], πε (j) = (2.2) ε(m) + j − m if j > m. Using Definition 2.8(i) and n ≥ ε(m), one checks that ε = ιε(m),n ◦ επε,m . Thus, we get πε · [a] = [ε∗πε,m (a)] = [ε∗ (a)], as desired. (ii) Choose πε ∈ Sym(n) with πε (j) = ε(j) for every j ∈ [m]. Using Definition 2.8(ii) and n ≥ lm , one checks that ε = ιlm ,n ◦ επε ,m . Now the claim follows as in (i).  6 UWE NAGEL AND TIM RÖMER It follows immediately from Lemma 2.11 that the structure of A and the above action on its colimit K[A] are compatible in the following sense. Corollary 2.12. Let A be an OI-algebra (or an FI-algebra, respectively). (i) Given any π ∈ Inc(N) (or π ∈ Sym(∞), respectively) and any m ∈ N, one has π · [a] = πεπ · [a] for every πε as in Lemma 2.11 and every a ∈ Am . [ε∗ (a)] = [ε∗πε (a)] for every πε as in Lemma 2.11 and every a ∈ Am . (ii) Given any ε ∈ HomOI ([m], [n]) (or ε ∈ HomFI ([m], [n])), one has We now discuss finite generation of algebras. If A is an OI- or an FI-algebra over K, then a subalgebra B of A is naturally defined by identifying subalgebras BS of AS for each (totally ordered) finite set S such that for ε∗ : AS → AT we have ε∗ (BS ) ⊆ BT for any morphism ε : S → T . Definition 2.13. Let A be an OI-algebra (or FI-algebra over K, respectively). ` (i) A is called finitely generated, if there exists a finite subset G ⊂ n≥0 An which is not contained in any proper subalgebra of A. (ii) A is called generated in degrees ≤ d (resp. generated in degree d) if there exists ` a set G ⊆ 0≤n≤d An (resp. G ⊆ Ad ) which is not contained in any proper subalgebra of A. In both cases, G is called a generating set of A. Remark 2.14. Let A be an OI-algebra and consider a finite subset G = {a1 , . . . , ak }, where ai ∈ Ani for i = 1, . . . , k. Then A is finitely generated by G if and only if one has, for every totally ordered finite set T ,   AT = K ε∗ (ai ) : ε ∈ HomOI ([ni ], T ) . The analogous statement is true for an FI-algebra. For the following observation we use the notation An ∩ H := ϕ−1 n (H) for a subset H ⊆ K[A], where ϕn is the natural homomorphism from An to the colimit K[A] as introduced in Definition 2.6. Proposition 2.15. Let A be an OI-algebra (or FI-algebra over K, respectively). Let Π = Inc(N) (or Π = Sym(∞), respectively). If A is finitely generated (in degrees ≤ d), then K[A] is a finitely generated K-algebra up to Π-action, i.e., it is generated ` as a K-algebra by the Π-orbits of finitely many elements which have representatives in n≤d An ∩ K[A]. Proof. We prove this for an OI-algebra A. For an FI-algebra the argument is similar. Assume A is generated by G = {a1 , . . . , ak } where ai ∈ Ani for i = 1, . . . , k. Thus, for every totally ordered finite set T , we have   AT = K ε∗ (ai ) : ε ∈ HomOI ([ni ], T ) . Consider any [a] ∈ K[A], where a ∈ An . Then a can be written as a polynomial in ε∗ (ai ) with coefficients in K where ε ∈ HomOI ([ni ], [n]). For any fixed map ε ∈ HomOI ([ni ], [n]), there is a map πε ∈ Inc(N) such that πε · [ai ] = [ε∗ (ai )] (see Lemma 2.11). It follows that [a] is a polynomial in certain elements of the Inc(N)-orbits of the [ai ] with coefficients in K. Thus, K[A] is a finitely generated K-algebra up to Inc(N)-action, as desired. The arguments also imply the additional statement about degrees.  FI- AND OI-MODULES WITH VARYING COEFFICIENTS 7 Remark 2.16. The converse fails in general. Consider, for example, the OI-algebra A, where AS = K[X] (see Example 2.5) if S is a totally ordered finite set with |S| = 1, AS = K if |S| = 6 1, and with obvious maps. Then A is not finitely generated, but K[A] ∼ = K is. It would be interesting to find additional conditions which imply that the converse of Proposition 2.15 is true. We now introduce an important class of algebras. Definition 2.17. Let d ≥ 0 be an integer. (i) Define a functor XOI,d : OI → K-Alg by letting   XOI,d = K xπ : π ∈ HomOI ([d], S) S be the polynomial ring over K with variables xπ , and, for ε ∈ HomOI (S, T ), by defining XOI,d (ε) : XOI,d → XOI,d S T as the K-algebra homomorphism given by mapping xπ onto xε◦π . A polynomialNOI-algebra over K is an OI-algebra that is isomorphic to a tensor OI,dλ λ product X = , where each XS is a tensor product of rings XOI,d S λ∈Λ X over K. (ii) Ignoring orders, we similarly define an FI-algebra XFI,d over K and a polynomial FI-algebra over K. Remark 2.18. (i) Note that, for each d ≥ 1, the algebra XOI,d as well as XFI,d is generated in degree d by the variable xid[d] (see Lemma 2.3). For d = 0, these algebras are generated = K for every n. = XFI,0 in degree zero by the identity of K. In particular, XOI,0 n n (ii) Identifying ε ∈ HomOI ([d], S) with its image s1 < s2 < · · · < sd in S, we get, for example, XOI,1 = K[xi : i ∈ S] and XOI,2 = K[xi,j : i, j ∈ S, i < j]. Thus we S S obtain for the colimits, as K-algebras, K[XOI,1 ] ∼ = K[XFI,1 ] = K[xi : i ∈ N] ∼ and K[XOI,2 ] ∼ = K[xi,j : i, j ∈ N, i < j]. In contrast, XFI,2 = K[xi,j : i, j ∈ S, i 6= j] and K[XFI,2 ] ∼ = K[xi,j : i, j ∈ S N, i 6= j]. (iii) Observe that (XOI,1 )⊗c is isomorphic to the OI-algebra P considered in Example 2.5. (iv) Notice that the OI-algebra induced by XFI,d is isomorphic to XOI,d if and only if d ∈ {0, 1}. Furthermore, the algebras XnFI,d and XOI,d are isomorphic for every n integer n ≥ 0 if and only if d ∈ {0, 1}. Proposition 2.19. Let A be an OI-algebra over K. The following statements are equivalent: (i) A is finitely generated (in degrees ≤ d); (ii) there is a surjective natural transformation XOI,d1 ⊗K · · ·⊗K XOI,dk → A for some integers d1 , . . . , dk ≥ 0 (with all di ≤ d). The analogous equivalence is true for every FI-algebra over K. 8 UWE NAGEL AND TIM RÖMER Proof. We prove this for OI-algebras, leaving the FI case to the interested reader. By Remark 2.18(i), the algebra XOI,d1 ⊗K · · · ⊗K XOI,dk has k generators of degrees d1 , . . . , dk . Thus, (ii) implies (i). Conversely, a set G = {a1 , . . . , ak } with ai ∈ Adi determines canonically a natural transformation XOI,d1 ⊗K · · · ⊗K XOI,dk → A. Its image is the OI-algebra generated by G.  Remark 2.20. (i) A Z-graded OI-algebra is an OI-algebra A over K such that every AS is a Zgraded K-algebra and every map A(ε) : AS → AT is a graded homomorphism of degree zero. We will refer to it simply as a graded OI-algebra. Similarly, we define a graded FI-algebra. (ii) Note that the polynomial algebras XOI,d and XFI,d are naturally graded. Furthermore, there are analogous results for graded algebras for each of the above results. (iii) More generally, one can consider OI- and FI-algebras with a more general grading semigroup. We leave this to the interested reader. Consider any Z-graded ring R = ⊕j∈Z [R]j and fix an integer e ≥ 1. The subring ⊕j∈Z [R]je is called the e-th Veronese subring of R and denoted by R(e) . There is an analogous construction for OI- and FI-algebras. Example 2.21. Let A be a Z-graded OI-algebra (or FI-algebra, respectively). For any e ∈ N, let A(e) be the subalgebra of A induced by setting  A(e) n = (An )(e) for every n ∈ N0 . It is called the e-th Veronese subalgebra of`A. It S also is a Z-graded algebra. Note that A(e) is generated as OI-algebra by the set n≥0 j≥0 [An ]je . 3. FI- and OI-modules For introducing our main objects of interest, we denote by K-Mod the category of K-modules. Definition 3.1. (i) Let A be an OI-algebra over K. The category of OI-modules over A is denoted by OI-Mod(A). Its objects are covariant functors M : OI → K-Mod such that, (1) for any finite totally ordered set S, the K-module MS = M(S) is also an AS -module, and (2) for any morphisms εe: Se → S, ε : S → T and any a ∈ ASe, the following diagram is commutative MS M(ε) / MT ·A(e ε)(a) ·A(ε◦e ε)(a)  MS M(ε) /  MT . Here the vertical maps are given by multiplication by the indicated elements. The morphisms of OI-Mod(A) are natural transformations F : M → N such F (S) that, for each totally ordered finite set S, the map MS −→ NS is an AS -module homomorphism. FI- AND OI-MODULES WITH VARYING COEFFICIENTS 9 (ii) Ignoring orders, we define similarly the category FI-Mod(A) of FI-modules over an FI-algebra A. Its objects are functors from FI to K-Mod and its morphisms are natural transformations satisfying conditions analogous to those above. Remark 3.2. (i) Given any morphisms ε1 : S1 → S, ε2 : S2 → S, ε : S → T and any elements a ∈ AS1 , q ∈ MS2 , the assumptions imply, for example,   M(ε) A(ε1 )(a) · M(ε2 )(q) = A(ε ◦ ε1 )(a) · M(ε ◦ ε2 )(q). (ii) In the case of constant coefficients, where A = XFI,0 is the “constant” FI-algebra over K, that is, An = K for each n, the category FI-Mod(A) is exactly the category of FI-modules over K as, for example, studied in [2, 3, 4]. We are mainly interested in the case where the coefficients, that is, the K-algebras An vary with n. This additional structure is crucial for our results. (iii) The categories OI-Mod(A) and FI-Mod(A) inherit the structure of an abelian category from K-Mod, with all concepts such as subobject, quotient object, kernel, cokernel, injection, and surjection being defined “pointwise” from the corresponding concepts in K-Mod (see [26, A.3.3]). (iv) Notice that every FI-module over an FI-algebra may also be considered as an OI-module over the induced OI-algebra. Again, we typically will use the same notation for these modules. Example 3.3. Consider the polynomial ring K[X] and the OI-algebra P as defined in Example 2.5. (i) An Inc(N)-invariant filtration I = (In )n∈N of ideals In ⊂ Pn is the same as an ideal (submodule) of the OI-algebra P. (ii) Similarly, an Sym(∞)-invariant filtration I = (In )n∈N (see, e.g., [14] or [18, Theorem 7.8]) is the same as an ideal of P, considered as an FI-algebra. Such a filtration is also an Inc(N)-invariant filtration (see Remark 3.2). Definition 3.4. Let M be an OI-module over an OI-algebra A. Define its colimit lim M = lim Mn ∈ K- Mod −→ using the direct system (Mn , M(ιm,n )) with maps ιm,n given in (2.1). Similarly, one defines the colimit lim M for an FI-algebra M. For any q ∈ Mm , denote by [q] its class in the colimit lim M. Lemma 3.5. If M is an OI-module over an OI-algebra A, then lim M is a module over K[A] with scalar multiplication defined by [a] · [q] = [A(ιm,k )(a) · M(ιn,k )(q)], where a ∈ Am , q ∈ Mn , and k = max{m, n}. Similarly, we have that lim M is a module over K[A] if M is an FI-module over an FI-algebra A. Proof. This is a routine argument. We leave the details to the interested reader.  The above colimits also admit certain actions. Recall that the maps επ,m are introduced in Definition 2.8. 10 UWE NAGEL AND TIM RÖMER Proposition 3.6. (i) Let M be an OI-module. Then there is an Inc(N)-action on lim M defined by π · [q] = [M(επ,m )(q)], where q ∈ Mm and π ∈ Inc(N). (ii) Let M be an FI-module. Then there is a Sym(∞)-action on lim M defined by π · [q] = [M(επ,m )(q)], where q ∈ Mm and π ∈ Sym(∞). Proof. The argument is completely analogous to the one for Proposition 2.10.  The action on colimits and their scalar multiplication are compatible in the following sense. Lemma 3.7. Let M be an OI-module over an OI-algebra A (or an FI-module over an FIalgebra A, respectively). For any a ∈ Am , q ∈ Ms and any π ∈ Inc(N) (or π ∈ Sym(∞), respectively), one has    π · [a] · [q] = π · [a] · π · [q] . Proof. Set t = max{m, s}. The definitions imply    π · [a] · [q] = M(επ,t ) A(ιm,t (a) · M(ιs,t )(q)   = A(επ,t ◦ ιm,t )(a) · M(επ,t ◦ ιs,t )(q)   = A(ιπ(m),π(t) ◦ επ,m )(a) · M(ιπ(s),π(t) ◦ επ,s )(q)     = A(επ,m)(a) · M(επ,s )(q) = π · [a] · π · [q] , where we used Remark 3.2(i) for the second equality. The third equality is a consequence of επ,t ◦ ιm,t = ιπ(m),π(t) ◦ επ,m .  As for algebras (see Lemma 2.11), one obtains the following observation. Lemma 3.8. (i) Let M be an OI-module over an OI-algebra A. Given any ε ∈ HomOI ([m], [n]), there is some πε ∈ Inc(N) such that [M(ε)(q)] = πε · [q] for every q ∈ Mm . [M(ε)(q)] = πε · [q] for every q ∈ Mm . (ii) Let M be an FI-module over an FI-algebra A. Given any ε ∈ HomFI ([m], [n]), there is some πε ∈ Sym(n) such that It follows that the structure of M and the above action on its colimit lim M are compatible in the following sense. Corollary 3.9. Let M be an OI-module over an OI-algebra A (or an FI-module over an FI-algebra A, respectively). (i) Given any π ∈ Inc(N) (or π ∈ Sym(∞), respectively) and any m ∈ N, one has π · [q] = πεπ · [q] for every πε as in Lemma 3.8 and every q ∈ Mm . (ii) Given any ε ∈ HomOI ([m], [n]) (or ε ∈ HomFI ([m], [n])), one has [M(ε)(q)] = [M(επε )(q)] for every πε as in Lemma 3.8 and every q ∈ Mm . We now discuss finite generation of modules. FI- AND OI-MODULES WITH VARYING COEFFICIENTS 11 Definition 3.10. Let M be an OI-module over an OI-algebra A (or an FI-module over an FI-algebra A, respectively). ` (i) M is called finitely generated, if there exists a finite subset G ⊂ n≥0 Mn which is not contained in any proper submodule of M. (ii) M is called ` generated in degrees ≤ d (resp. generated in degree d) if there exists a set G ⊆ 0≤n≤d Mn (resp. G ⊆ Md ) which is not contained in any proper submodule of M. In both cases, G is called a generating set of M. Remark ` 3.11. Let M be an OI-module over an OI-algebra A. Then M is generated by G ⊆ 0≤n≤d Mn if and only if one has, for every integer k ≥ 0, Mk = M(ε)(q) : q ∈ G ∩ Mn , ε ∈ HomOI ([n], [k]) . The analogous statement is true for an FI-module. There is an alternate description of generation up to degree d. Definition 3.12. (i) Let M be an OI-module over an OI-algebra A. It is said that M stabilizes if there is an integer r such that, as An -modules, one has M(ε)(Mr ) : ε ∈ HomOI ([r], [n]) = Mn whenever r ≤ n. (ii) An FI-module over an FI-algebra A stabilizes if there is an integer r such that, as An -modules, one has M(ε)(Mr ) : ε ∈ HomFI ([r], [n]) = Mn whenever r ≤ n. In both cases, the least integer r ≥ 1 with this property is said to be the stability index ind(M) of M. Lemma 3.13. Let M be an OI-module over an OI-algebra A (or an FI-module over an FI-algebra A, respectively). The following statements are equivalent: (i) M is generated in degree ≤ d; (ii) M stabilizes and ind(M) ≤ d. ` Proof. Taking G = 0≤n≤d Mn , (ii) implies (i) by Remark 3.11. ` Conversely, possibly replacing the given generating set by 0≤n≤d Mn , we conclude by Lemma 2.3 and Remark 3.11.  Now we compare generators of a module and its colimit. For this we need the notation Mn ∩ H := ϕ−1 n (H) for a subset H ⊆ lim M, where ϕn is the natural homomorphism from Mn to lim M as introduced in Definition 3.4. Proposition 3.14. Let M be an OI-module over an OI-algebra A (or FI-module over an FI-algebra A, respectively). Let Π = Inc(N) (or Π = Sym(∞), respectively). If M is finitely generated (in degrees ≤ d), then lim M is a finitely generated K[A]module up to Π-action, i.e., it is generated as ` a K[A]-module by the Π-orbits of finitely many elements (which have representatives in n≤d Mn ∩ lim M). Proof. We prove this for an OI-module M. For an FI-module the argument is similar. Assume M is generated by G = {q1 , . . . , qk } where ai ∈ Ani for i = 1, . . . , k. Thus, for every integer k ≥ 0, Mk = M(ε)(qi ) : ε ∈ HomOI ([ni ], [k]), i = 1, . . . , k . 12 UWE NAGEL AND TIM RÖMER Consider any [q] ∈ lim M, where q ∈ Mk . Then q can be written as a linear combination of M(ε)(qi ) with coefficients in Ak where ε ∈ HomOI ([ni ], [k]). For any fixed map ε ∈ HomOI ([ni ], [k]), there is a map πε ∈ Inc(N) such that πε ·[qi ] = [M(ε)(qi )] (see Lemma 3.8). It follows that [q] is a linear combination of certain elements of the Inc(N)-orbits of the [qi ] with coefficients in Ak . Thus, lim M is a finitely generated up to Inc(N)-action, as desired. The arguments also imply the additional statements about degrees.  Remark 3.15. (i) Again, the converse fails in general. (ii) It is typically difficult to show directly that lim M is finitely generated. Indeed, [14, Theorem 1.1] states that every FI-ideal I of P (see Example 2.5) has a finitely generated colimit. We now define a class of OI-modules in order to discuss freeness. Definition 3.16. (i) For an OI-algebra A over K and an integer d ≥ 0, let FOI,d be the OI-module over A defined by |S| FOI,d = ⊕ A e ∼ = (A )( d ) , π S S π S where S is a totally ordered finite subset and the sum is taken over all π ∈ HomOI ([d], S), and FOI,d (ε) : FOI,d → FOI,d , aeπ 7→ ε∗ (a)eε◦π , S T where a ∈ AS and ε : S → T is an OI morphism. L A free OI-module over A is an OI-module that is isomorphic to λ∈Λ FOI,dλ . (ii) Ignoring orders, we similarly define an FI-module FFI,d over an FI-algebra A and a free FI-module over A. Remark 3.17. (i) If A is an OI-algebra, then the module FOI,0 is isomorphic to A considered as an OI-module over itself. Two modules FOI,d1 and FOI,d2 are isomorphic if and only if d1 = d2 . (ii) Note that FOI,d is not isomorphic to a direct sum of copies of A if d ≥ 1. Thus, there are free OI-modules over A other than direct sums of copies of A. (iii) For every FI-algebra A, there is a free FI-module FFI,d and an induced free OImodule. The latter is obtained by considering A as an OI-algebra. Notice that the An -modules FOI,d and FFI,d are isomorphic for every integer n ≥ 0 if d ∈ {0, 1}. n n In general, this is false if d ≥ 2. (iv) More specifically, every free FI-module FFI,d over (XFI,k )⊗c for any d, k ∈ N0 and c ∈ N is generated by eid[d] . However, considered as an OI-module over the OIalgebra (XOI,k )⊗c , it is generated by {eσ | σ ∈ Sym(d)} ⊂ FFI,d d . Indeed, consider any π ∈ HomFI ([d], [n]). There is a unique π̃ ∈ HomOI ([d], [n]) with the same image as π. Then π = π̃ ◦ σ for some σ ∈ Sym(d). Proposition 3.18. Let M be an OI-module over an OI-algebra A. (i) M is finitely generated if and only if there is a surjection k M i=1 for some integers di ≥ 0. FOI,di → M FI- AND OI-MODULES WITH VARYING COEFFICIENTS 13 (ii) M is generated in degrees ≤ d if and only if there is a surjection M FOI,dλ → M with all dλ ≤ d. λ∈Λ The analogous statements are true for every FI-module M over an FI-algebra A. Proof. We prove this for OI-modules, leaving the FI case to the interested reader. L OI,d OI,d OI,dλ Since F is generated by the element eid[d] ∈ Fd , the module λ∈Λ F is finitely generated if Λ is finite. It is generated in degree d if dλ ≤ d for all λ ∈ Λ. Now the corresponding statements for M follow which shows necessity. Conversely, aL set G = {mλ | λ ∈ Λ} with mλ ∈ Mnλ determines canonically a natural transformation λ∈Λ FOI,dλ → M. Its image is the module generated by G.  Remark 3.19. (i) A Z-graded OI-module is an OI-module M over a graded OI-algebra A such that every MS is a graded AS -module and every map M(ε) : MS → MT is a graded homomorphism of degree zero. We will refer to it simply as a graded OI-module. Similarly, we define a graded FI-module. (ii) There are analogous results for graded modules for each of the above results. (iii) More generally, one can consider OI- and FI-modules with a more general grading semigroup. We leave this to the interested reader. The category OI contains subcategories that provide a framework for studying generalizations of Inc(N)e -invariant filtrations studied in [18]. Remark 3.20. For a non-negative integer e, denote by OIe the category whose objects are totally ordered finite sets and whose morphisms are order-preserving, injective maps that map the first e elements of the domain onto the first e elements of the codomain. Note that OI is the category OI0 . Then OIe algebras and OIe -modules are defined analogously to the case e = 0. Suitably modified, many results of this paper can be extended to OIe -modules for all e ≥ 0. 4. Noetherian Algebras and Modules We now begin to discuss finiteness results for OI- and FI-modules. Definition 4.1. Let A be an OI-algebra over K. An OI-module M over A is said to be noetherian if every OI-submodule of M is finitely generated. The algebra A is noetherian if it is a noetherian OI-module over itself. Analogously, we define a noetherian FI-module and a noetherian FI-algebra. The following results are shown as in a module category, using the same arguments (see, e.g., [17, pages 14–15] combined with Remark 3.11). Proposition 4.2. Let A be an OI-algebra over K. For an OI-module M over A, the following conditions are equivalent: (i) M is noetherian; (ii) Every ascending chain of OI-submodules of M M1 ⊆ M2 ⊆ · · · becomes stationary; (iii) Every non-empty set of OI-submodules of M has a maximal element. The analogous equivalences are also true for FI-modules. 14 UWE NAGEL AND TIM RÖMER Corollary 4.3. If A is a noetherian Z-graded OI-algebra (or FI-algebra, respectively), then so is its e-th Veronese subalgebra for every e ∈ N. Proof. Consider any ascending chain of ideals of A(e) . Its extension ideals in A also form an ascending chain, which stabilizes by assumption on A. Restricting these ideals to A(e) gives the original chain or ideals.  Using that the categories of OI-modules and of FI-modules are abelian it also follows (see, e.g., [17, Theorem 3.1]): Proposition 4.4. Consider a short exact sequence of OI-modules (or FI-modules, respectively) over an OI-algebra A (or an FI-algebra A, respectively) 0 −→ M′ −→ M −→ M′′ −→ 0. Then M is a noetherian if and only if M ′ and M ′′ are noetherian. In particular, direct sums of noetherian OI-modules over A are again noetherian. Remark 4.5. The above results lead to the question whether every finitely generated OI-module over a noetherian OI-algebra A is noetherian and similarly over an FI-algebra Recall that there are free modules over A other than direct sums of copies of A (see Remark 3.17). By Proposition 3.18, the question has an affirmative answer if and only if every module FOI,d (d ≥ 0) is noetherian. We will see later that this is indeed the case over XFI,1 and XOI,1 . Theorem 4.6. Let M be an OI-module over an OI-algebra A (or an FI-module over an FI-algebra A, respectively), and let Π = Inc(N) (or Π = Sym(∞), respectively). If M is noetherian, then lim M is Π-noetherian, that is, every Π-invariant K[A]submodule of lim M can be generated by finitely many Π-orbits. Proof. Let N ⊂ lim M be an Inc(N)-invariant K[A]-submodule. We have to show that N can be generated by finitely many Inc(N)-orbits. To this end, we define a functor N : OI → K-Mod. For every k ∈ N0 , set Nk = N ∩ Mk . Moreover, we put NS = N|S| for every totally ordered finite set S. Finally, let N(εS,T ) = N(ε|S|,|T |) for every εS,T ∈ HomOI (S, T ), where N(ε|S|,|T |) is defined by N(ε|S|,|T |)(q) = M(ε|S|,|T |)(q) for q ∈ N|S|. The Inc(N)-invariance of N and Lemma 3.8 give that N(ε|S|,|T |)(q) ∈ N|T | . Now it follows that N is an OI-module. Note that lim N ⊆ lim M. Thus, we get by construction lim N = N . By assumption N is finitely generated. We conclude by Proposition 3.14. The arguments in the case of an FI-module are analogous.  Corollary 4.7. Let A be an OI-algebra (or an FI-algebra, respectively), and let Π = Inc(N) (or Π = Sym(∞), respectively). If A noetherian, then K[A] is Π-noetherian, that is, every Π-invariant ideal of K[A] can be generated by finitely many Π-orbits. In both results above, it would be interesting to identify instances in which the converse is true. We now consider the noetherian property for OI- and FI-algebras. As in the classical case, any such noetherian algebra is finitely generated. The converse is not true. As preparation, we note: Proposition 4.8. Assume K is field. Let d ≥ 0 be an integer. Then XOI,d is noetherian if and only if d ∈ {0, 1}. The analogous statement is true for XFI,d . FI- AND OI-MODULES WITH VARYING COEFFICIENTS 15 Proof. The case d = 0 is clear. Let d = 1. Note that an ideal I of XOI,1 is essentially the same as an Inc(N)-invariant filtration (see [18, Definition 5.1]) by relating any OImorphism ε to πε ∈ Inc(N) as defined in Equation (2.2) and by suitably restricting any π ∈ Inc(N). By [14, Theorem 3.6], every such filtration stabilizes. Thus, Lemma 3.13 gives that I is generated in finitely many degrees. Since each ring XOI,1 is noetherian, I n has a finite generating set. Using [14, Corollary 3.7] instead of [14, Theorem 3.6], one gets that XFI,1 is noetherian. Let d ≥ 2. It is enough to show the claim for d = 2. We adapt [14, Example 3.8]) and use the identifications in Remark 2.18. For i ≥ 3, consider the monomial ui = x1,2 x2,3 · · · xi−1,i x1,i representing a cycle on the vertices 1, 2, . . . , i. Any morphism ε : S ֒→ T maps such a monomial onto a monomial that presents a cycle of the same length. Since no cycle contains a strictly smaller cycle as a subgraph, it follows that none of the image monomials of ui divides an image of uj if i < j. Thus, we get a strictly increasing sequence of OI-ideals (or FI-ideals, respectively) hu3 i $ hu3 , u4 i $ · · · We conclude by Proposition 4.2.  We later show (see Theorem 6.14) that XOI,1 and XFI,1 are noetherian if K is an arbitrary noetherian ring. Remark 4.9. Using the above arguments and the results in [14], it also follows that the tensor products (XOI,1 )⊗c and (XFI,1 )⊗c are noetherian for every c ∈ N. This motivates the question whether tensor products of noetherian OI-algebras and similar constructions always produce noetherian algebras. 5. Well-partial-orders We are now going to establish a combinatorial result that we will use when we discuss Gröbner bases for OI-modules. This section can be read independently of other parts of the paper. Recall that a well-partial-order on a set S is a partial order ≤ such that, for any infinite sequence s1 , s2 , . . . of elements in S, there is a pair of indices i < j such that si ≤ sj . Remark 5.1. (i) If S and T are sets which have well-partial-orders, then it is well known that their Cartesian product S × T also admits a well-partial order, namely the componentwise partial order defined by (s, t) ≤ (s′ , t′ ) if s ≤ s′ and t ≤ t′ . The analogous statement is true for finite products. In particular, it follows that the componentwise partial order on Nc0 is a well-partial-order, a result which is also called Dickson’s Lemma. (ii) Given a set S with a partial order ≤, define a partial order on the set S ∗ of finite sequences of elements in S by (s1 , . . . , sp ) ≤H (s′1 , . . . , s′q ) if there is a strictly increasing map ϕ : [p] → [q] such that si ≤ s′ϕ(i) for all i ∈ [p]. This order is called the Higman order on S ∗ . It is a well-partial-order by Higman’s Lemma (see [13] or, for example, [7]). 16 UWE NAGEL AND TIM RÖMER Before defining the relation we are interested integer n:   1 sgn(n) = 0  −1 in, recall the definition of the sign of an if n > 0; if n = 0; if n < 0. Definition 5.2. Let S be any set with a partial order ≤. For any non-negative integer d, define a relation on (S × N)d+1 by (s0 , i0 ) × · · · × (sd , id )  (t0 , j0 ) × · · · × (td , jd ) if (s0 , . . . , sd ) ≤ (t0 , . . . , td ) in the componentwise partial order on S d+1 and sgn(ik − i0 ) = sgn(jk − j0 ) for each k = 1, . . . , d. (The second condition is empty if d = 0.) This is a partial order on (S × N)d+1 . In fact, more is true. Proposition 5.3. If ≤ is a well-partial-order on S, then  is a well-partial-order on (S × N)d+1 . In particular, the induced Higman order H on the set ((S × N)d+1 )∗ is a well-partialorder for every d ∈ N0 . Proof. The second part follows from the first one by Remark 5.1(ii). Thus, it is enough to show the first assertion. To this end consider any infinite sequence t1 , t2 , . . . of elements in (S × N)d+1 , where tk = (sk,0 , ik,0) × · · · × (sk,d , ik,d ). Since the componentwise partial order on S d+1 is a wellpartial-order, it is well-known (see, e.g., [16, page 298]) that there is an infinite sequence n1 < n2 < · · · of positive integers such that (sn1 ,0 , . . . , sn1 ,d ) ≤ (sn2 ,0 , . . . , sn2 ,d ) ≤ · · · . Consider now the corresponding infinite subsequence of the original sequence of elements in (S × N)d+1 : (sn1 ,0 , in1 ,0 ) × · · · × (sn1 ,d , in1 ,d ), (sn2 ,0 , in2 ,0 ) × · · · × (sn2 ,d , in2 ,d ), . . . . Since there are only 9 different pairs (sgn(m), sgn(n)) for integers m, n, there must be positive integers nk < nl such that (snk ,0 , ink ,0 ) × · · · × (snk ,d , ink ,d )  (snl ,0 , inl ,0 ) × · · · × (snl ,d , inl ,d ), that is, tnk  tnl . Hence  is a well-partial-order.  6. Gröbner Bases of OI-modules Throughout this section we fix a positive integer c and consider modules over P ∼ = (XOI,1 )⊗c and (XFI,1 )⊗c , respectively, over an arbitrary noetherian ring K. First, we study free modules over P. Recall that (see Example 2.5): Pm = K[xi,j : i ∈ [c], j ∈ [m]] for every m ∈ N0 , and ε∗ (xi,j ) = xi,ε(j) for i ∈ [c], j ∈ [m] and ε ∈ HomOI ([m], [n]). Furthermore, for each integer d ≥ 0, the free module FOI,d over P is given by m FOI,d = ⊕ P e ∼ = (P )( d ) , m π m π m where the sum is taken over all π ∈ HomOI ([d], [m]), and ∗ → FOI,d FOI,d (ε) : FOI,d n , aeπ 7→ ε (a)eε◦π , m where a ∈ Pm and ε ∈ HomOI ([m], [n]). FI- AND OI-MODULES WITH VARYING COEFFICIENTS 17 A monomial in FOI,d is an element of some FOI,d of the form m 1 m xu.,1 · · · xu.,m eπ , where π ∈ HomOI ([d], [m]) for some m, uj ∈ Nc0 , u the i-th entry of uj ∈ Nc0 is the exponent of the variable xi,j , and x.,jj is the product of these powers. We want to show that the monomials in FOI,d admit a well-partial-order. We consider a divisibility relation that is compatible with the OI-module structure. Definition 6.1. A monomial ν = xv.1,1 · · · xv.n,n eρ ∈ FOI,d is said to be OI-divisible by n u1 um OI,d a monomial µ = x.,1 · · · x.,m eπ ∈ Fm if there is an ε ∈ HomOI ([m], [n]) such that v1 ∗ u1 um vn FOI,d (ε)(µ) divides ν in FOI,d n , that is, ε (x.,1 · · · x.,m ) divides x.,1 · · · x.,n in Pn and ρ = ε ◦ π. In this case we write µ OI ν. It is worth writing out this definition more explicitly. We get (6.1) 1 m xu.,1 · · · xu.,m eπ OI xv.1,1 · · · xv.n,n eρ if and only if there is some ε ∈ HomOI ([m], [n]) such that ρ = ε ◦ π and ui ≤ vε(i) for each i ∈ [m]. OI-divisibility is certainly a partial order. In fact, as an application of the results in the previous section, we show that more is true. Proposition 6.2. For each d ∈ N0 , OI-divisibility is a well-partial-order on the set of monomials in FOI,d . Proof. We want to apply Proposition 5.3 to S = Nc0 . To this end we encode a monomial 1 m µ = xu.,1 · · · xu.,m eπ as a sequence of m elements in (Nc0 × N) × (Nc0 × N)d , namely  s(µ) = (u1, 1) × s′ (µ), (u2, 2) × s′ (µ), . . . , (um , m) × s′ (µ) ∈ ((Nc0 × N)d+1 )∗ , where s′ (µ) = (uπ(1) , π(1)) × · · · × (uπ(d) , π(d)) ∈ (Nc0 × N)d . Consider any infinite sequence µ1 , µ2, . . . of monomials in FOI,d . Proposition 5.3 shows that there are indices p < q such that the encoded monomials satisfy s(µp ) H s(µq ). To simplify notation write 1 m µp = xu.,1 · · · xu.,m eπ and µq = xv.1,1 · · · xv.n,n eρ . The relation s(µp ) H s(µq ) means that there is a strictly increasing map ε : [m] → [n] such that, for every i ∈ [m], one has and (ui , uπ(1) , . . . , uπ(d) ) ≤ (vε(i) , vρ(1) , . . . , vρ(d) ) sgn(π(j) − i) = sgn(ρ(j) − ε(i)) for j ∈ [d]. In particular, this gives ui ≤ vε(i) for every i ∈ [m]. Furthermore, if i = π(j), then we get ρ(j) = ε(i) = ε(π(j)), which proves ρ = ε ◦ π. Comparing with (6.1), we conclude that µp OI-divides µq , which completes the argument.  Now we want to develop Gröbner bases theory for submodules of free modules over P. We adapt some ideas in [1]. Fix some integer d ≥ 0, and consider the free OI-module FOI,d . We need a suitable order on the monomials. Definition 6.3. A monomial order on FOI,d is a total order > on the monomials of FOI,d such that if µ, ν are monomials in FOI,d , then µ > ν implies: m (i) uµ > uν > ν for every monomial u 6= 1 in Pm ; (ii) FOI,d (ε)(µ) > FOI,d (ε)(ν) for every ε ∈ HomOI ([m], [n]); and (iii) FOI,d (ιm,n )(µ) > µ whenever n > m. 18 UWE NAGEL AND TIM RÖMER Such orders exist. Example 6.4. Order the monomials in every polynomial ring Pm lexicographically with with a vector xi,j > xi′ ,j ′ if either i < i′ or i = i′ and j < j ′ . Identify a monomial eπ ∈ FOI,d m d+1 (m, π(1), . . . , π(d)) ∈ N and order such monomials by using the lexicographic order on Nd+1 . For example, this implies that every eπ ∈ FOI,d is smaller than any eπ̃ ∈ FOI,d if m n m < n. Finally, for monomials ueπ and veπ̃ , define ueπ > veπ̃ if either eπ > eπ̃ or eπ = eπ̃ and u > v in Pm , where eπ , eπ̃ ∈ FOI,d m . One checks that this gives indeed a monomial order on FOI,d . Observe that every monomial order on FOI,d refines the partial order defined by OIdivisibility. Thus, Proposition 6.2 has the following consequence. Corollary 6.5. Fix any monomial order > on FOI,d . Every non-empty set of monomials of FOI,d has a unique minimal element in the order >. Proof. By Proposition 6.2, any set of monomials M = 6 ∅ of FOI,d has finitely many distinct minimal elements with respect to OI-divisibility, say µ1 , . . . , µs (see [15]). Assume that µ1 is the smallest of these s monomials in the order >. We claim that µ1 is the desired smallest element of M. Indeed, if ν is any monomial in M, then, by the choice of µ1 , . . . , µs , there is some k ∈ [s] such that v is OI-divisible by µk . Thus, the properties of a monomial order imply ν ≥ µk . We conclude by noting that µk > µ1 .  ` If M is any OI-module we often write instead q ∈ 0≤n Mn simply q ∈ M and refer to q as an element of M. For example, this leads to the notion of a subset of M. P Definition 6.6. Let > be a monomial order on FOI,d . Consider an element q = cµ µ ∈ FOI,d for some m ∈ N0 with monomials µ and coefficients cµ ∈ K. If q 6= 0 we define m its leading monomial lm(q) as the largest monomial µ with a non-zero coefficient cµ . This coefficient is called the leading coefficient, denoted lc(q). The leading term of q is lt(q) = lc(q) · lm(q). If q ranges over the elements of a subset E of FOI,d , we use lm(E), lc(E), lt(E) to denote the sets of the corresponding elements. For a subset E of any OI-module M, it is convenient to denote by hEiM the smallest OI-submodule of M that contains E. It is called the OI-submodule generated by E. Remark 6.7. Let µ, ν be two monomials of FOI,d . Then µ OI ν if and only if ν ∈ hµiFOI,d . Definition 6.8. Fix a monomial order > on FOI,d , and let M be an OI-submodule of FOI,d . (i) The initial module of M is in(M) = hlt(q) | q ∈ MiFOI,d . It is a submodule of FOI,d . (ii) A subset B of M of F (d) is a Gröbner basis of M (with respect to >) if in(M) = hlt(B)iFOI,d . We do not require that a Gröbner basis is finite although finite Gröbner bases are of course more useful. Our goal is to show that the latter exist. FI- AND OI-MODULES WITH VARYING COEFFICIENTS 19 Definition 6.9. Let B be any subset of FOI,d . We say that an element q ∈ FOI,d reduces m ′ OI,d to r ∈ FOI,d by B if there is some q ∈ hBi OI,d ∩ F such that F m m q = q′ + r and either lm(r) < lm(q) or r = 0. In this case, it is said that q is reducible by B. Remark 6.10. If K is a field, then q is reducible by B if and only if there is some b ∈ B such that lm(b) OI lm(q) (see Remark 6.7). Iterating reductions gives a division algorithm. Definition 6.11. Given an element q ∈ FOI,d , an element r ∈ FOI,d is said to be a remainder of q on dividing by B or a normal form of q modulo B if there is a sequence of elements q0 , q1 , . . . , qs ∈ FOI,d such that q = q0 , r = qs , each qi+1 is a reduction of qi by B, and either r = 0 or r 6= 0 is not reducible by B. As in the classical noetherian setting, one has the following equivalence. Proposition 6.12. Let M be any OI-submodule of FOI,d , and let B be a subset of FOI,d . Then the following conditions are equivalent: (i) B is a Gröbner basis of M; (ii) every q 6= 0 in M is reducible modulo B; (iii) every q ∈ M has remainder zero modulo B. In particular, any Gröbner basis of M generates M. Proof. The definitions give that (i) implies (ii) and that (i) is a consequence of (iii). Moreover, (iii) yields the final assertion. Assume (ii) is true, and consider any q0 6= 0 in M. Reducing q0 by B we get some q1 ∈ M with lm(q1 ) < lm(q0 ) or q1 = 0. If q1 = 0 we are done. Otherwise we reduce q1 . Repeating if necessary, this process terminates because of Corollary 6.5. This shows (iii).  If K is a field, then a subset B of FOI,d is a Gröbner basis of M if and only if hlm(B)iFOI,d = hlm(M)iFOI,d . For the general case, we need one more step. Definition 6.13. Given an OI-submodule M of FOI,d and a monomial µ ∈ FOI,d m , consider the set lc(M, µ) = {lc(q) | q ∈ Mm and lm(q) = µ} ∪ {0K }. It is an ideal of K. Note that if µ, ν are monomials of FOI,d with µ OI ν, then lc(M, µ) ⊂ lc(M, ν). Recall our standing assumption in this section that K is a noetherian ring. Theorem 6.14. Fix any integer d ≥ 0 and a monomial order > on FOI,d . Every OIsubmodule of the free OI-module FOI,d over P ∼ = (XOI,1 )⊗c has a finite Gröbner basis (with respect to >). Proof. Let M 6= 0 be any OI-submodule of FOI,d . Define a new partial order on the set of monomials of FOI,d by µ ≤M ν if µ OI ν and lc(M, µ) = lc(M, ν). We claim that this is a well-partial-order on the set of monomials of FOI,d . 20 UWE NAGEL AND TIM RÖMER Indeed, consider any infinite sequence µ1 , µ2, . . . of monomials in FOI,d . Since OIdivisibility is a well-partial-order by Proposition 6.2, passing to a suitable infinite subsequence if necessary, we may assume that µi OI µi+1 for all i. Hence, we get an ascending sequence of ideals of K lc(M, µ1 ) ⊂ lc(M, µ2 ) ⊂ · · · . Since K is noetherian, this sequence stabilizes. Thus, there is some index i with µi ≤M µi+1 , which shows that ≤M is a well-partial-order. It follows (see [15]) that the set lm(M) of leading monomials has finitely many minimal monomials in the order ≤M , say, µ1 , . . . , µt . Thus, for every monomial µ ∈ lm(M), there is some µi such that µi OI µ and lc(M, µi ) = lc(M, µ). Since every ideal lc(M, µi ) is finitely generated, there is a finite subset Ei ⊂ M such that lc(Ei ) generates the ideal lc(M, µi ). We claim that B = E1 ∪ . . . ∪ Et is a Gröbner basis of M. Indeed, consider any element q 6= 0 of Mm for some m. Put µ = lm(q). Choose i ∈ [t] such that µi OI µ and lc(M, µi ) = lc(M, µ). Hence, there are elements b1 , . . . , bs ∈ Ei ⊂ B such that lc(q) = k1 lc(b1 ) + · · · ks lc(bs ) for suitable k1 , . . . , ks ∈ K. Suppose µi is in Mmi . Then µi OI µ gives that there are a morphism ε ∈ HomOI (mi , m) and a monomial ν ∈ Pm such that µ = νM(ε)(µi ) (see Definition 6.1). It follows that the leading term of k1 νM(ε)(b1 ) + · · · ks νM(ε)(bs ) is lc(q)µ = lt(q). This shows that q is reducible by B. Thus, B is a finite Gröbner basis of M by Proposition 6.12.  The main result of this section follows now quickly. Theorem 6.15. (i) Every finitely generated OI-module over P ∼ = (XOI,1 )⊗c is noetherian. (ii) Every finitely generated FI-module over (XFI,1 )⊗c is noetherian. Proof. (i) Let M be a finitely generated OI-module over P. Combining Theorem 6.14 and Proposition 6.12, it follows that every free OI-module FOI,d over P is noetherian. Hence Propositions 3.18 and 4.4 imply that M is a quotient of a noetherian OI-module, and so M also is noetherian. (ii) As observed above, every submodule of a free FI-module FFI,d over (XFI,1 )⊗c may also be considered as an OI-module over P. Moreover, FFI,d is finitely generated as OImodule by Remark 3.17(iv), and so it is noetherian as an OI-module by (i). It follows that it also is noetherian as an FI-module. Now we conclude as in (i).  After completing the first version of this paper Jan Draisma kindly informed as that Theorem 6.15(ii) was independently shown in [9]. As a first consequence of Theorem 6.15 we recover main results of [4, 3] (see [4, Theorem A] and [3, Theorem 1.3]) in the case of FI-modules and, for OI-modules, of [23] (see [23, Theorem 7.1.2]). Corollary 6.16. (i) Every finitely generated OI-module over XOI,0 is noetherian. (ii) Every finitely generated FI-module over XFI,0 is noetherian. Proof. Since XOI,d is a quotient of XOI,1 as an OI-algebra and the analogous statement is true for XFI,d , the claims follow by Theorem 6.15. Alternately, (i) is a consequence of the arguments for Theorem 6.14 by noting that every FOI,d is generated as an XOI,0 module by a single monomial. Now (ii) follows from m m (i) as in Theorem 6.15.  FI- AND OI-MODULES WITH VARYING COEFFICIENTS 21 The arguments in Theorem 6.14 can be somewhat extended. This gives an OI-analog of a folklore result about monomial subalgebra of polynomial rings in finitely many variables. Proposition 6.17. Let B be a subalgebra of P ∼ = (XOI,1 )⊗c that is generated by monomials over K. Assume that for any monomials µ, ν ∈ B the fact that µ = ε∗ (ν) · κ (in some Pn ) implies κ ∈ B. Then every OI-submodule of a free OI-module FOI,d (d ∈ N0 ) over B has a finite Gröbner basis (with respect to any monomial order on FOI,d ). In particular, every finitely generated OI-module over B is noetherian. Proof. As above, the second assertion is a consequence of the first one and Proposition 6.12. To prove the first claim fix any d ∈ N0 . The assumption guarantees that OI-divisibility of monomials in FOI,d over P remains a well-partial-order when restricted to the set of monomials in FOI,d over B. Hence, the proof of Theorem 6.14 shows that every submodule of FOI,d has a finite Gröbner basis.  For an FI-module this implies as in Theorem 6.15: Corollary 6.18. Let B be a subalgebra of (XFI,1 )⊗c that is generated by monomials over  K. Assume that for any monomials µ, ν ∈ B the fact µ = ε∗ (ν) · κ (in some (XFI,1 )⊗c n ) implies κ ∈ B. Then every finitely generated FI-module over B is noetherian. Recall that Veronese subalgebras were introduced in Example 2.21. Example 6.19. (i) The assumption in Proposition 6.17 and Corollary 6.18, respectively, is satisfied for the Veronese subalgebras of (XOI,1 )⊗c and (XFI,1 )⊗c . Hence, for every e ∈ N, finitely generated OI-modules over ((XOI,1 )⊗c )(e) and finitely generated FI-modules over ((XFI,1 )⊗c )(e) are noetherian. (ii) Consider the following subset of monomials of (XFI,1 )⊗c Y = {x1,j1 · · · xc,jc | j1 , . . . , jc ∈ N}. We claim that the subalgebra B of (XFI,1 )⊗c that is generated by Y satisfies the assumption of Corollary 6.18. To see this, write a monomial in (XFI,1 )⊗c as Y u µ = xu1,1. · · · xuc,c. with xui,i. = xi,ji,j , j∈N where ui = (ui,1 , ui,2, . . .) is a sequence P of non-negative integers with only finitely many positive entries. Set |ui | = j∈N ui,j . Then the monomial µ is in B if and only if |u1 | = |u2 | = · · · = |uc |. Now the claimed divisibility condition follows. Hence, Corollary 6.18 shows that every finitely generated FI-module over B is noetherian. Note that, for n ∈ N, the algebra Bn+1 is the coordinate ring of the c-fold Segre product PnK × · · · × PnK of projective spaces over K. The above results motivate the following: Conjecture 6.20. Every finitely generated OI-module (or FI-module, respectively) over a noetherian OI-algebra (or FI-algebra, respectively) is noetherian. Recall that K[X] ∼ = lim Pn . Hence, Corollary 4.7 and Theorem 6.15 imply: Corollary 6.21. Let K be a noetherian ring. For every c ∈ N, one has: (i) K[X] is an Inc(N)-noetherian K-algebra. (ii) K[X] is an Sym(∞)-noetherian K-algebra. Note that this result extends [14, Theorems 1.1 and 3.1] from coefficients in a field K to arbitrary noetherian rings. Part (ii) was shown in the special case c = 1 in [1, Theorem 1.1]. 22 UWE NAGEL AND TIM RÖMER 7. Stabilization of Syzygies The main goal of this section is to study homological properties of a finitely generated OI-module (or FI-module, respectively) M in the cases that the underlying category of modules is noetherian, that is, every finitely generated module is noetherian. See Theorem 6.15 or Corollary 6.16 for such situations. Moreover, these homological properties will be compared with the corresponding ones of the modules in the family (Mm )m≥0 . In the following we fix a noetherian OI-algebra (or a noetherian FI-algebra, respectively) A over a noetherian commutative ring K such that the category of OI-modules (or FI-modules, respectively) is noetherian. A classical research topic in commutative algebra is the study of syzygies and induced invariants such as Betti numbers or the Castelnuovo-Mumford regularity. Related results yield applications to interesting problems in commutative as well as to other fields such as algebraic geometry or representation theory. The framework developed in this manuscript yields an approach to study syzygies for the family of modules (Mm )m≥0 to which the next result can be applied. Theorem 7.1. Let M be a finitely generated OI-module (or FI-module, respectively) over A. There exists a projective resolution F. of M such that Fp is finitely generated for every p ∈ N0 . Proof. By Proposition 3.18, there is a presentation of M using a finitely generated free OI-module (or FI-module, respectively) which is in particular a projective module. Since the category of OI-modules (or FI-modules, respectively) under consideration is noetherian, the kernel of that presentation is again finitely generated. Thus we can construct inductively a projective resolution F. of M such that Fp is finitely generated for every p ∈ N0 . This concludes the proof.  Remark 7.2. (i) As in [25, Theorem A] one could informally say, that given any integer p ≥ 0, there is a finite list of master p-syzygies of M from which all p-syzygies of Mm (defined by F. ) can be obtained by combinatorial substitution procedures induced from the OI- or FI-structure, describing the p-th syzygies of Mm in terms of “earlier” ones. Indeed, theses master syzygies are the finitely many generators of Fp . (ii) If M is a Z-graded module over a standard Z-graded algebra A (see Definition 7.5 below), then the constructed resolution F. can be chosen to consist only of graded modules with all maps being homogeneous of degree 0. We refer to this sequence as a graded resolution of M. (iii) Theorem 7.1 and its applications may be seen as a general framework to get results as pioneered in [25, Theorem A]. Theorem 7.1 above does not cover [25, Theorem A], because the latter result applies to some modules over a non-noetherian FIalgebra. Instead, Theorem 7.1 applies to all finitely generated modules over a noetherian FI-algebra. Example 7.3. For a simple specific instance illustrating the above result, fix an integer c ≥ 1 and consider generic c × n matrices Xn whose entries are the variables xi,j with i ∈ [c] and j ∈ [n]. Fix any integer t with 1 ≤ t ≤ c, and denote by In the ideal generated by the t × t minors of Xn . The sequence (In )n∈N0 determines an ideal of (XFI,1 )⊗c . Hence, Theorem 7.1 shows that for every integer p ≥ 0, there is an integer np such that, for every ⊗c n ≥ np , the p-th syzygies of In over (XFI,1 can be obtained from the p-th syzygies of n ) FI,1 ⊗c Inp over (Xnp ) . FI- AND OI-MODULES WITH VARYING COEFFICIENTS 23 Notice that this is true regardless of the characteristic even though it is known that resolutions of determinantal ideals behave differently in positive characteristic (see [12]). In the following, if we consider a projective resolution F. of a finitely generated module M, then we always construct F. using Proposition 3.18 as in the proof of Theorem 7.1. In particular, all modules in such a resolution are free in the sense of Definition 3.16. The next goal is to study Betti numbers. For this we have to introduce some notations and discuss some preparations before presenting our main results. Given two OI-modules (or FI-modules, respectively) M and N, their tensor product is the OI-module (or FI-module, respectively) M ⊗A N, defined componentwise as MS ⊗AS NS for every totally ordered finite set S (or finite set S, respectively) with obvious morphisms induced by the ones given by M and N. Since taking the tensor product is right exact, this yields OI-modules (or FI-modules, respectively) TorA p (M, N) for p ≥ 0 defined as left-derived functors. The first crucial observation is: Lemma 7.4. Let M, N be finitely generated OI-modules (or FI-modules, respectively) over A and let p ∈ N0 . Then TorA p (M, N) is finitely generated. Moreover, we have AS TorA p (M, N)S = Torp (MS , NS ) for every totally ordered finite set S (or finite set S, respectively). Proof. By Theorem 7.1 there exists a projective resolutions F. of M such that Fp is finitely generated for every p ∈ N0 . Since TorA p (M, N) is the homology of F. ⊗A N, a complex of finitely generated modules, and the underlying module category is noetherian, it follows that TorA p (M, N) is finitely generated. Observe, that we have chosen F. in such a way that F.,S is a projective resolution of MS over AS using only finitely generated free modules. The additional claim is then a consequence of an isomorphism of AS -modules Hp (F. ⊗A N)S = Hp (F.,S ⊗AS NS ) for every totally ordered finite set S (or finite set S, respectively).  Next we define: Definition 7.5. Let A be a noetherian OI-algebra (or FI-algebra, respectively) over K. (i) We call A a local, if every AS is a commutative local ring (AS , mS ) and all morphisms A(ǫ) are local homomorphisms. Here we always take K = Z. (ii) Let K be a field. We say A is standard graded, Lif every AS is a finitely generated standard Z-graded K-algebra, that is, AS = d≥0 AS,d is a commutative finitely generated Z-graded K-algebra generated in degree 1 with AS,0 = K, and all morphisms A(ǫ) are Lhomogeneous of degree 0. We write mS = d≥1 AS,d for the uniquely determined graded maximal ideal of AS . From now on we assume that A is either local or standard graded. In the local case let K be the OI-module (or FI-module, respectively) defined by setting KS = AS /mS together with the natural morphisms. In the standard graded case we set similarly KS = AS /mS ∼ = K. 24 UWE NAGEL AND TIM RÖMER Definition 7.6. (i) Let A be a local OI-algebra (or FI-algebra, respectively), and let M be a finitely generated OI-module (or FI-module, respectively) over A. For every p ∈ N0 and every totally ordered finite set (or finite set, respectively) S the Betti numbers of M are defined as A βS,p (M) = dimAS /mS TorA p (M, K)S . (ii) Let A be a standard graded OI-algebra (or FI-algebra, respectively), and let M be a finitely generated graded OI-module (or FI-module, respectively). For every p ∈ N0 , j ∈ Z and every totally ordered finite set (or finite set, respectively) S we call  A βS,p,j (M) = dimK TorA p (M, K)S j A the graded Betti number of M with respect to (S, p, j). Here we also set βS,p (M) = P A j βS,p,j (M) for the total Betti number respect to (S, p, j). Our main result concerning stabilization of Betti numbers has its strongest form in the graded context: Theorem 7.7. Let A be standard graded OI-algebra (or FI-algebra, respectively) and let M be a finitely generated graded OI-module (or FI-module, respectively). Then for any p ∈ N, one has A m(M, p) = max{j ∈ Z : βS,p,j (M) 6= 0 for some S} < ∞. Moreover, there are integers j0 (M, p) < · · · < jt (M, p) ≤ m(M, p) such that for any S with |S| ≫ 0 we have A βS,p,j (M) 6= 0 if and only if j ∈ {j0 (M, p), . . . , jt (M, p)}. Proof. By Lemma 7.4, N = TorA p (M, K) is a finitely generated graded OI-module (or FI-module, respectively). In this situation one can choose a finite system of generators ` G ⊂ n≥0 Nn which is homogeneous with respect to the (internal) gradings of the modules Nn . As noted in Remark 3.19(i), the maps N(ǫ) are homogeneous of degree zero. As a consequence the degrees of the elements in the induced homogenous systems of generators of NS are the same for every totally ordered finite set (or finite set, respectively) S. Some generators may only be needed for |S| small and become redundant for |S| ≫ 0. But for |S| ≫ 0 the degree sequence of a minimal homogenous systems of generators of NS has to stabilize because N has a finite generating set. Indeed, this argument holds for every finitely generated graded OI-module (or FImodule, respectively). In our case, NS is a finitely dimensional K-vector space and A the degrees of minimal generators correspond to non-zero Betti numbers βS,i,j (M). All statements of the theorem follow now immediately.  Remark 7.8. (i) There exists also a local version of Theorem 7.7 in the sense that for |S| ≫ 0 the p-th syzygy modules of MS stabilizes, i.e. there is a combinatorial pattern induced from the OI- or FI-structure describing the p-th syzygies in terms of “earlier” ones. (ii) Results as in Theorem 7.7 were previously known for Segre products (see [25, Theorem A] and [23, Theorem 9.3.2]), and for secant varieties of Veronese varieties (see [20, Theorem 1.1] and [21, Theorems 3.3 and 3.6]). FI- AND OI-MODULES WITH VARYING COEFFICIENTS 25 (iii) In view if the stabilization results for Betti numbers as in Theorem 7.7 it is tempting to hope for a similar statement for the Castelnuovo-Mumford regularity reg MS of MS . In particular, see [2, Theorem A] for a related result where A = XFI,0 . But an answer to this question in general must be more complicated. See Example 8.7 below and its discussion which shows that stabilization in a strict sense can not be expected. Corollary 7.9. Let A = (XOI,1 )⊗c or A = (XFI,1 )⊗c . Then the conclusions of Theorems 7.1 and 7.7 hold. Proof. Apply Theorem 6.15 and Theorems 7.1 and 7.7.  As pointed out in [18] every polynomial ideal in finitely many variables gives rise to various OI- and FI-modules. Example 7.10. (i) To illustrate this point, consider non-zero polynomials f5 , f6 , f7 , f8 in K[x1 , x2 , x3 ] of degrees 5, 6, 7, 8, resp. Let J be the ideal of K[x1 , x2 , . . .] that is generated by the Sym(∞)-orbits of f5 , f6 , f7 , f8 . It determines an FI-ideal I of XFI,1 , where In = J ∩ K[x1 , . . . , xn ]. Hence In has a generating set of 4 · n(n − 1)(n − 2) polynomials. Theorems 7.1 and 7.7 say that, for any integer p ≥ 0, there are finitely many master syzygies that determine all p-th syzygies of In over K[x1 , . . . , xn ] for n ≫ 0. Moreover, by [18, Theorem 7.10], the dimension of K[x1 , . . . , xn ]/In is eventually a linear function in√n, and deg In is eventually an exponential function in n. In particular, limn→∞ n deg In exists and is a positive rational number. It would be interesting to determine these asymptotic invariants. (ii) Similar questions arise when one varies Example 7.3 by considering determinantal ideals In that are generated by the t × t minors of a generic c × n matrix Xn that involve only the columns of the Inc(N)-orbits of a given t-tuple of distinct positive integers. For example, taking t = 3 and using the Inc(N)-orbit of (1, 5, 7), the ideal In is generated by 3-minors whose column indices are in the set {(j1 , j2 , j3 ) | 1 ≤ j1 , j1 +4 ≤ j2 , 2+j2 ≤ j3 ≤ n}. The ideals In determine an OI-ideal of (XOI,1 )⊗c . Thus, their p-th syzygies stabilize in the above sense and dim K[x1 , . . . , xn ]/In and deg In grow eventually linearly and exponentially, respectively. 8. OI-Koszul complexes There is a canonical complex of free OI-modules over any OI-algebra A that is analogous to the classical Koszul complex. It gives examples of projective resolutions as used in the previous section. We need some notation. Choose any a ∈ AO , where O = {o} is a one-element set. For every element t of a totally ordered set T 6= ∅, let νT,t : O → T be the map with νT,t (o) = t. Set ∗ aT,t = A(νT,t )(a) = νT,t (a). Note that every aT,t is in AT . Remark 8.1. (i) For every ε ∈ HomOI (S, T ), the definitions imply ε ◦ νS,s = νT,ε(s) , which gives, for every s ∈ |S|, (8.1) ε∗ (aS,s ) = aT,ε(s) . 26 UWE NAGEL AND TIM RÖMER (ii) Let I = haiA be the ideal of A that is generated by a. Then, for every totally ordered set T , the elements aT,1 , . . . , aT,|T | generate the ideal IT of AT . We use the above notation to define certain OI-morphisms. Definition 8.2. For any integer d > 0, define a natural transformation ϕd : FOI,d → FOI,d−1 of free modules over A by ϕd (S)(beπ ) = b · d X (−1)j+1 aS,π(j) eπj , j=1 where b ∈ AS , π ∈ HomOI ([d], S), ε ∈ HomOI (S, T ), and πj : [d]\{j} → S is the restriction of π. Using Equation (8.1), one checks that this gives indeed a natural transformation. It is determined by a. Furthermore, these morphisms can be used to form an infinite complex. Lemma 8.3. Let A be an OI-algebra. Every element a ∈ A1 determines a complex of free OI-modules over A (8.2) ϕ ϕ1 d · · · −→ FOI,d −→ FOI,d−1 −→ · · · −→ FOI,1 −→ FOI,0 = A −→ 0. Proof. For every totally ordered finite set T , the component of the Complex (8.2) at T OI,|T | 0 −→ FT OI,|T |−1 −→ FT −→ · · · −→ FOI,1 −→ FOI,0 = AT −→ 0 T T has length |T | because FOI,d = 0 if d > |T |. (Note that this also shows that FOI,d is not T isomorphic to the d-th exterior power of FOI,1 .) In fact, this component is the classical Koszul complex on the elements aT,1 , . . . , aT,|T | with coefficients in AT . Thus, the claim follows.  We call the complex in Lemma 8.3 the Koszul complex on a with coefficients in A. Using the classical characterization of the exactness of a Koszul complex, we obtain an analogous result for OI-algebras. Proposition 8.4. Let a ∈ A1 be an element of an OI-algebra A. If, for every totally ordered finite set T , the elements aT,1 , . . . , aT,|T | form an AT -regular sequence, then the Koszul complex on a with coefficients in A is acyclic. Example 8.5. Consider the ideal I of XOI,1 that is generated by x1 . Then In = hx1 , . . . , xn i is generated by a regular sequence for every n ∈ N, and so the Koszul complex determined by x1 is acyclic. Remark 8.6. If A is a Z-graded OI-algebra and a is homogeneous, then the Koszul complex on a is complex of graded OI-modules if one uses suitable degree shifts. For an integer k and a graded OI-module M, we denote by M(k) the module with the same module structure as M, but with an (internal) grading given by [((M(k))n ]j = [Mn ]j+k for all j ∈ Z. We illustrate this by an example. Example 8.7. Let I be the ideal of XOI,1 that is generated by xk1 for some k ∈ N. Then In = hxk1 , . . . , xkn i for every n ∈ N. Thus, the graded Koszul complex on xk1 is · · · → FOI,d (−dk) → FOI,d−1 (−(d − 1)k) → · · · → FOI,1 (−k) → XOI,1 → 0. For every fixed integer p, the degrees of generators of the p-th syzygy module of In are bounded above by a constant that is independent of n, which is in line with the above stabilization result. In fact, the p-syzygies are generated in degree pk. FI- AND OI-MODULES WITH VARYING COEFFICIENTS 27 In contrast to the situation for FI-modules with constant coefficients, that is, over XFI,0 (see [2]), this shows that for modules over XOI,1 the degrees of the generators of the pth syzygy modules cannot be uniformly bounded above independent of p. Furthermore, observe that the number of minimal generators of In grows with n. Thus, the recent boundedness results in [8] (see also [11]) do not apply directly to the categories OI-Mod(A) and FI-Mod(A). References [1] M. Aschenbrenner and C. J. Hillar, Finite generation of symmetric ideals, Trans. Amer. Math. Soc. 359 (2007), 5171–5192. [2] T. Church and J. S. Ellenberg, Homology of FI-modules, Geom. Topol. 21 (2017), 2373–2418. [3] T. Church, J. S. Ellenberg, and B. Farb, FI-modules and stability for representations of symmetric groups, Duke Math. J. 164 (2015), 1833–1910. [4] T. Church, J. S. Ellenberg, B. Farb, and R. Nagpal, FI-modules over Noetherian rings, Geom. Topol. 18 (2014), 2951–2984. [5] D. E. Cohen, Closure relations, Buchberger’s algorithm, and polynomials in infinitely many variables, In Computation theory and logic, Lecture Notes in Comput. Sci. 270 (1987), 78–87. [6] J. Draisma, Finiteness for the k-factor model and chirality varieties, Adv. Math. 223 (2010), 243– 256. [7] J. Draisma, Noetherianity up to symmetry, In: Combinatorial algebraic geometry, Lecture notes of the CIME-CIRM summer school, Lecture Notes in Math. 2108 (2014), 33–61. [8] J. Draisma, Topological Noetherianity of polynomial functors, Preprint, 2017; arXiv:1705.01419. [9] J. Draisma, A. Krasilnikov, and R. Krone, Noetherianity of FI-algebra and their modules: examples and counterexamples, In preparation. [10] J. Draisma and J. Kuttler, Bounded-rank tensors are defined in bounded degree, Duke Math. J. 163 (2014), 35–63. [11] D. Erman, S. Steven, and A Snowden, Generalizations of Stillman’s conjecture via twisted commutative algebra, Preprint, 2017. [12] M. Hashimoto, Determinantal ideals without minimal free resolutions, Nagoya Math. J. 118 (1990), 203–216. [13] G. Higman, Orderings by divisibility in abstract algebras, Proc. London Math. Soc. (3) 2 (1952), 326–336. [14] C. J. Hillar and S. Sullivant, Finite Gröbner bases in infinite dimensional polynomial rings and applications, Adv. Math. 229 (2012), 1–25. [15] J. B. Kruskal, Well-quasi ordering, the tree theorem, and Vazsonyi’s conjecture, Trans. Amer. Math. Soc. 95 (1960), 210–225. [16] J. B. Kruskal, The theory of well-quasi-ordering: A frequently discovered concept, J. Combinatorial Theory Ser. A 13 (1972), 297–305. [17] H. Matsumura, Commutative ring theory, Cambridge Studies in Advanced Mathematics 8, Cambridge University Press, Cambridge, 1986. [18] U. Nagel and T. Römer, Equivariant Hilbert series in non-Noetherian Polynomial Rings, J. Algebra 486 (2017), 204–245. [19] A. Putman and S. V. Sam, Representation stability and finite linear groups, Duke Math. J. 166 (2017), 2521–2598. [20] S. V. Sam, Ideals of bounded rank symmetric tensors are generated in bounded degree, Invent. Math. 207 (2017), 1–21. [21] S. V. Sam, Syzygies of bounded rank symmetric tensors are generated in bounded degree, Math. Ann. 368 (2017), 1095–1108. [22] S. V. Sam and A. Snowden, GL-equivariant modules over polynomial rings in infinitely many variables, Trans. Amer. Math. Soc. 368 (2016), 1097–1158. [23] S. V. Sam and A. Snowden, Gröbner methods for representations of combinatorial categories, J. Amer. Math. Soc. 30 (2017), 159–203. [24] S. V. Sam and A. Snowden, Representations of categories of G-maps, J. Reine Angew. Math. (to appear). [25] A. Snowden, Syzygies of Segre embeddings and ∆-modules, Duke Math. J. 162 (2013), 225–277. 28 UWE NAGEL AND TIM RÖMER [26] C. A. Weibel, An introduction to homological algebra, Cambridge Studies in Advanced Mathematics 38, Cambridge University Press, Cambridge, 1994. Department of Mathematics, University of Kentucky, 715 Patterson Office Tower, Lexington, KY 40506-0027, USA E-mail address: [email protected] Universität Osnabrück, Institut für Mathematik, 49069 Osnabrück, Germany E-mail address: [email protected]
0math.AC
arXiv:1510.03564v1 [cs.DS] 13 Oct 2015 Linear-Vertex Kernel for the Problem of Packing r-Stars into a Graph without Long Induced Paths Florian Barbero1 , Gregory Gutin2 , Mark Jones2 , Bin Sheng2 , and Anders Yeo3,4 1 Laboratoire d’Informatique, Robotique et Microélectronique de Montpellier, 161 rue Ada, 34095 Montpellier cedex 5, France 2 Department of Computer Science, Royal Holloway, University of London, TW20 0EX, Egham, Surrey, UK 3 Engineering Systems and Design, Singapore University of Technology and Design, Singapore 4 Department of Mathematics, University of Johannesburg, Auckland Park, 2006 South Africa Abstract Let integers r ≥ 2 and d ≥ 3 be fixed. Let Gd be the set of graphs with no induced path on d vertices. We study the problem of packing k vertex-disjoint copies of K1,r (k ≥ 2) into a graph G from parameterized preprocessing, i.e., kernelization, point of view. We show that every graph G ∈ Gd can be reduced, in polynomial time, to a graph G′ ∈ Gd with O(k) vertices such that G has at least k vertex-disjoint copies of K1,r if and only if G′ has. Such a result is known for arbitrary graphs G when r = 2 and we conjecture that it holds for every r ≥ 2. 1 Introduction For a fixed graph H, the problem of deciding whether a graph G has k vertexdisjoint copies of H is called H-Packing. The problem has many applications (see, e.g., [1, 2, 10]), but unfortunately it is almost always intractable. Indeed, Kirkpatrick and Hell [10] proved that if H contains a component with at least three vertices then H-Packing is NP-complete. Thus, approximation, parameterised, and exponential algorithms have been studied for H-Packing when H is a fixed graph, see, e.g., [1, 6, 7, 13, 14]. 1 In this note, we will consider H-Packing when H = K1,r and study K1,r Packing from parameterized preprocessing, i.e., kernelization, point of view.1 Here k is the parameter. As a parameterized problem, K1,r -Packing was first considered by Prieto and Sloper [13] who obtained an O(k2 )-vertex kernel for each r ≥ 2 and a kernel with at most 15k vertices for r = 2. (Since the case r = 1 is polynomial-time solvable, we may restrict ourselves to r ≥ 2.) The same result for r = 2 was proved by Fellows et al. [6] and it was improved to 7k by Wang et al. [14]. Fellows et al. [6] note that, using their approach, the bound of [13] on the number of vertices in a kernel for any r ≥ 3 can likely be improved to subquadratic. We believe that, in fact, there is a linear-vertex kernel for every r ≥ 3 and we prove Theorem 1 to support our conjecture. A path P in a graph G, is called induced if it is an induced subgraph of G. For an integer d ≥ 3, let Gd denote the set of all graphs with no induced path on d vertices. Theorem 1. Let integers r ≥ 2 and d ≥ 3 be fixed. Then K1,r -Packing restricted to graphs in Gd , has a kernel with O(k) vertices. Since d can be an arbitrary integer larger than two, Theorem 1 is on an ever increasing class of graphs which, in the “limit”, coincides with all graphs. To show that Theorem 1 is an optimal2 result, in a sense, we prove that K1,r Packing restricted to graphs in Gd is N P-hard already for d = 5 and every fixed r ≥ 3: Theorem 2. Let r ≥ 3. It is N P-hard to decide if the vertex set of a graph in G5 can be partitioned into vertex-disjoint copies of K1,r . We cannot replace G5 by G4 (unless N P = P) due to the following assertion, whose proof is given in the Appendix. Theorem 3. Let r ≥ 3 and G ∈ G4 . We can find the maximal number of vertex-disjoint copies of K1,r in G in polynomial time. 2 Terminology and Notation For a graph G, V (G) (E(G), respectively) denotes the vertex set (edge set, respectively) of G, ∆(G) denotes the maximum degree of G and n its number of vertices. For a vertex u and a vertex set X in G, N (u) = {v : uv ∈ E(G)}, N [u] = N (u) ∪ {u}, d(u) = |N (u)|, NX (u) = N (u) ∩ X, dX (u) = |NX (u)| 1 We provide basic definitions on parameterized algorithms and kernelization in the next section, for recent monographs, see [4, 5]; [11, 12] are recent survey papers on kernelization. 2 If K1,r -Parking was polynomial time solvable, then it would have a kernel with O(1) vertices. 2 and G[X] is the subgraph of G induced by X. We call K1,r an r-star. We say a star intersects a vertex set if the star uses a vertex in the set. We use (G, k, r) to denote an instance of the r-star packing problem. If there are k vertex-disjoint r-stars in G, we say (G, k, r) is a Yes-instance, and we write G ∈ ⋆(k, r). Given disjoint vertex sets S, T and integers s, r, we say that S has s r-stars in T if there are s vertex-disjoint r-stars with centers in S and leaves in T . A parameterized problem is a subset L ⊆ Σ∗ × N over a finite alphabet Σ. A parameterized problem L is fixed-parameter tractable if the membership of an instance (I, k) in Σ∗ × N can be decided in time f (k)|I|O(1) where f is a computable function of the parameter k only. Given a parameterized problem L, a kernelization of L is a polynomial-time algorithm that maps an instance (x, k) to an instance (x′ , k′ ) (the kernel) such that (x, k) ∈ L if and only if (x′ , k′ ) ∈ L and k′ + |x′ | ≤ g(k) for some function g. It is well-known that a decidable parameterized problem L is fixed-parameter tractable if and only if it has a kernel. Kernels of small size are of main interest, due to applications. 3 Proof of Theorem 1 Note that the 1-star packing problem is the classic maximum matching problem and if k = 1, the r-star packing problem is equivalent to deciding whether ∆(G) ≥ r. Both of these problems can be solved in polynomial time. Henceforth, we assume r, k > 1. A vertex u is called a small vertex if max{d(v) : v ∈ N [u]} < r. A graph without a small vertex is a simplified graph. We now give two reduction rules for an instance (G, k, r) of K1,r -Packing. Reduction Rule 1. If graph G contains a small vertex v, then return the instance (G − v, k, r). It is easy to observe that Reduction Rule 1 can be applied in polynomial time. Reduction Rule 2. Let G = (V, E) be a graph and let C, L be two vertexdisjoint subsets of V . The pair (C, L) is called a constellation if G[C ∪ L] ∈ ⋆(|C|, r) and there is no star K1,r intersecting L in the graph G[V \ C]. If (C, L) is a constellation, return the instance (G[V \ (C ∪ L)], k − |C|). It is easy to observe that Reduction Rule 2 can be applied in polynomial time, provided we are given a suitable constellation. Lemma 1. Reduction Rules 1 and 2 are safe. 3 Proof. Clearly, a small vertex v can not appear in any r-star. Therefore Reduction Rule 1 is safe as G and G − v will contain the same number of r-stars. To see that Reduction Rule 2 is safe, it is sufficient to show that G ∈ ⋆(k, r) if and only if G[V \(C ∪L)] ∈ ⋆(k−|C|, r). On the one hand, if G[V \(C ∪L)] ∈ ⋆(k − |C|, r), the hypothesis G[C ∪ L] ∈ ⋆(|C|, r) implies G ∈ ⋆(k, r). On the other hand, there are at most |C| vertex-disjoint stars intersecting C. But by hypothesis, every star intersecting L also intersects C. We deduce that there are at most |C| stars intersecting C ∪ L, and so if G ∈ ⋆(k, r), there are at least k − |C| stars in G[V − (C ∪ L)]: G[V \ (C ∪ L)] ∈ ⋆(k − |C|, r). Note that as both rules modify a graph by deleting vertices, any graph G′ that is derived from a graph G ∈ Gd by an application of Rules 1 or 2 is also in Gd . Recall the Expansion Lemma, which is a generalization of the well-known Hall’s theorem. Lemma 2. (Expansion Lemma)[8] Let r be a positive integer, and let m be the size of the maximum matching in a bipartite graph G with vertex bipartition X ∪ Y . If |Y | > rm, and there are no isolated vertices in Y, then there exist nonempty vertex sets S ⊆ X, T ⊆ Y such that S has |S| r-stars in T and no vertex in T has a neighbor outside S. Furthermore, the sets S, T can be found in polynomial time in the size of G. Henceforth, we will use the following modified version of the expansion lemma. Lemma 3. (Modified Expansion Lemma) Let r be a positive integer, and let m be the size of the maximum matching in a bipartite graph G with vertex bipartition X ∪ Y . If |Y | > rm, and there are no isolated vertices in Y, then there exists a polynomial algorithm(in the size of G) which returns a partition X = A1 ∪B1 , Y = A2 ∪B2 , such that B1 has |B1 | r-stars in B2 , E(A1 , B2 ) = ∅, and |A2 | ≤ r|A1 |. Proof. If |Y | ≤ rm, then we may return A1 = X, A2 = Y , B1 = B2 = ∅, as m ≤ |X| and hence |Y | ≤ r|X|. Otherwise, apply the Expansion Lemma to get nonempty vertex sets S ⊆ X, T ⊆ Y such that S has |S| r-stars in T and no vertex in T has a neighbor in Y outside S. Let X ′ = X \ S and Y ′ = Y \ T . If G[X ′ ∪ Y ′ ] has isolated vertices in Y ′ , move all of them from Y ′ to T . If |Y ′ | ≤ r|X ′ |, we may return A1 = X ′ , A2 = Y ′ , B1 = S, and B2 = T . So now assume |Y ′ | > r|X ′ |. In this case, apply the algorithm recursively on G[X ′ ∪ Y ′ ] to get a partition X ′ = A′1 ∪ B1′ , Y ′ = A′2 ∪ B2′ , such that B1′ has |B1′ | stars in B2′ , E(A′1 , B2′ ) = ∅, and |A′2 | ≤ r|A′1 |. Then return A1 = A′1 , B1 = B1′ ∪ S, A2 = A′2 , B2 = B2′ ∪ T . Observe that B1 has |B1′ | + |S| = |B1 | stars in B2 , E(A1 , B2 ) ⊆ E(A′1 , B2′ ) ∪ E(X \ S, T ) = ∅, and 4 |A2 | = |A′2 | ≤ r|A′1 | = r|A1 |, as required. As each iteration reduces |X| by at least 1, we will have to apply less than |X| + |Y | iterations, each of which uses at most one application of the Expansion Lemma, and so the algorithm runs in polynomial time. Proof of Theorem 1. By exhaustively applying Reduction Rule 1, we may assume we have a simplified graph. Let G be a simplified graph in Gd . Now find a maximal r-star packing of the graph G with q stars. We may assume q < k as otherwise we have a trivial Yes-instance. Let S be the set of vertices in this packing, and let D = V (G) \ S. For any u ∈ D, let D[u] be the set of vertices v ∈ D for which there is a path from v to u using only vertices in D - that is, D[u] is the the set of vertices in the component of G[D] containing u. As our star-packing is maximal, dD (v) < r for every v ∈ D. As G ∈ Gd , every v ∈ D[u] has a path to u in G[D] with at most d − 1 vertices (as otherwise the shortest path in G[D] from v to u is an induced path on at least d vertices). It follows that |D[u]| ≤ 1 + r + r 2 + · · · + r d−1 ≤ r d . We will now find a partition of S into Big(S) ∪ Small(S), and D into B(D) ∪ U (D), such that |B(D)| ≤ r d+1 |Small(S)|, and either Big(S) = U (D) = ∅ or (Big(S), U (D)) is a constellation. As |Small(S)| ≤ |S| ≤ (r+1)k, it follows that either |V (G)| ≤ (r + 1)k + (r + 1)r d+1 k, or we can apply Reduction Rule 2 on (Big(S), U (D)). We will construct Big(S), Small(S), B(D), U (D) algorithmically as described below. Throughout, we will preserve the properties that 1. |B(D)| ≤ |Small(S)|r d+1 , 2. U (D) has no neighbors in Small(S) ∪ B(D). Initially, set Big(S) = S, U (D) = D, Small(S) = B(D) = ∅. While |U (D) ∩ N (Big(S))| > r|Big(S)|, do the following. If there is a vertex u ∈ Big(S) such that |N (u) ∩ U (D)| < r, let X = S {D[v] : v ∈ N (u) ∩ U (D)}. Observe that as |D[v]| ≤ r d for all v ∈ D, |X| < r d+1 . Now set Small(S) = Small(S) ∪ {u}, Big(S) = Big(S) \ {u}, B(D) = B(D) ∪ X, U (D) = U (D) \ X. It follows that Property 1 is preserved. Note that no vertex in the new U (D) has a neighbor in X (as all neighbors of X in D lie in X). Similarly no vertex in the new U (D) is adjacent to u (as such a vertex would be in the old U (D) and so would have been added to X). Therefore there are still no edges between the new U (D) and the new Small(S) ∪ B(D), and so Property 2 is preserved. Otherwise (if every vertex u ∈ Big(S) has |N (u) ∩ U (D)| ≥ r), let H denote the maximal bipartite subgraph of G with vertex partition Big(S) ∪ (U (D) ∩ N (Big(S)), and apply the Modified Expansion Lemma to H. We will 5 get a partition Big(S) = A1 ∪ B1 and U (D) ∩ N (Big(S)) = A2 ∪ B2 such that E(A1 , B2 ) = ∅, |A2 | ≤ r|A1 | and B1 has |B1 | r-stars in B2 . If the Modified Expansion Lemma returns B1 = Big(S), then we claim that (Big(S), U (D)) is a constellation. To see this, firstly note that |Big(S)| has |Big(S)| r-stars in U (D). Secondly, note that since we chose the vertices of a maximal star packing for S, there is no r-star contained in G[U (D)]. As U (D) has no neighbors in Small(S) ∪ B(D), it follows that there is no r-star intersecting U (D) in G \ Big(S). Thus (Big(S), U (D)) is a constellation, and the claim is proved. In this case the algorithm stops. So now assume that the Modified Expansion Lemma returns Big(S) = S A1 ∪ B1 with A1 6= ∅. Let X = {D[v] : v ∈ NS(A1 ) ∩ U (D)}. Note that as E(A1 , B2 ) = ∅ and |A2 | ≤ r|A1 |, we have |X| ≤ | {D[v] : v ∈ A2 }| ≤ |A2 |r d ≤ |A1 |r d+1 . Then let Small(S) = Small(S)∪A1 , Big(S) = Big(S)\A1 , B(D) = B(D) ∪ X, U (D) = U (D) \ X. Note that after this move, we still have that |B(D)| ≤ |Small(S)|r d+1 , and U (D) has no neighbors in Small(S) ∪ B(D). Note that in either case, |Big(S)| strictly decreases, so the algorithm must eventually terminate, either because (Big(S), U (D)) is a constellation, or because |U (D) ∩ N (Big(S))| ≤ r|Big(S)|. If (Big(S), U (D)) is a constellation, apply Reduction Rule 2 using (Big(S), U (D)). This gives us a partition in which Big(S) = U (D) = ∅. Thus in either case, we have that |U (D) ∩ N (Big(S))| ≤ r|Big(S)|. Note that every vertex u ∈ U (D) is in D[v] for some v ∈ N (S) (as otherwise, either max{d(v) : v ∈ N [u]} < r or G[D] contains an r-star, a contradiction in either case). Moreover such a v must be in U (D)∩N (Big(S)), as there are no edges between U (D) and Small(S)∪B(D). Thus |U (D)| ≤ r d |U (D)∩N (Big(S))| ≤ r d+1 |Big(S)|. Then we have |V (G)| = |S| + |U (D)| + |B(D)| ≤ |S| + r d+1 |Big(S)| + r d+1 |Small(S)| ≤ (r d+1 + 1)|S| ≤ (k − 1)(r + 1)(r d+1 + 1) = O(k). 4 Proof of Theorem 2 A split graph is a graph where the vertex set can be partitioned into a clique and an independent set. An instance of the well-known N P-hard problem 3-Dimensional Matching contains a vertex set that can be partitioned into three equally large sets V1 , V2 , V3 (also called partite sets). Let k denote the size of each of V1 , V2 , V3 . It furthermore contains a number of 3-sets containing exactly one vertex from each Vi , i = 1, 2, 3. The problem is to decide if there exists a set of k vertex disjoint 3-sets (which would then cover all vertices). Such a set of k vertex disjoint 3-sets is called a perfect matching. The 3-sets are also called edges (or hyperedges). 6 Theorem 4. Let r ≥ 3. It is N P-hard to decide if the vertex set of a split graph can be partitioned into vertex disjoint copies of K1,r . Proof. We will reduce from 3-Dimensional Matching. Let I be an instance of 3-dimensional matching. Let V1 , V2 , V3 denote the three partite sets of I and let E denote the set of edges in I. Let m = |E| and k = |V1 | = |V2 | = |V3 |. We will build a split graph GI as follows. Let V = V1 ∪ V2 ∪ V3 be the vertices of I. Let X1 be a set of m vertices and X2 be a set of m − k vertices and let X = X1 ∪ X2 . Let Y be a set of (m − k)(r − 1) vertices and let W be a set of k(r − 3) vertices (if r = 3 then W is empty). Let the vertex set of GI be V ∪ X ∪ Y ∪ W. Add edges such that X becomes a clique in GI . Let each vertex in X1 correspond to a distinct edge in E and connect that vertex with the 3 vertices in V which belongs to the corresponding edge in E. Furthermore add all edges from X1 to W . Finally, for each vertex in X2 add r − 1 edges to Y in such a way that each vertex in Y ends up with degree one in GI . This completes the construction of GI . Clearly GI is a split graph as X is a clique and V ∪Y ∪W is an independent set. We will now show that the vertex set of GI can be partitioned into vertex disjoint copies of K1,r if and only if I has a perfect matching. First assume that I has a perfect matching. Let E ′ ⊆ E denote the edges of the perfect matching. For the vertices in X1 that correspond to the edges in E ′ we include the three edges from each such vertex to V as well as r − 3 edges to W . This can be done such that we obtain k vertex disjoint copies of K1,r covering all of V and W as well as k vertices from X1 . Now for each vertex in X2 include the r − 1 edges to Y as well as one edge to an unused vertex in X1 . This can be done such that we obtain an additional m − k vertex disjoint copies of K1,r . We have now constructed m vertex disjoint copies of K1,r which covers all the vertices in GI , as required. Now assume that the vertex set of GI can be partitioned into vertex disjoint copies of K1,r . As |V ∪ W ∪ Y ∪ X| = m(r + 1) we note that we have m vertex disjoint copies of K1,r , which we will denote by K. As all vertices in Y need to be included in such copies we note that every vertex of X2 is the center vertex of a K1,r . Let K′ denote these m − k copies of K1,r . Each K1,r in K′ must include 1 edge from X2 to X1 . These m − k edges form a matching, implying that m − k vertices of X1 also belong to the copies of K1,r in K′ . This leaves k vertices in X1 that are uncovered and rk vertices in V ∪ W that are uncovered. Furthermore, as V ∪ W is an independent set, each copy of K1,r in K \ K′ must contain a vertex of X1 . As |K \ K′ | = k we note that the k copies of K1,r in K \ K′ must include exactly one vertex from X1 . Also as each vertex in X1 has exactly three neighbours in V , each such K1,r also contains 3 vertices from V (as V needs to be covered) and therefore r − 3 vertices form W . Therefore the 7 k vertices in X1 that belong to copies of K1,r in K \ K′ correspond to k edges in E which form a perfect matching in GI . This completes the proof as we have shown that GI can be partitioned into vertex disjoint copies of K1,r if and only if I has a perfect matching. The following lemma is known. We give the simple proof for completeness. Lemma 4. No split graph contains an induced path on 5 vertices. Proof. Assume G is a split graph where V (G) is partitioned into an independent set I and a clique C. For the sake of contradiction assume that P = p0 p1 p2 p3 p4 is an induced P5 in G. As I is independent we note that {p0 , p1 } ∩ C 6= ∅ and {p3 , p4 } ∩ C 6= ∅. As C is a clique there is therefore an edge from a vertex in {p0 , p1 } to a vertex in {p3 , p4 }. This edge implies that P is not an induced P5 in G, a contradiction. Proof of Theorem 2. By Lemma 4, G5 contains all split graphs. The result now follows immediately from Theorem 4. Acknowledgment. Research of GG was partially supported by Royal Society Wolfson Research Merit Award. Research of BS was supported by China Scholarship Council. References [1] R. Bar-Yehuda, M. Halldórsson, J. Naor, H. Shachnai, and I. Shapira, Scheduling split intervals, in 30th Annu. ACM-SIAM Symp. on Discrete Algorithms, 2002, pp. 732–741. [2] R. Bejar, B. Krishnamachari, C. Gomes, and B. Selman, Distributed constraint satisfaction in a wireless sensor tracking system, Workshop on Distributed Constraint Reasoning, Internat. Joint Conf. on Artificial Intelligence, 2001. [3] A. Brandstädt, V.B. Le, and J.P. Spinrad. Graph Classes: A Survey, SIAM, 1999. [4] M. Cygan, F.V. Fomin, L. Kowalik, D. Lokshtanov, D. Marx, M. Pilipczuk, M. Pilipczuk, and S. Saurabh, Parameterized Algorithms, Springer, 2015. [5] R.G. Downey and M.R. Fellows, Foundations of Parameterized Complexity, Springer, 2013. [6] M. Fellows, J. Guo, H. Moser, and R. Niedermeier, J. Comput. Syst. Sci. 77:1141–1158, 2011. 8 [7] M. Fellows, P. Heggernes, F. Rosamond, C. Sloper, and J.A. Telle, Finding k Disjoint Triangles in an Arbitrary Graph. In WG’05, Lect. Notes Comput. Sci. 3353:235–244, 2005 [8] F.V. Fomin, D. Lokshtanov, N. Misra, G. Philip, and S. Saurabh, Hitting forbidden minors: Approximation and Kernelization. In STACS 2011, LIPIcs 9:189–200, 2011. [9] J. Guo and R. Niedermeier. Linear problem kernels for NP-hard problems on planar graphs. In ICALP 2007, Lect. Notes Comput. Sci. 4596:375-386, 2007. [10] D.G. Kirkpatrick and P. Hell, On the completeness of a generalized matching problem. In 10th STOC, ACM Symposium on Theory of Computing, 240–245, 1978. [11] S. Kratsch, Recent developments in kernelization: A survey. Bulletin EATCS, no. 113, 2014. [12] D. Lokshtanov, N. Misra, and S. Saurabh, Kernelization - preprocessing with a guarantee. Lect. Notes Comput. Sci. 7370:129-161, 2012. [13] E. Prieto and C. Sloper, Looking at the stars, Theor. Comput. Sci. 351:437–445, 2006. [14] J. Wang, D. Ning, Q. Feng, and J. Chen, An improved parameterized algorithm for a generalized matching problem, In TAMC’08, Lect. Notes Comput. Sci., 4978:212–222, 2008. 9 A Proof of Theorem 3 Note that G4 is the family of cographs [3]. It is well-known [3] that any nontrivial (i.e., with at least two vertices) cograph G is either disconnected or its complement is disconnected. Below let n denote the order of G and let m denote the size of G. The following lemma is well-known. Lemma 5. For any graph G, we can in time O(n2 ) find the connected components of G and the connected components of the complement of G. Lemma 6. For any G ∈ G4 and any s ≥ 1 we can in time O(n2 ) find a set of s vertices, say S, in G such that |N [S]| is maximum possible. Proof. Let C1 , C2 , . . . , Cl be the connected components of G (l ≥ 1). Assume first that all the components are non-trivial. As any induced subgraph of a cograph is also a cograph we note that the complement of each Ci is disconnected. Therefore for each i = 1, 2, . . . , l there exists a non-trivial (each part is non-empty) partition (Xi , Yi ) of V (Ci ) such that all edges exist between Xi and Yi in G. Let mi be maximum degree of a vertex in Ci for each i = 1, 2, . . . , l. The maximum number of vertices we can add to N [S] by adding one vertex from Ci is mi + 1 and the maximum number of vertices added to N [S] by adding two vertices from Ci is |V (Ci )| as we can add a vertex from Xi and one from Yi . Therefore the maximum possible |N [S]| is the sum of the s largest numbers in the set m1 + 1, m2 + 1, . . . , ms + 1, (|V (C1 )| − m1 − 1), (|V (C2 )| − m2 − 1), . . . , (|V (Cl )| − ml − 1). Furthermore it is easy to find the actual set S. It is not hard to modify the proof above for the case when some Ci ’s are trivial. Now we are ready to prove the main result of this appendix. Proof of Theorem 3: Let G ∈ G4 and let r ≥ 3 be arbitrary. First assume that G is connected, which implies that the complement of G is disconnected. Let X and Y partition V (G) such that all edges exist between X and Y in G. We now consider two cases. Case 1: |X| > r|Y | or |Y | > r|X|. Without loss of generality, assume that |X| > r|Y |. In this case we recursively find the maximum number of r-stars we can pack into G[X]. Let mx be the maximum number of r-stars in G[X]. If (r + 1)mx + (r + 1)|Y | ≤ n, then the optimal answer is that we can pack mx + |Y | r-stars into G as we can always find |Y | r-stars with centers in Y and not touching the mx r-stars we already found in G[X]. If 10 (r+1)mx +(r+1)|Y | > n, then the optimal solution is ⌊n/(r+1)⌋ r-stars as we can pick |Y | r-stars touching as few of the mx r-stars in G[X] as possible and then pick as many of the mx r-stars that are left untouched. This completes this case. Case 2: |X| ≤ r|Y | and |Y | ≤ r|X|. Let x = |X| and y = |Y | and define a and b as follows: a= rx − y ry − x and b = 2 2 r −1 r −1 Let a′ = ⌊a⌋ = a − ǫa and b′ = ⌊b⌋ = b − ǫb . We will first show that we can find a′ + b′ r-stars such that a′ of the r-stars have the center in X and all leaves in Y and b′ of the r-stars have the center in Y and all leaves in X. This is possible due to the following: a′ r + b′ = (a − ǫa )r + (b − ǫb ) + rx−y − (rǫa + ǫb ) = r ry−x r 2 −1 r 2 −1 = y − (rǫa + ǫb ) And, analogously, b′ r + a′ = x − (rǫb + ǫa ) As 0 ≤ ǫa < 1 and 0 ≤ ǫb < 1 we note that we cover all vertices in G except rǫa +ǫb +rǫb +ǫa = (r +1)(ǫa +ǫb ). Therefore the number of vertices we cannot cover by the r-stars above is strictly less than 2(r+1). If (r+1)(ǫa +ǫb ) < r+1 then we have an optimal solution (covering all vertices except at most r), so assume that (r + 1)(ǫa + ǫb ) ≥ r + 1. Clearly the optimal solution is either a′ + b′ or a′ + b′ + 1. As we already have a solution with a′ + b′ r-stars we will now determine if there is a solution with a′ + b′ + 1 r-stars. If some vertex, say wx , in X has degree at least r in G[X], then there is indeed a solution with a′ + b′ + 1 r-stars, because of the following. As (r + 1)(ǫa + ǫb ) ≥ r + 1 we must have ǫa > 0 and ǫb > 0, which implies that we can pick an r-star with center in wx ∈ X and with at most rǫb +ǫa −1 leaves in X and at most rǫa + ǫb leaves in Y . Once this r-star has been picked it is not difficult to pick an additional a′ r-stars with centers in X (and leaves in Y ) and b′ r-stars with centers in Y (and leaves in X), due to the above. Therefore we may assume no vertex in X has degree at least r in G[X]. Analogously we may assume that no vertex in Y has degree at least r in G[Y ]. If there exists a′ + 1 vertices SX in X such that |N [SX ] ∩ X| ≥ a′ + 1 + r − (rǫa + ǫb ), then proceed as follows. We can create a′ + 1 stars in G[X] such that they together have exactly r − (rǫa + ǫb ) non-centers. By the above each 11 star has less than r leaves, so we can expand these a′ + 1 stars to r-stars by adding leaves from Y . This uses up a′ + 1 + r − (rǫa + ǫb ) vertices from X and (a′ + 1)r − (r − (rǫa + ǫb )) vertices from Y . Adding an additional b′ stars with the center in Y and all leaves in X uses up b′ vertices from Y and rb′ vertices from X. Therefore we have used b′ + a′ r + (rǫa + ǫb ) = y vertices from Y and the following number of vertices from X, a′ +rb′ +1+r−(rǫa +ǫb ) = x−(rǫb +ǫa )+1+r−(rǫa+ǫb ) = x+1+r−(r+1)(ǫa +ǫb ) As (r + 1)(ǫa + ǫb ) ≥ r + 1 we note that we use at most x vertices from X and we have a solution with a′ + b′ + 1 r-stars. Analogously if there exists b′ + 1 vertices SY in Y such that |N [SY ] ∩ Y | ≥ b′ + 1 + r − (rǫb + ǫa ), we obtain a′ + b′ + 1 r-stars. By applying Lemma 6 to G[X] and G[Y ] we can decide the above in polynomial time. We may therefore assume that no such SX or SY exist. We will now show that a′ + b′ is the optimal solution. For the sake of contradiction assume that we have a∗ r-stars with centers in X and b∗ r-stars with centers in Y , such that they are vertex disjoint and a∗ + b∗ = a′ + b′ + 1. Without loss of generality we may assume that a∗ ≥ a′ + 1. The a∗ r-stars with centers in X all have at least one leaf in Y as the maximum degree in G[X] is less than r. Furthermore by the above (SX does not exist) any a′ + 1 r-stars with centers in X have more than r(a′ + 1) − (r − (rǫa + ǫb )) leaves in Y . Therefore we use strictly more than the following number of vertices in Y . r(a′ + 1) − (r − (rǫa + ǫb )) + (a∗ + b∗ − (a′ + 1)) = ra′ + rǫa + ǫb + b′ = y This contradiction implies that the optimal solution is a′ + b′ in this case. This completes the case when G is connected. Finally assume that G is disconnected. In this case we recursively solve the problem for each connected component, which can be added together to get an optimal solution for G. It is not difficult to see that the above can be done in polynomial time. 12
8cs.DS
Stereo obstacle detection for unmanned surface vehicles by IMU-assisted semantic segmentation Borja Bovcona,∗, Rok Mandeljca,b , Janez Peršb , Matej Kristana a University of Ljubljana, Faculty of Computer and Information Science, Večna pot 113, 1000 Ljubljana, Slovenia. of Ljubljana, Faculty of Electrical Engineering, Tržaška cesta 25, 1000 Ljubljana, Slovenia. b University arXiv:1802.07956v1 [cs.RO] 22 Feb 2018 Abstract A new obstacle detection algorithm for unmanned surface vehicles (USVs) is presented. A state-of-the-art graphical model for semantic segmentation is extended to incorporate boat pitch and roll measurements from the on-board inertial measurement unit (IMU), and a stereo verification algorithm that consolidates tentative detections obtained from the segmentation is proposed. The IMU readings are used to estimate the location of horizon line in the image, which automatically adjusts the priors in the probabilistic semantic segmentation model. We derive the equations for projecting the horizon into images, propose an efficient optimization algorithm for the extended graphical model, and offer a practical IMU-camera-USV calibration procedure. Using an USV equipped with multiple synchronized sensors, we captured a new challenging multi-modal dataset, and annotated its images with water edge and obstacles. Experimental results show that the proposed algorithm significantly outperforms the state of the art, with nearly 30 % improvement in water-edge detection accuracy, an over 21 % reduction of false positive rate, an almost 60 % reduction of false negative rate, and an over 65 % increase of true positive rate, while its Matlab implementation runs in real-time. Keywords: Computer vision, inertial measurement unit, marine navigation, obstacle detection, sensor fusion, semantic segmentation, stereo vision, unmanned surface vehicles 1. Introduction The past decade of research in marine and field robotics has led to establishment of a new class of small-sized unmanned surface vehicles (USVs). Such boats are typically less than 2 m long, and can be guided either manually or programmed to follow a pre-determined path. Their main advantage over the larger counterparts is portability and the ability to navigate relatively shallow waters and narrow marinas. This broadens the potential areas of applications, which range from coastal water and environmental surveillance to inspection of man-made structures above and below water. On the other hand, the small form factor of such USVs limits the available sensor payload, which is further restricted by the power consumption limitations. Therefore, cameras are gaining prominence as light-weight, low-power, and informationrich sensors, which represent a viable alternative or addition to other sensor modalities [1, 2]. In contrast to LIDAR, the camera systems do not contain moving parts, which makes them robust to mechanical stress. Compared to RADAR and LIDAR, the camera systems are completely passive and are therefore inherently safe in any environment, without the potential risk of interfering with other critical systems, such as radio communication or GPS [3]. Furthermore, the commercially available ∗ Corresponding author Email addresses: [email protected] (Borja Bovcon), [email protected] (Rok Mandeljc), [email protected] (Janez Perš), [email protected] (Matej Kristan) Preprint submitted to a journal high-performance LIDAR systems are typically unsuitable for small-sized USVs, as their weight and size may compromise the boat stability [4]. Similarly, the usefulness of affordable and commonly used laser sensors is limited even on larger vessels, due to significant variations in lighting and constant rocking of the boat [5, 6]. The performance of standard stereo-vision-based methods in USV applications is severely limited by rapidly-changing water surface, reflections, and the absence of texture in the absence of disturbances, such as waves. The obstacles often do not sufficiently protrude through the water surface to be reliably detected by stereo systems. Recently, Kristan et al. [7] proposed a graphical model for monocular obstacle detection via semantic segmentation (SSM) of the observed marine scene. The algorithm generates a water segmentation mask and treats all objects in the water as obstacles. Their approach runs in real-time and outperforms related approaches on the task of obstacle detection. However, it fails in the presence of significant rolling and pitching in rough seas, and is susceptible to false positives and degraded sea-edge estimation in the presence of visual ambiguities (e.g., when horizon is poorly distinguishable from the sky). In this paper, we build upon [7], and propose a new segmentation-based obstacle detector for unmanned surface vehicles that incorporates the roll and pitch measurements from the on-board IMU and additionally verifies obtained detections using a stereo system (Figure 1). We claim the following three major contributions. The first contribution is extension of the graphical model for semantic segmentation [7] with roll and USV Read sensors Estimate priors siderable body of literature can be found on topic of obstacle detection and avoidance. Krotosky et al. [8], Zhang et al. [9], and Cao et al. [10] use a stereo camera system to compute disRight image Left image Hyper-priors: parity map and use it for obstacle detection. They apply dif+ IMU ferent computer vision methods to filter the disparity map and readout remove noise in detected obstacles. Krotosky et al. [8] comDetected sea-edge bine detections from disparity map with information from an Stereo verification Estimate posteriors and obstacles infrared camera to further improve the detection of pedestrians. Shim et al. [11] use a combination of several sensors for obstacle detection. They use LIDAR to detect general obstacles on the road under the assumption of ground being a flat surLeft image face. In the next step, they use a monocular camera in combinaStereo verification tion with HOG [12] and SVM [13] algorithms to detect pedestrians and vehicles, while limiting the search area to bounding boxes of detections previously obtained from the LIDAR. Einhorn et al. [14] use frontally mounted monocular camera and Extended Kalman Filters to reconstruct the scene and conRight image sequently detect potential obstacles. They propose attentiondriven method for image areas where the obstacle situation is Figure 1: Outline of our IMU-assisted semantic segmentation method using unclear and a more detailed scene reconstruction is necessary. stereo verification (ISSMS ) for obstacle detection. The IMU measurements Ćesić et al. [15] fuse detections from stereo cameras and RAconstrain the semantic segmentation, and provide sea-edge estimate and obstaDAR. Visually detected obstacle features are matched using cle candidates in each camera. Afterwards, the stereo verification step is applied to reduce the false negative and false positive detections. stereo block matching and optical flow procedure. Filtered feature correspondences are projected to radar plane and passed to the multi-target tracking algorithm. Asvadi et al. [16] propose pitch measurements from the IMU. This information is used to obstacle detection method using LIDAR fused with measureproject the horizon onto the input image, and automatically adments from inertial navigation system (GPS/IMU). The method just the priors and hyper-priors of the segmentation model. This mainly improves detection of pedestrians and cyclists. Li et al. [17] enables reliable segmentation even during significant motion of presented a method for road detection with image segmentation the boat. We derive the required IMU-to-camera horizon probased on dark channel prior [18] and horizon estimation. jection equations, and propose a practical IMU-to-camera caliThe majority of approaches that were developed for aubration procedure. Our second contribution is improvement of tonomous ground vehicles rely on estimation of the ground plane, the segmentation-based obstacle detection via stereo verificaand cannot be readily applied to the aquatic environment of the tion. The approach applies epipolar constraints and template USVs. A common practice for obstacle detection in marine enmatching to reduce the amount of false positive and false negvironment is the use of RADAR, sonar, or LIDAR. Almeida ative detections. Our third contribution is a new challenging et al. [19] proposed obstacle detection using on-board radar. dataset for marine obstacle detection, which consists of mulThey experienced difficulties in detecting small obstacles that tiple sequences with time-synchronized data streams from onwere located in the near proximity (closer than 200 m) of the board stereo system, IMU and GPS, and is currently the largest boat. The size and power consumption of radar units represent of its kind. The extensive experimental analysis on this new an additional challenge in application on small-sized USVs. dataset shows that the proposed approach significantly outperSeveral approaches have therefore focused on obstacle detecforms the state-of-the-art SSM [7], both in accuracy of sea-edge tion using cameras. estimation and in the accuracy of obstacle detection. Larson et al. [20] present advances in obstacle avoidance The remainder of this paper is structured as follows. Secfor USVs and point out the use of cameras. Their approach tion 2 provides a brief overview of the related work. Sections 3 to obstacle detection with monocular camera relies on horizon to 5 present the proposed IMU-assisted segmentation model, estimation and image segmentation. On open sea, they use simstereo-based obstacle verification algorithm, and calibration prople trigonometric calculations to estimate the horizon, while cedure, respectively. Section 6 describes our new marine obstain marine environment and near shoreline, they use nautical cle detection dataset, which is used in Section 7 for experimencharts, which provide them with analogous baseline distance tal evaluation of the proposed approach, while Section 8 wraps to the shore. Guo et al. [21] use an omni-directional camera up the paper with concluding remarks. to detect obstacles in water, based on the difference between two consecutive frames and foreground extraction. However, 2. Related work this method does not consider the dynamic nature of clouds and sky, nor their effect on the visual properties of water. This reObstacle detection in unmanned surface vehicles is still a sults in spurious difference between consecutive images, and relatively young research area, especially compared to the already- thus incorrect foreground extraction due to weather conditions. established field of autonomous ground vehicles, where a conGal [22] uses edge detection approaches to detect the horizon IMU conditional priors: yaw roll pitch 2 Estimate priors Read sensors line, and then search for obstacles below the estimated horizon. A major drawback of the method described in [22] is approximation of the sea-edge with a straight line. This assumption is often violated, especially in coastal waters and in marina, where the horizon does not correspond to the edge of water. The method described in [22] also relies on a sharp boundary between sea and sky when estimating the horizon line. In practice, however, this boundary is often blurred due to unfavorable weather conditions (haze, overwhelming cloudiness, fog), sun glitter, and reflections of the surrounding environment in water, making estimation of the exact position of the horizon difficult. Osborne et al. [23] propose a method capable of tracking objects on both visible and thermal imagery. They detect obstacles based on agglomerative clustering of temporally stable features and track stable object clusters frame-to-frame. Cane et al. [24] proposed obstacle detection and tracking based on saliency maps with wake and glint suppression and achieve excellent results on the open-seas dataset [25], which is part of the PETS2016 [26] challenge. Wang et al. [27, 28, 29] propose a vision-based obstacle detection that incorporates a stereo camera system. They use saliency detection in left camera to detect obstacles under the estimated sea edge and motion estimation to refine the output from saliency detection. Using epipolar constraints of stereo camera system and template matching, they search for correspondences of detected obstacles in right camera. In [29] they proposed disparity filtering to further improve position of the correspondences. However, their assumption of sharp boundary between sea and sky is often violated in practice. They also rely solely on the left camera for obstacle detection. Wang et al. [30] present stereo vision based obstacle detection. They estimate the sea surface by fitting a plane to the 3-D point set of the reconstructed scene. By aligning the reconstructed 3-D points with the sea surface, they compute occupancy grid and height grid, based on which the obstacles above water are detected. A calm sea may lack texture, which results in poor 3-D reconstruction of the sea, and consequently inaccurate sea surface estimation. In addition, such approach requires objects to significantly protrude through the water surface in order to be distinguished as obstacles. This assumption is violated for small buoys and floating debris. Huntsberger et al. [31] propose a stereo vision based navigation using a Hammerhead system. They generate dense range images, project range data into 2-D grid map, and perform spatial and temporal filtering on the map. For each map cell they compute a hazard probability, which serves for detecting and tracking discrete objects. However, the Hammerhead system cannot be used on small-sized USVs due to its dimensions, and suffers from the assumption that all obstacles stick out of the water. Recently, Kristan et al. [7] proposed a graphical model for monocular obstacle detection via semantic segmentation of the observed marine scene. This state-of-the-art algorithm is most closely related to our work. The algorithm generates a water segmentation mask, and treats all objects in the water region as obstacles. The model assumes that an image of marine environment can be partitioned into three distinct and approximately parallel semantic regions: sky at the top, ground or haze in the Estimated from IMU Fit semantic components Construct conditional priors Set hyper-priors Extract obstacles and water edge Construct obstacle map Estimate posteriors Water Figure 2: Outline of the ISSM. The IMU readings continuously modify hyperpriors of the semantic segmentation model, reducing the visual ambiguity and leading to robust edge of water estimation and improved obstacle detection. middle, and water at the bottom of the image. The semantic structure is enforced by fitting vertically distributed Gaussian components and regularizing the result with a Markov random field. This approach significantly outperforms the related approaches on the task of marine obstacle detection. It successfully detects obstacles protruding through the surface and floating obstacles, does not assume a straight water edge, and runs in real-time. Nevertheless, the SSM [7] still fails in the presence of visual ambiguities. For example, when the boat faces open water and the horizon is hidden by the haze, the SSM approach drastically over- or under-estimates the extent of the water region. 3. Augmented semantic segmentation model Following the notation from [7], the input image is repre sented by an array of values Y = yi i=1:M , where   yi = ui , vi , ri , gi , bi T is a feature vector consisting of the pixel’s   T position, [ui , vi ] , and RGB color values, ri , gi , bi . In the segmentation model, each pixel is described with a four-component mixture model (Figure 2), p(yi | Θ, ht , π) = 3 X φ(yi | µk , Σk )π̃ik + U(yi )π̃i4 , (1) k=1 where φ(· | µ, Σ) are the Gaussians corresponding to the three main semantic regions, ht denotes horizon line parameters at time t and U(·) is an additional uniform component that models the outliers. In contrast to [7] we make the per-pixel class priors, π̃ik , explicitly depend on the prior probability of their labels, which are estimated from the currently-available horizon parameters ht , i.e., π̃ik = πik p(xi = k | ht ), (2) where πik = p(xi = k) and p(xi = k | ht ) is the prior computed from the current horizon position, as described in Section 3.1. To encourage segmentation into three approximately vertically-distributed semantic structures, Kristan et al. [7] define hyper-priors ϕ0 over the Gaussian means in (1). Since positions 3 and orientations of Gaussians depend on roll and pitch of the boat, and thus on parameters of horizon line in the image, we make this relation explicit, by defining the hyper-priors on the Gaussian parameters as p(Θ | ϕ0 , ht ) = Y3 k=1   φ µk | µµk (ht ), Σµk (ht ) . (hidden) Prior distributions (hidden) Pixel labels (3) (observed) ht (hidden) Horizon line IMU (observed) IMU readout n o Pixel measurements The modified hyper-priors are defined as ϕ0 (ht ) = µµk (ht ), Σµk (ht ) , k=1:3 where µµk (ht ) and Σµk (ht ) are computed as described in Sec(hidden) (hidden) tion 3.2. Mixture parameters Global weak priors The posteriors over pixel class labels are defined according to (1) as pik = φ(yi | µk , Σk )π̃ik for k ∈ [1, 3] and pi4 = U(yi )π̃i4 . Figure 3: The proposed graphical model. The extension from the original Following Diplaros et al. [32], a smooth segmentation is enmodel [7] is shown in blue. couraged by treating both the priors, π = {πi }i=1:M , and the pos teriors, P = pi i=1:M , over the pixel class labels as random sians in (1) using the horizon-dependent hyper-priors as variables, which form a Markov random field. The joint distriQ T   M bution over priors is approximated by p(π) ≈ i p(πi | πNi ),   −1  X opt T −1  T −1  where πNi is a mixture distribution over the priors of the i-th    µk = βk Λk  q̂ik yi  Σk − µµk (ht ) Σµk  , pixel’s neighbors. The potentials in the MRF corresponding to i=1 priors are M X opt 1 Σk = β−1 q̂ik (yi − µk )(yi − µk )T , (7) k (4) p(πi | πNi ) ∝ exp (− E(πi , πNi )), 2 i=1 PM with exponent defined as E(πi , πNi ) = D(πi k πNi ) + H(πi ). −1 −1 where βk = i=1 q̂ik and Λk = (Σ−1 k + Σµk ) . For clearer exThe term D(πi k πNi ) is the Kullback-Leibler divergence, while position, we illustrate the differences between the original [7] H(πi ) is the entropy. This term penalizes differences over neighand the proposed graphical model in Figure 3. In practice, the boring priors and discourages uniform distributions in the prialternating computations of EM steps (6) and (7) require only ors. The distribution over posteriors, p(P), is defined in the few iterations to converge. same way, leading to the following joint probability density function 3.1. Estimation of conditional prior distributions M Our semantic segmentation model (Figure 3) utilizes the X p(P, Y, Θ, π | ϕ0 ) ∝ exp  log p(yi , Θ | ϕ0 ) IMU information in per-pixel class priors through the condii=1 tional prior distributions p(xi = k | ht ) (2), which are computed # 1 from the horizon location. − E(πi , πNi ) + E( pi , pNi ) , (5) When the boat is facing open water, the horizon tends to 2 approximately match the water edge. But this is not true when where p(yi , Θ | ϕ0 ) is calculated by Bayes rule from (1) and the boat is close to the shore and partially facing inland. In these (3). Following the derivations in [32] and [7], the maximization situations, a part of the region below the horizon may instead of (5) can be achieved by introducing auxiliary variables for the correspond to the land (see Figure 4). Nevertheless, the water priors and posteriors, si and qi , leading to an EM-like algorithm is never located above the horizon and the sky is never located with the E-step below the horizon. These observations are used in our definition of the conditional prior distributions. ŝ·k = (ξ s· ◦ π·k ◦ (π·k ∗ λ)) ∗ λ1 , The conditional prior p(xi = k | ht ) of the water component q̂·k = (ξq· ◦ p·k ◦ ( p·k ∗ λ)) ∗ λ1 , is set to zero for pixels above the horizon and to one elsewhere. opt Similarly, the conditional prior of the sky component is set to π·k = (ŝ·k + q̂·k )p(x· = k | ht )/4, (6) zero for pixels below the horizon and to one elsewhere. The conditional priors of the remaining two components are set to where ◦ and ∗ denote the Hadamard product [33] and convoluuninformative priors, i.e., all values are set to one. To account tion, respectively. λ is a small discrete Gaussian kernel (e.g., for the noise in horizon estimates, for example due to synchro3 × 3) with its central element set to zero and its elements sumnization issues or nonrigid coupling between the camera and ming to one, while λ1 = 1 + λ. The main difference between (6) IMU, all conditional priors are blurred by a Gaussian with a and the equivalent step in [7] is the addition of the prior probsmall variance. An example of the estimated conditional priors ability of a pixel belonging to the water class, p(x· = k | ht ), is shown in Figure 5. conditioned on the horizon-line position, ht (we describe this prior in Section 3.1). 3.2. Estimation of the Gaussian hyper-priors The M-step recomputes means and variances of the GausBecause the three Gaussian components in (1) correspond to semantic elements in the scene, their spatial parts change 4 to the slope of the projected horizon line ht in the image. 3.3. Estimation of horizon line from IMU measurements By definition, the horizon line in the image corresponds to projection of points that lie infinitely far away on the water surface. Since all parallel planes project to the same horizon line [34], the projection is independent from the camera height, and is governed only by the camera-to-plane rotation. Let Xusv denote 3-D coordinates of a point, located on the water surface far away in front of the camera, and expressed in the coordinate system of the USV. Let Rusv cam denote the matrix describing the rotation between coordinate systems of the USV and the camera. The point Xusv i is projected into camera’s image plane according to Figure 4: The water edge does not always match the horizon (yellow line). The bottom row shows hyper-priors of semantic component centers, modulated by the estimated position and angle of the horizon. usv λc xi = KRusv cam X i , Sky component Sea component Input image (9) Middle component where K is the camera calibration matrix, which is estimated during the calibration process. In our approach, the points Xusv forming the horizon are i obtained from the IMU measurements. Let Rimu usv denote the rotation of IMU relative to the USV, and let Rimu denote the rotation of IMU relative to the water surface (i.e., the readout of Euler angles from the IMU). We make a reasonable assumption that the Z-axes of IMU and camera are approximately aligned by design. In principle, these geometric relations are sufficient to calculate the vanishing points, which can be directly used to estimate the horizon line. However, as experimentally demonstrated in Section 7.1, projection of vanishing points into input image tends to incur inaccuracies. This is because vanishing points likely project outside of the image boundaries, while the calibrated radial distortion model reliably estimates distortion only for points inside the image. Therefore, we instead obtain horizon line by projecting two points, {Ximu and Ximu 1 2 } lying on the XZ-plane of the IMU coordinate system at horizontal angles ±αh (constrained by the camera FOV) and at finite distance Z = ldist . These points are rotated into a plane parallel to the water surface by relation Uniform component Conditional priors Figure 5: An input image and the corresponding conditional priors p(xi = k | ht ) of semantic components. The horizon line ht , estimated from the IMU readings, is shown as yellow line. with changing roll and pitch of the boat. For example, upward pitch moves the horizon in the image downwards, which should affect the likely position of the Gaussian components. The prior on their position is captured by the hyper-priors ϕ0 in (3). The original SSM [7] applies fixed hyper-priors (3), which are learned from training images with manual annotations of the three semantic regions. We follow a similar n procedure to learn o horizon-dependent hyper-priors, ϕ0 (ht ) = µµk (ht ), Σµk (ht ) , that change with USV motion. We annotated the horizon location in each of the training images from SSM [7]. For each semantic component, the average vertical displacement to the horizon line was computed over all images. Thus during the USV operation, the vertical position of the learned mean priors µµk (ht ) are set to the learned displacement from the current horizon estimate. Figure 4 shows examples of our horizon-based dynamic Gaussian priors adjustment. Since the middle component usually moves with the horizon, we modify the corresponding hyper-prior of the middle Gaussian component as well. In particular, the spatial covariance of the middle component, Σµ2 , in (3) is contained in the upper-left 2 × 2 sub-matrix Σµ2pos . Let R ht be a 2 × 2 rotation matrix that rotates by the angle γ ht . The hyper-prior covariance of the middle component is obtained by replacing its spatial part with the following proximal projection with the angle equal to γ ht    Σ̃2pos = RTht R ht Σ2pos RTht ◦ I2 R ht , (8)  −1 Xusv = Rimu Rimu Ximu usv i , i (10) where Ximu and Xusv denote a point before and after rotation, i i usv respectively. The rotated points {Xusv 1 , X 2 } are projected into the image using (9) while taking into account radial distortion. The horizon is estimated by fitting a line to the projected radially distorted points. 3.4. Obstacle detection by semantic segmentation Obstacles are detected by post-processing the output of the semantic segmentation algorithm, where we follow the approach from [7]. Fitting the semantic model by (6) and (7) to the input image results in pixel-wise a-posteriori probability distributions q̂ik , which indicate the probability of each pixel belonging to one of the four semantic components (Figure 2). Pixels are labeled as water if their a-posteriori probability is maximized for the water component, which in our case is indexed as k = 3. where I2 is a 2 × 2 identity matrix. The angle γ ht corresponds 5 Let Bt be the water region mask and let Bi ∈ [0, 1] indicate the water label of the i-th pixel. The water region mask is therefore constructed by    1, arg maxk q̂ik = 3 . (11) Bi =   0, otherwise From water region mask Bt we extract the largest connected region, resulting in an obstacle map B̂t . The blobs of non-water pixels surrounded by water pixels in B̂t correspond to potential obstacles. Non-maximum suppression is performed on B̂t to merge nearby blobs in order to avoid multiple detections of the same obstacle. The water edge is defined as the largest connected outer edge of regions in the obstacle map B̂t . The proposed obstacle detection algorithm ISSM is summarized by Algorithm 1 and Figure 2. Figure 6: Obstacle detections oiL and oRj in left camera and right camera (yellow bounding box). The red line denotes the epipolar line lRi corresponding to the obstacle oiL , while the dashed line denotes the extended search region. detected obstacle in the left image is extracted and matched against the potential candidates in the right image (and vice versa) by means of normalized cross correlation (NCC) [35]. In some cases segmentation might successfully segment only part of the object. Therefore matching is performed in a search region equal to the object size enlarged by a factor θS1 . In particular, an NCC response map is computed separately between the template and search region on each color channel and the result is averaged over the three channels yielding a single response map. A match is accepted if the maximum of the response map exceeds a pre-defined threshold θncc . The epipolar verification addresses the problem of false positives. However, some obstacles may be detected only in one image and not in the other. Therefore, all tentative detections that have not been successfully matched via the epipolar verification are revisited. For each such detection oiL in the left image, NCC verification is performed in a region in the right image. In absence of a detected candidate in the right image, the region is centered at the same coordinates as oiL and the region size is set to oiL enlarged by a factor θS2 . The detection is accepted if maximum response of the NCC exceeds pre-defined threshold θncc . The same approach is applied to the remaining tentative detections from the right camera. All tentative obstacles that do not pass this verification are discarded. The ISSM with added stereo verification is denoted as ISSMS in the remainder of the paper, and is summarized in Algorithm 2. Algorithm 1 Monocular obstacle detection algorithm ISSM Require:  Pixel features Y = yi i=1:M , IMU read-out, model from previous time-step Θt−1 and q̂t−1 . Ensure: Obstacle image map B̂t , water edge et , detected objects {oi }i=1:Nob j and model parameters Θt , q̂t . 1: Compute ht from IMU (Section 3.3). 2: Estimate conditional prior distributions (Section 3.1) and Gaussian hyper-priors (Section 3.2) using ht . 3: Estimate the per-pixel posteriors by (6), (7) and (8). 4: Calculate obstacle image map B̂t , water edge et and obstacles below water edge {oi }i=1:Nob j (Section 3.4). 4. Stereo verification for improved detection The ISSM from Algorithm 1 generates a list of potential obstacles based on their distinctiveness from the water. The list may contain false positives due to water droplets and reflections of sun or nearby environment. In addition, small objects are more likely to be incorrectly segmented, resulting in false negative (missing) detections. To address both of these issues, we separately apply the ISSM to left and right camera of the USV’s on-board stereo system, and use epipolar constraints and template matching to consolidate the obtained lists of detected obstacles. Let {oiL }i=1:NL and {oRj } j=1:NR be the list of tentative detected obstacles, obtained by ISSM in left and right camera, respectively. Each detection is parameterized by its position and size in the image: oi = [ui , vi , wi , hi ]T . According to the epipolar constraint, an object detected in the left image should have a corresponding detection along the epipolar line in the right image. Due to imperfect segmentation and calibration, the correspondence center will not lie exactly on the epipolar line, but within its vicinity, which is set to the obstacle bounding box diagonal in our application (Figure 6). Since multiple detections might agree with the epipolar constraint, a further verification is required. A template of the Algorithm 2 Stereo obstacle detection algorithm ISSMS Require:  Pixel features Y = yi i=1:M , horizon line parameters ht , model from previous time-step Θt−1 and q̂t−1 . Ensure: Obstacle image map B̂t , Water edge et , detected objects {oi }i=1:Nob j , model parameters Θt and q̂t . 1: Obtain obstacles {oL i }i=1:Nob j and {oR j } j=1:Nob j by indepenL R dently applying Algorithm 1 in left and right camera. 2: Match obstacles from left and right camera using epipolar constraints and NCC verification. 3: Perform a brute-force template matching for all unpaired detections. 6 Rectified image from left camera Rectified image from right camera Edge of water Large obstacle Dense stereo Figure 8: Left: An example of annotated frame. Right: The white highlighted area denotes the region in the coastal waters of Koper, Slovenia where the USV has acquired the data. RANSAC plane fitting Rectified image from left camera with fitted plane and ground points Small obstacle Disparity map Figure 7: Plane fitting estimation for camera-IMU calibration. Points which meet the threshold θdist condition are shown together with grid of the fitted plane in the bottom-left image. 5. The camera-IMU calibration Projection of horizon from IMU into camera (9, 10) deimu pends on three rotation matrices: Rimu , Rusv cam and Rusv . The Rimu relates the IMU coordinate system to the world coordinate system and is constructed from the IMU readings at each timeimu step. The Rusv cam and Rusv relate the camera and IMU coordinate systems to the USV coordinate system, respectively, and have to be estimated by calibration. We devised a practical approach for such calibration, which we outline in this section. During calibration, the USV is placed on a solid flat ground, for example a parking lot in the marina (Figure 7). Since the world- and USV-coordinate systems are aligned on a flat surface, the Rimu usv is directly obtained from the IMU readout. Estimation of the Rusv cam , however, is not as straight forward, and requires computation of the floor-plane orientation with respect to camera. In principle, this could be achieved by placing a flat square marker on the floor in front of the camera, and estimating the rotation from the corresponding homography. However, our USV is equipped with a stereo camera, which allows us to compute the point cloud, and use RANSAC [36] to fit a ground plane to the points whose distance to boat does not exceed a predefined threshold θdist . The process is outlined in Figure 7. The rotation matrix Rusv cam is then computed from the normal of the estimated ground plane. The normal provides only rotations around X- and Z-axes. Since the camera Z-axis is in the direction of heading, we set the rotation around Y-axis to zero. 6. Multimodal marine obstacle detection dataset Due to lack of a realistic, publicly-available USV dataset comprising annotated stereo video and IMU data, we captured our own dataset, called Marine obstacle detection dataset 2 (Modd 7 2). It contains 28 video sequences of variable length, amounting to 11 675 frames at resolution of 1278 × 958 pixels. This is currently the biggest marine obstacle detection dataset to date and we plan to make it publicly available as a part of this paper. The dataset was captured over a period of approximately 15 months in the gulf of Koper, Slovenia (area shown in Figure 8), using the USV developed by Harpha Sea, d.o.o. The USV uses a steerable thrust propeller with a small turn radius for guidance, and can reach the maximum velocity of 2.5 m s−1 . The USV is equipped with a compass, IMU unit and a stereo system Vrmagic VRmMFC, which consists of two Vrmagic VRmS14/C-COB CCD sensors, Thorlabs MVL4WA lens with 3.5 mm focal length, maximum aperture of f/1.4, and a 132.1◦ FOV. The stereo system is mounted approximately 0.7 m above the water surface, and faces forward. Both cameras are connected to the on-board computer through USB-2.0 bus and are thus capable of capturing the video of given resolution at 10 frames per second. The cameras automatically adjust the aperture according to the lighting conditions. Examples of the sequences from the dataset are shown in Figure 9. During the dataset acquisition, the USV was manually guided by an expert, who was instructed to simulate realistic navigation scenarios with situations in which an obstacle may present a danger to the USV. Such situations include sailing straight in the direction of an obstacle (Figure 10 left), and sailing in the near proximity of an obstacle (Figure 10 right). The dataset was recorded over a period of several months at different times of day and under various weather conditions to maximize the visual diversity. We followed the obstacle annotation protocol from [7]. Each frame was manually annotated by a human annotator and later verified by an expert. The edge of water is annotated by a polygon, while obstacles are annotated with bounding boxes. The annotated obstacles are further divided into two classes — large obstacles (whose bounding box straddles the sea edge), and small obstacles (whose bounding box is fully located below the sea edge polygon). For completeness, the horizon is annotated on frames where the USV is facing away from the shore with the horizon clearly visible (see Figure 8). Table 1 summarizes general properties of the dataset sequences and conditions that might affect the IMU accuracy and obstacle detection. Two sequences contain extreme sudden change of motion and boat rolling and pitching. Sun glitter is present Sequence 1 Sequence 5 Sequence 2 Sequence 6 Sequence 3 Sequence 7 Sequence 10 Sequence 11 Sequence 12 Sequence 13 Sequence 14 Sequence 15 Sequence 16 Sequence 17 Sequence 18 Sequence 19 Sequence 20 Sequence 21 Sequence 22 Sequence 23 Sequence 24 Sequence 26 Sequence 27 nfrm nobj 550 470 250 240 900 820 790 670 180 110 280 200 210 175 415 660 310 300 520 520 295 160 290 340 560 170 620 670 0.662 0.731 0 0.629 0.499 2.520 2.690 0.890 2.442 0.996 0 0.230 0.945 1.337 1.231 0.811 0 5.058 1.972 0.331 0.317 0.516 0.510 0.829 1.485 4.018 0.732 0.855 Sudden movement Sun glitter Land reflection Sequence 8 Sequence 9 Sequence 25 Table 1: Statistics of Modd 2 video sequences. Number of frames in a sequence (nfrm ), average number of obstacles per frame in a sequence (nobj ), informations of possible occurring extreme conditions (sudden movement of the USV, sun glitter and/or environment reflections in the water). Sequence 4 Sequence 1 Sequence 2 Sequence 3 Sequence 4 Sequence 5 Sequence 6 Sequence 7 Sequence 8 Sequence 9 Sequence 10 Sequence 11 Sequence 12 Sequence 13 Sequence 14 Sequence 15 Sequence 16 Sequence 17 Sequence 18 Sequence 19 Sequence 20 Sequence 21 Sequence 22 Sequence 23 Sequence 24 Sequence 25 Sequence 26 Sequence 27 Sequence 28 Sequence 28 Figure 9: Random frame from each sequence in our dataset. 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 in 12 sequences, while 16 sequences contain significant reflection of the environment in the water. Twenty-five out of 28 sequences contain at least one occurrence of an obstacle. The average number of obstacles per frame is 0.614 with standard deviation 0.945. The distribution of obstacle occurrence per video sequence is shown in Figure 11, while Figure 12 shows the distribution of obstacle sizes. 7. Experiments The prototype of our stereo IMU-assisted semantic segmentation algorithm (ISSMS ) was implemented in Matlab. All experiments were performed on a desktop PC with the Intel Core i7-7700 3.6 GHz CPU. We plan to make the code publicly available as a part of this paper. This section is structured as follows. Section 7.1 provides relevant implementation details. Section 7.2 compares our approach to the state-of-the-art on a monocular setup, while Section 7.3 provides an ablation study. In Section 7.4, we compare our approach to the state-of-the-art in a stereo setup. Section 7.5 analyzes the speed of our algorithm and its individual compo- Figure 10: Left: Examples where the USV is sailing in the near proximity of the obstacles, passing them by. Right: Examples where the USV is sailing straight to the obstacle and eventually collides with it. 8 nents. Lastly, Section 7.6 reports performance under extreme conditions, while the failure cases are discussed in Section 7.7. 1600 Small obstacles Large obstacles Number of occurrances 1400 7.1. Implementation details and parameters As our approach is based on the state-of-the-art SSM [7] algorithm, it uses the same parameters as SSM, listed in [7]. The hyper-priors have been trained on the same sequences as [7], with additional horizon annotations (Section 6). Segmentation is performed in the RGB colorspace. Projection of the horizon into camera (Section 3.3) requires points that lie far away in front of the camera. Due to the Earth curvature it√is sufficient to generate points at distance of ldist = 3.57 · 103 hcam m [37], where hcam is the camera height in meters. As noted in Section 3.3, the points should be within the camera FOV where the radial distortion model is most accurate. To demonstrate this, we have generated the points at various angles and measured the root-mean-square-error of the fitted horizon line. The results are shown in Figure 13. Observe that the error is kept consistently low for a range of angles below 56◦ and exponentially increases for larger angles. In our experiments we thus set the angle to αh = 40◦ . The camera-IMU calibration (Section 5) requires setting a threshold θdist , which specifies the region in front of the camera used to estimate the plane by RANSAC [36]. The calibration was performed in a marina parking lot (shown in Figure 7 topleft). The area of approximately ten meters in front of the USV contained no obstacles, thus we set the threshold to 10 m. A point-to-plane distance threshold in RANSAC was set to 1 m and the maximum number of iterations was set to 1000. The number of maximum iterations was set to a standard boundary condition value, while the threshold for inlier set acceptance was set to a moderately high value (1m) in order to address possible calibration errors. The parameters did not require tuning. The search region scale-factors in stereo verification algorithm (Section 4) were experimentally determined on a separate training set and were set to θS1 = 1.2 and θS2 = 3.0, while the NCC acceptance threshold was set to a high, conservative value θncc = 0.95, and was not fine tuned. 1200 1000 800 600 400 200 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 Sequence number Figure 11: Number of obstacle occurrence per video sequence. Red color represents large obstacles and blue color represents small obstacles. 3500 Small obstacles Large obstacles Number of occurrences 3000 2500 2000 1500 1000 500 0 0 200 400 600 800 1000 Obstacle diagonal [pixels] Figure 12: Distribution of obstacle sizes. Red color represents large obstacles and blue color represents small obstacles. Size is measured as diagonal length of obstacle bounding box in pixels. 1.0 7.2. Comparison to state of the art: monocular setup This section analyzes the performance of our IMU-assisted semantic segmentation method (ISSM), from Section 3, on the task of monocular obstacle detection. Our approach is compared to the SSM [7], which is currently the most recent state of the art for segmentation-based obstacle detection in USV. We use the same performance measures as [7]. The accuracy of the sea-edge estimation is measured by mean-squared error and standard deviation over all sequences (µedg , σedg ). The accuracy of obstacle detection is measured by number of true positives (TP), false positives (FP), and false negatives (FN), by F-measure, and the number of false positives per frame (αFP). The results of comparison are summarized in the first two rows of Table 2. On the task of water-edge estimation, the proposed ISSM outperforms the original SSM by 29.8 %. The improvement is statistically significant according to the Student’s Horizon RMSE 0.8 0.6 0.4 0.2 20 30 40 50 60 70 Angle [degrees] Figure 13: Accuracy of horizon line estimation with respect to the angle between points on the water surface. The RMSE of horizon is scaled to interval [0, 1] to remove the effect of resolution. 9 Figure 14: Qualitative comparison of ISSM (blue line) and original SSM (red line) on the task of sea-edge estimation using monocular camera. T-test [38] with a confidence level of 95 %. Our ISSM also reduces the false negative rate by 66.9 %, while drastically improving the number of true positive detections, by 61.3 %. This is reflected in the F-score, which is improved by 44.9 %. Figure 14 shows a qualitative comparison of sea-edge detection of both algorithms. We can observe that the original SSM often over-estimates the extent of water. This leads to dangerous situations where obstacles are mistaken for water. Additional examples of water segmentation by ISSM are illustrated in Figure 15. Our ISSM is able to correctly segment the images even in harsh conditions where the horizon is blurred. 7.3. Ablation study of the ISSM An ablation study was performed to determine how each of our contributions from Section 3 affects the detection performance. The following variants of ISSM were tested: (i) ISSMM1 , that does not use modified hyper-priors (Section 3.2), (ii) ISSMM2 , that does not use modified hyper-priors, nor watercomponent conditional-prior distribution (i.e., p(xi = k | ht ) from Section 3.1 set to one for k = 3), (iii) ISSMM3 , that does not use modified hyper-priors, nor sky-component conditional-prior distribution (i.e., p(xi = k | ht ) set to one for k = 1), and (iv) ISSMH , that does not use conditional-prior distributions (i.e., p(xi = k | ht ) from Section 3.1 set to one for all k). The results of variants are given in Table 2 (rows three to six). The results of ISSMM1 variant indicate a drastic improvement in sea-edge estimation (by 29.3 %) compared to the original SSM as well as an improvement of 42.5 % in F-score. The ISSMM2 variant yields an improvement in F-score (by 26.4 %) compared to the original SSM, but its sea-edge estimation accuracy is reduced by 5.6 %. Among other variants in the group, this one has the lowest performance regarding sea-edge estimation and true-positive detections. The ISSMM3 improves the sea-edge estimation by 31.0 % and F-score by 44.0 % compared to the original SSM. The ISSMM3 outperforms other variants in the group on the task of sea-edge estimation as well as F-score 10 Figure 15: Qualitative examples of water segmentation for monocular camera setup. For each input image we separately show detected edge of the sea (blue), detected obstacles (yellow rectangle) and the portion of image segmented as water (blue). ISSM ISSMS Figure 16: Qualitative comparison of ISSM with and without stereo verification (Section 4) in obstacle detection. The detected sea edge is denoted with blue line and detected obstacles with yellow rectangles. Table 2: Comparison of our ISSM and ISSMS to SSM [7] and SSMS . We report sea-edge estimation error (µedg ) and its standard deviation in brackets divided by height of the image to remove the effect of resolution, numbers of true positive (TP), false positive (FP), and false negative (FN) detections, the Fmeasure (F-score), and the average number of false positives per frame (αFP). µedg TP FP FN F-score αFP SSM ISSM 0.084 (0.053) 0.059 (0.070) 264 682 1156 1708 624 206 0.229 0.416 0.099 0.146 ISSMM1 ISSMM2 ISSMM3 ISSMH 0.059 (0.071) 0.089 (0.066) 0.058 (0.068) 0.079 (0.067) 628 418 618 441 1643 1385 1513 1604 260 470 270 447 0.398 0.311 0.409 0.301 0.141 0.119 0.130 0.137 SSMS ISSMS 0.084 (0.053) 0.059 (0.070) 215 617 105 82 673 271 0.356 0.778 0.009 0.007 Table 3: Segmentation speed for original SSM [7] and different variants of our ISSM. The ∆t denotes time required for processing a single frame, ω denotes the processing frame-rate. ∆t [ms] ω [fps] SSM ISSMM1 ISSMM2 ISSMM3 ISSMH ISSM 29.34 34.08 29.75 33.61 29.49 33.91 29.44 33.97 31.50 31.75 34.38 29.09 Table 4: Measurement of segmentation and obstacle verification speed for SSMS and ISSMS . The ∆t denotes time required for processing a single frame, ω denotes the processing frame-rate. ∆t [ms] ω [fps] measure, but it detects less true positives than the ISSMM1 . The ISSMH variant improves the sea-edge estimation by 6.0 % and the F-score measure by 23.9 %. Among other variants in the group, this one achieves the lowest F-score results. We observe that each of the described variants outperforms the original SSM in sea-edge estimation error as well as Fscore. The variant ISSMM3 achieves the best sea-edge estimation results as well as the best F-score. The best overall performance is obtained by combination of all variants (the proposed ISSM). SSMS seg. SSMS ver. SSMS seg. & .ver ISSMS seg. ISSMS ver. ISSMS seg. & ver. 58.69 17.04 21.99 4.65 80.68 12.39 68.77 14.54 21.36 3.44 90.13 11.10 7.5. Computational performance analysis We further studied how each of the contributions from Section 3 affects the processing speed of the obstacle detection algorithm. We measure processing times of each ISSM variant, presented in Section 7.2 and Section 7.3. The impact of the proposed SSM modifications on the processing speed is summarized in Table 3. The computation and application of the IMU information does not additionally reduce speed of the original SSM [7], maintaining on average approximately 30 fps throughout the sequences, while drastically improving the performance both for sea edge estimation and obstacle detection. Timings for stereo segmentation are gathered in Table 4. Compared to its monocular counterpart, the stereo segmentation version is on average slower by approximately 50 %, mainly due to processing of two images instead of one. The additional speed reduction, caused by obstacle verification (Section 4), depends on the number of detected obstacles and increases as more obstacles need to be verified. Although we experience a decrease in frame rate in stereo setup, the cameras on our target USV do not support framerates above 10 frames per second. This makes our proposed algorithm real-time, wile significantly improving the quality of obstacle detection by 46.5 %. 7.4. Comparison to state of the art: stereo verification This section analyzes the performance of our IMU-assisted semantic segmentation algorithm with added stereo verification (ISSMS ) from Section 4. The original SSM [7] is implemented strictly for monocular camera. For fair comparison, we have therefore also implemented a variant of SSM [7] with added proposed stereo verification (Section 4), which we denote as SSMS . The results are summarized in Table 2 (rows seven to eight). Comparing the results of SSM [7] to its stereo extension SSMS , we observe a significant decrease of false positive detections (by 90.9 %), which consequently boosts the F-score by 35.7 %. Similarly, we observe a significant drop in false positive detections (by 95.2 %) when comparing the results of ISSM and ISSMS . This leads to an improved F-score by 46.5 %. From presented results, we conclude the proposed stereo verification step (Section 4) on average improves F-score by approximately 41 %. Comparing the results of SSMS and ISSMS , we observe that our ISSMS outperforms SSMS in every aspect. It detects 65.2 % more true positives, has 21.9 % fewer false positives, and 59.7 % fewer false negatives, which consequently leads to higher F-score, boosted by 54.2 %. Figure 16 shows a qualitative comparison of monocular and stereo obstacle detection. We observe that stereo verification step successfully removes false positive detections caused by sea foam (Figure 16 first row), small sun glitter (Figure 16 second row), and sun flares on camera lens (Figure 16 third row). 7.6. Performance under extreme conditions In this section, we compare the results obtained on sequences with three types of extreme conditions indicated in Table 1: (i) abrupt USV motion change, (ii) environment reflections in the water, and (iii) sun glitter. Note that some sequences contain multiple extreme conditions. The results are summarized in Table 5. 7.6.1. Abrupt motion change Sudden movement of the USV can be caused by strong waves and winds, or by acceleration/deceleration and abrupt steering of the USV. Due to internal filtering, the IMU readouts do not properly reflect the pose of the USV. As a result, the estimated horizon lags behind its true position (see Figure 17a for example). This leads to reduced accuracy in conditional priors, 11 a b second type are small local specular reflections caused by the sun. Both types of glitter can be seen in Figure 17c. The small glitters cause small phantom detections in segmentation, while the large glitter causes mis-labeling of large water regions. Results from Table 5 (rows nine to twelve) show that the proposed ISSM algorithm improves the sea edge estimation by as much as 4.3 % compared to the SSM [7]. The stereo obstacle verification method is capable of removing phantom detections caused by sun glitter and consequently improving the F-score by 76.7 % when combining it with SSM and by 76.5 % when combining it with ISSM. c Figure 17: Different types of extreme cases. Image (a) shows abrupt motion change and estimated horizon lag where the ground truth horizon is denoted with green line and the estimated horizon is denoted with yellow line. Image (b) shows environment reflections in the water and image (c) shows sun glitter. Table 5: Performance of algorithms under different types of extreme conditions. µedg [px] TP FP FN F-score αFP 7.7. Failure cases Some sequences in the Modd 2 dataset pose a significant challenge for the segmentation. The failure cases are shown in Figure 18. The left side of Figure 18 shows failures in sea edge estimation. Figure 18(a,d) and Figure 18(b,e) show mislabeling of water region due to sun glitter and opaque reflections. The water edge is estimated conservatively, preventing potentially dangerous false negatives near the boat. A potentially dangerous situation is shown in Figure 18(c,f), where a part of pier is labeled as water due to visual similarity. The ISSM provides a slightly better segmentation than SSM [7]. The right side of Figure 18 shows failures in stereo obstacle verification. Figure 18(g,j) shows false positives caused by sea foam. The ISSM detects false obstacles on the foam. The ISSMS discards some of the false positives, but one still remains because it is consistent in both views. Figure 18(h,k) shows a dangerous mis-labeling of the pier as water, a true obstacle detection on part of the pier, and a false-positive detection due to sun glitter. The glitters are removed by ISSMS , but the detection on pier remains because it is visually consistent across the views. In the third example in Figure 18(i,l), the ISSMS verification incorrectly removed a true detection of the buoy because it appears very small at the observed distance. Abrupt motion change (Section 7.6.1) SSM ISSM SSMS ISSMS 0.063 (0.043) 0.028 (0.022) 0.063 (0.043) 0.028 (0.022) 1 1 1 1 2 41 0 0 0 0 0 0 0.500 0.047 1.000 1.000 0.002 0.049 0.000 0.000 Environment reflections (Section 7.6.2) SSM ISSM SSMS ISSMS 0.079 (0.044) 0.042 (0.042) 0.079 (0.044) 0.042 (0.042) 199 592 150 527 423 1027 92 74 599 206 648 271 0.280 0.490 0.288 0.753 0.053 0.128 0.012 0.009 0.193 0.219 0.830 0.932 0.229 0.252 0.003 0.004 Glitter (Section 7.6.3) SSM ISSM SSMS ISSMS 0.116 (0.064) 0.111 (0.098) 0.116 (0.064) 0.111 (0.098) 110 137 110 136 886 975 13 14 32 5 32 6 which may affect the quality of the image segmentation. From the first four rows of Table 5, we conclude ISSM outperforms the original SSM [7] in sea edge estimation. Both algorithms detect the same amount of true positives and false negatives, however, the ISSM detects more false positives which leads to a lower F-score. By combining ISSM with stereo obstacle verification method from Section 4 (ISSMS ), the false positives are removed, while the number of true positives and false negatives are left unchanged, thus leading to F-score of 1. 8. Conclusion We proposed a new segmentation model for obstacle detection in USVs. Our model extends the recent state-of-the-art semantic segmentation graphical model from [7] by incorporating boat roll and pitch measurements from the on-board IMU. In addition, we propose a stereo verification scheme to reduce the false positive and false negative detections. To evaluate our new segmentation model, we captured a new challenging dataset that consists of several synchronized video sequences and IMU measurements, as well as annotations of water-edge and obstacles in each image. This new dataset is the largest multi-sensor USV dataset, and will be made publicly available. A series of detailed experiments was conducted to analyze our proposed monocular algorithm (ISSM) and its stereo extension (ISSMS ). Compared to the state-of-the-art SSM [7], the ISSM improves the sea edge estimation by 29.8 % and the Fscore by 45.0 %. Our stereo verification approach boosts the F-score of the SSM [7] and the ISSM by over 35 % and 46 %, respectively. The ISSMS outperforms the SSM [7] with added 7.6.2. Environment reflections The extent of environment reflections (boats, land, piers, buoys, etc.) increases with the flatness of the water surface, and affects the obstacle segmentation quality (see Figure 17b). From the results in Table 5 (rows five to eight), we see that the ISSM outperforms SSM [7] on the task of sea-edge estimation as well as F-score measure. The sea edge estimation is improved by 46.8 %, which also leads to a better obstacle detection results (F-score improved by 42.9 %). Stereo obstacle verification improves F-score by 2.8 % when combining it with SSM, and by 34.9 % when combining it with ISSM. 7.6.3. Glitter We distinguish between two types of sun glitter. The first type is caused by a low-lying sun, which creates a large region that significantly differs from the surrounding water. The 12 ISSM SSM a b d e c g h f j k ISSM i ISSMS l Figure 18: Qualitative examples of failure cases. The left side shows comparison between SSM [7] and ISSM on the task of sea edge estimation under failure cases, while the right side shows comparison between ISSM and ISSMS on the task of obstacle detection under failure cases. The detected sea edge is denoted with blue line and detected obstacles are denoted with yellow rectangles. References stereo verification by 54.2 %. An ablation study showed that each part of our algorithm contributes to the performance, with best performance achieved with all parts combined. The proposed ISSM and the stereo extension ISSMS significantly boost the performance in extreme conditions. Results show that our ISSM outperforms the SSM [7] in water-edge estimation by 35.5 % on average. In presence of glitter and mirroring, the ISSM outperforms the SSM [7] by over 27 % in F-score. Our stereo verification approach boosts the ISSM by over 68 %. The stereo ISSM (ISSMS ) outperforms the SSM [7] with added stereo verification (SSMS ) by approximately 24 %. Although the ISSM significantly outperforms the state-ofthe-art SSM [7], it does so without significant drop in processing speed. The stereo extension reduces the speed by approximately 50 % due to processing two images. However, the processing speed is still above the cameras frame rate, keeping the algorithm real-time. Our future work will explore deeper integration of the stereo system into the graphical model, and extension with alternative camera modalities. Additional sensors, such as compass, clock, and GPS, could be used to determine the position of sun, and use it as a prior in explicit detection of reflections and glitter in the water (e.g., [39]) to improve robustness. The current algorithm is able to adapt to the water appearance changes and runs in real-time, but uses very simple visual features. As part of our future work, we will explore feature learning to further improve the segmentation, while still keeping the algorithm real-time. The performance of our proposed method was evaluated offline on a desktop computer in Matlab environment. We plan to re-implement the ISSM to run on an on-board system of the USV and utilize the many related maritime datasets (e.g. PETS2016 [26], MAR-DCT [40], SMD [2]) for parameter tunning and additional evaluation. References Acknowledgment This work was in part supported by the Slovenian research agency ARRS programs P2-0214 and P2-0095 and the Slovenian research agency ARRS research project J2-8175. 13 [1] J. Woo and N. Kim, “Vision based obstacle detection and collision risk estimation of an unmanned surface vehicle,” 13th Int. Conf. on Ubiquitous Robots and Ambient Intelligence, 2016. [2] D. K. Prasad, D. Rajan, L. Rachmawati, E. Rajabaly, and C. Quek, “Video processing from electro-optical sensors for object detection and tracking in maritime environment: A survey,” IEEE Trans. Intell. Transp. Syst., 2017. [3] R. Halterman and M. Bruch, “Velodyne hdl-64e lidar for unmanned surface vehicle obstacle detection,” in In Proc. SPIE, 2010. [4] N. Muhammad and S. Lacroix, “Calibration of a rotating multi-beam lidar,” in Proc. IEEE/RSJ Int. Conf. on Intelligent Robots and Systems, 2010. [5] H. Dahlkamp, A. Kaehler, D. Stavens, S. Thrun, and G. R. Bradski, “Self-supervised monocular road detection in desert terrain,” in In Proc. Robotics: Science and Systems (RSS), 2006. [6] A. Rankin and L. Matthies, “Daytime water detection based on color variation,” in Proc. 2010 IEEE/RSJ Int. Conf. on Intelligent Robots and Systems, 2010, pp. 215–221. [7] M. Kristan, V. S. Kenk, S. Kovačič, and J. Perš, “Fast image-based obstacle detection from unmanned surface vehicles,” IEEE Transactions on Cybernetics, vol. 46, no. 3, pp. 641–654, 2016. [8] S. J. Krotosky and M. M. Trivedi, “On color-, infrared-, and multimodalstereo approaches to pedestrian detection,” IEEE Trans. Intell. Transp. Syst., vol. 8, no. 4, pp. 619–629, 2007. [9] Z. Zhang, H. Xu, Z. Chao, X. Li, and C. Wang, “A novel vehicle reversing speed control based on obstacle detection and sparse representation,” IEEE Trans. Intell. Transp. Syst., vol. 16, no. 3, pp. 1321–1334, 2015. [10] T. Cao, Z.-Y. Xiang, and J.-L. Liu, “Perception in disparity: An efficient navigation framework for autonomous vehicles with stereo cameras,” IEEE Trans. Intell. Transp. Syst., vol. 16, no. 5, pp. 2935–2948, 2015. [11] I. Shim, J. Choi, S. Shin, T.-H. Oh, U. Lee, B. Ahn, D.-G. Choi, D. H. Shim, and I.-S. Kweon, “An autonomous driving system for unknown environments using a unified map,” IEEE Trans. Intell. Transp. Syst., vol. 16, no. 4, pp. 1999–2013, 2015. [12] N. Dalal and B. Triggs, “Histograms of oriented gradients for human detection,” in Proc. IEEE Conf. Computer Vision and Pattern Recognition, vol. 1, 2005, pp. 886–893. [13] J. A. Suykens and J. Vandewalle, “Least squares support vector machine classifiers,” Neural processing letters, vol. 9, no. 3, pp. 293–300, 1999. [14] E. Einhorn, C. Schröter, and H.-M. Groß, “Attention-driven monocular scene reconstruction for obstacle detection, robot navigation and map building,” Robotics and Autonomous Systems, vol. 59, no. 5, pp. 296–309, 2011. [15] J. Ćesić, I. Marković, I. Cvišić, and I. Petrović, “Radar and stereo vision fusion for multitarget tracking on the special euclidean group,” Robotics and Autonomous Systems, vol. 83, pp. 338–348, 2016. [16] A. Asvadi, C. Premebida, P. Peixoto, and U. Nunes, “3d lidar-based static and moving obstacle detection in driving environments: An approach based on voxels and multi-region ground planes,” Robotics and Autonomous Systems, vol. 83, pp. 299–311, 2016. [17] Y. Li, W. Ding, X. Zhang, and Z. Ju, “Road detection algorithm for autonomous navigation systems based on dark channel prior and vanishing point in complex road scenes,” Robotics and Autonomous Systems, vol. 85, pp. 1–11, 2016. [18] K. He, J. Sun, and X. Tang, “Single image haze removal using dark channel prior,” IEEE transactions on pattern analysis and machine intelligence, vol. 33, no. 12, pp. 2341–2353, 2011. [19] C. Almeida, T. Franco, H. Ferreira, A. Martins, R. Santos, J. M. Almeida, J. Carvalho, and E. Silva, “Radar based collision detection developments on usv roaz ii,” in Proc. OCEANS 2009-EUROPE, 2009, pp. 1–6. [20] J. Larson, M. Bruch, R. Halterman, J. Rogers, and R. Webster, “Advances in autonomous obstacle avoidance for unmanned surface vehicles,” DTIC Document, Tech. Rep., 2007. [21] Y. Guo, M. Romero, S. H. Ieng, F. Plumet, R. Benosman, and B. Gas, “Reactive path planning for autonomous sailboat using an omnidirectional camera for obstacle detection,” in Proc. 2011 IEEE Int. Conf. on Mechatronics, 2011, pp. 445–450. [22] O. Gal, “Automatic obstacle detection for usv’s navigation using vision sensors,” in Robotic Sailing: Proc. 4th Int. Robotic Sailing Conf., 2011, pp. 127–140. [23] C. Osborne, T. Cane, T. Nawaz, and J. Ferryman, “Temporally stable feature clusters for maritime object tracking in visible and thermal imagery,” in Advanced Video and Signal Based Surveillance (AVSS), 2015 12th IEEE International Conference on. IEEE, 2015, pp. 1–6. [24] T. Cane and J. Ferryman, “Saliency-based detection for maritime object tracking,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, 2016, pp. 18–25. [25] M. Andersson, R. Johansson, K.-G. Stenborg, R. Forsgren, T. Cane, G. Taberski, L. Patino, and J. Ferryman, “The ipatch system for maritime surveillance and piracy threat classification,” in Intelligence and Security Informatics Conference (EISIC), 2016 European. IEEE, 2016, pp. 200– 200. [26] L. Patino, T. Cane, A. Vallee, and J. Ferryman, “Pets 2016: Dataset and challenge,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, 2016, pp. 1–8. [27] H. Wang, Z. Wei, S. Wang, C. S. Ow, K. T. Ho, and B. Feng, “A visionbased obstacle detection system for unmanned surface vehicle,” in Proc. 5th IEEE Int. Conf. on Robotics, Automation and Mechatronics, 2011, pp. 364–369. [28] H. Wang, Z. Wei, S. Wang, C. S. Ow, K. T. Ho, B. Feng, and Z. Lubing, “Real-time obstacle detection for unmanned surface vehicle,” in Defense Science Research Conference and Expo, 2011, pp. 1–4. [29] H. Wang, Z. Wei, C. S. Ow, K. T. Ho, B. Feng, and J. Huang, “Improvement in real-time obstacle detection system for usv,” in Proc. 12th Int. Conf. on Control Automation Robotics Vision, 2012, pp. 1317–1322. [30] H. Wang and Z. Wei, “Stereovision based obstacle detection system for unmanned surface vehicle,” in Proc. 2013 IEEE Int. Conf. on Robotics and Biomimetics, 2013, pp. 917–921. [31] T. Huntsberger, H. Aghazarian, A. Howard, and D. C. Trotz, “Stereo vision–based navigation for autonomous surface vessels,” Journal of Field Robotics, vol. 28, no. 1, pp. 3–18, 2011. [32] A. Diplaros, N. Vlassis, and T. Gevers, “A spatially constrained generative model and an em algorithm for image segmentation,” IEEE Transactions on Neural Networks, vol. 18, no. 3, pp. 798–808, 2007. [33] R. A. Horn, “The hadamard product,” in Proc. Symp. Appl. Math, vol. 40, 1990, pp. 87–169. [34] R. Hartley and A. Zisserman, Multiple view geometry in computer vision. Cambridge university press, 2003. [35] J. P. Lewis, “Fast normalized cross-correlation,” in Vision interface, vol. 10, no. 1, 1995, pp. 120–123. [36] M. A. Fischler and R. C. Bolles, “Random sample consensus: A paradigm for model fitting with applications to image analysis and automated cartography,” Commun. ACM, vol. 24, no. 6, pp. 381–395, 1981. [37] A. T. Young. (1970) Distance to the horizon. [Online]. Available: https://goo.gl/8uzoZ1 [38] Student, “The probable error of a mean,” Biometrika, vol. 6, no. 1, pp. 1–25, 1908. [39] M. A. Ahmed, F. Pitie, and A. Kokaram, “Reflection detection in image sequences,” in Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2011, pp. 705–712. [40] D. D. Bloisi, L. Iocchi, A. Pennisi, and L. Tombolini, “Argos-venice boat classification,” in Advanced Video and Signal Based Surveillance (AVSS), 2015 12th IEEE International Conference on. IEEE, 2015, pp. 1–6. 14
1cs.CV
IAS/Park City Mathematics Series Volume 00, Pages 000–000 S 1079-5634(XX)0000-0 Four lectures on probabilistic methods for data science arXiv:1612.06661v2 [math.PR] 4 Nov 2017 Roman Vershynin Abstract. Methods of high-dimensional probability play a central role in applications for statistics, signal processing, theoretical computer science and related fields. These lectures present a sample of particularly useful tools of highdimensional probability, focusing on the classical and matrix Bernstein’s inequality and the uniform matrix deviation inequality. We illustrate these tools with applications for dimension reduction, network analysis, covariance estimation, matrix completion and sparse signal recovery. The lectures are geared towards beginning graduate students who have taken a rigorous course in probability but may not have any experience in data science applications. Contents 1 2 3 4 Lecture 1: Concentration of sums of independent random variables 1.1 Sub-gaussian distributions 1.2 Hoeffding’s inequality 1.3 Sub-exponential distributions 1.4 Bernstein’s inequality 1.5 Sub-gaussian random vectors 1.6 Johnson-Lindenstrauss Lemma 1.7 Notes Lecture 2: Concentration of sums of independent random matrices 2.1 Matrix calculus 2.2 Matrix Bernstein’s inequality 2.3 Community recovery in networks 2.4 Notes Lecture 3: Covariance estimation and matrix completion 3.1 Covariance estimation 3.2 Norms of random matrices 3.3 Matrix completion 3.4 Notes Lecture 4: Matrix deviation inequality 4.1 Gaussian width 2 3 4 5 5 7 7 9 9 9 11 14 18 19 19 23 25 28 29 30 Received by the editors November 7, 2017. Partially supported by NSF Grant DMS 1265782 and U.S. Air Force Grant FA9550-14-1-0009. ©0000 (copyright holder) 1 2 Four lectures on probabilistic methods for data science 4.2 4.3 4.4 4.5 4.6 4.7 Matrix deviation inequality Deriving Johnson-Lindenstrauss Lemma Covariance estimation Underdetermined linear equations Sparse recovery Notes 31 32 33 35 37 38 1. Lecture 1: Concentration of sums of independent random variables These lectures present a sample of modern methods of high dimensional probability and illustrate these methods with applications in data science. This sample is not comprehensive by any means, but it could serve as a point of entry into a branch of modern probability that is motivated by a variety of data-related problems. To get the most out of these lectures, you should have taken a graduate course in probability, have a good command of linear algebra (including the singular value decomposition) and be familiar with very basic concepts of functional analysis (familiarity with Lp norms should be enough). All of the material of these lectures is covered more systematically, at a slower pace, and with a wider range of applications, in my forthcoming textbook [60]. You may also be interested in two similar tutorials: [58] is focused on random matrices, and a more advanced text [59] discusses high-dimensional inference problems. It should be possible to use these lectures for a self-study or group study. You will find here many places where you are invited to do some work (marked in the text e.g. by “check this!”), and you are encouraged to do it to get a better grasp of the material. Each lecture ends with a section called “Notes” where you will find bibliographic references of the results just discussed, as well asvarious improvements and extensions. We are now ready to start. Probabilistic reasoning has a major impact on modern data science. There are roughly two ways in which this happens. • Radnomized algorithms, which perform some operations at random, have long been developed in computer science and remain very popular. Randomized algorithms are among the most effective methods – and sometimes the only known ones – for many data problems. • Random models of data form the usual premise of statistical analysis. Even when the data at hand is deterministic, it is often helpful to think of it as a random sample drawn from some unknown distribution (“population”). In these lectures, we will encounter both randomized algorithms and random models of data. Roman Vershynin 3 1.1. Sub-gaussian distributions Before we start discussing probabilistic methods, we will introduce an important class of probability distributions that forms a natural “habitat” for random variables in many theoretical and applied problems. These are sub-gaussian distributions. As the name suggests, we will be looking at an extension of the most fundamental distribution in probability theory – the gaussian, or normal, distribution N(µ, σ). It is a good exercise to check that the standard normal random variable X ∼ N(0, 1) satisfies the following basic properties:  Tails: P |X| > t 6 2 exp(−t2 /2) for all t > 0. √ Moments: kXkp := (E |X|p )1/p = O( p) as p → ∞. MGF of square: 1 E exp(cX2 ) 6 2 for some c > 0. MGF: E exp(λX) = exp(λ2 ) for all λ ∈ R. All these properties tell the same story from four different perspectives. It is not very difficult to show (although we will not do it here) that for any random variable X, not necessarily Gaussian, these four properties are essentially equivalent. Proposition 1.1.1 (Sub-gaussian properties). For a random variable X, the following properties are equivalent.2  Tails: P |X| > t 6 2 exp(−t2 /K21 ) for all t > 0. √ Moments: kXkp 6 K2 p for all p > 1. MGF of square: E exp(X2 /K23 ) 6 2. Moreover, if E X = 0 then these properties are also equivalent to the following one: MGF: E exp(λX) 6 exp(λ2 K24 ) for all λ ∈ R. Random variables that satisfy one of the first three properties (and thus all of them) are called sub-gaussian. The best K3 is called the sub-gaussian norm of X, and is usually denoted kXkψ2 , that is kXkψ2 := inf t > 0 : E exp(X2 /t2 ) 6 2 . One can check that k · kψ2 indeed defines a norm; it is an example of the general concept of the Orlicz norm. Proposition 1.1.1 states that the numbers Ki in all four properties are equivalent to kXkψ2 up to absolute constant factors. Example 1.1.2. As we already noted, the standard normal random variable X ∼ N(0, 1) is sub-gaussian. Similarly, arbitrary normal random variables X ∼ N(µ, σ) are sub-gaussian. Another example is a Bernoulli random variable X that takes values 0 and 1 with probabilities 1/2 each. More generally, any bounded random variable X is sub-gaussian. On the contrary, Poisson, exponential, Pareto and 1MGF stands for moment generation function. 2The parameters K > 0 appearing in these properties can be different. However, they may differ i from each other by at most an absolute constant factor. This means that there exists an absolute constant C such that property 1 implies property 2 with parameter K2 6 CK1 , and similarly for every other pair or properties. 4 Four lectures on probabilistic methods for data science Cauchy distributions are not sub-gaussian. (Verify all these claims; this is not difficult.) 1.2. Hoeffding’s inequality You may remember from a basic course in probability that the normal distribution N(µ, σ) has a remarkable property: the sum of independent normal random variables is also normal. Here is a version of this property for sub-gaussian distributions. Proposition 1.2.1 (Sums of sub-gaussians). Let X1 , . . . , XN be independent, mean P zero, sub-gaussian random variables. Then N i=1 Xi is a sub-gaussian, and N X Xi i=1 where C is an absolute constant. 2 ψ2 6C N X kXi k2ψ2 i=1 3 Proof. Let us bound the moment generating function of the sum for any λ ∈ R: E exp λ N X  Xi = i=1 N Y E exp(λXi ) (using independence) i=1 6 N Y exp(Cλ2 kXi k2ψ2 ) (by last property in Proposition 1.1.1) i=1 = exp(λ2 K2 ) where K2 := C N X kXi k2ψ2 . i=1 Using again the last property in Proposition 1.1.1, we conclude that the sum P S= N i=1 Xi is sub-gaussian, and kSkψ2 6 C1 K where C1 is an absolute constant. The proof is complete.  Let us rewrite Proposition 1.2.1 in a form that is often more useful in applications, namely as a concentration inequality. To do this, we simply use the first P property in Proposition 1.1.1 for the sum N i=1 Xi . We immediately get the following. Theorem 1.2.2 (General Hoeffding’s inequality). Let X1 , . . . , XN be independent, mean zero, sub-gaussian random variables. Then, for every t > 0 we have P N X   ct2 Xi > t 6 2 exp − PN . 2 i=1 kXi kψ2 i=1 Hoeffding’s inequality controls how far and with what probability a sum of independent random variables can deviate from its mean, which is zero. 3In the future, we will always denote positive absolute constants by C, c, C , etc. These numbers do 1 not depend on anything. In most cases, one can get good bounds on these constants from the proof, but the optimal constants for each result are rarely known. Roman Vershynin 5 1.3. Sub-exponential distributions Sub-gaussian distributions form a sufficiently wide class of distributions. Many results in probability and data science are proved nowadays for sub-gaussian random variables. Still, as we noted, there are some natural random variables that are not sub-gaussian. For example, the square X2 of a normal random variable X ∼ N(0, 1) is not sub-gaussian. (Check!) To cover examples like this, we will introduce the similar but weaker notion of sub-exponential distributions. Proposition 1.3.1 (Sub-exponential properties). For a random variable X, the following properties are equivalent, in the same sense as in Proposition 1.1.1.  Tails: P |X| > t 6 2 exp(−t/K1 ) for all t > 0. Moments: kXkp 6 K2 p for all p > 1. MGF of the square: E exp(|X|/K3 ) 6 2. Moreover, if E X = 0 then these properties imply the following one: MGF: E exp(λX) 6 exp(λ2 K24 ) for |λ| 6 1/K4 . Just like we did for sub-gaussian distributions, we call the best K3 the subexponential norm of X and denote it by kXkψ1 , that is kXkψ1 := inf {t > 0 : E exp(|X|/t) 6 2} . All sub-exponential random variables are squares of sub-gaussian random variables. Indeed, inspecting the definitions you will quickly see that kX2 kψ1 = kXk2ψ2 . (1.3.2) (Check!) 1.4. Bernstein’s inequality A version of Hoeffding’s inequality for sub-exponential random variables is called Bernstein’s inequality. You may naturally expect to see a sub-exponential tail bound in this result. So it may come as a surprise that Bernstein’s inequality actually has a mixture of two tails – sub-gaussian and subexponential. Let us state and prove the inequality first, and then we will comment on the mixture of the two tails. Theorem 1.4.1 (Bernstein’s inequality). Let X1 , . . . , XN be independent, mean zero, sub-exponential random variables. Then, for every t > 0 we have P N X i h  t t2 , . Xi > t 6 2 exp − c min PN 2 maxi kXi kψ1 i=1 kXi kψ1 i=1 Proof. For simplicity, we will assume that K = 1 and only prove the one-sided bound (without absolute value); the general case is not much harder. Our approach will be based on bounding the moment generating function of the sum PN S := i=1 Xi . To see how MGF can be helpful here, choose λ > 0 and use Markov’s inequality to get   (1.4.2) P S > t = P exp(λS) > exp(λt) 6 e−λt E exp(λS). 6 Four lectures on probabilistic methods for data science Recall that S = as PN i=1 Xi and use independence to express the right side of (1.4.2) e−λt N Y E exp(λXi ). i=1 (Check!) It remains to bound the MGF of each term Xi , and this is a much simpler task. If we choose λ small enough so that c , (1.4.3) 0<λ6 maxi kXi kψ1 then we can use the last property in Proposition 1.3.1 to get  E exp(λXi ) 6 exp Cλ2 kXi k2ψ1 . Substitute into (1.4.2) and conclude that   P{S > t} 6 exp −λt + Cλ2 σ2 P 2 where σ2 = N i=1 kXi kψ1 . The left side does not depend on λ while the right side does. So we can choose λ that minimizes the right side subject to the constraint (1.4.3). When this is done carefully, we obtain the tail bound stated in Bernstein’s inequality. (Do this!)  Now, why does Bernstein’s inequality have a mixture of two tails? The subexponential tail should of course be there. Indeed, even if the entire sum consisted of a single term Xi , the best bound we could hope for would be of the form exp(−ct/kXi kψ1 ). The sub-gaussian term could be explained by the central limit theorem, which states that the sum should becomes approximately normal as the number of terms N increases to infinity. Remark 1.4.4 (Bernstein’s inequality for bounded random variables). Suppose the random variables Xi are uniformly bounded, which is a stronger assumption than being sub-gaussian. Then there is a useful version of Bernstein’s inequality, which unlike Theorem 1.4.1 is sensitive to the variances of Xi ’s. It states that if K > 0 is such that |Xi | 6 K almost surely for all i, then, for every t > 0, we have P (1.4.5) σ2 PN 2 i=1 E Xi N X i=1  Xi > t 6 2 exp − t2 /2  . σ2 + CKt Here = is the variance of the sum. This version of Bernstein’s inequality can be proved in essentially the same way as Theorem 1.4.1. We will not do it here, but a stronger Theorem 2.2.1, which is valid for matrix-valued random variables Xi , will be proved in Lecture 2. To compare this with Theorem 1.4.1, note that σ2 + CKt 6 2 max(σ2 , CKt). So we can state the probability bound (1.4.5) as h  t2 t i 2 exp − c min 2 , . σ K Roman Vershynin 7 Just like before, here we also have a mixture of two tails, sub-gaussian and sub-exponential. The sub-gaussian tail is a bit sharper than in Theorem 1.4.1, since it depends on the variances rather than sub-gaussian norms of Xi . The subexponential tail, on the other hand, is weaker, since it depends on the sup-norms rather than the sub-exponential norms of Xi . 1.5. Sub-gaussian random vectors The concept of sub-gaussian distributions can be extended to higher dimensions. Consider a random vector X taking values in Rn . We call X a sub-gaussian random vector if all one-dimensional marginals of X, i.e., the random variables hX, xi for x ∈ Rn , are sub-gaussian. The sub-gaussian norm of X is defined as kXkψ2 := sup k hX, xi kψ2 x∈Sn−1 where Sn−1 denotes the unit Euclidean sphere in Rn . Example 1.5.1. Examples of sub-gaussian random distributions in Rn include the standard normal distribution N(0, In ) (why?), the uniform distribution on the √ centered Euclidean sphere of radius n, the uniform distribution on the cube {−1, 1}n , and many others. The last example can be generalized: a random vector X = (X1 , . . . , Xn ) with independent and sub-gaussian coordinates is sub-gaussian, with kXkψ2 6 C maxi kXi kψ2 . 1.6. Johnson-Lindenstrauss Lemma Concentration inequalities like Hoeffding’s and Bernstein’s are successfully used in the analysis of algorithms. Let us give one example for the problem of dimension reduction. Suppose we have some data that is represented as a set of N points in Rn . (Think, for example, of n gene expressions of N patients.) We would like to compress the data by representing it in a lower dimensional space Rm instead of Rn with m  n. By how much can we reduce the dimension without loosing the important features of the data? The basic result in this direction is the Johnson-Lindenstrauss Lemma. It states that a remarkably simple dimension reduction method works – a random linear map from Rn to Rm with m ∼ log N, see Figure 1.6.3. The logarithmic function grows very slowly, so we can usually reduce the dimension dramatically. What exactly is a random linear map? Several models are possible to use. Here we will model such a map using a Gaussian random matrix – an m × n matrix A with independent N(0, 1) entries. More generally, we can consider an m × n matrix A whose rows are independent, mean zero, isotropic4 and subgaussian random vectors in Rn . For example, the entries of A can be independent Rademacher entries – those taking values ±1 with equal probabilities. 4A random vector X ∈ Rn is called isotropic if E XXT = I . n 8 Four lectures on probabilistic methods for data science Theorem 1.6.1 (Johnson-Lindenstrauss Lemma). Let X be a set of N points in Rn and ε ∈ (0, 1). Consider an m × n matrix A whose rows are independent, mean zero, isotropic and sub-gaussian random vectors in Rn . Rescale A by defining the “Gaussian random projection”5 1 P := √ A. m Assume that m > Cε−2 log N, where C is an appropriately large constant that depends only on the sub-gaussian norms of the vectors Xi . Then, with high probability (say, 0.99), the map P preserves the distances between all points in X with error ε, that is (1.6.2) (1 − ε)kx − yk2 6 kPx − Pyk2 6 (1 + ε)kx − yk2 for all x, y ∈ X. Figure 1.6.3. Johnson-Lindenstrauss Lemma states that a random projection of N data points from dimension n to dimension m ∼ log N approximately preserves the distances between the points. Proof. Take a closer look at the desired conclusion (1.6.2). By linearity, Px − Py = P(x − y). So, dividing the inequality by kx − yk2 , we can rewrite (1.6.2) in the following way: (1.6.4) 1 − ε 6 kPzk2 6 1 + ε for all z ∈ T where T := x−y : x, y ∈ X distinct points . kx − yk2 It will be convenient to square the inequality (1.6.4). Using that 1 + ε 6 (1 + ε)2 and 1 − ε > (1 − ε)2 , we see that it is enough to show that (1.6.5) 1 − ε 6 kPzk22 6 1 + ε for all z ∈ T . By construction, the coordinates of the vector Pz = we can restate (1.6.5) as √1 Az m are √1 m hXi , zi. Thus 1 X hXi , zi2 − 1 6 ε for all z ∈ T . m m (1.6.6) i=1 5Strictly speaking, this P is not a projection since it maps Rn to a different space Rm . Roman Vershynin 9 Results like (1.6.6) are often proved by combining concentration and a union bound. In order to use concentration, we first fix z ∈ T . By assumption, the random variables hXi , zi2 − 1 are independent; they have zero mean (use isotropy to check this!), and they are sub-exponential (use (1.3.2) to check this). Then Bernstein’s inequality (Theorem 1.4.1) gives   m 1 X 2 hXi , zi − 1 > ε 6 2 exp(−cε2 m). P m i=1 (Check!) Finally, we can unfix z by taking a union bound over all possible z ∈ T :     m m X 1 X 1 X 2 2 hXi , zi − 1 > ε 6 hXi , zi − 1 > ε P max P m z∈T m z∈T i=1 i=1 2 6 |T | · 2 exp(−cε m). (1.6.7) By definition of T , we have |T | 6 So, if we choose m > Cε−2 log N with appropriately large constant C, we can make (1.6.7) bounded by 0.01. The proof is complete.  N2 . 1.7. Notes The material presented in Sections 1.1–1.5 is basic and can be found e.g. in [58] and [60] with all the proofs. Bernstein’s and Hoeffding’s inequalities that we covered here are two basic examples of concentration inequalities. There are many other useful concentration inequalities for sums of independent random variables (e.g. Chernoff’s and Bennett’s) and for more general objects. The textbook [60] is an elementary introduction into concentration; the books [10, 38, 39] offer more comprehensive and more advanced accounts of this area. The original version of Johnson-Lindenstrauss Lemma was proved in [31]. The version we gave here, Theorem 1.6.1, was stated with probability of success 0.99, but an inspection of the proof gives probability 1 − 2 exp(−cε2 m) which is much better for large m. A great variety of ramifications and applications of JohnsonLindenstrauss lemma are known, see e.g. [2, 4, 7, 10, 34, 42]. 2. Lecture 2: Concentration of sums of independent random matrices In the previous lecture we proved Bernstein’s inequality, which quantifies how a sum of independent random variables concentrates about its mean. We will now study an extension of Bernstein’s inequality to higher dimensions, which holds for sums of independent random matrices. 2.1. Matrix calculus The key idea of developing a matrix Bernstein’s inequality will be to use matrix calculus, which allows us to operate with matrices as with scalars – adding and multiplying them of course, but also comparing matrices and applying functions to matrices. Let us explain this. 10 Four lectures on probabilistic methods for data science We can compare matrices to each other using the notion of being positive semidefinite. Let us focus here on n × n symmetric matrices. If A − B is a positive semidefinite matrix,6 which we denote A − B  0, then we say that A  B (and, of course, B  A). This defines a partial order on the set of n × n symmetric matrices. The term “partial” indicates that, unlike the real numbers, there exist n × n symmetric matrices A and B that can not be compared. (Give an example where neither A  B nor B  A!) Next, let us guess how to measure the magnitude of a matrix A. The magnitude of a scalar a ∈ R is measured by the absolute value |a|; it is the smallest nonnegative number t such that −t 6 a 6 t. Extending this reasoning to matrices, we can measure the magnitude of an n × n symmetric matrix A by the smallest non-negative number t such that7 −tIn  A  tIn . The smallest t is called the operator norm of A and is denoted kAk. Diagonalizing A, we can see that (2.1.1) kAk = max{|λ| : λ is an eigenvalue of A}. With a little more work (do it!), we can see that kAk is the norm of A acting as a linear operator on the Euclidean space (Rn , k · k2 ); this is why kAk is called the operator norm. Thus kAk is the smallest non-negative number M such that kAxk2 6 Mkxk2 for all x ∈ Rn . Finally, we will need to be able to take functions of matrices. Let f : R → R be a function and X be an n × n symmetric matrix. We can define f(X) in two equivalent ways. The spectral theorem allows us to represent X as X= n X λi u i u T i i=1 where λi are the eigenvalues of X and ui are the corresponding eigenvectors. Then we can simply define f(X) := n X f(λi )ui uT i. i=1 Note that f(X) has the same eigenvectors as X, but the eigenvalues change under the action of f. An equivalent way to define f(X) is using power series. Suppose the function f has a convergent power series expansion about some point x0 ∈ R, 6Recall that a symmetric real n × n matrix M is called positive semidefinite if xT Mx > 0 for any vector x ∈ Rn . 7Here and later, I denotes the n × n identity matrix. n Roman Vershynin i.e. ∞ X f(x) = 11 ak (x − x0 )k . k=1 Then one can check that the following matrix series converges8 and defines f(X): f(X) = ∞ X ak (X − X0 )k . k=1 (Check!) 2.2. Matrix Bernstein’s inequality We are now ready to state and prove a remarkable generalization of Bernstein’s inequality for random matrices. Theorem 2.2.1 (Matrix Bernstein’s inequality). Let X1 , . . . , XN be independent, mean zero, n × n symmetric random matrices, such that kXi k 6 K almost surely for all i. Then, for every t > 0 we have P Here σ2 = PN N X  Xi > t 6 2n · exp − i=1 2 i=1 E Xi t2 /2  . σ2 + Kt/3 is the norm of the “matrix variance” of the sum. The scalar case, where n = 1, is the classical Bernstein’s inequality we stated in (1.4.5). A remarkable feature of matrix Bernstein’s inequality, which makes it especially powerful, is that it does not require any independence of the entries (or the rows or columns) of Xi ; all is needed is that the random matrices Xi be independent from each other. In the rest of this section we will prove matrix Bernstein’s inequality, and give a few applications in this and next lecture. Our proof will be based on bounding the moment generating function (MGF) P E exp(λS) of the sum S = N i=1 Xi . Note that to exponentiate the matrix λS in order to define the matrix MGF, we rely on the matrix calculus that we introduced in Section 2.1. If the terms Xi were scalars, independence would yield the classical fact that the MGF of a product is the product of MGF’s, i.e. (2.2.2) E exp(λS) = E N Y exp(λXi ) = i=1 N Y E exp(λXi ). i=1 But for matrices, this reasoning breaks down badly, for in general eX+Y 6= eX eY even for 2 × 2 symmetric matrices X and Y. (Give a counterexample!) Fortunately, there are some trace inequalities that can often serve as proxies for the missing equality eX+Y = eX eY . One of such proxies is the Golden-Thompson 8The convergence holds in any given metric on the set of matrices, for example in the metric given by the operator norm. In this series, the terms (X − X0 )k are defined by the usual matrix product. 12 Four lectures on probabilistic methods for data science inequality, which states that (2.2.3) tr(eX+Y ) 6 tr(eX eY ) for any n × n symmetric matrices X and Y. Another result, which we will actually use in the proof of matrix Bernstein’s inequality, is Lieb’s inequality. Theorem 2.2.4 (Lieb’s inequality). Let H be an n × n symmetric matrix. Then the function f(X) = tr exp(H + log X) is concave9 on the space on n × n symmetric matrices. Note that in the scalar case, where n = 1, the function f in Lieb’s inequality is linear and the result is trivial. To use Lieb’s inequality in a probabilistic context, we will combine it with the classical Jensen’s inequality. It states that for any concave function f and a random matrix X, one has10 (2.2.5) E f(X) 6 f(E X). Using this for the function f in Lieb’s inequality, we get E tr exp(H + log X) 6 tr exp(H + log E X). And changing variables to X = eZ , we get the following: Lemma 2.2.6 (Lieb’s inequality for random matrices). Let H be a fixed n × n symmetric matrix and Z be an n × n symmetric random matrix. Then E tr exp(H + Z) 6 tr exp(H + log E eZ ). Lieb’s inequality is a perfect tool for bounding the MGF of a sum of indepenP dent random variables S = N random i=1 Xi . To do this, let us condition on the P variables X1 , . . . , XN−1 . Apply Lemma 2.2.6 for the fixed matrix H := N−1 i=1 λXi and the random matrix Z := λXN , and afterwards take the expectation with respect to X1 , . . . , XN−1 . By the law of total expectation, we get E tr exp(λS) 6 E tr exp h N−1 X i λXi + log E eλXN . i=1 Next, apply Lemma 2.2.6 in a similar manner for H := and Z := λXN−1 , and so on. After N times, we obtain: PN−2 i=1 λXi + log E eλXN 9Formally, concavity of f means that f(λX + (1 − λ)Y) > λf(X) + (1 − λ)f(Y) for all symmetric matrices X and Y and all λ ∈ [0, 1]. 10Jensen’s inequality is usually stated for a convex function g and a scalar random variable X, and it reads g(E X) 6 E g(X). From this, inequality (2.2.5) for concave functions and random matrices easily follows (Check!). Roman Vershynin 13 Lemma 2.2.7 (MGF of a sum of independent random matrices). Let X1 , . . . , XN be P independent n × n symmetric random matrices. Then the sum S = N i=1 Xi satisfies E tr exp(λS) 6 tr exp N hX i log E eλXi . i=1 Think of this inequality is a matrix version of the scalar identity (2.2.2). The main difference is that it bounds the trace of the MGF11 rather the MGF itself. You may recall from a course in probability theory that the quantity log E eλXi that appears in this bound is called the cumulant generating function of Xi . Lemma 2.2.7 reduces the complexity of our task significantly, for it is much easier to bound the cumulant generating function of each single random variable Xi than to say something about their sum. Here is a simple bound. Lemma 2.2.8 (Moment generating function). Let X be an n × n symmetric random matrix. Assume that E X = 0 and kXk 6 K almost surely. Then, for all 0 < λ < 3/K we have   λ2 /2 . E exp(λX)  exp g(λ) E X2 where g(λ) = 1 − λK/3 Proof. First, check that the following scalar inequality holds for 0 < λ < 3/K and |x| 6 K: eλx 6 1 + λx + g(λ)x2 . Then extend it to matrices using matrix calculus: if 0 < λ < 3/K and kXk 6 K then eλX  I + λX + g(λ)X2 . (Do these two steps carefully!) Finally, take the expectation and recall that E X = 0 to obtain   E eλX  I + g(λ) E X2  exp g(λ) E X2 . In the last inequality, we use the matrix version of the scalar inequality 1 + z 6 ez that holds for all z ∈ R. The lemma is proved.  Proof of Matrix Bernstein’s inequality. We would like to bound the operator norm P of the random matrix S = N i=1 Xi , which, as we know from (2.1.1), is the largest eigenvalue of S by magnitude. For simplicity of exposition, let us drop the absolute value from (2.1.1) and just bound the maximal eigenvalue of S, which we denote λmax (S). (Once this is done, we can repeat the argument for −S to reinstate the absolute value. Do this!) So, we are to bound  P λmax (S) > t = P eλ·λmax (S) > eλt (multiply by λ > 0 and exponentiate) 6 e−λt E eλ·λmax (S) (by Markov’s inequality) = e−λt E λmax (eλS ) (check!) 6e −λt E tr e λS (max of eigenvalues is bounded by the sum) 11Note that the order of expectation and trace can be swapped using linearity. 14 Four lectures on probabilistic methods for data science 6 e−λt tr exp N hX log E eλXi i (use Lemma 2.2.7) i=1 6 tr exp [−λt + g(λ)Z] where Z := (by Lemma 2.2.8) N X E X2i . i=1 It remains to optimize this bound in λ. The minimum is attained for λ = t/(σ2 + Kt/3). (Check!) With this value of λ, we conclude   t2 /2  . P λmax (S) > t 6 n · exp − 2 σ + Kt/3 This completes the proof of Theorem 2.2.1.  PN Bernstein’s inequality gives a powerful tail bound for k i=1 Xi k. This easily implies a useful bound on the expectation: Corollary 2.2.9 (Expected norm of sum of random matrices). Let X1 , . . . , XN be independent, mean zero, n × n symmetric random matrices, such that kXi k 6 K almost surely for all i. Then N X p Xi . σ log n + K log n E where σ = PN i=1 2 1/2 . i=1 E Xi Proof. The link from tail bounds to expectation is provided by the basic identity Z∞  (2.2.10) EZ = P Z > t dt 0 which is valid for any non-negative random variable Z. (Check it!) Integrating the tail bound given by matrix Bernstein’s inequality, you will arrive at the expectation bound we claimed. (Check!)  Notice that the bound in this corollary has mild, logarithmic, dependence on the ambient dimension n. As we will see shortly, this can be an important feature in some applications. 2.3. Community recovery in networks Matrix Bernstein’s inequality has many applications. The one we are going to discuss first is for the analysis of networks. A network can be mathematically represented by a graph, a set of n vertices with edges connecting some of them. For simplicity, we will consider undirected graphs where the edges do not have arrows. Real world networks often tend to have clusters, or communities – subsets of vertices that are connected by unusually many edges. (Think, for example, about a friendship network where communities form around some common interests.) An important problem in data science is to recover communities from a given network. Roman Vershynin 15 We are going to explain one of the simplest methods for community recovery, which is called spectral clustering. But before we introduce it, we will first of all place a probabilistic model on the networks we consider. In other words, it will be convenient for us to view networks as random graphs whose edges are formed at random. Although not all real-world networks are truly random, this simplistic model can motivate us to develop algorithms that may empirically succeed also for real-world networks. The basic probabilistic model of random graphs is the Erdös-Rényi model. Definition 2.3.1 (Erdös-Rényi model). Consider a set of n vertices and connect every pair of vertices independently and with fixed probability p. The resulting random graph is said to follow the Erdös-Rényi model G(n, p). The Erdös-Rényi random model is very simple. But it is not a good choice if we want to model a network with communities, for every pair of vertices has the same chance to be connected. So let us introduce a natural generalization of the Erdös-Rényi random model that does allow for community structure: Definition 2.3.2 (Stochastic block model). Partition a set of n vertices into two subsets (“communities”) with n/2 vertices each, and connect every pair of vertices independently with probability p if they belong to the same community and q < p if not. The resulting random graph is said to follow the stochastic block model G(n, p, q). Figure 2.3.3 illustrates a simulation of a stochastic block model. Figure 2.3.3. A network generated according to the stochastic block model G(n, p, q) with n = 200 nodes and connection probabilities p = 1/20 and q = 1/200. Suppose we are shown one instance of a random graph generated according to a stochastic block model G(n, p, q). How can we find which vertices belong to which community? The spectral clustering algorithm we are going to explain will do precisely this. It will be based on the spectrum of the adjacency matrix A of the graph, which is 16 Four lectures on probabilistic methods for data science the n × n symmetric matrix whose entries Aij equal 1 if the vertices i and j are connected by an edge, and 0 otherwise.12 The adjacency matrix A is a random matrix. Let us compute its expectation first. This is easy, since the entires of A are Bernoulli random variables. If i and j belong to the same community then E Aij = p and otherwise E Aij = q. Thus A has block structure: for example, if n = 4 then A looks like this:   p p q q    p p q q    EA =    q q p p    q q p p (For illustration purposes, we grouped the vertices from each community together.) You will easily check that A has rank 2, and the non-zero eigenvalues and the corresponding eigenvectors are (2.3.4)    1 1     1   1 p + q p − q    n, v1 (E A) =  n, v2 (E A) =  λ1 (E A) =  ; λ2 (E A) =  1   −1 2 2    1 −1 (Check!) The eigenvalues and eigenvectors of E A tell us a lot about the community structure of the underlying graph. Indeed, the first (larger) eigenvalue, p + q d := n, 2 is the expected degree of any vertex of the graph.13 The second eigenvalue tells us whether there is any community structure at all (which happens when p 6= q and thus λ2 (E A) 6= 0). The first eigenvector v1 is not informative of the structure of the network at all. It is the second eigenvector v2 that tells us exactly how to separate the vertices into the two communities: the signs of the coefficients of v2 can be used for this purpose. Thus if we know E A, we can recover the community structure of the network from the signs of the second eigenvector. The problem is that we do not know E A. Instead, we know the adjacency matrix A. If, by some chance, A is not far from E A, we may hope to use the A to approximately recover the community structure. So is it true that A ≈ E A? The answer is yes, and we can prove it using matrix Bernstein’s inequality. 12For convenience, we call the vertices of the graph 1, 2, . . . , n. 13The degree of the vertex is the number of edges connected to it.     .   Roman Vershynin 17 Theorem 2.3.5 (Concentration of the stochastic block model). Let A be the adjacency matrix of a G(n, p, q) random graph. Then p E kA − E Ak . d log n + log n. Here d = (p + q)n/2 is the expected degree. Proof. Let us sketch the argument. To use matrix Bernstein’s inequality, let us break A into a sum of independent random matrices X A= Xij , i,j: i6j where each matrix Xij contains a pair of symmetric entries of A, or one diagonal entry.14 Matrix Bernstein’s inequality obviously applies for the sum X A−EA = (Xij − E Xij ). i6j 15 Corollary 2.2.9 gives p E kA − E Ak . σ log n + K log n (2.3.6) P 2 and K = max kX − E X k. It is a good where σ2 = ij ij ij i6j E(Xij − E Xij ) exercise to check that σ2 . d and K 6 2. (Do it!) Substituting into (2.3.6), we complete the proof.  How useful is Theorem 2.3.5 for community recovery? Suppose that the network is not too sparse, namely d  log n. Then kA − E Ak . p d log n while k E Ak = λ1 (E A) = d, which implies that kA − E Ak  k E Ak. In other words, A nicely approximates E A: the relative error or approximation is small in the operator norm. At this point one can apply classical results from the perturbation theory for matrices, which state that since A and E A are close, their eigenvalues and eigenvectors must also be close. The relevant perturbation results are Weyl’s inequality for eigenvalues and Davis-Kahan’s inequality for eigenvectors, which we will not 14Precisely, if i 6= j, then X ij has all zero entries except the (i, j) and (j, i) entries that can potentially equal 1. If i = j, the only non-zero entry of Xij is the (i, i). 15We will liberally use the notation . to hide constant factors appearing in the inequalities. Thus, a . b means that a 6 Cb for some constant C. 18 Four lectures on probabilistic methods for data science reproduce here. Heuristically, what they give us is  1   1  v2 (A) ≈ v2 (E A) =   −1  −1     .   Then we should expect that most of the coefficients of v2 (A) are positive on one community and negative on the other. So we can use v2 (A) to approximately recover the communities. This method is called spectral clustering: Spectral Clustering Algorithm. Compute v2 (A), the eigenvector corresponding to the second largest eigenvalue of the adjacency matrix A of the network. Use the signs of the coefficients of v2 (A) to predict the community membership of the vertices. We saw that spectral clustering should perform well for the stochastic block model G(n, p, q) if it is not too sparse, namely if the expected degrees satisfy d = (p + q)n/2  log n. A more careful analysis along these lines, which you should be able to do yourself with some work, leads to the following more rigorous result. Theorem 2.3.7 (Guarantees of spectral clustering). Consider a random graph generated according to the stochastic block model G(n, p, q) with p > q, and set a = pn, b = qn. Suppose that (2.3.8) (a − b)2  log(n)(a + b). Then, with high probability, the spectral clustering algorithm recovers the communities up to o(n) misclassified vertices. Note that condition (2.3.8) implies that the expected degrees are not too small, namely d = (a + b)/2  log(n) (check!). It also ensures that a and b are sufficiently different: recall that if a = b the network is Erdös-Rényi graph without any community structure. 2.4. Notes The idea to extend concentration inequalities like Bernstein’s to matrices goes back to R. Ahlswede and A. Winter [3]. They used Golden-Thompson inequality (2.2.3) and proved a slightly weaker form of matrix Bernstein’s inequality than we gave in Section 2.2. R. Oliveira [48, 49] found a way to improve this argument and gave a result similar to Theorem 2.2.1. The version of matrix Bernstein’s inequality we gave here (Theorem 2.2.1) and a proof based on Lieb’s inequality is due to J. Tropp [52]. The survey [53] contains a comprehensive introduction of matrix calculus, a proof of Lieb’s inequality (Theorem 2.2.4), a detailed proof of matrix Bernstein’s inequality (Theorem 2.2.1) and a variety of applications. A proof of GoldenThompson inequality (2.2.3) can be found in [8, Theorem 9.3.7]. Roman Vershynin 19 In Section 2.3 we scratched the surface of an interdisciplinary area of network analysis. For a systematic introduction into networks, refer to the book [47]. Stochastic block models (Definition 2.3.2) were introduced in [33]. The community recovery problem in stochastic block models, sometimes also called community detection problem, has been in the spotlight in the last few years. A vast and still growing body of literature exists on algorithms and theoretical results for community recovery, see the book [47], the survey [22], papers such as [9, 29, 30, 32, 37, 46, 61] and the references therein. A concentration result similar to Theorem 2.3.5 can be found in [48]; the argument there is also based on matrix concentration. This theorem is not quite optimal. For dense networks, where the expected degree d satisfies d & log n, the concentration inequality in Theorem 2.3.5 can be improved to √ (2.4.1) E kA − E Ak . d. This improved bound goes back to the original paper [21] which studies the simpler Erdös-Rényi model but the results extend to stochastic block models [17]; it can also be deduced from [6, 32, 37]. If the network is relatively dense, i.e. d & log n, one can improve the guarantee (2.3.8) of spectral clustering in Theorem 2.3.7 to (a − b)2  (a + b). All one has to do is use the improved concentration inequality (2.4.1) instead of Theorem 2.3.5. Furthermore, in this case there exist algorithms that can recover the communities exactly, i.e. without any misclassified vertices, and with high probability, see e.g. [1, 17, 32, 43]. For sparser networks, where d  log n and possibly even d = O(1), relativelyfew algorithms were known until recently, but now there exist many approaches that provably recover communities in sparse stochastic block models, see e.g. [9, 17, 29, 30, 37, 46, 61]. 3. Lecture 3: Covariance estimation and matrix completion In the last lecture, we proved matrix Bernstein’s inequality and gave an application for network analysis. We will spend this lecture discussing a couple of other interesting applications of matrix Bernstein’s inequality. In Section 3.1 we will work on covariance estimation, a basic problem in high-dimensional statistics. In Section 3.2, we will derive a useful bound on norms of random matrices, which unlike Bernstein’s inequality does not require any boundedness assumptions on the distribution. We will apply this bound in Section 3.3 for a problem of matrix completion, where we are shown a small sample of the entries of a matrix and asked to guess the missing entries. 3.1. Covariance estimation Covariance estimation is a problem of fundamental importance in high-dimensional statistics. Suppose we have a sample of data 20 Four lectures on probabilistic methods for data science points X1 , . . . , XN in Rn . It is often reasonable to assume that these points are independently sampled from the same probability distribution (or “population”) which is unknown. We would like to learn something useful about this distribution. Denote by X a random vector that has this (unknown) distribution. The most basic parameter of the distribution is the mean E X. One can estimate E X from 1 PN the sample by computing the sample mean N i=1 Xi . The law of large numbers guarantees that the estimate becomes tight as the sample size N grows to infinity, i.e. N 1 X Xi → E X as N → ∞. N i=1 The next most basic parameter of the distribution is the covariance matrix Σ := E(X − E X)(X − E X)T . This is a higher-dimensional version of the usual notion of variance of a random variable Z, which is Var(Z) = E(Z − E Z)2 . The eigenvectors of the covariance matrix of Σ are called the principal components. Principal components that correspond to large eigenvalues of Σ are the directions in which the distribution of X is most extended, see Figure 3.1.1. These are often the most interesting directions in the data. Practitioners often visualize the highdimensional data by projecting it onto the span of a few (maybe two or three) of such principal components; the projection may reveal some hidden structure of the data. This method is called Principal Component Analysis (PCA). Figure 3.1.1. Data points X1 , . . . , XN sampled from a distribution in Rn and the principal components of the covariance matrix. One can estimate the covariance matrix Σ from the sample by computing the sample covariance N 1 X ΣN := (Xi − E Xi )(Xi − E Xi )T . N i=1 Again, the law of large numbers guarantees that the estimate becomes tight as the sample size N grows to infinity, i.e. ΣN → Σ as N → ∞. Roman Vershynin 21 But how large should the sample size N be for covariance estimation? Generally, one can not have N < n for dimension reasons. (Why?) We are going to show that N ∼ n log n is enough. In other words, covariance estimation is possible with just logarithmic oversampling. For simplicity, we shall state the covariance estimation bound for mean zero distributions. (If the mean is not zero, we can estimate it from the sample and subtract. Check that the mean can be accurately estimated from a sample of size N = O(n).) Theorem 3.1.2 (Covariance estimation). Let X be a random vector in Rn with covariance matrix Σ. Suppose that kXk22 . E kXk22 = tr Σ (3.1.3) almost surely. Then, for every N > 1, we have r n log n n log n  . N N Before we pass to the proof, let us note that Theorem 3.1.2 yields the covariance estimation result we promised. Let ε ∈ (0, 1). If we take a sample of size E kΣN − Σk . kΣk + N ∼ ε−2 n log n, then we are guaranteed covariance estimation with a good relative error: E kΣN − Σk 6 εkΣk. Proof. Apply matrix Bernstein’s inequality (Corollary 2.2.9) for the sum of independent random matrices Xi XT i − Σ and get (3.1.4) E kΣN − Σk = N X  1 p 1 (Xi XT E σ log n + K log n i − Σ) . N N i=1 where σ2 = N X 2 E(Xi XT = N E(XXT − Σ)2 i − Σ) i=1 and K is chosen so that kXXT − Σk 6 K almost surely. It remains to bound σ and K. Let us start with σ. We have E(XXT − Σ)2 = E kXk22 XXT − Σ2 - tr(Σ) · E XXT (check by expanding the square) (drop Σ2 and use (3.1.3)) = tr(Σ) · Σ. Thus σ2 . N tr(Σ)kΣk. 22 Four lectures on probabilistic methods for data science Next, to bound K, we have kXXT − Σk 6 kXk22 + kΣk . tr Σ + kΣk (by triangle inequality) (using (3.1.3)) 6 2 tr Σ =: K. Substitute the bounds on σ and K into (3.1.4) and get q  1 E kΣN − Σk . N tr(Σ)kΣk log n + tr(Σ) log n N To complete the proof, use that tr Σ 6 nkΣk (check this!) and simplify the bound.  Remark 3.1.5 (Low-dimensional distributions). Much fewer samples are needed for covariance estimation for low-dimensional, or approximately low-dimensional, distributions. To measure approximate low-dimensionality we can use the notion of the stable rank of Σ2 . The stable rank of a matrix A is defined as the square of the ratio of the Frobenius to operator norms:16 kAk2F . kAk2 The stable rank is always bounded by the usual, linear algebraic rank, r(A) := r(A) 6 rank(A), and it can be much smaller. (Check both claims.) Our proof of Theorem 3.1.2 actually gives r r log n r log n  E kΣN − Σk 6 kΣk + . N N where tr Σ r = r(Σ1/2 ) = . kΣk (Check this!) Therefore, covariance estimation is possible with N ∼ r log n samples. Remark 3.1.6 (The boundedness condition). It is a good exercise to check that if we remove the boundedness condition (3.1.3), a nontrivial covariance estimation is impossible in general. (Show this!) But how do we know whether the boundedness condition holds for data at hand? We may not, but we can enforce this condition by truncation. All we have to do is to discard 1% of data points with largest norms. (Check this accurately, assuming that such truncation does not change the covariance significantly.) 16The Frobenius norm of an n × m matrix, sometimes also called the Hilbert-Schmidt norm, is de- P Pm 2 1/2 . Equivalently, for an n × n symmetric matrix, kAk = fined = ( n F i=1 j=1 Aij ) Pn as kAk2F 1/2 ( i=1 λi (A) ) , P where λi (A) are the eigenvalues of A. Thus the stable rank of A can be ex2 2 pressed as r(A) = n i=1 λi (A) / maxi λi (A) . Roman Vershynin 23 3.2. Norms of random matrices We have worked a lot with the operator norm of matrices, denoted kAk. One may ask if is there exists a formula that expresses kAk in terms of the entires Aij . Unfortunately, there is no such formula. The operator norm is a more difficult quantity in this respect than the Frobenius norm, which as P we know can be easily expressed in terms of entries: kAkF = ( i,j A2ij )1/2 . If we can not express kAk in terms of the entires, can we at least get a good estimate? Let us consider n × n symmetric matrices for simplicity. In one direction, kAk is always bounded below by the largest Euclidean norm of the rows Ai : X 1/2 (3.2.1) kAk > max kAi k2 = max A2ij . i i j (Check!) Unfortunately, this bound is sometimes very loose, and the best possible upper bound is √ (3.2.2) kAk 6 n · max kAi k2 . i (Show this bound, and give an example where it is sharp.) Fortunately, for random matrices with independent entries the bound (3.2.2) can be improved to the point where the upper and lower bounds almost match. Theorem 3.2.3 (Norms of random matrices without boundedness assumptions). Let A be an n × n symmetric random matrix whose entries on and above the diagonal are independent, mean zero random variables. Then E max kAi k2 6 E kAk 6 C log n · E max kAi k2 , i i where Ai denote the rows of A. In words, the operator norm of a random matrix is almost determined by the norm of the rows. Our proof of this result will be based on matrix Bernstein’s inequality – more precisely, Corollary 2.2.9. There is one surprising point. How can we use matrix Bernstein’s inequality, which applies only for bounded distributions, to prove a result like Theorem 3.2.3 that does not have any boundedness assumptions? We will do this using a trick based on conditioning and symmetrization. Let us introduce this technique first. Lemma 3.2.4 (Symmetrization). Let X1 , . . . , XN be independent, mean zero random vectors in a normed space and ε1 , . . . , εN be independent Rademacher random variables.17 Then N N N X X X 1 E εi Xi 6 E Xi 6 2 E εi Xi . 2 i=1 i=1 i=1 (Xi0 ) be an independent copy of the random Proof. To prove the upper bound, let vectors (Xi ), i.e. just different random vectors with the same joint distribution as 17This means that random variables ε take values ±1 with probability 1/2 each. We require that all i random variables we consider here, i.e. {Xi , εi : i = 1, . . . , N} are jointly independent. 24 Four lectures on probabilistic methods for data science (Xi ) and independent from (Xi ). Then X  X X Xi − E Xi0 Xi = E E i i 6E X Xi − i =E X (since E X Xi0 = 0 by assumption) i i Xi0 (by Jensen’s inequality) i X (Xi − Xi0 ) . i The distribution of the random vectors Yi := Xi − Xi0 is symmetric, which means that the distributions of Yi and −Yi0 are the same. (Why?) Thus the distribution of the random vectors Yi and εi Yi is also the same, for all we do is change the signs of these vectors at random and independently of the values of the vectors. Summarizing, we can replace Xi − Xi0 in the sum above with εi (Xi − Xi0 ). Thus X X εi (Xi − Xi0 ) E Xi 6 E i i 6E X εi Xi + E X X (using triangle inequality) i i = 2E εi Xi0 εi Xi (the two sums have the same distribution). i This proves the upper bound in the symmetrization inequality. The lower bound can be proved by a similar argument. (Do this!)  Proof of Theorem 3.2.3. We already mentioned in (3.2.1) that the bound in Theorem 3.2.3 is trivial. The proof of the upper bound will be based on matrix Bernstein’s inequality. First, we decompose A in the same way as we did in the proof of Theorem 2.3.5. Thus we represent A as a sum of independent, mean zero, symmetric random matrices Zij each of which contains a pair of symmetric entries of A (or one diagonal entry): X A= Zij . i,j: i6j Apply the symmetrization inequality (Lemma 3.2.4) for the random matrices Zij and get X X (3.2.5) E kAk = E Zij 6 2 E Xij i6j i6j where we set Xij := εij Zij and εij are independent Rademacher random variables. Now we condition on A. The random variables Zij become fixed values and all randomness remains in the Rademacher random variables εij . Note that Xij are (conditionally) bounded almost surely, and this is exactly what we have lacked to Roman Vershynin 25 apply matrix Bernstein’s inequality. Now we can do it. Corollary 2.2.9 gives18 X p (3.2.6) Eε Xij . σ log n + K log n, σ2 P i6j 2 i6j Eε Xij and K = maxi6j kXij k. where = A good exercise is to check that σ . max kAi k2 i and K . max kAi k2 . i (Do it!) Substituting into (3.2.6), we get X Xij . log n · max kAi k2 . Eε i i6j Finally, we unfix A by taking expectation of both sides of this inequality with respect to A and using the law of total expectation. The proof is complete.  We stated Theorem 3.2.3 for symmetric matrices, but it is simple to extend it to general m × n random matrices A. The bound in this case becomes  (3.2.7) E kAk 6 C log(m + n) · E max kAi k2 + E max kAj k2 i j where Ai and Aj denote the rows and columns of A. To see this, apply Theorem 3.2.3 to the (m + n) × (m + n) symmetric random matrix " # 0 A . AT 0 (Do this!) 3.3. Matrix completion Consider a fixed, unknown n × n matrix X. Suppose we are shown m randomly chosen entries of X. Can we guess all the missing entries? This important problem is called matrix completion. We will analyze it using the bounds on the norms on random matrices we just obtained. Obviously, there is no way to guess the missing entries unless we know something extra about the matrix X. So let us assume that X has low rank: rank(X) =: r  n. The number of degrees of freedom of an n × n matrix with rank r is O(rn). (Why?) So we may hope that (3.3.1) m ∼ rn observed entries of X will be enough to determine X completely. But how? Here we will analyze what is probably the simplest method for matrix completion. Take the matrix Y that consists of the observed entries of X while all unobserved entries are set to zero. Unlike X, the matrix Y may not have small 18We stick a subscript ε to the expected value to remember that this is a conditional expectation, i.e. we average only with respect to εi . 26 Four lectures on probabilistic methods for data science rank. Compute the best rank r approximation19 of Y. The result, as we will show, will be a good approximation to X. But before we show this, let us define sampling of entries more rigorously. Assume each entry of X is shown or hidden independently of others with fixed probability p. Which entries are shown is decided by independent Bernoulli random variables m δij ∼ Ber(p) with p := 2 n which are often called selectors in this context. The value of p is chosen so that among n2 entries of X, the expected number of selected (known) entries is m. Define the n × n matrix Y with entries Yij := δij Xij . We can assume that we are shown Y, for it is a matrix that contains the observed entries of X while all unobserved entries are replaced with zeros. The following result shows how to estimate X based on Y. Theorem 3.3.2 (Matrix completion). Let X̂ be a best rank r approximation to p−1 Y. Then r 1 rn (3.3.3) E kX̂ − XkF 6 C log(n) kXk∞ , n m Here kXk∞ = maxi,j |Xij | denotes the maximum magnitude of the entries of X. Before we prove this result, let us understand what this bound says about the quality of matrix completion. The recovery error is measured in the Frobenius norm, and the left side of (3.3.3) is n  1 X 1/2 1 2 | X̂ − X | . kX̂ − XkF = ij ij n n2 i,j=1 Thus Theorem 3.3.2 controls the average error per entry in the mean-squared sense. To make the error small, let us assume that we have a sample of size m  rn log2 n, which is slightly larger than the ideal size we discussed in (3.3.1). This makes p C log(n) rn/m = o(1) and forces the recovery error to be bounded by o(1)kXk∞ . Summarizing, Theorem 3.3.2 says that the expected average error per entry is much smaller than the maximal magnitude of the entries of X. This is true for a sample of almost optimal size m. The smaller the rank r of the matrix X, the fewer entries of X we need to see in order to do matrix completion. Proof of Theorem 3.3.2. Step 1: The error in the operator norm. Let us first bound the recovery error in the operator norm. Decompose the error into two parts using 19The best rank r approximation of an n × n matrix A is a matrix B of rank r that minimizes the operator norm kA − Bk or, alternatively, the Frobenius norm kA − BkF (the minimizer out to Pturns n be the same). One can compute B by truncating the singular value decomposition A = s ui vT i i=1 i P of A as follows: B = ri=1 si ui vT , where we assume that the singular values s are arranged in i i non-increasing order. Roman Vershynin 27 triangle inequality: kX̂ − Xk 6 kX̂ − p−1 Yk + kp−1 Y − Xk. Recall that X̂ is a best approximation to p−1 Y. Then the first part of the error is smaller than the second part, i.e. kX̂ − p−1 Yk 6 kp−1 Y − Xk, and we have 2 (3.3.4) kX̂ − Xk 6 2kp−1 Y − Xk = kY − pXk. p The entries of the matrix Y − pX, (Y − pX)ij = (δij − p)Xij , are independent and mean zero random variables. Thus we can apply the bound (3.2.7) on the norms of random matrices and get  (3.3.5) E kY − pXk 6 C log n · E max k(Y − pX)i k2 + E max k(Y − pX)j k2 . i∈[n] j∈[n] All that remains is to bound the norms of the rows and columns of Y − pX. This is not difficult if we note that they can be expressed as sums of independent random variables: n n X X (δij − p)2 X2ij 6 (δij − p)2 · kXk2∞ , k(Y − pX)i k22 = j=1 j=1 and similarly for columns. Taking expectation and noting that E(δij − p)2 = Var(δij ) = p(1 − p), we get20 √ (3.3.6) E k(Y − pX)i k2 6 (E k(Y − pX)i k22 )1/2 6 pn kXk∞ . This is a good bound, but we need something stronger in (3.3.5). Since the maximum appears inside the expectation, we need a uniform bound, which will say that all rows are bounded simultaneously with high probability. Such uniform bounds are usually proved by applying concentration inequalities followed by a union bound. Bernstein’s inequality (1.4.5) yields   n X  P (δij − p)2 > tpn 6 exp(−ctpn) for t > 3.   j=1 (Check!) This probability can be further bounded by n−ct using the assumption that m = pn2 > n log n. A union bound over n rows leads to   n   X P max (δij − p)2 > tpn 6 n · n−ct for t > 3. i∈[n]  j=1 Integrating this tail, we conclude using (2.2.10) that n X E max (δij − p)2 . pn. i∈[n] j=1 20The first bound below that compares the L1 and L2 averages follows from Hölder’s inequality. 28 Four lectures on probabilistic methods for data science (Check!) And this yields the desired bound on the rows, √ E max k(Y − pX)i k2 . pn, i∈[n] which is an improvement of (3.3.6) we wanted. We can do similarly for the columns. Substituting into (3.3.5), this gives √ E kY − pXk . log(n) pn kXk∞ . Then, by (3.3.4), we get (3.3.7) E kX̂ − Xk . log(n) r n kXk∞ . p Step 2: Passing to Frobenius norm. Now we will need to pass from the operator to Frobenius norm. This is where we will use for the first (and only) time the rank of X. We know that rank(X) 6 r by assumption and rank(X̂) 6 r by construction, so rank(X̂ − X) 6 2r. There is a simple relationship between the operator and Frobenius norms: √ kX̂ − XkF 6 2rkX̂ − Xk. (Check it!) Take expectation of both sides and use (3.3.7); we get r √ rn E kX̂ − XkF 6 2r E kX̂ − Xk . log(n) kXk∞ . p Dividing both sides by n, we can rewrite this bound as r 1 rn E kX̂ − XkF . log(n) kXk∞ . n pn2 But pn2 = m by definition of the sampling probability p. This yields the desired bound (3.3.3).  3.4. Notes Theorem 3.1.2 on covariance estimation is a version of [58, Corollary 5.52], see also [36]. The logarithmic factor is in general necessary. This theorem is a general-purpose result. If one knows some additional structural information about the covariance matrix (such as sparsity), then fewer samples may be needed, see e.g. [12, 16, 40]. A version of Theorem 3.2.3 was proved in [51] in a more technical way. Although the logarithmic factor in Theorem 3.2.3 can not be completely removed in general, it can be improved. Our argument actually gives p E kAk 6 C log n · E max kAi k2 + C log n · E max |Aij |, i ij p Using different methods, one can save an extra log n factor and show that p E kAk 6 C E max kAi k2 + C log n · E max |Aij | i ij (see [6]) and E kAk 6 C p log n · log log n · E max kAi k2 , i Roman Vershynin 29 see [55]. (The results in [6, 55] are stated for Gaussian random matrices; the two bounds above can be deduced by using conditioning and symmetrization.) The surveys [6, 58] and the textbook [60] present several other useful techniques to bound the operator norm of random matrices. The matrix completion problem, which we discussed in Section 3.3, has attracted a lot of recent attention. E. Candes and B. Recht [14] showed that one can often achieve exact matrix completion, thus computing the precise values of all missing values of a matrix, from m ∼ rn log2 (n) randomly sampled entries. For exact matrix completion, one needs an extra incoherence assumption that is not present in Theorem 3.3.2. This assumption basically excludes matrices that are simultaneously sparse and low rank (such as a matrix whose all but one entries are zero – it would be extremely hard to complete it, since sampling will likely miss the non-zero entry). Many further results on exact matrix completion are known, e.g. [15, 18, 28, 56]. Theorem 3.3.2 with a simple proof is borrowed from [50]; see also the tutorial [59]. This result only guarantees approximate matrix completion, but it does not have any incoherence assumptions on the matrix. 4. Lecture 4: Matrix deviation inequality In this last lecture we will study a new uniform deviation inequality for random matrices. This result will be a far reaching generalization of the JohnsonLindenstrauss Lemma we proved in Lecture 1. Consider the same setup as in Theorem 1.6.1, where A is an m × n random matrix whose rows are independent, mean zero, isotropic and sub-gaussian random vectors in Rn . (If you find it helpful to think in terms of concrete examples, let the entries of A be independent N(0, 1) random variables.) Like in the JohnsonLindenstrauss Lemma, we will be looking at A as a linear transformation from Rn to Rm , and we will be interested in what A does to points in some set in Rn . This time, however, we will allow for infinite sets T ⊂ Rn . Let us start by analyzing what A does to a single fixed vector x ∈ Rn . We have E kAxk22 = E = m X j=1 m X Aj , x E Aj , x 2 2 (where AT j denote the rows of A) (by linearity) j=1 = mkxk22 (using isotropy of Aj ). Further, if we assume that concentration about the mean holds here (and in fact, it does), we should expect that √ (4.0.1) kAxk2 ≈ m kxk2 with high probability. 30 Four lectures on probabilistic methods for data science Similarly to Johnson-Lindenstrauss Lemma, our next goal is to make (4.0.1) hold simultaneously over all vectors x in some fixed set T ⊂ Rn . Precisely, we may ask – how large is the average uniform deviation: √ (4.0.2) E sup kAxk2 − m kxk ? x∈T This quantity should clearly depend on some notion of the size of T : the larger T , the larger should the uniform deviation be. So, how can we quantify the size of T for this problem? In the next section we will do precisely this – introduce a convenient, geometric measure of the sizes of sets in Rn , which is called Gaussian width. 4.1. Gaussian width Definition 4.1.1. Let T ⊂ Rn be a bounded set, and g be a standard normal random vector in Rn , i.e. g ∼ N(0, In ). Then the quantities w(T ) := E sup hg, xi and γ(T ) := E sup | hg, xi | x∈T x∈T are called the Gaussian width of T and the Gaussian complexity of T , respectively. Gaussian width and Gaussian complexity are closely related. Indeed,21 (4.1.2) 1 1 1 1 w(T ) = w(T − T ) = E sup hg, x − yi = E sup | hg, x − yi | = γ(T − T ). 2 2 x,y∈T 2 x,y∈T 2 (Check these identities!) Gaussian width has a natural geometric interpretation. Suppose g is a unit vector in Rn . Then a moment’s thought reveals that supx,y∈T hg, x − yi is simply the width of T in the direction of g, i.e. the distance between the two hyperplanes with normal g that touch T on both sides as shown in Figure 4.1.3. Then 2w(T ) can be obtained by averaging the width of T over all directions g in Rn . x width T g y Figure 4.1.3. The width of a set T in the direction of g. 21The set T − T is defined as {x − y : x, y ∈ T }. More generally, given two sets A and B in the same vector space, the Minkowski sum of A and B is defined as A + B = {a + b : a ∈ A, b ∈ B}. Roman Vershynin 31 This reasoning is valid except where we assumed that g is a unit vector. Instead, for g ∼ N(0, In ) we have E kgk22 = n and √ kgk2 ≈ n with high probability. (Check both these claims using Bernstein’s inequality.) Thus, we need to scale √ by the factor n. Ultimately, the geometric interpretation of the Gaussian width √ becomes the following: w(T ) is approximately n/2 larger than the usual, geometric width of T averaged over all directions. A good exercise is to compute the Gaussian width and complexity for some simple sets, such as the unit balls of the `p norms in Rn , which we denote Bn p = {x ∈ Rn : kxkp 6 1}. In particular, we have p √ γ(Bn log n. (4.1.4) γ(Bn 2 ) ∼ n, 1)∼ For any finite set T ⊂ Bn 2 , we have (4.1.5) γ(T ) . q log |T |. The same holds for Gaussian width w(T ). (Check these facts!) A look a these examples reveals that the Gaussian width captures some nonobvious geometric qualities of sets. Of course, the fact that the Gaussian width of √ n is not surprising: the usual, geometric the unit Euclidean ball Bn 2 is or order √ width in all directions is 2 and the Gaussian width is about n times that. But it may be surprising that the Gaussian width of the `1 ball Bn 1 is much smaller, and so is the width of any finite set T (unless the set has exponentially large cardinality). As we will see later, Gaussian width nicely captures the geometric size of “the bulk” of a set. 4.2. Matrix deviation inequality Now we are ready to answer the question we asked in the beginning of this lecture: what is the magnitude of the uniform deviation (4.0.2)? The answer is surprisingly simple: it is bounded by the Gaussian complexity of T . The proof is not too simple however, and we will skip it (see the notes after this lecture for references). Theorem 4.2.1 (Matrix deviation inequality). Let A be an m × n matrix whose rows Ai are independent, isotropic and sub-gaussian random vectors in Rn . Let T ⊂ Rn be a fixed bounded set. Then √ E sup kAxk2 − mkxk2 6 CK2 γ(T ) x∈T where K = maxi kAi kψ2 is the maximal sub-gaussian norm22 of the rows of A. Remark 4.2.2 (Tail bound). It is often useful to have results that hold with high probability rather than in expectation. There exists a high-probability version of the matrix deviation inequality, and it states the following. Let u > 0. Then the 22A definition of the sub-gaussian norm of a random vector was given in Section 1.5. For example, if A is a Gaussian random matrix with independent N(0, 1) entries, then K is an absolute constant. 32 Four lectures on probabilistic methods for data science event (4.2.3) sup kAxk2 − √ mkxk2 6 CK2 [γ(T ) + u · rad(T )] x∈T holds with probability at least 1 − 2 exp(−u2 ). Here rad(T ) is the radius of T , defined as rad(T ) := sup kxk2 . x∈T Since rad(T ) . γ(T ) (check!) we can continue the bound (4.2.3) by . K2 uγ(T ) for all u > 1. This is a weaker but still a useful inequality. For example, we can use it to bound all higher moments of the deviation:  p 1/p √ (4.2.4) E sup kAxk2 − mkxk2 6 Cp K2 γ(T ) x∈T √ where Cp 6 C p for p > 1. (Check this using Proposition 1.1.1.) Remark 4.2.5 (Deviation of squares). It is sometimes helpful to bound the deviation of the square kAxk22 rather than kAxk2 itself. We can easily deduce the deviation of squares by using the identity a2 − b2 = (a − b)2 + 2b(a − b) for a = kAxk2 √ and b = mkxk2 . Doing this, we conclude that √ (4.2.6) E sup kAxk22 − mkxk22 6 CK4 γ(T )2 + CK2 m rad(T )γ(T ). x∈T (Do this calculation using (4.2.4) for p = 2.) We will use this bound in Section 4.4. Matrix deviation inequality has many consequences. We will explore some of them now. 4.3. Deriving Johnson-Lindenstrauss Lemma We started this lecture by promising a result that is more general than Johnson-Lindenstrauss Lemma. So let us show how to quickly derive Johnson-Lindenstrauss from the matrix deviation inequality. Theorem 1.6.1 from Theorem 4.2.1. Assume we are in the situation of the Johnson-Lindenstrauss Lemma (Theorem 1.6.1). Given a set X ⊂ R, consider the normalized difference set x−y : x, y ∈ X distinct vectors . T := kx − yk2 Then T is a finite subset of the unit sphere of Rn , and thus (4.1.5) gives q q q γ(T ) . log |T | 6 log |X|2 . log |X|. Matrix deviation inequality (Theorem 4.2.1) then yields p √ kA(x − y)k2 √ − m . log N 6 ε m. sup kx − yk2 x,y∈X with high probability, say 0.99. (To pass from expectation to high probability, we can use Markov’s inequality. To get the last bound, we use the assumption on m in Johnson-Lindenstrauss Lemma.) Roman Vershynin 33 √ Multiplying both sides by kx − yk2 / m, we can write the last bound as follows. With probability at least 0.99, we have 1 (1 − ε)kx − yk2 6 √ kAx − Ayk2 6 (1 + ε)kx − yk2 for all x, y ∈ X. m This is exactly the consequence of Johnson-Lindenstrauss lemma. The argument based on matrix deviation inequality, which we just gave, can be easily extended for infinite sets. It allows one to state a version of JohnsonLindenstrauss lemma for general, possibly infinite, sets, which depends on the Gaussian complexity of T rather than cardinality. (Try to do this!) 4.4. Covariance estimation In Section 3.1, we introduced the problem of covariance estimation, and we showed that N ∼ n log n samples are enough to estimate the covariance matrix of a general distribution in Rn . We will now show how to do better if the distribution is sub-gaussian. (Recall Section 1.5 for the definition of sub-gaussian random vectors.) In this case, we can get rid of the logarithmic oversampling and the boundedness condition (3.1.3). Theorem 4.4.1 (Covariance estimation for sub-gaussian distributions). Let X be a random vector in Rn with covariance matrix Σ. Suppose X is sub-gaussian, and more specifically (4.4.2) k hX, xi kψ2 . k hX, xi kL2 = kΣ1/2 xk2 for any x ∈ Rn . Then, for every N > 1, we have r n n . N N This result implies that if, for ε ∈ (0, 1), we take a sample of size E kΣN − Σk . kΣk + N ∼ ε−2 n, then we are guaranteed covariance estimation with a good relative error: E kΣN − Σk 6 εkΣk. Proof. Since we are going to use Theorem 4.2.1, we will need to first bring the random vectors X, X1 , . . . , XN to the isotropic position. This can be done by a suitable linear transformation. You will easily check that there exists an isotropic random vector Z such that X = Σ1/2 Z. (For example, Σ has full rank, set Z := Σ−1/2 X. Check the general case.) Similarly, we can find independent and isotropic random vectors Zi such that Xi = Σ1/2 Zi , i = 1, . . . , N. 34 Four lectures on probabilistic methods for data science The sub-gaussian assumption (4.4.2) then implies that kZkψ2 . 1. (Check!) Then 1 X Zi ZT i − In . N N kΣN − Σk = kΣ1/2 RN Σ1/2 k where RN := i=1 The operator norm of a symmetric n × n matrix A can be computed by maximizing the quadratic form over the unit sphere: kAk = maxx∈Sn−1 | hAx, xi |. (To see this, recall that the operator norm is the biggest eigenvalue of A in magnitude.) Then D E kΣN − Σk = max Σ1/2 RN Σ1/2 x, x = max hRN x, xi x∈T x∈Sn−1 where T is the ellipsoid T := Σ1/2 Sn−1 . Recalling the definition of RN , we can rewrite this as 1 1 X hZi , xi2 − kxk22 = max kAxk22 − Nkxk22 . N N x∈T N kΣN − Σk = max x∈T i=1 Now we apply the matrix deviation inequality for squares (4.2.6) and conclude that  √ 1 kΣN − Σk . γ(T )2 + N rad(T )γ(T ) . N (Do this calculation!) The radius and Gaussian width of the ellipsoid T are easy to compute: rad(T ) = kΣk1/2 and γ(T ) 6 (tr Σ)1/2 . Substituting, we get  p 1 tr Σ + NkΣk tr Σ . N To complete the proof, use that tr Σ 6 nkΣk (check this!) and simplify the bound.  kΣN − Σk . Remark 4.4.3 (Low-dimensional distributions). Similarly to Section 3.1, we can show that much fewer samples are needed for covariance estimation of lowdimensional sub-gaussian distributions. Indeed, the proof of Theorem 4.4.1 actually yields r r r (4.4.4) E kΣN − Σk 6 kΣk + N N where tr Σ r = r(Σ1/2 ) = kΣk is the stable rank of Σ1/2 . This means that covariance estimation is possible with N∼r Roman Vershynin 35 samples. 4.5. Underdetermined linear equations We will give one more application of the matrix deviation inequality – this time, to the area of high dimensional inference. Suppose we need to solve a severely underdetermined system of linear equations: say, we have m equations in n  m variables. Let us write it in the matrix form as y = Ax where A is a given m × n matrix, y ∈ Rm is a given vector and x ∈ Rn is an unknown vector. We would like to compute x from A and y. When the linear system is underdetermined, we can not find x with any accuracy, unless we know something extra about x. So, let us assume that we do have some a-priori information. We can describe this situation mathematically by assuming that x∈K where K ⊂ Rn is some known set in Rn that describes anything that we know about x a-priori. (Admittedly, we are operating on a high level of generality here. If you need a concrete example, we will consider it in Section 4.6.) Summarizing, here is the problem we are trying to solve. Determine a solution x = x(A, y, K) to the underdetermined linear equation y = Ax as accurately as possible, assuming that x ∈ K. A variety of approaches to this and similar problems were proposed during the last decade; see the notes after this lecture for pointers to some literature. The one we will describe here is based on optimization. To do this, it will be convenient to convert the set K into a function on Rn which is called the Minkowski functional of K. This is basically a function whose level sets are multiples of K. To define it formally, assume that K is star-shaped, which means that together with any point x, the set K must contain the entire interval that connects x with the origin; see Figure 4.5.1 for illustration. The Minkowski functional of K is defined as  kxkK := inf t > 0 : x/t ∈ K , x ∈ Rn . If the set K is convex and symmetric about the origin, kxkK is actually a norm on Rn . (Check this!) 0 0 Figure 4.5.1. The set on the left (whose boundary is shown) is starshaped, the set on the right is not. 36 Four lectures on probabilistic methods for data science Now we propose the following way to solve the recovery problem: solve the optimization program min kx 0 kK (4.5.2) subject to y = Ax 0 . Note that this is a very natural program: it looks at all solutions to the equation y = Ax 0 and tries to “shrink” the solution x 0 toward K. (This is what minimization of Minkowski functional is about.) Also note that if K is convex, this is a convex optimization program, and thus can be solved effectively by one of the many available numeric algorithms. The main question we should now be asking is – would the solution to this program approximate the original vector x? The following result bounds the approximation error for a probabilistic model of linear equations. Assume that A is a random matrix as in Theorem 4.2.1, i.e. A is an m × n matrix whose rows Ai are independent, isotropic and sub-gaussian random vectors in Rn . Theorem 4.5.3 (Recovery by optimization). The solution x̂ of the optimization program (4.5.2) satisfies23 w(K) E kx̂ − xk2 . √ , m where w(K) is the Gaussian width of K. Proof. Both the original vector x and the solution x̂ are feasible vectors for the optimization program (4.5.2). Then kx̂kK 6 kxkK 61 (since x̂ minimizes the Minkowski functional) (since x ∈ K). Thus both x̂, x ∈ K. We also know that Ax̂ = Ax = y, which yields (4.5.4) A(x̂ − x) = 0. Let us apply matrix deviation inequality (Theorem 4.2.1) for T := K − K. It gives √ E sup kA(u − v)k2 − m ku − vk2 . γ(K − K) = 2w(K), u,v∈K where we used (4.1.2) in the last identity. Substitute u = x̂ and v = x here. We may do this since, as we noted above, both these vectors belong to K. But then the term kA(u − v)k2 will equal zero by (4.5.4). It disappears from the bound, and we get √ E m kx̂ − xk2 . w(K). √ Dividing both sides by m we complete the proof.  23Here and in other similar results, the notation . will hide possible dependence on the sub-gaussian norms of the rows of A. Roman Vershynin 37 Theorem 4.5.3 says that a signal x ∈ K can be efficiently recovered from m ∼ w(K)2 random linear measurements. 4.6. Sparse recovery Let us illustrate Theorem 4.5.3 with an important specific example of the feasible set K. Suppose we know that the signal x is sparse, which means that only a few coordinates of x are nonzero. As before, our task is to recover x from the random linear measurements given by the vector y = Ax, where A is an m × n random matrix. This is a basic example of sparse recovery problems, which are ubiquitous in various disciplines. The number of nonzero coefficients of a vector x ∈ Rn , or the sparsity of x, is often denoted kxk0 . This is similar to the notation for the `p norm kxkp = P p 1/p , and for a reason. You can quickly check that ( n i=1 |xi | ) (4.6.1) kxk0 = lim kxkp p→0 (Do this!) Keep in mind that neither kxk0 nor kxkp for 0 < p < 1 are actually norms on Rn , since they fail triangle inequality. (Give an example.) Let us go back to the sparse recovery problem. Our first attempt to recover x is to try the following optimization problem: (4.6.2) min kx 0 k0 subject to y = Ax 0 . This is sensible because this program selects the sparsest feasible solution. But there is an implementation caveat: the function f(x) = kxk0 is highly non-convex and even discontinuous. There is simply no known algorithm to solve the optimization problem (4.6.2) efficiently. To overcome this difficulty, let us turn to the relation (4.6.1) for an inspiration. What if we replace kxk0 in the optimization problem (4.6.2) by kxkp with p > 0? The smallest p for which f(x) = kxkp is a genuine norm (and thus a convex function on Rn ) is p = 1. So let us try (4.6.3) min kx 0 k1 subject to y = Ax 0 . This is a convexification of the non-convex program (4.6.2), and a variety of numeric convex optimization methods are available to solve it efficiently. We will now show that `1 minimization works nicely for sparse recovery. As before, we assume that A is a random matrix as in Theorem 4.2.1. Theorem 4.6.4 (Sparse recovery by optimization). Assume that an unknown vector x ∈ Rn has at most s non-zero coordinates, i.e. kxk0 6 s. The solution x̂ of the 38 Four lectures on probabilistic methods for data science optimization program (4.6.3) satisfies r s log n kxk2 . m Proof. Since kxk0 6 s, Cauchy-Schwarz inequality shows that √ (4.6.5) kxk1 6 s kxk2 . E kx̂ − xk2 . n n (Check!) Denote the unit ball of the `1 norm in Rn by Bn 1 , i.e. B1 := {x ∈ R : kxk1 6 1}. Then we can rewrite (4.6.5) as the inclusion √ x ∈ s kxk2 · Bn 1 := K. Apply Theorem 4.5.3 for this set K. We noted the Gaussian width of Bn 1 in (4.1.4), so p √ √ √ n w(K) = s kxk2 · w(Bn log n. 1 ) 6 s kxk2 · γ(B1 ) 6 s kxk2 · Substitute this in Theorem 4.5.3 and complete the proof.  Theorem 4.6.4 says that an s-sparse signal x ∈ Rn can be efficiently recovered from m ∼ s log n random linear measurements. 4.7. Notes For a more thorough introduction to Gaussian width and its role in high-dimensional estimation, refer to the tutorial [59] and the textbook [60]; see also [5]. Related to Gaussian complexity is the notion of Rademacher complexity of T , obtained by replacing the coordinates of g by independent Rademacher (i.e. ±1 symmetric) random variables. Rademacher complexity of classes of functions plays an important role in statistical learning theory, see e.g. [44] Matrix deviation inequality (Theorem 4.2.1) is borrowed from [41]. In the special case where A is a Gaussian random matrix, this result follows from the work of G. Schechtman [57] and could be traced back to results of Gordon [24–27]. In the general case of sub-gaussian distributions, earlier variants of Theorem 4.2.1 were proved by B. Klartag and S. Mendelson [35], S. Mendelson, A. Pajor and N. Tomczak-Jaegermann [45] and S. Dirksen [20]. Theorem 4.4.1 for covariance estimation can be proved alternatively using more elementary tools (Bernstein’s inequality and ε-nets), see [58]. However, no known elementary approach exists for the low-rank covariance estimation discussed in Remark 4.4.3. The bound (4.4.4) was proved by V. Koltchinskii and K. Lounici [36] by a different method. In Section 4.5, we scratched the surface of a recently developed area of sparse signal recovery, which is also called compressed sensing. Our presentation there essentially follows the tutorial [59]. Theorem 4.6.4 can be improved: if we take m & s log(n/s) Roman Vershynin 39 measurements, then with high probability the optimization program (4.6.3) recovers the unknown signal x exactly, i.e. x̂ = x. First results of this kind were proved by J. Romberg, E. Candes and T. Tao [13] and a great number of further developments followed; refer e.g. to the book [23] and the chapter in [19] for an introduction into this research area. Acknowledgement I am grateful to the referees who made a number of useful suggestions, which led to better presentation of the material in this chapter. References [1] E. Abbe, A. S. Bandeira, G. Hall. Exact recovery in the stochastic block model, IEEE Transactions on Information Theory 62 (2016), 471–487. 19 [2] D. Achlioptas, Database-friendly random projections: Johnson-Lindenstrauss with binary coins, Journal of Computer and System Sciences, 66 (2003), 671–687. 9 [3] R. Ahlswede, A. Winter, Strong converse for identification via quantum channels, IEEE Trans. Inf. Theory 48 (2002), 569–579. 18 [4] N. Ailon, B. Chazelle, Approximate nearest neighbors and the fast Johnson-Lindenstrauss transform, Proceedings of the 38th Annual ACM Symposium on Theory of Computing. New York: ACM Press, 2006. pp. 557–563. 9 [5] D. Amelunxen, M. Lotz, M. McCoy, J. Tropp, Living on the edge: phase transitions in convex programs with random data, Inf. Inference 3 (2014), 224–294. 38 [6] A. Bandeira, R. van Handel, Sharp nonasymptotic bounds on the norm of random matrices with independent entries, Ann. Probab. 44 (2016), 2479–2506. 19, 28, 29 [7] R. Baraniuk, M. Davenport, R. DeVore, M. Wakin, A simple proof of the restricted isometry property for random matrices, Constructive Approximation, 28 (2008), 253–263. 9 [8] R. Bhatia, Matrix Analysis. Graduate Texts in Mathematics, vol. 169. Springer, Berlin, 1997. 18 [9] C. Bordenave, M. Lelarge, L. Massoulie, |em Non-backtracking spectrum of random graphs: community detection and non-regular Ramanujan graphs, Annals of Probability, to appear. 19 [10] S. Boucheron, G. Lugosi, P. Massart, Concentration inequalities. A nonasymptotic theory of independence. With a foreword by Michel Ledoux. Oxford University Press, Oxford, 2013. 9 [11] O. Bousquet1, S. Boucheron, G. Lugosi, Introduction to statistical learning theory, in: Advanced Lectures on Machine Learning, Lecture Notes in Computer Science 3176, pp.169–207, Springer Verlag 2004. [12] T. Cai, R. Zhao, H. Zhou, Estimating structured high-dimensional covariance and precision matrices: optimal rates and adaptive estimation, Electron. J. Stat. 10 (2016), 1–59. 28 [13] E. Candes, J. Romberg, T. Tao, Robust uncertainty principles: exact signal reconstruction from highly incomplete frequency information, IEEE Trans. Inform. Theory 52 (2006), 489–509. 39 [14] E. Candes, B. Recht, Exact Matrix Completion via Convex Optimization, Foundations of Computational Mathematics 9 (2009), 717–772. 29 [15] E. Candes, T. Tao, The power of convex relaxation: near-optimal matrix completion, IEEE Trans. Inform. Theory 56 (2010), 2053–2080. 29 [16] R. Chen, A. Gittens, J. Tropp, The masked sample covariance estimator: an analysis using matrix concentration inequalities, Inf. Inference 1 (2012), 2–20. 28 [17] P. Chin, A. Rao, and V. Vu, |em Stochastic block model and community detection in the sparse graphs: A spectral algorithm with optimal rate of recovery, preprint, 2015. 19 [18] M. Davenport, Y. Plan, E. van den Berg, M. Wootters, 1-bit matrix completion, Inf. Inference 3 (2014), 189–223. 29 40 References [19] M. Davenport, M. Duarte, Yonina C. Eldar, Gitta Kutyniok, Introduction to compressed sensing, in: Compressed sensing. Edited by Yonina C. Eldar and Gitta Kutyniok. Cambridge University Press, Cambridge, 2012. 39 [20] S. Dirksen, Tail bounds via generic chaining, Electron. J. Probab. 20 (2015), 1–29. 38 [21] U. Feige, E. Ofek, Spectral techniques applied to sparse random graphs, Random Structures Algorithms 27 (2005), 251–275. 19 [22] S. Fortunato, Santo; D. Hric, Community detection in networks: A user guide. Phys. Rep. 659 (2016), 1–44. 19 [23] S. Foucart, H. Rauhut, A mathematical introduction to compressive sensing. Applied and Numerical Harmonic Analysis. Birkhäuser/Springer, New York, 2013. 39 [24] Y. Gordon, Some inequalities for Gaussian processes and applications, Israel J. Math. 50 (1985), 265–289. 38 [25] Y. Gordon, Elliptically contoured distributions, Prob. Th. Rel. Fields 76 (1987), 429–438. 38 [26] Y. Gordon, On Milman’s inequality and random subspaces which escape through a mesh in Rn , Geometric aspects of functional analysis (1986/87), Lecture Notes in Math., vol. 1317, pp. 84–106. 38 [27] Y. Gordon, Majorization of Gaussian processes and geometric applications, Prob. Th. Rel. Fields 91 (1992), 251–267. 38 [28] D. Gross, Recovering low-rank matrices from few coefficients in any basis, IEEE Trans. Inform. Theory 57 (2011), 1548–1566. 29 [29] O. Guedon, R. Vershynin, Community detection in sparse networks via Grothendieck’s inequality, Probability Theory and Related Fields 165 (2016), 1025–1049. 19 [30] A. Javanmard, A. Montanari, F. Ricci-Tersenghi, Phase transitions in semidefinite relaxations, PNAS, April 19, 2016, vol. 113, no.16, E2218–E2223. 19 [31] W. B. Johnson, J. Lindenstrauss, Extensions of Lipschitz mappings into a Hilbert space. In Beals, Richard; Beck, Anatole; Bellow, Alexandra; et al. Conference in modern analysis and probability (New Haven, Conn., 1982). Contemporary Mathematics. 26. Providence, RI: American Mathematical Society, 1984. pp. 189–206. 9 [32] B. Hajek, Y. Wu, J. Xu, Achieving exact cluster recovery threshold via semidefinite programming, IEEE Transactions on Information Theory 62 (2016), 2788–2797. 19 [33] P. W. Holland, K. B. Laskey, S. Leinhardt, |em Stochastic blockmodels: first steps, Social Networks 5 (1983), 109–137. 19 [34] D. Kane, J. Nelson, Sparser Johnson-Lindenstrauss Transforms, Journal of the ACM 61 (2014): 1. 9 [35] B. Klartag, S. Mendelson, Empirical processes and random projections, J. Funct. Anal. 225 (2005), 229–245. 38 [36] V. Koltchinskii, K. Lounici, Concentration inequalities and moment bounds for sample covariance operators, Bernoulli 23 (2017), 110–133. 28, 38 [37] C. Le, E. Levina, R. Vershynin, Concentration and regularization of random graphs, Random Structures and Algorithms, to appear. 19 [38] M. Ledoux, The concentration of measure phenomenon. American Mathematical Society, Providence, RI, 2001. 9 [39] M. Ledoux, M. Talagrand, Probability in Banach spaces. Isoperimetry and processes. Springer-Verlag, Berlin, 1991. 9 [40] E. Levina, R. Vershynin, Partial estimation of covariance matrices, Probability Theory and Related Fields 153 (2012), 405–419. 28 [41] C. Liaw, A. Mehrabian, Y. Plan, R. Vershynin, A simple tool for bounding the deviation of random matrices on geometric sets, Geometric Aspects of Functional Analysis, Lecture Notes in Mathematics, Springer, Berlin, to appear. 38 [42] J. Matouĺek, Lectures on discrete geometry. Graduate Texts in Mathematics, 212. Springer-Verlag, New York, 2002. 9 [43] F. McSherry, Spectral partitioning of random graphs, Proc. 42nd FOCS (2001), 529–537. 19 [44] S.Mendelson,S.Mendelson, A few notes on statistical learning theory, in: Advanced Lectures on Machine Learning, S. Mendelson, A.J. Smola (Eds.) LNAI 2600, pp. 1–40, 2003. 38 [45] S. Mendelson, A. Pajor, N. Tomczak-Jaegermann, Reconstruction and subgaussian operators in asymptotic geometric analysis. Geom. Funct. Anal. 17 (2007), 1248–1282. 38 [46] E. Mossel, J. Neeman, A. Sly, Belief propagation, robust reconstruction and optimal recovery of block models. Ann. Appl. Probab. 26 (2016), 2211–2256. 19 References 41 [47] M. E. Newman, Networks. An introduction. Oxford University Press, Oxford, 2010. 19 [48] R. I. Oliveira, Concentration of the adjacency matrix and of the Laplacian in random graphs with independent edges, unpublished (2010), arXiv:0911.0600. 18, 19 [49] R. I. Oliveira, Sums of random Hermitian matrices and an inequality by Rudelson, Electron. Commun. Probab. 15 (2010), 203–212. 18 [50] Y. Plan, R. Vershynin, E. Yudovina, High-dimensional estimation with geometric constraints, Information and Inference 0 (2016), 1–40. 29 [51] S. Riemer, C. Schütt, On the expectation of the norm of random matrices with non-identically distributed entries, Electron. J. Probab. 18 (2013), no. 29, 13 pp. 28 [52] J. Tropp, User-friendly tail bounds for sums of random matrices. Found. Comput. Math. 12 (2012), 389–434. 18 [53] J. Tropp, An introduction to matrix concentration inequalities. Found. Trends Mach. Learning 8 (2015), 10-230. 18 [54] R. van Handel, Structured random matrices. in: IMA Volume “Discrete Structures: Analysis and Applications”, Springer, to appear. [55] R. van Handel, On the spectral norm of Gaussian random matrices, Trans. Amer. Math. Soc., to appear. 29 [56] B. Recht, A simpler approach to matrix completion, J. Mach. Learn. Res. 12 (2011), 3413–3430. 29 [57] G. Schechtman, Two observations regarding embedding subsets of Euclidean spaces in normed spaces, Adv. Math. 200 (2006), 125–135. 38 [58] R. Vershynin, Introduction to the non-asymptotic analysis of random matrices. Compressed sensing, 210–268, Cambridge University Press, Cambridge, 2012. 2, 9, 28, 29, 38 [59] R. Vershynin, Estimation in high dimensions: a geometric perspective. Sampling Theory, a Renaissance, 3–66, Birkhauser Basel, 2015. 2, 29, 38 [60] R. Vershynin, High-Dimensional Probability. An Introduction with Applications in Data Science. Cambridge University Press, to appear. 2, 9, 29, 38 [61] H. Zhou, A. Zhang, Minimax Rates of Community Detection in Stochastic Block Models, Annals of Statistics, to appear. 19 Department of Mathematics, University of Michigan, 530 Church Street, Ann Arbor, MI 48109, U.S.A. E-mail address: [email protected]
8cs.DS
Deep supervised learning using local errors Hesham Mostafa1 , Vishwajith Ramesh2 , and Gert Cauwenberghs1,2 Institute for Neural Computation,2 Department of Bioengineering UC San Diego, California, USA E-mail: [email protected] 1 arXiv:1711.06756v1 [cs.NE] 17 Nov 2017 Abstract Error backpropagation is a highly effective mechanism for learning high-quality hierarchical features in deep networks. Updating the features or weights in one layer, however, requires waiting for the propagation of error signals from higher layers. Learning using delayed and non-local errors makes it hard to reconcile backpropagation with the learning mechanisms observed in biological neural networks as it requires the neurons to maintain a memory of the input long enough until the higher-layer errors arrive. In this paper, we propose an alternative learning mechanism where errors are generated locally in each layer using fixed, random auxiliary classifiers. Lower layers could thus be trained independently of higher layers and training could either proceed layer by layer, or simultaneously in all layers using local error information. We address biological plausibility concerns such as weight symmetry requirements and show that the proposed learning mechanism based on fixed, broad, and random tuning of each neuron to the classification categories outperforms the biologically-motivated feedback alignment learning technique on the MNIST, CIFAR10, and SVHN datasets, approaching the performance of standard backpropagation. Our approach highlights a potential biological mechanism for the supervised, or task-dependent, learning of feature hierarchies. In addition, we show that it is well suited for learning deep networks in custom hardware where it can drastically reduce memory traffic and data communication overheads. 1 Introduction Gradient descent training techniques [1] have been remarkably successful in training a broad range of network architectures. This success is often attributed to the use of deep architectures with many nonlinearity stages [2] where backpropagation is used to calculate the direction of weight updates in deep layers. In convolutional networks in particular, multiple cascaded convolutional layers allow simple, lower-level, features to be successively composed into more complex features, allowing networks to obtain highly complex and relevant features from the top convolutional layers [3]. Deep convolutional neural networks trained using backpropagation are thus achieving record performance in a variety of large-scale machine vision tasks [4–9]. For deep convolutional networks trained in a supervised setting, the training objective is typically the minimization of classification error at the top network layer. This objective is sometimes augmented by auxiliary objectives defined using the outputs of intermediate classifiers in the network [10,11]. These auxiliary objectives provide additional sources of error to deeper layers. Training, however, involves error signals that must propagate backwards from the top layer. Standard backpropagation is biologically unrealistic for several reasons: the need to buffer network states until errors arrive from the top layer; weight symmetry in the forward and backward passes; and the need to precisely interleave the forward and backward passes. Several biologically-motivated learning mechanisms have been proposed to explain how circuits in the brain are able to learn complex, hierarchical representations. One broad class of these proposals is based on contrastive learning in energybased models [12–14]. In these models, the network is trained to minimize the discrepancy between its equilibrium points when running freely and when observables clamp the values of some units in the network. Weight symmetry is required, though: each synaptic connection from one neuron to another assumes a matching synaptic connection of identical strength in the reverse direction. In [15, 16], weight symmetry is avoided by using an independent set of fixed random weights to backpropagate errors between the network layers. However, like standard backpropagation, the error signals are non-local. Instead of backpropagating errors layer by layer through the random feedback connections, the networks in [17, 18] directly use a fixed random projection of the top layer error as the error signal in deep layers. Although this permits a single global error signal communicated in common to all layers, is still incurs substantial wait times and memory requirements for the weight updates as a forward pass through the entire network has to be completed before the error signal is available, which requires deep layers to hold their states for the duration of the full forward pass. We propose a learning approach where weights in any given layer are trained based on local errors that are generated solely based on neural state variables in that layer. These errors are generated directly from the training labels using a classifier with fixed random weights and no hidden layers, and whose input is the neural activations in the layer being trained. Instead of minimizing a global objective function, training thus minimizes many local objective functions. As such this approach compromises one of the core tenets of standard backpropagation: the adjustment of all parameters in concert to minimize a unified objective. Nevertheless, training with local errors still allows a deep network to compose the features learned by lower layers into more complex features in higher layers. This is evidenced below by the improvement in accuracy of the random local classifiers in deeper layers. Training with local errors thus retains the hierarchical composition of features, one of the key strengths of deep networks. To implement weight updates based on backpropagation in a biologically inspired network, the preor post-synaptic neurons need to buffer the past activity of the pre-synaptic neurons and reproduce this past activity in sync with the corresponding errors arriving from top layers in order to update the weights. This is incompatible with biologically motivated synaptic weight update rules that are typically triggered by pre-synaptic events and depend on the relative timing of pre- and post-synaptic spikes and/or state variables in the post-synaptic neuron. Our learning mechanism bypasses biological implausibility arguments against standard backpropagation by generating errors locally in each layer using fixed random projections. Weight updates could thus be carried out while the synaptic currents in post-synaptic neurons (the neurons receiving the local error signal) still retain a memory of recent presynaptic activity. Weight symmetry in the forward and backward passes in standard backpropagation learning is another biologically unrealistic aspect. In our case, the weight symmetry requirement arises in the one-step error backpropagation from the output of the local random classifier to the neurons in the layer being trained. Similar to ref. [15], we experimented with relaxing this symmetry requirement by using a different set of random, fixed weights to map the classifier error to the error at the layer being trained. We analyze the implications of the proposed learning approach for the design of custom hardware devices for learning the parameters of deep networks. In the proposed learning approach, there is no explicit backward pass as errors are locally generated and can be used to directly update the weights. We show that our approach drastically reduces memory traffic compared to standard backpropagation in the typical situation when the network weights and activations can not all fit into the compute device memory. We achieve this reduction even despite an increased number of parameters in the network due to the addition of the random local classifier weights in each layer. These weights, however, are fixed allowing them to be generated on the fly using pseudo-random number generators (PRNGs). Only the negligibly small random seeds of the PRNGs for each layer need to be stored. We discuss related work in section 2. We describe the proposed learning mechanism in section 3 and quantitatively assess the hardware-related computational and memory access benefits compared to standard learning with global objective functions in section 4. We present the results of applying the proposed learning method to standard supervised learning benchmarks in section 5 and compare our learning method’s performance to that of the feedback alignment technique [15] . We present our conclusions and further discussion on the biological plausibility of the proposed learning mechanism in section 6. 2 Related Work Training of deep convolutional networks is currently dominated by approaches where all weights are simultaneously trained to minimize a global objective. This is typically done in a purely supervised setting where the training objective is the classification loss at the top layer. To ameliorate the problem of exploding/vanishing errors in deep layers [19], auxiliary classifiers are sometimes added to provide additional error information to deep layers [10, 11]. Unlike our training approach, however, training still involves backpropagating errors across the entire network and simultaneous adjustments of all weights. Several learning mechanisms have been traditionally used to pre-train a deep network layer-by-layer using local error signals in order to learn the probability distribution of the input layer activations, or in order to minimize local reconstruction errors [20–24]. These mechanisms, however, are unsupervised and the networks need to be augmented by a classifier layer, typically added on top of the deepest layer. The network weights are then fine-tuned using standard backpropagation to minimize the error at the classifier layer. Supervised layer-wise training has been pursued in [22], with auxiliary classifiers that are co-trained, unlike the random fixed auxiliary classifiers proposed here. The supervised layer-wise training is used only as a pre-training step, and results are reported after full network fine-tuning using backpropagation from the top classifier layer. Some approaches forego the fine-tuning step and keep the network fixed after the unsupervised layer-wise training phase, and only train the top classifier layer or SVM on the features learned [25–27]. Local learning in [26, 27] involves an iterative procedure for learning sparse codes which is computationally demanding. The network architectures in [25–27] fail to yield intermediate classification results from the intermediate layers. Moreover, their applicability to datasets that are more complex than MNIST is unclear since labels are not used to guide the learning of feature. In more complex learning scenarios with an abundance of possible features, these networks could very well learn few label-relevant features, thereby compromising the performance of the top classifier. Instead of layer-wise pre-training, several recent approaches train the whole network using a hybrid objective that contains supervised and unsupervised error terms [28]. In some of these network configurations, the unsupervised error terms are local to each layer [29]. The supervised error term, however, requires backpropagating errors through the whole network. This requirement is avoided in the training approach in [30] used to learn to extract compact feature vectors from documents: training proceeds layer by layer where the error in each layer is a combination of a reconstruction error and a supervised error coming from a local classifier. The local auxiliary decoder and classifier pathways still require training, however. Other approaches also make use of a combination of supervised (label-dependent) and unsupervised error signals to train Boltzmann machines as discriminative models [31, 32]. Learning in [32], however, is more computationally demanding than our approach as as it involves several iterations to approach the mean-field equilibrium point of the network, and errors are still backpropagated through multiple layers. In [31], multi-layer networks are not considered and only a single layer RBM is used. In refs [15–18], the backpropagation scheme is modified to use random fixed weights in the backward path. This relaxes one of the biologically unrealistic requirements of backpropagation which is weight symmetry between the forward and backward pathways. Errors are still non-local, however, as they are generated by the top layer. A learning mechanism that is able to generate error signals locally is the synthetic gradients mechanism [33, 34] in which errors are generated by dedicated error modules in each layer based only on the layer’s activity and the label. The parameters of these dedicated error modules are themselves updated based on errors arriving from higher layers in order to make the error modules better predictors of the true, globally-derived, error signal. Our approach generates errors in a different manner through the use of a local classifier, and each layer receives no error information from the layer above. 3 Methods We train multi-layer networks, with either convolutional or fully connected layers, based on local errors generated by random classifiers. Consider a fully connected ith hidden layer in a network whose activation vector is denoted by yi ∈ RN receiving an input xi ∈ RM : yi = f (Wi xi + bi ) 0 yi = f 0 (Wi xi + bi ) i i N (1) (2) where W is the N × M weight matrix of layer i and b ∈ R is the bias vector, and f is the neuron’s activation function. In all the networks we train, we use Rectified Linear Units (ReLUs) [35], i.e, f (x) = max(x, 0), with corresponding derivatives f 0 (x) = H(x) where H(·) is the Heaviside step function. We pre-define for this hidden layer a fixed random classifier matrix Mi which is a C × N matrix where C is the number of classification categories. The random matrix, Mi , is used to convert the layer activation vector, yi , to a category score vector si ∈ RC where si = Mi yi . Since this is a supervised learning setting, the correct input category t is known during training, which allows the layer to generate a scalar loss or error signal, E(t, si ). E could be for example the cross-entropy loss or the square hinge loss. This ..... label class scores hidden layer i+1 error label class scores hidden layer i error Figure 1. Supervised learning in a multi-layer network using local errors. Biases are omitted for clarity. Red arrows indicate the error pathways. Hidden layer i is trained using local errors generated by a classifier with random fixed weights Mi . The errors are randomly projected back using the matrix Ki , and multiplied element-wise with the layer’s activation derivative to yield the error signal ey i which is then used to update the weights. error is then backpropagated in order to calculate the weight and bias updates, ∆Wi and ∆bi : dE dsi = Ki eis es i = ey i (3) yi i i i i i ∆W = −ηey ×x ∆b = −ηey 0 (4) (5) (6) where is the element-wise multiplication operator, × is the outer product operator, and η is the learning rate. Ki is the N × C matrix used to backpropagate the classifier error to the layer being trained. If we T set Ki = Mi , then the weight and bias updates are executing exact gradient descent to minimize the random classifier error, E. In that case, training of each layer is equivalent to training a network with one hidden layer where only the hidden layer’s input weights and biases are trainable, while the output weights, Mi are fixed. The learning scheme is illustrated in Fig. 1. For convolutional layers, the learning scheme remains unchanged. The post-activation feature maps tensor is simply flattened to yield a 1D vector before multiplying by the random classifier matrix M. We also use dropout [36] in this training setting to minimize overfitting. All incoming/outgoing weights to/from a dropped neurons are not updated in the iteration in which the neuron is dropped. In some networks, we use batch normalization [37] before the layer’s non-linearity. The layer’s learnable parameters will then include a scaling factor (one for each neuron in a fully connected layer, or one for each feature map in a convolutional layer) that is also trained using local errors. For a fully connected layer, the input to the local classifier is taken after the dropout mask is applied (if dropout is used). For a convolutional layer, the input to the layer’s local classifier is taken after pooling and after applying the dropout mask. In all experiments, we initialize the fixed random classifier weights, as well as the trainable weights in the main network, from a uniform, zero-mean, distribution whose max/min values depend on the number of neurons in the source and target layers according to the scheme in [38]. We compare our approach to the feedback alignment training method [15] in which random fixed weights are used to backpropagate the error layer-by-layer from the top layer. The layer’s activation derivative is still used when backpropagating errors. In the presence of max-pooling layers, errors only backpropagate through the winner(max) neuron in each pooling window. When using feedback alignment training in the presence of dropout, a neuron that is dropped during the forward pass is also dropped during the backward pass. When using convolutional layers, we use fixed random filters that we convolve with the errors of one convolutional layer to yield the errors at the outputs of the previous/lower Repeat MAC operations MAC operations MAC operations MAC operations Compute device Compute device Compute device Compute device ... ..... External memory External memory ... External memory forward pass External memory backward pass (a) Repeat MAC operations MAC operations Compute device Compute device ... ... External memory External memory (b) Figure 2. Memory traffic and number of MAC operations for different training methods. Arrows between compute device and external memory indicate memory traffic while green arrows indicate data buffered and reused by the compute device. Each computation stage is executed a number of times given by the enclosing repeat block. (a) Standard backpropagation learning. (b) Training all layers simultaneously using local errors. Note that there is no backward pass as weights are updated during the forward pass. convolutional layer. We also use batch normalization when training using feedback alignment. The extra scaling parameters introduced by batch normalization are trained using the randomly backpropagated errors arriving at the batch-normalized layer’s output. All experiments in this paper were carried out using Theano [39,40], and all parameters were optimized using ADAM [41]. 4 Hardware Implications of Learning Using Local Errors Standard learning techniques based on backpropagating errors through the whole network require the hardware executing the learning algorithm to store the activation values and activation derivatives of all network layers in order to calculate weight updates and backpropagate errors once errors are available from the top layer. This imposes several communication and memory access overheads if learning is executed on hardware whose memory can not accommodate all the network weights and activations. For large scale convolutional networks, this practically includes all CPU and GPU devices where on-chip memory is limited to few tens of MBytes, while state of the art deep convolutional networks typically require several hundred MBytes to several GBytes in order to store the network weights and mini-batch activations [42]. Data thus has to be continuously shuttled between the compute device and external memory. This is the case even in custom accelerators developed to accelerate just the inference (feedforward) phase [43–49], where a complete forward pass through a large-scale convolutional network can not be executed completely on the accelerator without having to access external memory to store intermediate activations and to load weights. Improvements in memory bandwidth significantly lag improvements in computing elements speed [50]. Reducing memory traffic in a compute intensive task such as learning deep networks thus improves performance as it relaxes the requirements on the memory bandwidth and latency needed to keep the compute elements occupied, allowing either the compute elements to run at higher frequencies or the external memory to run at lower frequencies. Moreover, energy needed to drive off-chip traffic from/to external memory as well as memory read/write energy often contribute significantly to the overall energy consumption [51, 52]. Reducing memory traffic can thus have significant impact on the overall energy consumption of the learning hardware. In this section, we analyze the savings in memory traffic volume obtained using the learning approach based on local errors that we propose in this paper. Consider a neural network with L layers. P i and Ai are the parameters and the mini-batch activations of layer i, respectively. |P i | and |Ai | are the number of elements in P i and Ai . A neuron in layer i has a fanout of Ri , i.e, a neuron in layer i projects to Ri neurons in layer i + 1. In convolutional layers, we ignore any border effects which might cause the neurons at the borders of the feature maps to project to fewer neurons than neurons away from the borders. We divide the training data set into Nb mini-batches and train the network for Ne epochs. Each weight and each neuron activation takes up one memory word (which we assume is 32 bits). Figure 2a illustrates the data traffic and the number of MAC operations needed during standard backpropagation training. The data traffic in Fig. 2a assumes the compute device has enough on-board memory to buffer the output activations of one layer in order to use these activations to calculate the next layer’s activation. We also assume the compute device does not need the parameters of any layer to be streamed in more than once during each forward pass and during each backward pass. These assumptions would hold true if the accelerator has at least maxi (|P i | + |Ai |) words of on-board memory. During the forward pass, the activations of all layers have to be streamed out to external memory so they can be used in the backward pass. The number of MAC operations needed to calculate the activation of layer i is Ri−1 |Ai−1 |. During the backward pass, the compute device buffers the back-propagated errors of one layer and uses them to calculate the errors at the preceding layer. Ri |Ai | MAC operations are needed to calculate the weight updates for P i+1 . An additional Ri |Ai | MAC operations are needed to backpropagate the errors from layer i + 1 to layer i. We ignore the special case of the input layer where errors do not need to be backpropagated. We also ignore the MAC operations needed to calculate the error at the top layer. Figure 2b illustrates the case when learning is done using errors generated by random local classifiers. As in standard backpropagation, Ri−1 |Ai−1 | MAC operations are needed to calculate the activations of layer i. To calculate the local classifier output, C|Ai | MAC operations are needed where C is the number of classification classes. Note that the random classifier weights can be generated on the fly using a PRNG, and thus only require the PRNG seed (whose size can be 32 bits for 32-bit weights) to be stored. To backpropagate the local classifier error to obtain the error at layer i, an additional C|Ai | MAC operations are needed and Ri−1 |Ai−1 | MAC operations are needed to update the parameters of layer i, P i , based on the layer’s error. Table 1 summarizes the number of MAC operations and the memory read/write volume required by the two training methods. Learning using local errors has a decisive advantage when it comes to memory traffic as it requires drastically less read and write operations compared to standard backpropagation. The reduction in the number of MAC operations is less unequivocal as it depends on the number of i classification classes, C, and the fanout of the neurons P in the network, R . Learning using local error reduces the MAC operations count if L × C < 0.5 i Ri . This condition is easily satisfied when the number of classes is small and it was satisfied by all the networks presented in this paper. Table 1. Memory traffic and number of MAC operations for different learning methods Training method Standard backpropagation Learning using local errors Memory read(words) P Ne Nb (2|P i | + |Ai |) i P Ne Nb |P i | i Memory write (words) P Ne Nb (|P i | + |Ai |) i P Ne Nb |P i | i MAC operations P Ne Nb 3Ri |Ai | i P Ne Nb (2Ri + 2C)|Ai | i 5 Results 5.1 MNIST We first validate the performance of our training approach on the MNIST hand-written digit recognition task. We used the standard split of 50,000/10,000/10,000 examples for training/validation/testing respectively. The validation set was added to the training set after choosing the hyper-parameters. We use a network with 3 fully connected hidden layers with 1000 neurons per layer and train the weights in the entire network using local errors. As a baseline, we also train a 2-hidden layers network and a 3-hidden layers network using standard backpropagation where each hidden layer also has 1000 neurons. Dropout was used in all networks to reduce overfitting. We first used fixed symmetric random weights in T the forward and backward pathways in the local error loops, i.e, Ki = Mi in all layers. The results are shown in Fig. 3a. The local classifier errors improve for the second and third hidden layers compared to the first hidden layer implying that the network is able to make use of depth to obtain better accuracy. The local classifier errors in the second and third layers are similar implying that the network is unable to make use of the increased depth beyond two hidden layers for this simple dataset. This observation is also valid for standard backpropagation where accuracy does not improve when going from two hidden layers to three hidden layers. When training using local errors, we also ran experiments where the local classifier weights were trainable parameters. This had no effect on accuracy as shown in Table 2. 7 7 Layer1 random classifier error Layer2 random classifier error Layer3 random classifier error Error of 2-layer network trained using backprop Error of 3-layer network trained using backprop 5 Symmetric local feedback weights: 4 3 2 1 0 6 % test error % test error 6 Layer1 random classifier error Layer2 random classifier error Layer3 random classifier error Error of 2-layer network trained using backprop Error of 3-layer network trained using backprop 5 Sign-concordant feedback weights: 4 3 2 20 40 epoch (a) 60 80 100 1 0 20 40 epoch 60 80 100 (b) Figure 3. (a) MNIST test set errors obtained from three networks: a 3-layer network trained using T local errors and symmetric local feedback weights (Ki = Mi ) where the errors for the three random local classifiers are shown, a network with two hidden layers trained using standard backpropagation, and a network with three hidden layers trained using standard backpropagation. The networks were trained for 100 epochs. Each line is the average of 20 training trials. (b) Same as (a) except that in the network trained using local errors, sign-concordant local feedback weights with independent and random magnitudes were used. Next, to lessen concern of biological implausibility of exact symmetry in feedforward and feedback weights, we relaxed the weight symmetry requirement in the local error loops and initialized the error feedback weights Ki randomly and independently of Mi , except we then modified the sign of the weights T in Ki so that sign(Ki ) = sign(Mi ). The signs of the feedback weights in the local error loops thus match the signs of the feedforward weights (both are fixed and have independent magnitudes). This is the ’sign-concordant feedback weights’ case shown in Fig. 3b. Performance deteriorates slightly in this case compared to symmetric feedforward and feedback local classifier weights. When we relax the symmetry requirement further and choose Ki to be random and completely independent of Mi , the network failed to learn and error rates stayed at near-chance level. We also experimented with training based on feedback alignment where errors from the top layer are backpropagated using random fixed weights. The network’s performance using feedback alignment is worse than learning using local errors (using either symmetric or sign-concordant weights) as shown in Table 2. Table 2. MNIST final test set error after 100 training epochs. When learning using local errors, the local classifier errors in all layers are reported. Mean and standard deviation from 20 runs. Test error Test error Local error learning (symmetric feedback weights) Local error learning (sign-concordant feedback weights) Local error learning (trainable local classifier) Layer1: 1.71 ± 0.042% Layer2: 1.28 ± 0.042% Layer3: 1.27 ± 0.048% Layer1: 1.83 ± 0.048% Layer2: 1.37 ± 0.055% Layer3: 1.38 ± 0.059% Layer1: 1.42 ± 0.039% Layer2: 1.28 ± 0.049% Layer3: 1.27 ± 0.037% Learning using feedback alignment 2-layer network trained using backprop 3-layer network trained using backprop 1.70 ± 0.087% 1.26 ± 0.068% 1.27 ± 0.050% It is important to note that in feedback alignment, the feedforward weights eventually ’align’ with the random weights used to backpropagate errors [15] enabling the network to learn. When learning using random fixed local classifiers, and if we choose random error feedback weights, the classifier weights are fixed and thus can not align with the random weights used in the one-step backpropagation. Reliable error information, however, can still reach the layer being trained if the signs of the random backpropagation weights, Ki , match the signs of the fixed local classifier weights Mi . This is in-line with previous investigations into the importance of weight symmetry in backpropagation that argue for the importance of sign-concordance between forward and backward weights [53]. 5.2 CIFAR10 We trained a convolutional network with three convolutional layers followed by two fully connected layers on the CIFAR10 dataset. We used a similar network as ref. [36]. The convolutional layers used a 5 × 5 kernel, a stride of 1, and had 96, 128, and 256 feature maps going from the bottom upwards. Max-pooling with a pooling window of 3 × 3 and stride 2 was applied after each convolutional layer. The two fully connected layers on top had 2, 048 neurons each. All layers were batch-normalized and dropout was applied after the input layer, after each max-pooling layer, and after each fully connected layer. The 32×32×3 CIFAR10 color images were pre-processed using global contrast normalization followed by ZCA whitening. The training set of 50,000 images was used for training/validation and we report errors on the 10,000 images test set. Unlike the MNIST dataset, standard backpropagation significantly outperforms training using local errors as shown in Fig. 4 and Table 3. Performance of local error learning deteriorates slightly when using sign-concordant local feedback weights instead of symmetric local feedback weights. Performance does not improve for the local classifier in the second fully connected layer compared to the classifier in the first fully connected layer. We trained a variant of the network using only one fully connected layer using standard backpropagation. As shown in Table 3, the improvement in performance of the network trained using standard backpropagation is minimal when going from one to two fully connected layers. This implies that the second fully connected layer is largely superfluous and local error learning is thus unable to capitalize on it. Unlike for the MNIST dataset, allowing the local classifier parameters to be trainable improves performance significantly. As was the case for the MNIST dataset, training using feedback alignment leads to significantly worse performance than learning using local errors. Our feedback alignment results are better than those previously reported in refs. [16, 17, 53]. This is due to our use of a bigger network that is well-regularized using dropout. Using a well-regularized network is particularly crucial when investigating alternatives to standard backpropagation as poorly-regularized learning can make a worse learning algorithm seem better, simply because it better regularizes the learning problem compared to a superior algorithm that overfits on the training data. Strong regularization is also a potential reason why we see that exact gradient descent (standard backpropagation) is clearly superior, unlike previous investigations that report better performance when using various approximations to standard backpropagation [53], where this better performance can be due to the better regularization introduced by the approximate learning algorithms. 80 80 Sign-concordant feedback weights: Symmetric local feedback weights: 70 70 60 % test error % test error 60 Conv1 random classifier error Conv2 random classifier error Conv3 random classifier error Fully-connected1 random classifier error Fully-connected2 random classifier error Error of standard backprop training 50 40 50 40 30 30 20 20 10 0 20 40 epoch 60 80 100 (a) Conv1 random classifier error Conv2 random classifier error Conv3 random classifier error Fully-connected1 random classifier error Fully-connected2 random classifier error Error of standard backprop training 10 0 20 40 epoch 60 80 100 (b) Figure 4. (a) CIFAR10 test set errors obtained from two convolutional networks having the architecture described in the main text: one network was trained using local errors and symmetric local T feedback weights (Ki = Mi ), where the errors for the random local classifiers in all layers are shown; the other network with identical architecture was trained using standard backpropagation. (b) Same as (a) except that in the network trained using local errors, sign-concordant local feedback weights with independent and random magnitudes were used. 5.3 SVHN We trained an identical network to the one used for the CIFAR10 dataset on the SVHN dataset. The SVHN dataset is a dataset of 32×32×3 color images. We used the training/validation/testing split of 598388/6000/26032 images respectively that was previously used in refs. [36,54,55]. The validation set was added to the training set after choosing the hyper-parameters (learning rate and dropout probabilities). The images were preprocessed using the local contrast normalization technique from ref. [56]. Figure 5 shows the test error curves for the case of the symmetric local feedback weights and the case of the sign-concordant local feedback weights. The test error trends in Fig. 5 and Table 4 are similar to those observed for CIFAR10. The performance of standard backpropagation is clearly superior, followed by learning using local errors generated by trainable local classifiers. Learning using local errors generated by fixed random classifiers lags behind (both when using symmetric feedback weights or sign-concordant feedback weights) but it still outperforms learning using feedback alignment. 6 Conclusions and Discussion Weight symmetry between the forward and backward passes and delayed error generation are two of the most biologically unrealistic aspects of backpropagation. Recent investigations have shown that the weight symmetry requirement can be relaxed allowing learning to proceed with random feedback weights [15–18]. These investigations, however, do not address the problem of local learning and require the network to maintain its state until errors arrive from higher layers. Local errors have often been used to augment the top layer errors [10, 11]. However, until now, relatively little work has been done on supervised learning using exclusively local errors, and none that we know of investigated local error generation using fixed random classifiers. Our results show that learning using local errors generated using random classifiers, while falling short of the performance of standard backpropagation, significantly outperforms learning using feedback alignment techniques [15, 16]. This holds true even when relaxing the weight symmetry requirement in the local feedback loop and using random fixed feedback weights that are sign-aligned with the random fixed classifier weights in the local learning loop. Maintaining sign-alignment is problematic in the feedback alignment technique as the sign of the feedback weights have to dynamically track the sign of the feedforward weights during training [53] which introduces a dynamic dependency between the two sets of weights. In our case, since both sets of weights are fixed, this dependency need only be enforced initially. Table 3. CIFAR10 final test set error after 100 training epochs. When learning using local errors, the local classifier errors in all layers are reported. Mean and standard deviation from 20 runs. Test error Test error Local error learning (symmetric feedback weights) Local error learning (sign-concordant feedback weights) Local error learning (trainable local classifier) conv1: 60.74 ± 0.87% conv2: 28.47 ± 0.37% conv3: 19.37 ± 0.27% FC1: 17.75 ± 0.30% FC2: 18.15 ± 0.36% conv1: 69.10 ± 1.1% conv2: 33.64 ± 0.41% conv3: 21.49 ± 0.38% FC1: 18.5 ± 0.33% FC2: 18.77 ± 0.33% conv1: 30.45 ± 0.27% conv2: 18.44 ± 0.27% conv3: 15.07 ± 0.21% FC1: 14.34 ± 0.24% FC2: 14.34 ± 0.22% Learning using feedback alignment Learning using standard backpropagation (two FC layers) Learning using standard backpropagation (one FC layer) 20.87 ± 0.34% 12.47 ± 0.25% 12.72 ± 0.21% Table 4. SVHN final test set error after 100 training epochs. When learning using local errors, the local classifier errors in all layers are reported. Mean and standard deviation from 5 runs. Test error Test error Local error learning (symmetric feedback weights) Local error learning (sign-concordant feedback weights) Local error learning (trainable local classifier) conv1: 45.87 ± 0.64% conv2: 8.05 ± 0.19% conv3: 3.87 ± 0.037% FC1: 3.53 ± 0.022% FC2: 3.52 ± 0.032% conv1: 56.27 ± 0.86% conv2: 10.27 ± 0.28% conv3: 4.23 ± 0.086% FC1: 3.66 ± 0.091% FC2: 3.66 ± 0.084% conv1: 9.96 ± 0.062% conv2: 3.83 ± 0.10% conv3: 2.79 ± 0.066% FC1: 2.57 ± 0.049% FC2: 2.57 ± 0.019% Learning using feedback alignment Learning using standard backpropagation 3.74 ± 0.077% 2.39 ± 0.037% Our CIFAR10 and SVHN results indicate that locally generated errors allow a convolutional layer to learn good features that are then used by the subsequent layer to learn even more informative features as evidenced by the increased accuracy of the local classifiers in higher layers. In the end, however, our approach solves many small optimization problems where each problem involves only the weights of one layer. We therefore lose one of the core advantages of standard backpropagation learning using a global objective function: the high probability of finding a good minimum in the parameter space when the dimensionality of this parameter space is large, i.e, when it includes all the network parameters [57, 58]. It was thus expected that classification performance will suffer compared to learning using standard backpropagation and a global objective function. Single cell measurements in monkey area IT indicate broad tuning to a range of categories [59, 60]. This broad category tuning is realized in the proposed training scheme through the random local classifier weights that define how a neuron contributes to the score of each classification category. During training, the actual tuning properties of each neuron change to be in-line with the pre-defined fixed tuning defined by the random classifier weights, as this is the only way to minimize the local classifier error. Our error generation mechanism has several biologically attractive aspects: 1. It involves only two synaptic projections allowing errors to be generated quickly and weight updates to be carried out before input-induced changes in the states of the neurons have decayed. This avoids the common and unrealistic input buffering requirement encountered in standard backpropagation and feedback alignment techniques. 2. Error generation involves random projections that do not have to be learned. This makes the error 70 70 Symmetric local feedback weights: 60 Conv1 random classifier error Conv2 random classifier error Conv3 random classifier error Fully-connected1 random classifier error Fully-connected2 random classifier error Error of standard backprop training 50 % test error % test error 50 Conv1 random classifier error Conv2 random classifier error Conv3 random classifier error Fully-connected1 random classifier error Fully-connected2 random classifier error Error of standard backprop training 40 30 20 40 30 20 10 0 0 Sign-concordant feedback weights: 60 10 10 20 epoch (a) 30 40 50 0 0 10 20 epoch 30 40 50 (b) Figure 5. (a) SVHN test set errors obtained from two convolutional networks: one network was T trained using local errors and symmetric local feedback weights (Ki = Mi ) where the errors for the random local classifiers in all layers are shown. The other network with identical architecture was trained using standard backpropagation . (b) Same as (a) except that in the network trained using local errors, sign-concordant local feedback weights with independent and random magnitudes were used. generation loop particularly simple and removes any potential problematic interactions between learning the auxiliary classifier weights and learning the main network weights. 3. Strict weight symmetry is not required in the error pathway, only sign-alignment between two sets of fixed random weights is needed. The use of fixed random local classifier weights allows us to sidestep one of the main hardware-related issues of using auxiliary local classifiers: the need to store the local classifier weights. Especially in large convolutional layers, storing the local classifier weights could be prohibitively expensive in terms of memory resources. Since the local classifier weights need to be accessed in a fixed order during each training iteration in order to calculate the classifier outputs, they can be cheaply, quickly, and reproducibly generated on the fly using a PRNG and a small seed. We have shown that this approach allows us to obtain a learning mechanism that drastically reduces memory traffic compared to standard backpropagation. During inference, the random classifier weights in each layer (which are compactly stored in a small seed) can be used to generate a classification decision during the evaluation of each layer. Thus, if needed, a series of classification decisions can be obtained, one from each layer, at a small computational cost and virtually no memory cost. The decisions from bottom layers, even though less accurate than the decisions from higher layers, can be used in situations where response time is critical. This allows the network to be dynamically truncated where higher layers are not evaluated and the final decision taken from intermediate layers. This feature of the proposed networks enables a dynamical trade-off between accuracy and energy consumption/computational load where only as many layers as allowed by the energy budget, or response time constraint, are evaluated. References 1. Léon Bottou. Stochastic gradient learning in neural networks. Proceedings of Neuro-Nımes, 91(8), 1991. 2. Jimmy Ba and Rich Caruana. Do deep nets really need to be deep? information processing systems, pages 2654–2662, 2014. In Advances in neural 3. A.S. Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. Cnn features off-theshelf: an astounding baseline for recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition workshops, pages 806–813, 2014. 4. Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. 5. Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 6. Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015. 7. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016. 8. Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016. 9. Gao Huang, Zhuang Liu, K.Q. Weinberger, and Laurens van der Maaten. Densely connected convolutional networks. arXiv preprint arXiv:1608.06993, 2016. 10. C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going Deeper with Convolutions. ArXiv e-prints, September 2014. 11. Chen-Yu Lee, Saining Xie, Patrick Gallagher, Zhengyou Zhang, and Zhuowen Tu. supervised nets. In Artificial Intelligence and Statistics, pages 562–570, 2015. Deeply- 12. Xiaohui Xie and S.H. Seung. Equivalence of backpropagation and contrastive hebbian learning in a layered network. Neural computation, 15(2):441–454, 2003. 13. Yoshua Bengio and Asja Fischer. Early inference in energy-based models approximates backpropagation. arXiv preprint arXiv:1510.02777, 2015. 14. Benjamin Scellier and Yoshua Bengio. Equilibrium propagation: Bridging the gap between energybased models and backpropagation. Frontiers in computational neuroscience, 11, 2017. 15. T.P. Lillicrap, Daniel Cownden, D.B. Tweed, and C.J. Akerman. Random synaptic feedback weights support error backpropagation for deep learning. Nature communications, 7, 2016. 16. Pierre Baldi, Peter Sadowski, and Zhiqin Lu. Learning in the machine: Random backpropagation and the learning channel. arXiv preprint arXiv:1612.02734, 2016. 17. Arild Nøkland. Direct feedback alignment provides learning in deep neural networks. In Advances in Neural Information Processing Systems, pages 1037–1045, 2016. 18. E.O. Neftci, Charles Augustine, Somnath Paul, and Georgios Detorakis. Event-driven random back-propagation: Enabling neuromorphic deep learning machines. Frontiers in Neuroscience, 11, 2017. 19. S. Hochreiter, Y. Bengio, P. Frasconi, and J. Schmidhuber. Gradient flow in recurrent nets: the difficulty of learning long-term dependencies, 2001. 20. G.E. Hinton, S. Osindero, and Y.W. Teh. A fast learning algorithm for deep belief nets. Neural Computation, 18(7):1527–1554, 2006. 21. G.E. Hinton and R.R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, 2006. 22. Yoshua Bengio, Pascal Lamblin, Dan Popovici, and Hugo Larochelle. Greedy layer-wise training of deep networks. In Advances in neural information processing systems, pages 153–160, 2007. 23. Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th international conference on Machine learning, pages 1096–1103. ACM, 2008. 24. D. Erhan, Y. Bengio, A. Courville, P.A. Manzagol, P. Vincent, and S. Bengio. Why does unsupervised pre-training help deep learning? The Journal of Machine Learning Research, 11:625–660, 2010. 25. Honglak Lee, Roger Grosse, Rajesh Ranganath, and Andrew Y. Ng. Convolutional deep belief networks for scalable unsupervised learning of hierarchical representations. In Proceedings of the 26th Annual International Conference on Machine Learning, ICML ’09, pages 609–616, New York, NY, USA, 2009. ACM. 26. Marc’Aurelio Ranzato, F.J. Huang, Y-Lan Boureau, and Yann LeCun. Unsupervised learning of invariant feature hierarchies with applications to object recognition. In Computer Vision and Pattern Recognition, 2007. CVPR’07. IEEE Conference on, pages 1–8. IEEE, 2007. 27. Koray Kavukcuoglu, Marc’Aurelio Ranzato, and Yann LeCun. Fast inference in sparse coding algorithms with applications to object recognition. arXiv preprint arXiv:1010.3467, 2010. 28. J.J. Zhao, Michael Mathieu, Ross Goroshin, and Yann LeCun. Stacked what-where auto-encoders. arXiv preprint arXiv:1506.02351, 2015. 29. Yuting Zhang, Kibok Lee, and Honglak Lee. Augmenting supervised neural networks with unsupervised objectives for large-scale image classification. In International Conference on Machine Learning, pages 612–621, 2016. 30. Marc’Aurelio Ranzato and Martin Szummer. Semi-supervised learning of compact document representations with deep networks. In Proceedings of the 25th international conference on Machine learning, pages 792–799. ACM, 2008. 31. Hugo Larochelle and Yoshua Bengio. Classification using discriminative restricted boltzmann machines. In Proceedings of the 25th international conference on Machine learning, pages 536–543. ACM, 2008. 32. Ian Goodfellow, Mehdi Mirza, Aaron Courville, and Yoshua Bengio. Multi-prediction deep boltzmann machines. In Advances in Neural Information Processing Systems, pages 548–556, 2013. 33. Max Jaderberg, W.M. Czarnecki, Simon Osindero, Oriol Vinyals, Alex Graves, and Koray Kavukcuoglu. Decoupled neural interfaces using synthetic gradients. arXiv preprint arXiv:1608.05343, 2016. 34. W.M. Czarnecki, Grzegorz Świrszcz, Max Jaderberg, Simon Osindero, Oriol Vinyals, and Koray Kavukcuoglu. Understanding synthetic gradients and decoupled neural interfaces. arXiv preprint arXiv:1703.00522, 2017. 35. Vinod Nair and G.E. Hinton. Rectified linear units improve restricted Boltzmann machines. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 807–814, 2010. 36. Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15(1):1929–1958, 2014. 37. Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, pages 448–456, 2015. 38. Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Aistats, volume 9, pages 249–256, 2010. 39. Frédéric Bastien, Pascal Lamblin, Razvan Pascanu, James Bergstra, Ian Goodfellow, Arnaud Bergeron, Nicolas Bouchard, David Warde-Farley, and Yoshua Bengio. Theano: new features and speed improvements. arXiv preprint arXiv:1211.5590, 2012. 40. James Bergstra, Olivier Breuleux, Frédéric Bastien, Pascal Lamblin, Razvan Pascanu, Guillaume Desjardins, Joseph Turian, David Warde-Farley, and Yoshua Bengio. Theano: a CPU and GPU math expression compiler. In Proceedings of the Python for scientific computing conference (SciPy), volume 4, page 3. Austin, TX, 2010. 41. Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 42. Minsoo Rhu, Natalia Gimelshein, Jason Clemons, Arslan Zulfiqar, and S.W. Keckler. vdnn: Virtualized deep neural networks for scalable, memory-efficient neural network design. In Microarchitecture (MICRO), 2016 49th Annual IEEE/ACM International Symposium on, pages 1–13. IEEE, 2016. 43. S. Himavathi, D. Anitha, and A. Muthuramalingam. Feedforward neural network implementation in FPGA using layer multiplexing for effective resource utilization. IEEE Transactions on Neural Networks, 18(3):880–888, 2007. 44. Lukas Cavigelli, David Gschwend, Christoph Mayer, Samuel Willi, Beat Muheim, and Luca Benini. Origami: A convolutional network accelerator. In Proc. 25th Great Lakes Symposium on VLSI, pages 199–204. ACM, 2015. 45. Yu-Hsin Chen, Tushar Krishna, Joel Emer, and Vivienne Sze. Eyeriss: An energy-efficient reconfigurable accelerator for deep convolutional neural networks. In 2016 IEEE International Solid-State Circuits Conference (ISSCC), pages 262–263. IEEE, 2016. 46. Song Han, Xingyu Liu, Huizi Mao, Jing Pu, Ardavan Pedram, Mark A. Horowitz, and William J. Dally. EIE: Efficient inference engine on compressed deep neural network. In Proc. 43rd International Symposium on Computer Architecture, ISCA ’16, pages 243–254. IEEE Press, 2016. 47. Arash Ardakani, François Leduc-Primeau, Naoya Onizawa, Takahiro Hanyu, and W.J. Gross. VLSI implementation of deep neural networks using integral stochastic computing. In Turbo Codes and Iterative Information Processing (ISTC), 2016 9th International Symposium on, pages 216–220. IEEE, 2016. 48. Alessandro Aimar, Hesham Mostafa, Enrico Calabrese, Antonio Rios-Navarro, Ricardo TapiadorMorales, Iulia-Alexandra Lungu, Moritz B. Milde, Federico Corradi, Alejandro Linares-Barranco, Shih-Chii Liu, and Tobi Delbruck. Nullhop: A flexible convolutional neural network accelerator based on sparse representations of feature maps. arXiv preprint arXiv:1706.01406, 2017. 49. N.P. Jouppi, Cliff Young, Nishant Patil, David Patterson, Gaurav Agrawal, Raminder Bajwa, Sarah Bates, Suresh Bhatia, Nan Boden, Al Borchers, et al. In-datacenter performance analysis of a tensor processing unit. arXiv preprint arXiv:1704.04760, 2017. 50. W.A. Wulf and S.A. McKee. Hitting the memory wall: implications of the obvious. ACM SIGARCH computer architecture news, 23(1):20–24, 1995. 51. Thomas Vogelsang. Understanding the energy consumption of dynamic random access memories. In Proceedings of the 2010 43rd Annual IEEE/ACM International Symposium on Microarchitecture, pages 363–374. IEEE Computer Society, 2010. 52. Charles Lefurgy, Karthick Rajamani, Freeman Rawson, Wes Felter, Michael Kistler, and T.W. Keller. Energy management for commercial servers. Computer, 36(12):39–48, 2003. 53. Qianli Liao, J.Z. Leibo, and T.A. Poggio. How important is weight symmetry in backpropagation? In AAAI, pages 1837–1844, 2016. 54. I.J. Goodfellow, David Warde-Farley, Mehdi Mirza, A.C. Courville, and Yoshua Bengio. Maxout networks. In ICML, 28:1319–1327, 2013. 55. Pierre Sermanet, Soumith Chintala, , and Yann LeCun. Convolutional neural networks applied to house numbers digit classification. In Pattern Recognition (ICPR), 2012 21st International Conference on, pages 3288–3291. IEEE, 2012. 56. Kevin Jarrett, Koray Kavukcuoglu, Yann LeCun, et al. What is the best multi-stage architecture for object recognition? In Computer Vision, 2009 IEEE 12th International Conference on, pages 2146–2153. IEEE, 2009. 57. Anna Choromanska, Mikael Henaff, Michael Mathieu, G.B. Arous, and Yann LeCun. The loss surfaces of multilayer networks. In Artificial Intelligence and Statistics, pages 192–204, 2015. 58. D.J. Im, Michael Tao, and Kristin Branson. An empirical analysis of deep network loss surfaces. arXiv preprint arXiv:1612.04010, 2016. 59. Roozbeh Kiani, Hossein Esteky, Koorosh Mirpour, and Keiji Tanaka. Object category structure in response patterns of neuronal population in monkey inferior temporal cortex. Journal of neurophysiology, 97(6):4296–4309, 2007. 60. Natasha Sigala and N.K. Logothetis. Visual categorization shapes feature selectivity in the primate temporal cortex. Nature, 415(6869):318–320, 2002.
9cs.NE
1 Feature-Sharing in Cascade Detection Systems with Multiple Applications arXiv:1705.00596v1 [cs.SY] 1 May 2017 Long N. Le, Student Member, IEEE, and Douglas L. Jones, Fellow, IEEE Abstract—Traditional distributed detection systems are often designed for a single target application. However, with the emergence of the Internet of Things (IoT) paradigm, next-generation systems are expected to be a shared infrastructure for multiple applications. To this end, we propose a modular, cascade design for resource-efficient, multi-task detection systems. Two (classes of) applications are considered in the system, a primary and a secondary one. The primary application has universal features that can be shared with other applications, to reduce the overall feature extraction cost, while the secondary application does not. In this setting, the two applications can collaborate via feature sharing. We provide a method to optimize the operation of the multi-application cascade system based on an accurate resource consumption model. In addition, the inherent uncertainties in feature models are articulated and taken into account. For evaluation, the twin-comparison argument is invoked, and it is shown that, with the optimal feature sharing strategy, a system can achieve 9× resource saving and 1.43× improvement in detection performance. Index Terms—Feature sharing, cascade detection system, multiple applications, resource-aware optimization, Internet of Things. I. I NTRODUCTION Traditional distributed detection systems are often designed for a single target application. However, with the emergence of the Internet of Things (IoT) paradigm, next-generation systems are expected to be a shared infrastructure for multiple applications, and hence require rethinking of the overall system design. To support multiple tasks seamlessly, a detection system needs to be modularly designed, i.e. made up of components that are reusable for various applications with different objectives and constraints. A similar view is shared by the TerraSwarm Research Center [1], whose aim is to create software components that serve as building blocks for IoT application developers. Likewise, Atzori et al. [2] proposed a service-oriented architecture for the IoT, where an ecosystem of services lays the foundation for IoT applications to be built on top. Like many system design problems, resource-efficiency is an important objective in the design of multi-task detection systems [3]. A well-known resource-efficient, modular design is the cascade structure, which consists of a collection of detection modules in tandem. The design has been applied successfully in the single-application context, e.g. face detection [4]. However, we propose that the cascade also has a great L.N. Le and D.L. Jones are with the Department of Electrical and Computer Engineering, University of Illinois at Urbana-Champaign, Illinois, IL, 61801 USA. D.L. Jones is currently Director of the Advanced Digital Sciences Center. Fig. 1: The cascade detection system with 2 applications (indexed by superscripts) and K stages/layers (indexed by subscripts). For stage i of application j, Fij denotes the feature extractor and δij denotes the binary decision of a detector. The feature itself is denoted by Yij . X j is the (detection) target state, and Xˆj is the prediction about X j by a detector. potential in the multiple-application context. Namely, thanks to its modular design, modules in the cascade could be shared between applications. In addition, the output of a module can be used to dynamically guide/control the execution of others in the system, providing necessary degrees of freedom to optimize the trade-off between system resource consumption and detection performance. In this paper, we specifically study the multi-application cascade detection system whose model is shown in Fig. 1. It is assumed that there are two applications and K layers in the system. The system is illustrated in Fig. 1, where the superscripts are used to index applications, and the subscripts are used to index stages. Each layer of the cascade is occupied by detection modules/detectors from both applications. Ignoring the application index (superscript) for now, a detector at stage i consists of a feature extractor Fi , which produces the feature Yi , and a decision rule δi , which takes Yi and all previous features Y1 , . . . , Yi−1 as input. δi outputs different values depending on both the application and the stage (see Eq. (1) and (2)). X is the state of the (detection) target, which takes value 1 when the target is present, and 0 otherwise. Finally, X̂ denotes the prediction of X by the detector. Of the two applications, we let one be the primary and the other be the secondary, denoted by superscript indices 1 and 2 in Fig. 1, respectively. The primary application is the one whose feature extractors produce universal features that are sharable. In contrast, features produced by the secondary application are not universal and hence assumed to produce no value in sharing. This distinction is illustrated in Fig. 1, where 2 primary features Yi1 , i = 1, . . . , K can be shared with the secondary application, but secondary features Yi2 , i = 1, . . . , K can only be used by the secondary application. Examples of universal features for audio applications are signal energy, the Mel-frequency cepstrum coefficient (MFCC) [5] and time-varying sinusoidal features [6], which have been used extensively in various audio/speech inference applications. Examples of secondary features are internal representation in neural networks, such as that of autoencoders. It is worth noting that the definition of primary and secondary applications here has no relevance to the practical importance of each, and the two-application assumption is meant for simplicity, without loss of generality. In fact, our result can be easily generalized to an arbitrary number of applications in each class (primary,secondary). The decisions of the primary application δi1 can take on the following values depending on the layer/stage. ( 0 : stop and declare X̂ 1 = 0 (negative) 1 δi = F 1 : use the primary feature next i = 1, . . . , K − 1 ( 0 : declare X̂ 1 = 0 (negative) 1 δK = 1 : declare X̂ 1 = 1 (positive) (1) Note that only negative decisions, i.e. X̂ = 0, are allowed at intermediate stages (i = 1, . . . , K − 1) since the goal is not to make the final decision (which is reserved for the last stage with the best performance) but to screen out early negative instances, which is more likely in a rare-target setting. Since the secondary application has access to both primary and secondary features, its decisions δi2 at intermediate stages has more options and are given as follows. ( F 1 : use the primary feature next 2 δ0 = F 2 : use the secondary feature next  2  0 : stop and declare X̂ = 0 (negative) δi2 = F 1 : use the primary feature next  (2)  2 F : use the secondary feature next i = 1, . . . , K − 1 ( 0 : declare X̂ 2 = 0 (negative) 2 δK = 1 : declare X̂ 2 = 1 (positive) Namely, intermediate decisions include feature selection and (early) negative decision making. Note that δ02 is the decision occurs before any features are observed, and thus restricted from making early negative decisions. The cascade structure has been studied before in the literature. For instance, the seminal work by Viola and Jones [4] showed empirically that such a design is very effective in detecting rare targets in a large dataset, and was also proposed as a resource-efficient approach for stream mining by Turaga et al. in [7]. However, existing works either 1) offer solutions that have limitations, to be articulated in Section II, or 2) focus on a single application. Our study here involves the cascade structure with multiple applications, investigates the potential of sharing features between them, and offers a solution that does not have limitations of prior works. For instance, our resource-consumption model is more accurate than existing works, which often suffers from a ‘nebulous’ resource-consumption model that is inapplicable in practice. Furthermore, it is observed that there are inherent uncertainties in some features of the cascade, and an approach is proposed to address them. Beside optimizing parameters of the cascade, we also show that, under mild conditions, the cascade design itself is optimal. That is, adding additional degrees of freedom such as early positive decisions to the cascade structure does not improve its performance. The rest of the paper is organized as follows. Section II reviews prior works that studied the cascade structure, along with their limitations. Section III-A discusses feature models and their potential uncertainties, then Section III-B presents our formulation and solution for the multi-application cascade system. A system simulation and final remarks are given in Sections IV and V, respectively. II. P RIOR WORKS It is worthwhile to note that the cascade detection system of interest here is different from the serial detector network in the distributed detection literature [8]–[10], in which the decision of a current module is treated as an extra observation, instead of as a control signal to censor subsequent modules and conserve resources. The cascade architecture is prevalent in many inference applications, with the most widely-known example being the seminal work in face detection by Viola and Jones [4]. In [4], the system of cascaded detection modules is used to quickly discard many negative sub-images typically observed in face-detection applications, thus significantly speeding up the detection process. However, the cascade is not optimized in [4], leaving the optimal classifiers’ parameters, both thresholds and weights, to be desired. To this end, Luo [11] proposed to optimize thresholds of each detection module in a cascade using the classical Neyman-Pearson criterion, without consideration of resource cost. Under the assumption of statistical independence between detection modules, a gradient-based algorithm is proposed to search for the locally optimal thresholds, which is also a limitation of [11]. In contrast, our approach guarantees a globally optimal, resource-aware solution and does not assume independence between stages. Later, Jun and Jones [12] incorporated an energy resource constraint in the Neyman-Pearson-based optimization over thresholds of a two-stage cascade. In this setting, three solution types were identified: one that utilizes all of the available energy and false-alarm rate, one that utilizes all the energy while slacking the false-alarm constraint, and one that utilizes all the false alarm while slacking the energy constraint. An algorithm to find the optimal thresholds is only available if the true solution is of the first type. Later, it is proven in [13] that, if observations of the first stage are reused in the second stage, then the first-type solution is optimal. In contrast, our approach generalizes to an arbitrary number of stages. Chen et al. [14] designed a surveillance system using a two-stage cascade of low-end (acoustic and infrared) and 3 high-quality (camera) sensors. The system in [14] can find a triggering threshold that either minimizes the detection error, or satisfies a constraint on the CPU utilization for video processing, but not both, and a heuristic was used to combine the two solutions, i.e. use the threshold that minimizes the detection error if it also satisfies the utilization constraint, otherwise use the one that satisfies the constraint. Unlike the ad-hoc approach of [14], our solution is derived from a welldefined framework. It is worth noting that Cohen et al. [15] also studied a similar problem in which a multi-modal sensing system (with a PIR sensor and a camera) was designed for monitoring vehicles. While the treatment in [15] is principled (based on the partially-observable Markov decision process (POMDP) framework), the sensors are not operated in cascade, but instead are equally plausible options at each time step, and hence is different from our work. Since the optimization of the cascade is hard, Raykar et al. [16] relaxed the problem by assuming classifiers in the cascade produce soft/probabilistic outputs instead of hard decisions, and converted the joint optimization of classifiers’ linear weights into a maximum a posteriori problem. Feature costs are also incorporated into the optimization using the standard Lagrangian argument, and a gradient-based algorithm is used to find the optimal weights. However, the thresholds must be found using an exhaustive grid search, which is computationally intensive for cascades with many classifiers. Our solution does not suffer this drawback. Chen et al. [17] proposed a cyclic optimization algorithm to optimize the linear weights of the classifiers in the cascade, along with their early-exit thresholds. That is, at each iteration, the algorithm cycles through all classifiers in the cascade, optimizing each one while leaving others untouched. The algorithm stops when the loss function no longer improves. A disadvantage of such optimization procedure is that it requires multiple passes through the cascade, and there is no theoretical bound on the number of iterations it will take. In contrast, our solution requires only a single pass through the cascade. In stream mining, Turaga et al. [7] employed a cascade of Gaussian mixture model (GMM)-based classifiers and formulated a problem to find both the number of mixture components and the threshold in each classifier that maximize the system detection rate subject to constraints on false alarm, memory and CPU. The solution in [7] takes a person-by-person approach where it iterates between 1) finding optimal numbers of mixture components, i.e. resource allocation, for all classifiers given thresholds, and 2) finding optimal thresholds for a given resource allocation. However, this approach failed to capture the direct dependence of the cascade’s resource consumption on its thresholds, and is inherently suboptimal. A limitation of the above works is that they only considered open-loop solutions where the thresholds are independent variables to be optimized. Ertin [18] considered closed-loop solutions for the two-stage cascade detection problem where the optimal decision rule at each stage, which is observationdependent, is sought. It was shown that the optimal policies are still likelihood ratio tests, but with coupling thresholds, i.e. the threshold at a stage depends on the receiver operating characteristic (ROC) and the threshold of the other stage. Namely, the optimal thresholds can not be found using the solution technique employed by [18]. Note that, unlike classical detection problems, optimizing thresholds in a cascade is critical in the trade-off between inference performance and resource cost. A contribution of this paper is finding the optimal parameters (both test-statistics and thresholds) for general cascade detection systems. Trapeznikov et al. studied a generalization of the cascade that was termed multi-stage sequential reject classifier (MSRC), which is simply the cascade with an additional positive decision [19] or multiple additional (classification) decisions [20] at intermediate stages. Their resource-consumption model is ‘nebulous’, i.e. if the decision at an intermediate stage is to defer to the next stage, an abstract, independent ”penalty” is incurred. In contrast, in our resource model, these penalties are shown to be precisely the Lagrangian-weighted of the feature extraction costs, and hence they are coupled (see Eq. (31)). On the other hand, a resource-consumption model closely relates to ours was considered by Wang et al. in [21]. The minor difference is that, instead of being proposed, our model was derived from first principle. However, [21] formulated the problem using the empirical risk minimization framework since it was assumed that probabilistic models of highdimensional features cannot be estimated. We take a different approach where it is assumed that probabilistic models of features can be estimated, by first reducing the features’ dimensionality. In other words, the input into our algorithm are (probabilistic) models, not a dataset as in [21]. In addition, the solution proposed in [21] is a convex linear-program, which requires a convex relaxation (with an upper-bounding convex surrogate function) of the true objective function. In contrast, our solution is a dynamic program and requires no relaxation. III. O PTIMIZING THE MULTIPLE - APPLICATION CASCADE SYSTEM A. Feature models The discussion in this section is applicable to both applications, and hence the application indices (superscripts) are dropped. For the rest of the document, the colon notation is used to denote a collection, e.g. y1:i , {y1 , . . . , yi−1 , yi } (3) Recall that Yi denotes the feature used by the detector at stage i, and is modeled as a random variable whose distribution depends on the latent target X ∈ {0, 1}, i.e. Yi ∼ pi (yi |x), x ∈ {0, 1}, i = 1, . . . , K (4) where lower-case letters denote realizations of the corresponding random variable in upper case and p denotes a probability mass/density function. It is assumed that these distributions are stationary and hence can be estimated during training. To handle the non-stationarity case, a straightforward, yet naive method, is to perform periodic retraining. More sophisticated methods can be investigated in future work. 4 Using Bayes’ rule, the posterior probability of target presence is given by π1 (y1 ) = πi (y1:i ) = 1 1+ 1−π0 l1 (y1 )π0 1 1+ (5) B. System model and optimization Optimizing the cascade system amounts to finding optimal 1:2 decision rules δ1:K that jointly minimize the proposed system’s Bayes risk RB of incorrect decisions subject to an expected system resource (e.g. energy) constraint e. 1−πi−1 (y1:i−1 ) li (yi )πi−1 (y1:i−1 ) 1:2 min RB (δ1:K ), 1:2 i = 2, . . . , K δ1:K where li (yi ) , pi (yi |1)/pi (yi |0) and πi (y1:i ) , P(X = 1|y1:i ) are the likelihood function and posterior probability at stage i, respectively. π0 , P(X = 1) is the prior probability of the target presence. Finally, the evidence probability is given by pi (yi |y1:i−1 ) = pi (yi |1)πi−1 + pi (yi |0)(1 − πi−1 ) (6) An important aspect of the cascade detection system is that, except for the last stage, the main goal of other stages is to quickly screen out negative instances, and not to make the final decision. Therefore features used at stages other than the last one are suboptimal for the detection task by design, to keep the cost of their execution low. For instance, the all-band energy feature can neither characterize a bandpass target precisely, nor distinguish between a bandpass target and another bandpass interference, but can still be useful in the cascade thanks to its low cost [22]. The sub-optimality of these early-stage features, either due to 1) the failure to discriminate the target against potential interferences, or 2) the insufficient modeling of the target, can all be modeled as uncertainty in feature models. To this end, we employ the following least-favorable feature density models, developed by Huber in the context of robust detection [23], [24, Chapter 10], [25, Chapter 6], in place of the nominal ones.  1−0i 0 0   v0 +w0 lLi [v pi (y|0) + w pi (y|1)], li (y) < lLi pi (y|0) ← (1 − 0i )pi (y|0), lLi ≤ li (y) ≤ lU i   1−0i [w00 pi (y|0) + v 00 pi (y|1)], li (y) > lU i 00 +v 00 l Ui w (1−1i )lLi 0 0   v0 +w0 lLi [v pi (y|0) + w pi (y|1)], li (y) < lLi pi (y|1) ← (1 − 1i )pi (y|1), lLi ≤ li (y) ≤ lU i   (1−1i )lU i 00 00 w00 +v 00 lU i [w pi (y|0) + v pi (y|1)], li (y) > lU i i = 1, . . . , K − 1 (7) where the ‘←’ symbol is the assignment operator and 1i + ν1i 00 0i + ν0i v0 = ,v = 1 − 1i 1 − 0i ν1i ν0i 0 00 ,w = w = 1 − 0i 1 − 1i (8) and 0 ≤ 0i , 1i , ν0i , ν1i ≤ 1 are uncertainty parameters of stage i. lLi and lU i are the lower and upper bounds of the likelihood ratio at stage i, respectively, and can be found by solving the equations outlined in [25, Chapter 6]. Note that since the new least-favorable densities result in a bounded likelihood function, the corresponding posterior probability is also bounded. 1 1 πLi , (9) 1−πi−1 ≤ πi (y1:i ) ≤ πU i , 1−πi−1 1 + lLi πi−1 1 + lU i πi−1 s.t. 2 X j j RB (δ1:K ) j=1 1:2 E(δ1:K ) 2 X , E (10) j j (δ1:K ) ≤e j=1 where E is the expected system resource consumption. It is assumed that the total Bayes risk and expected resource consumption of the system is the sum from those of the indij vidual application, i.e. RB and E j , j = 1, 2. The Lagrangian technique can be used to convert the constrained optimization problem (10) into the following unconstrained, but regularized, one 1:2 min R(δ1:K ), 1:2 δ1:K 2 X j Rj (δ1:K ) j=1 , 2 X j (λE + j RK,A + j=1 K X (11) j Ri,M ) i=1 where the parameter λ, which depends on the resource constraint e, couples the resource consumptions of all stages together and R denotes the system risk (with Rj denotes the risk of application j), which is a measure of the combined detection performance and resource consumption. The Bayes j risk RB has been broken down into multiple terms. For applij cation j, Ri,M , i = 1, . . . , K − 1 are the miss (false negative) risks due to early negative decisions at intermediate stages. j j RK,M , RK,A are the miss and false-alarm (false positive) risks due to incorrect decisions at the last stage. Note that the system has no false-alarm risk at intermediate stages, since the cascade structure does not allow early positive decisions to be made. Such a constraint is useful to reduce the false positive decision rate especially under model uncertainty and the target is rare. For application j, the expected resource consumption at stage i is the resource cost of feature extraction, denoted by Dij , weighted by the probability of the feature being selected by the previous stage. Hence, E 1 , D11 + K−1 X 1 Di+1 P(δi1 = F 1 ) i=1 2 E , K−1 X 2 Di+1 P(δi2 (12) 2 =F ) i=0 where D11 is weighted by 1 because the first-stage primary feature is always extracted. Note that Dij can be measured in practice by profiling the feature-extraction process. The solution to Problem (11) is given by the following theorem. 5 Theorem 1. (The optimal decision rules for all applications in the cascade) For the primary application, ( 1 0, πi1 (y1:i ) < τi1∗ 1∗ 1 δi (πi ) = F 1 , else i = 1, . . . , K − 1 ( 1 1 1∗ 0, πK (y1:K ) < τK 1∗ 1 δK (πK ) = 1, else (13) Finally, the optimal threshold values {τij∗ , j = 1, 2}, which are critical in this trade-off between performance and resource cost, can be found using Algorithm 1. Given the above optimal decisions, Corollary 1 quantifies the optimal performance of the multi-application cascade system. Corollary 1. (Optimal performance of applications in the cascade) For the primary application, 1∗ R1∗ (π01 ) , R1 (δ1:K , π01 ) = V01 (π01 ) For the secondary application, δ02∗ (π02 ; π01 ) = F 1 , ∀π02 , ∀π01  2 2 2∗ 1 1∗  0, πi (y1:i ) < τi , πi < τi  F 2 , π 2 (y 2 ) ≥ τ 2∗ , π 1 < τ 1∗ i 1:i i i i δi2∗ (πi2 ; πi1 ) = 1∗ 1 2∗ 2 0, πi2 (y1:i ≥ τ , π ) < η  i i i   1 2 2 F , πi (y1:i ) ≥ ηi2∗ , πi1 ≥ τi1∗ where V01 (π01 ) is the result of the following recursion 1 1 1 VK1 (πK ) , min(CM π , C 1 (1 − π 1 )), π 1 ∈ [0, 1] | {z K} | A {z K } K miss risk (14) i = 1, . . . , K − 1 ( 2 2 2∗ 0, πK (y1:K ) < τK 2∗ 2 δK (πK ) = 1, else j j where τij∗ , ηij∗ ∈ [πLi , πU i ] are the optimal thresholds at stage i of application j, provided that  2 CM E[πi2 (Yi1 )] − E[πi2 (Yi2 )] ≤ λDi2 , i = 1, . . . , K (15) 2 defined in Corollary 1. with CM Proof. See Appendix A Eq. (13) in Theorem 1 shows that, for the primary application, the posterior probabilities of intermediate stages can be used to guide the execution of subsequent stages by thresholding them to decide whether to stop or extract more primary features in the next stage. The final stage has a standard detection rule, with the posterior probability being thresholded to make a prediction about the target state. Furthermore, Eq. (14) shows that the decision rules at intermediate stages of the secondary application are not only a function of πi2 , but are also parameterized1 by πi1 . If πi1 ≥ τi1∗ , then according to (13), the next-stage primary feature is available, and the optimal decision always selects this feature over the secondary feature (feature sharing) for the next stage (as long as πi2 is above the threshold for early negative decision ηi2∗ ). Since the first-stage primary feature is always available, it is always selected by δ02∗ . Otherwise, if the primary feature will not be available because πi1 < τi1∗ , then the secondary application falls back to selecting the secondary feature, assuming πi2 is above the threshold for early negative decision τi2∗ . Note that the thresholds for early negative decisions are different under each case. Finally, the final stage’s decision is simply a standard detection rule. The structure of (14) favors feature-sharing whenever possible. This policy is optimal provided that additional constraints in (15) on the parameters of the cascade hold. Intuitively, (15) requires that the difference between primary and secondary feature distributions is relatively small compared to the resource cost of extracting the latter. 1 After the semicolon (16) Vi1 (πi1 ) , false-alarm risk 1 1 1 1 1 1 min(CM πi , λDi+1 + E[Vi+1 (πi+1 (Yi+1 , πi1 ))]), | {z expected next-stage primary value function } 1 1 πi1 ∈ [πLi , πU i ], i = 1, . . . , K − 1 V01 (π01 ) , λD11 + E[V11 (π11 (Y11 , π01 ))] (17) And the corresponding optimal thresholds are given by 1∗ 1 1 1 τK = CA /(CA + CM ) 1 1 1 1 1 1 1 τi1∗ = max(πLi , min(πU i , min{πi : Vi (πi ) − CM πi < 0})), i = 1, . . . , K − 1 (18) For the secondary application, 2∗ R2∗ (π02 ; π01 ) , R2 (δ1:K , π02 ; π01 ) = V02 (π02 ; π01 ) (19) where V02 (π02 ; π01 ) is the result of the following recursion 2 2 2 2 2 2 VK2 (πK ) , min(CM πK , CA (1 − πK )), πK ∈ [0, 1]  2 2  min(CM πi ,    2 2 2 2   λDi+1 + E[Vi+1 (πi+1 (Yi+1 , πi2 ); πi1 )]),   | {z }    expected next-stage secondary value function    using the secondary feature    if π 1 < τ 1∗ i i 2 2 1 Vi (πi ; πi ) , 2 2  min(C π ,  M i   2 2 1 2 1   E[V i+1 (πi+1 (Yi+1 , πi ); πi )] ),   | {z }    expected next-stage secondary value function    using the shared primary feature    else 2 2 πi2 ∈ [πLi , πU i ], i = 1, . . . , K − 1 V02 (π02 ; π01 ) , E[V12 (π12 (Y11 , π02 ); π01 ))] (20) and the corresponding optimal thresholds are given by 2∗ 2 2 2 τK =CA /(CA + CM ) 2 2 τi2∗ = max(πLi , min(πU i, 2 2 min{πi2 : Vi2 (πi2 ; πi1 ) − CM πi < 0})), if πi1 < τi1∗ 2 2 ηi2∗ = max(πLi , min(πU i, 2 2 min{πi2 : Vi2 (πi2 ; πi1 ) − CM πi < 0})), else , i = 1, . . . , K − 1, (21) 6 j j where CM , CA , j = 1, 2 are the costs associated with miss and false-alarm decisions of application j. Corollary 1 shows that the optimal performance achieved by each application can be found using a recursive procedure. The procedure has K iterations, each corresponding to a stage in the system. Starting from the last stage K and proceeding backward to 0, the value function Vij is recursively updated (see (17) and (20)). The last-stage value function VKj is the minimum of the miss and false-alarm risks across πK . An intermediate-stage value function Vij , i = 1, . . . , K − 1 is the minimum of the miss risk and the expected next-stage value function, which requires the probabilistic updates in (5),(6). The final value function V0j is the minimal risk achievable by an application. Note that the secondary application’s value function at an intermediate stage is given by different expressions depending on the availability of the primary feature for the next stage, i.e. πi1 ≶ τi1∗ (see (20)). If the primary feature is not available for the next stage, then the expected next-stage value function is taken with respect to the secondary feature, whose extraction 2 cost (λDi+1 ) is also included. Otherwise, the expected nextstage value function does not contain the resource cost to extract the secondary feature and the expectation is taken with respect to the primary feature. Once a value function is known, then the corresponding optimal threshold can be found using just arithmetic operations, i.e. comparing the value function with the miss risk (see (18) and (21)). For the last stage K, the optimal threshold can be given in closed form. Note that the intermediate stages’ thresholds are capped between the upper and lower bounds due to model uncertainty (see Section III-A). For the secondary application, depending on the availability of the primary feature, the thresholds for early negative decisions are different, and hence denoted differently (τi2 and ηi2 , respectively). Intuitively, if the primary threshold is low, i.e. the primary application consumes most of the resource budget, then the secondary application is more inclined to use the shared primary feature due to low resource budget. On the other hand, if the primary threshold is high, i.e. the secondary application has most of the resource budget, then the secondary feature is used more to reduce its miss and false-alarm risks. The discussion so far has been focusing on optimizing parameters of the cascade design. A natural next question to ask is whether the constraints of the cascade design can be relaxed to further improve performance. Namely, would introducing additional degrees of freedom, i.e. early positive decisions in intermediate stages, to the cascade always improve its performance? Intuitively, when model uncertainties of intermediate stages are accounted for (see Section III-A), and it is known a priori that the target is rare, early positive decisions are likely to have higher risk and hence are discouraged. Therefore, introducing additional early positive decisions does not always improve the performance of the cascade. The precise conditions for which the cascade design itself is optimal is given by the following proposition. Proposition 1. (Optimality of the cascade design) With model uncertainty, introducing additional early positive decisions in intermediate stages of the cascade does not improve performance, as long as j j max{πij : Vij (πij ) − CA (1 − πij ) < 0} > πU i, {z } | optimal threshold for early positive decision (22) i = 1, . . . , K − 1, j = 1, 2 Proof. See Appendix B. The left-hand side of (22) is the optimal threshold corresponding to an early positive decision. Namely, these additional decisions also have threshold-based optimal policies (see Appendix B), and a posterior probability above such a threshold shall trigger an early positive decision. If such a threshold is above the upper bound on the posterior probability at a stage, then its early positive decision is never selected, and hence does not affect the performance of the cascade. IV. S YSTEM SIMULATION This section applies the theory developed in Section III to design a multi-application, acoustic detection system. A. Hardware components The hardware components needed for an acoustic sensing system are listed in Table I, along with their power consumption (from the datasheets). Note that these are commerciallyoff-the-shelf (COTS) components, without any customization. The sensor’s brain (supplied at 3.6 V) is Silicon Labs’s WGM110, which is a low-power wireless (wifi) chip that includes a low-power 12-bit ADC, an ARM Cortex-M3 processor, and a wifi module (among others). All the control logic and the (digital) signal processing software are assumed to be implemented on this general-purposed processor, without any ASIC2 or DSP3 . In addition, a microphone and a preamp are also a part of the acoustic sensor. The power consumption of the microphone, the preamp circuit, and the ADC, altogether is 3.6 mW and considered as the baseline of the system. Data collected by the sensor are transmitted downstream to the client, which is a ML100G-10 Next Unit of Computing (NUC) from LogicSupply. Power profiling the NUC (using PowerBlade [26]) results in an average power consumption of 4.744 W (at 9 V). TABLE I: Power consumption of hardware components of the acoustic sensing system. Components Electret Microphone Preamp Circuit (OPA344) WGM110 12-bit ADC WGM110 ARM core WGM110 transmission ML100G-10 2 application-specific Power consumption (mW) 0.72 1.08 1.8a 86.4 900 4744 integrated circuit signal processor a From [22], the ADC draws 0.5 mA, which is equivalent to 1.8 mW at 3.6 3 digital V. 7 Fig. 2: Spectrogram of a sample GCW’s (type-A) call. B. Software components 1) Primary application (Golden-Cheeked Warbler detection): The detection of the Golden-cheeked Warbler (GCW)’s (type-A) calls [27] is considered as the primary application. Namely, X 1 = 1 indicates the presence of a GCW call, and X 1 = 0 otherwise. Since the GCW is an endangered bird species, this application has important implications for their conservation. The application’s software is organized into three subtasks: generic energy-based analysis, spectral-based analysis, and temporal-spectral-based analysis. The energy analysis is a lowcomplexity computation that produces energy-based features useful for detecting acoustic events from silence. The spectralbased analysis takes into account the spectral information about the GCW calls, which only has energy in the 4500-6500 Hz and 7000-8000 Hz bands (see Fig. 2), to produce bandspecific, energy-based features using standard DSP filtering techniques. Finally, the spectral-temporal-based analysis takes into account both the spectral and temporal structure of the GCW call from Fig. 2 to produce reliable, indicative features using a template matching technique. Note that the input into the above analyses is an audio stream (or precisely, its high-dimensional time-frequency representation, see Fig. 2), and their output is a scalar score sequence, i.e. a score for each audio frame. Hence, these analyses effectively perform dimensionality reduction. Since the generic energy analysis has low computational complexity and can help prune out a significant amount of noise-only data from the audio stream early, it is executed on edge/sensor nodes. Only acoustic events are transmitted downstream to clients, where spectral and temporal-spectralbased analyses are further carried out. The system diagram is illustrated in Figure 3 and arranged to fit the proposed cascade abstraction. Note that the physical separation (between sensors and clients) does not necessarily correspond to the logical separation (between stages). For instance, the cost of data transmission on sensors are included into the cost of executing the second stage, along with the cost of spectral- Fig. 3: The software components of the primary application is organized as a cascade with 3 stages: energy analysis as stage 1, spectral-based analysis (along with the data transmission) as stage 2, and temporal-spectral analysis as stage 3. Note that components of the cascade are implemented distributedly across the network, with the dashed line representing a remote connection. based analysis on clients, since they are both a result of the first-stage decision. The resource cost parameters at each stage Di1 , i = 1, 2, 3, which can be estimated from values of Table I and the execution times of the software components, are needed to optimize the resource-performance trade-off. It is assumed that all processing finishes before a periodic deadline, i.e. when buffers (an ADC buffer on the sensor, a task buffer on the client) are full. The average execution time of each task (per audio frame of 32 ms) can be estimated/profiled and is given as follows. The energy analysis takes 16 ms4 . The average transmission time takes 11 ms (500 ms for a 1.5 s event5 ). Finally, the spectral and temporal-spectral analyses take 0.37 µs and 15 ms, respectively6 . Hence, D11 = 86.4 × 0.016, D21 = 900 × 0.011 + 4744 × 0.37 × 10−6 , (23) D31 = 4744 × 0.015, Our dataset is a 46-minute, 24 kHz audio recording at the field in Rancho Diana, San Antonio’s city park. The dataset contains 206 GCW calls (manually identified and labeled), each of whose duration is approximately one second. In addition to GCW calls, the dataset also contains various interferences from other animals’ vocalization, time-varying wind noise, etc., since it is taken directly from field recording. Precisely, the fraction of GCW calls in the entire dataset is 10.19%. Hence, this detection problem belongs to the raretarget class, where the prior is asymmetrical, i.e. π01  0.5. In this simulation, we consider a range of prior in the rare-event regime, i.e. π01 ∈ [0.05, 0.20]. Finally, the miss and false-alarm 4 Estimated as half of the frame length. on a prototype. 6 Profiled in MatLab for ML100G-10. 5 Profiled 8 such as the resource cost and the feature models at each stage, of the secondary application is the same as those of the primary one. Due to the asymmetry in feature sharing between the primary and secondary applications, it is expected that there will be differences in the resulting resource consumption and detection performance of the two applications, and the merit of the proposed feature sharing approach can be evaluated by quantifying this difference. C. Results Fig. 4: Receiver operating characteristic (ROC) curves and precision-recall (PR) curves of the features produced by the 3 analyses. 1 1 costs are given by CM = 2, CA = 1 to emphasize that the miss risk is higher in this setting. The dataset are input to each of the three analyses discussed above. The scalar output scores from each analysis are taken as its respective features, resulting in a total of three feature sets/groups/types. The discriminative power of each feature type, or equivalently the performance of an analysis, can be quantified using receiver operating characteristic (ROC) and precision-recall (PR) curves as shown in Fig. 4. From the figure, it is evident that the temporal-spectral feature is better than the spectral feature, which in turn is better than the generic energy feature, at detecting GCW calls. The conditional probability mass functions (PMF), i.e. pi (yi |x), of features from each analysis can be estimated up to some quantization level, i.e. 100. Furthermore, as alluded to in Section III-A, energy-based and spectral-based features, by construction, are inadequate to characterize GCW calls, and hence there are inherent uncertainties in these features for the detection of GCW calls. These uncertainties can be explicitly accounted for in the features’ distributions using the uncertainty model discussed in Section III-A, with the following parameters. 101 = 102 = 0.1 111 = 112 = 0.1 1 1 ν01 = ν02 = 0.1 (24) 1 1 ν11 = ν12 = 0.1 Intuitively, the  and the ν parameters indicate the level and the strength of a contamination on the nominal distribution, respectively. A formal method to set these parameters are left for future work. Finally, it is assumed that the temporalspectral analysis (the last stage) is sufficient to characterize GCW calls and hence there is no uncertainty in this feature set. 2) Secondary application: To illustrate the benefit of feature sharing, we invoke the following twin-comparison argument. We consider a hypothetical secondary application that is, as far as the resource-performance trade-off is concerned, identical to the primary application. Namely, all parameters, The method developed in Section III can be used to optimize the acoustic system and the results are presented below. Fig. 5 breaks down the primary application’s risk into the weighted resource consumption, and the miss and false-alarm rates to provide an intuitive understanding of the optimal policies. Furthermore, the average resource consumption of the primary application across all priors is 44.406 mJ (per audio frame). Without feature sharing, it is expected that the resource consumption of the secondary application would be the same as that of the primary one. However, the average resource consumption of the secondary application across the priors of interest can be found to be 4.877 mJ (based on the break-down of the secondary risk illustrated in Fig. 6), which is approximately a 9× reduction in resource consumption. This significant resource-saving is due to the fact that extracted features are shared and not recomputed among applications. In addition, the average detection risk (both the miss and false-alarm rate) of the secondary application is also reduced by 1.43× (from 4.75% to 3.31%). This reduction in risk illustrates that using shared features can be more beneficial than having no feature at all. It is worth noting that the above applications’ resource consumptions are the result of setting the regularization parameter λ to 0.0043, which is optimal for a resource/energy budget of 49.398 mJ (the sum of power consumptions by both applications and the 3.6 × 0.032 mJ base line from the microphone, the preamp circuit, and the ADC of the sensor over a frame). For a given resource budget, one needs to be solved for λ. Numerical solution of the scalar variable λ is straightforward and hence shall be skipped here. The primary and secondary decision rules are illustrated in Fig. 7 and 8, respectively. Note that the optimal policies of the secondary application take advantage of feature sharing whenever possible. Namely, δi2∗ = F 1 for all πi2 and πi1 ≥ τi1∗ , i = 0, 1, 2. When the primary feature is not available, the secondary policies choose between extracting the secondary feature (δi2∗ = F 2 ) or making an early negative decision (δi2∗ = 0). V. C ONCLUSION This paper investigates and shows the benefits of features sharing in the optimization of resource-performance trade-off for detection systems with multiple applications. The proposed system model focuses on the vertical design, rather than the horizontal one commonly seen in the wireless sensor network literature. Namely, it is assumed that there is only one device at each layer/stage in the system stack, as opposed 9 Fig. 5: Breakdown of the optimal primary risk into components (see Eq. (11)): false negative (miss), false positive (falsealarm), and Lagrangian-weighted resource consumption. Low false-alarm rate is achieved across the priors of interest. The miss rate tends to increase with the prior. At a certain level, the primary application must ramp up its resource consumption or incur more false-alarm to reduce the miss rate. Fig. 7: Optimal decision rules of the primary application δi1∗ (πi1 ) ∈ {F 1 , 0, 1}, i = 1, . . . , 3. Fig. 8: Optimal decision rules of the secondary application δi2∗ (πi1:2 ) ∈ {F 1 , F 2 , 0, 1}, i = 0, . . . , 3. of the acoustic system in Section IV (with the sensor as an Android app) is available online for demonstration7 . Fig. 6: Breakdown of the optimal secondary risk into components (see Eq. (11)): Detection risk and Lagrangian-weighted resource consumption. The detection risk tends to increase with the secondary prior. At a certain level, the secondary application must ramp up its resource consumption to reduce the risk. to having multiple devices at the same layer. Therefore, this work can complement prior works and vice versa. For instance, Chamberland et al. showed that it is asymptotically optimal for all sensors in a power-constrained sensor network to adopt the same (transmission) strategy, as the number of sensors in the network goes to infinity [28]. The result in [28] therefore allows ours to be applicable for layers with more than one device. Finally, a proof-of-concept implementation ACKNOWLEDGEMENTS This work was supported in part by TerraSwarm, one of six centers of STARnet, a Semiconductor Research Corporation program sponsored by MARCO and DARPA, and in part by a research grant for the Human-Centered Cyberphysical Systems Programme at the Advanced Digital Sciences Center from Singapore’s Agency for Science, Technology and Research (A*STAR) A PPENDIX A. Proof of Theorem 1 We start by expanding the risk terms in (11). The false negative (miss) rate due to early negative decision for the first 7 At http://acoustic.ifp.illinois.edu 10 stage is Similarly for the secondary application 1 R1,M = 2 R1,M Z Z =  1 1 1 p(dy11 ) CM π1 (y1 )I(δ11 = 0) p(dy11:2 )  2 2 1 CM π1 (y1 )I(δ12 2 2 2 CM π1 (y1 )I(δ12 = 0, δ02 = 0, δ02 = F )+ (25) 2 Di+1 P(δi2 =F )= 2 Di+1 n K−1 X 2 2 P(δj2 = 0, δj−1 = F 2 )+ j=i+1 o 2 2 2 2 P(δK = 0, δK−1 = F 2 ) + P(δK = 1, δK−1 = F 2) , 1 =F ) 1 2 where R1,M , R1,M are the first-stage miss risk of the primary and secondary applications, respectively. Furthermore, the first 2 term of R1,M is due to using the secondary feature y12 (δ02 = F 2 ), and the second term is due to using the shared (primary) feature y11 (δ02 = F 1 ). I() denotes the indicator function that takes value 1 when its argument (a probability event) is true and 0 otherwise. Finally, p(dy1:K ) is the probability measure of feature realizations y1:K . Likewise, the miss terms for the stage i = 2, . . . , K can be given as follows. Z n o 1 1 1 1 1 1 Ri,M = p(dy1:i ) CM πi (y1:i )I(δi1 = 0, δi−1 = F 1) Z n 2 1:2 2 2 1:2 2 Ri,M = p(dy1:i ) CM πi (y1:i−1 , yi2 )I(δi2 = 0, δi−1 = F 2 )+ o 2 2 1:2 1 2 CM πi (y1:i−1 , yi1 )I(δi2 = 0, δi−1 = F 1 , δi−1 = F 1) (26) 2 is again due to using the where the first term of Ri,M 2 secondary feature yi2 (δi−1 = F 2 ), and the second term is due 2 1 to using the shared feature yi1 (δi−1 = F 1 and δi−1 = F 1 ). Similarly, the false-alarm (false positive) term at the last stage is given as follows. Z n 1 1 1 1 1 RK,A = p(dy1:K ) CA (1 − πK (y1:K )) o 1 1 I(δK = 1, δK−1 = F 1) Z n 2 1:2 2 2 1:2 2 RK,A = p(dy1:K ) CA (1 − πK (y1:K−1 , yK )) (27) 2 2 I(δK = 1, δK−1 = F 2 )+ 2 2 1:2 1 CA (1 − πK (y1:K−1 , yK )) 2 1 2 I(δK = 1, δK−1 = F 1 , δK−1 = F 1) 2 o i = 0, . . . , K − 1 (30) Putting everything back into (11) yields a dynamic programming structure, with the state variable being the posteriors πij , j = 1, 2 defined in Section III-A. Minimizing (11) can thus be achieved efficiently using the following backward procedure. 1 1 1 1 1 1 1 VK1 (πK ) , min I(δK = 0)CM πK + I(δK = 1)CA (1 − πK ) 1 δK 2 2 2 2 2 2 2 VK2 (πK ) , min I(δK = 0)CM πK + I(δK = 1)CA (1 − πK ) 2 δK Vi1 (πi1 ) 1 1 , min I(δi1 = 0)CM πi + δi1 n o 1 1 1 1 I(δi1 = F 1 ) λDi+1 + E[Vi+1 (πi+1 (Yi+1 , πi1 ))] 2 2 Vi2 (πi2 ; πi1 ) , min I(δi2 = 0)CM πi + 2 δi I(δi1∗ 2 2 1 = F 1 , δi2 = F 1 )E[Vi+1 (πi+1 (Yi+1 , πi2 ); πi1 )]+ n o 2 2 2 2 I(δi2 = F 2 ) λDi+1 + E[Vi+1 (πi+1 (Yi+1 , πi2 ); πi1 )] i = 1, . . . , K − 1 V01 (π01 ) , λD11 + E[V11 (π11 (Y11 , π01 ))] V02 (π02 ; π01 ) , min I(δ02 = F 1 )E[V12 (π12 (Y11 , π02 ); π01 )]+ δ02 n o I(δ02 = F 2 ) λD12 + E[V12 (π12 (Y12 , π02 ); π01 )] (31) where the expectation is taken with respect to the evidence probabilities (see Section III-A) and Vij is the value function at stage i of application j. From the first and third expressions of (31), the minimizers for the primary application can be obtained by setting ( 1∗ 1 δK (πK ) = An important step in solving Problem (11) is the following expansion of the expected resource cost in (12). By the law of total probability, 1 1 1 1 0, πK < CA /(CA + CM ) 1, else (32) and K−1 n X 1 D11 = D11 P(δ11 = 0) + P(δi1 = 0, δi−1 = F 1 )+ i=2 1 1 1 1 P(δK = 0, δK−1 = F 1 ) + P(δK = 1, δK−1 = F 1) (28) o and 1 1 Di+1 P(δi1 = F 1 ) = Di+1 n K−1 X 1 P(δj1 = 0, δj−1 = F 1 )+ j=i+1 1 P(δK = 1 0, δK−1 δi1∗ (πi1 ) o 1 1 = F ) + P(δK = 1, δK−1 = F 1) , ( 1 1 0, Vi1 (πi1 ) = CM πi = 1 1 1 1 1 F , Vi (πi ) < CM πi , (33) i = 1, . . . , K − 1 The expression in (33) can be further simplified into (13) using Lemmas 1.1 and 1.3. From the second and fourth expressions of (31), the optimal decision rule for the secondary application is 1 i = 1, . . . , K − 1 (29) ( 2∗ 2 δK (πK ) = 2 2 2 2 0, πK < CA /(CA + CM ) 1, else (34) 11 and  2 2 2  0, Vi = CM πi , 2∗ 2 1 2 2 2 δi (πi ; πi ) = F 2 , Vi2 = λDi+1 + E[Vi+1 (Yi+1 , πi2 ; πi1 )]   1 2 2 1 2 1 F , Vi = E[Vi+1 (Yi+1 , πi ; πi )], πi1 ≥ τi1∗ i = 0, . . . , K − 1 Taking expectation on both size of (41) yields (40). (35) The expression in (35) can be further simplified into (14) using Lemma 1.4. Lemma 1.1. E[Vi+1 (πi+1 (Yi+1 , π))], i = 0, . . . , K − 1 and Vi (π), i = 1, . . . , K are concave8 . Proof. VK (π) is concave. Hence, by Lemma 1.2, E[VK (πK (YK , π))] is concave. Assume that Vi+1 (π) is concave, thus E[Vi+1 (πi+1 (Yi+1 , π))] is concave by Lemma 1.2, then Vi (π) = min{(π), λDi+1 + E[Vi+1 (πi+1 (Yi+1 , π))] (36) is also concave. Again, by Lemma 1.2, E[Vi (πi (Yi , π))] is concave. Lemma 1.2. E[Vi+1 (πi+1 (Yi+1 , π))] is concave if Vi+1 (π) is concave. Proof. See [30, p. 146]. Lemma 1.3. E[Vi+1 (πi+1 (Yi+1 , 0))] = 0, i = 0, . . . , K − 1. Proof. VK (0) = 0, then E[VK (πK (YK , 0))] = VK (0) = 0 Assume that E[Vi+1 (πi+1 (Yi+1 , 0))] = 0, then Vi (0) = min{0, λDi+1 } = 0. (37) B. Proof of Proposition 1 Introducing (additional) early positive decisions to intermediate stages results in the following modification to the third and fourth lines of (31). 1 1 1 I(δi1 = 0)CM Vi1 (πi1 ) , min πi + I(δi1 = 1)CA (1 − πi1 ) δi1 n o 1 1 1 1 I(δi1 = F 1 ) λDi+1 + E[Vi+1 (πi+1 (Yi+1 , πi1 ))] 2 2 2 Vi2 (πi2 ; πi1 ) , min I(δi2 = 0)CM πi + I(δi2 = 1)CA (1 − πi2 ) 2 δi I(δi1∗ 2 2 1 = F 1 , δi2 = F 1 )E[Vi+1 (πi+1 (Yi+1 , πi2 ); πi1 )]+ n o 2 2 2 2 I(δi2 = F 2 ) λDi+1 + E[Vi+1 (πi+1 (Yi+1 , πi2 ); πi1 )] i = 1, . . . , K − 1 (42) Therefore the positive decision is not chosen by the optimal policy under the following circumstances. j δij∗ 6= 1 if Vij < CA (1 − πij ), i = 1, . . . , K − 1, j = 1, 2 i = 1, . . . , K − 1, j = 1, 2 , (43) Since Vi1 and Vi2 are concave functions of πi1 and πi2 , respectively, (43) is equivalent to j δij∗ 6= 1 if πij ≤ max{πij : Vij < CA (1 − πij )}, Hence, E[Vi (πi (Yi , 0))] = Vi (0) = 0. Lemma 1.4. If the condition in (15) holds, then  0, Vi2 = πi2 , πi1 < τi1∗    F 2 , V 2 < π 2 , π 1 < τ 1∗ i i i i δi2∗ (πi2 ; πi1 ) = 2 2 1 1∗  0, V = π , π ≥ τ  i i i i   1 2 F , Vi < πi2 , πi1 ≥ τi1∗ Proof. Since Vi (πi ) is concave, Vi0 (πi ) is non-increasing. 2 for some small  > 0. Therefore, Furthermore, Vi0 () = CM 0 2 Vi (πi ) ≤ CM , i.e. ,   2 Vi (πi (Yi1 )) − Vi (πi (Yi2 )) ≤ CM πi (Yi1 ) − πi (Yi2 ) (41) (44) Hence if (22) holds then the positive decisions are never chosen by the optimal policy, and therefore do not make any difference in the end system performance. (38) R EFERENCES [1] E. A. Lee, J. D. Kubiatowicz, J. M. Rabaey, A. L. SangiovanniVincentelli, S. A. Seshia, J. Wawrzynek, D. Blaauw, P. Dutta, K. Fu, C. Guestrin et al., “The TerraSwarm Research Center (TSRC)(A white 2∗ 2 1 1∗ which implies δi 6= F when πi ≥ τi . paper),” EECS Department, University of California, Berkeley, Tech. Rep. UCB/EECS-2012-207, 2012. Proof. The fourth expression of (31) is equivalent to Eq. (38) [2] L. Atzori, A. Iera, and G. Morabito, “The Internet of Things: A survey,” if and only if Computer networks, vol. 54, no. 15, pp. 2787–2805, 2010. [3] L. Le, D. M. Jun, and D. L. Jones, “Energy-efficient detection system in 2 1 2 2 2 2 2 time-varying signal and noise power,” in IEEE International Conference E[Vi (Yi , πi−1 )] − E[Vi (Yi , πi−1 )] ≤ λDi (39) on Acoustics, Speech and Signal Processing (ICASSP), 2013. IEEE, 2013, pp. 2736–2740. The condition in (39) is made satisfied by (15) because of [4] P. Viola and M. Jones, “Rapid object detection using a boosted cascade Lemma 1.5 (note that Vi2 is concave over πi2 for each πi1 ,i = of simple features,” in Proceedings of the 2001 IEEE Computer Society 1, . . . , K). Conference on Computer Vision and Pattern Recognition, 2001, vol. 1. IEEE, 2001, pp. I–511. [5] J. Salamon, C. Jacoby, and J. P. Bello, “A dataset and taxonomy for urban Lemma 1.5.  sound research,” in Proceedings of the ACM International Conference 2 E[Vi (Yi1 , πi−1 )] − E[Vi (Yi2 , πi−1 )] ≤ CM E[πi (Yi1 )] − E[πi (Yi2 )] on Multimedia. ACM, 2014, pp. 1041–1044. [6] R. J. McAulay and T. F. Quatieri, “Speech analysis/synthesis based on a i = 1, . . . , K sinusoidal representation,” IEEE Transactions on Acoustics, Speech and (40) Signal Processing, vol. 34, no. 4, pp. 744–754, 1986. [7] D. S. Turaga, O. Verscheure, U. V. Chaudhari, and L. D. Amini, 8 Moreover, V (π), i = 1, . . . , K can be shown to be piece-wise linear “Resource management for networked classifiers in distributed stream i and concave, which was first observed and proven (by induction) in [29, mining systems,” in Sixth International Conference on Data Mining, Smallwood and Sondik]. 2006. IEEE, 2006, pp. 1102–1107. i = 0, . . . , K − 1 12 Algorithm 1 Pseudo-code to find optimal thresholds for the multi-application cascade system. This algorithm has the time complexity of O(KM 2 L) and the space complexity of max{O(KM 2 ), O(M 2 L)}, where L is the quantization level of the feature models. 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: function OPTIMIZE(model1 , model2 ) model1 ,model2 are structures containing the primary and secondary application’s feature models, respectively K is the number of stages M is the state probability quantization size Use (7) to obtain robust versions of model1 and model2 . b = [0 : 1/(M − 1) : 1] (dummy) probability vector 1 1 VK1 = min(CM b, CA (1 − b)) 1∗ 1 1 1 τK = CA /(CA + CM ) for i = 1 : 1 : M do 2 2 VK2 (:, i) = min(CM b, CA (1 − b)) 2∗ 2 2 2 τK (i) = CA /(CA + CM ) end for for i = K − 1 : −1 : 1 do J 1 = expected next-stage (i+1) primary value function 1 b, J 1 ) Vi1 = min(CM 1∗ 1 b < 0} τi = min{b : Vi1 − CM 1∗ 1 1∗ 1 τi = max(πLi , min(πU i , τi )) 21 J = expected next-stage (i+1) secondary value function using the shared primary feature J 22 = expected next-stage (i+1) secondary value function using the secondary feature for j = 1 : 1 : M do if b(j) < τi1∗ then 2 Vi2 (:, j) = min(CM b, J 22 (:, j)) 2∗ 2 τi (j) = min{b : Vi2 (:, j) − CM b < 0} 2 2∗ 2 τi (j) = max(πLi , min(πU i , τi2∗ (j))) else 2 b, J 21 (:, j)) Vi2 (:, j) = min(CM 2 ηi2∗ (j) = min{b : Vi2 (:, j) − CM b < 0} 2 2 2∗ ηi2∗ (j) = max(πLi , min(πU , η i i (j))) end if end for end for V01 = J 1 = expected next-stage (1) primary value function V02 = J 21 = expected next-stage (1) secondary value function using the shared primary feature end function [8] Z.-B. Tang, K. R. Pattipati, and D. L. Kleinman, “Optimization of detection networks: Part I - Tandem structures,” IEEE Transactions on Systems, Man and Cybernetics, vol. 21, no. 5, pp. 1044–1059, 1991. [9] P. F. Swaszek, “On the performance of serial networks in distributed detection,” IEEE Transactions on Aerospace and Electronic Systems, vol. 29, no. 1, pp. 254–260, 1993. [10] R. Viswanathan, S. C. Thomopoulos, and R. Tumuluri, “Optimal serial distributed decision fusion,” IEEE Transactions on Aerospace and Electronic Systems, vol. 24, no. 4, pp. 366–376, 1988. [11] H. Luo, “Optimization design of cascaded classifiers,” in IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2005, vol. 1. IEEE, 2005, pp. 480–485. [12] D. M. Jun and D. L. Jones, “An energy-aware framework for cascaded detection algorithms,” in 2010 IEEE Workshop on Signal Processing Systems (SIPS). IEEE, 2010, pp. 1–6. [13] ——, “Cascading signal-model complexity for energy-aware detection,” IEEE Journal on Emerging and Selected Topics in Circuits and Systems, vol. 3, no. 1, pp. 65–74, 2013. [14] J. Chen, R. Tan, G. Xing, X. Wang, and X. Fu, “Fidelity-aware utilization control for cyber-physical surveillance systems,” IEEE Transactions on Parallel and Distributed Systems, vol. 23, no. 9, pp. 1739–1751, 2012. [15] D. Cohen, “Managing resources on a multi-modal sensing device for energy-aware state estimation,” Master’s thesis, 2013. [16] V. C. Raykar, B. Krishnapuram, and S. Yu, “Designing efficient cascaded classifiers: tradeoff between accuracy and cost,” in Proceedings of the 16th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, 2010, pp. 853–860. [17] M. Chen, K. Q. Weinberger, O. Chapelle, D. Kedem, and Z. Xu, “Classifier cascade for minimizing feature evaluation cost,” in International Conference on Artificial Intelligence and Statistics, 2012, pp. 218–226. [18] B. Emre Ertin, “Polarimetric processing and sequential detection for automatic target recognition systems,” Ph.D. dissertation, The Ohio State University, 1999. [19] K. Trapeznikov, V. Saligrama, and D. Castañón, “Multi-stage classifier design,” Machine learning, vol. 92, no. 2-3, pp. 479–502, 2013. [20] K. Trapeznikov and V. Saligrama, “Supervised sequential classification under budget constraints,” in Proceedings of the Sixteenth International Conference on Artificial Intelligence and Statistics, 2013, pp. 581–589. [21] J. Wang, K. Trapeznikov, and V. Saligrama, “An LP for sequential learning under budgets.” in AISTATS, 2014, pp. 987–995. [22] D. M. Jun, L. Le, and D. L. Jones, “Cheap noisy sensors can improve activity monitoring under stringent energy constraints,” in Global Conference on Signal and Information Processing (GlobalSIP), 2013 IEEE. IEEE, 2013, pp. 683–686. [23] P. J. Huber, “Robust confidence limits,” Zeitschrift für Wahrscheinlichkeitstheorie und verwandte Gebiete, vol. 10, no. 4, pp. 269–278, 1968. [24] ——, “Robust statistics,” International Encyclopedia of Statistical Science, pp. 1248–1251, 2011. [25] B. C. Levy, Principles of signal detection and parameter estimation. Springer, 2008. [26] S. DeBruin, B. Ghena, Y.-S. Kuo, and P. Dutta, “Powerblade: A low-profile, true-power, plug-through energy meter,” in Proceedings of the 13th ACM Conference on Embedded Networked Sensor Systems, ser. SenSys ’15. New York, NY, USA: ACM, 2015. [Online]. Available: http://doi.acm.org/10.1145/2809695.2809716 [27] W. J. Leonard, J. Neal, and R. Ratnam, “Variation of Type B song in the endangered Golden-cheeked Warbler (Dendroica chrysoparia),” The Wilson Journal of Ornithology, vol. 122, no. 4, pp. 777–780, 2010. [28] J.-F. Chamberland and V. V. Veeravalli, “Asymptotic results for decentralized detection in power constrained wireless sensor networks,” IEEE Journal on Selected Areas in Communications, vol. 22, no. 6, pp. 1007– 1015, 2004. [29] R. D. Smallwood and E. J. Sondik, “The optimal control of partially observable Markov processes over a finite horizon,” Operations Research, vol. 21, no. 5, pp. 1071–1088, 1973. [30] D. P. Bertsekas, “Dynamic programming and stochastic control,” 1976. Long N. Le received the BSEE and MSEE degrees in electrical engineering in 2011 and 2013 from the Ho Chi Minh University of Technology and the University of Illinois at Urbana-Champaign, respectively. During the summer of 2015, he was an intern at the Audio and Acoustics Research Group at Microsoft Research. He was awarded the Best-inSession by the Semiconductor Research Corporation at TECHCON 2016, in the IoT System Design session. He is currently working toward the Ph.D. degree as a research assistant at the Coordinated Science Laboratory and Beckman Institute of the University of Illinois at Urbana-Champaign. His current research interests include resource-efficient statistical inference and signal processing, with a focus on IoT applications. 13 Douglas L. Jones received the BSEE, MSEE, and Ph.D. degrees from Rice University, Houston, TX, USA, in 1983, 1986, and 1987, respectively. During the 1987-1988 academic year, he was at the University of Erlangen-Nuremberg, Germany, on a Fulbright postdoctoral fellowship. Since 1988, he has been with the University of Illinois, UrbanaChampaign, IL, USA, where he is currently the director of Advanced Digital Sciences Center (ADSC) and a Professor in Electrical and Computer Engineering, Neuroscience, the Coordinated Science Laboratory, and the Beckman Institute. He was on sabbatical leave at the University of Washington in Spring 1995 and at the University of California at Berkeley in Spring 2002. In the Spring semester of 1999 he served as the Texas Instruments Visiting Professor at Rice University. His research interests are in digital signal processing and systems, including nonstationary signal analysis, adaptive processing, multisensor data processing, OFDM, and various applications such as low-power implementations, biology and neuroengineering, and advanced hearing aids and other audio systems. He is an author of two DSP laboratory textbooks. Dr. Jones served on the Board of Governors of the IEEE Signal Processing Society from 2002 to 2004. He was selected as the 2003 Connexions Author of the Year.
3cs.SY
Adversarial Examples that Fool Detectors arXiv:1712.02494v1 [cs.CV] 7 Dec 2017 Jiajun Lu∗, Hussein Sibai∗, Evan Fabry University of Illinois at Urbana Champaign {jlu23, sibai2, efabry2}@illinois.edu Abstract linear feature constructions without having strong mathematical constraints on what these constructions do; but taking that position means one cannot use methods that are largely accurate and effective. Detectors are not classifiers. A classifier accepts an image and produces a label. In contrast, a detector, like Faster RCNN [24, 5], identifies bounding boxes that are “worth labelling”, and then generates labels (which might include background) for each box. The final label generation step employs a classifier. However, the statistics of how bounding boxes cover objects in a detector are complex and not well understood. Some modern detectors like YOLO 9000 [23] predict boxes and labels using features on a fixed grid, resulting in fairly complex sampling patterns in the space of boxes, and this means that pixels outside a box may participate in labelling that box. Another important difference is that detectors usually have RoI pooling or feature map resizing, which might be effective at disrupting adversarial patterns. To date, no successful adversarial attack on a detector has been demonstrated. In this paper, we demonstrate successful adversarial attacks on Faster RCNN, which generalize to YOLO 9000. We also discuss the generalization ability of adversarial examples. We say that an adversarial perturbation generalizes if, when circumstances (digital or physical) change, the corresponding images remain adversarial. For example, a perturbation of a stop sign generalizes over different distances if it remains adversarial when the camera approaches the stop sign. An example generalizes better if it remains adversarial for more cases (e.g. changes of detector, background and lighting). If an adversarial example cannot generalize, it is not a threat in the majority of real world systems. Our contributions in this paper are as follows: An adversarial example is an example that has been adjusted to produce a wrong label when presented to a system at test time. To date, adversarial example constructions have been demonstrated for classifiers, but not for detectors. If adversarial examples that could fool a detector exist, they could be used to (for example) maliciously create security hazards on roads populated with smart vehicles. In this paper, we demonstrate a construction that successfully fools two standard detectors, Faster RCNN and YOLO. The existence of such examples is surprising, as attacking a classifier is very different from attacking a detector, and that the structure of detectors – which must search for their own bounding box, and which cannot estimate that box very accurately – makes it quite likely that adversarial patterns are strongly disrupted. We show that our construction produces adversarial examples that generalize well across sequences digitally, even though large perturbations are needed. We also show that our construction yields physical objects that are adversarial. 1. Introduction An adversarial example is an example that has been adjusted to produce a wrong label when presented to a system at test time. In the literature, adversarial examples with imperceivable perturbations and unexpected properties (e.g. transferability) are one of the biggest mysteries of neural networks. There is a range of constructions [19, 21, 20] that yield adversarial examples for image classifiers, and there is good evidence that small imperceivable adjustments suffice. Furthermore, Athalye et al. [1] show that it is possible to build a physical object with visible perturbation patterns that is persistently misclassified by standard image classifiers from different view angles at a roughly fixed distance. There is good evidence that adversarial examples built for one classifier will fool others, too [22, 14]. The success of these attacks can be seen as a warning not to use highly non∗ Both • We demonstrate a method to construct adversarial examples that fool Faster RCNN digitally; examples produced by our method are reliably either missed or mislabeled by the detector. These examples without modification also fool YOLO 9000, indicating that the construction produces examples that can transfer across models. authors contributed equally 1 • Our adversarial examples can be physically created successfully, and they still can fool detectors in suitable circumstances. They can also slip through recent strong image processing defenses against adversarial examples. • In practice, we find that adversarial examples require quite large disruptions to the pattern on the object in order to fool detectors. Physical adversarial examples require bigger disruptions than digital examples to succeed. 2. Background Adversarial examples are of interest mainly because the adjustments required seem to be very small and are easy to obtain [30, 9, 8]. Numerous search procedures generate adversarial examples [19, 21, 20]; all searches look for an example that is (a) “near” a correctly labelled example (typically in L1 or L2 norm), and (b) mislabelled. Printing adversarial images then photographing them can retain their adversarial property [13, 1], which suggests that adversarial examples might exist in the physical world. Their existence could cause a great deal of mischief. There is some evidence that it is difficult to build physical examples that fool a stop sign detector [16]. In particular, if one actually takes a video of an existing adversarial stop sign, the adversarial pattern does not appear to affect the performance of the detector by much. Lu et al. speculated that this might be because adversarial patterns were disrupted by being viewed at different scales, rotations, and orientations. This created some discussion. OpenAI demonstrated a search procedure that could produce an image of a cat that was misclassified when viewed at multiple scales [1]. There is some blurring of the fur texture on the cat they generate, but this would likely be imperceptible to most observers. OpenAI also demonstrated an adversarial image of a cat that was misclassified when viewed at multiple scales and orientations [1]. However, there are significant visible artifacts on that image; few would think that it had not been obviously tampered with. Recent work has demonstrated physical objects that are persistently misclassified from different angles at a roughly fixed distance [1]. The search procedure manipulates the texture map T of the object. The procedure samples a set of viewing conditions Vi for the object, then renders to obtain images I(Vi , T ). Finally, the procedure adjusts the texture map to obtain images that are (a) close to the original images and (b) have high probability of misclassification. The adversarial properties of the resulting objects are robust to the inevitable errors in color, etc., in producing physical objects from digital representations. Defences: There is fair evidence that it is hard to tell whether an example is adversarial (and so (a) evi- dence of an attack and (b) likely to be misclassified) or not [27, 10, 28, 18, 4, 7]. Current procedures to build adversarial examples for deep networks appear to subvert the feature construction implemented by the network to produce odd patterns of activation in late stage ReLU’s; this can be exploited to build one form of defence [15]. There is some evidence that other feature constructions admit adversarial attacks, too [18]. However, adversarial attacks typically introduce unnatural (if small) patterns into images, and image processing methods that remove such patterns yield successful defenses. Guo et al. showed that cropping and rescaling, bit depth reduction, JPEG compression and decompression, resampling and reconstructing using total variation criteria, and image quilting all provide quite effective ways of removing adversarial patterns [11]. Detectors and classifiers: It is usual to attack classifiers, and all the attacks we are aware of attack on classifiers. However, for many applications, classifiers are not useful by themselves. Road sign is a good example. A road sign classifier would be applied to images that consist largely of a road sign (e.g. those of [29]). But there is little application need for a road sign classifier except as a component of a road sign detector, because it is unusual in practice to deal with images that consist largely of road sign. Instead, one usually deals with images that contain many things, and must find and label the road sign. It is natural to study road sign classifiers (e.g. [26]) because image classification remains difficult and academic studies of feature constructions are important. But there is no particular threat posed by an attack on a road sign classifier. An attack on a road sign detector is an entirely different matter. For example, imagine the danger if one could get a template that, with a can of spray paint, could ensure that a detector reads a stop sign as a yield sign (or worse!). As a result, it is important to know whether (a) such examples could exist and (b) how robust their adversarial property is in practice. Recently, Evtimov et al. have shown several physical stop signs that are misclassified [6]. They cropped the stop signs from the frames before presenting them to the classifier. By cropping, they have proxied the box-prediction process in a detector; however, their attack is not intended as an attack on a detector (the paper does not use the word “detector”, for example). Lu et al. showed that their construction does not fool a standard detector [17], likely because the cropping process does not proxy a detector’s box selection well, and suggested that constructing an adversarial example that fools a detector might be hard. Figure 1 shows their stop signs presented in [6] are reliably detected by Faster RCNN. 3. Method We propose a method to generate digital and physical adversarial examples that are robust to changes of viewing function of T , that is Φ(T ) = Figure 1. Evtimov et al. [6] generated physical stop signs that are misclassified, however, these stop signs are reliably detected by Faster RCNN. Images from Figure 10 in [17]. conditions. Our registration and reconstruction based approach generates adversarial perturbations from video sequences of an object with moving cameras. We require the objects in the videos to be accurately aligned in 3D space. We can easily register stop signs as they are 2D polygons. Moreover, we can accurately register face images to a virtual 3D face model. Hence, we perform our experiments on these two types of data. 3.1. Approach for stop signs N 1 X mean φs (b) N i=1 b ∈ Bs (I(Mi , T )) possibly subject to some constraint on T , such as being close to a normal stop sign in L2 distance. We have also investigated minimizing the maximum score for all the stop sign proposals, and found that minimizing the mean score gives slightly better results. Minimization procedure: First, we compute ∇T Φ(T ) mean by computing ∇I φ (b). The gradients b ∈ Bs (I(Mi , T ) s in the frame coordinate system are mapped to the root coordinate system with inverse view mapping M−1 i , and then are cropped to the extent of T in that coordinate system. We average gradients mapped from all N training frames. However, directly using the gradients to take large steps frequently stalls the optimization process. Instead, we find that computing the descent direction with the sign of the gradients for given pattern T (n) (n stands for iteration number) facilitates the optimization process. d(n) = sign(∇T Φ(T (n) )). We choose a very small step length  such that d(n) represents an update of one least significant bit, which leads to an optimization step of form T (n+1) = T (n) + d(n) . We use the stop sign example to demonstrate our attack, which extends to other objects that are registered from image domain to some root coordinate system (e.g. faces in section 3.2). We search for an adversarial pattern that (a) looks like a stop sign and (b) fools Faster RCNN. We select a set of N diverse frames Ii as the training examples to generate the pattern. A stop sign is represented as a texture map T in some root coordinate system. We construct (currently by hand) correspondences between eight vertices on the stop sign instances in training frames and the vertices of T . We use these correspondences to estimate a viewing map Mi , which maps the texture T in the root coordinate system to the appropriate pattern in training frame Ii . We also incorporate in Mi the illumination intensity, which is estimated by computing the average intensity over the stop sign in the image. Relative illumination intensities are used to scale the adversarial perturbations. We write I(Mi , T ) for the image frame obtained by superimposing T on the frame Ii using the mapping Mi ; Bs (I) for the set of stop sign bounding boxes obtained by applying Faster RCNN to the image I; and φs (b) for the score produced by Faster RCNN’s classifier for a stop sign in box b. To produce an adversarial example, we minimize the mean score for a stop sign produced by Faster RCNN in all training images as a The optimization process usually takes hundreds or even thousands of steps. One termination criterion is to stop the optimization when the pattern fools the detector more than 90% of the cases on the validation set. Another termination criterion is a fixed number of iterations. Why large steps are hard: In our experiments, taking large steps with unsigned gradients stalls the optimization process, and we believe large steps are hard to take for two reasons. First, each instance of the pattern occurs at a different scale, meaning that there must be some up- or down-sampling of the gradients when mapped to the root coordinate system. Although we register the images with subpixel accuracy, and use a bilinear method to interpolate the transformation process, signal losses are still inevitable. In section 4.2, we show some evidence that this effect may make our patterns more, rather than less, robust. Second, the structure of the network means that the gradient is a poor guide to the behavior of φs (b) over large scales. In particular, a ReLU network divides its input space into a very large number of cells, and values at any layer before the softmax layer are a continuous piecewise linear function within a cell. Because the network is trained to have a (roughly) constant output for large pieces of its input space, the gradient must wiggle from cell to cell, and so may be a poor guide to the long scale behavior of the function. Constraining distance to the original stop sign: In order to create less perceivable adversarial perturbations, we constrain the distance to the original stop sign to be small. An L2 distance loss is added to the cost function, and we minimize Φ(T ) + λ||T − T (0) 2 || Our experiments show that this distance constraint still cannot help to create small perturbations, but greatly changes the pattern of the perturbations, refer to Figure 6. We create our physical adversarial stop signs by printing the pattern T , cutting out the printed stop sign area, and sticking it to an actual stop sign (30 in by 30 in). Original Image Detected Whole Image Attacked Sign Region Attacked Figure 2. Modifying a single stop sign image to attack Faster RCNN is successful. In the original stop sign image (first), the stop sign is reliably detected. In the second image, small perturbations are added to the whole image, and the stop sign is not detected. In the last image, small perturbations are added to the stop sign region instead of the whole image, and the stop sign is detected as a vase. Original Image Detected Whole Image Attacked Face Region Attacked 3.2. Extending to faces We extend the experiments onto faces, which have complex geometries and larger intra class variances, to demonstrate that our analysis generalizes to other classes. In the face setting, we search for a pattern that fools a Faster RCNN based face detector [12] and looks like the original face. Our root coordinate system for faces is a virtual high quality face mesh generated from morphable face model [2]. For video sequences of a face, we reconstruct the geometry of the face in the input frames using morphable face model built from the FaceWarehouse [3] data. The model produces a 3D face mesh F (wi , we ) that is a function of identity parameters wi , and expression parameters we . FaceTracker [25] is used to detect landmarks li on the face frames, then we recover parameters and poses of the face mesh by minimizing the distances between the projected landmark vertices and their corresponding landmark locations on the image planes. This construction gives us pixelto-mesh and mesh-to-pixel dense correspondences between all face frames and the root face coordinate system (shared face mesh). By projecting image pixels to the face meshes via barycentric coordinates, we can achieve subpixel accurate pixel-to-pixel registrations between all face frames (via root coordinate system). This correspondences are used to transfer the gradients from face image coordinates to the root coordinate system, then we merge the gradients from multiple images and reverse transfer the merged gradients back to the face image coordinates. 4. Results In this section, we describe in depth the experiments we did and the results we got. Our supplementary materials include videos and more results, and it can be downloaded from http://jiajunlu.com/docs/ advDetector_supp.zip. Our high resolution paper can be downloaded from http://jiajunlu.com/ Figure 3. Modifying a face image to attack Faster RCNN is successful. In the original face image (first), the face is reliably detected. In the second image, small perturbations are added to the whole image, and the face is not detected. In the last image, slightly larger perturbations are added to the face region instead of the whole image, and the face is not detected. docs/advDetector.pdf. But let us first give a quick overview of our findings: • Adding small perturbations suffices to fool a given object detector on a single image. • Enforcing the adversarial perturbations to generalize across view conditions requires significant changes to the pattern. • Our successful attacks for Faster RCNN generalize to YOLO. • Our successful attacks with very large perturbations generalize to the physical world objects in suitable circumstances. • Simple defenses fail to defeat adversarial examples that can generalize. Detectors are affected by internal thresholds. Faster RCNN uses a non maximum suppression threshold and a confidence threshold. For stop signs, we used the default configurations. For faces, we found the detector is too willing to detect faces, and we made it less responsive to faces (nms from 0.15 to 0.3, and conf from 0.6 to 0.8). We used default YOLO configurations. Original Sequence Attacked Sequence Figure 4. Adversarial examples of stop signs for Faster RCNN that can generalize across view conditions. The original sequence in the first row is a test video sequence captured for a real stop sign, and the stop sign is detected in all the frames. We apply our attack to a training set of videos to generate a cross view condition adversarial perturbation, and apply that perturbation on this test sequence to generate the attacked sequence in the second row. This is a digital attack, and the stop sign is either not detected or detected as a kite. Original Sequence Attacked Sequence Figure 5. Adversarial examples of faces for Faster RCNN based face detector [12] that can generalize across view conditions. The original sequence images in the first row are sampled from a test video sequence, and all the faces are reliably detected. We apply our attacking method to a training set of videos to generate a cross view condition adversarial perturbation, and apply that perturbation on this test sequence to generate the attacked sequence in the second row. This is a digital attack. 4.1. Attacking single image We can easily adjust a pattern on a single image to fool a detector (stop signs in Figure 2 and faces in Figure 3), and the change on the pattern is tiny. While this is of no practical significance, it shows our search method can find very small adversarial perturbations. 4.2. Generalizing across view conditions What we are really interested in is to produce a pattern that fails to be detected in any image. This is much harder because our pattern needs to generalize to different view conditions and so on. We can still find adversarial patterns in this situation, but the patterns found by our process involve significant changes of the stop signs and faces. Stop sign dataset: we use a Panasonic HC-V700M HD camera to take 22 videos of the camera approaching stop signs, and extract 5 diverse frames from each video. Then we manually register all the stop signs, and use our attacking method to generate a unified adversarial perturbation for all the frames. We use 12 videos for generating adversarial perturbations (training), 5 videos for validation, and 5 videos for evaluation (testing). We use the validation set Figure 6. We generate three adversarial stop signs with our attacking method. The first stop sign does not use L2 distance penalty, and use termination criterion of successfully attacking 90% of validation images. The second stop sign uses L2 distance penalty in the objective function, and terminates when 90% of validation images are attacked. The last stop sign also adopts L2 distance penalty, but performs a large fixed number of iterations. All three patterns reliably fool detectors when mapped into videos. However, physical instances of these patterns are not equally successful. The first two stop signs, as physical objects, only occasionally fool Faster RCNN; the third one, which has a much more extreme pattern, is more effective. termination criteria described in Section 3.1. Figure 4 gives an example video sequence, and its corresponding attacked video sequence. Table 1 shows the stop sign detection rates in different circumstances. We plan to release the labelled Seq 1 Seq 2 Seq 3 Figure 7. We print the three adversarial stop signs from Figure 6, and stick them to a real stop sign. We took videos while driving by these printed stop signs, and ran Faster RCNN on these videos. Notice that all of the adversarial perturbations generalize well digitally. We only render the detection results for stop signs to make the figures clean. The three sequences in this figure correspond to the three stop signs in order. In the first two sequences, stop signs are detected without trouble, while in the last sequence, the stop sign is not detected in the video, so it is a physical adversarial stop sign. This may be the result of poor texture contrast against the tree, though this sequence was not seen in training. dataset. Face dataset:: we use a SONY a7 camera to take 5 videos of a still face from different distances and angles, and extract 20 diverse frames from each video. We use the morphable face model approach to register all the faces, and use our attacking method to generate a unified adversarial perturbation. We use 3 videos for generating adversarial perturbations (training), 1 video for validation, and 1 video for evaluation (testing). Again, we use the validation set termination criteria described in Section 3.1. Figure 5 shows an example video sequence, and its corresponding attacked video sequence. In our experiments, this is the smallest perturbations on faces that could generalize. Table 2 shows the face detection rates in different circumstances. Also, we plan to release the processed dataset. In summary, it is possible to attack stop signs and faces from multiple images, and require them to generalize to new similar view condition images. However, both of them require strong perturbation patterns to generalize. Refer to supplementary materials for details. properties, view conditions, printing errors, lighting, etc. In this paper, we print stop signs and perform physical experiments with them, but we believe similar conclusions apply to faces. We performed physical experiments with three adversarial perturbation patterns in Figure 6. Our results in Table 3 show that the two less perturbed stop signs can still be detected by Faster RCNN, while the one with large perturbations is hard to detect. The frames for physical experiments could be found in Figure 7. Refer to our supplementary materials for videos. We performed analysis with the data from Table 1 and Table 3. L1 regularized logistic regression is used to predict the success of our many different cases. The most important variable is detector (generalization from Faster RCNN to YOLO is not strong); then whether the adversarial example is physical or not (digital attacks are more effective than physical); then scale (it is hard to make a detector to miss a nearby stop sign). 4.4. Generalizing to YOLO 4.3. Generalizing to the physical world There is a big gap between attacks in the digital world and attacks in the physical world, which means the adversarial perturbations that generalize well in the digital world may not generalize to the physical world. We suspect this gap is due to various practical concerns, such as sensor Adversarial examples for a certain classifier generalize across different classifiers. To test out whether adversarial examples for Faster RCNN generalize across detectors, we feed these images into YOLO. We categorize our adversarial examples into three categories: single image examples with small perturbations, multiple image examples Tree bg - L Tree bg - EL Sky bg - L Sky bg - EL Stop1 Stop2 Stop3 Stop1 Stop2 Stop3 test - far 0/4 ; 4/4 0/4 ; 4/4 n/a ; n/a 0/6 ; 6/6 0/6 ; 6/6 0/4 ; 3/4 test - medium 0/4 ; 1/4 1/4 ; 3/4 n/a ; n/a 0/6 ; 5/6 0/6 ; 6/6 0/4 ; 1/4 test - near 0/2 ; 2/2 0/2 ; 2/2 n/a ; n/a 0/3 ; 3/3 0/3 ; 3/3 0/4 ; 3/4 train - far 0/10 ; 6/10 2/10 ; 1/10 1/5 ; 5/5 0/14 ; 13/14 0/14 ; 13/14 0/5 ; 5/5 train - medium 0/10 ; 1/10 1/10 ; 0/10 0/5 ; 0/5 0/14 ; 12/14 2/14 ; 12/14 0/5 ; 5/5 train - near 0/5 ; 5/5 2/5 ; 3/5 0/4 ; 1/4 0/7 ; 6/7 1/7 ; 6/7 0/4 ; 4/4 val - far 1/4 ; 3/4 0/4 ; 1/4 n/a ; n/a 0/6 ; 6/6 0/6 ; 6/6 n/a ; n/a val - medium 0/4 ; 3/4 0/4 ; 0/4 n/a ; n/a 0/6 ; 5/6 0/6 ; 5/6 n/a ; n/a val - near 0/2 ; 2/2 0/2 ; 0/2 n/a ; n/a 0/3 ; 2/3 1/3 ; 2/3 n/a ; n/a Table 1. This table reports the detection rates of Faster RCNN and YOLO for the multiple image digital attacks of stop signs. In each cell, the ratio before semicolon represents the detection rate for Faster RCNN, and the ratio after semicolon represents the detection rate for YOLO. Tree bg means the background of the stop sign is tree and has low contrast, and the Sky bg means the background of the stop sign is sky and has high contrast. L following the background means the perturbations are large, and EL means the perturbations are extremely large. We have three dark stop signs, and the detection rates are calculated at three different distances (far/medium/near) on train/val/test splits. We can attack Faster RCNN with multiple view conditions, and the adversarial perturbations generalize to new view conditions. The adversarial examples also generalize to YOLO, especially when the background is tree. S100 small perturbation S100 medium perturbation S100 large perturbation S15 large perturbation ft-far 2/3 3/3 0/3 0/1 ft-near 2/4 2/4 0/4 n/a test sd-far 6/6 6/6 1/6 0/2 sd-near 6/7 3/7 0/7 n/a ft-far 0/19 5/19 0/19 0/3 train front-near sd-far 0/21 0/9 1/21 1/9 0/21 0/9 0/2 0/2 sd-near 0/11 0/11 0/11 0/2 ft-far 1/4 2/4 0/4 0/1 ft-near 6/8 4/8 0/8 n/a val sd-far 3/4 4/4 0/4 0/2 sd-near 3/4 3/4 0/4 n/a Table 2. This table reports the detection rates of Faster RCNN based face detector [12] for multiple image digital attacks of faces. S100 means there are 100 images in the experiments, and S15 means there are 15 images. Ft means frontal face, and sd means side face. When small perturbations are applied, attacks on all the training images succeed, but do not generalize to the validation and testing images. Only when large perturbations are applied, the attacks generalize to different view conditions. Tree bg - L Tree bg - EL Sky bg - L Sky bg - EL Dark-Stop1 Dark-Stop2 Bright-Stop1 Bright-Stop2 Dark-Stop3 Bright-Stop3 Dark-Stop1 Dark-Stop2 Bright-Stop1 Bright-Stop2 Dark-Stop3 Bright-Stop3 far - adv 2/17 ; 4/17 4/17 ; 5/17 10/17 ; 16/17 1/17 ; 2/17 0/17 ; 0/17 0/17 ; 0/17 1/19 ; 5/19 0/25 ; 14/25 5/26 ; 23/26 1/23 ; 16/23 14/27 ; 16/27 0/28 ; 11/28 far - clean 16/17 ; n/a n/a ; n/a 17/17 ; n/a 14/17 ; n/a 17/17 ; n/a 11/17 ; n/a 0/19 ; n/a 2/25 ; n/a 0/26 ; n/a 0/23 ; n/a 20/27 ; n/a 0/24 ; n/a medium - adv 11/12 ; 12/12 6/11 ; 10/11 15/15 ; 15/15 10/12 ; 12/12 4/14 ; 10/14 1/11 ; 3/11 9/11 ; 11/11 5/15 ; 11/15 10/11 ; 11/11 10/11 ; 9/11 3/13 ; 11/13 0/13 ; 10/13 medium - clean 12/12 ; n/a n/a ; n/a 15/15 ; n/a 12/12 ; n/a 14/14 ; n/a 11/11 ; n/a 0/13 ; n/a 1/15 ; n/a 1/11 ; n/a 0/11 ; n/a 13/13 ; n/a 2/13 ; n/a near - adv 8/8 ; 8/8 0/14 ; 12/14 12/12 ; 12/12 5/8 ; 8/8 8/11 ; 7/11 0/7 ; 1/7 16/16 ; 16/16 24/24 ; 11/24 21/21 ; 21/21 20/24 ; 19/24 26/27 ; 26/27 22/24 ; 10/24 near - clean 8/8 ; n/a n/a ; n/a 12/12 ; n/a 8/8 ; n/a 11/11 ; n/a 7/7 ; n/a 14/16 ; n/a 22/24 ; n/a 14/21 ; n/a 18/24 ; n/a 27/27 ; n/a 18/24 ; n/a Table 3. The detection rates of the physical adversarial stop signs and physical clean stop signs with Faster RCNN and YOLO in different circumstances. The table layout is similar to Table 1. We have two stop signs with different brightness for large perturbations, and one stop sign with different brightness for extremely large perturbations. We report both detection rates for 30 x 30 inches adversarial stop signs (adv) and 20 x 20 inches clean normal stop signs when applicable (clean). with large perturbations that generalize across viewing conditions digitally, and physical examples with large perturbations. Our experiments show that small perturbations do not generalize to YOLO, while obvious perturbation patterns can generalize to YOLO with good probability. Examples are given in Figure 8, and detection rates can be found in Table 3 and Table 1. 4.5. Localized attacks fail In previous settings, we attack the whole masked objects in the images, however, it is usually hard to apply such attacks in the physical world. For example, modifying the whole stop sign patterns is useless in practice, and wearing a whole face mask with perturbation patterns is hard too. It would be more effective attack if one can manufacture small stickers with perturbation patterns, and when the sticker is attached to a small region of the stop sign or the face fore- Single Single Image Multiple Physical Multiple Image Physical Figure 8. We test whether adversarial examples generated from Faster RCNN generalize to YOLO. In the first row, these adversarial examples are generated for a single image with small perturbations. YOLO can detect these stop signs without trouble. In the second row, these adversarial examples are generated from multiple images, and the digitally perturbed images can fool YOLO in about half of the times. In the last row, physically printed adversarial stop signs can still fool YOLO in some circumstances. The detailed summary can be found in Table 1 and Table 3. stop1 stop2 stop3 stop1 stop2 stop3 NonAttack 10/10 110/110 110/110 40/40 109/187 77/159 151/205 Adversarial 0/10 1/110 10/110 1/40 121/185 86/201 78/209 UP 10/10 8/110 18/110 1/40 118/185 84/201 72/209 TV 10/10 8/110 9/110 2/40 116/185 88/201 85/209 Table 4. We evaluate the effectiveness of simple defense methods. UP means downsample the input image resolution by half, and then upsample it to the original size. TV means total variation denoise, which removes high frequency information. The physical non attack numbers are counted from a real stop sign near our adversarial one. These simple defense methods are effective for single image perturbations, but not effective for multiple image perturbations that can generalize. They also cannot defeat physical adversarial perturbations. Original Up-Down Sample TV Denoise Single Image Multiple Image Figure 9. Localized attacks for stop signs and faces fail in the multiple view condition setting. We applied attacks on regions of the stop signs and faces with very large number of iterations, and introduced extremely large perturbations, but the objects are still detected. In detail, localized attacks on stop signs can sometimes digitally fool far stop signs, but not for middle and near stop signs; localized attacks on faces cannot fool face detector. The first image is an example of perturbed stop signs, and the second image is an example of perturbed faces. head, the detector would fail. Evtimov et al. [6] showed an example that successfully attacked stop sign classifiers. We try to generate adversarial patterns constrained to a fixed region of the objects to fool detectors, however, we find these attacks only occasionally successful (stop signs) or wholly unsuccessful (faces). Figure 9 shows some examples. 4.6. Simple defenses fail Recently, Guo et al. [11] showed that simple image processing could defeat a majority of imperceivable adversarial attacks. We assume detectors should run at frame rate, so exclude image quilting. We investigated down-up sampling and total variation smoothing defense. We find that these methods can defeat attacks on a single image, but cannot Physical Figure 10. We apply simple defenses [11] to adversarial examples generated for Faster RCNN. Up-Down Sample means down sample the image resolution by half, and then upsample it to the original resolution. TV Denoise means denoising the image with total variation regularization, which will remove the high frequency information and keep the low frequency information. In the first row, the adversarial examples generated from a single image with small perturbations can be detected after simple image processing. In the second row, the adversarial examples generated from multiple view conditions still cannot be detected after simple defense. In the last row, the physically printed adversarial stop signs still cannot be detected after simple defense. disrupt the large patterns needed to produce adversarial examples that generalize, see Figure 10 and Table 4. Our hypothesis for this phenomenon is that tiny perturbations work with numerical accumulation mechanism, which is not robust to changes, while obvious perturbations work with pattern recognition mechanism, which is more robust and can better generalize. 5. Conclusion We have demonstrated the first adversarial examples that can fool detectors. Our construction yields physical objects that fool detectors too. However, all the adversarial perturbations we have been able to construct require large perturbations. This suggests that the box prediction step in a detector acts as a form of natural defense. We speculate that better viewing models in our construction may yield a smaller gap between physical and digital results. Our patterns may reveal something about what is important to a detector. References [1] A. Athalye and I. Sutskever. Synthesizing robust adversarial examples. arXiv preprint arXiv:1707.07397, 2017. 1, 2 [2] V. Blanz and T. Vetter. A morphable model for the synthesis of 3D faces. In SIGGRAPH, pages 187–194. ACM, 1999. 4 [3] C. Cao, Y. Weng, S. Zhou, Y. Tong, and K. Zhou. Facewarehouse: A 3d facial expression database for visual computing. IEEE Transactions on Visualization and Computer Graphics, 20(3):413–425, Mar. 2014. 4 [4] N. Carlini and D. Wagner. Defensive distillation is not robust to adversarial examples. 2 [5] X. Chen and A. Gupta. An implementation of faster rcnn with study for region sampling. arXiv preprint arXiv:1702.02138, 2017. 1 [6] I. Evtimov, K. Eykholt, E. Fernandes, T. Kohno, B. Li, A. Prakash, A. Rahmati, and D. Song. Robust physicalworld attacks on machine learning models. arXiv preprint arXiv:1707.08945, 2017. 2, 3, 8 [7] A. Fawzi, O. Fawzi, and P. Frossard. Analysis of classifiers’ robustness to adversarial perturbations. arXiv preprint arXiv:1502.02590, 2015. 2 [8] A. Fawzi, S. Moosavi-Dezfooli, and P. Frossard. Robustness of classifiers: from adversarial to random noise. CoRR, abs/1608.08967, 2016. 2 [9] I. J. Goodfellow, J. Shlens, and C. Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014. 2 [10] S. Gu and L. Rigazio. Towards deep neural network architectures robust to adversarial examples. CoRR, abs/1412.5068, 2014. 2 [11] C. Guo, M. Rana, M. Cisse, and L. van der Maaten. Countering adversarial images using input transformations. arXiv preprint arXiv:1711.00117, 2017. 2, 8 [12] H. Jiang and E. Learned-Miller. Face detection with the faster r-cnn. In Automatic Face & Gesture Recognition (FG 2017), 2017 12th IEEE International Conference on, pages 650–657. IEEE, 2017. 4, 5, 7 [13] A. Kurakin, I. J. Goodfellow, and S. Bengio. Adversarial examples in the physical world. CoRR, abs/1607.02533, 2016. 2 [14] Y. Liu, X. Chen, C. Liu, and D. Song. Delving into transferable adversarial examples and black-box attacks. arXiv preprint arXiv:1611.02770, 2016. 1 [15] J. Lu, T. Issaranon, and D. Forsyth. Safetynet: Detecting and rejecting adversarial examples robustly. arXiv preprint arXiv:1704.00103, 2017. 2 [16] J. Lu, H. Sibai, E. Fabry, and D. Forsyth. No need to worry about adversarial examples in object detection in autonomous vehicles. arXiv preprint arXiv:1707.03501, 2017. 2 [17] J. Lu, H. Sibai, E. Fabry, and D. Forsyth. Standard detectors aren’t (currently) fooled by physical adversarial stop signs. arXiv preprint arXiv:1710.03337, 2017. 2, 3 [18] J. H. Metzen, T. Genewein, V. Fischer, and B. Bischoff. On detecting adversarial perturbations. arXiv preprint arXiv:1702.04267, 2017. 2 [19] S. Moosavi-Dezfooli, A. Fawzi, and P. Frossard. Deepfool: a simple and accurate method to fool deep neural networks. CoRR, abs/1511.04599, 2015. 1, 2 [20] S.-M. Moosavi-Dezfooli, A. Fawzi, O. Fawzi, and P. Frossard. Universal adversarial perturbations. arXiv preprint arXiv:1610.08401, 2016. 1, 2 [21] A. Nguyen, J. Yosinski, and J. Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. In CVPR, 2015. 1, 2 [22] N. Papernot, P. D. McDaniel, and I. J. Goodfellow. Transferability in machine learning: from phenomena to blackbox attacks using adversarial samples. arXiv preprint arXiv:1605.07277, 2016. 1 [23] J. Redmon and A. Farhadi. Yolo9000: better, faster, stronger. arXiv preprint arXiv:1612.08242, 2016. 1 [24] S. Ren, K. He, R. Girshick, and J. Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91–99, 2015. 1 [25] J. Saragih and K. McDonald. Facetracker. https:// github.com/kylemcdonald/FaceTracker. 4 [26] P. Sermanet and Y. LeCun. Traffic sign recognition with multi-scale convolutional networks. In Neural Networks (IJCNN), The 2011 International Joint Conference on, pages 2809–2813. IEEE, 2011. 2 [27] U. Shaham, Y. Yamada, and S. Negahban. Understanding adversarial training: Increasing local stability of neural nets through robust optimization. arXiv preprint arXiv:1511.05432, 2015. 2 [28] M. Sharif, S. Bhagavatula, L. Bauer, and M. K. Reiter. Accessorize to a crime: Real and stealthy attacks on state-ofthe-art face recognition. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, CCS ’16, pages 1528–1540, New York, NY, USA, 2016. ACM. 2 [29] J. Stallkamp, M. Schlipsing, J. Salmen, and C. Igel. Man vs. computer: Benchmarking machine learning algorithms for traffic sign recognition. Neural networks, 32:323–332, 2012. 2 [30] C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013. 2
2cs.AI
Multi-Agent Shape Formation and Tracking Inspired from a Social Foraging Dynamics arXiv:1410.3864v2 [cs.NE] 16 Oct 2014 Debdipta Goswami1 , Chiranjib Saha2 , Kunal Pal3 , Nanda Dulal Jana4 and Swagatam Das5 1,2,3 Dept. of Electronics and Telecommunication Engineering, Jadavpur University, Kolkata 4 Department of Information Technology, National Institute Of Technology, Durgapur 5 Electronics and Communication Sciences Unit, Indian Statistical Institute, Kolkata E-mail: 1 debdipta [email protected], 2 [email protected], 3 [email protected], 4 [email protected] and 5 [email protected] Abstract. Principle of Swarm Intelligence has recently found widespread application in formation control and automated tracking by the automated multi-agent system. This article proposes an elegant and effective method inspired by foraging dynamics to produce geometric-patterns by the search agents. Starting from a random initial orientation, it is investigated how the foraging dynamics can be modified to achieve convergence of the agents on the desired pattern with almost uniform density. Guided through the proposed dynamics, the agents can also track a moving point by continuously circulating around the point. An analytical treatment supported with computer simulation results is provided to better understand the convergence behaviour of the system. 1 Introduction In recent years, pattern formation and control of multi-agent autonomous systems has the related research communities. With the tremendous advancement of technology, the interest is also growing in this field where a collection of agents can communicate with each other and also with the environment and can do jobs which are far beyond the capability of a single agent. Primary objective of multirobot pattern formation is to form a cohesive unit around the region of interest, surveillance and move in a specified disciple. Real-life applications of formation control can be found in multi-robot systems [1] [2], micro-satellite clusters [3], unmanned land, sea, or air vehicles [4], [5], rendezvous [4], and mobile robotics [6]. Common components of a generic shape-formation algorithm can be identified as [7], 1. a homogeneous architecture i.e. components with same hardware and software or heterogeneous with at least one single component having a different configuration, 2. formation control strategy, 3. a behavior based model 2 that describes the nature of the system and environment. Formation control strategy, the most decisive factor of an algorithm can be generally categorized in two primitive classes, centralized and decentralized. In centralized control, the agents follow a single controller that processes all the information while in later, each agent is equipped with its own controller and autonomous decision making capability. Both system has its advantages and disadvantages. Centralized control [8], [9], [10]., though is limited by the bandwidth of information exchange or communication between the agents, is more structured for increasing number of robots and complex situations while decentralized system [11], [12], [13], [14], [7] having local data processing and less information sharing: no reliability cam be attributed to a single robot or master, falls short when more sophisticated planning is necessary for high level control. Hence, hybrid algorithms have been developed employing both centralized and distributed control compromising the communication cost between the agents to add more robustness to the system [15], [16], [17], [18], [19]. Apart from architectural classifications, the algorithms, by nature can be categorized in three broad classes, namely, leader/neighbor following algorithms, potential field based algorithms, and bio-inspired algorithms. Leader/neighborfollowing algorithms [20], [21] require the individual robots to follow a trailing neighborhood of the leader or the leader itself, which contains all the global information, eg. the target shape position along with maintaining a specific geometric shape and avoiding collision with each other. This leader-follower approach was modified in [22] by adding a control graph that defines the relative position of each robot in the formation. Fredslund and Mataric [23] used local sensing and minimal communication between agents to preserve a predetermined formation. In a recent approach [24], feedback control and weight adaptation of the interconnect structure of the communication graph topology enhancing the Lyaponov stability has been proposed. The second category of the shape formation algorithms are based on potential field theory [25], [26], [3], [27], [28], [29], [30], [31]. Typically, a force field is created in the region of interest exerting attractive forces on the agents and the obstacles repelling them, the agents gradually through their directed motion converges to the target shape. Each agent moves along the gradient of the potential field which is the sum of these virtual attractive and repulsive forces. In [26], the authors represented the desired formation pattern in terms of queues and formation vertices. Some artificial potential trenches were employed to represent the desired pattern and trajectory for the group of robots. Although the method greatly improved on node to robot formation structures, queues and vertices were still calculated based on the formation and number of robots. Later a limited communication framework was utilized to improve the work of [26] in [30]. In [31], a set of artificial points is used as beacons that guide the robots to their goal. This approach is based on the geometric relationship between beacon points to move the robots in formation. In [3], a simple potential field based on scalar sigmoid scaling functions has been proposed where the diverging and converging forces with respect to the origin of a radial coordinate system balances along the target shape 3 and a third curl field exists along the pattern for further stability. The third group of algorithms draw their inspiration from biological systems. Biological systems, ranging from macroscopic swarms of social insects to microscopic cellular systems, can give rise to robust and complex emerging behaviors through much simpler local interactions in the presence of various kinds of uncertainties [32]. Several bio-inspired methods for multi-agent shape formation and control have been proposed over the past few years. Motivated by the cell structure, Fukuda et al. [33] presented an optimal structure decision method to determine cell type, arrangement, degree of freedom, and link length. They demonstrated that through simulating the cells behavior, multiple agents can form and maintain an optimal structure. Shen et al. [34] proposed a Digital Hormone Model (DHM) to control the tasking and executing of robot swarms based on local communication, signal propagation, and stochastic reactions. The authors employed Turings reaction diffusion model [35] to describe the interactions between the hormones. The DHM scheme integrated mechanisms of a dynamic network, stochastic action selection, and hormone reaction-diffusion. Taylor [36] proposed a Gene Regulatory Network (GRN) inspired real-time controller for a group of underwater robots to perform a simple clustering task. In that system, the robots can only adapt to local environmental changes without considering its influence on global behaviours. Guo et al. [37] further utilized the GRN inspired dynamics to devise a distributed self-organizing algorithm for swarm robot pattern formation. In [38], abstractions of morphogenesis in a network of molecular particles has been employed to manage the spatial self-organization in an ensemble of mobile robots without exploiting the common structural components of shape formation algorithms like global perception, distance and direction sensing intelligence. Apart from all these, few more approaches to formation control by using graph algorithms [22], [39], models of visual perception [40], model predictive control [41], reinforcement learning [42], and neural networks [43] have also been proposed in literature. Swarm Intelligence (SI) [44], [45] refers to a family of bio-inspired algorithms imitating the collectively intelligent behavior of the groups of natural creatures like bird flocks, fish schools, and insect colonies. One of the natural traits of such communal and cooperative systems is pattern formation. Gravagne and Marks proposed a swarm model [46] with very simple rule to update the agents and showed the emergent behaviors of aggressor, protector, and refugee swarms. Andrews et al. [47] used the social foraging behavior of swarm to design robust multi-agent systems. Particle Swarm Optimization (PSO) [48], [49] is one of the leading SI algorithms of current interest. The basic PSO was devised and is still most well-known as a function optimizer in the real-parameter space. In PSO, each trial solution is modelled as a particle and several such particles collectively form a swarm. Particles fly through the multi-dimensional search space following a typical dynamics and searching for the global optima. The PSO dynamics has been improved and rigorously analyzed by several researchers from an optimization point of view. However, very little research work has so far been undertaken to use the dynamics for some purpose like shape formation 4 and tracking, which is completely different from optimization on a functional landscape. At this point we would like to mention a more or less related work in [50], where a swarm of virtual particles, denoted as marching pixels, are crawling according to simple mathematical rules (though these are different from the basic PSO-dynamics) within a 2D pixel image to find the centroids of arbitrary geometrical figures. In this paper, we propose a simple method for formation of geometric pattern that utilizes a foraging dynamics equipped with a repulsion between nearest neighbours. The intended shape is given as input which we call the target vector to the swarm. The target vector is a parametric vector that defines the shape of the intended pattern and helps the swarm to converge on the desired shape. The stable region of the dynamics is used so that the agents can converge properly. The theoretical results are substantiated using computer simulations. The organization of the paper is as follows: the section II the proposed system is outlined; in section III the analytical treatment is carried out and the nature of the target vector for each shape is discussed; in section IV the experimental results with simple geometric shapes are shown, the importance of the repulsion between nearest neighbours is explained and the ability of the proposed model for automated tracking is briefly demonstrated. Section V deals with the conclusion and the future possibilities of research. 2 Proposed System The proposed system for automated shape formation has taken a cue from the foraging dynamics suggested by Das et al. in [51]. The basic position update mechanism of the foraging dynamics was given by, ẋi = M X j=1,j6=i k(p − xi ) k(xj − xi ) + 2 [σ 2 + kxj − xi k2 ]β [σ + kp − xi k2 ]β , (1) where p ∈ ℜn is the optimum of the artificial potential field considered to simulate the real world application. Here the swarm is being pushed or attracted towards p to achieve the desired goal. For shape formation purpose we want to modify this, dynamics so that the agents converge on a pre-defined shape with uniform spacing. k, σ and β are positive constant parameters as defined in [51]. One basic requirement for this is to attract each particle towards the boundary of the shape that we are intended to form. It is also desired that the particles will be equally spaced along the shape and remain uniformly separated from each other as much as possible. Hence, each particle should repel its nearest neighbour. Thus the directing equation of the swarm that helps to form different shapes are given by, ẋi = M X j=1,j6=i [σ 2 k2 (xT − xi ) k1 (xj − xi ) + 2 2 β + kxj − xi k ] [σ + kxT − xi k2 ]β xi (t) − xn (t) +r . kxi (t) − xn (t)k (2) 5 where xi (t) is the position vector of an individual in the swarm. xT (t) denotes the target vector which controls the motion of the individual and depends on the geometric structure to be formed and the position of the individual at time t. xn (t) is the position vector of the nearest individual of xi (t) ; || • || denotes the Euclidean distance function; k1 , k2 and r are constants. This first term is inspired from the mutual interaction of the agents in foraging dynamics, the second term is responsible to form a geometric structure based on an attraction. The third term is a mutual repulsion term introduced to ensure that the agents of the swarm do not agglomerate or collide with each other and thus maintaining a uniform density over the entire shape. If the repulsion term is absent, the swarm will still form the desired structure, however, the symmetry in the structure will be very poor. This has been illustrated in Section 4 through computer simulations. 3 Analytical Treatment The foraging dynamics proposed by [51] has distinct damped, limit-cyclic and chaotic behaviour in its stable region. For shape formation, it’s important that the agents will converge in the desired formation quickly. So the damped oscillatory behaviour is more appropriate to use. The aparameters of the dynamics have been so chosen that it remains within the limit of stable damped oscillatory behaviour. To form different shapes, different types of target vectors are necessary accordingly. In this section we discuss about the target-vectors needed to produce the patterns common in literature. 3.1 Straight Line For forming a straight line with equation: x1 = mx2 + c, the target vector xT (t) is given by: xT (t) =  (x1 + mx2 ) − mc m(x1 + mx2 ) + mc , 1 + m2 1 + m2 T . (3) For simulation purpose we use the following values to ensure the stable behaviour of the dynamics: k1 = 0.1, k2 = 2.0, σ = 3.5, β = 1.2, m = 1, c = 1. The initial values for the positions are taken randomly between -5 and 5. The solution for a single agent is shown in Figure 2a. 3.2 Ellipse To form an ellipse with the equation x2 x21 + 22 , the target vector needs to be 2 a b xT (t) = [a cos θ, b sin θ]T , (4) 6  ax2 . The swarm parameter values are kept same as that bx1 of the straight line case and the ellipse parameter values are set at a = 4 and b = 2. where θ = tan−1 3.3  Circle A circle is a special kind of ellipse where a = b = r0 and x21 + x22 = r02 , , being the equation of the circle, the target vector can be simply written as: xT (t) = [r0 cos θ, r0 sin θ]T , (5)   x2 where θ = tan . In this case r0 is taken as 4. The plot for a single agent’s x1 position w.r.t. time is shown in Figure 2b. −1 15 10 10 10 8 8 8 6 6 6 4 4 4 2 0 −2 2nd dimension 5 2nd dimension 2nd dimension 2nd dimension 10 2 0 −2 −4 2 0 −2 −4 −4 0 −6 −6 −8 −5 −10 −8 −6 −4 −2 0 2 4 6 8 −6 −8 −10 −10 10 −8 −6 −4 −2 0 2 4 6 8 −8 −10 −10 10 −8 −6 −4 −2 1st dimension 1st dimension (a) 2 4 6 8 −10 −8 10 −6 −4 −2 0 1st dimension (b) 15 0 2 4 6 8 10 1st dimension (c) (d) 10 10 10 8 8 8 6 6 6 4 4 4 dimension nd 0 −2 −4 2nd dimension 2 2 2 2nd dimension 5 nd dimension 10 2 0 −2 −4 2 0 −2 −4 0 −6 −5 −10 −8 −6 −4 −2 0 2 4 st 1 dimension (e) 6 8 10 −6 −6 −8 −8 −8 −10 −10 −10 −10 −10 −10 −8 −6 −4 −2 0 2 4 6 8 10 −8 −6 −4 −2 0 st 2 4 6 8 10 −8 −6 −4 −2 0 2 st 1 dimension 1 dimension (f) (g) (h) 1 dimension 4 6 8 10 st Fig. 1: 1a-1e Formation of a straight line; 1b-1f formation of a circle; 1c-1g formation of an ellipse; 1d-1h formation of a rectangle. 3.4 Square We consider a simple square with length of side 2a, the sides are parallel to the coordinate axes and the square is centered at origin. Mathematically it can be represented by two pair of parallel straight lines |x1 | = a and |x2 | = a within 7 the ranges |x1 | < a and |x2 | < a respectively. In this case, the target vector can be written as follows: π π <φ< 4 4 a π 3π T xT (t) = [ , a] , f or < φ < m 4 4 a 3π π T xT (t) = [− , −a] , f or − <φ<− m 4 4 xT (t) = [−a, −ma]T otherwise; xT (t) = [a, ma]T , f or − (6) (7) (8) (9) x2 and φ is the angle obtained when [x1 , x2 ] is transformed into x1 polar coordinates. The simulated position coordinates of a single agent is shown in Figure 2c while forming a square. where m = 5 2 1 st 1 nd 2 dimension st 1 dimension nd 2 dimension st 1 dimension 4 1 dimension nd 2 dimension 0.5 0 3 1 0 Position Position Position −1 2 −2 −3 −4 −0.5 −1 0 −5 −1.5 −1 −6 −2 0 20 40 60 80 100 120 140 160 180 200 −7 0 20 40 60 80 100 120 140 160 180 200 −2 0 20 40 60 80 100 Time Time Time (a) (b) (c) 120 140 160 180 200 Fig. 2: Variation of position of an agent with respect time for formation of straight line (2a), circle (2b) and rectangle (2c). a circle 4 4.1 Experimental Results Formation of Simple Patterns The proposed method is used to form simple structures like straight-lines, ellipses, circles and squares. For that purpose we have fixed our parameter values in the stable region of the dynamics as k1 = 0.1, k2 = 2.0, σ = 3.5, β = 1.2 and r = 0.1. Formation specific parameters are set as: m = 1, c = 5 for straight line; a = 4, b = 2 for ellipse and r0 = 4 for circle. For the case of formation of square, the used parameter a = 5. The final formations are presented in Figures 1a- 1h. The final positions of the agents are shown as the tiny filled circles and the targeted geometrical formations are drawn in dashed lines. 8 4.2 Usefulness of the repulsion term The usefulness of the repulsion term in equation (2) is also investigated. For this purpose, we again simulate the algorithm with the parameter settings r = 0 and in the other case r = 0.1; keeping the other parameters fixed at k1 = 0.1, k2 = 2.0, σ = 3.5 and β = 1.2, for a 12 agent swarm forming an ellipse and a square. The final formed structures are shown in Figure 3. In the first case, the repulsion term is absent, hence the agents do not communicate with each other and the final formation lacks from the problem of symmetry which can be overcome by introducing the repulsion term. This can be observed from Figure 3 very well. 4.3 Tracking Ability 10 8 8 6 6 4 4 dimension 10 2 nd 0 −2 2 2 nd dimension The proposed system can be used to track a moving point in real-time by surrounding it. This important property of continuously surrounding a moving point can be put to use in real life in case of the automatic protection of a convoy by swarm robots. The formation of circle can be used in this case for surrounding the moving point and the moving point can be treated as the center of the circle to be formed. To accomplish this the target vector has to be modified slightly as, 2 0 −2 −4 −4 −6 −6 −8 −10 −10 −8 −8 −6 −4 −2 0 2 1st dimension (a) Ellipse 4 6 8 10 −10 −10 −8 −6 −4 −2 0 2 4 6 8 10 1st dimension (b) Rectangle Fig. 3: Shape formation without repulsion xT (t) = [C1 (t) + r0 cos φ, C2 (t) + r0 sin φ]T , (10) where C(t) = [C1 (t), C2 (t)]T is the coordinate of the moving center. For experimental purposes, we considered two types of movements of the center: 9 10 15 t = 80 8 t = 120 t = 200 6 t = 160 2nd dimension 4 t = 120 5 t = 80 0 2 nd dimension 10 t = 40 t = 40 2 0 −2 −4 −6 −5 t = 160 −8 −10 −10 −8 −6 −4 −2 0 2 1st dimension (a) 4 6 8 10 −10 −10 t = 200 −8 −6 −4 −2 0 2 4 6 8 10 1st dimension (b) Fig. 4: Circle formed around the center which is moving in a straight line (4a) and circle (4b). – Straight Line The center moves along the straight line y = x with the initial position C(0) = [10, 10]T and with the uniform velocity vector vC (0) = [0.1, 0.1]T . The circle formation of a 10 agent swarm is considered with k1 = 0.1, k2 = 2.0, σ = 3.5, β = 1.2, r = 0.1 and r0 = 2 The snapshots of the swarms at iterations, t = 40, 80, 120, 160, and 200 are super-imposed in Figure 4a. The filled small circles denote the agents and the unfilled circles denote the position of the moving center at that point of time. It is clearly seen from the figure that the formed circle tracks the moving center or in other words the swarm is surrounding the center. In Figure 5a the movement of a single agent during tracking is shown along with the snapshots of the swarm. The trajectory of the agent closely resembles the trajectory of the moving point itself as expected. – Circle In this case, we consider that the center is moving along the circle x2 +y 2 = 62 with initial position C(0) = [6, 0]T and with a uniform angular velocity such that it completes a full rotation in T iterations. The parameter values of a 10 agent swarm are taken as k1 = 0.1, k2 = 2.0, σ = 3.5, β = 1.2, r = 0.1, r0 = 2 and T = 200. We got similar results as found in the case of the center following a line. The simulation results are shown in Figure 4b. The Figure 5b shows the trajectory of a single agent during tracking for circular motion of the moving point. 10 15 10 8 10 6 4 2nd dimension 2nd dimension 5 0 2 0 −2 −5 −4 −6 −10 −8 −15 −10 −8 −6 −4 −2 0 st 2 1 dimension (a) 4 6 8 10 −10 −10 −8 −6 −4 −2 0 2 4 6 8 10 st 1 dimension (b) Fig. 5: Trajectory of an agent during tracking the center which is moving in a straight line (5a) and circle (5b). 5 Conclusion This article proposed a simple but elegant method to form elementary geometric structure with multi-agent system. This method is partly inspired from a foraging dynamics where the agents communicate with each other to accomplish a common goal. The attractant-repellent profile and the convergence point of the dynamics is modified using a parametric target vector and an extra repulsion term among the nearest neighbours to meet the demand of target-shape and nearly even density of agents over it. Only simple geometric structures like straight line, ellipse, circle and square have been considered to keep the understanding of the swarm-mechanism easier and vivid. The tracking ability has also been demonstrated point moving along a straight line or around a circle and surrounding it with agents in desired shape. The future work in this field can extend to the formation of more complex geometric structures with their Cartesian or polar equation supplied. The emergence of deterministic chaos in the perspective of shape formation can also be investigated. References 1. J. Buhl, D. J. T. Sumpter, I. D. Couzin, J. J. Hale, E. Despland, E. R. Miller, and S. J. Simpson, “From disorder to order in marching locusts,” Science, vol. 312, no. 5778, pp. 1402–1406, 2006. 2. M. Egerstedt and X. Hu, “Formation constrained multi-agent control,” Robotics and Automation, IEEE Transactions on, vol. 17, no. 6, pp. 947–951, Dec 2001. 11 3. L. Barnes, M.-A. Fields, and K. Valavanis, “Swarm formation control utilizing elliptical surfaces and limiting functions,” Systems, Man, and Cybernetics, Part B: Cybernetics, IEEE Transactions on, vol. 39, no. 6, pp. 1434–1445, Dec 2009. 4. J. Fax and R. Murray, “Information flow and cooperative control of vehicle formations,” Automatic Control, IEEE Transactions on, vol. 49, no. 9, pp. 1465–1476, Sept 2004. 5. P. M. Buzogany, E. and J. dAzzo, “Automated control of aircraft in formation flight,” in Proc. AIAA Conf. Guidance, Navigation, and Control, p. 13491370. 6. H. Yamaguchi, T. Arai, and G. Beni, “A distributed control scheme for multiple robotic vehicles to make group formations,” Robotics and Autonomous Systems, vol. 36, no. 4, pp. 125 – 147, 2001. 7. J. Lin, K. Hwang, and Y. Wang, “A simple scheme for formation control based on weighted behavior learning,” Neural Networks and Learning Systems, IEEE Transactions on, vol. 25, no. 6, pp. 1033–1044, June 2014. 8. S. Zelinski, T.-J. Koo, and S. Sastry, “Optimization-based formation reconfiguration planning for autonomous vehicles.” in ICRA. IEEE, 2003, pp. 3758–3763. 9. R. Saber, W. Dunbar, and R. Murray, “Cooperative control of multi-vehicle systems using cost graphs and optimization,” in American Control Conference, 2003. Proceedings of the 2003, vol. 3, June 2003, pp. 2217–2222 vol.3. 10. L. Chaimowicz and V. Kumar, “Aerial shepherds: Coordination among uavs and swarms of robots,” in Distributed Autonomous Robotic Systems 6, R. Alami, R. Chatila, and H. Asama, Eds. Springer Japan, 2007, pp. 243–252. 11. J. Lawton, R. Beard, and B. Young, “A decentralized approach to formation maneuvers,” Robotics and Automation, IEEE Transactions on, vol. 19, no. 6, pp. 933–941, Dec 2003. 12. T. Balch and R. Arkin, “Behavior-based formation control for multirobot teams,” Robotics and Automation, IEEE Transactions on, vol. 14, no. 6, pp. 926–939, Dec 1998. 13. T. Huntsberger, P. Pirjanian, A. Trebi-Ollennu, H. Das Nayar, H. Aghazarian, A. Ganino, M. Garrett, S. Joshi, and P. Schenker, “Campout: a control architecture for tightly coupled coordination of multirobot systems for planetary surface exploration,” Systems, Man and Cybernetics, Part A: Systems and Humans, IEEE Transactions on, vol. 33, no. 5, pp. 550–559, Sept 2003. 14. L. Consolini, F. Morbidi, D. Prattichizzo, and M. Tosques, “Leader-follower formation control of nonholonomic mobile robots with input constraints,” Automatica, vol. 44, no. 5, pp. 1343–1349, 2008. 15. L. Chaimowicz, N. Michael, and V. Kumar, “Controlling swarms of robots using interpolated implicit functions,” in Robotics and Automation, 2005. ICRA 2005. Proceedings of the 2005 IEEE International Conference on, April 2005, pp. 2487– 2492. 16. K. Fujibayashi, S. Murata, K. Sugawara, and M. Yamamura, “Self-organizing formation algorithm for active elements,” in Reliable Distributed Systems, 2002. Proceedings. 21st IEEE Symposium on, 2002, pp. 416–421. 17. A. Jadbabaie, J. Lin, and A. Morse, “Coordination of groups of mobile autonomous agents using nearest neighbor rules,” Automatic Control, IEEE Transactions on, vol. 48, no. 6, pp. 988–1001, June 2003. 18. M. Hsieh, S. Loizou, and V. Kumar, “Stabilization of multiple robots on stable orbits via local sensing,” in Robotics and Automation, 2007 IEEE International Conference on, April 2007, pp. 2312–2317. 12 19. L. Barnes, M.-A. Fields, and K. Valavanis, “Swarm formation control utilizing elliptical surfaces and limiting functions,” Systems, Man, and Cybernetics, Part B: Cybernetics, IEEE Transactions on, vol. 39, no. 6, pp. 1434–1445, Dec 2009. 20. G. Mariottini, F. Morbidi, D. Prattichizzo, G. Pappas, and K. Daniilidis, “Leader-follower formations: Uncalibrated vision-based localization and control,” in Robotics and Automation, 2007 IEEE International Conference on, April 2007, pp. 2403–2408. 21. J. Shao, G. Xie, and L. Wang, “Leader-following formation control of multiple mobile vehicles,” Control Theory Applications, IET, vol. 1, no. 2, pp. 545–552, March 2007. 22. J. P. Desai, “A graph theoretic approach for modeling mobile robot team formations,” J. Field Robotics, vol. 19, no. 11, pp. 511–525, 2002. 23. J. Fredslund and M. J. Mataric, “A general algorithm for robot formations using local sensing and minimal communication,” IEEE T. Robotics and Automation, vol. 18, no. 5, pp. 837–846, 2002. 24. U. Pilz and H. Werner, “Convergence speed in formation control of multi-agent systems - a robust control approach,” in Decision and Control (CDC), 2013 IEEE 52nd Annual Conference on, Dec 2013, pp. 6067–6072. 25. S. S. Ge, C.-H. Fua, and K.-W. Lim, “Multi-robot formations: queues and artificial potential trenches,” in Robotics and Automation, 2004. Proceedings. ICRA ’04. 2004 IEEE International Conference on, vol. 4, April 2004, pp. 3345–3350 Vol.4. 26. V. Gazi, “Swarm aggregations using artificial potentials and sliding-mode control,” Robotics, IEEE Transactions on, vol. 21, no. 6, pp. 1208–1214, Dec 2005. 27. D. Kim, H. Wang, G. Ye, and S. Shin, “Decentralized control of autonomous swarm systems using artificial potential functions: analytical design guidelines,” in Decision and Control, 2004. CDC. 43rd IEEE Conference on, vol. 1, Dec 2004, pp. 159–164 Vol.1. 28. N. Leonard and E. Fiorelli, “Virtual leaders, artificial potentials and coordinated control of groups,” in Decision and Control, 2001. Proceedings of the 40th IEEE Conference on, vol. 3, 2001, pp. 2968–2973 vol.3. 29. S. Zelinski, T.-J. Koo, and S. Sastry, “Optimization-based formation reconfiguration planning for autonomous vehicles,” in ICRA, 2003, pp. 3758–3763. 30. C.-H. Fua, S. Ge, K. D. Do, and K.-W. Lim, “Multirobot formations based on the queue-formation scheme with limited communication,” Robotics, IEEE Transactions on, vol. 23, no. 6, pp. 1160–1169, Dec 2007. 31. T. Balch and M. Hybinette, “Social potentials for scalable multi-robot formations,” in Robotics and Automation, 2000. Proceedings. ICRA ’00. IEEE International Conference on, vol. 1, 2000, pp. 73–80 vol.1. 32. K. Kelly, “Out of control: the new biology of machines, social systems and the economic world,” 1995. 33. T. Fukuda, S. Nakagawa, Y. Kawauchi, and M. Buss, “Structure decision method for self organising robots based on cell structures-cebot,” in Robotics and Automation, 1989. Proceedings., 1989 IEEE International Conference on, May 1989, pp. 695–700 vol.2. 34. W.-M. Shen, P. Will, A. Galstyan, and C.-M. Chuong, “Hormone-inspired selforganization and distributed control of robotic swarms,” Autonomous Robots, vol. 17, no. 1, pp. 93–105, 2004. 35. A. Turing, “The chemical basis of morphogenesis,” 1952, pp. 37–72. 36. T. Taylor, “A genetic regulatory network-inspired real-time controller for a group of underwater robots.” 13 37. H. Guo, Y. Meng, and Y. Jin, “Swarm robot pattern formation using a morphogenetic multi-cellular based self-organizing algorithm,” in Robotics and Automation (ICRA), 2011 IEEE International Conference on, May 2011, pp. 3205–3210. 38. K. Yeom, “Bio-inspired automatic shape formation for swarms of selfreconfigurable modular robots,” in Bio-Inspired Computing: Theories and Applications (BIC-TA), 2010 IEEE Fifth International Conference on, Sept 2010, pp. 469–476. 39. J. R. Spletzer, A. K. Das, R. Fierro, C. J. Taylor, V. Kumar, and J. P. Ostrowski, “Cooperative localization and control for multi-robot manipulation,” in IROS, 2001, pp. 631–636. 40. A. K. Das, R. Fierro, V. Kumar, J. P. Ostrowski, J. Spletzer, and C. J. Taylor, “A vision-based formation control framework,” Robotics and Automation, IEEE Transactions on, vol. 18, no. 5, pp. 813–825, 2002. 41. W. Dunbar and R. Murray, “Model predictive control of coordinated multi-vehicle formations,” in Decision and Control, 2002, Proceedings of the 41st IEEE Conference on, vol. 4, Dec 2002, pp. 4631–4636 vol.4. 42. T. N. Kobayashi, F. and F. Kojima, “Reformation of mobile robots using genetic algorithm and reinforcement learning,” in In SICE Annu. Conf, pages 29022907, 2003. 43. K. Hirota, T. Kuwabara, K. Ishida, A. Miyanohara, H. Ohdachi, T. Ohsawa, W. Takeuchi, N. Yubazaki, and M. Ohtani, “Robots moving in formation by using neural network and radial basis functions,” in Fuzzy Systems, 1995. International Joint Conference of the Fourth IEEE International Conference on Fuzzy Systems and The Second International Fuzzy Engineering Symposium., Proceedings of 1995 IEEE Int, vol. 5, Mar 1995, pp. 91–94 vol.5. 44. E. Bonabeau, M. Dorigo, and G. Theraulaz, Swarm Intelligence - From Natural to Artificial Systems, ser. Studies in the sciences of complexity. Oxford University Press, 1999. 45. J. Kennedy, R. Eberhart, and Y. Shi, “Swarm intelligence,” The Chemical Educator, vol. 7, no. 2, pp. 123–124, 2002. 46. I. Gravagne and R. Marks, “Emergent behaviors of protector, refugee, and aggressor swarms,” Systems, Man, and Cybernetics, Part B: Cybernetics, IEEE Transactions on, vol. 37, no. 2, pp. 471–476, April 2007. 47. B. Andrews, K. Passino, and T. Waite, “Social foraging theory for robust multiagent system design,” Automation Science and Engineering, IEEE Transactions on, vol. 4, no. 1, pp. 79–86, Jan 2007. 48. J. Kennedy and R. Eberhart, “Particle swarm optimization,” in Neural Networks, 1995. Proceedings., IEEE International Conference on, vol. 4, Nov 1995, pp. 1942– 1948 vol.4. 49. Y. del Valle, G. K. Venayagamoorthy, S. Mohagheghi, J.-C. Hernandez, and R. G. Harley, “Particle swarm optimization: Basic concepts, variants and applications in power systems,” IEEE Trans. Evolutionary Computation, vol. 12, no. 2, pp. 171–195, 2008. 50. M. Komann, A. Kröller, C. Schmidt, D. Fey, and S. P. Fekete, “Emergent algorithms for centroid and orientation detection in high-performance embedded cameras,” in Conf. Computing Frontiers, 2008, pp. 221–230. 51. S. Das, D. Goswami, S. Chatterjee, and S. Mukherjee, “Stability and chaos analysis of a novel swarm dynamics with applications to multi-agent systems,” Engineering Applications of Artificial Intelligence, vol. 30, no. 0, pp. 189 – 198, 2014. [Online]. Available: http://www.sciencedirect.com/science/article/pii/S0952197613002480 10 8 6 2nd dimension 4 2 0 −2 −4 −6 −8 −10 −10 −8 −6 −4 −2 0 2 1st dimension 4 6 8 10
9cs.NE
arXiv:1710.03881v1 [cs.SY] 8 Oct 2017 Artificial Bee Colony-based Adaptive Position Control of Electrohydraulic Servo Systems with Parameter Uncertainty Babajide O. Ayinde Electrical and Computer Engineering University of Louisville Louisville, KY 40218 [email protected] Sami El-Ferik Department of Systems Engineering King Fahd University of Petroleum and Minerals Dhahran, 31261, Saudi Arabia Abstract In this paper, a robust adaptive backstepping-based controller is developed for positioning the spool valve of Electro-Hydraulic Servo System (EHSS) with parameter fluctuations. Artificial Bee Colony (ABC) algorithm is utilized to drive the parameters of the proposed controller to a good neighborhood in the solution space. The optimization problem is formulated such that both the tracking error and control signal are minimized concurrently. The results show that the proposed controller guarantees the uniform ultimate boundedness of the tracking error and control signal. Moreover, illustrative simulations validate the potentials and robustness of the proposed schemes in the presence of uncertainties. The proposed controller is also compared with sliding mode control. Keywords: Electro-hydraulic systems, backstepping control, nonlinear systems, adaptive control, artificial bee colony 1 Introduction The need for fast and powerful responses in many industrial applications has made the ElectroHydraulic Servo Systems (EHSS) very popular. Although EHSS are very useful in many industrial applications, ranging from aerospace flight control to manufacturing. In seismic applications, EHSS is one of the major components in Vibroseis [1]. However, all the aforementioned applications demand high precision control of the system’s output. Many factors such as fluid inflow-outflow in the servo valve and friction on actuator-valve moving parts contribute to the nonlinearity in the system dynamics. Also, phenomena such as entrapment of air inside the hydraulic valve, parameter variations (due to temperature changes), unknown model errors and perturbations elevate the complexity of controller design. Many methodologies have been developed to address this challenging task. In spite of all the nonlinear behaviors of the EHSS, linear control theories have been used for developing reasonably working controllers. One drawback of using this approach is that linear control analysis breaks down with changing operating conditions and uncertainties. The performance of linear controller was enhanced using a feedback-feedforward iterative learning controller [2], and the problem of parameters variation was addressed using adaptive schemes [3, 4]. 1 Even though adaptivity can greatly handle the problem of parameter variation, traditional adaptive schemes suffer a serious setback especially when system to be controlled is not linear in parameters and/or if the dynamics has uncertain or unmodeled part. Unfortunately, EHSS falls under the category of such systems with parameter variations and uncertain dynamics. For instance, EHSS parameters such as supply pressure and mass of the load/piston varies with surrounding conditions. Lyapunov approach was used in [1] to design an enhanced feedback linearization-based controller for EHSS with supply pressure uncertainties, however, the effect of unknown disturbance at level of the velocity was not taken into account. This ultimately narrows the scope of the design. Backstepping is one of the design strategies that employs a progressive approach to formulate the control law [5] and it is generally used for designing stabilizing controls for some class of dynamical nonlinear systems. This method is developed by inserting new variables that depends on the state variables, controlling parameters and the stabilizing functions. The essence of this stabilizing function is to redress any nonlinearity that can impede the stability of the system. Due to the stepwise nature of the control design, formulation of the controller generally starts with a well known stable system. Subsequently, virtual controllers are employed to stabilize the outer subsystems progressively. The process of using the virtual controllers in the stabilization of the subsystem continues until the external control is accessible. In fact, it has been shown that backstepping technique can be used to force nonlinear systems to behave like a linear system transformed into a new set of coordinates. One of the numerous advantages of using backstepping technique to design a controller is its ability to avoid useful nonlinearity cancelation [6, 7]. The objective of backstepping gravitates towards stabilization and tracking in contrast with its corresponding feedback linearization method. This facilitates controller designs for perturbed nonlinear system even if the perturbation is nowhere around the equation containing the input. Backstepping method is generally used for tracking and regulation problems [5]. In [8], backstepping-based neural adaptive technique was used for velocity control of EHSS with internal friction, flow nonlinearity, and noise. However, the effect of external disturbance was not considered. More specifically, EHSS are prone to parameter variations due to temperature change. For instance bulk modulus and viscous friction coefficients are prone to variation due to fluctuations in temperature. Owing to this fact, the need to design a controller that adapts to these changes is of paramount importance. One important consideration that has to be carefully addressed in many mechanical systems is friction [9]. A LuGre model-based adaptive control scheme was proposed to model and estimate the frictional effect [2]. This approach does not only account for frictional effect, but also offers good disturbance rejection and robustness to uncertainties. Variable structure controllers have also been used to model both friction and load as external disturbances [10]. Feedback controller with autodisturbance rejection has also been shown to control the position of EHSS with both internal and external disturbances [11]. System model identification technique has also been used to estimate the model of EHSS and adaptive Fuzzy PID controller was developed for position control [12]. The problem of external load variation and coulomb friction have been mitigated using a nonlinear adaptive feedback linearization position control scheme with load disturbance rejection and friction compensation [13]. Dynamic particle swarm optimization-based algorithm has been proposed to optimize the control parameters and improve the tracking performance of the closed loop system [14]. Evolutionary techniques are gaining popularity among the researchers in the last few decades due to their ability to localize global optima, or in some cases, good local optima [15, 16]. In this work, Artificial Bee Colony (ABC) [17, 18] is proposed to tune the parameters of the controller for optimality. Significance of ABC have been shown in path planning of multi robot and other control applications [19]. This paper proposes a backstepping-based approach to design a robust adaptive controller for a highly nonlinear EHSS - a single input single output (SISO) system. The EHSS consists of a fourway spool valve supplying a double effect linear cylinder with a double rodded piston. The piston drives a load modeled by mass, spring and a sliding viscous friction. Under the proposed adaptive controller, a practical stability of the closed loop system is ensured and the uniform ultimate boundedness of the tracking error is guaranteed. ABC is used to tune the controller parameters by minimizing both the tracking error and control signal. The rest of this paper is organized as follows: Section II presents the formulation of the problem and section III presents the adaptive controller design. Section IV discusses the ABC optimization and its implementation for the proposed adaptive backstepping controller. Section V discusses the simulation results and finally, section VI concludes the paper. 2 x2 , x 3 S m0 kl m P1 , V 1 P2 , V 2 b u Pr Ps Figure 1: Electro-hydraulic System 2 System Model and Problem Formulation The dynamics of the EHSS are highly nonlinear due to many factors such as friction on the actuators, fluid inflow and outflow in the valve. Moreover, entrapment of air and several other phenomena such as parameter variations, unknown model errors aggravates the complexity of the control design. The EHSS model in Fig. 1 with dynamics given below in 1 is considered. ẋ1 = ẋ2 = p 4B Vt (ku 1 mt (Sx1 Pd − sign(u)x1 − αx1 1+γ|u| − Sx2 ), (1) − bx2 − βx3 ), ẋ3 = x2 + d(t). where β = (kl + ∆ kl ). x1 is the differential pressure between the two chambers, x2 and x3 are the velocity and position of the rod respectively. kl + ∆ kl denotes the uncertain spring stiffness and b is the viscous damping coefficient, Vt is the total volume of the forward and return chambers, Pd is the supply and return pressure difference while mt is the total mass of the load and piston. B and S are the bulk modulus and net cross-sectional area of one side of the piston respectively. k, γ , α are intrinsic constants of the servo valve; γ and α are used to model the leakage in the servo valve. In the sequel, we consider the following assumptions hold: Assumption 1 1. d(t) is an unknown but bounded disturbance with |d(t)| < dmax . 2. ∆kl is unknown and bounded with |∆kl | < ∆klmax . 3. The dynamics of the spool-valve is assumed fast enough so it can be ignored in the dynamic model. 4. The states of the system are available for controller design. 5. Reference input (r(t)) is a known continuously differentiable bounded trajectory. The nonlinearities with respect to the input u in the dynamics of the system makes it challenging to control the output of the system. We are able to circumvent this challenge by designing a backstepping based controller that will drive the position of the rod to a desired reference r(t). In order to use the backstepping method to design the controller, a re-indexing of the states variables is needed to transform the system into its standard strict feedback form. Let ξ1 = x3 , ξ 2 = x2 , ξ 3 = x1 . (2) The dynamics of the transformed system is then given in Eq. (3) ξ˙1 = ξ2 + d(t), ξ˙2 = 1 mt (Sξ3 − bξ2 − βξ1 ), p ξ˙3 = 4B Vt (ku Pd − sign(u)ξ3 − 3 (3) αξ3 1+γ|u| − Sξ2 ). y(t) Transformed Dynamics ˙ = Aξ(t) + Bf(ξ, u, t) + g(y, u) ξ(t) y = Cξ(t) ξ ξ Adaptive Feedback u θ̂, θ̂d + Error e1 e2 e3 r(t) Adaptation Laws 1 s ˙ ˙ θ̂ , θ̂d v Figure 2: Adaptive Control Scheme Let e1 = ξ1 − r, e2 = ξ2 − ṙ, e3 = f (ξ) − r̈, (4) where f (ξ) = ξ˙2 , the error dynamics satisfy ė1 = e2 + d, ė2 = e3 , ... ė3 = ( ∂f∂ξ(ξ) )ξ˙ − r . 3 (5) Adaptive Control Law Design More often than not, EHSS parameters are subject to variations due to temperature rise. Owing to the fact that backstepping controller design relies on actual system’s parameters, the need arises to design a controller that adapts to these changes. To overcome the problem of variation in parameters, adaptive control schemes are generally employed. In this section, we propose a backstepping-based adaptive technique that is robust to uncertainties in the system’s parameters and external disturbance. We assume the parameters of the load (that is β) and b are unknown nonlinear functions whose parameters will be estimated by the adaptive scheme. The schematic of the proposed backsteppingbased adaptive strategy is shown in Fig 2 below. We also considered a scenario whereby a more complicated vibrator-ground model can result due to the non-ideal contact stiffness that may exist at the boundary interaction between the vibrator’s baseplate and ground as depicted in Fig. 3. In order to achieve this, we replaced β and b as given in (6). β = γ3 ξ12 + γ4 ξ22 + γ5 ξ32 = θT φ(ξ) b = b0 + ∆f (ξ, b0 ) (6) where ∆f (ξ, b0 ) is unknown but bounded nonlinear function that satisfies (7) sup |∆f (ξ, b0 )| ≤ Fmax t≥0 4 (7) x2 , x 3 u P1 , V 1 m0 Pr P2 , V 2 Ps S Baseplate Mass (mb ) Contact Stiffness k1 k2 k3 . . . . . . . . k4 br kn Captured Ground Mass (mg ) Ground kg1 Model kg2 kg3 . . . . . kg4 kgn bg Deep Ground Figure 3: A more detailed vibrator-ground model prototype [20] Now, the error dynamics are given as: ė1 = e2 + d, ė2 = e3 , ė3 = + b0 T θ φ(ξ)ξ1 m2t (− bm0 S2 t − + (− m1t θT φ(ξ) + 4BSα mt Vt (1+γ|u|) )ξ3 + ∆F2 ξ2 − ∆F3 ξ3 − b20 m2t − 4BS 2 mt Vt )ξ2 (8) T + ∆F1 θ φ(ξ)ξ1 ... − r + Am(t)u. θdT φ(ξ)d(t) where, θdT φ(ξ) = mβt and ξ is a state vector comprising of ξ1 , ξ2 and ξ3 . Now, the goal is to design an adaptive feedback such that: lim |ξ1 − r(t)| ≤ δ t→∞ (9) where, δ is a sufficiently small positive number. The design task is to make δ as small as possible and at the same time ensuring smooth control law. The following gives the control design schemes. ∆F1 = ∆f (ξ,b0 ) m2t ∆F2 = 1 (2b0 ∆f (ξ, b0 ) m2t ∆F3 = S ∆f (ξ, b0 ) m2t ≤ Fmax 3 + ∆f 2 (ξ, b0 )) ≤ Fmax (10) ≤ Fmax Theorem 1 Given that α4 = 3 2 + λ, α5 = 1 + α6 = 1 λ4 . 5 1 λ3 + 1 2λ , (11) and h(e) = α4 e1 + α5 e2 + α6 e3 g(e, ξ) = e2 + λe1 + α4 e2 + α5 e3 b2 + α6 ( m02 − t α6 b0 , m2t A1 = 4BS 2 mt Vt )ξ2 − α6 mt A2 = b0 S ξ m2t 3 A3 = (12) 4BSαα6 mt Vt θ̃ = θ − θ̂ and let the adaptation law be given as ˙ θ̂ = γ6 (A1 h(e)φ(ξ)ξ1 − A2 h(e)φ(ξ)ξ2 + α6 Fmax |ξ1 |φ(ξ)) ˙ θ̂d = −γ7 α6 φ(ξ)dmax and let the adaptive feedback be given as  mt Vt u = 4α SBkmin(√ P −ξ 3 d (13)  √ 3 , Pd +ξ3 v (14) where, v = − (|g(e, ξ)| + |α4 − α6 θ̂dT φ(ξ)|dmax + Φ(ξ, θ̂) 3 + α6 |ξ3 |Fmax + α6 |ξ2 |Fmax ) − ko h(e) (15) Then, system (3) under the adaptive feedback control law given in (14) is practically stable and the solution of the error dynamic (8) is globally uniformly ultimately bounded with ultimate bound satisfying the following condition ||e||2 ≤ d2max d2max ≤ λ σmin (φφT ) 2 (λ + λ5 ) σmin (φφT ) (16) with  1 φ= 0 0 λ 1 0 α1 λ2 α2 λ2 α3 λ2  (17)  Proof 1 To prove the boundedness of the error dynamics, we again choose the Lyapunov functions as follows: V1 = 21 e21 , V2 = 1 2λ4 (e2 + λe1 )2 V3 = 21 (α4 e1 + α5 e2 + α6 e3 )2 V4 = 1 T T 2γ6 θ̃ θ̃ + 1 ˜ 2γ7 θd 2 (18) , and again using the Young’s inequality with λ > 0 then, V̇ = V̇1 + V̇2 + V̇3 + V̇4 (19) Therefore, the derivative of the Lyapunov function is thus given: 1 V̇ ≤ − λ2 e21 + ( 2λ + + h(e)[g(e, ξ) + 2 2 1 2λ5 )d − (e2 + λe1 ) A1 θ̃T φ(ξ)ξ1 + A1 θ̂T φ(ξ)ξ1 − A2 θ̃T φ(ξ)ξ2 − A2 θ̂T φ(ξ)ξ2 − A3 1+γ|u| )ξ3 + α4 d + α6 ∆F1 θ̃T φ(ξ)ξ1 + α6 ∆F1 θ̂T φ(ξ)ξ1 α6 θ̃dT φ(ξ)d(t) + α6 ∆F2 ξ2 − α6 ∆F3 ξ3 − ... − α6 θ̂dT φ(ξ)d(t) − α6 r + α6 Am(t)u] ˙ ˙ − γ16 θ̃T θ̂ − γ17 θ̃d θ̂d 6 (20) In order to annihilate the parametric error, the update laws are chosen as in (13) Given that Fmax = supt≥0 |∆F1 | and dmax = supt≥0 |d(t)|, and to ensure a uniformly ultimately bounded tracking error, adaptive feedback “u” is chosen as given in (14) and v is given as follows: v = −(|g(e, ξ)| + |α4 − α6 θ̂dT φ(ξ)|dmax + Φ(ξ, θ̂) 3 + α6 |ξ3 |Fmax + α6 |ξ2 |Fmax ) − ko h(e) (21) Ultimately, 1 V̇ ≤ − λ2 e21 + ( 2λ + − (α1 e1 + 2 1 2λ5 )d − α2 e2 + α3 e3 )2 (e2 + λe1 )2 (22) Therefore,for V̇ ≤ 0, it is sufficient to verify that −V + λ1 d2max ≤ 0. Which means that V̇ ≥ 0 if e is such that V ≤ λ1 d2max . This will lead to increasing e until V ≥ λ1 d2max . Let z = φT e, with  1  √ λ α1 2 φ= 0 (23) 1 α2  0 0 α3 Using (23), V can be rewritten as V = z T z = ||z||2 . On the other hand, σmin (φφT )||e||2 ≤ V = ||z||2 ≤ σmax (φφT )||e||2 (24) where σmin (φφT ) and σmax (φφT ) represent the max and min singular values of φφT respectively. Since the Lyapunov function satisfies (22) for all t ∈ <≥0 , this implies that the whole time during which the adaptation take place is finite. During the finite time, the variables θ̂ and θ̂d cannot escape to infinity since the adaptation laws in (13) are well defined. For any bounded conditions e(0), θ̂(0) and θ̂d (0) and by making use of (22), we infer that e, θ̂ and θ̂d are bounded for all t ∈ <≥0 . The proof ends here. Remark 1 The parameter λ is a design parameter introduced in Young’s inequality. Such parameter should be selected as big as possible to decrease the ultimate bound in the tracking error dynamic. Nevertheless, a trade-off must be made, since the larger the value of λ the more oscillatory is the transient and higher is the control input. However,  has to be chosen sufficiently small and its choice is neither dependent on system’s parameters nor the bound of the disturbance. The proposed controller has parameters that should be carefully selected for optimal performance of the closed loop system. In this work, the ABC technique is employed for optimal setting of the controller parameters λ and γ1 based on a preassigned objective function minimization. The proper selection of these parameters will be reflected on minimizing the objective function. The proposed objective function is defined by the error and control signal. Obj = tX sim Γ1 e21 (t) + Γ2 u2 (t)  (25) t=0 where the tracking error e1 (t) = ξ1 − r(t) and u(t) is the control signal, Γ1 and Γ2 are weighting parameters. The controller’s parameters are selected within the bounds: λmin ≤λ ≤ λmax γ1min ≤γ1 ≤ γ1max 4 ABC Algorithm Artificial Bees Colony is a meta-heuristic approach that gained its inspiration from the work proposed in [17]. The algorithm is motivated from the way life is structured in the colony of natural bees. The bees in the colony are usually divided into three groups: employed, onlooker and scout bees. The primary assignment of the employed bees is to randomly search for food and the best solution of the food is identified as the optimal solution. The employed bees dance in a systematic 7 manner for the purpose of relaying information about the food source and the amount of nectar to other bees in the colony. Onlooker bees differentiate between the good and the bad food sources based on the dance length, dance type and speed of shaking of the employed bees. Onlooker bees also use these information to establish the quality of food. The scout bees are chosen from the onlooker bees prior a new search for food. The onlooker and scout bees may decide to switch roles with the employed bees depending on the quality of food [18]. As detailed in [18], the employed and onlooker bees are responsible for searching the solution space for the optimal parameters while the scout bees control the search process. The summary of the ABC algorithm is shown in the flowchart of Fig. 4 and the solution of the optimization problem is the position of the food source while the amount of nectar with respect to the quality is termed as the objective function of the optimization procedure. The position of the food source in the search space can be described as follows: old xnew = xold ij ij + u(xij − xkj ) (26) Figure 4: Artificial Bee Colony Algorithm The probability of onlooker bees for choosing a food source: Pi = f itness1 PEb i=1 f itnessi (27) where, x is a candidate solution, Pi is the probability of onlooker solution, i = 1, 2, · · · , Eb is the half of the colony size, j = 1, 2, · · · , D and and j is the number of positions with D dimension where D refers to number of parameters to be optimized, f itnessi is the fitness function, k is a 8 random number where k ∈ (1, 2, · · · , Eb ), u is random number between 0 and 1. 5 Results and Discussions The problem is divided into two stages. In the first stage, the proposed backstepping controller (BSC) was implemented without ABC algorithm and in the second stage, ABC algorithm is incorporated with the proposed controller for optimal parameter tuning. The tracking capability of both stages is evaluated using constant, sum of sinusoidal, and sinusoidal reference inputs. The objective function of the optimization procedure is formulated as: Obj = 20 X Γ1 e21 (t) + Γ2 u2 (t) (28) t=0.01 9 ≤λ ≤ 16 −7 10 ≤γ1 ≤ 10−10 In the optimization algorithm, the number of parameters to be optimized are λ and γ1 , the population size is selected as 50 and the number of generations is 100, and the search space was constrained as given in (28). The weighted values of Γ1 and Γ1 were chosen to be 1. For experimental purpose, Fmax is chosen to be 10. Adaptive backstepping controller with ABC-based optimizer is deployed on the system model in (3). It must be remarked that this is a minimization task. The parameters of the system’s model are given in table 1 Table 1: Numerical values for simulations Parameters Value Units B 2.2e9 Pa Pr 1e5 Pa Vt 1e−3 m3 S 1.5e−3 m2 γ 8571 s−1 b 590 kg s−1 ∆kl 2500 N m−1 kl 12500 N m−1 Ps 300e5 Pa mt 70 k α kg 5.12e−5 4.1816e − 12 3 −1 m s A−1 P a1/2 3 −1 m s P a−1 The simulation is implemented for 20 seconds and the values of error and control signal are captured every 0.01 second. In the first set of experiments, the reference input is a step function with r(t) = 0.2. The simulation was carried out 8 times with different initial populations in order to ensure the robustness of the proposed solution. As shown in Table 2, the objective functions were close in all experiments and Fig. 5 shows the output performance of the proposed BSC with optimized parameters γ1 ≤ 10−10 and λ ≤ 13.5585. Although steady state error is not equal to zero due to the disturbance (d(t) = 0.1), the error and control signal are bounded and the output performance is very close to the reference. The performance of the proposed controller was also compared with sliding mode controller (SMC) and it can be seen that even though the SMC achieved smaller tracking error, there is output chattering even at steady state. However in the case of the proposed controller tuned with ABC, the control signal is smooth and the transient oscillations have been eliminated. ABC was able to find the best compromise solution by simultaneously minimizing the tracking error and 9 Table 2: Minimum objective function with optimal parameters. Experiment No 1 Objective 2.1368 2 2.1368 3 2.1368 4 2.1368 5 2.1369 6 2.1368 7 2.1368 8 2.1369 10−10 10−10 10−10 10−10 10−10 10−10 10−10 10−10 γ1 λ 13.5585 13.5580 13.5583 13.5585 13.5580 13.5585 13.5581 13.5589 output oscillations in both transient and steady state. Also, as shown in Fig. 6 the control signal is minimized and smooth for ABC-based BSC compared to both SMC and BSC without ABC tuning. 0.25 Output (ξ1) 0.2 0.205 0.2 3.8 3.85 0.15 0.1 SMC BSC with ABC BSC 0.05 0 0 1 2 time (s) 3 4 Figure 5: Output performance of adaptive backstepping after ABC optimization with r = 0.2m Control input (Amp) 0.05 SMC BSC with ABC BSC 0.04 0.03 x 10 0.02 −3 2 0 −2 3.88 3.9 3.92 0.01 0 −0.01 0 1 2 time (s) 3 4 Figure 6: Control input of adaptive backstepping after ABC optimization with r = 0.2m 10 0.4 Output (ξ1) 0.3 0.31 0.3 0.29 3.6 3.8 0.2 SMC BSC with ABC BSC 0.1 0 0 1 2 time (s) 3 4 Figure 7: Output performance of adaptive backstepping after ABC optimization with r = 0.3m Control input (Amp) 0.15 SMC BSC with ABC BSC 0.1 −3 x 10 2 0 −2 3.6598 3.66 0.05 0 −0.05 0 1 2 time (s) 3 4 Figure 8: Control input of adaptive backstepping after ABC optimization with r = 0.3m It must be noted that the proposed adaptive design does not involve the differentiation of m(t), which indicates the proposed scheme can handle the effects of various types of slowly time-varying m(t) and d(t). The problem we address is a robust adaptive control issue for EHSS. Using a constant trajectory as seen in Fig. 5, the adaptive BSC input accomplishes a bounded error tracking even in the presence of input nonlinearity, parameter uncertainties and unknown but bounded disturbance. Fig. 7 shows the output performance when the reference was changed to r(t) = 0.3 and it can be seen that BSC tuned with ABC was able to achieve better tracking accuracy, smooth response, and less transient oscillations than both SMC and BSC. It can again be observed in Fig. 8 that the SMC control signal is non-smooth and those of BSC are smooth. Fig. 9 demonstrates the excellent tracking of the proposed ABC-based BSC for sum of sinusoids reference input compared to BSC without ABC. It is worth mentioning that for sinusoidal references, the SMC went out of stability and for this reason, we could not compare its response with BSC for experiments involving sinusoidal references. Also in Fig. 10, excellent tracking accuracy was noticed for ABC-based BSC compared to BSC when the reference was changed to sinusoid. In 11 0.2 BSC with ABC ξ1ref BSC Output (ξ1) 0.1 0 −0.1 −0.2 0 5 10 time (s) 15 20 Figure 9: Output performance of adaptive backstepping after ABC optimization with r = 0.05(sin(t) + sin(2t) + sin(3t))m 0.1 BSC with ABC ξ 1ref BSC Output (ξ1) 0.05 0 −0.05 −0.1 0 5 10 time (s) 15 20 Figure 10: Output performance of adaptive backstepping after ABC optimization with r = 0.05sin(t)m a nutshell, the proposed solution is robust against parameter uncertainties and disturbance if the d2 . It must also be remarked that the ultimate bound satisfies the condition ||e||2 ≤ 2(λ+λ5 ) max σmin (φφT ) results presented in this paper are for the case when non-ideal contact stiffness exists at the boundary interaction between the vibrator’s baseplate and ground. The β and b which correspond to load and the frictional parameters have been replaced with nonlinear functions to incorporate more realistic vibrator-ground model. As shown, the tracking error still converges to the neighborhood of the origin at the steady states. This shows the robustness of the backstepping-based adaptive controller. 6 CONCLUSION In this work, a robust backstepping based adaptive controller is proposed for EHSS with uncertain and partially known parameters. ABC algorithm is incorporated in the closed loop system to optimize the proposed controller’s parameter and the adaptation gain while minimizing the tracking error, control signal and its smoothness. Several experiments have been used to validate the tracking capability of the proposed controller and the robustness of the proposed approach. It is concluded that the proposed control approach ensures uniform ultimate boundedness of the error and control signal. References [1] H. A. Mintsa, R. Venugopal, J.-P. Kenne, and C. Belleau, “Feedback linearization-based position control of an electrohydraulic servo system with supply pressure uncertainty,” Control 12 [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] Systems Technology, IEEE Transactions on, vol. 20, no. 4, pp. 1092–1099, 2012. X. Wang and S. Wang, “High performance adaptive control of mechanical servo system with LuGre friction model: identification and compensation,” Journal of Dynamic Systems, Measurement, and Control, vol. 134, no. 1, p. 011021, 2012. H. Yanada and K. Furuta, “Adaptive control of an electrohydraulic servo system utilizing online estimate of its natural frequency,” Mechatronics, vol. 17, no. 6, pp. 337–343, 2007. Z. Zhang and W. Chen, “Adaptive output feedback control of nonlinear systems with actuator failures,” Information Sciences, vol. 179, no. 24, pp. 4249–4260, 2009. S. M. Rozali, M. N. Kamarudin, M. F. Rahmat, and A. R. Husain, “Asymptotic tracking position control for nonlinear systems using backsteppingtechnique,” Procedia Engineering, vol. 53, pp. 255–263, 2013. B. O. Ayinde, S. El Ferik, S. Ibrir, M. Feki, and B. A. Siddiqui, “Backstepping control of an electro-hydraulic servo system subject to disturbance and parameter uncertainty,” in GCC Conference and Exhibition (GCCCE), 2015 IEEE 8th. IEEE, 2015, pp. 1–6. S. El Ferik, B. O. Ayinde, S. Ibrir, and M. Feki, “Backstepping-based output feedback control of an electro-hydraulic servo system,” in Systems, Signals & Devices (SSD), 2015 12th International Multi-Conference on. IEEE, 2015, pp. 1–6. Z. A. S. Dashti, M. Gholami, M. Jafari, and M. A. Shoorehdeli, “Neuraladaptive control based on backstepping and feedback linearization for electro hydraulic servo system,” in Intelligent Systems (ICIS), 2014 Iranian Conference on. IEEE, 2014, pp. 1–6. S. Hutamarn, P. Pratumsuwan, and W. Po-ngaen, “Neuro-fuzzy based on support vector machine friction compensator in servo hydraulic system,” in Industrial Electronics and Applications (ICIEA), 2012 7th IEEE Conference on. IEEE, 2012, pp. 2118–2122. A. Bonchis, P. I. Corke, D. C. Rye, and Q. P. Ha, “Variable structure methods in hydraulic servo systems control,” Automatica, vol. 37, no. 4, pp. 589–595, 2001. R. Xiang and Z. Yinyin, “Electro-hydraulic position synchronization control system based on auto-disturbances rejection and feedback,” in World Automation Congress (WAC), 2012. IEEE, 2012, pp. 1–4. J. Shao, Z. Wang, J. Lin, and G. Han, “Model identification and control of electrohydraulic position servo system,” in Intelligent Human-Machine Systems and Cybernetics, 2009. IHMSC’09. International Conference on, vol. 1. IEEE, 2009, pp. 210–213. J. K. H. Angue-Mintsa, R. Venugopal and C. Belleau, “Adaptive position control of an electrohydraulic servo system with load disturbance rejection and friction compensation,” Journal of Dynamic Systems, Measurement, and Control, vol. 133, no. 064506, pp. 1–7, 2011. L. Lai, “A synchronization position control method based on dynamic particle swarm optimization algorithm in electro-hydraulic servo system,” 2013. H. A. Hashim and M. A. Abido, “Fuzzy controller design using evolutionary techniques for twin rotor mimo system: a comparative study,” Computational intelligence and neuroscience, vol. 2015, p. 49, 2015. H. A. Hashim, S. El-Ferik, and M. A. Abido, “A fuzzy logic feedback filter design tuned with pso for l1 adaptive controller,” Expert Systems with Applications, vol. 42, no. 23, pp. 9077– 9085, 2015. D. Karaboga, “An idea based on honey bee swarm for numerical optimization,” Erciyes university, computer engineering department, engineering faculty, Tech. Rep., 2005. D. Karaboga and B. Basturk, “A powerful and efficient algorithm for numerical function optimization: artificial bee colony (abc) algorithm,” Journal of global optimization, vol. 39, no. 1, pp. 459–471, 2007. P. Bhattacharjee, P. Rakshit, I. Goswami, A. Konar, and A. K. Nagar, “Multi-robot pathplanning using artificial bee colony optimization algorithm,” in Nature and Biologically Inspired Computing (NaBIC), 2011 Third World Congress on. IEEE, 2011, pp. 219–224. Z. Wei, “Modelling and modal analysis of seismic vibrator baseplate,” Geophysical Prospecting, vol. 58, no. 1, pp. 19–32, 2010. 13
3cs.SY
THE ENOUGH g-PAIRS PROPERTY AND DENOMINATOR VECTORS OF CLUSTER ALGEBRAS arXiv:1803.05281v1 [math.RT] 14 Mar 2018 PEIGEN CAO FANG LI Abstract. In this artcile, we firstly prove that any skew-symmetrizable cluster algebra with principal coefficients at t0 has the enough g-pairs property (Definition 2.10 and Theorem 3.6). The proof depends on a result in [18] by Muller on scattering diagrams. Based on this property of cluster algebras, we give a new explanation of the sign-coherence of G-matrices, and an positive answer (Theorem 5.7) to the conjecture on denominator vectors (Conjecture 1.1) proposed by Fomin and Zelevinsky. Moreover, we give two applications of Theorem 5.7. As the first application, any skew-symmetrizable cluster algebra A(S) is proved to have the proper Laurent monomial property (Theorem 6.3). In the viewpoint of Theorem 6.2 (i), we actually provide an unified method to prove the linear independence of cluster monomials of A(S). Secondly, by Theorem 5.7, a function which is called compatibility degree can be well-defined on the set of cluster variables of A(S) (Definition 6.5) , and then a characterization for several cluster variables to be contained or not in some cluster of A(S) is given via compatibility degree (Theorem 6.8), which is the other application of Theorem 5.7. 1. introduction Cluster algebras were introduced by Fomin and Zelevinsky in [9]. The motivation was to create a common framework for phenomena occurring in connection with total positivity and canonical bases. A cluster algebra A(S) is a subalgebra of an ambient field F generated by certain combinatorially defined generators (i.e., cluster variables), which are grouped into overlapping clusters. Fomin and Zelevinsky proved the Laurent phenomenon, that is, for any given cluster xt0 = {x1;t0 , · · · , xn;t0 } of A(S), each cluster variable xi;t of A(S) can be written as xi;t = f (x1;t0 , · · · , xn;t0 ) , 1 n xd1;t · · · xdn;t 0 0 where f is a polynomial which is not divisible by any variable xj;t0 . The vector dt0 (xi;t ) = (d1 , · · · , dn )⊤ is called the denominator vector (or say, d-vector for short) of the cluster variable xi;t with respect to xt0 . Moreover, Fomin and Zelevinsky conjectured that Conjecture 1.1. (Conjecture 7.4 of [12]) Let A(S) be a cluster algebra, and xt0 be a cluster of A(S). Let xi;t be a cluster variable of A(S), and dt0 (xi;t ) = (d1 , · · · , dn )⊤ be the denominator vector of xi;t with respect to xt0 . It is conjectured that: (i). (Positivity of d-vectors) if xi;t ∈ / xt0 , then dt0 (xi;t ) is a non-negative vector, i.e., dt0 (xi;t ) ∈ Nn ; (ii). dk = 0 if and only if there is a cluster containing both xi;t and xk;t0 ; (iii). each component dk depends only xi;t and xk;t0 , not on the clusters containing xk;t0 . Mathematics Subject Classification(2010): 13F60, 05E40 Keywords: cluster algebra, the enough g-pairs property, denominator vector, the proper Laurent monomial property, compatibility degree. Date: version of March 15, 2018. 1 2 PEIGEN CAO FANG LI The d-vectors are very mysterious in cluster algebras. For cluster algebras from surfaces, the components of d-vectors are interpreted as certain modified intersection numbers (see [8]). This fact gives the affirmation of Conjecture 1.1 for such cluster algebras. But for other cluster algebras, to our best knowledge, there has not been a suitable model to explain the d-vectors with respect to a general initial seed. This is one reason why it is difficult for people to study the d-vectors. Indeed, compared with other conjectures, such as the positivity conjecture of cluster variables, the sign-coherence conjecture of C-matrices and G-matrices, the linear independence conjecture in cluster algebras (referring to [9, 12] for these conjectures), only a little of progress on Conjecture 1.1 has been made over the past years. For cluster algebras of finite type, Conjecture 1.1 is affirmed in [6]. For acyclic skew-symmetric cluster algebras, the d-vectors with respect to an acyclic seed, can be interpreted as the dimension vectors of indecomposable exceptional modules in a module category over a hereditary algebra (see [1]), thus Conjecture 1.1 (i) holds for the d-vectors with respect to an acyclic seed. Recently, the positive answer to Conjecture 1.1 (i) for skew-symmetric cluster algebras has been given by us in [5]. Generally speaking, Conjecture 1.1 remains largely open now. Inspired by Conjecture 1.1, we propose the following problem which we believe is important and foundamental in the theory of cluster algebras. Problem 1.2. Let x1 , · · · , xp be some different cluster variables of A(S). Find a criterion to distinguish that (i). whether {x1 , · · · , xp } is contained in some cluster of A(S) or not. (ii). whether {x1 , · · · , xp } is exactly a cluster of A(S) or not. The definition of a cluster algebra A(S) having the proper Laurent monomial property is given in [3], and the authors proved that if a cluster algebra A(S) has the proper Laurent monomial property, then its cluster monomials are linear independence. It is proved in [3, 2] that cluster algebras from surface and skew-symmetric cluster algebras have the proper Laurent monomial property. Whether this property holds or not for skew-symmetrizable cluster algebras is still unknown, so it is natural to ask the following question: Question 1.3. Does the proper Laurent monomial property hold for any skew-symmetrizable cluster algebra? Let A(S) be a skew-symmetrizable cluster algebra with principal coefficients at t0 . The definition of A(S) having the enough g-pairs property is introduced in this paper (Definition 2.10). And we prove that any skew-symmetrizable cluster algebra with principal coefficients at t0 has the enough g-pairs property (Theorem 3.6). The scattering diagrams are the main tool to finish the proof of Theorem 3.6. Based on this new property of cluster algebras, we give a new explanation of the sign-coherence of G-matrices and an affirmation to Conjecture 1.1 (Theorem 5.7). As an application for the positivity of d-vectors, we prove that any skew-symmetrizable cluster algebra has the proper Laurent monomial property (Theorem 6.3), which gives an answer to Question 1.3. From the proof of Theorem 6.3, we know that the proper Laurent monomial property is completely determined by the positivity of cluster variables and the positivity of d-vectors. The authors of [3] proved that the linear independence of the cluster monomials is a conclusion of the proper Laurent monomial property. Thus, the linear independence of the cluster monomials is completely determined by the positivity of cluster variables and the positivity of d-vectors. We think it is interesting to understand the linear independence of cluster monomials from this perspective. THE ENOUGH g-PAIRS PROPERTY AND DENOMINATOR VECTORS OF CLUSTER ALGEBRAS 3 The compatibility degree on the set of cluster variables was firstly defined in [6] for cluster algebras of finite type. It needs Conjecture 1.1 (iii), which was affirmed for cluster algebras of finite type in [6], to guarantee the validity of the definition of compatibility degree. Thanks to Theorem 5.7, we can extend the definition of compatibility degree to any skew-symmetrizable cluster algebras. Then we give a characterization for several cluster variables to be contained or not in some cluster of A(S) via compatibility degree (Theorem 6.8), which gives an answer to Problem 1.2. This paper is organized as follows. In Section 2, some basic definitions and notations are introduced. In Section 3, we briefly review the scattering diagrams, using [18] as a reference. Then the scattering diagrams are used to prove that any skew-symmetrizable cluster algebra with principal coefficients at t0 has the enough g-pairs property (Theorem 3.6). In addition, we give a new explanation of sign-coherence of G-matrices. In Section 4, we prove some properties of g-vectors of cluster algebras, which will be used later. In Section 5, we give a positive answer to Conjecture 1.1 (Theorem 5.7), based on Theorem 3.6. In Section 6, we give two applications of Theorem 5.7. In Subsection 6.1, we prove that any skewsymmetrizable cluster algebra has the proper Laurent monomial property (Theorem 6.3), which is an answer to Question 1.3. In Subsection 6.2, we give a characterization for some cluster variables to be contained or not in some cluster of A(S) via compatibility degree (Theorem 6.8), which is an answer to Problem 1.2. The following diagram gives the relations among the main theorems in this paper, which mean the logical dependence of their proofs. / T heorem 5.7 (Answer to Conjecture 1.1) ❡❡❡❡ ❡❡❡❡❡❡ ❡ ❡ ❡ ❡ ❡ ❡❡❡❡❡  r❡❡❡❡❡❡  T heorem 6.8 (Answer to Problem 1.2) T heorem 6.3 (Answer to Question 1.3) T heorem 3.6 (The enough g-pair property) 2. Preliminaries Recall that (P, ⊕, ·) is a semifield if (P, ·) is an abelian multiplicative group endowed with a binary operation of auxiliary addition ⊕ which is commutative, associative, and distributive with respect to the multiplication · in P. Let T rop(y1 , · · · , ym ) be a free abelian group generated by {y1 , · · · , ym }. We define the addition Q Q Q min(ai ,bi ) ⊕ in T rop(y1 , · · · , ym ) by yiai ⊕ yibi = yi , then (T rop(y1 , · · · , ym ), ⊕) is a semifield, i i i which is called a tropical semifield. The multiplicative group of any semifield P is torsion-free [9], hence its group ring ZP is a domain. We take an ambient field F to be the field of rational functions in n independent variables with coefficients in ZP. An integer matrix Bn×n = (bij ) is called skew-symmetrizable if there is a positive integer diagonal matrix S such that SB is skew-symmetric, where S is said to be a skew-symmetrizer of B. Definition 2.1. A seed in F is a triplet (x, y, B) such that (i) x = {x1 , · · · , xn } is a transcendence basis for F over Frac(ZP). x is called the cluster of (x, y, B) and x1 · · · , xn are called cluster variables. (ii) y = {y1 , · · · , yn } is a subset of P, where y1 , · · · , yn are called coefficients. (iii) B = (bij ) is a skew-symmetrizable matrix, called an exchange matrix. 4 PEIGEN CAO FANG LI Let (x, y, B) be a seed in F , one can associate binomials F1 , · · · , Fn defined by Y b Y −b yj yj Fj = xi ij + xi ij . 1 ⊕ yj 1 ⊕ yj bij >0 bij <0 F1 , · · · , Fn are called the exchange polynomials of (x, y, B). Clearly, xi ∤ Fj for any i and j. Denote by F = {F1 , · · · , Fn } the collection of exchange polynomials of (x, y, B). Definition 2.2. Let (x, y, B) be a seed in F , and F1 , · · · , Fn be the exchange polynomials of (x, y, B). Define the mutation of (x, y, B) in the direction k ∈ {1, · · · , n} as a new triple µk (x, y, B) = (x′ , y′ , B ′ ) in F given by  −b , i = k or j = k; ij b′ij = bij + sgn(bik )max(bik bkj , 0) , otherwise.   x , y −1 , if i = 6 k i=k i k x′i = and yi′ = . L max(b ,0) ki −b Fk /xk , if i = k. yi y (1 yk ) ki , otherwise. k It can be seen that µk (x, y, B) is also a seed and µk (µk (x, y, B)) = (x, y, B). Definition 2.3. A cluster pattern S is an assignment of a seed (xt , yt , Bt ) to every vertex t of the n-regular tree Tn , such that for any edge t k t′ , (xt′ , yt′ , Bt′ ) = µk (xt , yt , Bt ). We always denote by xt = {x1;t , · · · , xn;t }, yt = {y1;t , · · · , yn;t }, Bt = (btij ). Definition 2.4. Let S be a cluster pattern, the cluster algebra A(S) associated with the given cluster pattern S is the ZP-subalgebra of the field F generated by all cluster variables of S. • If S is cluster pattern with the coefficients in T rop(y1 , · · · , ym ), the corresponding cluster algebra A(S) is said to be a cluster algebra of geometric type. • If S is cluster pattern with the coefficients in T rop(y1 , · · · , yn ) and there exists a seed (xt0 , yt0 , Bt0 ) such that yi;t0 = yi for i = 1, · · · , n, then the corresponding cluster algebra A(S) is called a cluster algebra with principal coefficients at t0 . n Q xai;ti for a ∈ Zn , which is a Let xt be a cluster of a cluster algebra A(S), denote by xat := i=1 Laurent monomial in xt . If a ∈ Nn , then xat is called a cluster monomial in xt . If a ∈ / Nn , then xat is called a proper Laurent monomial in xt . Theorem 2.5. Let A(S) be a skew-symmetrizable cluster algebra, and (xt0 , yt0 , Bt0 ) be a seed of A(S). (i).(Theorem 3.1 of [9], Laurent phenomenon) Any cluster variable xi;t of A(S) is a ZP-linear combination of Laurent monomials in xt0 . (ii). ([10], sharpen Laurent phenomenon) If A(S) is a cluster algebra of geometric type with coefficients in T rop(y1 , · · · , ym ), then any cluster variable xi;t is a Z[y1 , · · · , ym ]-linear combination of Laurent monomials in xt0 . (iii). ([14], positive Laurent phenomenon) Any cluster variable xi;t of A(S) is a NP-linear combination of Laurent monomials in xt0 . Let A(S) be a skew-symmetrizable cluster algebra, and (xt0 , yt0 , Bt0 ) be a seed of A(S), by P cv xvt0 , where V is a Laurent phenomenon, any cluster variable x of A(S) has the form of x = v∈V THE ENOUGH g-PAIRS PROPERTY AND DENOMINATOR VECTORS OF CLUSTER ALGEBRAS 5 subset of Zn , 0 6= cv ∈ ZP. Let −dj be the minimal exponent of xj;t0 appearing in the expansion P cv xvt0 . Then x has the form of x= v∈V (1) x= f (x1;t0 , · · · , xn;t0 ) , 1 n xd1;t · · · xdn;t 0 0 where f ∈ ZP[x1;t0 , · · · , xn;t0 ] with xj;t0 ∤ f for j = 1, · · · , n. The vector dt0 (x) = (d1 , · · · , dn )⊤ is called the denominator vector (briefly, d-vector) of the cluster variable x with respect to xt0 . For a cluster xt , the matrix Dtt0 = (dt0 (x1;t ), · · · , dt0 (xn;t )) is called the D-matrix of xt with respect to xt0 . Let xvt be a cluster monomial in xt , it is easy to see that the d-vector of xvt with respect to xt0 is dt0 (xvt ) = Dtt0 v. Proposition 2.6. (Proposition 2.5 of [20],Proposition 2.7 of [5]) Let A(S) be a cluster algebra, x be a cluster variable, and (xt , yt , Bt ), (xt′ , yt′ , Bt′ ) be two seeds of A(S) with (xt′ , yt′ , Bt′ ) = ′ µk (xt , yt , Bt ). Suppose that dt (x) = (d1 , · · · , dn )⊤ , dt (x) = (d′1 , · · · , d′n ) are the d-vectors of x with respective to xt and xt′ respectively, then di = d′i for i 6= k. Proposition 2.7. ((7.7) of [12]) Dtt0 = (dtij ) is uniquely determined by the initial condition Dtt00 = −In , together with the recurrence relations:   if j 6= k; dtij t0 P t t P (Dt′ )ij = t t t −dil blk } if j = k. dil blk ,  −dik + max{ t t blk <0 blk >0 ′ for any t, t ∈ Tn with edge t k ′ t. From the above proposition, we know that the notion of d-vectors is independent of the choice of coefficient system. So when studying the d-vector dt0 (x) of a cluster variable x, we can focus on the cluster algebras with principal coefficients at t0 . Let A(S) be a cluster algebra with principal coefficients at t0 , one can give a Zn -grading of ±1 Z[x1;t , · · · , x±1 n;t0 , y1 , · · · , yn ] as follows: 0 deg(xi;t0 ) = ei , deg(yj ) = −bj , where ei is the i-th column vector of In , and bj is the j-th column vector of Bt0 , i, j = 1, 2, · · · , n. As shown in [12] every cluster variable xi;t of A(S) is homogeneous with respect to this Zn -grading. The g-vector g(xi;t ) of a cluster variable xi;t is defined to be its degree with respect to the Zn t t t ⊤ grading and we write g(xi;t ) = (g1i , g2i , · · · , gni ) ∈ Zn . Let xt be a cluster of A(S), the matrix Gt = (g(x1;t ), · · · , g(xn;t )) is called the G-matrix of xt . n Q xai;ti ∈ F is also homogeneous. And the degree of xat is Clearly, any Laurent monomial xat = i=1 Gt a =: g(xat ), which is called the g-vector of xat . Theorem 2.8. (Sign-coherence [14]) Let A(S) be a skew-symmetrizable cluster algebra with principal coefficients at t0 , and xt be a cluster of A(S). Then (i) any two nonzero entries of the G-matrix Gt of xt in the same row have the same sign. (ii) each cluster variable xi;t has the form of X B v g(x ) xi;t = xt0 i;t (1 + cv yv xt0t0 ), 06=v∈Nn g(xi;t ) where g(xi;t ) is the g-vector of xi;t , xt0 = n Q j=1 gt xi;tji0 , yv = n Q j=1 yivi , and cv ≥ 0. 6 PEIGEN CAO FANG LI Let I be a subset of {1, · · · , n}. We say that (k1 , · · · , ks ) is an I-sequence, if kj ∈ I for j = 1, · · · , s. Now, we give the following definitions introduced originally in this article. Definition 2.9. Let A(S) be a skew-symmetrizable cluster algebra of rank n with initial seed at t0 , and I = {i1 , · · · , ip } be a subset of {1, 2, · · · , n}. (i) We say that a seed (xt , yt , Bt ) of A(S) is connected with (xt0 , yt0 , Bt0 ) by an I-sequence, if there exists an I-sequence (k1 , · · · , ks ) such that (xt , yt , Bt ) = µks · · · µk2 µk1 (xt0 , yt0 , Bt0 ). (ii) We say that a cluster xt of A(S) is connected with xt0 by an I-sequence, if there exists a seed containing the cluster xt such that this seed is connected with a seed containing the cluster xt0 by an I-sequence. / I. Clearly, if the cluster xt is connected with xt0 by an I-sequence, then xi;t = xi;t0 for i ∈ n |I| p For I = {i1 , · · · , ip }, we assume that i1 < i2 < · · · < ip . Let πI : R → R = R be the canonical projection given by πI (m) = (mi1 , · · · , mip )⊤ , for m = (m1 , · · · , mn )⊤ ∈ Rn . Let πI⊤ : R|I| = Rp → Rn be the coordinate inclusion given by  v , if i = i ∈ I; k k πI⊤ (v)i = 0, otherwise, for v = (v1 , · · · , vp )⊤ ∈ Rp . Definition 2.10. Let A(S) be a skew-symmetrizable cluster algebra of rank n with principal coefficients at t0 , and I be a subset of {1, · · · , n}. (i). For two clusters xt , xt′ of A(S), the pair (xt , xt′ ) is called a g-pair along I, if it satisfies the following conditions: • xt′ is connected with xt0 by an I-sequence and ′ • for any cluster monomial xvt in xt , there exists a cluster monomial xvt′ in xt′ with vi′ = 0 for i ∈ / I such that ′ πI (g(xvt )) = πI (g(xvt′ )), ′ ′ where g(xvt ) and g(xvt′ ) are g-vectors of the cluster monomials xvt and xvt′ respectively. (ii). A(S) is said to have the enough g-pairs property if for any subset I of {1, · · · , n} and any cluster xt of A(S), there exists a cluster xt′ such that (xt , xt′ ) is a g-pair along I. The enough g-pairs property seems to be very strange, however, it turns out to be very useful. It can be used to explain sign-coherence of G-matrices (see Proposition 3.4 and Corollary 3.5 and their proofs in Section 3.2) and to affirm the conjecture on d-vectors via very elementary methods (see Theorem 5.7 and its proof in Section 5). 3. Scattering diagrams and the enough g-pairs property In this section, we will use the theory of scattering diagrams to prove that any skew-symmetrizable cluster algebra A(S) with principal coefficients at t0 has the enough g-pairs property and we give a new explanation of sign-coherence of G-matrices. THE ENOUGH g-PAIRS PROPERTY AND DENOMINATOR VECTORS OF CLUSTER ALGEBRAS 7 3.1. Scattering diagrams. The scattering diagrams associated with skew-symmetrizable matrices are a main tool in [14]. Now we cite the reference [18] to review the scattering diagrams. ±1 Let R = Q[x±1 1 , · · · , xn ][[y1 , · · · , yn ]] be the formal power series in the variables y1 , · · · , yn ±1 with coefficients in Q[x1 , · · · , x±1 n ]. Let B be a skew-symmetrizable integer matrix and S = diag(s1 , · · · , sn ) is the skew-symmetrizer of B such that the trace tr(S) is minimal. Clearly, if B is skew-symmetric, then S = In . For 0 6= v ∈ Nn , define the formal elementary transformation Ev : R → R by v⊤ Sw ′ ′ Ev (xw ) = (1 + xBv yv ) gcd(Sv) xw , Ev (yw ) = yw , for any w ∈ Zn , w′ ∈ Nn . Here, gcd(Sv) means the greatest common divisor of s1 v1 , · · · , sn vn . Ev is an automorphism of R, with inverse Ev−1 given by v⊤ Sw ′ ′ Ev−1 (xw ) = (1 + xBv yv )− gcd(Sv) xw , Ev−1 (yw ) = yw . For B, a wall is a pair (v, W ), where 0 6= v ∈ Nn and W is a convex polyhedral cone in Rn which spans v⊥ := {m ∈ Rn |v⊤ Sm = 0}. Here B is used to provide the elementary transformation Ev for the wall (v, W ). The open half-space {m ∈ Rn |v⊤ Sm > 0} is called the green side of W , and {m ∈ Rn |v⊤ Sm < 0} is called the red side of W . A scattering diagram D is a collection of walls in Rn for the same matrix B. A smooth path ρ : [0, 1] → Rn in a scattering diagram D is called finite transverse if • ρ(0) and ρ(1) are not in any walls; • whenever the image of ρ intersects a wall (v, W ), it crosses W transversely; • the image of ρ intersects finitely many walls, and does not intersect the boundary of a wall or the intersection of two walls which span different hyperplanes. Let ρ be a finite transverse path, and list the walls crossed by ρ in order: (v1 , W1 ), · · · , (vs , Ws ). Then ρ determines the path-ordered product of elementary transformations given by Evǫss · · · Evǫ22 ◦ Evǫ11 : R → R, where ǫi = 1 (resp., ǫi = −1) if ρ crosses Wi from its green side to its red side (resp., from its red side to its green side). A scattering diagram D with finitely many walls is called a consistent scattering diagram if any path-ordered product defined by finite transverse loop is the trivial automorphism of R. Two scattering diagrams D1 and D2 with finitely many walls are called equivalent if any smooth path ρ which is finite transitive in both diagrams determines the same path-ordered product. For brevity, the definition of consistency or equivalence for scattering diagrams with infinitely many walls will not be given here. One can refer to [18] for them. Theorem 3.1. (Theorem 1.12 in [14]) For each skew-symmetrizable matrix B, there is an unique consistent scattering diagram D(B) up to equivalence, such that • for each i ∈ {1, 2, · · · , n}, there is a wall of the form (ei , e⊥ i ) and • every other wall (v, W ) in D(B) has the property that Bv ∈ / W. A chamber of D(B) is a path-connected component of Rn − D(B). Let (v, W ) be a wall of D(B). Since 0 6= v ∈ Nn , we know that W ∩ (R>0 )n = φ = W ∩ (R<0 )n . Thus no walls can pass through (R>0 )n and (R<0 )n , they must be chambers in D(B). They are called all-positive chamber and 8 PEIGEN CAO FANG LI all-negative chamber respectively. A chamber C of D(B) is a reachable chamber, if there exists a finite transverse path ρ from all-positive chamber (R>0 )n to C. Theorem 3.2. (Lemma 2.10 of [14]) Let A(S) be a skew-symmetrizable cluster algebra of rank n with principal coefficients at t0 . Then every reachable chamber of D(Bt0 ) is of the form R>0 g1 + · · · + R>0 gn , where G = (g1 , · · · , gn ) is a certain G-matrix of A(S). Let I be a subset of {1, 2, · · · , n}, and B † be the principal submatrix of B defined by I. Recall that, in [18], the pull back of the scattering diagram D(B † ) is the scattering diagram πI∗ D(B † ) = {(πI⊤ (v), πI−1 (W ))|(v, W ) ∈ D(B † )}. In [18], Muller has described how to obtained the scattering diagram πI∗ D(B † ) from the scattering diagram D(B) for skew-symmetric case (see Theorem 33 of of [18]). In fact, this description can be naturally extended to skew-symmetrizable version in the paralleled method, which means the following theorem. Theorem 3.3. For each skew-symmetrizable matrix B, the scattering diagram πI∗ D(B † ) is obtained from D(B) by removing all of its walls (v, W ), where v = (v1 , · · · , vn ) has any nonzero entry vi with i∈ / I. 3.2. The enough g-pairs property. Let A = (aij ) be an n × n matrix, and I be a subset of [1, n] := {1, · · · , n} and denote by A|I×I = (aij )i,j∈I and A|I×[1,n] = (ai,j )i∈I,j∈[1,n] . Proposition 3.4. Assume that A(S) is a skew-symmetrizable cluster algebra of rank n with principal coefficients at t0 . Let xt , xt′ be two clusters of A(S), and Gt , Gt′ be their G-matrices respectively. Then (xt , xt′ ) is a g-pair along I ⊆ [1, n] if and only if xt′ is connected with xt0 by an I-sequence and Gt |I×[1,n] = Gt′ |I×I Q for some Q ∈ M|I|×n (Z≥0 ). Proof. If (xt , xt′ ) is a g-pair along I, then we know that xt′ is connected with xt0 by an I-sequence and v′ for the cluster variable xk;t , there exists a cluster monomial xt′k in xt′ with that the i-th component v′ / I such that πI (g(xk;t )) = πI (g(xt′k )) = πI (Gt′ vk′ ), where k = 1, · · · , n. Set of vk′ is zero for i ∈ ′ Q = (πI (v1 ), · · · , πI (vn′ )) ∈ M|I|×n (Z≥0 ). Then we get Gt |I×[1,n] = Gt′ |I×I Q. If xt′ is connected with xt0 by an I-sequence and Gt |I×[1,n] = Gt′ |I×I Q for some Q ∈ M|I|×n (Z≥0 ), by the definition of g-pair along I, we only need to show that for any cluster monomial xvt in xt , ′ there exists a cluster monomial xvt′ in xt′ with vi′ = 0 for i ∈ / I such that ′ πI (g(xvt )) = πI (g(xvt′ )). Denote by qk the k-th column vector of Q, then πI⊤ (qk ) ∈ Nn and the i-th component of πI⊤ (qk ) is zero for i ∈ / I. It is easy to see that Gt |I×[1,n] = Gt′ |I×I Q just means that π ⊤ (qk ) πI (g(xk;t )) = πI (Gt′ πI⊤ (qk )) = πI (xt′I ), THE ENOUGH g-PAIRS PROPERTY AND DENOMINATOR VECTORS OF CLUSTER ALGEBRAS 9 for k = 1, · · · , n. For any cluster monomial xvt in xt , set v′ = v1 πI⊤ (q1 ) + · · · + vn πI⊤ (qn ) ∈ Nn , then vi = 0 for i ∈ / I and πI (g(xvt )) = πI (v1 g(x1;t ) + · · · + vn g(xn;t )) = v1 πI (g(x1;t )) + · · · + vn πI (g(xn;t )) π ⊤ (q1 ) = v1 πI (xt′I π ⊤ (qn ) ) + · · · + vn πI (xt′I ) = πI (v1 Gt′ πI⊤ (q1 ) + · · · + vn Gt′ πI⊤ (qn )) ′ = πI (Gt′ v′ ) = πI (g(xvt′ )).  Corollary 3.5. If A(S) has the enough g-pairs property, then the sign-coherence of G-matrices holds, i.e., any two nonzero entries of a G-matrix of A(S) in the same row have the same sign. Proof. For a cluster xt and I = {k}, since A(S) has the enough g-pairs property, we know that there exists a cluster xt′ such that (xt , xt′ ) is a g-pair along I. Then by Proposition 3.4, xt′ is connected with xt0 by an I = {k}-sequence and there exists a matrix Q ∈ M1×n (Z≥0 ) such that Gt |I×[1,n] = Gt′ |I×I Q. Since xt′ is connected with xt0 by an I = {k}-sequence, we know that xt′ is equal to xt0 or is obtained from xt0 by one step of mutation in the direction of k. Thus we know that Gt′ |I×I = Gt′ |{k}×{k} = ±1 and Gt |{k}×[1,n] = Gt |I×[1,n] = Gt′ |I×I Q = ±Q. By Q ∈ M1×n (Z≥0 ), we know that any two nonzero entries in the k-th row of Gt have the same sign.  By Corollary 3.5 and its proof, the enough g-pairs property can be understood as a strong version of sign-coherence of G-matrices. Since sign-coherence of G-matrices holds for any skew-symmetrizable cluster algebra with principal coefficients (see Theorem 2.8 (i)), it is natural to ask that: does any skew-symmetrizable cluster algebra with principal coefficients have the enough g-pairs property? The following theorem gives a positive answer to this question. Theorem 3.6. Any skew-symmetrizable cluster algebra A(S) with principal coefficients at t0 has the enough g-pairs property. Proof. For any subset I = {i1 , · · · , ip } of {1, 2, · · · , n}, and any cluster xt of A(S). We need to find a cluster x′t , such that (xt , x′t ) is a g-pair along I. We will use scattering diagrams to find such a cluster x′t . Let Bt†0 be the principal submatrix of Bt0 defined by I. By Theorem 3.3, the scattering diagram πI∗ D(Bt†0 ) is obtained from D(Bt0 ) by removing all of its walls (v, W ), where v = (v1 , · · · , vn ) has any nonzero entry vi with i ∈ / I. Thus we can get the following facts: Fact (i)Every wall (v, W ) in πI∗ D(Bt†0 ) is a wall in D(Bt0 ); From this fact, we have that Fact (ii): Each chamber C of D(Bt0 ) is contained in some chamber C † of πI∗ D(Bt†0 ); From Fact (i) and (ii), we obtain that Fact (iii): Each finite transverse path ρ : [0, 1] → Rn in D(Bt0 ) is also a finite transverse path in πI∗ D(Bt†0 ); From Fact (ii) and (iii), we have that Fact (iv): Each reachable chamber C of D(Bt0 ) is contained in some reachable chamber C † of πI∗ D(Bt†0 ). 10 PEIGEN CAO FANG LI From the definition of πI∗ D(Bt†0 ), we have the following fact: Fact (v): If C † is a (reachable) chamber of πI∗ D(Bt†0 ), then πI (C † ) is a (reachable) chamber of D(Bt†0 ). For any cluster xt of A(S), it has a G-matrix Gt . By Theorem 3.2, there exists a reachable chamber Ct corresponding to Gt . By Fact (iv), there exists a reachable chamber Ct† of πI∗ D(Bt†0 ) such that Ct ⊆ Ct† . By Fact (v), πI (Ct † ) is a reachable chamber of D(Bt†0 ). By Theorem 3.2 again, there exists a G-matrix Gt† = (g1t† , · · · , gpt† ) of Bt†0 corresponding to the reachable chamber πI (Ct † ) of D(Bt†0 ). Suppose that the G-matrix Gt† of Bt†0 is obtained from the initial G-matrix of Bt†0 by the sequence of mutations µks · · · µk2 µk1 , where ki ∈ I for i = 1, · · · , s. Clearly, the seed (xt′ , yt′ , Bt′ ) := µks · · · µk2 µk1 (xt0 , yt0 , Bt0 ) is connected with (xt0 , yt0 , Bt0 ) by an I-sequence. We will show that (xt , x′t ) is a g-pair along I. ′ For any cluster monomial xvt in xt , we need to find a cluster monomial xvt′ in xt′ with vi′ = 0 for i∈ / I such that ′ πI (g(xvt )) = πI (g(xvt′ )). We know that the g-vector g(xvt ) of xvt is v1 g1t + · · · + vn gnt ∈ R≥0 g1t + · · · + R≥0 gnt = Ct , where Ct is the closure of Ct in Rn . Thus πI (g(xvt )) ∈ πI (C) ⊆ πI (Ct† ) = πI (Ct† ) = R≥0 g1t† + · · · + R≥0 gpt† , i.e., we get that πI (g(xvt )) ∈ R≥0 g1t† + · · · + R≥0 gpt† . By πI (g(xvt )) ∈ Zp and det(Gt† ) = ±1 (Theorem 4.1), we actually have that πI (g(xvt )) ∈ Z≥0 g1t† + · · · + Z≥0 gpt† . Thus we can assume that πI (g(xvt )) = v1† g1t† + · · · + vp† gpt† , where v † = (v1† , · · · , vp† )⊤ ∈ Np . Set ′ v′ = πI⊤ (v† ) ∈ Nn , then xvt′ is cluster monomial in xt′ with vi′ = 0 for i ∈ / I. It is easy to see that π ⊤ (v† ) ′ πI (xt′I ) = v1† g1t† + · · · + vp† gpt† , thus πI (g(xvt )) = πI (g(xvt′ )). Indeed, without loss of generality, we can assume that I = {1, 2, · · · , p}. We know that the G-matrix of xt′ has the form of ! Gt† 0 Gt′ = . ∗ In−p Then π ⊤ (v† ) πI (xt′I ) = πI (Gt′ πI⊤ (v† )) = Gt† v† = v1† g1t† + · · · + vp† gpt† = πI (g(xvt πI⊤ (v† ))). The proof is finished.  4. On g-vectors of cluster algebras with principal coefficients In this section, we give some results on g-vectors for cluster algebras with principal coefficients, which will be used in the sequel. THE ENOUGH g-PAIRS PROPERTY AND DENOMINATOR VECTORS OF CLUSTER ALGEBRAS 11 Theorem 4.1. Let A(S) be a skew-symmetrizable cluster algebra with principal coefficients at t0 , and xt , xt′ be any two clusters of A(S), then (i). The Laurent expansion of xj;t′ with respect to xt has the following form ′ rt X xj;t′ = xt j;t (1 + cv yv xu t ), 06=v∈Nn , u∈Zn t′ where cv ≥ 0 and rj;t satisfies ′ ′ (ii) Gt′ = Gt Rtt , where Rtt ′ g(xj;t′ ) = Gt rtj;t . ′ ′ = (rt1;t , · · · , rtn;t ) . In particular, detGt = ±1. Proof. By the positivity of Laurent phenomenon, the Laurent expansion of xj;t′ with respect to xt has the form of ′ xj;t′ = X rt X λp,j xt p,j;t + 06=v∈Nn , p∈P cv yv xu t, u∈Zn where λp,j > 0 for p ∈ P , and cv ≥ 0. Thanks to Theorem 2.8 (ii), we have that ′ ′ X X rt Gt rt g(x ′ ) xt0 j;t = xj;t′ |y1 =···=yn =0 = λp,j xt p,j;t |y1 =···=yn =0 = λp,j xt0 p,j;t , λp,j > 0. p∈P p∈P The above equality holds if and only if P has exactly one element (say p0 ), and ′ λp0 ,j = 1, g(xj;t′ ) = Gt rtp0 ,j;t . So we can assume that the expansion of xj;t′ with respect to xt is in the following form ′ X rt xj;t′ = xt j;t + cv yv xu t , with cv ≥ 0, 06=v∈Nn , u∈Zn i.e., xi;t′ has the following form ′ rt xj;t′ = xt j;t (1 + X 06=v∈Nn , ′ ′ cv yv xu t ), u∈Zn ′ where cv ≥ 0 and rtj;t satisfies g(xj;t′ ) = Gt rtj;t , j = 1, · · · , n. So we have Gt′ = Gt Rtt . Take t′ = t0 , we have Gt Rtt0 = Gt0 = In . Because Gt and Rtt0 are integer matrices, we get detGt = ±1.  The following theorem is known from [14] for skew-symmetrizable cluster algberas. For skewsymmetric cluster algebras, one can also refer to [7]. Here we would like to provide an elementary proof for it. This new proof depends only on the positivity of cluster variables and the property that each F -polynomial has constant term 1, i.e., Theorem 2.8 (ii), which is equivalent to the signcoherence of C-matrices by Proposition 5.6 of [12]. Theorem 4.2. Let A(S) be a skew-symmetrizable cluster algebra with principal coefficients at t0 , and d a xat1 , xd t2 be two cluster monomials of A(S) . If xt1 and xt2 have the same g-vector, i.e., Gt1 a = Gt2 d, then xat1 = xd t2 . Proof. By Theorem 4.1 (i), the Laurent expansion of the cluster monomial xat1 with respect to xt2 has the following form X (2) xat1 = xb cv yv xu t2 (1 + t2 ), cv ≥ 0. 06=v∈Nn , u∈Zn 12 PEIGEN CAO Thanks to Theorem 2.8 (ii), we obtain that  Gt a xt0 1 = xat1 |y1 =···yn =0 FANG LI xb t (1 + = G X 2 06=v∈Nn , b xt0t2 (1 + = u∈Zn   cv yv xu t2 ) |y1 =···=yn =0 G X u cv yv xt0t2 )|y1 =···=yn =0 06=v∈Nn , u∈Zn Gt b xt0 2 . = Thus Gt2 b = Gt1 a = Gt2 d, which implies b = d, by Theorem 4.1 (ii). Then by (2), xat1 can be written as follows: X 1 (3) xat1 = xd cv1 yv1 xu t2 , with cv1 ≥ 0. t2 + 06=v1 ∈Nn , u1 ∈Zn Similarly, the Laurent expansion of the cluster monomial xd t2 with respect to xt1 has the following form X a 2 xd cv2 yv2 xu t2 = xt1 + t1 , with cv2 ≥ 0. 06=v2 ∈Nn , u2 ∈Zn Thus we obtain Clearly, X 06=v1 ∈Nn , u1 ∈Zn 2 cv2 yv2 xu t1 can n n 06=v2 ∈N , u2 ∈Z P X 1 cv1 yv1 xu t2 + 2 cv2 yv2 xu t1 = 0. 06=v2 ∈Nn , u2 ∈Zn be written as follows: X 2 cv2 yv2 xu t1 = X 1 cv1 yv1 xu t2 = 06=v2 ∈Nn , u2 ∈Zn f1 , g1 1 where f1 , g1 ∈ Z≥0 [y1 , · · · , yn , x1;t1 , · · · , xn;t1 ]. By positive Laurent phenomenon, xu t2 can be written as a quotient of two polynomials in Z≥0 [y1 , · · · , yn , x1;t1 , · · · , xn;t1 ]. Because cv1 ≥ 0, we can write P 1 cv1 yv1 xu t2 in the following form: 06=v1 ∈Nn , u1 ∈Zn 06=v1 ∈Nn , u1 ∈Zn where f2 , g2 ∈ Z≥0 [y1 , · · · , yn , x1;t1 , · · · , xn;t1 ]. Thus X X 1 cv1 yv1 xu t2 + 06=v1 ∈Nn , u1 ∈Zn f2 , g2 2 cv2 yv2 xu t1 = 06=v2 ∈Nn , u2 ∈Zn f1 f2 + = 0, g2 g1 then we obtain f1 g2 +f2 g1 = 0, where f1 , g1 , f2 , g2 ∈ Z≥0 [y1 , · · · , yn , x1;t1 , · · · , xn;t1 ] and g1 6= 0, g2 6= 0. So, we have f2 = 0 = f1 , i.e., X X 1 2 cv1 yv1 xu cv2 yv2 xu t2 = 0 = t1 , 06=v1 ∈Nn , u1 ∈Zn Then, by (3), we obtain that xat1 = 06=v2 ∈Nn , u2 ∈Zn xd t2 .  From the above theorem, we know that if two cluster variables have the same g-vectors, then they must be equal. The following proposition can be considered as a generalization of this fact, and the technique used in its proof is very useful later. THE ENOUGH g-PAIRS PROPERTY AND DENOMINATOR VECTORS OF CLUSTER ALGEBRAS 13 Proposition 4.3. Let A(S) be a skew-symmetrizable cluster algebra with principal coefficients at t0 , and xt1 , xt2 be two clusters of A(S). Suppose that xi;t1 = xi;t2 = xi;t0 for i = p + 1, · · · , n, where 0 ≤ p < n, that is, the corresponding G-matrices have the forms of ! ! G(t1 ) 0 G(t2 ) 0 Gt1 = , Gt2 = . ∗ In−p ⋆ In−p t1 t2 If gjk = gjk for some k ≤ p and j = 1, · · · , p, then xk;t1 = xk;t2 . t1 t2 Proof. By the row sign-coherence of G-matrices, we know that gik , gik ≥ 0 for i = p + 1, 2, · · · , n. t1 t2 n n Q Q gik gik xi;t2 are cluster monomials of A(S) and xi;t1 and xk;t2 Thus both xk;t1 i=p+1 i=p+1 g(xk;t1 n Y g t2 xi;tik1 ) = t1 t1 t1 t2 t1 t2 ⊤ (g1k , · · · , gpk , gp+1,k + gp+1,k , · · · , gn,k + gn,k ) i=p+1 = t2 t2 t1 t2 t1 t2 ⊤ (g1k , · · · , gpk , gp+1,k + gp+1,k , · · · , gn,k + gn,k ) = g(xk;t2 n Y g t1 xi;tik2 ). i=p+1 n Q This means that the cluster monomials xk;t1 x i=p+1 By Theorem 4.2, we get that (4) xk;t1 n Y t gik2 i;t1 and xk;t2 i=p+1 n Y t g 2 xi;tik1 n Q = xk;t2 g t gik1 i;t2 x have the same g-vector. t1 xi;tik2 . i=p+1 i=p+1 Here xi;t1 = xi;t2 = xi;t0 for i > p. t1 t2 We claim that gik = gik for i = p + 1, · · · , n. Otherwise, there exists some i0 with p + 1 ≤ i0 ≤ n t1 t2 such that gi0 k 6= gi0 k . Without loss of generality, we can assume that git01k − git02k < 0. By (4), we get the expansion of xk;t2 with respect to xt1 , as follow: (5) xk;t2 = xk;t1 n Y g t1 t −gik0 xi;tik1 . i=p+1 Let (xt3 , yt3 , Bt3 ) = µi0 (xt1 , yt1 , Bt1 ), then xl;t3 = xl;t1 for l 6= i0 and xi0 ;t3 xi0 ;t1 is a binomial in variables in xt3 . From this and (5), we can get the expansion of xk;t2 with respect to xt3 . Since git01k − git02k < 0, this obtained expansion can not be a Laurent polynomial. This contradicts to the Laurent phenomenon. t1 t2 Therefore, we have gik  = gik for i = p + 1, · · · , n and xk;t1 = xk;t2 . Corollary 4.4. Let A(S) be a skew-symmetrizable cluster algebra with principal coefficients at t0 . Suppose that the G-matrices of A(S) at t1 and t2 respectively are: ! ! G(t1 ) 0 G(t2 ) 0 Gt1 = , Gt2 = . ∗ In−p ⋆ In−p If G(t1 ) = G(t2 ), then xt1 = xt2 and Gt1 = Gt2 . 5. Denominator vectors of cluster algebras: affirmation to Conjecture 1.1 In this section, we give an affirmation to Conjecture 1.1 as an application of Theorem 3.6. Lemma 5.1. Let A(S) be a skew-symmetrizable cluster algebra of rank n, and xt , xt′ be two clusters of A(S). If there exists a vector v = (v1 , · · · , vn )⊤ ∈ Nn such that x1;t = xvt′ , then x1,t is a cluster variable in xt′ . 14 PEIGEN CAO FANG LI Proof. Because v ∈ Nn , we get that vi ≥ 0 for i = 1, · · · , n. Since x1;t = xvt′ , v can not be zero, thus v1 + v2 + · · · + vn ≥ 1. In order to show that x1,t is a cluster variable in xt′ , it suffices to show that v1 + v2 + · · · + vn = 1, due to x1;t = xvt′ . Assume that v1 + v2 + · · · + vn > 1. Let fi be the expansion of xi;t′ with respect to xt , we know that fi is a Laurent polynomial in x1;t , · · · , xn;t , by Laurent phenomenon. Replacing these into x1;t = xvt′ , we obtain that x1;t = f1v1 · · · fnvn . Because the left side of this above equality is a monomial with total exponent 1 and v1 + · · ·+ vn > 1, we get that each fi must be a Laurent monomial and at least one of f1 , · · · , fn is a proper Laurent monomial. Say, fi0 is a proper Laurent monomial, written as with ml < 0. xi0 ;t′ = fi0 = xm t (6) Let (xt1 , yt1 , Bt1 ) = µl (xt , yt , Bt ), then xi;t1 = xi;t for i 6= l and xl;t1 xl;t is a binomial in x1;t1 , · · · , xn;t1 . By replacing this into the right-side of (6), we get the expansion of xi0 ;t′ with respect to xt1 . Since ml < 0, this obtained expansion contains a binomial in its denominator, so it cannot be a Laurent polynomial. This contradicts to the Laurent phenomenon. So v1 + v2 + · · · + vn = 1, then we get that only one of v1 , · · · , vn is 1, and the others are zero. Say vk = 1. Thus x1;t = xvt′ is  just x1;t = xk;t′ ∈ xt′ . The proof is finished. Lemma 5.2. Let A(S) be a skew-symmetrizable cluster algebra of rank n with principal coefficients ′ at t0 , and (xt , xt′ ) is a g-pair along I = {1, · · · , n − 1}. Let dt (xi;t ) = (d′1 , · · · , d′n ) be the d-vector of xi;t with respect to xt′ . Then d′n = −1, 0 or d′n > 0 and   iff xi;t = xn,t′ ;  −1 , d′n =    0, iff xi;t ∈ xt′ and xi;t 6= xn,t′ , a positive integer , iff xi;t ∈ / xt′ . Proof. We consider the Laurent expansion of xi;t with respect to xt′ , say xi;t = f (xt′ ). By Theorem 4.1, we know that the Laurent monomial xrt′ appears in f (xt′ ), where r is the unique vector in Zn t , gnt )⊤ = Gt′ r. such that g(xi;t ) = (g1t , · · · , gn−1 ′ Since (xt , xt ) is a g-pair along I = {1, · · · , n − 1}, we know that for the cluster variable xi;t (as ′ a cluster monomial in xt ), there exists a cluster monomial xvt′ , with vj′ = 0 is zero for j ∈ / I, i.e., ′ vn = 0 such that ′ πI (g(xi;t )) = πI (g(xvt′ )) = πI (Gt′ v′ ). Since xt′ is connected with xt0 by!an I = {1, · · · , n − 1}-sequence, we know that the G-matrix of G(t′ ) 0 ′ . Thus πI (g(xi;t )) = πI (g(xvt′ )) = πI (Gt′ v′ ) just means that xt′ has the form of Gt′ = ∗ 1 t ′ (g1t , · · · , gn−1 )⊤ = G(t′ )(v1′ , · · · , vn−1 )⊤ . t Since g(xi;t ) = (g1t , · · · , gn−1 , gnt )⊤ = Gt′ r, we get that t (g1t , · · · , gn−1 )⊤ = G(t′ )(r1 , · · · , rn−1 )⊤ . By Theorem 4.1, we know that det(G(t′ )) = det(Gt′ ) = ±1. Thus we get that ′ (r1 , · · · , rn−1 )⊤ = (v1′ , · · · , vn−1 )⊤ ∈ Nn−1 . We claim that: (a). rn > 0 if and only if d′n = −1, and if only if xi;t = xn;t′ . (b). rn = 0 if and only if d′n = 0, and if only if xi;t ∈ xt′ and xi;t 6= xn;t′ . THE ENOUGH g-PAIRS PROPERTY AND DENOMINATOR VECTORS OF CLUSTER ALGEBRAS 15 (c). rn < 0 if and only if d′n > 0, and if only if xi;t ∈ / xt′ . Now we give the proof for the claim. If rn ≥ 0, then r ∈ Nn , and xrt′ is a cluster monomial in xt′ having the same g-vector with the cluster variable xi;t . By Theorem 4.2, we get that xi;t = xrt′ . Then by Lemma 5.1, xi;t is a cluster variable in xt′ . More precisely, if rn > 0, then xi;t = xn;t′ , and thus d′n = −1. And if rn = 0, then xi;t = xk;t′ for some k 6= n. In this case, d′n = 0. If rn < 0, then the exponent of xn;t′ in xrt′ is negative, and thus the minimal exponent of xn;t′ appearing in f (xt′ ) is negative. Recall that the meaning of −d′n is just the minimal exponent of xn;t′  appearing in f (xt′ ). So d′n is positive. The proof is finished. Corollary 5.3. Let A(S) be a skew-symmetrizable cluster algebra of rank n with principal coefficients at t0 , x be a cluster variable of A(S) and dt0 (x) = (d1 , · · · , dn )⊤ be the d-vector of x with respect to xt0 . Then dk = −1, 0 or dk > 0 for each k = 1, 2, · · · , n and (i). if dk = −1, then x = xk;t0 ; (ii). if dk = 0, then there exists a cluster xt′ containing both x and xk;t0 . Proof. Without loss of generality, we can assume that k = n. Let xt be a cluster containing the cluster variable x. By Theorem 3.6, we know that A(S) has the enough g-pairs property. Thus for I = {1, 2, · · · , n − 1} and the cluster xt , there exists a cluster xt′ such that (xt , xt′ ) is a g-pair along I = {1, · · · , n − 1}. ′ Let dt (x) = (d′1 , · · · , d′n )⊤ be the d-vector of x with respect to the cluster x′t . By Proposition 2.6 and the fact that xt′ is connected with xt0 by an I = {1, · · · , n − 1}-sequence, we know that dn = d′n . Note that xn;t′ = xn;t0 , because xt′ is connected with xt0 by an I = {1, · · · , n − 1}-sequence. Then the result follows from Lemma 5.2.  Proposition 5.4. Let A(S(1)), A(S(2)) be two skew-symmetrizable cluster algebras having the same exchange matrix at t0 . The seed of A(S(k)) at t ∈ Tn is denoted by (xt (k), yt (k), Bt (k)), k = 1, 2. Then xi;t1 (1) = xj;t2 (1) if and only if xi;t1 (2) = xj;t2 (2), where t1 , t2 ∈ Tn and i, j ∈ {1, 2, · · · , n}. Proof. Since Bt0 (1) = Bt0 (2), we know that Bt (1) = Bt (2) for any t ∈ Tn . Let A(S pr ) be the skew-symmetrizable cluster algebra with principal coefficients at t1 and with initial exchange matrix pr pr Bt1 (1) = Bt1 (2). The seed of A(S pr ) at t ∈ Tn is denoted by (xpr t , yt , Bt ). If xi;t1 (1) = xj;t2 (1), we know that dt1 (xj;t2 (1)) = −ei , where ei is the i-th column vector of In . Since the d-vectors do not depend on the choice of coefficients, we know that dt1 (xpr j;t2 ) = −ei . Then pr pr by Corollary 5.3, we have that xi;t1 = xj;t2 . Thus we obtain that xi;t1 (2) = xj;t2 (2) from Theorem 3.7  of [12]. By the same argument, we can show that if xi;t1 (2) = xj;t2 (2), then xi;t1 (1) = xj;t2 (1). Lemma 5.5. Let A(S) be a skew-symmetrizable cluster algebra of rank n with principal coefficients at t0 . Then any cluster xt of A(S) with xi;t = xi;t0 for i = p + 1, · · · , n is connected with xt0 by a {1, 2, · · · , p}-sequence. Proof. By Theorem 3.6, we know that A(S) has the enough g-pairs property. Thus for I = {1, 2, · · · , p} and the cluster xt , there exists a cluster xt′ such that (xt , xt′ ) is a g-pair along I. We will show that xt = x′t , thus xt is connected with xt0 by a {1, 2, · · · , p}-sequence. Since (xt , xt′ ) is a g-pair along I, we know that for the cluster variable xk;t (as a cluster monomial in xt ), there exists a cluster monomial xvt′ in xt′ with vi = 0 for i ∈ / I such that πI (g(xk;t )) = πI (g(xvt′ )) = πI (Gt′ v). 16 PEIGEN CAO FANG LI ! G(t′ ) 0 . By the assumption, the ∗ In−p We know that the G-matrix of xt′ has the form of Gt′ = ! G(t) 0 G-matrix of xt also has the form of Gt = . By row sign-coherence of G-matrices, we ⋆ In−p know that both ∗ and ⋆ are nonnegative matrices. Because πI (g(xk;t )) = πI (g(xvt′ )) = πI (Gt′ v), we ′ can assume that g(xk;t ) = (g1 , · · · , gp , gp+1 , · · · , gn )⊤ and g(xvt′ ) = Gt′ v = (g1 , · · · , gp , gp+1 , · · · , gn′ )⊤ , where gi , gi′ ≥ 0 for i = p + 1, · · · , n. n n Q Q g′ xgi;ti ′ are cluster monomials in xt and in xt′ Then it is easy to see xk;t xi;ti and xvt′ i=p+1 i=p+1 respectively and g(xk;t n Y g′ xi;ti ) = (g1 , · · · , gp , gp+1 + ′ gp+1 ,··· , gn + gn′ )⊤ = g(xvt′ n Y xgi;ti ′ ). i=p+1 i=p+1 n Q i=p+1 ∈ / I, xvt′ g′ xi;ti = gi′ n Q xgi;ti ′ have the same g-vector. xi;t and xvt′ i=p+1 i=p+1 n Q xvt′ xgi;ti ′ , here xi;t1 = xi;t2 = xi;t0 for i = p + 1, · · · i=p+1 This means that the cluster monomials xk;t Theorem 4.2, we get that xk;t n Q By , n. Note that since vi = 0 for i is actually a monomial in x1;t′ , · · · , xp,t′ . ′ If gi0 − gi0 < 0 for some i0 > p. Let (xt1 , yt1 , Bt1 ) = µi0 (xt , yt , Bt ), then xl;t1 = xl;t for l 6= i0 n Q g −g′ and xi0 ;t1 xi0 ;t is a binomial in variables in xt1 . From this and xvt′ = xk;t xi;ti i , we can get the i=p+1 expansion of xvt′ with respect to xt1 . Since gi0 − gi′0 < 0, the obtained expansion of xvt′ can not be a Laurent polynomial, and this contradicts Laurent phenomenon. t1 t2 = gik If gi0 − gi′0 > 0 for some i0 > p, we can also conclude a contradiction. So gik for i = v n p + 1, · · · , n and thus xk;t = xt′ . Here v ∈ N . Then by Lemma 5.1, xk;t is a cluster variable in xt′ . Since k is arbitrary, we obtain that xt and xt′ have the same cluster variables. So xt is connected  with xt0 by a {1, 2, · · · , p}-sequence. Assume that I is a subset of {1, · · · , n}, and A(S) is a skew-symmetrizable cluster algebra of rank n with any coefficients. Let ΦI (xt0 ) be the set of clusters of A(S) containing the cluster variables / I, and ΨI (xt0 ) be the set of clusters which are connected with xt0 by an I-sequence. xi;t0 for i ∈ Clearly, ΨI (xt0 ) ⊆ ΦI (xt0 ). Conjecture 4.14(3) of [11] claims that ΨI (xt0 ) = ΦI (xt0 ), which has been affirmed for acyclic skew-symmetric cluster algebras in Corollary 3 of [1] via cluster category. Now, we can affirm this equality ΨI (xt0 ) = ΦI (xt0 ) for any skew-symmetrizable cluster algebra. Theorem 5.6. Let A(S) be a skew-symmetrizable cluster algebra with any coefficients, and xt , xt0 be any two clusters of A(S). If xi;t = xi;t0 for i = p + 1, p + 2, · · · , n, then xt is connected with xt0 by an I = {1, 2, · · · , p}-sequence, and thus ΨI (xt0 ) = ΦI (xt0 ) Proof. Let A(S pr ) be the corresponding skew-symmetrizable cluster algebra with principal coefficients at t0 and with initial exchange matrix Bt0 . The seed of A(S pr ) at t ∈ Tn is denoted by pr pr (xpr t , yt , Bt ). pr Since xi;t = xi;t0 , we get by Proposition 5.4 that xpr i;t = xi;t0 , i = p + 1, · · · , n. Thus we know pr pr that xt is connected with xt0 by a {1, · · · , p}-sequence. So, xt is connected with xt0 by the same {1, 2, · · · , p}-sequence, by Theorem 3.7 of [12].  The following theorem gives the affirmation to Conjecture 1.1. THE ENOUGH g-PAIRS PROPERTY AND DENOMINATOR VECTORS OF CLUSTER ALGEBRAS 17 Theorem 5.7. Suppose that A(S) is a skew-symmetrizable cluster algebra with coefficients in ZP, and xi;t is a cluster variable of A(S). Let dt0 (xi;t ) = (d1 , · · · , dn )⊤ be the d-vector of xi;t with respect to the cluster xt0 of A(S). Then (i). dk depends only xi;t and xk;t0 , not on the clusters containing xk;t0 , where k = 1, · · · , n; (ii). dk ≥ −1 for k = 1, · · · , n, and in details,   iff xi,t = xk,t0 ;  −1 , dk = 0 , iff xi,t 6= xk,t0 and xi,t , xk,t0 ∈ xt′ for some t′ ;    a positive integer , iff there exists no cluster xt′ containing both xi,t and xk,t0 . In particular, if xi;t ∈ / xt0 , then dt0 (xi;t ) ∈ Nn , that is, the positivity of d-vectors holds. ′ Proof. (i). Let xt′ be another cluster of A(S) containing xk;t0 , and dt (xi;t ) = (d′1 , · · · , d′n )⊤ be the d-vector of xi;t with respect to xt′ . Without loss of generality, we can assume that xk;t′ = xk;t0 . By Theorem 5.6, the cluster xt′ is connected with xt0 by a {1, 2, · · · , n} \ {k}-sequence. Then by Proposition 2.6, we get that d′k = dk . (ii). Let A(S pr ) be the skew-symmetrizable cluster algebra with principal coefficients at t0 and pr pr with initial exchange matrix Bt0 . The seed of A(S pr ) at t ∈ Tn is denoted by (xpr t , yt , Bt ). By = Bt0 , we know that Btpr = Bt for any t ∈ Tn . By the fact that d-vectors do not depend on the Btpr 0 choice of coefficients, we know that ⊤ t0 dt0 (xpr i;t ) = d (xi;t ) = (d1 , · · · , dn ) . By Corollary 5.3, we know that dk = −1, 0 or dk > 0. pr If xi;t = xk;t0 , clearly, dk = −1. Conversely, if dk = −1, then xpr i;t = xk;t0 , by Corollary 5.3. Thus xi;t = xk;t0 , by Theorem 3.7 of [12]. pr pr If dk = 0, then there exists a cluster xpr t′ containing both xi;t and xk;t0 , by Corollary 5.3. Thus xt′ is a cluster of A(S) containing both xi;t and xk;t0 , by Proposition 5.4. And since dk = 0, we must have xi;t 6= xk;t0 . If there exists a cluster xt′ containing both xi;t and xk;t0 . Because xi;t 6= xk;t0 , without loss of generality, we can assume that xi;t = x1;t′ and xk;t0 = x2;t′ . By (i), we know that dk does not ′ depend on the cluster containing xk;t0 = x2;t′ , so dk is equal to the 2-th component of dt (xi;t ). Since ′ ′ dt (xi;t ) = dt (x1;t′ ) = −e1 , we get dk = 0. / xt0 , then each dk is We have proved that dk ≥ −1, and if dk = −1, then xi;t ∈ xt0 . So if xi;t ∈ n t0  nonnegative, and we thus d (xi;t ) ∈ N . The proof is finished. As a corollary, we can get the sign-coherence of D-matrices, which was conjectured in [12]. Corollary 5.8. Suppose that A(S) is a skew-symmetrizable cluster algebra with coefficients in ZP, and xt , xt0 be two clusters of A(S). Let Dtt0 be the D-matrix of xt with respect to the cluster xt0 , then any two nonzero entries of Dt in the same row or in the same column have the same sign. 6. Two applications of Theorem 5.7 In this section, we give two applications of Theorem 5.7. One gives an answer to Question 1.3, and the other gives an answer to Problem 1.2. 18 PEIGEN CAO FANG LI 6.1. The proper Laurent monomial property. In this part, we first review the definition of the proper Laurent monomial property and its related results, and then we prove that any skewsymmetrizable cluster algebra has the proper Laurent monomial property, based on the positivity of d-vectors, which gives an answer to Question 1.3. Fix a cluster xt and a vector a ∈ Zn , recall that if a ∈ Nn , then xat is called a cluster monomial in xt and If a ∈ / Nn , then xat is called a proper Laurent monomial in xt . Denote by CM (t) the set of cluster monomials in xt . It is easy to see that if xt1 and xt2 have common cluster variables, then CM (t1 ) ∩ CM (t2 ) 6= ∅. Definition 6.1. ([3, 2]) A cluster algebra A(S) is said to have the proper Laurent monomial property if for any two clusters xt and xt0 of A(S) and any cluster monomial xat ∈ CM (t)\CM (t0 ), xat is a ZP-linear combination of proper Laurent monomials in xt0 . Theorem 6.2. (i). ([3]) If a cluster algebra A(S) has the proper Laurent monomial property, then its cluster monomials are linearly independent over ZP. (ii). ([2]) Any skew-symmetric cluster algebra A(S) has the proper Laurent monomial property, thus its cluster monomials are linearly independent over ZP. Proof. In order to make the readers to have a good sense of the proper Laurent monomial property, we repeat the proof of (i) here. P Suppose that ct,v xvt = 0, where v ∈ Nn , ct,v ∈ ZP. Fix a cluster xt0 and a v0 ∈ Nn , by the t,v / CM (t0 ) is a sum of proper Laurent monomials in proper Laurent monomial property, each xvt ∈ P ±1 ±1 v ZP[x±1 ]. Thus , · · · , x c x can be written as a Laurent polynomial in ZP[x±1 t,v t n;t0 1;t0 1;t0 , · · · , xn;t0 ] t,v ±1 with the form of Σ1 + Σ2 , where Σ1 is a sum of monomials in ZP[x±1 1;t0 , · · · , xn;t0 ] and Σ2 is a sum of ±1 ±1 proper Laurent monomials in ZP[x1;t ]. The coefficient of xvt00 in Σ1 , as well as in Σ1 + Σ2 , , · · · , xn;t 0 0 is precisely ct0 ,v0 . Then, Σ1 + Σ2 = 0 results in ct0 ,v0 = 0. And thus cluster monomials of A(S) are linearly independent over ZP.  From the above theorem, we know that the proper Laurent monomial property is a very powerful property in cluster algebras. It is natural to expect that this property also holds for skewsymmetrizable cluster algebras. However, the method in [2], depends on the generalized cluster category and cluster character, so the proof there does not work for skew-symmetrizable cluster algebras. In order to deal with skew-symmetrizable case, we must develop a new method. Thanks to Theorem 2.5 (iii) and Theorem 5.7, we can provide such a method which depends on the positivity of cluster variables and the positivity of d-vectors. The following theorem is an answer to Question 1.3. Theorem 6.3. Any skew-symmetrizable cluster algebra A(S) has the proper Laurent monomial property. Proof. Let xt , xt0 be any two clusters of A(S), and xat = n Q i=1 xai;ti be a cluster monomial in CM (t) \ CM (t0 ), i.e., there exists ak > 0 such that xk;t is not a cluster variable in xt0 . By the positivity of Laurent phenomenon, the expansion of xat with respect to xt0 has the form of X xat = cv xvt0 , v∈V THE ENOUGH g-PAIRS PROPERTY AND DENOMINATOR VECTORS OF CLUSTER ALGEBRAS 19 where V is a finite subset of Zn , and 0 6= cv ∈ NP for v ∈ V . For the same reason, there exist polynomials f1 , · · · , fn ∈ NP[x1;t , · · · , xn;t ] with xj;t ∤ fi such that xi;t0 = fi (x1;t , · · · , xn;t ) dt (xi;t0 ) xt . Denote by F v = f1v1 · · · fnvn . Since v1 , · · · , vn ∈ Z, F v can be written in the form of F v = where F1;v , F2;v ∈ NP[x1;t , · · · , xn;t ] with xj;t ∤ F1;v and xj;t ∤ F2;v , j = 1, 2, · · · , n. Thus, X X X −Dt v −Dt v F1;v xat = . cv xvt0 = cv xt t0 F v = cv xt t0 F2;v v∈V v∈V F1;v F2;v , v∈V From the above equality, we can obtain an equality with the following form: X −Dt v xat g(x1;t , · · · , xn;t ) = cv xt t0 gv (x1;t , · · · , xn;t ), v∈V which can be written as g(x1;t , · · · , xn;t ) = X −Dtt0 v−a cv xt gv (x1;t , · · · , xn;t ). v∈V Because cv ∈ NP, and g, gv ∈ NP[x1;t , · · · , xn;t ] with xj;t ∤ g and xj;t ∤ gv for j = 1, 2, · · · , n, we must have −Dtt0 v − a ∈ Nn . So, the k-th component of Dtt0 v + a satisfying 0 0 (dtk1 v1 + · · · + dtkn vn ) + ak ≤ 0, where dtkj0 is the k-th component of dt (xj;t0 ), j = 1, 2, · · · , n. By the positivity of d-vectors (see 0 0 Theorem 5.7), we get that dtkj0 ≥ 0, since xk;t ∈ / xt0 . Then by ak > 0 and (dtk1 v1 +· · ·+dtkn vn )+ak ≤ 0, n a we can obtain v ∈ / N , v ∈ V , i.e., xt is a sum of proper Laurent monomials in xt0 . The proof is finished.  Remark 6.4. (i). By Laurent phenomenon, we know that any cluster variable xi;t not in xt0 , is a sum of Laurent monomials in xt0 . In fact, by Theorem 6.3, we know that xi;t is a sum of proper Laurent monomials in xt0 . (ii). From the proof of Theorem 6.3, we know that the proper Laurent monomial property of a cluster algebra A(S) is completely determined by the positivity of cluster variables and the positivity of d-vectors. Note that the foregoing fact also makes sense for more general cluster algebra, i.e., totally sign-skew-symmetric cluster algebra, as long as one assumes that the positivity of cluster variables and the positivity of d-vectors hold. (iii). By Theorem 6.2 (i), and Remark 6.4 (ii), the linear independence of the cluster monomials of A(S) is completely determined by the positivity of cluster variables and the positivity of d-vectors. 6.2. Compatibility degree on the set of cluster variables. The compatibility degree on the set of cluster variables was firstly defined in [6] for cluster algebras of finite type. It needs Conjecture 1.1 (iii), which was affirmed for cluster algebras of finite type in [6], to guarantee the validity of the definition of compatibility degree. Thanks to Theorem 5.7, we can extend the definition of compatibility degree to any skew-symmetrizable cluster algebras. We then give a characterization for several cluster variables to be contained or not in some cluster of A(S) (Theorem 6.8). Definition 6.5. Let A(S) be a skew-symmetrizable cluster algebra, and X be the set of cluster variables of A(S). We define a function d : X × X → Z≥−1 , which is called the compatibility degree on the set X of cluster variables. For any two cluster variables xi;t and xj;t0 , d(xj;t0 , xi;t ) is defined by the following steps: • choose a cluster xt0 containing the cluster variable xj;t0 ; 20 PEIGEN CAO FANG LI • compute the d-vector of xi;t with respect to xt0 , say, dt0 (xi;t ) = (d1 , · · · , dn )⊤ ; • d(xj;t0 , xi;t ) := dj , which is called the compatibility degree of xi;t with respect to xj;t0 . Remark 6.6. (1). The compatibility degree d(xj;t0 , xi;t ) is well-defined, since d(xj;t0 , xi;t ) does not depend on the choice of xt0 , and is uniquely determined by xi;t and xj;t0 by Theorem 5.7 (i). (2). By Theorem 5.7 (ii), we have the following facts: (a). d(xj;t0 , xi;t ) ∈ Z≥−1 . (b). d(xj;t0 , xi;t ) = −1 if and only if d(xi;t , xj;t0 ) = −1. (c). d(xj;t0 , xi;t ) = 0 if and only if d(xi;t , xj;t0 ) = 0. (3). By (b),(c) and Theorem 5.7 (ii), we know that d(xj;t0 , xi;t ) ≤ 0 if and only if d(xi;t , xj;t0 ) ≤ 0. We say that xi;t and xj;t0 are compatible, if d(xj;t0 , xi;t ) ≤ 0. Let x1 , · · · , xp be different cluster variables of a skew-symmetrizable cluster algebra A(S). The set {x1 , · · · , xp } is called a compatible set of A(S) if any two cluster variables in this set are compatible. Lemma 6.7. Let A(S) be a skew-symmetrizable cluster algebra, xk;t be a cluster variable, and xt0 = {x1;t0 , · · · , xn;t0 } be a cluster of A(S). If xk;t is compatible with xi;t0 for i = p+ 1, p+ 2, · · · , n, then {xk;t } ∪ {xp+1;t0 , xp+2;t0 , · · · , xn;t0 } is a subset of some cluster of A(S). Proof. Thanks to Proposition 5.4, we can assume that A(S) is a skew-symmetrizable cluster algebra with principal coefficients at t0 . By Theorem 3.6, A(S) has the enough g-pair property, thus for I = {1, 2, · · · , p} and the cluster xt , there exists a cluster xt′ such that (xt , xt′ ) is a g-pair along I. Thus for the cluster variable xk;t (as a cluster monomial in xt ), there exists a cluster monomial xvt′ in xt′ with vi = 0 for i ∈ / I such that πI (g(xk;t )) = πI (g(xvt′ )). We can assume that g(xk;t ) = ⊤ ′ (g1 , · · · , gp , gp+1 , · · · , gn ) and g(xvt′ ) = (g1 , · · · , gp , gp+1 , · · · , gn′ )⊤ . Because (xt , xt′ ) is a g-pair with xt0 by an I-sequence, and the G-matrix of along I, we know that xt′ is a cluster connected ! G(t′ ) 0 xt′ has the form of Gt′ = . By row sign-coherence of G-matrices, we know that ∗ In−p ′ , · · · , gn′ ≥ 0. gp+1 For each i = p + 1, p + 2, · · · , n, since xk;t is compatible with xi;t0 , there exists a cluster xti containing both xk;t and xi;t0 . By the row sign-coherence of G-matrices, we know that the i-th row of Gti is nonnegative, i = p + 1, · · · , n. Thus we can obtain that gp+1 , · · · , gn ≥ 0. n n Q Q g′ xgi;ti ′ are cluster monomials in xt and in xt′ respectively and Then xk;t xi;ti and xvt′ i=p+1 i=p+1 g(xk;t n Y g′ ′ , · · · , gn + gn′ )⊤ = g(xvt′ xi;ti ) = (g1 , · · · , gp , gp+1 + gp+1 n Y xgi;ti ′ ). i=p+1 i=p+1 This means that the cluster monomials xk;t n Q i=p+1 Theorem 4.2, we get that xk;t n Y gi′ xi;t and xvt′ g′ xi;ti = xvt′ i=p+1 n Y n Q i=p+1 xgi;ti ′ have the same g-vector. By xgi;ti ′ . i=p+1 By the same argument with the one in the proof of Lemma 5.5, we get that xk;t is a cluster variable in xt′ . Since xt′ is connected with xt0 by an I = {1, · · · , p}-sequence, we know that xj;t′ = xj;t0 for j = p + 1, · · · , n. Thus xt′ is a cluster of A(S) containing {xk;t } ∪ {xp+1;t0 , xp+2;t0 , · · · , xn;t0 }.  The following theorem is an answer to Problem 1.2. Theorem 6.8. Let A(S) be a skew-symmetrizable cluster algebra of rank n. Then THE ENOUGH g-PAIRS PROPERTY AND DENOMINATOR VECTORS OF CLUSTER ALGEBRAS 21 (i). {x1 , · · · , xp } is a compatible set of A(S) if and only if {x1 , · · · , xp } is a subset of some cluster xt of A(S). In this case, it always holds that p ≤ n. (ii). {x1 , · · · , xp } is a cluster of A(S) if and only if it is a maximal compatible set of A(S). In this case, p = n. Proof. (i). The side for “if” part is clear and the side for “only if” part can be deuced from Lemma 6.7 step by step. (ii). It follows from (i).  Based on the above theorem, we can also give a new proof of the known fact from [16, 4] in cluster algebras as follows. Corollary 6.9. Let A(S) be a skew-symmetrizable cluster algebra of rank n, (xt1 , yt1 , Bt1 ) and (xt2 , yt2 , Bt2 ) be two seeds of A(S) with xi;t1 = xi;t2 for i = 1, 2, · · · , n − 1. Denote by x′n;t1 the new cluster variable in the seed µn (xt1 , yt1 , Bt1 ), then xn;t2 = xn;t1 or xn;t2 = x′n;t1 . Proof. By the definition of mutation, we have that xn;t1 x′n;t1 = Y bt1 Y −bt1 yn;t1 yn;t1 xi;tin1 + xi;t1in . 1 ⊕ yn;t1 t1 1 ⊕ yn;t1 t1 bin >0 Since xi;t1 = xi;t2 for i = 1, 2, · · · , n − 1, we know that bin <0 yn;t1 1⊕yn;t1 Q t 1 >0 bin t1 b xi;tin1 + yn;t1 1⊕yn;t1 polynomial in variables in xt2 , its d-vector with respect to xt2 is zero, i.e., Y bt1 Y −bt1 yn;t1 yn;t1 dt2 (xn;t1 x′n;t1 ) = dt2 ( xi;tin1 + xi;t1in ) = 0. 1 ⊕ yn;t1 t1 1 ⊕ yn;t1 t1 bin >0 Q t 1 <0 bin t1 −b xi;t1in as a bin <0 In particular, the n-th component of dt2 (xn;t1 x′n;t1 ) is zero, i.e., d(xn;t2 , xn;t1 ) + d(xn;t2 , x′n;t1 ) = 0. So, d(xn;t2 , xn;t1 ) ≤ 0 or d(xn;t2 , x′n;t1 ) ≤ 0, i.e., either that xn;t2 and xn;t1 are compatible or that xn;t2 and x′n;t1 are compatible. Assume that xn;t2 6= xn;t1 and xn;t2 6= x′n;t1 . We know that either {x1;t1 , · · · , xn−1;t1 , xn;t2 , xn;t1 } = {x1;t2 , · · · , xn−1;t2 , xn;t2 , xn;t1 } forms a compatible set with n + 1 elements, or {x1;t1 , · · · , xn−1;t1 , xn;t2 , x′n;t1 } = {x1;t2 , · · · , xn−1;t2 , xn;t2 , x′n;t1 } forms a compatible set with n + 1 elements. This contradicts to Theorem 6.8, so we must have  xn;t2 = xn;t1 or xn;t2 = x′n;t1 . Example 6.10. ! Let A(S) be the coefficients-free cluster algebra given by the initial exchange matrix 0 1 . A(S) has five clusters: Bt0 = −1 0 µ1 µ2 µ1 µ2 µ1 {x1 , x2 } −→ {x3 , x2 } −→ {x3 , x4 } −→ {x5 , x4 } −→ {x5 , x1 } −→ {x2 , x1 }, 2 +1 where x3 = x2x+1 , x4 = x1x+x , x5 = x1x+1 and the set of cluster variables of A(S) is X = 1 1 x2 2 {x1 , x2 , x3 , x4 , x5 }. By simple computation, it is easy to see that compatibility degree on the set X of cluster variables is given by 22 PEIGEN CAO  d(x1 , x1 )  d(x2 , x1 )  d(x3 , x1 )   d(x4 , x1 ) d(x5 , x1 ) d(x1 , x2 ) d(x2 , x2 ) d(x3 , x2 ) d(x4 , x2 ) d(x5 , x2 ) d(x1 , x3 ) d(x2 , x3 ) d(x3 , x3 ) d(x4 , x3 ) d(x5 , x3 ) d(x1 , x4 ) d(x2 , x4 ) d(x3 , x4 ) d(x4 , x4 ) d(x5 , x4 ) FANG LI    d(x1 , x5 ) −1 0 1 1 0    d(x2 , x5 )  0 −1 0 1 1     d(x3 , x5 ) 0 −1 0 1 = 1 .    d(x4 , x5 )  1 1 0 −1 0  d(x5 , x5 ) 0 1 1 0 −1 From the above matrix, we know that the maximal compatible sets of A(S) are the following five sets: {x1 , x2 }, {x3 , x2 }, {x3 , x4 }, {x5 , x4 }, {x5 , x1 }, which are exactly the clusters of A(S). Acknowledgements: This project is supported by the National Natural Science Foundation of China (No.11671350 and No.11571173). References [1] P. Caldero and B. Keller, From triangulated categories to cluster algebras. II. Ann. Sci. École Norm. Sup. (4) 39 (2006), no. 6, 983-1009. [2] Giovanni Cerulli Irelli, Bernhard Keller, Daniel Labardini-Fragoso, and Pierre-Guy Plamondon, Linear independence of cluster monomials for skew-symmetric cluster algebras, axXiv:1203.1307v4. [3] Giovanni Cerulli Irelli and Daniel Labardini-Fragoso, Quivers with potentials associated to triangulated surfaces, part III: Tagged triangulations and cluster monomials, Compos. Math. 148 (2012), no. 6, 18331866. [4] P. Cao and F. Li, Some conjectures on generalized cluster algebras via the cluster formula and D-matrix pattern, J. Algebra 493 (2018), 57C78. [5] P. Cao and F. Li, Positivity of denominator vectors of cluster algebras, arXiv:1712.06975. [6] C. Ceballos and V. Pilaud, Denominator vectors and compatibility degrees in cluster algebras of finite type, Trans. Amer. Math. Soc. 367 (2015), no. 2, 1421C1439. [7] H. Derksen, J. Weyman and A. Zelevinsky, Quivers with potentials and their representations II: Applications to cluster algebras, J. Amer. Math. Soc. Volume 23, Number 3, July 2010, Pages 749C790. [8] S. Fomin, M. Shapiro, and D. Thurston, Cluster algebras and triangulated surfaces. I. Cluster complexes. Acta Math., 201(1):83C146, 2008. [9] S. Fomin and A. Zelevinsky, Cluster algebras. I. Foundations, J. Amer. Math. Soc. 15 (2002), no. 2, 497-529 (electronic). [10] S. Fomin, A. Zelevinsky. Cluster algebras. II. Finite type classification. Invent. Math., 154 (2003), no.1, 63-121. [11] S. Fomin and A. Zelevinsky, Cluster algebras: notes for the CDM-03 conference, Current Developments in Mathematics, 2003, Int. Press, Somerville, MA, 2003, pp. 1-34. [12] S. Fomin, A. Zelevinsky. Cluster algebras. IV. Coefficients. Compos. Math. 143(2007), 112-164. [13] M. Gross, P. Hacking, and S. Keel, Mirror symmetry for log CalabiYau surfaces I. Publ. Math. Inst. Hautes Études Sci., 2015(122), 65C168, 2015 [14] M. Gross, P. Hacking, S. Keel, M. Kontsevich, Canonical bases for cluster algebras, J. Amer. Math. Soc. 31 (2018), 497-608. [15] M. Gross, R. Pandharipande, and B. Siebert, The tropical vertex, Duke Math. J., 153(2):297C362, 2010. [16] M. Gekhtman, M. Shapiro, and A. Vainshtein, On the properties of the exchange graph of a cluster algebra, Math. Res. Lett. 15 (2008), 321-330. [17] M. Kontsevich and Y. Soibelman, Wall-crossing structures in Donaldson-Thomas invariants, integrable systems and Mirror Symmetry, arXiv:1303.3253. [18] G. Muller, The existence of a maximal green sequence is not invariant under quiver mutation. Electron. J. Combin., 23 (2016), no. 2, Paper 2.47, 23pp. THE ENOUGH g-PAIRS PROPERTY AND DENOMINATOR VECTORS OF CLUSTER ALGEBRAS 23 [19] T. Nakanishi and A. Zelevinsky, On tropical dualities in cluster algebras, arXiv:1101.3736 [math.RA]. [20] N. Reading and S. Stella, Initial-seed recursions and dualities for d-vectors, Pacific J. Math. 293 (2018), no. 1, 179-206. Peigen Cao Department of Mathematics, Zhejiang University (Yuquan Campus), Hangzhou, Zhejiang 310027, P.R.China E-mail address: [email protected] Fang Li Department of Mathematics, Zhejiang University (Yuquan Campus), Hangzhou, Zhejiang 310027, P.R.China E-mail address: [email protected]
0math.AC
1 Restoration by Compression arXiv:1711.05147v3 [cs.IT] 21 Jan 2018 Yehuda Dar, Michael Elad, and Alfred M. Bruckstein Abstract—In this paper we study the topic of signal restoration using complexity regularization, quantifying the compression bit-cost of the signal estimate. While complexity-regularized restoration is an established concept, solid practical methods were suggested only for the Gaussian denoising task, leaving more complicated restoration problems without a generally constructive approach. Here we present practical methods for complexity-regularized restoration of signals, accommodating deteriorations caused by a known linear degradation operator of an arbitrary form. Our iterative procedure, obtained using the Half Quadratic Splitting approach, addresses the restoration task as a sequence of simpler problems involving `2 -regularized estimations and rate-distortion optimizations (considering the squared-error criterion). Further, we replace the rate-distortion optimizations with an arbitrary standardized compression technique and thereby restore the signal by leveraging underlying models designed for compression. Additionally, we propose a shift-invariant complexity regularizer, measuring the bit-cost of all the shifted forms of the estimate, extending our method to use averaging of decompressed outputs gathered from compression of shifted signals. On the theoretical side, we present an analysis of complexity-regularized restoration of a cyclo-stationary Gaussian signal from deterioration by a linear shift-invariant operator and an additive white Gaussian noise. The theory shows that optimal complexity-regularized restoration relies on an elementary restoration filter and compression spreading reconstruction quality unevenly based on the energy distribution of the degradation filter. Nicely, these ideas are realized also in the proposed practical methods. Finally, we present experiments showing good results for image deblurring and inpainting using the HEVC compression standard. Index Terms—Complexity regularization, rate-distortion optimization, signal restoration, image deblurring, half quadratic splitting. I. I NTRODUCTION IGNAL restoration methods are often posed as inverse problems using regularization terms. While many solutions can explain a given degraded signal, using regularization will provide signal estimates based on prior assumptions on signals. One interesting regularization type measures the complexity of the candidate solution in terms of its compression bit-cost. Indeed, encoders (that yield the bit cost) rely on signal models and allocate shorter representations to more likely signal instances. This approach of complexity-regularized restoration is an attractive meeting point of signal restoration and compression, two fundamental signal-processing problems. Numerous works [1]–[3] considered the task of denoising a signal corrupted by an additive white Gaussian noise using complexity regularization, practically estimating the clean signal by employing a standard lossy compression of its noisy version. However, more complex restoration problems (e.g., S The authors are with the Department of Computer Science, Technion, Israel. E-mail addresses: {ydar, elad, freddy}@cs.technion.ac.il. deblurring, super resolution, inpainting), involving non-trivial degradation operators, do not lend themselves to a straightforward treatment by compression techniques designed for the squared-error distortion measure. Moulin and Liu [4] studied the complexity regularization idea for general restoration problems, presenting a thorough theoretical treatment together with a limited practical demonstration of Poisson denoising based on a suitably designed compression method. Indeed, a general method for complexity-regularized restoration remained as an open question for a long while until our recent preliminary publication [5], where we presented a generic and practical approach flexible in both the degradation model addressed and the compression technique utilized. Our strategy for complexity-regularized signal restoration relies on the Half Quadratic Splitting approach (see other uses in [6], [7]), decomposing the difficult optimization problem into a sequence of easier tasks including `2 -regularized inverse problems and standard rate-distortion optimizations (with respect to a squared-error distortion metric). A main part of our methodology is to replace the rate-distortion optimization with standardized compression techniques enabling an indirect utilization of signal models used for efficient compression designs. Our method relates to various contemporary concepts in signal and image processing. The recent frameworks of Plugand-Play Priors [8] and Regularization-by-Denoising [9] suggest leveraging a Gaussian denoiser for more complicated restoration tasks, achieving impressive results (see, e.g., [8]– [12]). However, our method is not only the compression-based counterpart for denoising-based restoration concepts from [8], [9]. In fact we carry out restoration using a more elementary component – since compression can be directly used in the design of a Gaussian denoiser [1]–[3], but not the other way around. Denoising indeed makes signals more compressible but cannot be used in a straightforward way to do compression. Commonly, compression methods process the given signal based on its decomposition into non-overlapping blocks, yielding block-level rate-distortion optimizations based on block bit-costs. The corresponding complexity measure sums the bitcosts of all the non-overlapping blocks, however, note that this evaluation is shift sensitive. This fact motivates us to propose a shift-invariant complexity regularizer by quantifying the bitcosts of all the overlapping blocks of the signal estimate. This improved regularizer calls for our restoration procedure to use averaging of decompressed signals obtained from compressions of shifted signals. Our shift-invariant approach conforms with the Expected Patch Log-Likelihood (EPLL) idea [7], where a full-signal regularizer is formed based on a block-level prior in a way leading to averaging MAP estimates of shifted signal versions. Our extended method also recalls the cycle spinning concept, presented in [13] for wavelet- 2 based denoising. Additional resemblance is to the compression postprocessing techniques in [14], [15] enhancing a given decompressed image by averaging supplementary compressiondecompression results of shifted versions of the given image, thus, our method generalizes this approach to any restoration problem with an appropriate consideration of the degradation operator. Very recent works [16], [17] suggested the use of compression techniques for compressive sensing of signals and images, but our approach examines other perspectives and settings referring to restoration problems as will be explained below. In this paper we extend our previous conference publication [5] with new theoretical and experimental results. In the theory section, we study the problem of complexity-regularized restoration of a cyclo-stationary Gaussian signal from a degradation procedure consisting of a linear shift-invariant operator and additive white Gaussian noise. We gradually establish a few equivalent optimization forms, emphasizing two main concepts for complexity-regularized restoration: the degraded signal should go through a simple inverse filtering procedure, and then should be compressed so that the decompression components will have a varying quality distribution determined by the degradation-filter energy-distribution. We explain how these ideas materialize in the practical approach we propose, thus, establishing a theoretical reasoning for the feasible complexity-regularized restoration. In the experiments section we provide new results demonstrating the practical complexity-regularized restoration approach for image deblurring. While deblurring is a challenging restoration task, we present compelling results obtained using the image compression profile of the HEVC standard [18]. An objective comparison to other deblurring techniques showed that the proposed implementation is a very good, but not a leading deblurring method. Moreover, we also extend our evaluation given in [5] for image inpainting. Here, we use HEVC compression to restore images from a severe degradation of 80% missing pixels. Interestingly, our compressionbased image inpainting approach can be perceived as the dual concept of inpainting-based compression of images and videos suggested in, e.g., [19]–[21]. This paper is organized as follows. In section II we overview the settings of the complexity-regularized restoration problem. In section III we present the proposed practical methods for complexity-regularized restoration. In section IV we theoretically analyze particular problem settings where the signal is a cyclo-stationary Gaussian process. In section V we provide experimental results for image deblurring and inpainting. Section VI concludes this paper. II. C OMPLEXITY-R EGULARIZED R ESTORATION : P ROBLEM S ETTINGS A. Regularized Restoration of Signals In this paper we address the task of restoring a signal x0 ∈ RN from a degraded version, y ∈ RM , obeying the prevalent deterioration model: y = Hx0 + n (1) where H is a M ×N matrix being a linear degradation operator (e.g., blur, pixel omission, decimation) and n ∈ RM is a white Gaussian noise vector having zero mean and variance σn2 . Maximum A-Posteriori (MAP) estimation is a widelyknown statistical approach forming the restored signal, x̂, via x̂ = argmax p (x|y) (2) x where p (x|y) is the posterior probability. For the above defined degradation model (1), incorporating additive white Gaussian noise, the MAP estimate reduces to the form of x̂ = argmin x 1 2 kHx − yk2 − log p (x) 2σn2 (3) where p(x) is the prior probability that, here, evaluates the probability of the candidate solution. Another prevalent restoration approach, embodied in many contemporary techniques, forms the estimate via the optimization 2 x̂ = argmin kHx − yk2 + µs(x) (4) x where s(x) is a general regularization function returning a lower value for a more likely candidate solution, and µ ≥ 0 is a parameter weighting the regularization effect. This strategy for restoration based on arbitrary regularizers can be interpreted as a generalization of the MAP approach in (3). Specifically, comparing the formulations (4) and (3) exhibits the regularization function s(x) and the parameter µ as extensions of (− log p (x)) and the factor 2σn2 , respectively. Among the various regularization functions that can be associated with the general restoration approach in (4), we explore here the class of complexity regularizers measuring the required number of bits for the compressed representation of the candidate solution. The practical methods presented in this section focus on utilizing existing (independent) compression techniques, implicitly employing their underlying signal models for the restoration task. B. Operational Rate-Distortion Optimization The practical complexity-regularized restoration methods in this section are developed with respect to a compression technique obeying the following conceptual design. The signal is segmented to equally-sized non-overlapping blocks (each is consisted of Nb samples) that are independently compressed. The block compression procedure is modeled as a general variable-rate vector quantizer that employs a codebook, C, allowing a finite set of block reconstruction candidates, each is associated with a binary codeword for its compressed description. It is assumed that shorter codewords are coupled with block reconstructions that are, in general, more likely. The signal x is compressed based on its segmentation into a set of blocks {xi }i∈B (where B denotes the index set of blocks in the non-overlapping partitioning of the signal). In addition we introduce the function r(z) that evaluates the bitcost (i.e., the length of the binary codeword) for the block reconstruction z ∈ C. Then, the operational rate-distortion 3 optimization corresponding to the described architecture and a squared-error distortion metric is X X 2 {x̃i }i∈B = argmin kxi − vi k2 + λ r(vi ), (5) {vi }i∈B ∈C i∈B i∈B where λ ≥ 0 is a Lagrange multiplier corresponding to some total compression bit-cost. Importantly, the independent representation of non-overlapping blocks allows solving (5) separately for each block [22], [23]. Our mathematical developments require the following algebraic tools for block handling. The matrix Pi is defined to provide the ith block from the complete signal via the standard multiplication Pi x = xi . Note that Pi can extract any block of the signal, even one that is not in the non-overlapping grid B. Accordingly, the matrix PTi locates a block in the ith blockposition in a construction of a full-sized signalPand, therefore, lets to express the a complete signal as x = PTi xi . i∈B Now we can use the block handling operator Pi for expressing the block-based rate-distortion optimization in its corresponding full-signal formulation: 2 x̃ = argmin kx − vk2 + λrtot (v). (6) v∈CB where CB is the full-signal codebook, being the discrete set of candidate reconstructions for the full signal, defined using the block-level codebook C as ( ) X T CB = v v= Pi vi , {vi }i∈B ∈ C . (7) i∈B Moreover, the regularization function in (6) is the total bit cost of theP reconstructed signal defined for v ∈ CB as rtot (v) , r(Pi v). i∈B C. Complexity-Regularized Restoration: Basic Optimization Formulation While the regularized-restoration optimization in (4) is over a continuous domain, the operational rate-distortion optimization in (6) is a discrete problem with solutions limited to the set CB . Therefore, we extend the definition of the block bitcost evaluation function such that it is defined for any z ∈ RNb via  r (z) , z ∈ C r̄(z) = , (8) ∞ ,z ∈ /C and the P corresponding extension of the total bit-cost r̄tot (x) , r̄(Pi x) is defined for any x ∈ RN . i∈B Now we define the complexity regularization function as s(x) = r̄tot (x) (9) and the corresponding restoration optimization is 2 x̂ = argmin kHx − yk2 + µr̄tot (x). (10) x Due to the definition of the extended bit-cost evaluation function, r̄tot (x), the solution candidates of (10) are limited to the discrete set CB as defined in (7). Examining the complexity-regularized restoration in (10) for the Gaussian denoising task, where H = I, shows that the optimization reduces to the regular rate-distortion optimization in (6), namely, the compression of the noisy signal y. However, for more complicated restoration problems, where H has an arbitrary structure, the optimization in (10) is not easy to solve and, in particular, it does not correspond to standard compression designs that are optimized for the regular squared-error distortion metric. III. P ROPOSED M ETHODS In this section we present two restoration methods leveraging a given compression technique. The distinct algorithms result from two different definitions for the complexity regularization function. While the first approach regularizes the total bit-cost of the non-overlapping blocks of the restored signal, the second refers to the total bit-cost of all the overlapping blocks of the estimate. A. Regularize Total Complexity of Non-Overlapping Blocks Here we establish a practical method addressing the optimization problem in (10) based on the Half Quadratic Splitting approach (for additional uses see, e.g., [7]). The optimization (10) can be expressed also as X 2 x̂ = argmin kHx − yk2 + µ r̄(Pi x), (11) x i∈B where the degradation matrix H, having a general structure, renders a block-based treatment infeasible. Addressing this structural difficulty using the Half Quadratic Splitting strategy begins with introducing the auxiliary variables {zi }i∈B , where zi is coupled with the ith nonoverlapping block. Specifically, we reformulate the problem (11) into X  2 x̂, {ẑi }i∈B = argmin kHx − yk2 + µ r̄(zi ) x,{zi }i∈B s.t. zi = P i x i∈B ,for i ∈ B. (12) A relaxed form of the constrained optimization (12) is constructed by translating the equality constraints to a quadratic penalty terms in the following unconstrained form of the problem:  2 x̂, {ẑi }i∈B = argmin kHx − yk2 + (13) x,{zi }i∈B X βX 2 kPi x − zi k2 + µ r̄(zi ), 2 i∈B i∈B where β > 0 is a parameter controlling the closeness of each zi to its counterpart variable Pi x. Hence, the constraints in (12) are more closely approximated for larger β. Each of the optimization variables in (13) participates only in two of the three terms in the cost function and , therefore, we employ alternating minimization to obtain an iterative solution consisted of simpler optimizations. Similar to [7], the β parameter is gradually increased along the iterations and set to empirically-defined values yielding convergence to a solution that approximately satisfies the constraints in (12). 4 Accordingly, the tth iteration of the proposed iterative solution is 2 β (t) X (t−1) 2 (14) Pi x − ẑi x̂(t) = argmin kHx − yk2 + 2 2 x i∈B (t) ẑi β (t) = argmin Pi x̂(t) − zi 2 zi 2 2 + µr̄(zi ), i ∈ B Set β (t+1) as an increment of β (t) . (15) (16) The analytic solution of the first stage optimization in (14) is x̂ (t)  −1 β (t) = HT H + I 2 β (t) X T (t−1) H y+ Pi ẑi 2 ! Algorithm 1 Proposed Method Based on Total Complexity of Non-Overlapping Blocks Initialize ẑ(0) (depending on the deterioration type). t = 1, β (1) = β1 , θ(1) = θ1 3: repeat −1    (t) (t) HT y + β2 ẑ(t−1) 4: x̂(t) = HT H + β2 I  5: ẑ(t) = CompressDecompressθ(t) x̂(t) . 1: 2: 6: 7: 8: 9: Set β (t+1) as an increment of β (t) Set θ(t+1) as a decrease of θ(t) t←t+1 until stopping criterion is satisfied T i∈B (17) rendering this stage as a weighted averaging of the deteriorated signal with the block estimates obtained in the second stage of the previous iteration. The optimizations in the second stage of each iteration (15) are rate-distortion optimizations corresponding to each of the non-overlapping blocks of the signal estimate x̂(t) obtained in the first stage. Accordingly, the set of block-level optimizations in (15) can be interpreted as a single full-signal rate-distortion optimization with respect to a Lagrange multiplier value of (t) is increased in each λ(t) = β2µ (t) . Interestingly, since β iteration (see (16)), the Lagrangian multiplier value decreases correspondingly – thus relaxing the compression bit-cost constraint. We denote the compression-decompression procedure that replaces (15) as   ẑ(t) = CompressDecompressλ(t) x̂(t) , (18) where ẑ(t) is the decompressed signal assembled from the non-overlapping decompressed blocks. We further suggest using a standardized compression method as the compression-decompression operator (18). While many compression methods do not follow the exact rate-distortion optimizations we have in our mathematical development, we still encourage utilizing such techniques as an approximation for (15). Additionally, since many compression methods do not rely on Lagrangian optimization, their operating parameters may have different definitions such as quality parameters, compression ratios, or output bit-rates. Accordingly, we present the suggested algorithm with respect to a general compression-decompression procedure with output bit-cost directly or indirectly affected by a parameter denoted as θ. Without loss of generality, we consider that the reduction of θ increases the output bit-cost (similarly to the Lagrangian multiplier role in (15)). Hence, the iteration update of θ obeys θ(t+1) < θ(t) . One should also note that in the general case β and θ are independently updated since they do not have a formally defined relation. These generalizations are also implemented in the proposed Algorithm 1. Importantly, Algorithm 1 does not only restore the deteriorated input image, but also provides the signal estimate in a compressed form by employing the output of the compression stage of the last iteration. B. Regularize Total Complexity of All Overlapping Blocks Algorithm 1 emerged from complexity regularization measuring the total bit-cost of the estimate based on its decomposition into non-overlapping blocks (see Eq. (11)), resulting in a restored signal available in a compressed form compatible with the compression technique in use. Obviously, the above approach provides estimates limited to the discrete set of signals supported by the compression architecture, thus, having a somewhat reduced restoration ability with respect to methods providing estimates from an unrestricted domain of solutions. This observation motivates us to develop a complexityregularized restoration procedure that provides good estimates from the continuous unrestricted domain of signals while still utilizing a standardized compression technique as its main component. As before, our developments refer to a general blockbased vector quantizer relying on a codebook C as a discrete set of block-reconstruction candidates. We consider here the segmentation of the signal-block space, RNb , given by the voronoi cells corresponding to the compression reconstruction candidates, namely, for each c ∈ C there is a region   2 Nb Vc , w ∈ R c = arg min kw − c̃k2 (19) c̃∈C defining all the vectors in RNb that c is their nearest member of C. We use the voronoi cells in (19) for defining an alternative extension to the bit-cost evaluation of a signal block (i.e., the new definition, r̄v (z), will replace r̄(z) given in (8) that was used for the development of Algorithm 1). Specifically, we associate a finite bit-cost to any z ∈ RNb based on the voronoi cell it resides in, i.e., r̄v (z) = r(c) for z ∈ Vc (20) where r(c) is the regular bit-cost evaluation defined in Section II-B only for blocks in C. The method proposed here emerges from a new complexity regularization function that quantifies the total complexity of all the overlapping blocks of the estimate. Using the extended bit-cost measure r̄v (·), defined in (20), we introduce the fullsignal regularizer as X s∗ (x) = r̄v (Pi x) (21) i∈B∗ 5 where x ∈ RN , and B ∗ is a set containing the indices of all the overlapping blocks of the signal. The associated restoration optimization is X 2 r̄v (Pi x). (22) x̂ = argmin kHx − yk2 + µ x i∈B∗ Importantly, in contrast to the previous subsection, the function s∗ (x) evaluates the complexity of any x ∈ RN with a finite value and, thus, does not restrict the restoration to the discrete set of codebook-based constructions, CB , defined in (7). While the new regularizer in (22) is not separable into complexity evaluation of non-overlapping blocks, the Half Quadratic Splitting approach can accommodate it as well. This is explained next. We define the auxiliary variables {zi }i∈B∗ , where each zi is coupled with the ith overlapping block. Then, the optimization (22) is expressed as X  2 r̄v (zi ) x̂, {ẑi }i∈B∗ = argmin kHx − yk2 + µ x,{zi }i∈B∗ zi = Pi x s.t. i∈B∗ ∗ ,for i ∈ B . (23) As in Section III-A, we replace the equality constraints with quadratic penalties, employ alternating minimization, resulting in an iterative solution provided by the following three steps in each iteration (as before t denotes the iteration number): 2 β (t) X (t−1) 2 Pi x − ẑi (24) x̂(t) = argmin kHx − yk2 + 2 2 x ∗ i∈B (t) (t) ẑi = argmin Set β zi (t+1) β 2 Pi x̂(t) − zi 2 2 + µr̄v (zi ), i ∈ B ∗ (25) as an increment of β (t) . (26) While the procedure above resembles the one from the former subsection, the treatment of overlapping blocks has different interpretations to the optimizations in (24) and (25). Indeed, note that the block-level rate-distortion optimizations in (25) are not discrete due to the extended bit-cost evaluation r̄v (·) defined in (20). Due to the definition of r̄v (·), the ratedistortion optimizations (25) can be considered as continuous relaxations of the discrete optimizations done by the practical compression technique. Since we intend using a given compression method without explicit knowledge of its underlying codebook, we cannot construct the voronoi cells defining r̄v (·) and, thus, it is impractical to accurately solve (25). Consequently, we suggest to approximate the optimizations (25) by the discrete forms of (t) ẑi = argmin zi β (t) Pi x̂(t) − zi 2 2 2 + µr̄(zi ), i ∈ B ∗ (27) where r̄(·) is the discrete evaluation of the block bit-cost, defined in (8), letting to identify the problems as operational rate-distortion optimizations of the regular discrete form. Each block-level rate-distortion optimization in (27) is associated with each one of the overlapping blocks of the signal. Accordingly, we interpret this group of optimizations as multiple applications of a full-signal compression-decompression procedure, each associates to a shifted version of the signal (corresponding to different sets of non-overlapping blocks). Specifically, for a signal x and a compression block-size of Nb samples, there are Nb shifted grids of non-overlapping blocks. For mathematical convenience, we consider here cyclic shifts such that the j th shift (j = 1, ..., Nb ) corresponds to a signal of N samples taken cyclically starting at the j th sample of x (in practice other definitions of shifts may be used, e.g., see Section V for a suggested treatment of two-dimensional signals). We denote the j th shifted signal as shif tj {x}. Moreover, we denote the index set of blocks included in the j th shifted signal ∗ Nb j as B j (noting that B 1 = B),nhence, o B = ∪j=1 B . Therefore, (t) the decompressed blocks ẑi can be obtained by i∈B∗ multiple full-signal compression-decompression applications,   namely, ẑj,(t) = CompressDecompressλ shif tj x̂(t) for j = 1, ..., Nb , where the Lagrangian multiplier value is th decompressed image, ẑj,(t) , is composed of λ = β2µ (t) . The j n o (t) the blocks ẑi that can be obtained via j i∈B o n (t) for i ∈ B j ẑi = Pi shif t−1 ẑj,(t) j (28) where shif t−1 j {·} is the inverse shift operator that (cyclically) shifts back the given full-size signal by j samples. The analytic solution of the optimization (24) is !−1 β (t) X T (t) T x̂ = H H + Pi Pi (29) 2 i∈B∗ ! β (t) X T (t−1) T × H y+ Pi ẑi , 2 ∗ i∈B showing that the first stage of each iteration is a weighted averaging of the given deteriorated signal with all the overlapping decompressed blocks obtained in the former iteration. P T Note that Pi Pi is a diagonal matrix, where its (k, k) i∈B∗ component evaluates the number of decompressed blocks that the k th signal sample is involved in. Additionally, the averaging in (29) can be directly applied on the full decompressed signals ẑj,(t) (j = 1, ..., Nb ) after appropriate inverse shifts as suggested in Algorithm 2, where we denote the sum of decompressed signals as ! Nb n o X X (t) T j,(t) ẑsum , Pi Pi shif t−1 ẑ . (30) j j=1 i∈Bj Algorithm 2 summarizes the practical restoration method for a compression technique operated by the general parameter θ for determining the bit-cost (see details in Section III-A). IV. R ATE -D ISTORTION T HEORETIC A NALYSIS FOR THE G AUSSIAN C ASE In this section we theoretically study the complexityregularized restoration problem from the perspective of ratedistortion theory. While our analysis is focused on the particular settings of a cyclo-stationary Gaussian signal and deterioration caused by a linear shift-invariant operator and additive white Gaussian noise, the results clearly explain the main principles of complexity-regularized restoration. 6 Algorithm 2 Proposed Method Based on Total Complexity of All the Overlapping Blocks (0) Initialize ẑsum (depending on the deterioration type). t = 1, β (1) = β1 , θ(1) = θ1 repeat −1  (t) P PTi Pi 4: x̂(t) = HT H + β2 i∈B∗   β (t) (t−1) T × H y + 2 ẑsum   5: ẑj,(t) = CompressDecompressθ(t) shif tj x̂(t) , (j = 1, ..., Nb ). ! Nb  j,(t) P T P (t) 6: ẑsum = Pi Pi shif t−1 ẑ j 1: 2: 3: j=1 (t+1) i∈Bj Set β as an increment of β (t) (t+1) Set θ as a decrease of θ(t) 9: t←t+1 10: until stopping criterion is satisfied 7: 8: Consider the signal x ∈ RN modeled as a zero-mean cyclostationary Gaussian random vector with a circulant autocorrelation matrix Rx , i.e., x ∼ N (0, Rx ). The degradation model studied remains y = Hx + n, (31) where here H is a real-valued N × N circulant matrix representing a linear  shift-invariant deteriorating operation and n ∼ N 0, σn2 I is a length N vector of white Gaussian noise. Clearly, the degraded observation y is also a zeromean cyclo-stationary Gaussian random vector with a circulant autocorrelation matrix Ry = HRx H∗ + σn2 I. A. Prevalent Restoration Strategies We precede the analysis of the complexity-regularized restoration with mentioning three well-known estimation methods. The restoration procedure is a function x̂ = f (y) , (32) where f maps the degraded signal y to an estimate of x denoted as x̂. In practice, one gets a realization of y denoted here as yr and forms the corresponding estimate as x̂r = f (yr ). 1) Minimum Mean Squared Error (MMSE) Estimate: This restoration minimizes the expected MSE of the estimate, i.e., n o 2 fM M SE = argmin E (x − f (y)) , (33) f yielding that the corresponding estimate is the conditional expectation of x given y 2) Wiener Filtering: The Wiener filter is also known as the Linear Minimum Mean Squared Error (LMMSE) estimate, corresponding to a restoration function of the form x̂ = fW iener (y) = Ay + b, optimized via n o n o 2 Â, b̂ = argmin E (x − (Ay + b)) . (35) (36) A,b In our case, where x and y are zero mean, b̂ = 0 and −1 . Â = Rx H∗ HRx H∗ + σn2 I (37) If the distributions are Gaussian, this linear operator coincides with the optimal MMSE estimator. 3) Constrained Deconvolution Filtering: This approach considers a given degraded signal yr = Hx + nr , with the noise vector a realization of a random process while the signal x is considered as a deterministic vector, with perhaps some known properties. Then, the restoration is carried out by minimizing a carefully-designed penalty function, g, that assumes lower values for x vectors that fit the prior knowledge on x. The estimate is constrained to conform with the known degradation model (31), by demanding the similarity of yr − Hx̂ to the additive noise term. These two requirements are implemented in an optimization of the form min g (x̂) subject to kyr − Hx̂k2 = N σn2 . x̂ 2 (38) Our practical methods presented in Section III emerge from an instance of the constrained deconvolution optimization (38), in its Lagrangian version, where the penalty function g is the cost in bits measuring the complexity in describing the estimate x̂. In the remaining of this section, we study the complexityregularized restoration problem from a statistical perspective. B. The Complexity-Regularized Restoration Problem and its Equivalent Forms Based on rate-distortion theory (e.g., see [24]), we consider the estimate of x as a random vector x̂ ∈ RN with the probability density function (PDF) px̂ (x̂). The estimate characterization, px̂ (x̂), is determined by optimizing the conditional PDF px̂|y (x̂|y), statistically representing the mapping between the given data y and the decompression result x̂. Moreover, the rate is measured as the mutual information between x̂ and y, defined via Z py,x̂ (y, x̂) I (y, x̂) = py,x̂ (y, x̂) log dydx̂. (39) py (y) px̂ (x̂) Then, the basic form of the complexity-regularized restoration optimization is expressed as Problem 1 (Basic Form): I (y, x̂) n o 2 subject to E ky − Hx̂k2 = N σn2 . min x̂M M SE = fM M SE (y) = E {x|y} . (34) Nicely, for the Gaussian case considered in this section, the MMSE estimate (34) reduces to a linear operator, presented below as the Wiener filter. px̂|y (40) Here the estimate rate is minimized while maintaining suitability to the degradation model (31) using a distortion constraint 7 set to achieve an a-priori known total noise energy. In general, Problem 1 is complicated to solve since the distortion constraint considers x̂ through the degradation operator H, while the rate is directly evaluated for x̂. The shift invariant operator H is a circulant N × N matrix, thus, diagonalized by the N × N Discrete Fourier Transform (DFT) matrix F. The (k, l) component of the DFT matrix (k, l = 0, ..., N −1) is Fk,l = WNkl where WN , √1N e−i2π/N . Then, the diagonalization of H is expressed as FHF∗ = ΛH , (41) where ΛH is a diagonal matrix formed by the components hF k for k = 0, ..., N − 1. Using ΛH we define the pseudoinverse of H as H+ = F∗ Λ+ H F, (42) We denote by NH the number of nonzero diagonal elements in ΛH , the rank of H. The first main result of our analysis states that Problem 1, being the straightforward formulation for complexityregularized restoration, is equivalent to the next problem. Problem 2 (Pseudoinverse-filtered input): I (ỹ, x̂) n o 2 E kH (ỹ − x̂)k2 = NH σn2 , px̂|ỹ subject to (44) where ỹ = H+ y (45) is the pseudoinverse filtered version of the given degraded signal y. One should note that Problem 2 has a more convenient form than Problem 1 since the distortion is an expected weighted squared error between the two random variables determining the rate. The equivalence of Problems 1 and 2 is proved in Appendix A. In this section, x is a cyclo-stationary Gaussian signal, hence, having a circulant autocorrelation matrix Rx . Consequently, and also because H is circulant, the deteriorated signal y is also a cyclo-stationary Gaussian signal. Moreover, H+ is also a circulant matrix, thus, by (45) the pseudoinverse filtering result, ỹ, is also cyclo-stationary and zero-mean Gaussian. Specifically, the autocorrelation matrix of ỹ is +∗ Rỹ = H+ Ry H + ∗ (46) +∗ = H HRx H H + ∗ σn2 H+ H+ , ỹF = Fỹ, (49)  F N −1 consisted of the coefficients ỹk k=0 , being independent zero-mean Gaussian variables with variances corresponding to the eigenvalues in (48). Transforming Problem 2 to the DFT domain, where ỹ becomes a set of independent Gaussian variables to be coded under a joint distortion constraint, simplifies the optimization structure to the following separable form (see proof sketch in Appendix B). Problem 3 (Separable form in DFT domain): min  px̂F |ỹF k where Λ+ H is the pseudoinverse of ΛH , an N × N diagonal matrix with the k th diagonal element: ( 1 , for hF F,+ k 6= 0 hF k (43) hk = F 0 , for hk = 0. min The DFT-domain representation of ỹ is (47) and, as a circulant matrix, it is diagonalized by the DFT matrix yielding the eigenvalues ( (x) σ2 λk + Fn 2 , for hF (ỹ) k 6= 0 h | k| (48) λk = F 0 , for hk = 0. k N −1 X N −1 I ỹkF , x̂F k  k=0 (50) k=0 subject to N −1 X 2 hF k E n ỹkF − x̂F k o 2 = NH σn2 , k=0  N −1 F where x̂F = Fx̂. Nicely, the k k=0 are the elements of x̂ separable distortion in Problem 3 considers each variable using a squared error that is weighted by the squared magnitude of the corresponding degradation-filter coefficient. The rate-distortion function of a single Gaussian variable with variance σ 2 has the known formulation [24]:  2   σ 1 log (51) R (D) = 2 D + evaluating the minimal rate for a squared-error allowed reaching up to D ≥ 0. In addition, the operator [·]+ is defined for real scalars as [α]+ , max {α, 0}, hence, R (D) = 0 for D ≥ σ 2 . Accordingly, the rate-distortion function of the Gaussian variable ỹkF is " !# (ỹ) λk 1 Rk (Dk ) = log (52) 2 Dk + where Dk denotes the maximal squared-error allowed for this component. Now, similar to the famous case of jointly coding independent Gaussian variables with respect to a regular (nonweighted) squared-error distortion [24], we explicitly express Problem 3 as the following distortion-allocation optimization. Problem 4 (Explicit distortion allocation): " !# N −1 (ỹ) X λk 1 log min D0 ,...,DN −1 2 Dk k=0 subject to N −1 X + hF k 2 Dk = NH σn2 (53) k=0 Dk ≥ 0 , k = 0, ..., N − 1. The optimal distortion-allocation satisfying the last optimization is ( σ2 n , for hF 2 k 6= 0 |hFk | Dkopt = (54) 0 , for hF k =0 8 are attenuated by the degradation operator get less bits in the rate allocation. D. Conceptual Relation to The Proposed Approach (a) (b) Fig. 1. The autocorrelation of the cyclo-stationary Gaussian signal used in the demonstration. (a) The circulant autocorrelation matrix in the signal domain, and (b) the corresponding eigenvalues obtained using the DFT decomposition. and the associated optimal rates are    (x)  1 F 2 λk hk 2 + 1 2 log σn Rkopt =  0 , for hF k 6= 0 (55) , for hF k = 0. Results (54) and (55) are proved in Appendix C. C. Demonstration of The Explicit Results Let us exemplify the optimal rate-distortion results (54)-(55) for a cyclo-stationary Gaussian signal, x, having the circulant autocorrelation matrix presented in Fig. 1a, corresponding to (x) −1 the eigenvalues {λk }N k=0 (Fig. 1b) obtained by a DFT-based decomposition. We first examine the denoising problem, where the signal-domain degradation matrix is H = I (Fig. 2a) and its respective DFT-domain spectral representation is consisted of hF k = 1 for any k (see Fig. 2b). The additive white Gaussian noise has a sample variance of σn2 = 5. Fig. 2c exhibits the optimal distortion allocation using a reverse-waterfilling dia(x) −1 gram, where the signal-energy distribution {λk }N k=0 (black solid line) and the additive noise energy (the light-red region) defining together the noisy-signal energy level (purple solid (ỹ) (x) line) corresponding to λk = λk + σn2 . The blue dashed line in Fig. 2c shows the water level associated with the uniform distortion allocation. The optimal rate-allocation, corresponding to Fig. 2c and Eq. (55), is presented in Fig. 2d showing that more bits are spent on components with higher signal-to-noise ratios. Another example considers the same Gaussian signal described in Fig. 1 and the noise level of σn2 = 5, but here the degradation operator is the circulant matrix shown in Fig. 3a having a DFT-domain representation given in magnitudelevels in Fig. 3b exhibiting its frequency attenuation and amplification effects. The waterfilling diagram in Fig. 3c includes the same level of signal energy (black solid line) as in the denoising experiment, but the effective additive noise levels and the allocated distortions are clearly modulated in an inversely proportional manner by the squared magnitude of the degradation operator. For instance, frequencies corresponding to degradation-filter magnitudes lower than 1 lead to increase in the effective noise-energy addition and in the allocated distortion. The optimal rate allocation (Fig. 3d) is affected by the signal-to-noise ratio and by the squared-magnitude of the degradation filter (see also Eq. (55)), e.g., components that In general, theoretical studies of rate-distortion problems for the Gaussian case provide to the signal processing practice optimistic beliefs about which design concepts perform well for the real-world non-Gaussian instances of the problems (see the excellent discussion in [25, Sec. 3]). Moreover, theoretical and practical solutions may embody in a different way the same general concepts. Therefore, one should look for connections between theory and practice in the form of high-level analogies. The optimal solution presented in this section considers the classical framework of rate-distortion theory and a particular, however, important case of Gaussian signal and LSI degradation operator. Our rate-distortion analysis showed that the optimal complexity-regularized restoration consists of the following two main ideas: pseudoinverse filtering of the degraded input, and compression with respect to a squared-error metric that is weighted based on the degradation-filter squaredmagnitude (considering the DFT-domain procedure). We will now turn to explain how these two concepts connect to more general themes having different realizations in the practical approach proposed in Section III 1 . • Design Concept #1: Apply simple restoration filtering. The general idea of using an elementary restoration filter is implemented in the Gaussian case as pseudoinverse filtering. Correspondingly, our practical approach relies on a simple filtering mechanism, extending the pseudoinverse filter as explained next. Stage 4 of Algorithm 1 is an `2 -constrained deconvolution filtering that, using the relation H∗ (I − HH∗ ) = 0, can be rewritten as (see proof in Appendix D) −1    β (t) (t−1) β (t) ∗ (t) ∗ I H Hỹ + ẑ . (56) x̂ = H H + 2 2 As before, ỹ = H+ y, i.e., the pseudoinverse-filtered version of y. The expression (56) can be interpreted as an initial pseudoinverse filtering of the degraded input, followed by a simple weighted averaging with ẑ(t−1) (the decompressed signal obtained in the last iteration). Evidently, the filtering in (56) is determined by the β (t) value, specifically, for β (t) = 0 the estimate coincides with the pseudoinverse filtering solution and as β (t) grows it gets closer to ẑ(t−1) . • Design Concept #2: Compress by promoting higher quality for signal-components matching to higher h-operator magnitudes. This principle is realized in the theoretic Gaussian case as weights attached to the squared-errors of DFT-domain components (see Problems 3 and 4). Since the weights, 2 2 ( hF , ..., hF 0 N −1 ), are the squared magnitudes of the corresponding degradation-filter coefficients, the compression distortion is spread unevenly being larger where the degradation filter-magnitude is lower. Remarkably, this concept is implemented differently in the proposed procedure (Algorithm 1 Since the differences between Algorithms 1 and 2 are for a shift-invariance purpose, an issue that we do not concern in this section, we compare our theoretic results only to Algorithm 1. 9 (a) (b) (c) (d) 2 σn Fig. 2. Demonstrating the theoretic results for a denoising problem with a noise level of = 5. (a) The degenerated degradation operator in the signal domain H = I. (b) DFT-domain magnitude of the degradation filter. (c) Optimal waterfilling solution in DFT domain. (d) Optimal rate allocation in DFT domain. (a) (b) (c) (d) 2 = 5. (a) The degradation operator in the signal domain H. Fig. 3. Demonstrating the theoretic results for a restoration problem with a noise level of σn (b) DFT-domain magnitude of the degradation filter. (c) Optimal waterfilling solution in DFT domain. (d) Optimal rate allocation in DFT domain. 1) where regular compression techniques, optimized for the squared-error distortion measure, are applied on the filtering result of the preceding stage. Let us revisit (56), expressing stage 4 of Algorithm 1. Assuming H is a circulant matrix, we can transform (56) into its Fourier domain representation x̂F,(t) =  β (t) I Λ∗H ΛH + 2 −1   β (t) F,(t−1) ∗ F ΛH ΛH ỹ + ẑ 2 (57) where x̂F,(t) and ẑF,(t−1) are the Fourier representations of x̂(t) and ẑ(t−1) , respectively. Furthermore, (57) reduces to the componentwise formulation F,(t) x̂k F,(t) = hF k F,(t−1) 2 β (t) F,(t−1) 2 ẑk (t) 2 F hk + β2 ỹkF + (58) where x̂k and ẑk are the k th Fourier coefficients of F,(t) F,(t−1) x̂ and ẑ , respectively. Equation (58) shows that signal elements corresponding to degradation-filter components of weaker energies will be retracted more closely to the decompressed signal obtained in the former iteration (where the compression in general was of a lower quality) – thus, will be also of a relatively lower quality in the compression applied in the next stage of this iteration. To conclude this section, we showed that the main architectural ideas expressed in theory (for the Gaussian case) appear also in our practical procedure. The iterative nature of our methods (Algorithms 1-2) as well as the desired shiftinvariance property provided by Algorithm 2 are outcomes of treating real-world scenarios such as non-Gaussian signals, general linear degradation operators, and computational limitations leading to block-based treatments – these all relate to practical aspects, hence, do not affect the fundamental treatment given in this section. V. E XPERIMENTAL R ESULTS In this section we present experimental results for image restoration. Our study cases include deblurring and inpainting using the image-compression profile of the HEVC standard. We empirically found it sufficient to consider only a part of all the shifts, i.e., a portion of B ∗ . The limited amount of shifts is compensated by the HEVC architecture that employs inter-block spatial predictions, thus, improves upon methods relying on independent block treatment. The shifts are defined by the rectangular images having their upper-left corner pixel relatively close to the upper-left corner of the full image, and their bottom-right corner pixel coincides with that of the full image. This extends the mathematical developments in Section III as practical compression handles arbitrarily sized rectangular images. A. Image Deblurring Here we consider two deterioration settings taken from [26]. The first setting, denoted in Table I as ’Set. 1’, considers a noise variance σn2 = 2 coupled with a blur operator defined by the two-dimensional point-spread-function (PSF) h(x1 , x2 ) = 1/(1 + x21 + x22 ) for x1 , x2 = −7, ..., 7, and zerovalued otherwise. The second setting, denoted in Table I as ’Set. 2’ (named in [26] as ’Scenario 3’), considers a noise variance σn2 ≈ 0.3 joint with a blur operator defined by the two-dimensional uniform blur PSF of size 9 × 9. 10 TABLE I D EBLURRING : C OMPARISON OF PSNR G AINS Cameraman 256x256 Set. 1 Set. 2 House 256x256 Set. 1 Set. 2 Lena 512x512 Set. 1 Set. 2 Barbara 512x512 Set. 1 Set. 2 Input PSNR 22.23 20.76 25.61 24.11 27.25 25.84 23.34 22.49 ForWaRD [28] 6.76 7.34 7.35 9.56 6.05 6.97 3.69 4.02 SV-GSM [29] 7.45 7.33 8.64 9.04 - - 6.85 5.07 BM3DDEB [30] 8.19 8.34 9.32 10.85 7.95 7.97 7.80 5.86 TVMM [31] 7.41 8.54 7.98 10.39 6.36 7.47 3.10 3.49 CGMK [32] 7.80 9.15 8.31 10.75 6.76 7.86 2.45 3.55 IDD-BM3D [26] 8.85 10.45 9.95 12.89 7.97 8.91 7.64 6.05 EPLL [7] 7.17 8.78 8.27 11.76 7.39 8.55 4.28 4.29 Proposed 5.97 7.55 6.06 11.08 4.68 7.47 4.75 3.71 (a) Original (b) Deteriorated (c) Proposed Restoration Fig. 4. The deblurring experiment (settings #2) for the Cameraman image (256 × 256). (a) The underlying image. (b) degraded image (20.77 dB). (c) restored image using HEVC compression (28.32 dB). Our method results in this subsection are for implementation employing the HEVC still-image compression (in its BPG implementation [27]). In both experimental settings (i.e., ’Set. 1’ and ’Set. 2’) the quality parameter for the HEVC was decreased by one (starting at 51) in each iteration, and β (t) = (2 × 10−3 ) · 1.01t−1 (where iteration numbers are integers starting at t = 1). We run 18 and 33 iterations for experimental settings 1 and 2, respectively. We use here 4 shifts defined by their top-left pixels at the coordinates {(1,1), (1,9), (9,1), (9,9)} of the input image. Table I shows a comparison between various deblurring methods tested in the above two settings for four grayscale images2 . We argue that our method provides relatively good results for the second settings, since its PSNR improvement exceeds few of the other techniques for each of the test images. B. Image Inpainting We presented in [5] experimental results for the inpainting problem, in its noisy and noiseless settings. Here we focus on the noiseless inpainting problem, where only pixel erasure occurs without an additive noise. The degradation is represented by a diagonal matrix H of N × N size with main 2 The results in Table I for the methods from [26], [28]–[32] were taken as is from [26]. diagonal values of zeros and ones, indicating positions of missing and available pixels, respectively. Then, the product Hx equals to an N -length vector where its k th sample is determined by H: if H[k, k] = 0 then it is zero, and for H[k, k] = 1 it equals to the corresponding sample of x. The structure of the pixel erasure operator let us to simplify the optimization in step 4 of Algorithm 2. We note that H is a square diagonal matrix and, therefore, HT = H and HT y is equivalent to a vector y with zeroed components according to H’s structure.PAdditional useful relations are HT H = H and that W , PTi Pi is a diagonal matrix. Consequently, i∈B∗ step 4 of Algorithm 2 facilitates a componentwise computation that, together with the fact that there is no noise, is interpreted to form the k th sample of x̂(t) as ( y[k] , for H[k, k] = 1 (t) (t−1) (59) x̂ [k] = ẑsum [k] , for H[k, k] = 0. W[k,k] (0) We initialize ẑsum = Hy + 128 · (I − H). The rest of the procedure remains as before. Our implementation here of Algorithm 2 utilizes the HEVC image compression [27]. Running 100 iterations, we start at the highest compression parameter 51 (i.e., the lowest quality) and decrease it by one every three iterations. The used shifts are defined by a 5 × 5 grid starting at the top-left pixel of the 11 (a) Original (b) Deteriorated (c) Proposed Restoration Fig. 5. The deblurring experiment (settings #2) for the Barbara image (512 × 512). (a) The underlying image. (b) degraded image (22.49 dB). (c) restored image using HEVC compression (26.20 dB). TABLE II I MAGE I NPAINTING FROM 80% M ISSING P IXELS PSNR R ESULTS Image Lena 512x512 Barbara 512x512 House 256x256 Delaunay Triang. A PPENDIX A. Equivalence of Problems 1 and 2 ODCT Li [35] Yu et al. [36] Ram et al. [33] Proposed 30.25 29.97 31.62 32.22 31.96 32.14 22.88 27.15 25.40 30.94 29.71 28.14 29.21 29.69 32.87 33.05 32.71 32.52 input image and determining the top-left pixels of the shifted images by horizontal and vertical spacings of 5 pixels. We consider the experimental settings from [33], where 80% of the pixels are missing (see Fig. 6b and 7b). Five competing inpainting methods are considered: cubic interpolation of missing pixels via Delaunay triangulation (using Matlab’s ’griddata’ function); inpainting using sparse representations of patches of 16 × 16 pixels based on an overcomplete DCT (ODCT) dictionary (see method description in [34, Ch. 15]); using patch-group transformation [35]; based on patch clustering [36]; and via patch reordering [33]. The PSNR values of images restored using the above methods (taken from [33]) are provided in Table II together with our results. For each of the tested images our method exceeds several competing methods – particularly, for the Lena image we are second only to [36]. Visually, Figures 6c and 7c exhibit the effectiveness of our method in repairing the vast amount of absent pixels. VI. C ONCLUSION In this paper we explored the topic of complexityregularized restoration. Two practical methods for restoration using standard compression techniques were introduced, one of them relies on a new shift-invariant complexity regularizer. We presented an insightful theoretical-analysis of complexityregularized restoration of a cyclo-stationary Gaussian signal from deterioration of a linear shift-invariant operator and additive white Gaussian noise. Experiments for deblurring and inpainting of images using the HEVC technique showed good results. We start by showing the equality between the distortion constraints of Problems 1 and 2. We develop the distortion of Problem 1 as follows:  2 2 ky − Hx̂k2 = I − HH+ y + HH+ y − Hx̂ 2   2 = I − HH+ y + H H+ y − x̂ 2  2  2 = I − HH+ y 2 + H H+ y − x̂ 2 ∗  + H+ y − x̂ H∗ I − HH+ y ∗  +y∗ I − HH+ H H+ y − x̂  2  2 = I − HH+ y 2 + H H+ y − x̂ 2 (60) where the last equality follows from  H∗ I − HH+ = 0 (61) that can be easily proved, e.g., by using the DFT-based diagonalization of H and H+ . The first term in (60) can be further developed:  2  2 I − HH+ y 2 = I − F∗ ΛH FF∗ Λ+ HF y 2  2 = F∗ I − Λ H Λ + H Fy 2  F 2 = I − ΛH Λ+ H y 2 X 2 ykF = = k:hF k =0 = X nF k 2 (62) k:hF k =0 where yF , Fy is the DFT-domain representation of y (correspondingly, we use these notations to any vector), and the last equality is implied from the DFT-component relation F F F F ykF = hF k xk + nk that reduces to yk = nk for components F with hk = 0. Consequently,     X n o  2 2 E I − HH+ y 2 = E nF k   F k:hk =0 = (N − NH )σn2 (63) 12 (a) Original (b) Deteriorated (c) Proposed Restoration Fig. 6. The inpainting experiment (80% missing pixels) for the Barbara image (512 × 512). (a) The original image. (b) deteriorated image. (c) restored image using HEVC compression (28.14 dB). (a) Original (b) Deteriorated (c) Proposed Restoration Fig. 7. The inpainting experiment (80% missing pixels) for the House image (256 × 256). (a) The original image. (b) deteriorated image. (c) restored image using HEVC compression (32.52 dB). where NH was defined in Section IV-B as the rank of H. Accordingly, and also using (60), the distortion constraint of Problem 1, i.e., n o 2 E ky − Hx̂k2 = N σn2 (64) equals to (recall that ỹ = H+ y) n o 2 E kH (ỹ − x̂)k2 = NH σn2 , (65) that is, the distortion constraint of Problem 2. We now turn to prove the equivalence of Problems 1 and 2. Our proof sketch conforms with common arguments in ratedistortion function proofs (see [24]): first, we lower bound the mutual information I (y, x̂), which is the cost function of Problem 1; then, we provide a statistical construction achieving the lower bound while obeying the distortion constraint. The proposed lower bound for I (y, x̂) is established by noting that ỹ = H+ y and, therefore, the data processing inequality [24] implies here that I (y, x̂) ≥ I (ỹ, x̂) , (66) where I (ỹ, x̂) is the cost function of Problem 2. The relation in (66) is known to be attained with equality when y and x̂ are independent given ỹ. The next construction shows that this is indeed the case. We will now show the achievability of the lower bound in (66) by describing a two-stage setting that statistically represents ỹ as an outcome of x̂, and y as a consequence of ỹ. This layout is an instance of the construction concept known as the (backward) test channel [24]. The first stage of our construction is based on  x̂ ∼ N 0, H+ Ry H+∗ − σn2 H+ H+∗ (67)  2 + +∗ z ∼ N 0, σn H H (68) where x̂ and z are independent. Consequently, we define ỹ = x̂ + z, + +∗ (69) implying ỹ ∼ N (0, H Ry H ) that, indeed, conforms with ỹ = H+ y where y ∼ N (0, Ry ). Moreover, the construction (67)-(69) yields n o n o 2 2 E kH (ỹ − x̂)k2 = E kHzk2 = E {z∗ H∗ Hz} = E {T race {z∗ H∗ Hz}} = E {T race {Hzz∗ H∗ }} = T race {HRz H∗ }  = σn2 · T race HH+ H+∗ H∗ 13 = σn2 · T race {PH P∗H } = σn2 NH  = σn2 T race HH+ H+∗ H∗  ∗ +σn2 T race (I − PH ) (I − PH ) (70) = σn2 T race {PH P∗H }  ∗ +σn2 T race (I − PH ) (I − PH ) + where PH , HH is the matrix projecting onto the range of H, note it is also a circulant matrix diagonalized by the DFT matrix to the diagonal matrix ΛPH , ΛH Λ+ H . The last computation of the trace is due to the structure of ΛPH , having ones in main-diagonal entries corresponding to the DFT-domain indices of the range of H, and zeros elsewhere. The result in (70) shows that the distortion constraint (65) is satisfied. Let us consider the second stage of the construction, awaiting to prove that y and x̂ are independent given ỹ. We precede the construction with examining the following decomposition of y = σn2 · NH + σn2 · (N − NH ) = N σn2 as required. Furthermore, the constructed y indeed obeys y ∼ N (0, Ry ). Specifically, its autocorrelation matrix stems from the calculation  ∗ E {yy∗ } = E (Hỹ + w) (Hỹ + w) (75)  ∗ ∗ = E (Hỹ) (Hỹ) + E {ww } = HH+ Ry H+∗ H∗ + Rw  = PH HRx H∗ + σn2 I P∗H + Rw y = PH y + (I − PH ) y = PH HRx H∗ P∗H + σn2 PH P∗H + Rw = HH+ y + (I − PH ) (Hx + n) = Hỹ + (I − PH ) n = HRx H∗ + σn2 PH P∗H + σn2 (I − PH ) (I − PH ) (71) where the second equality uses the degradation model, and the third equality is due to (I − PH ) H = 0. Importantly, Eq. (71) describes y as a linear combination of two independent random vectors: ỹ and (I − PH ) n. Since ỹ and (I − PH ) n are Gaussian random vectors, their independence is proved by showing they are uncorrelated via ∗ E {(I − PH ) nỹ }  = E (I − PH ) ny∗ H+∗  = E (I − F∗ ΛPH F) ny∗ F∗ Λ+∗ H F  ∗ ∗ +∗ = E F (I − ΛPH ) Fn (Fy) ΛH F n  o F ∗ = F∗ E (I − ΛPH ) nF Λ+ F Hy ∗ = HRx H∗ + σn2 I = Ry where we used the auxiliary result ∗ PH P∗H + (I − PH ) (I − PH ) = = ∗ (76) F ΛPH Λ∗PH F + F∗ (I − ΛPH ) (I F∗ ΛPH F + F∗ (I − ΛPH ) F ∗ − ΛPH ) F = I. (72) ∗ Joining the two stages of the construction, presented in (69) and (73), exhibits x̂ → ỹ → y as a Markov chain and, therefore, y and x̂ are independent given ỹ. This evident construction turns (66) into = F 0F I (y, x̂) = I (ỹ, x̂) =0 where in (72) we used the facts that (I − ΛPH ) nF is a DFTdomain vector with zeros in components corresponding to the F range of H, and Λ+ H y is a DFT-domain vector with zeros in entries corresponding to the nullspace of H, hence, these zero patterns yield the outer-product matrix which is all zeros. The decomposition in (71) motivates us to consider y to emerge from ỹ via the statistical relation y = Hỹ + w (73) ∗ where w ∼ N 0, σn2 (I − PH ) (I − PH ) and is independent of ỹ (and also of z). Note that w takes the role of (I − PH ) n appearing in (71), e.g., they have the same distribution. One can further examine the suitability of the construction (73) to the considered problem by noting it satisfies the distortion constraint of Problem 1, namely, n o n o 2 2 E ky − Hx̂k2 = E kHỹ + w − Hx̂k2 (74) n o 2 = E kH (x̂ + z) + w − Hx̂k2 n o 2 = E kHz + wk2 n o n o 2 2 = E kHzk2 + E kwk2 (77) that completes proving the equivalence of Problems 1 and 2. B. Equivalence of Problems 2 and 3 The rate-distortion function for a Gaussian source with memory (i.e., correlated components) is usually derived in the Principle Component Analysis (PCA) domain where the components are independent Gaussian variables (see, e.g., [37]). In our case, where the signal is cyclo-stationary, the PCA is obtained using the DFT matrix. As in the usual case,  I (ỹ, x̂) = I ỹF , x̂F (78) = N −1 X I ỹkF , x̂F k  (79) k=0 where (78) emerges from the reversibility of the transforma N −1 tion, and (79) is due to the independence of the ỹkF k=0 components [24] and the backward-channel construction (see Appendix A) that can be translated into a form of independent DFT-domain component-level channels. The main difference from the well-known rate-distortion analysis is that here, in Problem 2, the distortion constraint is not a regular squared error – but a weighted one, that will 14 be developed next. Since DFT is a unitary transformation, its energy preservation property yields n o n  2o 2 E kH (ỹ − x̂)k2 = E ΛH ỹF − x̂F 2 (80) = N −1 X hF k 2 E n ỹkF − x̂F k 2 o k=0 where the last equality is due to the diagonal structure of ΛH . Hence, we got that the two expected-distortion expressions in Problems 2 and 3 are equal. C. Solution of Problem 4 For start, the transition between Problem 3 and Problem 4 is analogous to the familiar case of jointly coding a set of independent Gaussian variables [24]. Accordingly, and also due to lack of space, we do not elaborate here on this problemequivalence proof. Problem 4 is compelling as it is a distortion-allocation opN −1 timization, where the distortion levels {Dk }k=0 are allocated under the joint distortion constraint. We address Problem 4 via its Lagrangian form (temporarily ignoring the constraints of non-negative distortions)  (ỹk )  N −1  N −1 X X 1 λ 2 +µ hF Dk log min k D0 ,...,DN −1 2 Dk + k=0 k=0 (81) where µ ≥ 0 is the Lagrange multiplier. Recalling that some components may correspond to hF k = 0 and, by (48), (ỹ) also λk = 0 – meaning they are deterministic variables. These deterministic components do not need to be coded (i.e., Rk = 0) while still attaining Dk = 0. Accordingly, the Lagrangian optimization (81) is updated into   2 (x) σn λ + 2 k X X 1 2 |hFk |   log  min hF Dk +µ k 2 Dk {Dk }k:hF 6=0 F F k k:hk 6=0 k:hk 6=0 (82) where we used the expression from (48), and assumed that the distortions are small enough such that the operator [·]+ can be omitted (a correct assumption as will be later shown). Now, the optimal Dk value can be determined by equating the respective derivative of the Lagrangian cost to zero, leading to allocated distortion (still as a function of µ) Dkopt = 1 2 ln (2)µ hF k 2 for k : hF k 6= 0 (83) and by setting the µ satisfying the total distortion constraint from Problem 4 we get Dkopt = σn2 hF k 2 for k : hF k 6= 0. (84) Expressing a nonuniform distortion-allocation (for components with nonzero hF k ), being inversely proportional to the F 2 N −1 weights { hk }k=0 . One should note that the assumption on (ỹ) small-enough distortions is satisfied as Dkopt ≤ λk for any k obeying hF k 6= 0, and that all the distortions are non-negative as required. The optimal distortions established here (for k where hF k 6= 0) are set in the rate formula (51), providing the optimal rate allocation    (x)  1 F 2 λk hk , for hF 2 + 1 k 6= 0 (85) 2 log σn Rkopt =  F 0 , for hk = 0. D. Equivalent Form of Stage 4 of Algorithm 1 Stage 4 of Algorithm 1 is considered here with the conjugate-transpose operator, ∗ , extending the regular transpose: −1    β (t) β (t) (t−1) x̂(t) = H∗ H + I H∗ y + ẑ . (86) 2 2 We note that   H∗ y = H∗ HH+ y + I − HH+ y  = H∗ Hỹ + H∗ I − HH+ y = H∗ Hỹ (87) where the last equality results from the relation H∗ (I − HH+ ) = 0. Consequently, (86) becomes  −1   β (t) β (t) (t−1) x̂(t) = H∗ H + I H∗ Hỹ + ẑ ,(88) 2 2 which is the form presented in (56). R EFERENCES [1] B. K. Natarajan, “Filtering random noise from deterministic signals via data compression,” IEEE Trans. Signal Process., vol. 43, no. 11, pp. 2595–2605, 1995. [2] J. Rissanen, “MDL denoising,” IEEE Trans. Inf. Theory, vol. 46, no. 7, pp. 2537–2543, 2000. [3] J. Liu and P. Moulin, “Complexity-regularized image denoising,” IEEE Trans. Image Process., vol. 10, no. 6, pp. 841–851, 2001. [4] P. Moulin and J. Liu, “Statistical imaging and complexity regularization,” IEEE Trans. Inf. Theory, vol. 46, no. 5, pp. 1762–1777, 2000. [5] Y. Dar, A. M. Bruckstein, and M. Elad, “Image restoration via successive compression,” in Picture Coding Symposium (PCS), 2016, pp. 1–5. [6] D. Geman and C. Yang, “Nonlinear image recovery with half-quadratic regularization,” IEEE Trans. Image Process., vol. 4, no. 7, pp. 932–946, 1995. [7] D. Zoran and Y. Weiss, “From learning models of natural image patches to whole image restoration,” in IEEE International Conference on Computer Vision (ICCV), 2011, pp. 479–486. [8] S. V. Venkatakrishnan, C. A. Bouman, and B. Wohlberg, “Plug-and-play priors for model based reconstruction,” in IEEE GlobalSIP, 2013. [9] Y. Romano, M. Elad, and P. Milanfar, “The little engine that could: Regularization by denoising (red),” SIAM Journal on Imaging Sciences, vol. 10, no. 4, pp. 1804–1844, 2017. [10] Y. Dar, A. M. Bruckstein, M. Elad, and R. Giryes, “Postprocessing of compressed images via sequential denoising,” IEEE Trans. Image Process., vol. 25, no. 7, pp. 3044–3058, 2016. [11] ——, “Reducing artifacts of intra-frame video coding via sequential denoising,” in IEEE International Conference on the Science of Electrical Engineering (ICSEE), 2016, pp. 1–5. [12] A. Rond, R. Giryes, and M. Elad, “Poisson inverse problems by the plug-and-play scheme,” Journal of Visual Communication and Image Representation, vol. 41, pp. 96–108, 2016. [13] R. R. Coifman and D. L. Donoho, “Translation-invariant de-noising,” in Wavelets and Statistics. Springer, 1995, pp. 125–150. [14] A. Nosratinia, “Enhancement of JPEG-compressed images by reapplication of JPEG,” J. VLSI Signal Process. Syst. for Signal, Image and Video Technol., vol. 27, no. 1-2, pp. 69–79, 2001. 15 [15] ——, “Postprocessing of JPEG-2000 images to remove compression artifacts,” IEEE Signal Process. Lett., vol. 10, no. 10, 2003. [16] S. Beygi, S. Jalali, A. Maleki, and U. Mitra, “Compressed sensing of compressible signals,” in IEEE International Symposium on Information Theory (ISIT), 2017, pp. 2158–2162. [17] ——, “An efficient algorithm for compression-based compressed sensing,” arXiv preprint arXiv:1704.01992, 2017. [18] G. J. Sullivan, J. Ohm, W.-J. Han, and T. Wiegand, “Overview of the high efficiency video coding (HEVC) standard,” IEEE Trans. on Circuits Syst. Video Technol., vol. 22, no. 12, pp. 1649–1668, 2012. [19] I. Galić, J. Weickert, M. Welk, A. Bruhn, A. Belyaev, and H.-P. Seidel, “Image compression with anisotropic diffusion,” Journal of Mathematical Imaging and Vision, vol. 31, no. 2, pp. 255–269, 2008. [20] C. Schmaltz, J. Weickert, and A. Bruhn, “Beating the quality of JPEG 2000 with anisotropic diffusion.” in DAGM-Symposium. Springer, 2009, pp. 452–461. [21] S. Andris, P. Peter, and J. Weickert, “A proof-of-concept framework for PDE-based video compression,” in Picture Coding Symposium (PCS), 2016, pp. 1–5. [22] Y. Shoham and A. Gersho, “Efficient bit allocation for an arbitrary set of quantizers,” IEEE Trans. Acoust., Speech, Signal Process., vol. 36, no. 9, pp. 1445–1453, 1988. [23] A. Ortega and K. Ramchandran, “Rate-distortion methods for image and video compression,” IEEE Signal Process. Mag., vol. 15, no. 6, pp. 23–50, 1998. [24] T. M. Cover and J. A. Thomas, Elements of information theory. John Wiley & Sons, 2012. [25] D. L. Donoho, M. Vetterli, R. A. DeVore, and I. Daubechies, “Data compression and harmonic analysis,” IEEE Trans. Inf. Theory, vol. 44, no. 6, pp. 2435–2476, 1998. [26] A. Danielyan, V. Katkovnik, and K. Egiazarian, “BM3D frames and variational image deblurring,” IEEE Trans. Image Process., vol. 21, no. 4, pp. 1715–1728, 2012. [27] F. Bellard, “BPG 0.9.6.” [Online]. Available: http://bellard.org/bpg/ [28] R. Neelamani, H. Choi, and R. Baraniuk, “ForWaRD: Fourier-wavelet regularized deconvolution for ill-conditioned systems,” IEEE Trans. Signal Process., vol. 52, no. 2, pp. 418–433, 2004. [29] J. A. Guerrero-Colón, L. Mancera, and J. Portilla, “Image restoration using space-variant gaussian scale mixtures in overcomplete pyramids,” IEEE Trans. Image Process., vol. 17, no. 1, pp. 27–41, 2008. [30] K. Dabov, A. Foi, V. Katkovnik, and K. O. Egiazarian, “Image restoration by sparse 3D transform-domain collaborative filtering.” in Image Processing: Algorithms and Systems, 2008, p. 681207. [31] J. P. Oliveira, J. M. Bioucas-Dias, and M. A. Figueiredo, “Adaptive total variation image deblurring: a majorization–minimization approach,” Signal Processing, vol. 89, no. 9, pp. 1683–1693, 2009. [32] G. Chantas, N. P. Galatsanos, R. Molina, and A. K. Katsaggelos, “Variational bayesian image restoration with a product of spatially weighted total variation image priors,” IEEE Trans. Image Process., vol. 19, no. 2, pp. 351–362, 2010. [33] I. Ram, M. Elad, and I. Cohen, “Image processing using smooth ordering of its patches,” IEEE Trans. Image Process., vol. 22, no. 7, pp. 2764– 2774, 2013. [34] M. Elad, Sparse and Redundant Representations: From Theory to Applications in Signal and Image Processing. Springer, 2010. [35] X. Li, “Patch-based image interpolation: algorithms and applications,” in Int. Workshop on Local and Non-Local Approx. in Image Process., 2008. [36] G. Yu, G. Sapiro, and S. Mallat, “Solving inverse problems with piecewise linear estimators: From Gaussian mixture models to structured sparsity,” IEEE Trans. Image Process., vol. 21, no. 5, pp. 2481–2499, 2012. [37] T. Berger, Rate distortion theory: A mathematical basis for data compression. Prentice-Hall, 1971.
7cs.IT
Software graphs and programmer awareness G. J. Baxter∗ and M. R. Frean arXiv:0802.2306v1 [cs.SE] 16 Feb 2008 School of Mathematics, Statistics and Computer Science, Victoria University of Wellington, P.O. Box 600 Wellington 6140, New Zealand (Dated: March 13, 2013) Dependencies between types in object-oriented software can be viewed as directed graphs, with types as nodes and dependencies as edges. The in-degree and out-degree distributions of such graphs have quite different forms, with the former resembling a power-law distribution and the latter an exponential distribution. This effect appears to be independent of application or type relationship. A simple generative model is proposed to explore the proposition that the difference arises because the programmer is aware of the out-degree of a type but not of its in-degree. The model reproduces the two distributions, and compares reasonably well to those observed in 14 different type relationships across 12 different Java applications. PACS numbers: 89.75.Hc, 89.20.Ff, 05.40.-a ,89.75.Fb Keywords: networks, object-oriented programming, stochastic processes I. INTRODUCTION Modern computer programs are large and highly structured entities. Naturally the components of a program depend on each other, and in general if we think of the program components as nodes and dependencies as edges, a directed graph can be constructed. There is not a single graph for each program, as there are many different ways that ‘node’ and ‘edge’ might be defined. For example, for a given object-oriented program, we might construct the graph in which nodes are top-level types and an edge from type a to type b indicates that type a has a field of type b. Thus the number of types of fields declared in a can be considered as the ‘out’ degree of a, while the number of types having fields of type a is its ‘in’ degree. As another example, two top-level types could be linked when one contains a method (out) with a parameter of the other’s type (in). These different ways of constructing the graph will be referred to as different metrics. The distributions of in-degree and out-degree show a clear difference in form. This dimorphism was observed in a range of graphs generated from the source code of a large corpus of open-source Java software in [1]. It was found that the in-degree distributions were well fitted by power-law distributions, which appear as a straight line when plotted on logarithmic axes. The out-degree distributions, on the other hand, are noticeably curved on a log-log plot. This pattern appears regardless of the metric used or the application of the software examined [1, 2], and even appears in other kinds of software-derived graph structures [3, 4, 5]. Software code is a direct product of the actions of programmers, and therefore the resulting ‘shapes’ of the code result from these actions. It is clear that the difference between in-degree and out-degree distributions is not accidental, but is in some way a result of the way ∗ Electronic address: [email protected] in which nodes and edges are created as the program is written. Because this basic shape is observed in such a variety of software and metrics, the mechanism must be quite general, and cannot depend on any specific features of the way different kinds of dependencies are created or different design methodologies are used to write software. While we may be able to characterize the different distributions by fitting functions of different kinds, and examining the parameters of the fitted functions for trends and patterns – for example, the exponent of a power law distribution – such descriptive models can never explain what we see at any deep level. We really want to know not just what shapes software has, but how these shapes come about. One explanation, suggested in [1], is that the out-degree is more actively controlled by the programmer. The outgoing edges of a type consist of references directly coded as the type is written, while for the in-degree, references to a type are created as other types are written. In this paper, we propose a simple generative model based on this observation which reproduces features observed in real software graph degree distributions. The model aims to capture the simplest actions of a programmer with respect to type and dependency creation. New edges are added between existing nodes of the graph, and a new node can be created by the division of an existing node into two parts. The treatment of incoming and outgoing connections between nodes is symmetrical in every way except that the division of nodes depends on the out-degree of the parent node in a specific way, but is independent of the node’s in-degree. This represents the programmer’s awareness of the outgoing dependencies but not of the code elsewhere in the program which refers to the current type. It is found that this single asymmetry is sufficient to reproduce the difference in shape between the two degree distributions observed in real software. The model proposed is similar to that developed by Price [6] to explain citation rates for papers, though whereas Price’s model produces power-law distributions for both in-degree and out-degree distribu- 2 tions, the introduction of the splitting step converts the out-degree distribution to an exponential distribution. We consider the degree distributions of a variety of inter-class relationships in the Java source code of 12 different applications. These 12 programs are the largest of the 50 studied in [1]. The actual programs (and version numbers) used are listed in Appendix B. Each metric counts for each type a certain kind of dependency on other types. We consider 14 metrics that can be identified as measuring either an out-degree or in-degree. Metrics used in [1] which could not be classified unambiguously as in- or out-degree distributions were left out. The metrics are defined in Appendix A, and each is referred to by a short abbreviation. Some pairs of metrics register opposite ends of the same relationship, suggesting that they are the out- and in- degree distributions of the same graph. However, considerations such as the separation of application code from shared libraries mean that the count of outgoing edges does not always match the total of incoming edges. We will not go into detail about the differences between the metrics, as our aim is simply to demonstrate the extent to which the model described below reproduces the patterns observed in these various data. Plots of the 5 ‘in’ metrics (see Appendix A) on logarithmic axes often have a linear form, suggesting a power-law distribution is typical for graph in-degree distributions, regardless of the specific metric used or the particular program. Three examples are shown in Fig. 1, which shows the degree distributions for three different ‘in’ metrics (see Appendix A) in three different programs of differing sizes. The 9 ‘out’ metrics (see Appendix A) do not appear linear on doubly logarithmic axes, however a number of the plots do have a linear shape when plotted on linear-logarithmic axes, suggesting an exponential distribution. Not all the data sets conform clearly to this pattern, having a slightly different shape or one or more points which do not fall on a neat curve. Nevertheless, the general pattern for in-degree is power-law like, and for out-degree seems to be an exponential shape. This suggests there is a common underlying process, modified to a greater or lesser degree by specific programmer actions in each case. Software graph structures have been examined in several recent studies [1, 2, 3, 4, 5, 7, 8, 9]. In particular, several have reported power-law like degree distributions in graphs derived from source code [3, 7] or from object relationships at run-time [4]. A distinction between indegree and out-degree distributions has been observed in graphs derived from C and C++ software by Myers [3], who treated both as approximate power-law distributions, and Valverde and Solé [5],who in common with the present study of Java software, characterized the indegree as a power-law and the out-degree as an exponential distribution. They showed that these distributions can be generated by certain cases of the GNC (‘growing network model with copying’) network growth model [10], although the power law distribution generated by this model has a fixed exponent of 2. Yan, Qi and Gu [2] examined Java applications, constructing the directed graph of ‘import’ relationships. Once again they note that the in-degree[14] distribution typically resembles a power-law while the out-degree has a largely exponential behavior. Concas et al. [9] also studied a Java application, and noted a difference between in-degree and outdegree distributions. These observations are confirmed by the present study of a much larger group of Java applications and metrics. Yan et al. also postulate a generative model for such distributions, but make no claims about its plausibility in relation to programmer actions. II. MODEL As programmers write software code, they will periodically add references between types (edges), and occasionally create new types (nodes). It is these aspects of the code we are interested in, so the intervening code, which is actually the majority of the program and specifies all its functions, is ignored. We consider a simplified process, each step of which entails either the addition of an edge between two existing nodes or the addition of a new node. Generally there are a few elements that have many references to other parts of the program (these might be the most complex types), while there are many that reference only a few other types. This divergence can be approximated by ensuring that the “the rich get richer”, invoking the ‘cumulative advantage’ mechanism of Price [6]. New outgoing edges are added to the type which a programmer is ‘currently working on’, and we consider that the larger types (those with most out-edges already) are more likely to be added to in future. At each step a new edge is added, and the node the link originates from is chosen with a probability proportional to its current out-degree. Conversely, there are a few elements that are referenced repeatedly by many of the other parts of the program (we might think of these as the simplest and most universal elements), while there are many that are used only a few times (these might be more complex elements, at a higher level of hierarchy, and therefore are less reusable). We consider the number of incoming dependencies a type has to be an approximation to it’s usefulness. Therefore the node to which a new edge will be linked is chosen with a probability proportional to its current in-degree. The programmer is conscious of the number of outgoing references he or she is adding to a node, and at some point may decide the type is ‘too big’ and create a new one. This effect is represented by allowing new nodes to occasionally be created by ‘splitting’ an existing node into two pieces. The edges attached to the original node are divided between the two resulting nodes with each possible division between the two nodes of incoming and 3 jre−1.4.2.04: PP jboss−4.0.3−SP1: RP geronimo−1.0−M5: SP 2 10 frequency frequency frequency 2 10 1 10 0 0 0 10 10 10 0 2 10 0 10 degree 1 10 0 1 10 1 10 10 degree 10 degree FIG. 1: Some examples of degree distributions for ‘in’ metrics that appear to have a power-law distribution. Both axes are logarithmic. Power law distributions appear straight on these axes. 3 3 10 10 eclipse−SDK−3.1−win32: DO openoffice−2.0.0: PC azureus−2.3.0.4: nF 2 2 1 10 frequency 2 10 frequency frequency 10 1 1 10 10 10 0 0 0 10 10 10 0 50 100 degree 150 200 0 5 10 degree 15 20 0 20 40 degree 60 FIG. 2: Some examples of degree distributions for ‘out’ metrics that appear to have an exponential distribution. x-axis is linear, y-axis is logarithmic. Exponential distributions appear straight on these axes. outgoing edges equally likely, with the constraint that at least one outgoing edge must be transferred to the new type, and one incoming edge must remain in the original type. Finally, if we think of the new node as carrying out a subset of the ‘task’ originally intended for the parent node, the two nodes must be connected, so a new edge is created from the original type to the new type. This also ensures that at all times every node has at least one incoming edge and one outgoing edge. Let vi be the out-degree of node i, and wi be its indegree, with i running from 1 up to k, the current number of nodes. All of these quantities can grow as the process proceeds. Let t be the number of steps carriedPout so far. P Since exactly 1 edge is added at each step, i vi = i wi = t. The process is initiated at t = 1 with a single node (type) with a single reference to itself (this is necessary, as links are only added to nodes which already possess links), i.e. k = 1 and v1 = w1 = 1. At each step: • select parent node m with probability vm /t • With probability (1 − γ) simply add an edge: ◦ the parent node m is the out node, ◦ select in node n with probability wn /t, ◦ vm → vm + 1 and wn → wn + 1. • Otherwise, with probability γ, split the parent node: ◦ add a new node k + 1 (the last node number increments from k → k + 1), ◦ choose r uniformly from {1, ..., vm } and s uniformly from {0, ..., wm − 1}[15], then vk+1 → r, vm → vm − r + 1; wk+1 → s + 1 and wm → wm − s. • Increment the counter t → t + 1. These steps are repeated for some predetermined number of steps tf inal . The entire simulation is defined by only two parameters: the total number of links required (equal to the number of simulation steps), tf inal , and the splitting probability, γ. Since new types only appear due to the splitting process, γ determines the ratio between the number of types and the number of links: k t → γ as t → ∞. Note that although nodes to be ‘worked on’ are selected according to their out-degree, this model is actually symmetric with respect to in- and out-degree, except for the splitting step: nodes acquire outgoing edges at a rate proportional to their existing out-degree, and acquire incoming edges at a rate proportional to their in-degree. In this model edges are added one by one to different parts of the graph, so all the types grow at the same time. New nodes are also created during this process. This doesn’t necessarily reflect the actual order in which program code is written. Although the graph continues to grow, after a sufficient number of steps, the relative degree frequencies – 4 netbeans−4.1: AC netbeans−4.1: nC netbeans−4.1: DO 7000 6000 5000 4000 3000 2000 cumulative frequency 8000 cumulative frequency cumulative frequency 7000 6000 4000 2000 1000 5000 4000 3000 2000 1000 0 0 0 10 1 10 10 degree 0 netbeans−4.1: nM cumulative frequency 5000 4000 3000 2000 10 degree 6000 4000 2000 netbeans−4.1: PC 8000 8000 6000 1 10 degree netbeans−4.1: nF 7000 0 2 10 cumulative frequency 0 cumulative frequency 6000 6000 4000 2000 1000 0 0 10 0 0 10 2 10 degree netbeans−4.1: pkgSize 8000 0 1 10 10 degree netbeans−4.1: RC netbeans−4.1: PubMC 600 400 200 0 0 10 cumulative frequency 8000 cumulative frequency cumulative frequency 800 0 2 10 degree 6000 4000 2000 0 0 10 2 10 degree 6000 4000 2000 0 0 10 2 10 degree 2 10 degree FIG. 3: Cumulative degree distribution of ‘out’ metrics (as labeled, see Appendix for definitions) for netbeans-4.1 with best fit model out-degree distribution (solid gray line) as described in Section II. Also shown for comparison is the best fit model in-degree distribution (dashed line). Horizontal scale is logarithmic and vertical scale is linear. netbeans−4.1: DOinv 1000 500 netbeans−4.1: PP 6000 4000 2000 2500 2000 1500 1000 500 0 0 10 0 0 10 2 10 degree netbeans−4.1: RP 800 cumulative frequency cumulative frequency cumulative frequency 1500 2500 3000 8000 cumulative frequency cumulative frequency netbeans−4.1: AP 2000 2000 1500 1000 500 0 0 10 2 10 degree 0 0 10 2 10 degree 2 10 degree netbeans−4.1: SP 600 400 200 0 0 10 2 10 degree FIG. 4: Cumulative degree distribution of ‘in’ metrics (as labeled, see Appendix for definitions) for the largest program studied, netbeans-4.1 with best fit model in-degree distribution (dashed gray line) as described in Section II. Also shown for comparison is the best fit model out-degree distribution (solid line). Horizontal scale is logarithmic and vertical scale is linear. 5 eclipse−SDK−3.1−win32: AC 2000 0 10 cumulative frequency 4000 2000 1500 1000 500 1 0 500 400 300 200 0 1 10 10 degree 600 100 0 0 1 10 10 10 degree degree 800 eclipse−SDK−3.1−win32: AP 3000 2000 1000 350 jtopen−4.9: AP cumulative frequency 0 argouml−0.18.1: AC 700 cumulative frequency cumulative frequency 4000 cumulative frequency cumulative frequency 6000 jtopen−4.9: AC 2500 8000 600 400 200 argouml−0.18.1: AP 300 250 200 150 100 50 0 0 10 0 0 10 2 10 0 2 degree 0 1 10 10 10 degree degree FIG. 5: Top row: Degree distribution for AC (‘out’ metric) for three different programs (as labeled, see Appendix), on logarithmic-linear axes. Bottom row: Degree distribution for AP (the reciprocal ‘in’ metric) for the same three programs, on logarithmic-linear axes. normalized by the total number of nodes – reach an equilibrium distribution. Let Cm be the number of types with out-degree m after step t. Considering the two processes involved in the model, Cm can increase by 1 if an outgoing edge is added to a type with out-degree m − 1 and is not split, or if a type with out-degree greater than m is split at just the right place that one of the resulting types has out-degree m. Similarly, Cm decreases if a type of size m gains a new out-link, or is split, so long as the point of splitting is not 1 or m. With a little consideration, we can write down the expected change in Cm at the next step: hδCm i = (1 − γ)(m − 1)Cm−1 + γ X rCr r>m −(1 − γ)mCm − γmCm (1 − 2 r 2 ). m (1) substituting back into the original version of (3) gives fm in terms of fm−1 and fm−2 , and after calculating f1 and f2 explicitly we find by induction the solution for general m to be fm = γ(1 − γ)m−1 , (4) γ e−βm which can be written as an exponential fm = 1−γ where β = − ln(1 − γ). A similar calculation can be performed for the indegree distribution. The in-degree and out-degree of a type are completely independent, so the selection of a type for splitting is uniform with respect to in-degree. If gn , in analogy to fm , is the fraction of types with indegree n we find that   X gl n−1 gn 2 + (1 − γ)n = 2 + (1 − γ)(n − 1)gn−1 . n l l>n The expected fraction of types that have degree m is fm = (5) Using a similar method to before we find hCm (t)i . hk(t)i (2) gn = It follows from the definition that hδCm i = γfm . Substituting back into (1) we find after collecting like terms that (1+m−2γ)fm = (1−γ)(m−1)fm−1 +2γ R X fr . (3) This equation is valid for all m > 1. Replacing m by m − 1 in (3), rearranging for the summation term and (6) so that gn = r=m+1 (1 − γ)n gn−1 , 2 + (1 − γ)n Γ(n + 1)Γ(2 + Γ(n + 1 + 2 1−γ ) 2 1−γ ) g1 , (7) and normalization can be used to find g1 . For large n, the 2 ratio gn /gn−1 tends to 1 − (1−γ)n , that is, the in-degree distribution tends to a power-law of the form gn = cn−α 6 with exponent α = 2/(1 − γ). Thus the model predicts a decaying exponential for the out-degree distribution, and an in-degree distribution with a power-law tail with exponent greater than or equal to 2. Examples of the two distributions (4) and (7) are shown in Fig. 6. 0 10 −1 fn , gn 10 −2 10 −3 10 −4 10 10 20 30 40 50 n 0 10 −1 −2 10 n f ,g n 10 −3 10 −4 10 0 1 10 10 n FIG. 6: Examples of the degree distributions generated by the model, with parameter γ = 0.3. Solid line is the out-degree model,fn , dashed line the in-degree model, gn . On linearlogarithmic axes, top, and double logarithmic axes, bottom. P as expected, where t = Pi xi hi is the number of edges in the graph, and k = i hi is the number of nodes. For in metrics, we use (7), for which we have not been able to find a similar solution so the MLE of γ must be found numerically. We again expect γ = k/t because this was assumed in the derivation of (7), although in some cases this is not the best fit value. The explanation of this is not known, though this very simple model is not expected to explain every detail of the data. The cumulative distribution derived from function (4) using the best fit (MLE estimated) γ value is plotted along with the out metric data in Fig. 3. This figure plots all of the out-metrics for the same program, netbeans-4.1, and it can be seen that in the majority of cases the agreement with the data is reasonably good, even though the number of nodes in the graphs for different metrics varies widely. Further examples are shown in the top half of Fig. 5, which shows the same metric, AC, for three different programs. Notice also that a fit of the ‘wrong’ model distribution (the predicted in-degree distribution) does not fit as well. Similarly, the cumulative best-fit functions (7) for each of the in metrics for netbeans-4.1 is plotted in Fig. 4, and for three different programs for the same metric (AP) in the bottom half of Fig. 5. Again, many data sets show good agreement, and the in-degree model fits the data much better than the out-degree model (solid curve). Comparisons were made for all the metrics and programs listed in Appendices A and B and Figs. 3, 4 and 5 are fairly representative. An example of one of the better fits to an out metric data set is shown in Fig. 7, and an example of a good in metric fit in Fig. 8. To obtain a quantitative measure of how well the model fits the data, we follow the method of [12] and calculate a p-value (the probability that the data were drawn from the proposed distribution) based on the KolmogorovSmirnov (KS) statistic [13] D = max|S(x) − F (x)| III. COMPARISON WITH MEASURED DATA The distributions (4) and (7) were fitted to the data described in Section I using a maximum likelihood method, which is asymptotically unbiased [11] . Given some candidate distribution f (x, γ), the likelihood that the histogrammed data hi at values xi was generated from this distribution, given the parameter γ, is p(h|γ) = k Y f (xi , γ)hi (8) i=1 and we proceed by finding the value of γ which maximizes this quantity. In the case of out metrics, f (xi , γ) is given by (4), and the maximum likelihood estimator (MLE) of γ is found analytically to be γ̂ = k t (9) (10) where S(x) is the cumulative distribution function (CDF) of the data and F (x)Pis the CDF of the proposed distribution (i.e. F (x) = y≤x f (x)). The fitted distribution is correlated with the data, so treating it as the true distribution will give a falsely high p-value. Instead we use a Monte Carlo procedure, following [12]: A large number of synthetic data sets is drawn from the best-fit distribution, each one is fitted individually and the KS statistic (relative to its own best fit distribution) calculated for each of these fits. The p-value is then the fraction of these KS statistic values that are larger than that found for the original fit to the real data. The p-values calculated for the in metrics and out metrics are tabulated in Table I. We see that quantitatively, the fits are not particularly good. The goodness of fit for out metrics is particularly poor. The in metrics are often 7 columba−1.0: AC 2 frequency 10 1 10 0 10 0 5 10 15 degree 20 FIG. 7: AC for columba-1.0, an example of an out metric distribution that is well fitted by the model. derby−10.1.1.0: AP 2 frequency 10 1 10 0 10 0 10 1 10 degree FIG. 8: AP for derby-10.1.1.0, an example of an in metric distribution that is well fitted by the model. TABLE I: Number of p-values greater than 0.05 and 0.1 for the out-degree and in-degree data sets. # p-values # p-values > 0.05 % > 0.1 % out-metrics 4 / 101 4% 4 / 101 4% in-metrics 9 / 44 20% 8 / 44 18% reasonably well fit by the model, but where the fit fails, it is sometimes because the degree one point is lower than predicted – see for example Doinv for netbeans-4.1 in Fig. 4. In other cases, the distribution appears to be a more pure power law than the model function. Overall, the heavy tail of the in degree distribution predicted by the model is successfully observed. The model fits to out metric distributions are generally worse than those for the in metrics and often have a more complicated shape, supporting the hypothesis that the difference between the distributions is the direct programmer intervention in the out-degrees of types. The KS statistic is the maximum difference between the model and data cumulative distributions, and we see from Fig. 3 that although the shapes are similar, there is separation between the two curves over part of the range in several cases, destroying the quantitative goodness of fit. Nevertheless, the model appears to fit many of the curves well or be qualitatively in agreement for much of the range. Two assumptions of the model are that types gain edges at a rate proportional to the existing number of edges, and that when a type is subdivided the redistribution of edges between the two resulting types is uniform. If the selection of nodes to which new edges are attached is uniform rather than linear, the resulting indegree distribution has an exponential tail, which is not the case in real software graphs, so it appears that it is necessary that the rate of attachment of new edges to a node should depend on the existing degree of the node, though the explanation for this is not as clear as in the case of wealth distribution or paper citation rates. In the current model, new types are created by removing references (edges) from an existing type and placing it in a new type. It is equally plausible that a programmer instead copies references, creating duplicates of edges. If this is the case, and none of the edges are transferred to the new node the out-degree distribution has a ‘fatter’ tail than the original exponential distribution, but the ‘head’ of the distribution also becomes much steeper, meaning that this model fits the out-degree distribution data very poorly. Alternatively if the edges are distributed between the two nodes according to a binomial distribution (so that each edge is equally likely to be attached to either node), the resulting out-degree distribution has a distribution similar to an exponential distribution, and the in-degree distribution has a power-law tail with a minimum exponent of 3. This is also incompatible with the data, which typically have a power-law tail with exponent close to 2. IV. DISCUSSION In this paper we have described a simple model of the generation of software graph degree distributions based on the assumption that the process of programming involves programmers making active choices about the structure of the type on which they are working – in particular they are conscious of the ‘size’ of the type, and this comes to be reflected in the resulting out-degree, while the in-degree of a type emerges indirectly as a result of the construction of other types. The only difference between incoming and outgoing edges in the microscopic process of the model is that the splitting operation on types is dependent on type out-degrees and is independent of in-degrees. This model is extremely simple, and depends on a single parameter γ which can be physically interpreted as the reciprocal of the average degree of the graph. This suggests that the mean number of dependencies per type (both incoming and outgoing) may prove to be a useful statistic for comparing different type relationships and different programs. The model reproduces the 8 approximate shapes of in-degree and out-degree distributions for a range of graph construction metrics applied to a variety of Java programs. This suggests that this shape is due to simple statistical processes common to all software graphs, so that any differences due to different design methodologies and so on must be sought in the details of the deviations from this mean behavior. The agreement of the proposed model with the measured data is not perfect however. These and other difficulties, such as variations between the shapes of distributions between programs and between metrics indicates that there are higher-order effects that remain to be described. Degree distribution is one of the most accessible measures of the ‘shape’ of a network, but there are many more measures such as degree correlation, clustering coefficients and so on that can be calculated. Further analysis of real data sets for such more detailed measures would help to discriminate between and to refine the various generative models that have so far been proposed. Another avenue of investigation that would be particularly fruitful would be a statistical analysis of the programming process as it happens, in order to identify the rates and probabilities of various actions, which could then be compared with the assumptions of the model proposed in this paper. Acknowledgments We would like to thank Hayden Melton for compiling the data used in the analysis and Ewan Tempero and James Noble for technical advice and helpful discussions. APPENDIX A: METRICS Brief descriptions of the metrics used in the study are listed below. Following [1, 7] short codes are used throughout the text to refer to each metric. For more complete descriptions of the metrics and how the data was extracted from the source code, see [1]. Some of the metrics are paired, with one representing the ‘in’ degree (listed first) and another representing the reciprocal ‘out’ degree. In general an ‘out’ metric for a type counts things that would appear in the code for that type, while ‘in’ metrics count references to a type which appear in the code for other types. Some of the metrics have no reciprocal metric, but can still be identified as measuring either ‘in’ or ‘out’ degree. The remaining metrics used in [1] were not included in the analysis as their in/out status was not clear or they were a mixture of in and out measures. self) in the source that have a field of that type. DOinv Depends On inverse. For a given type, the number of type implementations in which it appears in their source. PP References to class as a parameter. For a given type, the number of top-level types in the source that declare a method with a parameter of that type. RP References to class as return type. For a given type, the number of top-level classes in the source that declare a method with that type as the return type. SP Subclasses. For a given class, the number of toplevel classes that specify that class in their extends clause. ‘Out’ metrics AC Members of class type. For a given type, the size of the set of types of fields for that type. DO Depends on. For a given type, the number of toplevel types in the source that it needs in order to compile. PC Parameter-type class references. For a given type, the size of the set of types used as parameters in methods for that type. PubMC Public Method Count. The number of methods in a type with public access type. RC Methods returning classes. For a given type, the size of the set of types used as return types for methods in that type. nC Number of Constructors. For a given class, the number of constructors of all access types declared in the class. nF Number of Fields. For a given type, the number of fields of all access types declared in the type. nM Number of Methods. For a given type, the number of all methods of all access types (that is, public, protected, private, package private) declared (that is, not inherited) in the type. ‘In’ metrics AP References to class as a member. For a given type, the number of top-level types (including it- pkgSize Package Size. The number of types contained direction in a package (and not contained in sub-packages). 9 APPENDIX B: APPLICATIONS The programs studied, their size (number of Classes), domain and where they were sourced are: Application #Classes Domain Origin eclipse-SDK-3.1-win32 11413 IDE www.eclipse.org netbeans-4.1 8406 IDE netbeans.org jre-1.4.2.04 7257 JRE sun.com jboss-4.0.3-SP1 4143 J2EE server Sourceforge openoffice-2.0.0 2925 Office suite openoffice.org jtopen-4.9 2857 Java toolbox for iSeries and AS/400 servers Sourceforge geronimo-1.0-M5 1719 J2EE server Apache azureus-2.3.0.4 1650 P2P filesharing Sourceforge derby-10.1.1.0 1386 SQL database Apache Jakarta compiere-251e 1372 ERP and CRM Sourceforge argouml-0.18.1 1251 UML drawing/critic tigris.org columba-1.0 1180 Email client Sourceforge [1] G. Baxter, M. Frean, J. Noble, M. Rickerby, H. Smith, M. Visser, H. Melton, and E. Tempero, in Proceedings of the 21st Annual ACM SIGPLAN Conference on ObjectOriented Programming, Systems, Languages, and Applications, edited by R. Johnson and R. P. Gabriel (ACM, 2006), in press. [2] Y. Dong, Q. Guo-Ning, and G. Xin-Jian, Chinese Physics 15, 2489 (2006). [3] C. R. Myers, Physical Review E 68, 046116 (2003). [4] A. Potanin, J. Noble, M. Frean, and R. Biddle, Communications of the ACM 48, 99 (2005). [5] S. Valverde and R. V. Solé, Europhysics Letters 72, 858 (2005). [6] D. de Solla Price, Journal of the American Society for Information Science 27, 292 (1976). [7] R. Wheeldon and S. Counsell, in Third IEEE International Workshop on Source Code Analysis and Manipulation (SCAM03) (2003). [8] S. Valverde and R. V. Solé, Physical Review E 72, 026107 Notes Donated by IBM Donated By Sun Donated By Sun Donated by IBM Donated by IBM (2005). [9] G. Concas, M. Marchesi, S. Pinna, and N. Serra, IEEE Transactions on Software Engineering 33, 687 (2007). [10] P. L. Krapivsky and S. Redner, Physical Review E 71, 036118 (2005). [11] O. E. Barnsdorff and D. R. Cox, Inference and Asymptotics, Monographs on Statistics and Applied Probability (Chapman and Hall, London, 1994). [12] A. Clauset, C. R. Shalizi, and M. E. J. Newman, Preprint, arXiv:0706.1062 (2007). [13] M. Kendall and A. Stuart, The Advanced Theory of Statistics, vol. 2 (Charles Griffin, 1979), 4th ed. [14] Our convention. Yan et al. use the opposite convention for the direction of edges in the graph. [15] The split proportions r and s are chosen from different ranges to ensure that all nodes have at least one in- and one out- link after the new edge from m to k +1 is added.
6cs.PL
arXiv:1511.03222v1 [math.OC] 10 Nov 2015 CONVERGENCE PROPERTIES OF ADAPTIVE SYSTEMS AND THE DEFINITION OF EXPONENTIAL STABILITY BENJAMIN M. JENKINS, ANURADHA M. ANNASWAMY, EUGENE LAVRETSKY, AND TRAVIS E. GIBSON Abstract. The convergence properties of adaptive systems in terms of excitation conditions on the regressor vector are well known. With persistent excitation of the regressor vector in model reference adaptive control the state error and the adaptation error are globally exponentially stable, or equivalently, exponentially stable in the large. When the excitation condition however is imposed on the reference input or the reference model state it is often incorrectly concluded that the persistent excitation in those signals also implies exponential stability in the large. The definition of persistent excitation is revisited so as to address some possible confusion in the adaptive control literature. It is then shown that persistent excitation of the reference model only implies local persistent excitation (weak persistent excitation). Weak persistent excitation of the regressor is still sufficient for uniform asymptotic stability in the large, but not exponential stability in the large. We show that there exists an infinite region in the state-space of adaptive systems where the state rate is bounded. This infinite region with finite rate of convergence is shown to exist not only in classic open-loop reference model adaptive systems, but also in a new class of closed-loop reference model adaptive systems. 1. Introduction It is well known that stability of the origin and asymptotic convergence of the tracking error to zero can be guaranteed in adaptive systems with no restrictions on the external reference input. Asymptotic stability, i.e. convergence of both the tracking error and parameter error to zero, can occur only with further conditions of persistent excitation are satisfied. The first known work on asymptotic stability of adaptive systems can be found in [23]. In that work asymptotic stability of adaptive schemes was proven for a class of periodic inputs using results from [22]. The results hinged on a sufficient condition related to the richness of frequency content in the regressor vector of the adaptive system. In the late 70’s and early 80’s several attempts were made to extend the results of [23] to uniform asymptotic stability. Morgan and Narendra proved necessary and sufficient conditions for uniform asymptotic stability for classes of linear time varying (LTV) systems in [27, 28] that are consistent with the structure of adaptive systems. Anderson leveraged techniques developed in [2] to prove the exponential stability of adaptive systems in [1] with Kreisselmeier using similar techniques in [20]. Following these results the persistent excitation conditions for asymptotic stability were moved from the regressor vector to richness conditions on the actual reference model input in references [3, 5, 6, 29, 33]. This was a key step for practical reasons as the control engineer has direct control over the reference input rather than the regressor. 1 2 B.M. JENKINS, A.M. ANNASWAMY, E. LAVRETSKY, AND T.E. GIBSON A key distinction exists, however, between the stability properties of the linear time-varying systems studied in [1] and those of the adaptive systems in [28], and forms the starting point for the discussions in this paper. The linear time-varying system in [1] can be shown to be exponentially stable under persistent excitation conditions on the underlying regressor. However, once the excitation condition is moved to the reference input, the adaptive systems in [28] can only be shown to be uniformly asymptotically stable. This distinction arises from the endogenous nature of the underlying regressor and is explicitly pointed out in this paper. The degree of persistent excitation of the regressor is dependent on the adaptive system initial conditions. This dependency prevents a uniform correlation between degree of persistent excitation (i.e. rate of exponential convergence) of the adaptive systems internal regressor and the richness of the reference input. The practical implication of this is that the adaptive systems of [28] are not exponentially stable in the large. This distinction between local and global exponential stability is an essential detail when the exponential stability of a system is used to claim robustness properties. Moreover, an infinite region will be shown to exist in the velocity field where the norm of the error velocity is finite. As a result, a subset of the state-space will be shown to exist where the error signals move arbitrarily slowly. Unlike exponentially stable systems, the system’s convergence speed decreases as the distance from the equilibrium increases. No excitation (richness) conditions on the reference input exist which will globally guarantee persistent excitation of the systems internal regressor vector. The authors of [5, 6] are careful in proving that richness of the reference input only implies exponential convergence. The careful wording of convergence however was changed to exponential stability countless times elsewhere in the literature. It was then inappropriately concluded that uniform asymptotic stability in the large is equivalent to exponential stability in the large for adaptive systems. Recently, a new class of adaptive systems has been under discussion (see [7–12]) which employ a closed-loop in the underlying reference model. These adaptive systems have desirable transient response characteristics such as an improved tracking error whose L-infinty and L-2 norms are small compared to their openloop counterparts. In addition, the rates of closed-loop signals such as the control input and and control parameter have small magnitudes when compared to openloop reference model adaptive systems. In reference [15, 31], it was shown that the region of slow convergence that is present in the standard adaptive system with Open-loop Reference Models (ORM) [16] is present in this new class of Closed-loop Reference Model (CRM)-based adaptive systems as well. This article is intended to be a cautionary piece and complements the works of [32] and [24] in carefully defining persistent excitation and a weaker condition that is not uniform in initial conditions. Where as [32] and [24] focus on the various stability results when two different kinds of persistent excitation are studied, we illustrate why, in general, adaptive systems can not satisfy the original definition of persistent excitation. We pick up where [29] left off and in so doing hope to clarify the true stability properties of adaptive systems. We connect the stability results of general adaptive systems to the region of slow convergence in low dimensional adaptive systems that occur with ORM and CRM. The paper is organized as follows: Section 2 reviews the definitions for various kinds of stability, Section 3 discusses the relationship between persistent excitation and asymptotic stability of adaptive CONVERGENCE PROPERTIES OF ADAPTIVE SYSTEMS 3 η ǫ s δ, ρ t0 + T x0 t t0 (a) Stability and asymptotic stability visualized, adapted from [18, Figure 5] κkx0 k ρ κkx0 ke−ν(t−t0 ) x0 s t0 t (b) Exponential stability visualized. Figure 1. Visual aids for stability discussion. systems, Section 4 constructs examples and proves the lack of exponential stability in the large even for low order adaptive systems, Section 5 contains simulation results which depict the nature of this slow convergence, and Section 6 summarizes our findings . 2. Stability Definitions Consider a dynamical system defined by the following relations x(t0 ) = x0 ẋ(t) = f (x(t), t) where t ∈ [t0 , ∞) is time and x ∈ Rn denotes the state vector. We are interested in systems with equilibrium at x = 0, so that f (0, t) = 0 for all t. The solution to the differential equation above for t ≥ t0 is a transition function s(t; x0 , t0 ) such that ṡ(t; x0 , t0 ) = f (s(t; x0 , t0 ), t) and s(t0 ; x0 , t0 ) = x0 . Various definitions of stability now follow [13, 18, 26]. Figure 1 can be used as an aid. Definition 1 (Stability and Asymptotic Stability). Let t0 ≥ 0, the equilibrium is (i) Stable, if for all ǫ > 0 there exists a δ(ǫ, t0 ) > 0 such that kx0 k ≤ δ implies ks(t; x0 , t0 )k ≤ ǫ for all t ≥ t0 . (ii) Attracting, if there exists a ρ(t0 ) > 0 such that for all η > 0 there exists an attraction time T (η, x0 , t0 ) such that kx0 k ≤ ρ implies ks(t; x0 , t0 )k ≤ η for all t ≥ t0 + T . (iii) Asymptotically Stable, if it is stable and attracting. 4 B.M. JENKINS, A.M. ANNASWAMY, E. LAVRETSKY, AND T.E. GIBSON (iv) Uniformly Stable if the δ in (i) is uniform in t0 and x0 , thus taking the form δ(ǫ). (v) Uniformly Attracting, if it is attracting where the ρ and T do not depend on t0 or x0 and thus the attracting time take the form T (η, ρ). (vi) Uniformly Asymptotically Stable, (UAS) if it is uniformly stable and uniformly attracting. (vii) Uniformly Bounded if for all r > 0 there exists a B(r) such that kx0 k ≤ r implies that ks(t; x0 , t0 )k ≤ B for all t ≥ t0 . (viii) Uniformly Attracting in the Large if for all ρ > 0 and η > 0 there exists a T (η, ρ) such that kx0 k ≤ ρ implies ks(t; x0 , t0 )k ≤ η for all t ≥ t0 + T . (ix) Uniformly Asymptotically Stable in the Large (UASL) if it is uniformly stable, uniformly bounded, and uniformly attracting in the large. The definitions of exponential stability are not as prevalent as those above, and are assembled below [25, 26] Definition 2 (Exponential Stability). Let t0 ≥ 0, the equilibrium is (i) Exponentially Stable (ES) if for every ρ > 0 there exists ν(ρ) > 0 and κ(ρ) > 0 such that kx0 k ≤ ρ implies ks(t; x0 , t0 )k ≤ κkx0 ke−ν(t−t0 ) (ii) Exponentially Stable in the Large (ESL) if there exists ν > 0 and κ > 0 such that ks(t; x0 , t0 )k ≤ κkx0 ke−ν(t−t0 ) for all x0 .  Remark 1. ESL implies UASL by choosing T (ρ, η) = ν1 log κρ η . It is clear that for UASL, T is a function of both ρ and η. But for ESL, T depends only on η/ρ. In other words, if in a system, it can be shown that T is a general function of η and ρ and varies even when η/ρ is a constant, then it follows that the associated equilibrium is only UASL and not ESL. For linear systems, i.e. ẋ = A(t)x, UAS implies ESL [18, Theorem 3: (C) and (D)]. Thus, for linear systems all of the definitions are equivalent. The relationship between these definitions of stability are illustrated in the following implication diagram. ESL ES UASL UAS + Linear 3. Asymptotic and Exponential Stability of Adaptive Systems We now present two adaptive systems which arise in the context of identification and control. The following definition of persistent excitation is relevant for exponential stability of adaptive systems. Definition 3 (Persistent Excitation). Let ω ∈ [t0 , ∞) → Rp be a time varying parameter with initial condition defined as ω0 = ω(t0 ), then the parameterized function of time y(t, ω) : [t0 , ∞) × Rp → Rm is (i) Persistent Excitation (PE) if there exists T > 0 and α > 0 such that Z t+T y(τ, ω)y T (τ, ω)dτ  αI t CONVERGENCE PROPERTIES OF ADAPTIVE SYSTEMS 5 for all t ≥ t0 and ω0 ∈ Rp , and we denote this as y(t, ω) ∈ PE. (ii) weak Persistent Excitation (PE∗ (ω, Ω)) if there exists a compact set Ω ⊂ Rp , T (Ω) > 0, α(Ω) such that Z t+T y(τ, ω)y T (τ, ω)dτ  αI t for all ω0 ∈ Ω and t ≥ t0 , and we denote this as y(t, ω) ∈ PE∗ (ω, Ω). The PE definition is well known in the literature [14, 29, 30], while the weak PE, denoted as PE∗ , is introduced in this paper, and will be used to characterize convergence in adaptive systems. 3.1. Identification in Simple Algebraic Systems [30]. Let u : [t0 , ∞) → Rn be the input and y : [t0 , ∞) → R be the output of the following algebraic system of equations y(t) = uT (t)θ where θ ∈ Rn is an unknown parameter. If we assume that u is known and y is measurable, then an estimate of the unknown parameter θ̂ : [t0 , ∞) → Rn can be used in constructing an adaptive observer ŷ(t) = uT (t)θ̂(t) where the update for the estimate of the uncertain parameter is defined as ˙ θ̂(t) = −u(t) (ŷ(t) − y(t)) . Denoting the parameter error as φ(t) = θ̂(t) − θ the parameter error evolves as φ̇(t) = −u(t)uT (t)φ(t). (1) Theorem 1. If u(t) is PE, piecewise continuous, and either 1) there exists β > 0 such that Z t+T u(τ )uT (τ )dτ  βI t or 2) there exists a umax > 0 such that ku(t)k ≤ umax , then for the dynamics in (1) the equilibrium φ = 0 is ESL. The proof is given in two flavors the first follows that of [1] and the second follows that of [30], and then the two methods are compared. Proof of the theorem following Anderson [1, proof of Theorem 1]. The existence of R t+T T , α, and β such that αI  t u(τ )uT (τ )dτ  βI is equivalent to the following system being uniformly completely observable Σ1 : ẋ1 = 0n×n x1 , y1 = uT (t)x1 [17, Definition (5.23) dual of (5.13)]. This in turn implies that Σ2 : ẋ2 = −u(t)uT (t)x2 , y2 = uT (t)x2 is uniformly completely observable as well [2, Dual of Theorem 4]. Therefore, there exists α2 and β2 such that Z t+T T α2 I  ΦT (2) 2 (τ, t)u(τ )u (τ )Φ2 (τ, t)dτ  β2 I t where Φ2 (t, t0 ) is the state transition matrix for Σ2 . Note that the upper bound β is needed to ensure that Φ2 (τ, t) is not singular, # " Z T det Φ2 (t, t0 ) = exp − trace(u(τ )uT (τ )) dτ . t0 6 B.M. JENKINS, A.M. ANNASWAMY, E. LAVRETSKY, AND T.E. GIBSON Let V (φ, t) = 12 φT (t)φ(t) and note that Σ2 and (1) have the same state transition matrix. Thus φ(t; t0 ) = Φ2 (t, t0 )φ(t0 ). Differentiating V along the system trajectoT ries in (1) we have V̇ (φ, t; t0 ) = −φT (t0 )ΦT 2 (t, t0 )u(t)u (t)Φ2 (t, t0 )φ(t0 ). Using the R t+T bound in (2) and integrating as t V̇ (φ, τ ; t)dτ , it follows that V (t + T ) − V (t) ≤ −2α2 V (t). Thus V (t + T ) ≤ (1 − 2α2 )V (t) and therefore the system is UASL and due to linearity it follows that the systems is ESL.  Proof of the theorem following Narendra and Annaswamy [30, proof of Theorem 2.16]. First we note that u(t) being PE is equivalent to Z t+T |uT (τ )w|2 dτ ≥ α t holding for any fixed unitary vector w. Let ũ(t) , Z t t+T |uT (τ )w|2 dτ = u2max ≤ u2max Z then it follows that t+T |ũT (τ )w|2 dτ t Z u(t) umax , t+T |ũT (τ )w|dτ t where the second line of the above inequality follows due to the fact that kũk ≤ 1 and thus |ũT (τ )w|2 ≤ |ũT (τ )w|. Therefore, u being PE and bounded implies that Z t+T α ≤ |uT (τ )w|dτ. (3) umax t The above bound will be called upon shortly. Moving forward with the proof, consider the Lyapunov candidate V (φ, t) = 12 φT (t)φ(t). Then differentiating along the system directions it follows that V̇ (φ, t) = −φT (t)u(t)uT (t)φ(t). Integrating V̇ and using the Cauchy Schwartz inequality it follows Z t+T Z t+T − V̇ (φ, τ )dτ = |uT (τ )φ(τ )|2 dτ t t 1 ≥ T Z t+T T |u (τ )φ(τ )|dτ t !2 The above inequality can equivalently be written as Z t+T p |uT (τ )φ(τ )|dτ. T (V (t) − V (t + T )) ≥ . (4) t Using the reverse triangle inequality, the righthand side of the inequality in (4) can be bounded as Z t+T Z t+T Z t+T |uT (τ )[φ(t) − φ(τ )]|dτ. (5) |uT (τ )φ(t)|dτ − |uT (τ )φ(τ )|dτ ≥ t t t Using the bound in (3) the first integral on the righthand side of the above inequality can be bounded as Z t+T α . (6) |uT (τ )φ(t)|dτ ≥ kφ(t)k u max t CONVERGENCE PROPERTIES OF ADAPTIVE SYSTEMS 7 The second integral on the righthand side of (5) can be bounded as Z t+T |uT (τ )[φ(t) − φ(τ )]|dτ ≤ umax T sup kφ(t) − φ(τ )k τ ∈[t,t+T ] t ≤ umax T ≤ u2max T Z t+T kφ̇(τ )kdτ t Z t (7) t+T kuT (τ )φ(τ )kdτ. The second line in the above inequality follows by the fact that the arc-length between two points in space is always greater than or equal to a strait line between them. The third line in the above inequality follows by substition of the dynamics in (1). Substitution of the inequalities in (5)-(7) into (4) it follows that Z t+T α kφ(t)k umax |uT (τ )φ(τ )|dτ ≥ . 1 + u2max T t Substitution of the above bound into (4) and squaring both sides it follows that   2α2 /u2max V (t). V (t + T ) ≤ 1 − T (1 + u2max T )2 Therefore the dynamics in (1) are UASL and by linearity this implies ESL as well.  While the first proof is more generic, the method deployed in the second proof gives direct insight as to how the degree of persistent excitation, α, and the upper bound, umax , affect the rate of convergence,   2α2 /u2max . (8) rcon , 1 − T (1 + u2max T )2 In the method by Anderson the rate of convergence is an existence one given by (1 − 2α2 ). No closed form expression is given relating α2 to the original measures of PE, α and β.1 It is clear however that for fixed T an increase in umax conservatively implies an increase in β. It is also clear from (8) that an increase in umax decreases the convergence rate rcon . We show below that an increase in β impliesh a decrease in rcon . Recall i the Abel-Jacobi-Liouville identity, RT T det Φ2 (t, t0 ) = exp − t0 trace(u(τ )u (τ )) dτ , and thus as β increases, det Φ2 (t, t0 ) decreases. Now using this fact and the bound in (2) it follows that as β increases α2 decreases. Often, adaptive systems generate a dynamic system of the form (1) where u(·) is a function of the parameter estimate itself. For this purpose, a nonlinear system of the form φ̇(t) = −u(t, φ)uT (t, φ)φ(t) (9) with φ0 = φ(t0 ) needs to be analyzed. This is addressed in following Theorem , where it should be noted that UASL does not imply ESL. Theorem 2. Let Ω(r) = {φ : kφk ≤ r}. If u(t, φ) ∈ PE∗ (φ, Ω(r)) for all r, u(t) is piecewise continuous, and there exists umax (r) > 0 such that ku(t, φ)k ≤ umax for all φ0 ∈ Ω(r), then φ in Equation (9) is UASL. 1If one carefully follows the steps outlined in [1] it may be possible to come up with a closed form relation, but it appears to be non-trivial. 8 B.M. JENKINS, A.M. ANNASWAMY, E. LAVRETSKY, AND T.E. GIBSON Proof. Given that u(t, φ) ∈ PE∗ (φ, Ω(r)), it follows that there exists T (r) and R t+T α(r) such that t |uT (τ, φ)w|2 dτ  α for all φ0 ∈ Ω(r). Choosing a Lyapunov candidate as V (φ, t) = 21 φT (t)φ(t) and following the same steps as in the proof of Theorem 1 it follows that V (t + T (r)) ≤ rcon V (t) for all φ0 ∈ Ω(r) where   2α2 (r)/u2max (r) rcon (r) = 1 − . T (r)(1 + u2max (r)T (r))2 Given that the convergence rate is upper bounded for all kφ0 k ≤ r and r can be arbitrarily large, the dynamics in (9) are UASL. In order for one to conclude that the dynamics are ESL there would need to exist a constant 0 < δ < 1 such that rcon ≤ δ for all r. That is, the convergence rate of the Lyapunov function would need to be bounded away from 1 uniformly in initial conditions. This global uniformity is not achievable with this analysis and thus it is not possible to conclude ESL.  In the next section we present an application of adaptive control where systems of the form (9) occur. 3.2. Model Reference Adaptive Control. Let u : [t0 , ∞) → R be the input and x : [t0 , ∞) → Rn the state of a dynamical system ẋ(t) = Ax(t) − BθT x(t) + Bu(t) (10) where A ∈ Rn×n is known and Hurwtiz and B ∈ Rn is known as well, with the parameter θ ∈ Rn unknown. The goal is to design the input so that x follows a reference model state xm : [t0 , ∞) → Rn defined by the linear system of equations ẋm (t) = Axm (t) + Br(t) where r : [t0 , ∞) → R is the reference command. Defining the model following error as e = x − xm the control input u(t) = θ̂T (t)x(t) + r(t) achieves this goal when the adaptive parameter θ̂ : [t0 , ∞) → Rn is updated as follows ˙ θ̂(t) = −xeT P B where P = P T ∈ Rn×n is the positive definite solution to the Lyapunov equation AT P + P A = −Q for any real n × n dimensional Q = QT ≻ 0. So as to simplify the notation we let C , P B and the adaptive system can be compactly represented as      ė(t) A BxT (t) e(t) = (11) −x(t)C T 0 φ(t) φ̇(t) where the initial conditions of the model following error and parameter error are denoted as e0 = e(t0 ) and φ0 = φ(t0 ). For the dynamics of interest it follows that V (e, φ) = eT P e + φT φ (12) is a Lyapunov candidate with time derivative along the state trajectories satisfying the inequality, V̇ ≤ −eT Qe. This implies that e(t) and φ(t) are bounded for all time with q p 0 ,φ0 ) and kφk ≤ V (e0 , φ0 ) (13) kek ≤ V (e Pmin where Pmin is the minimum eigenvalue of P . The reference command is bounded by design and thus xm is bounded and along with the bounds above implies that x CONVERGENCE PROPERTIES OF ADAPTIVE SYSTEMS 9 is bounded. The boundedness of x and φ in turn implies that ė is bounded for all time. Integration of V̇ shows that e ∈ L2 with q 0 ,φ0 ) (14) kekL2 ≤ V (e Qmin where Qmin is the minimum eigenvalue of Q. From the fact that e ∈ L2 ∩ L∞ and ė ∈ L∞ it follows that e → 0 as t → ∞ [30, Lemma 2.12]. Before discussing the asymptotic stability of the dynamics in (11) the following lemma is critical in relating persistent excitation between the reference model state and the plant state. Let z = [eT , φT ]T , then the dynamics in (11) can be compactly expressed as   A BxT (t, z; t0 ) ż(t) = z(t) (15) −x(t, z; t0 )C T 0 where we have explicitly denoted x as a function of the state variable z. Lemma 3. For the dynamics in (15) if xm (t) is PE with an α and T such that R t+T xm (τ )xT m (τ )dτ  αI, and there exists a β such that kxm (t)k ≤ β, then x(t, z) t is PE∗ (z, Z(ζ)) with Z(ζ) = {z : V (z) ≤ ζ} for all ζ > 0 with the following bounds holding Z t+pT x(τ )xT (τ )dτ  α′ I (16) t with p > pmin where √ pmin , q α′ , pα − q and ζ Pmin α ζ Pmin q ζ T Qmin (17) q ζ . pT Qmin (18) + 2β + 2β Before going to the proof of this lemma a few comments are in order. First, note that the state variable z contains both the model following error e and the parameter error φ. Therefore, what is being said is that there is weak persistent excitation of x for all initial conditions e0 and φ0 in the compact regions defined by the level sets of the Lyapunov function V (z) = eT P e + φT φ. Furthermore, because these conditions hold for arbitrarily large level sets, i.e. ζ can be arbitrarily large, weak persistent excitation of x is achieved for any initial condition z0 ∈ R2n . However, because the parameters in the persistent excitation bound in (16), namely p, are not uniform in z0 it can not be concluded that x is PE. Proof. This proof follows closely that of [5, Theorem 3.1]. For any fixed unitary 2 T 2 T T T vector w, consider the following equality, (xT m w) −(x w) = −(x w −xm w)(x w + T xm w). Using the definition of e, the bound in (13) for e and the bound β in the statement of the lemma, it follows that  q V (z0 ) 2 T 2 + 2β . (xT w) − (x w) ≤ kek m Pmin 2 Moving (xT m w) to the righthand side, multiplying by −1 and integrating from t to t + pT where p is defined just above (17)  Z t+pT q Z t+pT Z t+pT V (z0 ) T 2 T 2 (xm (τ )w) dτ − (x (τ )w) dτ ≥ ke(τ )kdτ. Pmin + 2β t t t 10 B.M. JENKINS, A.M. ANNASWAMY, E. LAVRETSKY, AND T.E. GIBSON Applying Cauchy-Schwartz to the integral on the right hand side and using the fact R t+T 2 that t (xT m (τ )w) dτ ≥ α we have that  s Z t+pT q Z t+pT V (z0 ) T 2 pT (x (τ )w) dτ ≥ pα − ke(τ )k2 dτ . Pmin + 2β t t Applying the bound in (14) for the L2 norm of e, it follows that q q Z t+pT V (z0 ) 0) + 2β . (xT (τ )w)2 dτ ≥ pα − pT VQ(z Pmin min t For all z0 ∈ Z(ζ) it follows that V (z0 ) ≤ ζ and therefore q q V (z0 ) 0) + 2β ≥ α′ . pT VQ(z pα − Pmin min It follows directly that R t+pT t (xT (τ )w)2 dτ ≥ α′ for all t ≥ t0 and z0 ∈ Z(ζ).  Remark 2. The main take away from this lemma is that for a given α and T such R t+T R t+pT ′ that t xm (τ )xT x(τ )xT (τ )dτ  m (τ )dτ  αI and for a fixed α such that t ′ α I, as the size of the level set V (z) = ζ is increased, p must also increase. This can be seen directly through (17) where pmin increases with increasing ζ. Thus, as p increases, the time window pT over which the excitation is measured increases as well. Theorem 4. If r(t) is piecewise continuous and bounded, and xm (t) is PE and uniformly bounded, then the the equilibrium of the dynamics in (15) is UASL. Proof. Given that xm ∈ PE it follows from Lemma 3 that x(t, z) ∈ PE∗ (z, Z(ζ)) for any ζ where Z(ζ) = {z : V (z) ≤ ζ} and the Lyapunov function V is defined in (12). From (13) it follows that all signals are bounded. Furthermore given that r is piecewise continuous and bounded it follows from (10) that ẋ is piecewise continuous. Therefore x ∈ P[t0 ,∞) , see Definition 4 of piecewise smooth in the Appendix. With x(t, z) ∈ PE∗ (z, Z(ζ)) ∩ P[t0 ,∞) for any fixed ζ applying [27, Theorem 5] it follows that the dynamics of interest are UAS. Given that the above results hold for any ζ > 0, the dynamics of interest are therefore UASL. Due to the fact that persistent excitation bounds for x do not hold globally uniformly in the initial condition z0 one is not able to conclude ESL from this analysis.  We can in fact state something even stronger, and will give a proof by example in the following section (following Theorem 7). Theorem 5. The reference command r(t) being piecewise continuous and bounded, and the reference model state xm (t) being uniformly bounded and PE are not sufficient for the equilibrium of the dynamics in (15) to be ESL. 4. Lack of Exponential Stability in the Large for Adaptive Systems In this section two examples are presented so as to illustrate rigorously by example the implication made in Theorem 4, i.e. persistent excitation of the reference model does not imply exponential stability in the large of the adaptive system and thus proves Theorem 5. This is performed by constructing an invariant unbounded region in the state space of the direct adaptive system where the rate of change per unit time of the system state is finite. It is this feature which implies a lack of exponential stability in the large. CONVERGENCE PROPERTIES OF ADAPTIVE SYSTEMS 11 The first example is identical to the dynamics in (3.2), but with a learning gain added to the update law. The second example is a modified version of classic direct adaptive control with an error feedback term in the reference model [10, 12]. So as to distinguish the two systems we characterize them by their reference models and refer to the first system as Open-loop Reference Model (ORM) adaptive control and the second as Closed-loop Reference Model (CRM) adaptive control. The CRM adaptive system has been added due to recent interest in transient properties of adaptive systems, with the class of CRM systems portraying smoother trajectories as compared to their ORM counterpart, [10, 12]. 4.1. Scalar ORM Adaptive Control with PE Reference State. The following scalar dynamics are nearly identical to those in Section 3.2 however we repeat them herein with A = a < 0 and B = b > 0 to emphasize that they are scalars. Let u : [t0 , ∞) → R be the input, x : [t0 , ∞) → R the plant state, xm : [t0 , ∞) → R the reference state and r : [t0 , ∞) → R the reference input to the following set of differential equations ẋ(t) = ax(t) − bθx(t) + bu(t) ẋm (t) = axm (t) + br(t), (19) (20) with the parameter θ ∈ R unknown. For ease of exposition, in both this section and the next, we will assume that r(t) is a non-zero constant, i.e., r(t) ≡ r, r 6= 0. The control input is defined as u(t) = θ̂(t)x(t) + r(t) with θ̂ : [t0 , ∞) → R updated as follows ˙ θ̂(t) = −γxe, (21) where e = x − xm and γ > 0 is a tuning gain. As before, the error dynamics can be compactly expressed in vector form as z(t) = [e(t), φ(t)]T . A sufficient condition for the uniform asymptotic stability of the above system is that the reference input remain a non-zero constant for all time. This can be proved using Theorem 4. Given that for a constant reference command the above dynamics are also autonomous we give the same result using the well known invariance principle from Lasalle and Krasovskii [4, 19, 21]. Theorem 6. For the system defined in Equations (19)-(21) and r(t) ≡ r, r 6= 0 z = 0 is UASL. Proof. Define the Lyapunov function V (e, φ) = e2 + 1 2 φ γ (22) then V̇ (e, φ) = 2ae2 . Since V > 0 for all z 6= 0, V̇ ≤ 0 for all z ∈ R2 and V → ∞ as z → ∞ the equilibrium at the origin is uniformly stable and uniformly bounded. Given that the system is autonomous, it follows from the the invariance principle that the origin is UASL.  We are now going to construct an unbounded invariant region as discussed at the beginning of this section. The reference model state initial condition is chosen as xm (t0 ) = x̄ where −br̄ x̄ , >0 (23) a 12 B.M. JENKINS, A.M. ANNASWAMY, E. LAVRETSKY, AND T.E. GIBSON so that xm (t) = x̄ for all time. Then the error dynamics are completely described by the second order dynamics     ė(t) ae(t) + bφ(t)(e(t) + x̄) ż(t; x0 , a, b, γ, x̄) = = (24) −γe(t)(e(t) + x̄) φ̇(t) with s(t; t0 , z(t0 )) the transition function for the dynamics above. The invariant set is constructed by first defining three 1-dimensional manifolds S1 , S2 , S3 , three preliminary subsets of R2 which we will denote P1 , P2 , P3 , and finally three regions M1 , M2 , M3 are defined whose union is our invariant set of interest. Use Figure 2 to help visualize these regions. We begin by defining the surface  S1 , [e, φ]T | e = −x̄ . (25) The region P1 ⊂ R2 and the second surface S2 are defined as n ao P1 , [e, φ]T φ < b   (a − bφ)x̄ T T S2 , [e, φ] e = , [e, φ] ∈ P1 . a + bφ (26) Similarly a second subset of the error-space P2 ⊂ R2 and a third surface S3 are defined as n o a P2 , [e, φ]T ≤φ<0 b  T S3 , [e, φ] e = 0, [e, φ]T ∈ P2 . We now define regions M1 and M2 as   (a − bφ)x̄ , [e, φ]T ∈ P1 M1 , [e, φ]T −x̄ < e < a + bφ  T M2 , [e, φ] −x̄ < e < 0, [e, φ]T ∈ P2 . (27) (28) From these definitions, we note that the surfaces S1 and S2 form the two sides of the region M1 . Similarly, S1 and S3 form the sides of the region M2 . In order to complete the invariant set a third region is defined using the Lyapunov function in (22) which gives us the convex bounded region   1 (29) M3 , [e, φ]T e2 + φ2 < x̄2 . γ The union of the three regions is defined as M0 , M1 ∪ M2 ∪ M3 . (30) The following theorem will show three facts. First, the error velocities within M0 are finite and bounded even though M0 is unbounded. Second, M0 is an invariant set. Lastly, a lower limit on the time of convergence is given as a function of the 1 ;t0 ,z(t0 ))k initial condition z(t0 ) and the ratio ks(t ks(t0 ;t0 ,z(t0 ))k for some t1 ≥ t0 . The conclusion to be arrived at is that the system is UASL and not ESL. Theorem 7. For the error dynamics z(t) with r(t) = r̄ and xm (t0 ) = x̄ with M0 defined in (30) and s(t; t0 , z(t0 )) the transition function of the differential equation (24), the following hold CONVERGENCE PROPERTIES OF ADAPTIVE SYSTEMS 13 φ −x̄ M3 S3 M2 S1 e M1 S2 Figure 2. The three regions M1 (green), M2 (blue) and M3 (red) whose union results in the invariant set M0 . (i) kżk ≤ dz for all z ∈ M0 where q √ dz , (|ax̄| + 2|b γ x̄2 |)2 + (2γ x̄2 )2 (ii) M0 is an invariant set. (iii) A trajectory beginning at z(t0 ) ∈ M0 will converge to a fraction of its original magnitude at time t1 , with T ≥ where c = ks(t1 ;t0 ,z(t0 ))k ks(t0 ;t0 ,z(t0 ))k kz(t0 )k(1 − c) dz (31) and T = t1 − t0 . Proof of (i). From the definition of M1 in (27) and M2 in (28), and the definition 2 of φ̇ in (24) it follows that |φ̇(z)| ≤ γ x̄4 for all z ∈ M1 ∪ M2 . Similarly, from the definition of M3 in (29) it follows that |φ̇(z)| ≤ 2γ x̄2 for all z ∈ M3 . Therefore |φ̇(z)| ≤ 2γ x̄2 (32) for all z ∈ M0 where M0 is defined in (30). From the definition of ė in (24) and the definitions of M1 , M2 and M3 it follows √ that |φ̇(z)| ≤ |ax̄| for all z ∈ M1 ∪ M2 and |φ̇(z)| ≤ |ax̄| + 2b γ x̄2 for all z ∈ M3 . Therefore √ (33) |ė(z)| ≤ |ax̄| + 2b γ x̄2 for all z ∈ M0 . From the bounds in (32) and (33) for φ̇ and ė respectively Theorem 7(i) follows. 14 B.M. JENKINS, A.M. ANNASWAMY, E. LAVRETSKY, AND T.E. GIBSON Proof of (ii). In order to evaluate the behavior of the trajectories on the surfaces S1 , S2 and S3 , normal vectors are defined along the surfaces that point toward M0 . The normal vectors are  T −∂e T n̂1 = [1, 0] , n̂2 (z) = ,1 , and n̂3 = [−1, 0]T ∂φ z∈S2 −2bx̄a ∂e T = (a+bφ) where ∂φ 2 . We then find that n̂i (z)ż(z) ≥ 0 for z ∈ Si and i = 1, 2, 3. From the general stability proof of the adaptive system with Lyapunov function V = e2 + γ1 φ2 once within M3 a trajectory cannot leave it. Proof of (iii). For a trajectory to traverse from z(t0 ) to a magnitude less than ckz(t0 )k (such that ks(t1 )k ≤ cks(t0 )k) it must travel at least a distance kz(t0 )k(1 − c) over which it has a maximum rate of dz therefore T ≥ kz(t0 )k(1 − c) . dz  Proof of Theorem 5. The results from Theorem 7 illustrate that for an input which provides persistent excitation of the reference model, there exists an unbounded region where the adaptive system is UASL and not ESL. For the system to possess ESL, the lower bound in (41) needs to be dependent only on c and independent of z(t0 ), see Remark 1 with c analogous to η/ρ. The lower bound on T is therefore sufficient to prove that ESL is not possible .  It can also be shown that the learning rate, φ̇, of the adaptive parameter tends to zero as the initial adaptive parameter error φ(t0 ) tends to negative infinity inside M1 . In the previous theorem we only showed that φ̇ is uniformly bounded for all initial conditions inside the larger set M0 . Thus, not only is ESL impossible, there is an unbounded region in the base of M1 where adaptation occurs at a slower and slower rate the deeper the initial condition starts in the trough of M1 . This effect is visualized through simulation examples in a later section. Corollary 8. For the error dynamics z(t) defined by the differential equation in (24) with r(t) = r̄ and xm (t0 ) = x̄ it follows that φ̇(e, φ) → 0 as φ → −∞ with [e, φ]T ∈ M1 . Proof. For fixed φ and an e such that [e, φ]T ∈ M1 , which we will assume from this a−bφ x̄ per the definition of M1 point forward in the proof, it follows that −x̄ ≤ e ≤ a+bφ in (27). Written another way, e = −x̄ + ∆ (34) h i 2a where ∆ ∈ 0, a+bφ x̄ . Substitution of (34) into the definition of φ̇ from (24) it follows that φ̇ = −γ(xmo + ∆)2 + γ x̄(x̄ − ∆). After expanding and canceling terms the above equation reduces to  φ̇ = −γ 3x̄∆ + ∆2 . From the fact that ∆ ≤ 2a a+bφ x̄ (35) it follows that limφ→−∞ ∆ = 0 (recall that a < 0). Using this limiting value of ∆ and (35) it follows that limφ→−∞ φ̇ = 0 when [e, φ]T ∈ M1 .  CONVERGENCE PROPERTIES OF ADAPTIVE SYSTEMS 15 This corollary helps connect the results from this section back to our definitions of PE and PE∗ , and Remark 2. While it is possible for xm ∈ PE our analysis technique only allowed us to conclude that x ∈ PE∗ . This was characterized by the fact that in order for x to maintain the same level of excitation, which we referred to as α′ in (16), the time window over which the excitation was measured, pT in (16), would have to increase as the norm of the initial conditions of the system increased. This is precisely what is occurring in the bottom of M1 . In the bottom of this region it follows by definition that |x| ≤ ∆ which tends to zero as φ(t0 ) decreases to negative infinity, all the while the speed at which the state can leave this region is decreasing as well. 4.2. Scalar CRM Adaptive System. We now consider a modified adaptive system in which the reference model contains a feedback loop with the state error. The plant is the same as that in (19) with and identical control law and the same update law as that in (21). The reference model however is now defined as ẋm (t) = axm (t) + br(t) − ℓe(t) (36) where ℓ < 0 and x̄ no longer. Throughout this section it is assumed that r̄ > 0 is a constant, however, no longer does xm (t) = x̄ for all time. Unlike in the ORM cases, the reference model dynamics cannot be ignored. The resulting system can be represented as     ẋm (t) axm (t) + br̄ − ℓe(t) (37) ż(t; x0 , a, b, γ, r̄, ℓ) =  ė(t)  =  (a + ℓ)e(t) + bφ(t)x(t)  . −γe(t)x(t) φ̇(t) We will show that this modified adaptive system cannot be ESL and for the specific r(t) chosen is UASL. Theorem 9. For the system defined in equation (37) with r(t) ≡ r, r 6= 0 the equilibrium of z is UASL. Proof. Consider the Lyapunov candidate in (22) and differentiating along the dynamics in (37) it follows that V̇ (e, φ) = 2(a + ℓ)e2 . Since V > 0 for all z 6= 0, V̇ ≤ 0 for all [e φ]T ∈ R2 and V → ∞ as z → ∞, it follows that z = [x̄, 0, 0]T is uniformly stable in the large. Since the system is autonomous it follows from the invariance principle that z = [x̄, 0, 0]T is UASL as well.  Now a number of regions in the state-space (R3 ) are defined which allow the construction and proof of this subsection’s main result which mirrors the results of Theorem 7. In particular, three regions will be defined. It will then be shown that a specific region M0 , the union of these three regions, will remain invariant. As this region M0 is infinite and the vector field defined by (37) has a finite maximum velocity, we can conclude that CRM adaptive systems do not posses exponential stability in the large but are at best UASL. Define a subset of the state-space, P1 ⊂ R3   a + ℓ br̄ T 3 T , ≤ xm ≤ x̄, [xm , e, φ] ∈ R P1 , [xm , e, φ] φ < b a+ℓ and within the subset P1 a region   xm (a + ℓ + bφ) T T , [xm , e, φ] ∈ P1 . M1 , [xm , e, φ] −xm ≤ e ≤ a + ℓ − bφ 16 B.M. JENKINS, A.M. ANNASWAMY, E. LAVRETSKY, AND T.E. GIBSON Define a second subset of the state-space, P2 ⊂ R3   br̄ a+ℓ ≤ φ < 0, ≤ xm ≤ x̄, [xm , e, φ]T ∈ R3 P2 , [xm , e, φ]T b a+ℓ and within this subset a region  M2 , [xm , e, φ]T −xm ≤ e ≤ 0, [xm , e, φ]T ∈ P2 . A third region is defined as   1 M3 , [xm , e, φ]T e2 + φ2 ≤ x̄2 , 0 ≤ xm ≤ 2x̄, [xm , e, φ]T ∈ R3 γ The union of these three M regions is then the invariant set M0 , defined as M0 , M1 ∪ M2 ∪ M3 (38) The three regions are shown in Figure 3. Four surfaces of this region will be used in the proof of the following theorem   xm (a + ℓ + bφ) (39) , [xm , e, φ]T ∈ P1 S1 , [xm , e, φ]T e = a + ℓ − bφ  S2 , [xm , e, φ]T e = −xm , [xm , e, φ]T ∈ P1 ∪ P2 (40)  T T S3 , [xm , e, φ] e = 0, [xm , e, φ] ∈ P2   1 S4 , [xm , e, φ]T e2 + φ2 = x̄2 , [xm , e, φ]T ∈ M0 γ Theorem 10. For the error dynamics z(t) with r(t) = r̄, M0 as defined in (38), and s(t; t0 , z(t0 )) the transition function of the differential equation (37), the following hold (i) kżk ≤ dz for all z ∈ M0 where q √ dz , (|(a + ℓ)x̄| + 2b γ x̄2 )2 + (2γ x̄2 )2 + (|(a + ℓ)x̄| + r̄)2 (ii) M0 is an invariant set. (iii) A trajectory beginning at z(t0 ) ∈ M0 will converge to a fraction of its original magnitude at time t1 , with T ≥ where c = ks(t1 ;t0 ,z(t0 ))k ks(t0 ;t0 ,z(t0 ))k kz(t0 )k(1 − c) dz and T = t1 − t0 . Proof of (i). Each component of the vector field is bounded: |φ̇(z)| ≤ 2γx20 √ |ė(z)| ≤ |(a + ℓ)x̄| + 2b γ x̄2 |ẋm (z)| ≤ |(a + ℓ)x̄| + r̄ when z ∈ M0 , and thus kżk ≤ dz . (41) CONVERGENCE PROPERTIES OF ADAPTIVE SYSTEMS 17 Figure 3. The three regions M1 (green), M2 (blue) and M3 (red) whose union results in the invariant set M0 . Proof of (ii). In order to evaluate the behavior of the trajectories on the surfaces of M1 and M2 , normal vectors are defined along the surfaces. The normal vectors n̂2 and n̂3 have trivial definitions easily determined by inspection. The normal vector n̂1 is constructed using the cross product of two tangential vectors n̂1 = t̂1 ⊗ t̂2 where T T   ∂e ∂e 0 t̂1 = 1 0 and t̂2 = 1 . ∂xm z∈S1 ∂xm z∈S1 It follows directly that n̂T i (z)ż(z) ≥ 0 for z ∈ Si and i = 1, 2, 3. From the stability analysis in the proof of Theorem 9 we know that S4 is simply a level set of the Lyapunov function and thus M4 is invariant. Therefore no trajectory can exit M0 making it an invariant set. Proof of (iii). Identical to the proof of item (iii) in Theorem 7.  Just as with an ORM, with a CRM the dynamics are at best UASL. The region of slow convergence is present in CRM adaptive control as well and a similar corollary holds. Corollary 11. For the error dynamics z(t) defined by the differential equation in (37) with r(t) = r̄ it follows that φ̇(xm , e, φ) → 0 as φ → −∞ with [xm , e, φ]T ∈ M1 . 18 B.M. JENKINS, A.M. ANNASWAMY, E. LAVRETSKY, AND T.E. GIBSON φ = −2 φ = −4 φ = −8 SO1 z1 z2 z3 SO5 z4 z5 z6 SO2 z7 z8 z9 Table 1. Initial conditions zi , i = 1, 2, . . . , 9 for the ORM example system. Each initial conditions, zi , is the point of intersection of the two indicated surfaces in the corresponding row and column. φ = −2 φ = −4 φ = −8 SC1 z1 z2 z3 SC5 z4 z5 z6 SC2 z7 z8 z9 Table 2. Initial conditions zi , i = 1, 2, . . . , 9 for the CRM example system. Each initial conditions, zi , is the point of intersection of the two indicated surfaces in the corresponding row and column. 5. Simulation examples Simulations are now presented for the ORM adaptive system and the CRM adaptive system. The main purpose of these simulations is to illustrate the invariance of their respective M0 , and the slow convergence, especially the sluggish phenomenon that is treated in Corollaries 8 and 11. Before continuing to the results we need to distinguish between the surfaces in the ORM and CRM cases and define two new surfaces. First, let the following two surfaces in the ORM case be redefined as SO1 = S1 and SO2 = S2 where S1 and S2 are defined in (25) and (26). Similarly for the CRM, SC1 = S1 and SC2 = S2 where S1 and S2 are defined in (39) and (40). The two new surfaces to be defined pertain to the condition ė = 0. For ORMs this surface is defined as   −x̄bφ SO5 , [e, φ]T e = a + bφ and for the CRMs a similar curve is defined as   −xm bφ ℓe − br̄ T SC5 , [e, φ] e = , xm = a + bφ a where the second equation in the definition of SC5 is derived from (36) by setting ẋm = 0. Nine initial states are chosen specifically for each system, defined in Tables 1 and 2. Rather than defining numerical values for each initial condition, we choose them as points of intersection between two unique surfaces. The values of the parameters for the simulations are as follows a = −1, ℓ = −1, γ = 1, b = 1, r = 3. (42) Figure 4(a) contains the 2-dimensional phase portrait for trajectories of the ORM adaptive system resulting from each of the initial conditions of Table 1. Figure 4(b) contains the 2-dimensional projection of the 3-dimensional phase space trajectories of the CRM adaptive system resulting from each of the initial conditions of Table 2. Before we proceed, we observe that in both Figures 4(a) and 4(b), there is an CONVERGENCE PROPERTIES OF ADAPTIVE SYSTEMS 2 2 1 1 0 0 SO5 −1 −2 z7 φ φ z2 z5 −9 −3 z8 −4 z2 z5 −5 SO1 SO2 SC2 −6 −7 −8 z1 z4 −3 z8 −5 −6 z7 −2 −3 −4 SC5 −1 z1 z4 19 SC1 −7 z9 z3 z6 −2.5 −2 z9 −8 −1.5 −1 −0.5 0 0.5 −9 −3 1 −2.5 −2 z6 −1.5 z3 −1 e −0.5 0 0.5 1 e (a) 2D phase portrait for the ORM adaptive system with initial conditions defined in table 1 (b) 2D projection of the 3D phase portrait for the CRM adaptive system with initial conditions defined in table 2 1 4 0 3 0 3 -1 -2 2 1 -3 5 10 15 20 5 10 15 20 0 0 5 10 15 20 4 2 φ -4 x φ x 10 15 20 0 5 10 15 20 -2 2 -6 1 5 0 3 -2 2 0 2 0 3 2 1 -3 0 4 -1 -2 0 0 xm 4 e 1 xm e Figure 4. Phase portraits of the ORM and CRM adaptive systems -4 -6 1 -8 -8 -10 -10 0 0 0 5 10 t 15 20 0 5 10 15 20 t (a) Simulation of the the ORM adaptive system. 0 5 10 t 15 20 t (b) Simulation of the the CRM adaptive system. Figure 5. Time series trajectories of the ORM and CRM adaptive systems for intial conditions z4 (blue), z5 (orange), and z6 (yellow) as defined in Table 1 and 2. attractor that all initial conditions converge to. This attractor partially coincides with SO5 and SC5 . We focus on those initial conditions that are closest to these attractors that are common to both ORM and CRM adaptive systems, which are given by initial conditions z4 , z5 , and z6 . With these initial conditions we next discuss the region of slow convergence in both adaptive systems. We present time responses of e, φ, x, and xm for the ORM system in Figure 5(a) and the CRM adaptive system in Figure 5(b), respectively, for the initial conditions z4 , z5 , and z6 . Defining Ts as the settling time beyond which kz(t0 )−z(∞)k reduces 20 B.M. JENKINS, A.M. ANNASWAMY, E. LAVRETSKY, AND T.E. GIBSON to 5% of its initial value, we have that Ts ∈ {5.37, 5.62, 8.19} for these three initial conditions for the ORM system and Ts ∈ {3.69, 5.85, 12.74} for the CRM system. 0) is identical for all three trajectories, Ts increases as Notice that although z(tz(t 0 +Ts ) kz(t0 )k increases, implying that the system is not exponentially stable in the large. Trajectories initialized at both z5 and z6 demonstrate the slow convergence described in this paper, which is characterized by the nearly flat portion of the response of e and x prior to convergence. From the third initial condition, z6 , the exacerbated sluggish effect in the CRM adaptive system can clearly be seen. The error convergence for large initial conditions is even slower compared to that of the ORM system. It was observed that this convergence became slower as |ℓ| was increased further. It should be noted that these convergence properties co-exist with the absence of the oscillatory behavior in the CRM in comparison to the ORM. That is, the introduction of the feedback gain ℓ helps in producing a smooth adaptation, but not a fast adaptation. Increasing γ along with ℓ can keep convergence times similar to those of the ORM while maintaining reduced oscillations. 6. Conclusions In this paper, precise definitions of asymptotic and exponential stability are reviewed and a definition of weak persistent excitation is introduced, which is initialcondition dependent. With these definitions it has been shown that when persistent excitation conditions are imposed on the reference model, it results in weak persistent excitation of the adaptive system. The implication of this weak PE is that the speed of convergence is initial condition dependent, resulting in UASL of the origin in the underlying error system. Exponential stability in the large can not be proven and claims of robustness should be based on the UASL property. References [1] B. D. O. Anderson, Exponetial stability of linear equations arising in adaptive identification, IEEE Trans. Automat. Contr. 22 (1977), no. 83. [2] B. D. O. Anderson and J. B. Moore, New results in linear system stability, SIAM J. Control (1969). [3] Brian D. O. Anderson and C. Richard Johnson Jr, Exponential convergence of adaptive identification and control algorithms, Automatica 18 (1982), no. 1, 1–13. [4] E. A. Barbashin and Nikolai N. Krasovskii, On the stability of motion as a whole, Doklady Akademii Nauk SSSR 86 (1952), 453–456. [5] S. Boyd and S. Sastry, On parameter convergence in adaptive control, Syst. Contr. Lett. 3 (1983), 311–319. [6] Stephen Boyd and Sosale Shankara Sastry, Necessary and sufficient conditions for parameter convergence in adaptive control, Automatica 22 (1986), no. 6, 629–639. [7] T. E. Gibson, A. M. Annaswamy, and E. Lavretsky, Improved transient response in adaptive control using projection algorithms and closed loop reference models, Aiaa guidance navigation and control conference, 2012. , Closed–loop Reference Model Adaptive Control, Part I: Transient Performance, [8] American control conference, 2013. [9] , Closed-loop reference models for output–feedback adaptive systems, European control conference, 2013. [10] , On adaptive control with closed-loop reference models: Transients, oscillations, and peaking, IEEE Access 1 (2013), 703–717, available at arXiv:1304.7278. [11] T.E. Gibson, Z. Qu, A.M. Annaswamy, and E. Lavretsky, Adaptive output feedback based on closed-loop reference models, Automatic Control, IEEE Transactions on 60 (2015), no. 10, 2728–2733, available at arXiv:1410.1944. CONVERGENCE PROPERTIES OF ADAPTIVE SYSTEMS 21 [12] Travis E. Gibson, Closed-loop reference model adaptive control: with application to very flexible aircraft, Ph.D. Thesis, 2014. [13] W. Hahn, Stability of motion, Springer–Verlag, New York NY, 1967. [14] P.A. Ioannou and J. Sun, Robust adaptive control, Dover, 2013. [15] B.M Jenkins, T.E. Gibson, A.M. Annaswamy, and E. Lavretsky, Convergence properties of adaptive systems with open-and closed-loop reference models, AIAA guidance navigation and control conference, 2013. , Uniform asymptotic stability and slow convergence in adaptive systems, IFAC inter[16] national workshop on adaptation and learning in control and signal processing, 2013, pp. 446– 451. [17] R. E. Kalman, Contributions to the theory of optimal control, Boletin de la Sociedad Mathematica Mexicana 5 (1960), 102–119. [18] R. E. Kalman and J. E. Bertram, Control systems analysis and design via the ‘second method’ of liapunov, i. continuous-time systems, Journal of Basic Engineering 82 (1960), 371–393. [19] N.N. Krasovskii, Stability of motion, Stanford University Press, Stanford CA, 1963. [20] G. Kreisselmeier, Adaptive observers with exponential rate of convergence, IEEE Trans. Automat. Contr. 22 (1977), no. 1. [21] J. LaSalle, Some extensions of liapunov’s second method, Circuit Theory, IRE Transactions on 7 (1960Dec), no. 4, 520–527. [22] J. P. Lasalle, Asymptotic stability criteria, Proc. Symp. Appl. Math. 13 (1962). [23] P. M. Lion, Rapid identification of linear and nonlinear systems, AIAA Journal 5 (1967), no. 10. [24] Antonio Lorı́a and Elena Panteley, Uniform exponential stability of linear time-varying systems: revisited, Systems & Control Letters 47 (2002), no. 1, 13–24. [25] I.G. Malkin, On stability in the first approximation, Sbornik Nauchnykh Trudov Kazanskogo Aviac. Inst. 3 (1935). [26] J. S. Massera, Contributions to stability theory, Annals of Mathematics 64 (1956 (Erratum, Ann. of Math, 1958)), no. 1. [27] A.P. Morgan and K.S. Narendra, On the stability of nonautonomous differential equations ẋ = [A + B(t)]x, with skew symmetric matrix B(t), SIAM Journal on Control and Optimization 15 (1977), no. 1, 163–176. , On the uniform asymptotic stability of certain linear nonautonomous differential [28] equations, SIAM Journal on Control and Optimization 15 (1977), no. 1, 5–24. [29] K. S. Narendra and A. M. Annaswamy, Persistent excitation in adaptive systems, International Journal of Control 45 (1987), no. 1, 127–160. [30] , Stable adaptive systems, Dover, 2005. [31] Oscar Nouwens, Anuradha Annaswamy, and Eugene Lavretsky, Analysis of Slow Convergence Regions in Adaptive Systems, American Control Conference, 2016, submitted. [32] Elena Panteley, Antonio Lorı́a, and Andrew Teel, Relaxed persistency of excitation for uniform asymptotic stability, Automatic Control, IEEE Transactions on 46 (2001), no. 12, 1874– 1886. [33] J. S.-C. Yuan and W. M. Wonham, Probing signals for model reference identification, IEEE Trans. Automat. Contr. 22 (1977), no. 4. Appendix A. Definitions Definition 4 (Piecewise smooth function [33]). Let Cδ be a set of points in [t0 , ∞) for which there exists a δ > 0 such that for all t1 , t2 ∈ Cδ , t1 6= t2 implies |t1 −t2 | ≥ δ. Then P[t0 ,∞) is defined as the class of real valued functions on [t0 , ∞) such that for every u ∈ P[t0 ,∞) , there corresponds some δ and Cδ such that (i) u(t) and u̇(t) are continuous and bounded on [t0 , ∞) \ Cδ and − (ii) for all t1 ∈ Cδ , u(t) and u̇(t) have finite limits as t → t+ 1 and t → t1 22 B.M. JENKINS, A.M. ANNASWAMY, E. LAVRETSKY, AND T.E. GIBSON PhD Candidate, Department of Mechanical Engineering MIT, Rm 3-441, 77 Massachusetts Avenue, Cambridge MA, 02139,USA E-mail address: [email protected] Director of Active-Adaptive Controls Lab, Department of Mechanical Engineering, MIT, 77 Massachusetts Avenue, Cambridge MA, 02139,USA E-mail address: [email protected] Senior Technical Fellow, Boeing Research and Technology, 5301 Bolsa Avenue, MC H017-D334, Huntington Beach, CA, 92648, USA E-mail address: [email protected] Research Fellow in Medicine, Harvard Medical School and Channing Laboratory, Brigham and Women’s Hospital, 181 Longwood Avenue, Boston MA, 02115, USA E-mail address: [email protected] E-mail address: [email protected]
3cs.SY
Representation stability and finite linear groups Andrew Putman∗ Steven V Sam† arXiv:1408.3694v3 [math.AT] 15 Feb 2017 January 13, 2017 Abstract We study analogues of FI-modules where the role of the symmetric group is played by the general linear groups and the symplectic groups over finite rings and prove basic structural properties such as local Noetherianity. Applications include a proof of the Lannes–Schwartz Artinian conjecture in the generic representation theory of finite fields, very general homological stability theorems with twisted coefficients for the general linear and symplectic groups over finite rings, and representation-theoretic versions of homological stability for congruence subgroups of the general linear group, the automorphism group of a free group, the symplectic group, and the mapping class group. Contents 1 2 3 4 5 6 Introduction Noetherian results Partial resolutions and representation stability Twisted homological stability A machine for finite generation Finite generation theorems 1 1 14 28 35 36 41 Introduction The language of representation stability was introduced by Church–Farb [ChFa] to describe representation-theoretic patterns they observed in many parts of mathematics. In later work with Ellenberg [ChEFa], they introduced FI-modules, which gave a clearer framework for these patterns for the representation theory of the symmetric group. The key technical innovation of their work was a certain Noetherian property of FI-modules, which they later established in great generality with Nagpal [ChEFaNag]. This Noetherian property allowed them to prove an asymptotic structure theorem for finitely generated FI-modules, giving an elegant mechanism behind the patterns observed earlier in [ChFa]. The theory of FI-modules fits into the larger picture of functor categories, which play an important role in algebraic topology and algebraic K-theory; see [FraFriPiSch, FraTo] for surveys. In this paper, we study functor categories that can be viewed as analogues of FI-modules where the role of the symmetric group is played by the classical finite groups of matrices, namely the general linear groups and the symplectic groups over finite rings. We establish analogues of the aforementioned Noetherian and asymptotic structure results. A byproduct of our work here is a proof of the Lannes–Schwartz Artinian conjecture (see Theorem B). We ∗ † Supported in part by NSF grant DMS-1255350 and the Alfred P. Sloan Foundation Supported by a Miller research fellowship 1 have two families of applications. The first are very general homological stability theorems with twisted coefficients for the general linear groups and symplectic groups over finite rings. The second are representation-theoretic analogues of homological stability for congruence subgroups of the general linear group, the automorphism group of a free group, the symplectic group, and the mapping class group. 1.1 Review of FI-modules Since our theorems parallel results about FI-modules, we begin by reviewing the theory of FI-modules. Unless otherwise specified, all rings in this paper are commutative and contain 1. Fix a Noetherian ring k. Configuration spaces. We start with an example. Let X be a compact oriented manifold with ∂X 6= ∅. Let PConf n (X) = {(x1 , . . . , xn ) ∈ X n | xi 6= xj for i 6= j} be the configuration space of n ordered points in X. The symmetric group Sn acts freely on PConf n (X) by permuting points. Let Conf n (X) = PConf n (X)/Sn be the configuration space of n unordered points in X. McDuff [Mc] proved that Conf n (X) satisfies cohomological stability: for k ≥ 1, we have Hk (Conf n (X); k) ∼ = Hk (Conf n+1 (X); k) for n ≫ 0. For PConf n (X), easy examples show that cohomological stability does not hold. Observe that Hk (PConf n (X); k) is a representation of Sn . Building on work of Church [Ch1], Church–Ellenberg–Farb–Nagpal [ChEFaNag] proved that Hk (PConf n (X); k) stabilizes as a representation of Sn in a natural sense. The key to this is the theory of FI-modules. Basic definitions. Let FI be the category of finite sets and injections. An FI-module over a ring k is a functor M : FI → Modk . More concretely, M consists of the following. • For each finite set I, a k-module MI . • For each injection f : I ֒→ J between finite sets I, J, a homomorphism Mf : MI → MJ . These homomorphisms must satisfy the obvious compatibility conditions. For I ∈ FI, the FI-endomorphisms of I are exactly the symmetric group SI , so SI acts on MI . In particular, setting [n] = {1, . . . , n} and Mn = M[n] , the group Sn acts on Mn . Example 1.1. Given a finite set I (with the discrete topology), let Emb(I, X) be the space of injective functions I → X. There is an FI-module M with MI = Hk (Emb(I, X); k) for I ∈ FI. Observe that Mn = Hk (PConf n (X); k). General situation. More generally, let C be any category. A C-module over a ring k is a functor M from C to Modk (see [FraFriPiSch, FraTo] for surveys). For each C ∈ C, we thus have a k-module MC , and for each C-morphism f : C → C ′ we have a k-module morphism Mf : MC → MC ′ . These morphisms satisfy compatibility conditions coming from the composition law in C. The class of C-modules over k forms a category whose morphisms are natural transformations. A morphism φ : M → N of C-modules thus consists of k-module morphisms φC : MC → NC for each C ∈ C such that the diagram φ MC −−−C−→ NC   Mf y φ ′  N y f MC ′ −−−C−→ NC ′ 2 commutes for all C-morphisms f : C → C ′ . We will often omit the k and simply speak of C-modules. Notions such as C-submodules, surjective/injective morphisms, etc. are defined pointwise. For example, a C-module morphism φ : M → N is surjective/injective if for all objects C, the linear map φC : MC → NC is surjective/injective. A C-submodule is the image of an injective morphism of C-modules. A C-module M is finitely generated if there exist C1 , . . . , Cn ∈ C and elements xi ∈ MCi such that the smallest C-submodule of M containing the xi is M itself. We will say that the category of C-modules over k is locally Noetherian if all submodules of finitely generated C-modules over k are finitely generated. We will say that the category of C-modules is locally Noetherian if the category of C-modules over k is locally Noetherian for all Noetherian rings k. Asymptotic structure. Let M be a finitely generated FI-module over a Noetherian ring. Church–Ellenberg–Farb–Nagpal [ChEFaNag] proved that the category of FI-modules is locally Noetherian, and used this to prove three things about M . For N ≥ 0, let FIN be the full subcategory of FI spanned by I ∈ FI with |I| ≤ N . • (Injective representation stability) If f : I → J is an FI-morphism, then the homomorphism Mf : MI → MJ is injective when |I| ≫ 0. • (Surjective representation stability) If f : I → J is an FI-morphism, then the SJ -orbit of the image of Mf : MI → MJ spans MJ when |I| ≫ 0. • (Central stability) For N ≫ 0, the functor M is the left Kan extension to FI of the restriction of M to FIN . Informally, central stability says that for I ∈ FI with |I| > N , the k-module MI can be constructed from MI ′ for |I ′ | ≤ N using the “obvious” generators and the “obvious” relations. It should be viewed as a sort of finite presentability condition. Remark 1.2. The statement of central stability in [ChEFaNag] does not refer to Kan extensions, but is easily seen to be equivalent to the above. The original definition of central stability in the first author’s paper [Pu2] appears to be very different: it gives a presentation for MI in terms of those MI ′ with |I ′ | ∈ {|I| − 1, |I| − 2}. One can show that this is equivalent to the above statement. We will prove a more general result during the proof of Theorem F below. Conclusion. The upshot is that the locally Noetherian property implies that to describe how Hk (PConf n (X); k) changes as n → ∞, it was enough for Church–Ellenberg–Farb–Nagpal to prove that the FI-module in Example 1.1 is finitely generated. Our goal is to generalize this kind of result to other settings. Remark 1.3. In a different direction, Wilson [Wi] has generalized the theory of FI-modules to the other classical families of Weyl groups. 1.2 Introduction to the rest of the introduction It will take some time to state our results, so to help orient the reader we give a brief outline of the rest of the introduction and provide a summary of our four main families of results. We begin in §1.3 by introducing the four main categories we study in this paper. They take as input a commutative ring R and are called VI(R), V(R), V′ (R), VIC(R, U), and SI(R). This section states our first main family of theorems. • Theorems A/B/C/D/E: When R is a finite commutative ring, the categories of VI(R)-, V(R)-, V′ (R)-, VIC(R, U)-, and SI(R)-modules are locally Noetherian. 3 Remark 1.4. Our proofs of Theorems A–E use analogues of the theory of Gröbner bases. Such techniques are developed systematically by Sam–Snowden in [SamSn4]; however, the results of this paper can not be proved using the main result of [SamSn4]. See Remark 2.16 for more on this. Remark 1.5. The condition that R is finite is necessary; indeed, in Theorem N we prove that none of the above categories of modules are locally Noetherian when R is infinite. In §1.4, we introduce the language of complemented categories, which provides a common framework for stating and proving our results. Examples include FI and VIC(R, U) and SI(R) (though not VI(R) or V(R) or V′ (R); we will explain how to handle these in Remark 1.18 below). This section states our second main theorem: • Theorem F: If C is a complemented category such that the category of C-modules is locally Noetherian, then finitely generated C-modules have a simple asymptotic structure analogous to Church–Farb’s theorem from the previous section. The next section (§1.5) provides large numbers of examples of finitely generated C-modules to which we can apply the previous result and obtain interesting asymptotic structure theorems. Letting OK be the ring of integers in an algebraic number field, the main theorems of this section are as follows: • Theorems G/H/I/J/K: The homology groups of congruence subgroups in GLn (OK ), SLn (OK ), the automorphism group of a free group, Sp2n (OK ), and the mapping class group form finitely generated modules over appropriate categories. Combining these theorems with Theorem F, we obtain a version of representation stability for these homology groups. Remark 1.6. The proofs of Theorems G–K all use a machine we develop later in this paper. The key input to this machine is an appropriate local Noetherianity theorem (like Theorems A–E above). See Theorem 5.13 for a statement of how this machine works. The final section (§1.6) of our introduction concerns twisted homological stability. Its main theorems can be summarized as follows: • Theorems L/M: If R is a finite commutative ring, then the twisted homology groups of GLn (R), SLn (R), and Sp2n (R) with coefficients in a finitely generated module over an appropriate category stabilize. Remark 1.7. The proofs of Theorems L and M both use another machine we develop later in this paper to prove twisted homological stability theorems from appropriate local Noetherianity theorems. See Theorem 4.2 for a statement of how this machine works. Remark 1.8. Some readers may notice a parallel between Theorems 5.13 and 4.2 and a program outlined independently by Church (in lectures and personal communication, but never published). Church’s program had similar inputs and would have obtained these same conclusions (finite generation for homology of congruence subgroups, and stability for twisted homology), but with one key difference: if successful, it would have yielded effective quantitative bounds (on the degree of generators in the former case, and on the stable range in the latter). However, Church informs us that technical difficulties arose that mean his proposed program cannot be carried out, and so it will not appear. He points out that, although the results in this paper were obtained independently, they can be viewed after the fact as a demonstration that the framework of his approach can be salvaged by using our local Noetherianity theorems to avoid these technical difficulties, at the cost of giving up effective bounds. 4 The introduction closes with some comments and questions together with an outline of the remainder of the paper. This last section also contains Theorem N, which is the nonNoetherian result discussed in Remark 1.5. 1.3 Categories of free modules: VI, V, V′ , VIC, and SI We now introduce the categories we will consider in this paper. Fix a ring R (assumed as always to be commutative). The category VI. A linear map between free R-modules is splittable if it has a left inverse. Let VI(R) be the category whose objects are finite-rank free R-modules and whose morphisms are splittable injections. For V ∈ VI(R), the monoid of VI(R)-endomorphisms of V is GL(V ). Thus if M is a VI(R)-module, then MV is a representation of GL(V ) for all V ∈ VI(R). The category VI(R) was introduced by Scorichenko in his thesis ([Sco]; see [FraFriPiSch] for a published account). Our main theorem about VI(R) is as follows. Theorem A. Let R be a finite ring. Then the category of VI(R)-modules is locally Noetherian. Remark 1.9. In contrast, VI(Z) is not locally Noetherian, and in fact VI(R) is not locally Noetherian whenever R is an infinite ring; see Theorem N below. Remark 1.10. While preparing this article, we learned that Gan and Li [GanLi] have recently independently shown that the category of functors VI(R) → Modk is locally Noetherian when R is a finite field and k is a field of characteristic 0. For our applications, it is important that both R and especially k be more general. A variant: the Artinian conjecture. Define V(R) to be the category whose objects are finite-rank free R-modules and whose morphisms are all splittable linear maps (not necessarily injective). We then have the following. Theorem B (Artinian conjecture). Let R be a finite ring. Then the category of V(R)-modules is locally Noetherian. Theorem B generalizes an old conjecture of Jean Lannes and Lionel Schwartz which asserts that the category of V(Fq )-modules over Fq is locally Noetherian. This is often stated in a dual form and is thus known as the Artinian conjecture. It first appeared in print in [Ku1, Conjecture 3.12] and now has a large literature containing many partial results (mostly focused on the case q = 2, though even there nothing close to the full conjecture was previously known). See, e.g., [Ku2, Po1, Po2, Po3, Dj1, Dj2]. See also [Sch, Chapter 5] for connections to the Steenrod algebra. A proof of this conjecture also appears in [SamSn4], see Remark 2.17. A variant of V(R) is the category V′ (R) whose objects are finite-rank free R-modules and whose morphisms are all linear maps (not just the splittable ones). Of course, V(R) = V′ (R) if R is a field, but they differ in general. For V′ (R), we have the following theorem. Theorem C. Let R be a finite ring. Then the category of V′ (R)-modules is locally Noetherian. Problems with VI. The category VI(R) is not rich enough to allow many natural constructions. For instance, the map V 7→ GL(V ) does not extend to a functor from VI(R) to the category of groups. The problem is that if V is a submodule of W , then there is no canonical way to extend an automorphism of V to an automorphism of W . We overcome this problem by introducing a richer category. 5 The category VIC, take I. Define VIC(R) to be the following category. The objects of VIC(R) are finite-rank free R-modules V . If V, W ∈ VIC(R), then a VIC(R)-morphism from V to W consists of a pair (f, C) as follows. • f : V → W is an R-linear injection. • C ⊂ W is a free R-submodule such that W = f (V ) ⊕ C. If (f, C) : V → W and (g, D) : W → X are two VIC(R)-morphisms, then the composition (g, D) ◦ (f, C) equals (g ◦ f, g(C) ⊕ D). The monoid of VIC(R)-endomorphisms of V ∈ VIC(R) is GL(V ). Observe that in contrast to VI(R), the assignment V 7→ GL(V ) extends to a functor from VIC(R) to the category of groups: if (f, C) : V → W is a morphism, then there is an induced map GL(V ) → GL(W ) which extends automorphisms over C by the identity, and this assignment is functorial. The category VIC(R) was first introduced by Djament [Dj3]. Remark 1.11. We will sometimes use an alternative description of the morphisms in VIC(R) which works whenever all stably free R-modules are free (for instance, when R is a finite commutative ring). Namely, the data (f, C) which defines a morphism V → W is equivalent to a pair of R-linear maps V → W → V whose composition is the identity. Here the first map is f and the second map is the projection W → V away from C. The category VIC, take II (cheap). Let U ⊂ R× be a subgroup of the group of multiplicative units of R and let SLU (V ) = {f ∈ GL(V ) | det(f ) ∈ U}. For our applications, we will need a variant of VIC(R) whose automorphism groups are SLU (V ) rather than GL(V ). The category VIC(R) is equivalent to the full subcategory generated by {Rn | n ≥ 0}. Define VIC(R, U) to be the category whose objects are {Rn | n ≥ 0} and whose morphisms from Rn ′ ′ to Rn are VIC(R)-morphisms (f, C) : Rn → Rn such that det(f ) ∈ U if n = n′ . Thus the U n monoid of VIC(R, U)-endomorphisms of Rn is SLU n (R) := SL (R ). Orientations. For many of our constructions, it will be useful to extend VIC(R, U) to a category whose objects are all finite-rank free R-modules rather than just the Rn . An orientation of a rank n free R-module V is a generator for the rank 1 free R-module ∧n V . The group of units of R acts transitively on the set of orientations on V , and a U-orientation on V consists of an orbit under the action of U. A U-oriented free R-module is a finiterank free R module V equipped with a U-orientation. If W1 and W2 are U-oriented free R-modules, then W1 ⊕ W2 is in a natural way a U-oriented free R-module. A U-oriented free R-submodule of V is an R-submodule V ′ of V which is a free R-module equipped with a U-orientation; if V ′ = V , then the U-orientations on V ′ and V must be the same, and if V ′ $ V then there is no condition on the U-orientation of V ′ . The category VIC, take II (better). The category VIC(R, U) can now be defined as follows (this yields a category equivalent to the previous one). The objects of VIC(R, U) are U-oriented free R-modules V . If V, W ∈ VIC(R, U), then a morphism of VIC(R, U) from V to W consists of a pair (f, C) as follows. • f : V → W is an R-linear injection. • C ⊂ W is a U-oriented free R-submodule such that W = f (V ) ⊕ C. In the second bullet point, f (V ) is equipped with the U-orientation f∗ (ω), where ω is the U-orientation on V , and the direct sum decomposition f (V ) ⊕ C is as U-oriented free Rmodules. Note that when C is nonzero, there is a unique U-orientation on C such that the U-orientations on f (V ) ⊕ C and W are the same, so the morphisms in VIC(R, U) and VIC(R) are only different when dim(V ) = dim(W ). The monoid of VIC(R, U)-endomorphisms of V ∈ VIC(R, U) is SLU (V ). Observe that VIC(R, U) ⊆ VIC(R) with equality when U is the 6 entire group of units. Our main theorem about VIC(R, U) is as follows. For VIC(F) with F a finite field, this theorem was conjectured by Church [Ch2]. Theorem D. Let R be a finite ring and let U ⊂ R be a subgroup of the group of units. Then the category of VIC(R, U)-modules is locally Noetherian. Remark 1.12. Just like for VI(R), it is necessary for R to be finite; see Theorem N. Symplectic forms. We now turn to the symplectic analogue of VI(R)-modules. A symplectic form on a finite-rank free R-module V is a bilinear form ı̂ : V × V → R which is alternating (i.e., ı̂(v, v) = 0 for all v ∈ V ) and which induces an isomorphism from V to its dual V ∗ = HomR (V, R). A symplectic R-module is a finite-rank free R-module equipped with a symplectic form. A symplectic R-submodule of a symplectic R-module V is an R-submodule W such that the symplectic form on V restricts to a symplectic form on W . A symplectic map between symplectic R-modules is an R-linear map that preserves the symplectic form. Observe that symplectic maps must be injective. The category SI. Define SI(R) to be the category whose objects are symplectic R-modules and whose morphisms are symplectic maps. The monoid of SI(R)-endomorphisms of V ∈ SI(R) is Sp(V ), i.e., the group of R-linear isomorphisms of V that preserve the symplectic form. Just like for VIC(R), the map V 7→ Sp(V ) extends to a functor from SI(R) to the category of groups: a symplectic map f : V → W induces a map Sp(V ) → Sp(W ) which extends automorphisms over f (V )⊥ by the identity. We then have the following. Theorem E. Let R be a finite ring. Then the category of SI(R)-modules is locally Noetherian. Remark 1.13. Just like for VI(R), it is necessary for R to be finite; see Theorem N. 1.4 Complemented categories and their asymptotic structure Our next result says that finitely generated modules over the above categories have a simple asymptotic structure (like the one for FI-modules we discussed earlier). To avoid having to give separate proofs for all our categories, we introduce an abstract framework. Complemented categories. A weak complemented category is a monoidal category (A, ⊛) satisfying: • Every morphism in A is a monomorphism. Thus for all morphisms f : V → V ′ , it makes sense to talk about the subobject f (V ) of V ′ . • The identity object 1 of (A, ⊛) is initial. Thus for V, V ′ ∈ A there exist natural morphisms V → V ⊛ V ′ and V ′ → V ⊛ V ′ , namely the compositions ∼ = V − → V ⊛ 1 −→ V ⊛ V ′ and ∼ = V′ − → 1 ⊛ V ′ −→ V ⊛ V ′ . We will call these the canonical morphisms. • For V, V ′ , W ∈ A, the map HomA (V ⊛ V ′ , W ) → HomA (V, W ) × HomA (V ′ , W ) obtained by composing morphisms with the canonical morphisms is an injection. • Every subobject C of an object V has a unique complement, that is, a unique sub∼ = → V where the compositions object D of V such that there is an isomorphism C ⊛ D − ∼ ∼ = = → V of the isomorphism with the canonical → V and D → C ⊛ D − C → C⊛D − morphisms are the inclusion morphisms. • The canonical map Sp ≀ Aut(X) → Aut(X p ) is injective. (Here ≀ denotes wreath product.) 7 A complemented category is a weak complemented category (A, ⊛) whose monoidal structure is symmetric (more precisely, which is equipped with a symmetry). Remark 1.14. Things like complemented categories go back to work of Quillen; see [Gr, p. 3]. After a version of this paper was distributed, Nathalie Wahl (and later with Oscar RandalWilliams) posted her paper [WahRW], which uses an axiomatization similar to complemented categories to prove homological stability results of a more classical flavor than ours. A related axiomatization also appears in work of Djament–Vespa [DjVe1]. Generators for a category. If (A, ⊛) is a monoidal category, then a generator for A is an object X of A such that all objects V of A are isomorphic to X i for some unique i ≥ 0. We will call i the X-rank of V . Example 1.15. The category FI of finite sets and injections is a complemented category whose monoidal structure is the disjoint union. A generator is the set {1}. Example 1.16. The category VIC(R) is a complemented category whose monoidal structure is the direct sum. The subobject attached to a morphism V → V ′ can be interpreted as the pair (W, W ′ ) where W is the image of the linear injection V → V ′ and W ′ is the chosen complement. The complement to this subobject is the pair (W ′ , W ). A generator is R1 . Example 1.17. The category SI(R) is a complemented category whose monoidal structure is the orthogonal direct sum. The complement of a symplectic submodule W of a symplectic R-module (V, ı̂) is W ⊥ = {v ∈ V | ı̂(v, w) = 0 for all w ∈ W }. A generator is R2 equipped with the standard symplectic form. Remark 1.18. The category VI(R) is not a complemented category. However, there is a forgetful functor Ψ : VIC(R) → VI(R). If R is a finite ring and M is a finitely generated VI(R)-module, then the pullback Ψ∗ (M ) is a finitely generated VIC(R)-module (see the proof of Theorem A in §2.4) which can be analyzed using the technology we will discuss below. A similar remark applies to V(R) and V′ (R). Asymptotic structure theorem. The following theorem generalizes the aforementioned asymptotic structure theorem for FI-modules. Theorem F. Let (A, ⊛) be a complemented category with generator X. Assume that the category of A-modules is locally Noetherian, and let M be a finitely generated A-module. Then the following hold. For N ≥ 0, let AN denote the full subcategory of A spanned by elements whose X-ranks are at most N . • (Injective representation stability) If f : V → W is an A-morphism, then the homomorphism Mf : MV → MW is injective when the X-rank of V is sufficiently large. • (Surjective representation stability) If f : V → W is an A-morphism, then the orbit under AutA (W ) of the image of Mf : MV → MW spans MW when the X-rank of V is sufficiently large. • (Central stability) For N ≫ 0, the functor M is the left Kan extension to A of the restriction of M to AN . Remark 1.19. See Theorem 3.7 below for a concrete description of the presentation for M implied by central stability; the proof of Theorem F immediately follows the proof of Theorem 3.7. 8 1.5 Representation stability for congruence subgroups Our next theorems apply the above technology to prove representation-theoretic analogues of homological stability for certain kinds of congruence subgroups. GL over number rings. Let OK be the ring of integers in an algebraic number field K. Charney [Cha1] proved that GLn (OK ) satisfies homological stability. Rationally, these stable values were computed by Borel [Bo]. Let α ⊂ OK be a proper nonzero ideal. The level α congruence subgroup of GLn (OK ), denoted GLn (OK , α), is the kernel of the map GLn (OK ) → GLn (OK /α). It follows from Borel’s work [Bo] that Hk (GLn (OK , α); k) stabilizes when k = Q; however, Lee–Szczarba [LeSz] proved that it does not stabilize integrally, even for k = 1. Few of these homology groups are known, and the existing computations do not seem to fit into any pattern. However, they have an important additional piece of structure: for each n ≥ 1, the conjugation action of GLn (OK ) on GLn (OK , α) descends to an action of SLU n (OK /α) on Hk (GLn (OK , α); k), where U ⊂ OK /α is the image of the group of units of OK . Our goal is to describe how this representation changes as n increases. Congruence subgroups of GL as VIC-modules. As we discussed above, there is a functor from VIC(OK ) to the category of groups that takes V to GL(V ). Similarly, there is a functor GL(OK , α) from VIC(OK ) to the category of groups defined by the formula GL(OK , α)V = ker(GL(V ) → GL(V ⊗OK (OK /α))). Passing to homology, we get a VIC(OK )-module Hk (GL(OK , α); k) with Hk (GL(OK , α); k)V = Hk (GL(OK , α)V ; k) (V ∈ VIC(OK )). Since OK is infinite, the category of VIC(OK )-modules is poorly behaved. However, we will prove in §6.1 that Hk (GL(OK , α); k) actually descends to a VIC(OK /α, U)-module, where U ⊂ OK /α is the image of the group of units of OK . Since OK /α is finite, our theorems apply to VIC(OK /α, U). All that is necessary is to prove that the VIC(OK /α, U)-module Hk (GL(OK , α); k) is finitely generated. Relation to FI-modules. It turns out that the needed finite generation follows from known results. The conjugation action of the set of permutation matrices on GLn (OK , α) turns Hk (GLn (OK , α); k) into a representation of Sn . In [Pu2], the first author proved that if k is a field whose characteristic is sufficiently large, then the Sn -representations Hk (GLn (OK , α); k) satisfy a version of central stability. This was generalized to arbitrary Noetherian rings k by Church–Ellenberg–Farb–Nagpal [ChEFaNag], who actually proved that the groups Hk (GLn (OK , α); k) form a finitely generated FI-module. More precisely, the following defines an embedding of categories Φ : FI → VIC(OK /α, U). • For I ∈ FI, set Φ(I) = (OK /α)I . • For an FI-morphism σ : I ֒→ J, set Φ(σ) = (fσ , Cσ ), where fσ : (OK /α)I → (OK /α)J is defined by fσ (bi ) = bσ(i) for i ∈ I and Cσ = hbj | j ∈ / σ(I)i. Here {bi | i ∈ I} and I {bj | j ∈ J} are the standard bases for (OK /α) and (OK /α)J , respectively. Then [ChEFaNag] proves that the restriction of VIC(OK /α, U) to Φ(FI) ⊂ VIC(OK /α, U) is finitely generated, so the VIC(OK /α, U)-module Hk (GL(OK , α); k) is finitely generated: Theorem G. Let OK be the ring of integers in an algebraic number field K, let α ⊂ OK be a proper nonzero ideal, let U ⊂ OK /α be the image of the group of units of OK , and let k be a Noetherian ring. Then the VIC(OK /α, U)-module Hk (GL(OK , α); k) is finitely generated for all k ≥ 0. 9 We can therefore apply Theorem F to Hk (GL(OK , α); k). The result is an asymptotic structure theorem for Hk (GLn (OK , α); k). This partially verifies a conjecture of Church–Farb [ChFa, Conjecture 8.2.1]. As a simple illustration of our machinery, we will give a direct proof of Theorem G in this paper. Remark 1.20. Church–Ellenberg–Farb–Nagpal’s theorem gives a central stability description of Hk (GLn (OK , α); k) as an FI-module; however, the central stability conclusion from Theorem F gives more information than this since it deals with Hk (GLn (OK , α); k) as a representation of SLU n (OK /α) and not merely as a representation of Sn . Remark 1.21. The other examples that we discuss also form FI-modules, but it seems very hard to prove that they are finitely generated as FI-modules. Remark 1.22. One could also consider congruence subgroups of SLn (R) for other rings R. In fact, the first author’s results in [Pu2] work in this level of generality; however, we have to restrict ourselves to rings of integers so we can cite a theorem of Borel–Serre [BoSe] which asserts that the homology groups in question are all finitely generated k-modules. This is the only property of rings of integers we use, and our methods give a similar result whenever this holds (another example would be R a finite commutative ring). Variant: SL. We can define SLn (OK , α) ⊂ SLn (OK ) in the obvious way. The homology groups Hk (SLn (OK , α); k) are now representations of SLn (OK /α) = SL1n (OK /α). Similarly to GLn (OK , α), we will construct a VIC(OK /α, 1)-module Hk (SL(OK , α); k) with n = Hk (SLn (OK , α); k) Hk (SL(OK , α); k)OK (n ≥ 0) and prove the following variant of Theorem G. Theorem H. Let OK be the ring of integers in an algebraic number field K, let α ⊂ OK be a proper nonzero ideal, and let k be a Noetherian ring. Then the VIC(OK /α, 1)-module Hk (SL(OK , α); k) is finitely generated for all k ≥ 0. Remark 1.23. Just like for Theorem G, this could be deduced from work of Church– Ellenberg–Farb–Nagpal [ChEFaNag], though we will give a proof using our machinery. Automorphism groups of free groups. Our second example of a VIC(R, U)-module comes from the automorphism group Aut(Fn ) of the free group Fn of rank n. Just like for GLn (OK ), work of Hatcher [Hat] and Hatcher–Vogtmann [HatVo1] shows that Aut(Fn ) satisfies homological stability. These stable values were computed by Galatius [Ga], who proved in particular that they rationally vanish. For ℓ ≥ 2, the level ℓ congruence subgroup of Aut(Fn ), denoted Aut(Fn , ℓ), is the kernel of the map Aut(Fn ) → SL±1 n (Z/ℓ) arising from the action of Aut(Fn ) on H1 (Fn ; Z/ℓ). Satoh [Sat] proved that H1 (Aut(Fn , ℓ); Z) does not stabilize. Similarly to SLn (OK , α), few concrete computations are known. Remark 1.24. Unlike for SLn (OK , α) it is not known in general if Hk (Aut(Fn , ℓ); Q) stabilizes, though this does hold for k ≤ 2 (see [DPu]). The conjugation action of Aut(Fn ) on Aut(Fn , ℓ) descends to an action of SL±1 n (Z/ℓ) on Hk (Aut(Fn , ℓ); k). In §6.2, we will construct a VIC(Z/ℓ, ±1)-module Hk (Aut(ℓ); k) with Hk (Aut(ℓ); k)(Z/ℓ)n = Hk (Aut(Fn , ℓ); k) Our main theorem about this module is as follows. 10 (n ≥ 0). Theorem I. Fix some ℓ ≥ 2, and let k be a Noetherian ring. Then the VIC(Z/ℓ, ±1)-module Hk (Aut(ℓ); k) is finitely generated for all k ≥ 0. Applying Theorem F, we get an asymptotic structure theorem for Hk (Aut(Fn , ℓ); k), partially verifying a conjecture of Church–Farb (see the sentence after [ChFa, Conjecture 8.5]). Remark 1.25. The kernel of Aut(Fn ) → GLn (Z) is denoted IAn and its homology forms a module over VIC(Z). It would be interesting to understand this module; however, this seems to be a very difficult problem. Our techniques cannot handle this example because Z is an infinite ring (c.f. Theorem N). Symplectic groups over number rings. Let OK and K and α ⊂ OK be as above. The level α congruence subgroup of Sp2n (OK ), denoted Sp2n (OK , α), is the kernel of the map Sp2n (OK ) → Sp2n (OK /α). The groups Sp2n (OK ) and Sp2n (OK , α) are similar to GLn (OK ) and GLn (OK , α). In particular, the following hold. • Charney [Cha3] proved that Sp2n (OK ) satisfies homological stability. • Borel [Bo] calculated the stable rational homology of Sp2n (OK ). He also proved that Hk (Sp2n (OK , α); k) stabilizes when k = Q. • For general k, an argument similar to the one that Lee–Szczarba [LeSz] used for SLn (OK , α) shows that Hk (Sp2n (OK , α); k) does not stabilize, even for k = 1. • The conjugation action of Sp2n (OK ) on Sp2n (OK , α) induces an action of Sp2n (OK /α) on Hk (Sp2n (OK , α); k). In §6.3, we will construct an SI(OK /α)-module Hk (Sp(OK , α); k) such that Hk (Sp(OK , α); k)(OK /α)2n = Hk (Sp2n (OK , α); k) (n ≥ 0). Our main result concerning this functor is as follows. Theorem J. Let OK be the ring of integers in an algebraic number field K, let α ⊂ OK be a proper nonzero ideal, and let k be a Noetherian ring. Then the SI(OK /α)-module Hk (Sp(OK , α); k) is finitely generated for all k ≥ 0. Applying Theorem F, we obtain an asymptotic structure theorem for Hk (Sp2n (OK , α); k). This partially verifies a conjecture of Church–Farb [ChFa, Conjecture 8.2.2]. The mapping class group. Let Sgb be a compact oriented genus g surface with b boundary components. The mapping class group of Sgb , denoted MCGbg , is the group of homotopy classes of orientation-preserving homeomorphisms of Sgb that restrict to the identity on ∂Sgb . This is one of the basic objects in low–dimensional topology; see [FaMar] for a survey. Harer [Har] proved that the mapping class group satisfies a form of homological stability. If ′ ′ i : Sgb ֒→ Sgb′ is a subsurface inclusion, then there is a map i∗ : MCGbg → MCGbg′ that extends mapping classes by the identity. Harer’s theorem says that for all k ≥ 1, the induced map ′ Hk (MCGbg ; k) → Hk (MCGbg′ ; k) is an isomorphism for g ≫ 0. For k = Q, the stable homology of the mapping class group was calculated by Madsen–Weiss [MadWe]. Congruence subgroups of MCG. Fix some ℓ ≥ 2. The group MCGbg acts on H1 (Sgb ; Z/ℓ). This action preserves the algebraic intersection pairing ı̂(·, ·). If b = 0, then Poincaré duality implies that ı̂(·, ·) is symplectic. If instead b = 1, then gluing a disc to the boundary component does not change H1 (Sgb ; Z/ℓ), so ı̂(·, ·) is still symplectic. For g ≥ 0 and 0 ≤ b ≤ 1, the action of MCGbg on H1 (Sgb ; Z/ℓ) ∼ = (Z/ℓ)2g thus induces a representation MCGbg → Sp2g (Z/ℓ). It is classical [FaMar, §6.3.2] that this is surjective. Its kernel is the level ℓ congruence subgroup Modbg (ℓ) of MCGbg . It is known that Hk (MCGbg (ℓ); k) does not stabilize, even for 11 k = 1 (see [Pu1, Theorem H]). Also, the conjugation action of MCGbg on MCGbg (ℓ) induces an action of Sp2g (Z/ℓ) on Hk (MCGbg (ℓ); k). Remark 1.26. For b > 1, the algebraic intersection pairing is not symplectic, so we do not get a symplectic representation. We will not discuss this case. Stability. We will restrict ourselves to the case where b = 1; the problem with closed surfaces is that they cannot be embedded into larger surfaces, so one cannot “stabilize” them. In §6.5, we will construct an SI(Z/ℓ)-module Hk (MCG(ℓ); k) such that Hk (MCG(ℓ); k)(Z/ℓ)2g = Hk (MCG1g (ℓ); k) (g ≥ 0). Our main theorem concerning this module is as follows. Theorem K. Fix some ℓ ≥ 2, and let k be a Noetherian ring. Then the SI(Z/ℓ)-module Hk (MCG(ℓ); k) is finitely generated for all k ≥ 0. Applying Theorem F, we get an asymptotic structure theorem for Hk (MCG1g (ℓ); k). This partially verifies a conjecture of Church–Farb [ChFa, Conjecture 8.5]. Remark 1.27. The kernel of MCG1g → Sp2g (Z) is the Torelli group, denoted Ig1 , and its homology forms a module over SI(Z). Just like for IAn , we would like to understand this module but cannot do so with our techniques since Z is an infinite ring. 1.6 Twisted homological stability We now discuss twisted homological stability. We wish to thank Aurélien Djament for his help with this section. Motivation: the symmetric group. A classical theorem of Nakaoka [Nak] says that Sn satisfies classical homological stability. Church [Ch2] proved a very general version of this with twisted coefficients. Namely, he proved that if M is a finitely generated FI-module and Mn = M[n] , then for all k ≥ 0 the map Hk (Sn ; Mn ) → Hk (Sn+1 ; Mn+1 ) is an isomorphism for n ≫ 0 (in fact, he obtained linear bounds for when stability occurs). We remark that this applies to much more general coefficient systems than earlier work of Betley [Be]. The key to Church’s theorem is the fact that the category of FI-modules is locally Noetherian. We will abstract Church’s argument to other categories (though our results will be weaker in that we will not give bounds for when stability occurs); the possibility of doing so was one of Church’s motivations for conjecturing Theorem D. General linear group. In [Va], van der Kallen proved that for rings R satisfying a mild condition (for instance, R can be a finite ring), GLn (R) satisfies homological stability. The paper [Va] also shows that this holds for certain twisted coefficient systems (those satisfying a “polynomial” condition introduced by Dwyer [Dw]; see [WahRW] for a general framework for arguments like Dwyer’s using the language of functor categories). The arguments in [Va] also work for SLU n (R) for subgroups U ⊂ R of the group of units. We will prove the following generalization of van der Kallen’s result (at least for finite commutative rings). If M is a VIC(R, U)-module, then denote by Mn the value MRn . Theorem L. Let R be a finite ring, let U ⊂ R be a subgroup of the group of units, and let M be a finitely generated VIC(R, U)-module over a Noetherian ring. Then for all k ≥ 0, the U map Hk (SLU n (R); Mn ) → Hk (SLn+1 (R); Mn+1 ) is an isomorphism for n ≫ 0. 12 Remark 1.28. This is more general than van der Kallen’s result: if k is a field, then his hypotheses on the coefficient systems Mn imply that dimk (Mn ) grows like a polynomial in n, which need not hold for finitely generated VIC(R, U)-modules. For instance, one can define a finitely generated VIC(R, U)-module whose dimensions grow exponentially via Mn = k[HomVIC(R,U) (R1 , Rn )]. The symplectic group. Building on work of Charney [Cha3], Mirzaii–van der Kallen [MirVa] proved that for many rings R (including all finite rings), the groups Sp2n (R) satisfy homological stability. In fact, though Mirzaii–van der Kallen do not explicitly say this, Charney’s paper shows that the results of [MirVa] also apply to twisted coefficients satisfying an appropriate analogue of Dwyer’s polynomial condition. We will prove the following generalization of this. If M is an SI(R)-module, then denote by Mn the value MR2n . Theorem M. Let R be a finite ring and let M be a finitely generated SI(R)-module over a Noetherian ring. Then for all k ≥ 0, the map Hk (Sp2n (R); Mn ) → Hk (Sp2n+2 (R); Mn+1 ) is an isomorphism for n ≫ 0. Remark 1.29. Examples similar to the one we gave after Theorem L show that this is more general than Mirzaii–van der Kallen’s result. 1.7 Comments and future directions We now discuss some related results and open questions. Remark 1.30 (Homological stability). The examples in Theorems G, H, I, J, K can be interpreted when ℓ = 1 or when α is the unit ideal. In this case, we interpret the categories VIC(0) = SI(0) as follows: there is one object for each nonnegative integer n ≥ 0 and there is a unique morphism n → n′ whenever n′ ≥ n. Then representation stability of the relevant homology groups is the usual homological stability statements: for example, for each i ≥ 0, and n ≫ 0 the map Hi (SLn (Z); k) → Hi (SLn+1 (Z); k) is an isomorphism. Infinite rings. We have repeatedly emphasized that it is necessary for our rings R to be finite. Our final theorem explains why this is necessary. Theorem N. Let R be an infinite ring. For C ∈ {VI(R), VIC(R), SI(R)}, the category of C-modules is not locally Noetherian. This naturally leads to the question of how to develop representation stability results for categories such as VIC(R), etc. when R is an infinite ring. Bounds. Our asymptotic structure theorem does not provide bounds for when it begins. This is an unavoidable artifact of our proof, which make essential use of local Noetherianity. The results of the first author in [Pu2] concerning central stability for the homology groups of congruence subgroups (as representations of Sn ) are different and do give explicit bounds. It would be interesting to prove versions of our theorems with explicit bounds. Orthogonal and unitary categories. It is also possible to include orthogonal versions of our categories, i.e., finite rank free R-modules equipped with a nondegenerate orthogonal form. This is a richer category than the previous ones because the rank of an orthogonal module no longer determines its isomorphism type. While many of the ideas and constructions of this paper should be relevant, it will be necessary to generalize them further to include the 13 example of categories of orthogonal modules. Similarly, one can consider unitary versions. We have omitted discussion of these variations for reasons of space. Twisted commutative algebras. The category of FI-modules fits into the more general framework of modules over twisted commutative algebras (these are commutative algebras in the category of functors from the groupoid of finite sets) and this perspective is used in [SamSn1, SamSn2, SamSn3] to develop the basic properties of these categories. Similarly, the categories in this paper fit into a more general framework of modules over algebras which generalize twisted commutative algebras where the groupoid of finite sets is replaced by another groupoid (see Remark 3.5). When k is a field of characteristic 0, twisted commutative algebras have alternative concrete descriptions in terms of GL∞ (k)-equivariant commutative algebras (in the usual sense) thanks to Schur–Weyl duality. For the other cases in our paper, no such alternative description seems to be available, so it would be interesting to understand these more exotic algebraic structures. 1.8 Outline and strategy of proof We now give an outline of the paper and comment on our proofs. Let C be one of the categories we discussed above, i.e., VI(R), V(R), V′ (R), VIC(R, U), or SI(R). The first step is to establish that the category of C-modules is locally Noetherian, i.e., that the finite generation property is inherited by submodules. This is done in §2, where we prove Theorems A, B, C, D, E, and N. We then prove our asymptotic structure result (Theorem F) in §3. The brief §4 shows how to use our locally Noetherian results to prove our twisted homological stability theorems (Theorems L and M). We then give, in §5, a framework (adapted from the standard proof of homological stability due to Quillen) for proving that C-modules arising from congruence subgroups are finitely generated. Finally, §6 applies the above framework to prove our results that assert that modules arising from the homology groups of various congruence subgroups are finitely generated, namely Theorems G, H, I, J, and K. Acknowledgments. We wish to thank Tom Church, Yves Cornulier, Aurélien Djament, Jordan Ellenberg, Nicholas Kuhn, Amritanshu Prasad, Andrew Snowden, and Nathalie Wahl for helpful conversations and correspondence. We also thank some anonymous referees for their careful reading of the paper and numerous suggestions and improvements. 2 Noetherian results The goal of this section is to prove Theorems A, B, C, D, E, and N, which assert that modules over the various categories discussed in the introduction are locally Noetherian. We begin in §2.1 with some preliminary results. Next, in §2.2 we introduce the category OVIC(R) and in §2.3 we prove that the category of OVIC(R)-modules is locally Noetherian. We will use this in §2.4 to prove Theorems A, B, C, and D. These cover all of our categories except SI(R), which we deal with in §2.5. We close in §2.6 by proving Theorem N, which asserts that our categories are not locally Noetherian when R is an infinite ring. Since it presents no additional difficulties, in this section we allow k to be an arbitrary ring (unital, but not necessarily commutative). By a k-module, we mean a left k-module, and Noetherian means left Noetherian. However, we emphasize that R will always be a (unital) commutative ring. Also, in this section we will denote the effects of functors by parentheses rather than subscripts, so for instance if M : C → D is a functor and x ∈ C, then we will write M (x) ∈ D for the image of x under M . 14 2.1 Preliminary results We first discuss some preliminary results. Let k be a fixed Noetherian ring. Functor categories. Let C be a category. A C-module (over k) is a functor C → Modk where Modk is the category of left k-modules. A morphism of C-modules is a natural transformation. For x ∈ C, let PC,x denote the representable C-module generated at x, i.e., PC,x (y) = k[HomC (x, y)]. If M is a C-module, then a morphism PC,x → M is equivalent to a choice of element in M (x). The category of C-modules is an Abelian category, with kernels, cokernels, exact sequences, etc. calculated pointwise. A C-module is finitely generated if it is a quotient of a finite direct sum of PC,x (allowing different choices of x). This agrees with the definition given in the introduction. Lemma 2.1. Let C be a category. The category of C-modules is locally Noetherian if and only if for all x ∈ C, every submodule of PC,x is finitely generated. Proof. Immediate since Noetherianity is preserved by quotients and finite direct sums. Functors between functor categories. Let Φ : C → D a functor. Given a D-module M : D → Modk , we get a C-module Φ∗ (M ) = M ◦ Φ. Note that Φ∗ is an exact functor from D-modules to C-modules. We say that Φ is finite if Φ∗ (PD,y ) is finitely generated for all y ∈ D. Recall that Φ is essentially surjective if every object of D is isomorphic to an object of the form Φ(x) for x ∈ C. Lemma 2.2. Let Φ : C → D be an essentially surjective and finite functor. Assume that the category of C-modules is locally Noetherian. Then the category of D-modules is locally Noetherian. Proof. Pick y ∈ D and let M1 ⊆ M2 ⊆ · · · be a chain of submodules of PD,y . By Lemma 2.1, it is enough to show that the Mn stabilize. Since Φ∗ is exact, we get a chain of submodules Φ∗ (M1 ) ⊆ Φ∗ (M2 ) ⊆ · · · of Φ∗ (PD,y ). Since Φ is finite, Φ∗ (PD,y ) is finitely generated, so since C is locally Noetherian there is some N such that Φ∗ (Mn ) = Φ∗ (Mn+1 ) for n ≥ N . Since Φ is essentially surjective, it preserves strict inclusions of submodules: if Mn $ Mn+1 , then there is some z ∈ D such that Mn (z) $ Mn+1 (z) and we can find x ∈ C such that Φ(x) ∼ = z, which ∗ ∗ means that Φ (Mn )(x) $ Φ (Mn+1 )(x). Thus Mn = Mn+1 for n ≥ N , as desired. Remark 2.3. In all of our applications of Lemma 2.2 in this paper, essential surjectivity will be obvious, as the objects of our categories are indexed by natural numbers. Well partial orderings. A poset P is well partially ordered if for any sequence x1 , x2 , . . . in P, there exists i < j such that xi ≤ xj . See [Kr] for a survey. The direct product P1 × P2 of posets is in a natural way a poset with (x, y) ≤ (x′ , y ′ ) if and only if x ≤ x′ and y ≤ y ′ . The following lemma is well-known, see for example [SamSn4, §2] for a proof. Lemma 2.4. (a) A subposet of a well partially ordered poset is well partially ordered. (b) If P is well partially ordered and x1 , x2 , . . . is a sequence, then there is an infinite increasing sequence i1 < i2 < · · · such that xi1 ≤ xi2 ≤ · · · . (c) A finite direct product of well partially ordered posets is well partially ordered. Posets of words. Let Σ be a finite set. Let Σ⋆ be the set of words s1 · · · sn whose letters come from Σ. Define a poset structure on Σ⋆ by saying that s1 · · · sn ≤ s′1 · · · s′m if there is an increasing function f : [n] → [m] such that si = s′f (i) for all i. The following is a special case of Higman’s lemma. 15 Lemma 2.5 (Higman, [Hi]). Σ⋆ is a well partially ordered poset. e ⋆ whose We will also need a variant of Higman’s lemma. Define a partially ordered set Σ ′ ⋆ ′ objects are the same as Σ by saying that s1 · · · sn ≤ s1 · · · sm if there is an increasing function f : [n] → [m] such that s′f (i) = si for i = 1, . . . , n and for each j = 1, . . . , m, there exists i such that f (i) ≤ j and s′j = s′f (i) . e ⋆ is a well partially ordered poset. Lemma 2.6. Σ See [SamSn4, Prop. 8.2.1]; a different proof of this is in [DrKu, Proof of Prop. 7.5]. 2.2 The category OVIC Fix a finite commutative ring R. Motivation. Let U ⊂ R× be a subgroup of the group of multiplicative units. For the purpose of proving that the category of VIC(R, U)-modules is locally Noetherian, we will use the “cheap” definition of VIC(R, U) from the introduction and use the alternate description of its morphisms from Remark 1.11. Thus VIC(R, U) is the category whose objects are {Rn | n ≥ 0} ′ ′ ′ and whose morphisms from Rn to Rn are pairs (f, f ′ ), where f : Rn → Rn and f ′ : Rn → Rn satisfy f ′ f = 1Rn and det(f ) ∈ U if n = n′ . We will introduce yet another category OVIC(R) that satisfies OVIC(R) ⊂ VIC(R, U) (the “O” stands for “Ordered”; see Lemma 2.13 below). We emphasize that OVIC(R) does not depend on U. The objects of OVIC(R) are {Rn | n ≥ 0}, and the OVIC(R)-morphisms from Rn ′ to Rn are VIC(R, U)-morphisms (f, f ′ ) such that f ′ is what we will call a column-adapted map (see below for the definition). The key property of OVIC(R) is that every VIC(R)-morphism ′ (f, f ′ ) : Rn → Rn (notice that we are using VIC(R) and not VIC(R, U)) can be uniquely ′ factored as (f, f ′ ) = (f1 , f1′ )(f2 , f2′ ), where (f1 , f1′ ) : Rn → Rn is an OVIC(R)-morphism and ′ ′ (f2 , f2′ ) : Rn → Rn is an isomorphism; see Lemma 2.11 below. This implies in particular that the category OVIC(R) has no non-identity automorphisms. We will prove that the category of OVIC(R)-modules is locally Noetherian and that the inclusion functor OVIC(R) ֒→ VIC(R, U) is finite. The key point here is the above factorization and the fact that AutVIC(R) (Rn ) is finite. By Lemma 2.2, this will imply that the category of VIC(R, U)-modules is locally Noetherian. Column-adapted maps, local case. In this paragraph, assume that R is a commutative local ring. Recall that the set of non-invertible elements of R forms the unique maximal ideal ′ of R. An R-linear map f : Rn → Rn is column-adapted if there is a subset S = {s1 < · · · < sn } ⊆ {1, . . . , n′ } with the following two properties. Regard f as an n × n′ matrix and let b1 , . . . , bn be the standard basis for Rn . • For 1 ≤ i ≤ n, the sth i column of f is bi . • For 1 ≤ i ≤ n and 1 ≤ j < si , the entry in position (i, j) of f is non-invertible. The set S is unique and will be written Sc (f ). Example 2.7. An example of a column-adapted map f : R6 → R3 is the linear map represented by the matrix   ⋆ 1 0 ∗ 0 ∗   ⋆ 0 1 ∗ 0 ∗  . ⋆ 0 0 ⋆ 1 ∗ Here ∗ can be any element of R, while ⋆ can be any non-invertible element of R. The following observation might clarify the nature of column-adapted maps. It follows immediately from our definitions. 16 Observation 2.8. All column-adapted maps are surjective, and the only column-adapted map f : Rn → Rn is the identity. Column-adapted maps, general case. Now assume that R is an arbitrary finite commutative ring. This implies that R is Artinian, so there exists an isomorphism R ∼ = R1 × · · · × Rq where the Ri are finite commutative local rings [AtMac, Theorem 8.7]. For the remainder of this section, we fix one such isomorphism. Observe that ′ ′ ′ HomR (Rn , Rn ) = HomR1 (R1n , R1n ) × · · · × HomRq (Rqn , Rqn ), ′ ′ so given f ∈ HomR (Rn , Rn ) we can write f = (f1 , . . . , fq ) with fi ∈ HomRi (Rin , Rin ). We will say that f is column-adapted if each fi is column-adapted. Lemma 2.9. Let R be a finite commutative ring and let f : Ra → Rb and g : Rb → Rc be column-adapted maps. Then gf : Ra → Rc is column-adapted. Proof. It is enough to deal with the case where R is a local ring. Write Sc (f ) = {s1 < · · · < sb } and Sc (g) = {t1 < · · · < tc }. For 1 ≤ i ≤ c, let ui = sti . We claim that gf is a columnadapted map with Sc (gf ) = {u1 < · · · < uc }. The first condition is clear, so we must verify the second condition. Consider 1 ≤ i ≤ n and 1 ≤ j < ui . We then have (gf )ij = gi1 f1j + gi2 f2j + · · · + gib fbj . By definition, gik is non-invertible for 1 ≤ k < ti . Also, for ti ≤ k ≤ b the element fkj is non-invertible since j < ui = sti ≤ sk . It follows that all the terms in our expression for (gf )ij are non-invertible, so since the non-invertible elements of R form an ideal we conclude that (gf )ij is non-invertible, as desired. ′ Lemma 2.10. Let R be a finite commutative ring and let f : Rn → Rn be a surjection. ′ Then we can uniquely factor f as f = f2 f1 , where f1 : Rn → Rn is column-adapted and f2 : Rn → Rn is an isomorphism. Proof. It is enough to deal with the case where R is a local ring. Since Rn is projective, ′ we can find g : Rn → Rn such that f g = 1Rn . We can view f and g as matrices, and the Cauchy–Binet formula says that 1 = det(f g) = X det(f[n],I ) det(gI,[n] ) I where I ranges over all n-element subsets of [n′ ] = {1, . . . , n′ } and fI,J means the minor of f with rows I and columns J. Since R is local, the non-units form an ideal, so there exists at least one I such that det(f[n],I ) is a unit. Let I be the lexicographically minimal subset such that this holds. There is a unique h ∈ GL(Rn ) with (hf )[n],I = 1Rn . This implies that hf is column-adapted with Sc (hf ) = I, and the desired factorization is f1 = hf , f2 = h−1 . The category OVIC. Continue to let R be a general finite commutative ring. Define ′ OVIC(R) to be the category whose objects are {Rn | n ≥ 0} and where HomOVIC(R) (Rn , Rn ) consists of pairs (f, f ′ ) as follows. ′ ′ • f ∈ HomR (Rn , Rn ) and f ′ ∈ HomR (Rn , Rn ). • f ′ f = 1Rn , so f is an injection and f ′ is a surjection. • f ′ is column-adapted. 17 ′′ ′ ′ For (f, f ′ ) ∈ HomOVIC(R) (Rn , Rn ) and (g, g′ ) ∈ HomOVIC(R) (Rn , Rn ), we define (g, g′ )(f, f ′ ) ′′ to be (gf, f ′ g′ ) ∈ HomOVIC(R) (Rn , Rn ). Lemma 2.9 implies that this makes sense. The key property of OVIC(R) is as follows. ′ Lemma 2.11. Let R be a finite commutative ring and let (f, f ′ ) ∈ HomVIC(R) (Rn , Rn ). Then we can uniquely write (f, f ′ ) = (f1 , f1′ )(f2 , f2′ ), where (f2 , f2′ ) ∈ AutVIC(R) (Rn ) and ′ (f1 , f1′ ) ∈ HomOVIC(R) (Rn , Rn ). Proof. Letting f ′ = f2′ f1′ be the factorization from Lemma 2.10, the desired factorization is ′ (f, f ′ ) = (f f2′ , f1′ )((f2′ )−1 , f2′ ). To see that this first factor is in HomOVIC(R) (Rn , Rn ), observe that f1′ f f2′ = (f2′ )−1 f ′ f f2′ = (f2′ )−1 f2′ = 1Rn . Free and dependent rows. Assume that R is local. The condition f ′ f = 1Rn in the definition of an OVIC(R)-morphism implies that the rows of f indexed by Sc (f ′ ) are determined by the other rows, which can be chosen freely. So we will call the rows of f indexed by Sc (f ′ ) the dependent rows and the other rows the free rows. Example 2.12. Assume that R is a local ring, that f ′ : R6 → R3 is a column-adapted map with Sc (f ′ ) = {2, 3, 5}, and that f : R3 → R6 satisfies f ′ f = 1R3 . The possible matrices representing f ′ and f are of the form   ⋆ 1 0 ∗ 0 ∗   f ′ = ⋆ 0 1 ∗ 0 ∗  ⋆ 0 0 ⋆ 1 ∗  ∗ ⋄  ⋄  and f =  ∗  ⋄ ∗ ∗ ⋄ ⋄ ∗ ⋄ ∗  ∗ ⋄  ⋄  . ∗  ⋄ ∗ Here ∗ can be any element of R, while ⋆ can be any non-invertible element of R and each ⋄ is completely determined by the choices of ∗ and ⋆ plus the fact that f ′ f = 1R3 . 2.3 The category of OVIC-modules is locally Noetherian The main result of this section is Theorem 2.14 below, which says that the category of OVIC(R)-modules is locally Noetherian when R is a finite commutative ring. A partial order. We first need the existence of a certain partial ordering. For d ≥ 0, define PR (d) = ∞ G HomOVIC(R) (Rd , Rn ). n=0 To apply the results of Sam–Snowden in [SamSn4], we would need to find a total ordering of the set PR (d) which is invariant under left composition. However, constructing such an ordering seems difficult. Our solution is to construct a total ordering which is invariant under left composition with “enough” morphisms to make an argument in the style of [SamSn4] go through (see Remark 2.16 for some discussion of this). The following lemma gives this ordering and is the key to the proof of Theorem 2.14, which asserts that the category of OVIC(R)-modules is locally Noetherian when R is a finite commutative ring. Lemma 2.13. Let R be a finite commutative ring, and fix d ≥ 0. There exists a well partial ordering  on PR (d) together with an extension ≤ of  to a total ordering such that the ′ following holds. Consider (f, f ′ ) ∈ HomOVIC(R) (Rd , Rn ) and (g, g′ ) ∈ HomOVIC(R) (Rd , Rn ) ′ with (f, f ′ )  (g, g′ ). Then there is some (φ, φ′ ) ∈ HomOVIC(R) (Rn , Rn ) with the following two properties. 18 1. We have (g, g′ ) = (φ, φ′ )(f, f ′ ). ′′ 2. If (f1 , f1′ ) ∈ HomOVIC(R) (Rd , Rn ) satisfies (f1 , f1′ ) < (f, f ′ ), then (φ, φ′ )(f1 , f1′ ) < (g, g′ ). Since the proof of Lemma 2.13 is lengthy, we postpone it until the end of this section and instead show how it can be used to prove local Noetherianity. Noetherianity. We now come to our main result. Theorem 2.14. Let R be a finite commutative ring. Then the category of OVIC(R)-modules is locally Noetherian. Proof. Fix a Noetherian ring k. For d ≥ 0, define Pd to be the OVIC(R)-module POVIC(R),Rd , where the notation is as in §2.1, so Pd (Rn ) = k[HomOVIC(R) (Rd , Rn )]. By Lemma 2.1, it is enough to show that every submodule of Pd is finitely generated. Let  and ≤ be the orderings on PR (d) given by Lemma 2.13. For an element (f, f ′ ) ∈ HomOVIC(R) (Rd , Rn ), denote by ef,f ′ the associated basis element of Pd (Rn ). Given nonzero x ∈ Pd (Rn ), define its initial term init(x) as follows. First, set init(0) = 0. For x 6= 0, write P x = αf,f ′ ef,f ′ with αf,f ′ ∈ k, and let (f0 , f0′ ) be the ≤-largest element such that αf0 ,f0′ 6= 0. We then define init(x) = αf0 ,f0′ ef0 ,f0′ . Next, given a submodule M ⊂ Pd , define its initial module init(M ) to be the function that takes n ≥ 0 to the k-module k{init(x) | x ∈ M (Rn )}. Warning: init(M ) need not be an OVIC(R)-submodule of Pd , see Remark 2.16. Claim. If N, M ⊂ Pd are submodules with N ⊂ M and init(N ) = init(M ), then N = M . Proof of Claim. Assume that M 6= N . Let n ≥ 0 be such that M (Rn ) 6= N (Rn ). Pick y ∈ M (Rn ) \ N (Rn ) such that init(y) = αet where t is ≤-minimal. By assumption, there exists z ∈ N (Rn ) with init(z) = init(y). But then y−z ∈ M (Rn )\N (Rn ) and init(y−z) = βet′ where t′ < t, a contradiction. We now turn to the proof that every submodule of Pd is finitely generated. Assume otherwise, so there is a strictly increasing sequence M0 $ M1 $ · · · of submodules. By the claim, we must have init(Mi ) 6= init(Mi−1 ) for all i ≥ 1, so we can find some ni ≥ 0 and some / init(Mi−1 )(Rni ). Since  is a well partial ordering, λi efi ,fi′ ∈ init(Mi )(Rni ) with λi efi ,fi′ ∈ we can apply Lemma 2.4(b) and find i0 < i1 < · · · such that (fi0 , fi′0 )  (fi1 , fi′1 )  (fi2 , fi′2 )  · · · Since k is Noetherian, there exists some m ≥ 0 such that λim+1 is in the left k-ideal generated P by λi0 , . . . , λim , i.e., we can write λim+1 = m j=0 cj λij with cj ∈ k. Consider some 0 ≤ nij j ≤ m. Let xj ∈ Mij (R ) be such that init(xj ) = λij efij ,fi′ . By Lemma 2.13, there j exists some (φj , φ′j ) ∈ HomOVIC(R) (Rnij , Rnim+1 ) such that (fim+1 , fi′m+1 ) = (φj , φ′j )(fij , fi′j ). P nim+1 ′ ), Lemma 2.13 implies that Setting y = m j=0 cj (φj , φj )xj , an element of Mim+1 −1 (R , a contradiction. init(y) = λim+1 efim+1 ,fi′ m+1 Insertion maps. For the proof of Lemma 2.13, we will need the following lemma. Lemma 2.15. Let R be a commutative local ring. Fix some 1 ≤ k ≤ ℓ ≤ n and some S = {s1 < s2 < · · · < sd } ⊂ {1, . . . , n}. Set ℓb = max({i | si < ℓ} ∪ {0}). Let v = (v1 , . . . , vd ) ∈ Rd b Define be such that vi is non-invertible for all i > ℓ. T = {s1 < · · · < sbℓ < sbℓ + 1 < · · · < sd + 1} ⊂ {1, . . . , n + 1}. There exists (φ, φ′ ) ∈ HomOVIC(R) (Rn , Rn+1 ) with the following properties. 19 • Consider (f, f ′ ) ∈ HomOVIC(R) (Rd , Rn ) with Sc (f ′ ) = S. – The matrix f ′ φ′ is obtained from f ′ by inserting the column vector v between the (ℓ − 1)st and ℓth columns. Observe that Sc (f ′ φ′ ) = T . – Let w ∈ Rd be the kth row of f . Then φf is obtained from f by inserting w between the (ℓ − 1)st and ℓth rows (observe that this new row is a free row!) and then modifying the dependent rows so that (φf, f ′ φ′ ) ∈ HomOVIC(R) (Rd , Rn+1 ). More th precisely, the sbth i row of φf is the si row of f minus vi w. ′ d n • Consider (g, g ) ∈ HomOVIC(R) (R , R ) with Sc (g′ ) < S in the lexicographic order. Then Sc (g′ φ′ ) < T in the lexicographic order. Proof. Define vb ∈ Rn to be the column vector with vi in position si for 1 ≤ i ≤ d and zeros elsewhere. Next, define φ′ : Rn+1 → Rn to be the matrix obtained from the n × n identity matrix IdRn by inserting vb between the (ℓ − 1)st and ℓth columns. The condition on the vi ensures that φ′ is a column-adapted map. The possible choices of φ : Rn → Rn+1 such that (φ, φ′ ) ∈ HomOVIC(R) (Rn , Rn+1 ) have a single free row, namely the ℓth . Let that row have a 1 in position k and zeros elsewhere. The other dependent rows are determined by this. For a formula for this matrix, letting e be the kth standard basis row vector, the matrix φ is the result of inserting e between the ℓth and (ℓ + 1)st rows of IdRn − vbe. We have thus constructed an element (φ, φ′ ) ∈ HomOVIC(R) (Rn , Rn+1 ); that it satisfies the conclusions of the lemma is an easy calculation. Constructing the orders, local case. We now prove Lemma 2.13 in the special case where R is a local ring. Proof of Lemma 2.13, local case. Let R be a finite commutative local ring. The first step ′ is to construct . Consider (f, f ′ ) ∈ HomOVIC(R) (Rd , Rn ) and (g, g′ ) ∈ HomOVIC(R) (Rd , Rn ). We will say that (f, f ′ )  (g, g′ ) if there exists a sequence (f, f ′ ) = (f0 , f0′ ), (f1 , f1′ ), . . . , (fn′ −n , fn′ ′ −n ) = (g, g′ ) with the following properties: • For 0 ≤ i ≤ n′ − n, we have (fi , fi′ ) ∈ HomOVIC(R) (Rd , Rn+i ). ′ ) is obtained from (f , f ′ ) as follows. Choose • For 0 ≤ i < n′ −n, the morphism (fi+1 , fi+1 i i ′ some 1 ≤ k ≤ ℓ ≤ n + i such that k ∈ / Sc (fi′ ). Then fi+1 is obtained from fi′ by inserting a copy of the kth column of fi′ between the (ℓ − 1)st and ℓth columns of fi′ . Also, fi+1 is obtained from fi′ by first inserting a copy of the kth row of fi (observe that this is a free row!) between the (ℓ − 1)st and ℓth rows of fi (this new row is also a free row!) and then d n+i+1 ). ′ ) ∈ Hom modifying the dependent rows to ensure that (fi+1 , fi+1 OVIC(R) (R , R This clearly defines a partial order on PR (d). Claim. The partially ordered set (PR (d), ) is well partially ordered. Proof of Claim. Define     Σ = Rd ∐ {♣} × Rd ∐ {♠} , where ♣ and ♠ are formal symbols. We will prove that (PR (d), ) is isomorphic to a subposet e ⋆ from Lemma 2.6, so by Lemma 2.4(a) is itself well of the well partially ordered poset Σ ′ partially ordered. Consider (f, f ) ∈ HomOVIC(R) (Rd , Rn ). For 1 ≤ i ≤ n, let (ri , ci ) ∈ Σ be as follows. • If i ∈ Sc (f ′ ), then (ri , ci ) = (♣, ♠). Observe that in this case the ith row of f is a dependent row. 20 • If i ∈ / Sc (f ′ ), then ri is the ith row of f and ci is the ith column of f ′ . Observe that in this case the ith row of f is a free row. e ⋆ . We claim that the map taking the pair (f, f ′ ) We get an element (r1 , c1 ) · · · (rn , cn ) ∈ Σ e ⋆ . To see this, consider an element to (r1 , c1 ) · · · (rn , cn ) is an injection from PR (d) to Σ ⋆ e (r1 , c1 ) · · · (rn , cn ) ∈ Σ in its image. Our goal is to reconstruct (f, f ′ ). First, we can read off all the free rows of f . Second, if the ith row of f is free, then we can also read off the ith column of f ′ . The other columns of f ′ are determined by the fact that they are precisely the standard basis vectors in Rd , appearing in their natural order. But now that we have all of f ′ and the free rows of f , the dependent rows of f are determined since f ′ f = 1Rd . The claim follows. That this injection is order-preserving is immediate from the definitions. The only subtle point is the reason we required that k ∈ / Sc (fi′ ) in the second case of the definition of the ordering on PR (d). This is needed to ensure that no dependent rows of f are copied when producing a larger element. We now extend  to a total order ≤. Fix some arbitrary total order on Rd , and con′ sider (f, f ′ ) ∈ HomOVIC(R) (Rd , Rn ) and (g, g′ ) ∈ HomOVIC(R) (Rd , Rn ). We then determine if (f, f ′ ) ≤ (g, g′ ) via the following procedure. • If n < n′ , then (f, f ′ ) < (g, g′ ). • Otherwise, n = n′ . If Sc (f ′ ) < Sc (g′ ) in lexicographic ordering, set (f, f ′ ) < (g, g′ ). • Otherwise, Sc (f ′ ) = Sc (g′ ). If f ′ 6= g′ , then compare the sequences of elements of Rd which form the columns of f ′ and g′ using the lexicographic ordering and the fixed total ordering on Rd . • Finally, if f ′ = g′ , then compare the sequences of elements of Rd which form the free rows of f and g using the lexicographic ordering and the fixed total ordering on Rd . It is clear that this determines a total order ≤ on PR (d) that extends . It remains to check that these orders have the property claimed by the lemma. Consider ′ (f, f ′ ) ∈ HomOVIC(R) (Rd , Rn ) and (g, g′ ) ∈ HomOVIC(R) (Rd , Rn ) with (f, f ′ )  (g, g′ ). By ′ repeated applications of Lemma 2.15, there exists (φ, φ′ ) ∈ HomOVIC(R) (Rn , Rn ) such that (g, g′ ) = (φ, φ′ )(f, f ′ ). Now pick (f1 , f1′ ) ∈ HomOVIC(R) (Rd , Rn ) such that (f1 , f1′ ) < (f, f ′ ). We want to show that (φ, φ′ )(f1 , f1′ ) < (φ, φ′ )(f, f ′ ). If Sc (f1′ ) < Sc (f ′ ) in the lexicographic order, then this is an immediate consequence of Lemma 2.15, so we can assume that Sc (f1′ ) = Sc (f ′ ). In this case, it follows from Lemma 2.15 that f1′ φ′ and f ′ φ′ are obtained by inserting the same columns into f1′ and f ′ , respectively. If f1′ 6= f ′ , then it follows immediately that (φ, φ′ )(f1 , f1′ ) < (φ, φ′ )(f, f ′ ). Otherwise, it follows from Lemma 2.15 that φf1 and φf are obtained by duplicating the same rows in f1 and f , respectively, and it follows that (φ, φ′ )(f1 , f1′ ) < (φ, φ′ )(f, f ′ ), as desired. Remark 2.16. The total ordering that we define for the proof of Lemma 2.13 need not be compatible with all compositions in the sense that f ′ < f implies that gf ′ < gf for all g. This assumption is in place in [SamSn4] which is why we cannot use the machinery from that paper. To see this, consider the example R = Z/16 and define f= ! 0 , 1    f1′ = 2 1 ,  0 0   g = 1 0  , 0 1 g1′ = ! 2 1 0 , 0 0 1 21   f2′ = 6 1 , g2′ = ! 6 1 0 . 0 0 1 Then (f, fi′ ) ∈ HomOVIC(R) (R1 , R2 ) and (g, gi′ ) ∈ HomOVIC(R) (R2 , R3 ) for i = 1, 2. Also,     g1′ f1′ = 4 2 1 , g1′ f2′ = 12 6 1 , g2′ f1′ = 12 2 1 , g2′ f2′ = 4 6 1 .     Using our ordering, we need to fix a total ordering on Z/16. If we choose 2 < 6, then we would have f1′ < f2′ . This forces 4 < 12 by considering g1′ f1′ < g1′ f2′ , but it also forces 12 < 4 by considering g2′ f1′ < g2′ f2′ . Hence our ordering is not compatible with all compositions. In particular, we cannot guarantee that init(M ) is an OVIC(R)-submodule of Pd . It is possible that there exist total orderings that are compatible with all compositions. Constructing the orders, general case. We finally come to the general case. Proof of Lemma 2.13, general case. Let R be an arbitrary finite commutative ring. As we mentioned above, R is Artinian, so we can write R ∼ = R1 × · · · × Rq with Ri a finite local ring [AtMac, Theorem 8.7]. Indeed, we have fixed one such isomorphism. For all n, n′ ≥ 0, we then have ′ ′ ′ HomR (Rn , Rn ) = HomR1 (R1n , R1n ) × · · · × HomRq (Rqn , Rqn ). The set PR (d) can thus be identified with the set of tuples ((f1 , f1′ ), . . . , (fq , fq′ )) ∈ PR1 (d) × · · · × PRq (d) such that there exists some single n ≥ 0 with (fi , fi′ ) ∈ HomOVIC(Ri ) (Rid , Rin ) for all 1 ≤ i ≤ q. Above we constructed the desired orders  and ≤ on each PRi (d). Define a partial order  on their product using the product partial order and define a total order ≤ on their product using the lexicographic order. This restricts to orders  and ≤ on PR (d). Lemma 2.4 implies that  is well partially ordered, and the remaining conclusions are immediate. 2.4 The categories of VI-, V-, V′ -, and VIC-modules are locally Noetherian We now prove several of our main theorems. Proof of Theorem D. We wish to prove that the category of VIC(R, U)-modules is locally Noetherian. By the discussion at the beginning of §2.2 (and Theorem 2.14), it is enough to show that the inclusion functor Φ : OVIC(R) → VIC(R, U) is finite. Fix d ≥ 0 and set M = PVIC(R,U),Rd , so M (Rn ) = k[HomVIC(R,U) (Rd , Rn )]. Our goal is to prove that the OVIC(R)-module Φ∗ (M ) is finitely generated. For every ϕ ∈ SLU d (R), we get an element ∗ −1 ∗ d (ϕ, ϕ ) of Φ (M )(R ), and thus a morphism POVIC(R),Rd → Φ (M ). For ϕ ∈ GLd (R) and (f, f ′ ) ∈ HomOVIC(R) (Rd , Rd+1 ), the element (f, f ′ )(ϕ, ϕ−1 ) is in Φ∗ (M )(Rd+1 ), and thus determines a morphism POVIC(R),Rd+1 → Φ∗ (M ). Lemma 2.11 implies that the resulting map    M    POVIC(R),Rd  ⊕   SLU d (R) M GLd (R)×Hom OVIC(R) (Rd ,Rd+1 )   POVIC(R),Rd+1  −→ Φ∗ (M ) is a surjection. Since R is finite, this proves that Φ∗ (M ) is finitely generated. 22 Proof of Theorem A. We wish to prove that the category of VI(R)-modules is locally Noetherian. The forgetful functor VIC(R) → VI(R) is essentially surjective since it is the identity map on the objects. To see that it is finite, consider the pullback of PVI(R),Rn to VIC(R). Since it is generated as a VI(R)-module by the identity map idRn ∈ PVI(R),Rn (Rn ) = k[homVI(R) (Rn , Rn )], the same is true as a VIC(R)-module since the forgetful map is surjective on morphism sets. This surjectivity uses the fact that R is finite. Indeed, this implies that every stably free R-module is free, so the cokernel of a splittable R-linear map Rm → Rn is free. The desired statement now follows from Lemma 2.2 and Theorem D. Proof of Theorem B. We wish to prove that the category of V(R)-modules is locally Noetherian. By Lemma 2.2 and Theorem A, it is enough to prove that the inclusion functor ι : VI(R) → V(R) is essentially surjective and finite. Essential surjectivity is clear, so we must only prove finiteness. Let V be a free R-module. By considering its image, every splittable R-linear map canonically factors as a composition of a surjective map followed by a splittable injective map. So we have the decomposition of VI(R)-modules ι∗ (PV(R),V ) = M PVI(R),W V →W →0 where the sum is over all free quotients W of V . Proof of Theorem C. We wish to prove that the category of V′ (R)-modules is locally Noetherian. By Lemma 2.2 and Theorem A, it is enough to prove that the inclusion functor ι : VI(R) → V′ (R) is essentially surjective and finite. Essential surjectivity is clear, so we must only prove finiteness. Consider some d ≥ 0. We must prove that ι∗ (PV′ (R),Rd ) is a finitely generated VI(R)-module. Let N be the number of elements of Rd . Consider some n ≥ N and some V′ (R)-morphism f : Rd → Rn . Viewing f as an n × d matrix, there are at most N distinct rows occurring in f . This implies that there exists some g ∈ GLd (R) such that the last (n − N ) rows of f ◦ g are identically 0. From this, we see that f can be factored as f ′′ f′ Rd −→ RN −→ Rn , where f ′′ is splittable and f ′ is arbitrary. This implies that we have the decomposition of VI(R)-modules M ι∗ (PV′ (R),Rd ) = PVI(R),RN ′ , Rd →RN ′ ′ where the sum is over all R-linear maps Rd → RN with N ′ ≤ N . Remark 2.17. A shorter proof of Theorem A (and hence of Theorems B and C) is given in [SamSn4, §8.3] that deduces it from the locally Noetherian property of the opposite of the category of finite sets and surjective functions. We include the proof above since it follows easily from Theorem D which is the result that we actually need for our applications, and because the ideas for the proof were only made possible by work from both projects. 2.5 The category of SI-modules is locally Noetherian Fix a finite commutative ring R. Our goal in this section is to adapt the proof that the category of VIC(R)-modules is locally Noetherian to prove that the category of SI(R)-modules is locally Noetherian. The proof of this is immediately after Theorem 2.20 below. Row-adapted maps. An R-linear map f : Rn → Rm is row-adapted if the transpose f t of the matrix representing f is column-adapted in the sense of §2.2, in which case we 23 define Sr (f ) = Sc (f t ). Lemma 2.9 implies that the composition of two row-adapted maps is row-adapted. The category OSI. Define OSI′ (R) to be the category whose objects are pairs (R2n , ω), ′ where ω is a symplectic form on R2n , and whose morphisms from (R2n , ω) to (R2n , ω ′ ) are ′ R-linear maps f : R2n → R2n which are symplectic and row-adapted. Also, define OSI(R) to be the full subcategory of OSI′ (R) spanned by the (R2n , ω) such that ω is the standard symplectic form on R2n , i.e., if {b1 , . . . , b2n } is the standard basis for R2n , then ω(b2i−1 , b2j−1 ) = ω(b2i , b2j ) = 0 and ω(b2i−1 , b2j ) = δij (1 ≤ i, j ≤ n), where δij is the Kronecker delta. We will frequently omit the ω from objects of OSI(R). Factorization of SI-morphisms. The following is the analogue for SI(R) of Lemma 2.11. ′ Lemma 2.18. Let R be a finite commutative ring and f ∈ HomSI(R) ((R2n , ω), (R2n , ω ′ )). Then we can uniquely write f = f1 f2 , where f2 ∈ IsoSI(R) ((R2n , ω), (R2n , λ)) for some sym′ plectic form λ on R2n and f1 ∈ HomOSI′ (R) ((R2n , λ), (R2n , ω ′ )). Proof. Applying Lemma 2.10 to the transpose of f and then transposing the result, we can ′ uniquely write f = f1 f2 , where f2 : R2n → R2n is an isomorphism and f1 : R2n → R2n is a row-adapted map. There exists a unique symplectic form λ on R2n such that f2 : (R2n , ω) → ′ (R2n , λ) is a symplectic map. Since f : (R2n , ω) → (R2n , ω ′ ) is a symplectic map and f1 = ′ f f2−1 , it follows that f1 : (R2n , λ) → (R2n , ω ′ ) is a symplectic map, as desired. A partial order. Our goal now is to prove Theorem 2.20 below, which says that the category of OSI(R)-modules is locally Noetherian. This requires the existence of a certain partial ordering. For d ≥ 0 and ω a symplectic form on R2d , define PR (d, ω) = ∞ G HomOSI′ (R) ((R2d , ω), R2n ); n=0 here we are using our convention that R2n is given the standard symplectic form. Lemma 2.19. Let R be a finite commutative ring. Fix d ≥ 0 and a symplectic form ω on R2d . There exists a well partial ordering  on PR (d, ω) together with an extension ≤ of  to a total ordering such that the following holds. Consider f ∈ HomOSI′ (R) ((R2d , ω), R2n ) and ′ ′ g ∈ HomOSI′ (R) ((R2d , ω), R2n ) with f  g. Then there is some φ ∈ HomOSI(R) (R2n , R2n ) with the following two properties. 1. We have g = φf . ′′ 2. If f1 ∈ HomOSI′ (R) ((R2d , ω), R2n ) satisfies f1 < f , then φf1 < g. We postpone the proof of Lemma 2.19 until the end of this section. Noetherian theorems. For d ≥ 0 and ω a symplectic form on R2d , define Qd,ω to be the OSI(R)-module obtained by pulling back the OSI′ (R)-module POSI′ (R),(R2d ,ω) , so Qd,ω (R2n ) = k[HomOSI′ (R) ((R2d , ω), R2n )]. The main consequence of Lemma 2.19 is as follows. Theorem 2.20. Let R be a finite commutative ring. Then the category of OSI(R)-modules is locally Noetherian. Moreover, for d ≥ 0 and ω a symplectic form on R2d , the OSI(R)-module Qd,ω is finitely generated. 24 Proof. The proof of Theorem 2.14 can easily be adapted to prove that in fact every submodule of Qd,ω is finitely generated (replace Lemma 2.13 with Lemma 2.19). If ω is the standard symplectic form on R2d , then Qd,ω = POSI(R),R2d . We can thus use Lemma 2.1 to deduce that the category of OSI(R)-modules is locally Noetherian. We now use Theorem 2.20 to deduce Theorem E, which asserts that the category of SI(R)modules is locally Noetherian when R is a finite commutative ring. Proof of Theorem E. By Lemma 2.2 and Theorem 2.20, it is enough to show that the inclusion functor Φ : OSI(R) → SI(R) is finite. Fix d ≥ 0 and ω a symplectic form on R2d . Set M = PSI(R),(R2d ,ω) , so M (R2n ) = k[HomSI(R) ((R2d , ω), R2n )]; here we remind the reader of our convention that R2n is endowed with its standard symplectic form. Our goal is to prove that the OSI(R)-module Φ∗ (M ) is finitely generated. For every symplectic form λ on R2d and every element of IsoSI(R) ((R2d , ω), (R2d , λ)), we get a morphism Qd,λ → Φ∗ (M ) in the obvious way. Lemma 2.18 implies that the resulting map M λ a symplectic form on R2d    M IsoSI(R) ((R2d ,ω),(R2d ,λ))   Qd,λ  −→ Φ∗ (M ) is a surjection. Theorem 2.20 implies that each Qd,λ is a finitely generated OSI(R)-module. Since R is finite, this proves that Φ∗ (M ) is finitely generated. Insertion maps. For the proof of Lemma 2.19, we will need the following analogue of Lemma 2.15. Lemma 2.21. Let R be a commutative local ring. Fix d ≥ 0, a symplectic form ω on R2d , ′ and some f ∈ HomOSI′ (R) ((R2d , ω), R2n ) and g ∈ HomOSI′ (R) ((R2d , ω), R2n ). Assume that there exists some I ⊂ {1, . . . , n′ } \ {i | either 2i − 1 ∈ Sr (g) or 2i ∈ Sr (g)} such that f can be obtained from g by deleting the rows J := {2i − 1, 2i | i ∈ I} (observe that this implies that Sr (f ) is equal to Sr (g) after removing J from {1, . . . , 2n′ } and renumbering the rows in ′ order). Let the rows of g be r1 , . . . , r2n′ . Then there exists φ ∈ HomOSI(R) (R2n , R2n ) with the following properties. • We have g = φf . • Let h ∈ HomOSI(R) ((R2d , ω), R2n ) be such that Sr (h) = Sr (f ). Then φh is obtained from h by inserting the row rj in position j of h for all j ∈ J. • Let h ∈ HomOSI(R) ((R2d , ω), R2n ) be such that Sr (h) < Sr (f ) in the lexicographic order. Then Sr (φh) < Sr (g) in the lexicographic order. Proof. Set J ′ = {1, . . . , 2n′ } \ J, and write J = {j1 < · · · < j2(n′ −n) } and J ′ = {j1′ < ′ }. Next, write S (f ) = {s < · · · < s } ⊂ {1, . . . , 2n}, and for 1 ≤ i ≤ 2n′ , let · · · < j2n r 1 2d 1 ri = (ri , . . . , ri2d ). Define rbi ∈ R2n to be the element that has rij in position sj for 1 ≤ j ≤ 2d ′ and zeros elsewhere. Finally, define φ : R2n → R2n to be the map given by the matrix defined as follows. • For 1 ≤ k ≤ 2(n′ − n), the jkth row of φ is rbk . • For 1 ≤ k ≤ 2n, the (jk′ )th row of φ has a 1 in position k and zeros elsewhere. The fact that g is row-adapted implies that φ is row-adapted, and the three listed conclusions of the lemma are easy calculations. The only non-trivial fact that must be proved is that ′ φ : R2n → R2n is symplectic with respect to the standard symplectic forms ωn and ωn′ on ′ R2n and R2n , respectively. 25 ′ Let x1 , . . . , x2n ∈ R2n be the columns of φ. To prove that φ is symplectic with respect to ωn and ωn′ is equivalent to proving that (1 ≤ i, j ≤ n). ωn′ (x2i−1 , x2j−1 ) = ωn′ (x2i , x2j ) = 0 and ωn′ (x2i−1 , x2j ) = δij (2.1) ′ For 1 ≤ i ≤ 2n, let x′i ∈ R2n be the element obtained by replacing the jkth entry of xi with a 0 for 1 ≤ k ≤ 2(n′ − n) and let x′′i = xi − x′i . By construction, x′1 , . . . , x′2n is the standard ′ basis for R2n with the basis vectors indexed by J removed, so ωn′ (x′2i−1 , x′2j−1 ) = ωn′ (x′2i , x′2j ) = 0 and ωn′ (x′2i−1 , x′2j ) = δij (1 ≤ i, j ≤ n). Also, by construction we have ωn′ (x′i , x′′j ) = 0 for all 1 ≤ i, j ≤ 2n. It follows that (2.1) is equivalent to showing that ωn′ (x′′i , x′′j ) = 0 for all 1 ≤ i, j ≤ 2n. The only x′′i that are nonzero are x′′si for 1 ≤ i ≤ 2d, so it is enough to show that ′ that ωn′ (x′′si , x′′sj ) = 0 for 1 ≤ i, j ≤ 2d. Let y1 , . . . , y2d ∈ R2n be the columns of g. For ′ 1 ≤ i ≤ 2d, let yi′ ∈ R2n be the element obtained by replacing the jkth entry of yi with a 0 for 1 ≤ k ≤ 2(n′ − n) and let yi′′ = yi − yi′ . By construction, we have x′′si = yi′′ for 1 ≤ i ≤ 2d, so we must show that ωn′ (yi′′ , yj′′ ) = 0 for 1 ≤ i, j ≤ 2d. Let z1 , . . . , z2d ∈ R2n be the columns of f and let b1 , . . . , b2d be the standard basis for ′ 2d R . Since f : (R2d , ω) → R2n and g : (R2d , ω) → R2n are symplectic maps, it follows that ωn (zi , zj ) = ω(bi , bj ) and ωn′ (yi , yj ) = ω(bi , bj ) (1 ≤ i, j ≤ 2d). (2.2) Using the fact that f is obtained by deleting appropriate pairs of rows of g, we see that ωn (zi , zj ) = ωn′ (yi′ , yj′ ) (1 ≤ i, j ≤ 2d). (2.3) Combining (2.2) and (2.3), we see that ωn′ (yi , yj ) = ωn′ (yi′ , yj′ ) for all 1 ≤ i, j ≤ 2d. By construction, we have ωn′ (yi , yj′ ) = ωn′ (yi′ , yj ) = ωn′ (yi′ , yj′ ) (1 ≤ i, j ≤ 2d). We conclude that for 1 ≤ i, j ≤ 2d we have ω2n′ (yi′′ , yj′′ ) equal to ωn′ (yi − yi′ , yj − yj′ ) = ωn′ (yi , yj ) − ωn′ (yi′ , yj ) − ωn′ (yi , yj′ ) + ωn′ (yi′ , yj′ ) = 2ωn′ (yi′ , yj′ ) − 2ωn′ (yi′ , yj′ ) = 0, as desired. Constructing the orders. We now prove Lemma 2.19. Proof of Lemma 2.19. The general case of Lemma 2.19 can easily be deduced from the case where R is a local ring (the argument is identical to that for Lemma 2.13), so we can assume that R is a local ring. The first step is to construct . Consider f ∈ HomOSI′ (R) ((R2d , ω), R2n ) ′ and g ∈ HomOSI′ (R) ((R2d , ω), R2n ). We will say that f  g if f can be obtained from g by deleting the rows {2i − 1, 2i | i ∈ I} for some set I ⊂ {1, . . . , n′ } \ {i | either 2i − 1 ∈ Sr (f ) or 2i ∈ Sr (f )}. This clearly defines a partial order on PR (d, ω). Claim. The partially ordered set (PR (d, ω), ) is well partially ordered. 26 Proof of Claim. Define     Σ = Rd ∐ {♠} × Rd ∐ {♠} , where ♠ is a formal symbol. We will prove that (PR (d, ω), ) is isomorphic to a subposet of the well partially ordered poset Σ⋆ from Lemma 2.5, so by Lemma 2.4(a) is itself well partially ordered. Consider f ∈ HomOSI′ (R) ((R2d , ω), R2n ). For 1 ≤ i ≤ 2n, let ri = ( the ith row of f ♠ if i ∈ / Sr (f ), if i ∈ Sr (f ). Thus ri ∈ R2d ∐ {♠}. For 1 ≤ i ≤ n, let θi = (r2i−1 , r2i ) ∈ Σ. We thus get an element θ1 · · · θn ∈ Σ∗ . We claim that the map taking f to θ1 · · · θn is an injection from PR (d, ω) to Σ⋆ . To see this, consider an element θ1 · · · θn ∈ Σ⋆ in its image. Our goal is to reconstruct f . Write θi = (r2i−1 , r2i ), and set S = {1 ≤ i ≤ 2n | ri = ♠}. We can read off all the rows of f except for those whose index lies in S. But we know that S = Sr (f ), so rows whose index lies in S are precisely the standard basis vectors in Rd , appearing in their natural order. We have thus reconstructed all of f , as claimed. That this injection is order-preserving is immediate from the definitions. The only subtle point is the reason we used the ♠ rather than just using the basis vectors in Rd . The point here is that in the definition of the partial order on PR (d, ω), we were not allowed to delete rows in Sr (f ), so we have to distinguish them in Σ. We now extend  to a total order ≤. Fix some arbitrary total order on R2d , and consider ′ f ∈ HomOSI′ (R) ((R2d , ω), R2n ) and g ∈ HomOSI′ (R) ((R2d , ω), R2n ). We then determine if f ≤ g via the following procedure. Assume without loss of generality that f 6= g. • If n < n′ , then f < g. • Otherwise, n = n′ . If Sr (f ) < Sr (g) in the lexicographic ordering, then f < g. • Otherwise, Sr (f ) = Sr (g). Compare the sequences of elements of R2d which form the rows of f and g using the lexicographic ordering and the fixed total ordering on R2d . It is clear that this determines a total order ≤ on PR (d, ω) that extends . It remains to check that these orders have the property claimed by the lemma. Consider ′ f ∈ HomOSI′ (R) ((R2d , ω), R2n ) and g ∈ HomOSI′ (R) ((R2d , ω), R2n ) with f  g. By Lemma ′ 2.21, there exists some φ ∈ HomOSI(R) (R2n , R2n ) such that g = φf . Now consider f1 ∈ HomOSI′ (R) ((R2d , ω), R2n ) such that f1 < f . We want to show that φf1 < φf . If Sr (f1 ) < Sr (f ) in the lexicographic order, then this is an immediate consequence of Lemma 2.21, so we can assume that Sr (f1 ) = Sr (f ). In this case, it follows from Lemma 2.21 that φf1 and φf are obtained by inserting the same rows into the same places in f1 and f , respectively. It follows immediately that φf1 < φf , as desired. 2.6 Counterexamples In this section, we prove Theorem N, which asserts that the category of C-modules is not locally Noetherian for C ∈ {VI(R), VIC(R), SI(R)} when R is an infinite ring. This requires the following lemma. Lemma 2.22. Let k be a nonzero ring and Γ be a group that contains a non-finitely generated subgroup. Then the group ring k[Γ] is not Noetherian. Proof. Given a subgroup H ⊆ Γ, the kernel of the surjection k[Γ] → k[Γ/H] is a left ideal IH ⊂ k[Γ]. Clearly H $ H ′ implies IH $ IH ′ , so the existence of an infinite ascending chain 27 of left ideals in k[Γ] follows from the existence of an infinite ascending chain of subgroups of Γ. The existence of this is an immediate consequence of the existence of a non-finitely generated subgroup of Γ. Proof of Theorem N. For all of our choices of C, the group Γ := AutC (R2 ) contains SL2 (R). We claim that SL2 (R) contains a non-finitely generated subgroup. There are two cases. If Z ⊆ R, then SL2 (R) contains a rank 2 free subgroup. For instance, one can take the subgroup generated by ! ! 1 2 1 0 and . 0 1 2 1 This free subgroup contains a non-finitely generated subgroup. If Z * R, then the additive group of R is annihilated by some positive integer ℓ. Since R is infinite, this implies that the additive group of R is not finitely generated. The claim now follows from the fact that the additive group of R is a subgroup of SL2 (R) via the embedding r 7→ ! 1 r . 0 1 By Lemma 2.22, the claim implies that k[Γ] is not Noetherian. Define a C-module M via the formula ( k[AutC (V )] if V ∼ = Z2 , MV = 0 otherwise. The morphisms are the obvious ones. It is then clear that M is finitely generated but contains non-finitely generated submodules. 3 Partial resolutions and representation stability This section contains the machinery that we will use to prove our asymptotic structure theorem. It contains three sections. Recall the definition of a (weak) complemented category from §1.4. In §3.1, we will discuss automorphisms of complemented categories. Next, in §3.2 we will state Theorem 3.7, which gives a certain partial resolution for finitely generated modules over a complemented category. Theorem 3.7 is proven in §3.3. At the end of §3.3, we will derive our asymptotic structure theorem (Theorem F) from Theorem 3.7. The arguments in this section are inspired by [ChEFaNag]. The formal manipulations in §3.1 are also reminiscent of some of those appearing in [WahRW]. 3.1 Automorphism groups of complemented categories Objects in complemented categories equipped with a generator have rich automorphism groups. For instance, we have the following. Lemma 3.1. Let (A, ⊛) be a complemented category with generator X. For V, V ′ ∈ A, the group AutA (V ′ ) acts transitively on the set HomA (V, V ′ ). Proof. Without loss of generality, V ′ = X k for some k ≥ 0. Consider morphisms f, g : V → X k . Let C and D be the complements to f (V ) and g(V ), respectively, and let φ : V ⊛C → X k and φ′ : V ⊛ D → X k be the associated isomorphisms. Writing V ∼ = X ℓ , we then have C, D ∼ = X k−ℓ ; in particular, there is an isomorphism η : C → D. The composition φ−1 id⊛η φ′ X k −−→ V ⊛ C −−−→ V ⊛ D −→ X k 28 is then an isomorphism Ψ : X k → X k such that Ψ ◦ φ : V ⊛ C → X k is an isomorphism that restricts to g : V → X k , so Ψ ◦ f = g. Lemma 3.2. Let (A, ⊛) be a complemented category, let V, V ′ ∈ A, and define ϕ : AutA (V ) × AutA (V ′ ) → AutA (V ⊛ V ′ ) by the formula ϕ(f, g) = f ⊛ g. Then the following hold. (a) The homomorphism ϕ is injective. (b) Let i : V → V ⊛ V ′ and i′ : V ′ → V ⊛ V ′ be the canonical maps. Then {η ∈ AutA (V ⊛ V ′ ) | η ◦ i′ = i′ } = ϕ(AutA (V ) × idV ′ ) ∼ = AutA (V ), ′ ′ {η ∈ AutA (V ⊛ V ) | η ◦ i = i} = ϕ(idV × AutA (V )) ∼ = AutA (V ′ ). Proof. (a) Consider f0 ∈ AutA (V ) and g0 ∈ AutA (V ′ ) such that ϕ(f0 , g0 ) = idV ⊛V ′ . The proofs that f0 = idV and g0 = idV ′ are similar, so we will only give the details for f0 . Let 1 be the identity of (A, ⊛) and let u : 1 → V ′ be the unique map (by assumption, 1 is initial). Since g0 ◦ u = u, we have a commutative diagram V ⊛ 1 −−V−−→ V ⊛ V ′ id ⊛u  f ⊛id y 0 1  f ⊛g y 0 0 (3.1) V ⊛ 1 −−V−−→ V ⊛ V ′ . id ⊛u Since f0 ⊛ g0 = idV ⊛V ′ , we deduce that (idV ⊛ u) ◦ (f0 ⊛ id1 ) = idV ⊛ u. Like all A-morphisms, idV ⊛ u is a monomorphism, so f0 ⊛ id1 = idV ⊛1 , and hence f0 = idV , as desired. (b) The isomorphisms are a consequence of (a). We next show that ϕ(AutA (V ) × idV ′ ) ⊂ {η ∈ AutA (V ⊛ V ′ ) | η ◦ i′ = i′ }, ϕ(idV × AutA (V ′ )) ⊂ {η ∈ AutA (V ⊛ V ′ ) | η ◦ i = i}. The proofs are similar, so we will only give the details for ϕ(idV × AutA (V ′ )). Consider g1 ∈ AutA (V ′ ). The map ϕ(idV , g1 ) ◦ i is the composition of the canonical isomorphism V ∼ = V ⊛ 1 with the composition id ⊛g1 V V V ⊛ 1 −→ V ⊛ V ′. V ⊛ V ′ −→ id ⊛u The uniqueness of u implies that this composition equals idV ⊛(g1 ◦u) = idV ⊛u, so ϕ(idV , g1 )◦ i = i, as desired. We next show that ϕ(AutA (V ) × idV ′ ) ⊃ {η ∈ AutA (V ⊛ V ′ ) | η ◦ i′ = i′ }, ϕ(idV × AutA (V ′ )) ⊃ {η ∈ AutA (V ⊛ V ′ ) | η ◦ i = i}. The proofs are similar, so we will only give the details for ϕ(idV × AutA (V ′ )). Consider h2 ∈ AutA (V ⊛ V ′ ) such that h2 ◦ i = i. We wish to find some g2 ∈ AutA (V ′ ) such that ϕ(idV , g2 ) = h2 . Observe that i′ (V ′ ) is a complement to i(V ) and h2 ◦ i′ (V ′ ) is a complement to h2 ◦ i(V ) = i(V ). By the uniqueness of complements, there must exist g2 ∈ AutA (V ′ ) such that h2 ◦ i′ = i′ ◦ g2 . Under the injection HomA (V ⊛ V ′ , V ⊛ V ′ ) ֒→ HomA (V, V ⊛ V ′ ) × HomA (V ′ , V ⊛ V ′ ), both h2 and idV ⊛ g2 map to the same thing, namely (i, i′ ◦ g2 ). We conclude that h2 = idV ⊛ g2 = ϕ(idV , g2 ), as desired. 29 3.2 Recursive presentations and partial resolutions Fix a complemented category (A, ⊛) with a generator X and fix an A-module M . We wish to study several chain complexes associated to M . Shift functor. Consider some p ≥ 0 and some V ∈ A. Define IV,p = HomA (X p , V ). This might be the empty set. The groups Aut(X)p and Sp and the wreath product Sp ≀ Aut(X) = Sp ⋉ Aut(X)p all act on X p and induce free actions on IV,p . Set I′V,p = IV,p / Aut(X)p , I′′V,p = IV,p /Sp , I′′′ V,p = IV,p /(Sp ≀ Aut(X)). For h ∈ IV,p , let Wh ⊂ V be the complement of h(X p ). We then define an A-module Σp M via the formula M MWh (V ∈ A). (Σp M )V = h∈IV,p As far as morphisms go, consider a morphism f : V → V ′ and some h ∈ IV,p . We then have f ◦ h ∈ IV ′ ,p . Moreover, letting C ⊂ V ′ be the complement of f (V ), there is a natural isomorphism V ⊛ C ∼ = V ′ . Under this isomorphism, we can identify Wf ◦h with Wh ⊛ C. The canonical morphism Wh → Wh ⊛ C thus induces a map MWh → MWf ◦h . This allows us to define (component by component) a morphism (Σp M )f : (Σp M )V → (Σp M )V ′ . We will identify Σ0 M with M in the obvious way. As notation, we will write (Σp M )V,h for the term of (Σp M )V associated to h ∈ IV,p . ′ ′′ ′′′ Define Σ′p M and Σ′′p M and Σ′′′ p M by summing over IV,p and IV,p and IV,p , rather than IV,p . These are quotients of IV,p as A-modules by the submodules spanned by (x, (−1)g x) where x ∈ MW,h and (−1)g x ∈ MW,h◦g for g ∈ Aut(X)p or g ∈ Sp or g ∈ Sp ≀ Aut(X), respectively, and (−1)g refers to the sign of the Sp -component of g in the second and third case (and is defined to be 1 in the first case). Lemma 3.3. If (A, ⊛) is a complemented category with generator X and if M is a finitely generated A-module, then Σp M and Σ′p M and Σ′′p M and Σ′′′ p M are finitely generated Amodules for all p ≥ 0. Proof. It is enough to prove this for Σp M since this surjects onto the others. There exist V1 , . . . , Vm ∈ A and xi ∈ MVi for 1 ≤ i ≤ m such that M is generated by {x1 , . . . , xm }. For all V ∈ A, let hV : X p → V ⊛ X p be the canonical morphism, so (Σp M )V ⊛X p ,hV = MV . For 1 ≤ i ≤ m, define xi ∈ (Σp M )Vi ⊛X p to be the element xi ∈ (Σp M )Vi ⊛X p ,hVi ⊂ (Σp M )Vi ⊛X p . We claim that Σp M is generated by x1 , . . . , xm . Indeed, generated by the indicated elements. Consider V ∈ A. (Σp M )V . If (Σp M )V 6= 0, then V ∼ = X q for some q ≥ NX q = (Σp M )X q . It is clear that (Σp M )X q−p ⊛X p ,hX q−p AutA (X q ) acts transitively on IX q ,p . We conclude that h ∈ IX q ,p , so NX q = MX q . let N be the submodule of Σp M Our goal is to show that NV = p, and it is enough to show that ⊂ NX q . Lemma 3.1 implies that NX q contains (Σp M )X q ,h for all Remark 3.4. The operation Σp is an exact functor on the category of A-modules: given a morphism f : M → N , there is a morphism Σp f : Σp M → Σp N defined in the obvious way, th and the same is true for Σ′p and Σ′′p and Σ′′′ p . Note that Σp can be identified with the p ′ ′′ ′′′ iterate of Σ1 , and a similar statement holds for Σp , but not for Σp or Σp . 30 Chain complex. For p ≥ 1, we now define a morphism d : Σp M → Σp−1 M of A-modules as follows. Consider V ∈ A. For 1 ≤ i ≤ p, let ti : X → X p be the canonical morphism of the ith term and let si : X p−1 → X p be the morphism that corresponds to the (p − 1)-tuple (t1 , . . . , tbi , . . . , tp ) under the isomorphism HomA (X p−1 , X p ) ∼ = HomA (X, X p ) × · · · × HomA (X, X p ) from the definition of a complemented category. For h ∈ IV,p , we have h ◦ si ∈ IV,p−1 . Moreover, we can identify Wh◦si with Wh ⊛ (h ◦ ti (X)). Define di : Σp M → Σp−1 M to be the morphism that takes (Σp M )V,h = MWh to (Σp−1 M )V,h◦si = MWh ⊛(h◦ti (X)) via the map induced by the canonical morphism Wh → Wh ⊛ (h ◦ ti (X)). We then define d = Pp i−1 d . The usual argument shows that d ◦ d = 0, so we have defined a chain i i=1 (−1) complex of A-modules: Σ∗ M : · · · −→ Σ3 M −→ Σ2 M −→ Σ1 M −→ M. The differentials factor through the quotients Σ′p M and Σ′′p M and Σ′′′ p M , so we get complexes Σ′∗ M : · · · −→ Σ′3 M −→ Σ′2 M −→ Σ′1 M −→M, Σ′′∗ M : · · · −→ Σ′′3 M −→ Σ′′2 M −→ Σ′′1 M −→M, ′′′ ′′′ ′′′ Σ′′′ ∗ M : · · · −→ Σ3 M −→ Σ2 M −→ Σ1 M −→M. Remark 3.5. Let A◦ be the underlying groupoid of A, i.e., the subcategory where we take all objects of A and only keep the isomorphisms. Using the complemented structure of A, there is a natural symmetric monoidal structure on A◦ -modules defined by M (F ⊗ G)(V ) = V =V F (V ′ ) ⊗k G(V ′′ ). ′ ⊛V ′′ So we can define commutative algebras and their modules. Define an A◦ -module A1 by V 7→ k if V is isomorphic to the generator of A and V 7→ 0 otherwise and set Ae = Sym(A1 ) where Sym denotes the free symmetric algebra. Then e )= A(V M k {L1 ,...,Ln } V =L1 ⊛···⊛Ln where the sum is over all unordered decompositions of V into rank 1 subspaces. There is a quotient A of Ae given by V 7→ k for all V (identify all summands above), and the category of A-modules is equivalent to the category of A-modules: a map A ⊗ M → M is equivalent to giving a map M (V ′ ) → M (V ) for each decomposition V = V ′ ⊛ V ′′ , and the associativity of multiplication is equivalent to these maps being compatible with composition. Under this interpretation, Σ′∗ M becomes ⊗2 · · · → A⊗3 1 ⊗ M → A1 ⊗ M → A1 ⊗ M → M, e while Σ′′′ ∗ M is the Koszul complex of M thought of as an A-module: ··· → ^3 A1 ⊗ M → ^2 A1 ⊗ M → A1 ⊗ M → M. Relation to finite generation. We pause now to make the following observation. 31 Lemma 3.6. Let (A, ⊛) be a complemented category with generator X and let M be an A-module over a ring k. Assume that MV is a finitely generated k-module for all V ∈ A. Then M is finitely generated if and only if there exists some N ≥ 0 such that the map d : (Σ1 M )V → MV is surjective for all V ∈ A whose X-rank is at least N . Proof. If M is generated by elements x1 , . . . , xk with xi ∈ MVi , then we can take N to be the maximal X-rank of V1 , . . . , Vk plus 1. Indeed, if V ∈ A has X-rank at least N , then every morphism Vi → V factors through W for some W ⊂ V whose X-rank is one less than that of V , which implies that the map d : (Σ1 M )V → MV is surjective. Conversely, if such an N exists, then for a generating set we can combine generating sets for MX i for 0 ≤ i ≤ N − 1 to get a generating set for M . Partial resolutions and representation stability. We finally come to our main theorem which will be used in the proof of Theorem F. Theorem 3.7. Let (A, ⊛) be a complemented category with generator X. Assume that the category of A-modules is locally Noetherian, and let M be a finitely generated A-module. Fix some q ≥ 1. If the X-rank of V ∈ A is sufficiently large, then the chain complex (Σq M )V −→ (Σq−1 M )V −→ · · · −→ (Σ1 M )V −→ MV −→ 0 is exact. The same holds if we replace Σp by Σ′p or Σ′′p or Σ′′′ p. The proof of Theorem 3.7 is in §3.3 after some preliminaries. Remark 3.8. The different resolutions given by Theorem 3.7 are useful in different contexts. The resolution Σ∗ will be used in our finite generation machine in §5 (though the other resolutions could also be used at the cost of complicating the necessary spaces). For A = FI, the resolution Σ′′∗ is a version of the “central stability chain complex” from [Pu2]; this also played an important role in [ChEFaNag]. Finally, the resolution Σ′′′ ∗ is the “most efficient” of our resolutions in the sense that the terms are smallest. 3.3 Proof of Theorem 3.7 We begin with some preliminary results needed for the proof of Theorem 3.7. Torsion submodule. If M is an A-module, then define the torsion submodule of M , denoted T (M ), to be the submodule defined via the formula T (M )V = {x ∈ MV | there exists a morphism f : V → W with Mf (x) = 0}. Lemma 3.9. Let (A, ⊛) be a complemented category with generator X and let M be an A-module. Then T (M ) is an A-submodule of M . Proof. Fix V ∈ A. It suffices to show that T (M )V is closed under addition. Given x, x′ ∈ T (M )V , pick morphisms f : V → W and f ′ : V → W ′ such that Mf (x) = 0 and Mf ′ (x′ ) = 0. Let g : W → W ⊛ W ′ and g′ : W ′ → W ⊛ W ′ be the canonical morphisms. Lemma 3.1 implies that there exists some h ∈ AutA (W ⊛ W ′ ) such that h ◦ g ◦ f = g′ ◦ f ′ . This morphism kills both x and x′ , and hence also x + x′ . Lemma 3.10. Let (A, ⊛) be a complemented category with generator X. Assume that the category of A-modules is locally Noetherian and let M be a finitely generated A-module. Then there exists some N ≥ 0 such that if V ∈ A has X-rank at least N , then T (M )V = 0. 32 Proof. Combining Lemma 3.9 with our locally Noetherian assumption, we get that T (M ) is finitely generated, say by elements x1 , . . . , xp with xi ∈ T (M )Vi for 1 ≤ i ≤ p. Let fi : Vi → Wi be a morphism such that Mfi (xi ) = 0. Define W = W1 ⊛ · · · ⊛ Wp , and consider some 1 ≤ i ≤ p. Define fei : Vi → W to be the composition of fi with the canonical morphism Wi ֒→ W . It is then clear that Mfe (xi ) = 0. If N is the X-rank of W , we claim that i T (M )V = 0 whenever V ∈ A has X-rank at least N . Indeed, every morphism g : Vi → V can be factored as fe i Vi − → W −→ V, and thus Mg (xi ) = 0. Since the xi generate T (M ), it follows that T (M )V = 0. Torsion homology. Since Σ∗ M is a chain complex of A-modules, we can take its homology and obtain an A-module Hq (Σ∗ M ) for each q ≥ 0. We then have the following. Lemma 3.11. Let (A, ⊛) be a complemented category with generator X. Fix some q ≥ 0, and consider V ∈ A. Let ι : V → V ⊛X be the canonical morphism. Then for all x ∈ (Hq (Σ∗ M ))V , we have (Hq (Σ∗ M ))ι (x) = 0. In particular, the same is true for any morphism f that maps V to W with larger X-rank. The same holds if we replace Σ∗ by Σ′∗ or Σ′′∗ or Σ′′′ ∗ . Proof. For Σ∗ , the relevant map on homology is induced by a map · · · −−−−→ (Σ2 M )V ⊛X −−−−→ (Σ1 M )V ⊛X −−−−→ MV ⊛X −−−−→ 0 · · · −−−−→ x  I (Σ2 M )V −−−−→ x  I (Σ1 M )V x  I −−−−→ MV −−−−→ 0 of chain complexes. We will prove that I is chain homotopic to the zero map. The chain homotopy will descend to a similar chain homotopy on Σ′∗ and Σ′′∗ and Σ′′′ ∗ , so this will imply the lemma. Let ι : V → V ⊛ X be the canonical morphism. Recall that (Σp M )V = M MWh and (Σp M )V ⊛X = h∈IV,p M MWh . h∈IV ⊛X,p The map I : (Σp M )V → (Σp M )V ⊛X takes (Σp M )V,h = MWh to (Σp M )V ⊛X,ι◦h = MWh ⊛X via the map induced by the canonical morphism W → W ⊛ X. We now define a chain homotopy map G : (Σp M )V → (Σp+1 M )V ⊛X as follows. Given h ∈ IV,p = HomA (X p , V ), define h : X p+1 → V ⊛ X to be the composition h⊛id X p+1 = X ⊛ X p −→ X p ⊛ X −−−→ V ⊛ X, where the first arrow flips the two factors using the symmetric monoidal structure on A. We then have h ∈ IV ⊛X,p+1 . Since (Σp M )V,h = (Σp+1 M )V ⊛X,h = MWh , we can define G on (Σp M )V,h to be the identity map (Σp M )V,h = (Σp+1 M )V ⊛X,h . We now claim that dG + Gd = I. Indeed, on (Σp M )V the map dG + Gd takes the form p X i=1 (−1)i−1 Gdi !  + p+1 X j=1  (−1)j−1 dj G . Straightforward calculations show that d1 G = I and that Gdi = di+1 G for 1 ≤ i ≤ p. 33 Endgame. All the ingredients are now in place for the proof of Theorem 3.7. Proof of Theorem 3.7. For all i ≥ 0, Lemma 3.3 implies that the A-module Σi M is finitely generated. Our assumption that the category of A-modules is locally Noetherian then implies that Hi (Σ∗ M ) is finitely generated. Lemma 3.11 implies that for all i ≥ 0, we have T (Hi (Σ∗ M )) = Hi (Σ∗ M ). The upshot of all of this is that we can apply Lemma 3.10 to obtain some Nq ≥ 0 such that if V ∈ A has X-rank at least Nq and 0 ≤ i ≤ q, then Hi (Σ∗ M )V = 0. In other words, the chain complex (Σq M )V −→ (Σq−1 M )V −→ · · · −→ (Σ1 M )V −→ MV −→ 0 is exact, as desired. For Σ′∗ and Σ′′∗ and Σ′′′ ∗ , the proof is the same. Asymptotic structure theorem. We conclude by proving Theorem F (the main argument here is very similar to that of [ChPu, Lemma 2.23]). Proof of Theorem F. Injective representation stability follows from Lemma 3.10, and surjective representation stability is immediate from finite generation. All that remains to prove is central stability. Using Theorem 3.7, choose N large enough so that the chain complex (Σ2 M )V −→ (Σ1 M )V −→ MV −→ 0 is exact whenever the X-rank of V ∈ A is at least N . Define M ′ to be the left Kan extension to A of the restriction of M to AN . The universal property of the left Kan extension gives a natural transformation θ : M ′ → M such that θV : (M ′ )V → MV is the identity for all V ∈ A whose X-rank is at most N . We must prove that θV is an isomorphism for all V ∈ A. Letting r be the X-rank of V , the proof is by induction on r. The base cases are when 0 ≤ r ≤ N , where the claim is trivial. Assume now that r > N and that the claim is true for all smaller r. The natural transformation θ induces natural transformations θi : Σi M ′ → Σi M for all i ≥ 0, and our inductive hypothesis implies that the maps (θi )V : (Σi M ′ )V → (Σi M )V are isomorphisms for all i ≥ 1. We have a commutative diagram (Σ2 M ′ )V −−−−→ (Σ1 M ′ )V −−−−→ (M ′ )V −−−−→ 0   (θ2 )V y∼ =   (θ1 )V y∼ = (Σ2 M )V −−−−→ (Σ1 M )V −−−−→   θV y MV −−−−→ 0 We warn the reader that while the bottom row is exact, the top row is as yet only a chain complex. If W ∈ A has X-rank at most N , then every A-morphism W → V factors through an object whose X-rank is r − 1 (for instance, this is an easy consequence of Lemma 3.1). Combining this with the usual formula for a left Kan extension as a colimit, we deduce that the map (Σ1 M ′ )V → (M ′ )V is surjective. The fact that θV is an isomorphism now follows from an easy chase of the above diagram. 34 4 Twisted homological stability In this section, we prove a general theorem which allows us to deduce twisted homological stability from untwisted homological stability and local Noetherianity (see Theorem 4.2 below; this abstracts an argument of Church [Ch2]). Using this, we will prove Theorems L and M, which give very general twisted homological stability theorems for SLU n (R) and Sp2n (R). We remark that Wahl–Randal-Williams [WahRW] have also recently and independently proved twisted homological stability theorems. They require their coefficients to be either “polynomial” or “abelian”, but they allow much more general rings R. Their proofs are very different from ours. Lemma 4.1. Let (A, ⊛) be a complemented category with a generator X. Then for all n ≥ r, we have an isomorphism of AutA (X n )-representations Aut (X n ) k[HomA (X r , X n )] ∼ = k[AutA (X n )/ AutA (X n−r )] ∼ = IndAutAA (X n−r ) k. Consequently, Hk (AutA (X n ); k[HomA (X r , X n )]) ∼ = Hk (AutA (X n−r ); k). Proof. Let i ∈ HomA (X r , X n ) be the canonical morphism X r → X r ⊛ X n−r . By Lemma 3.1, AutA (X n ) acts transitively on the set HomA (X r , X n ). By Lemma 3.2(b), the stabilizer of i in AutA (X n ) is identified with AutA (X n−r ), which establishes the first isomorphism. The second follows from Shapiro’s lemma [Br, Proposition III.6.2]. Our main theorem is then as follows. If (A, ⊛) is a complemented category with a generator X and M is an A-module, then denote MX n by Mn . Theorem 4.2. Let (A, ⊛) be a complemented category with a generator X and let M be a finitely generated A-module over a ring k. Assume that the following hold. 1. The category of A-modules over k is locally Noetherian. 2. For all k ≥ 0, the map Hk (AutA (X n ); k) → Hk (AutA (X n+1 ); k) induced by the map AutA (X n ) → AutA (X n+1 ) that takes f ∈ AutA (X n ) to f ⊛ idX ∈ AutA (X n+1 ) is an isomorphism for n ≫ 0. Then for k ≥ 0, the map Hk (AutA (X n ); Mn ) → Hk (AutA (X n+1 ); Mn+1 ) is an isomorphism for n ≫ 0. Proof. Combining Lemma 4.1 with our second assumption, we see that the theorem is true if M is a finite direct sum of representable A-modules PA,x with x ∈ A (see §2.1). Our local Noetherian assumption implies that there exists an A-module resolution · · · −→ P2 −→ P1 −→ P0 −→ M −→ 0, where Pi is a finite direct sum of representable A-modules for all i ≥ 0. For all n ≥ 0, we can combine [Br, Proposition VII.5.2] and [Br, Eqn. VII.5.3] to obtain a spectral sequence E1pq (n) = Hp (AutA (X n ); (Pq )n ) =⇒ Hp+q (AutA (X n ); Mn ). This spectral sequence is natural, so there is a map E1∗∗ (n) → E1∗∗ (n + 1) which converges to the map H∗ (AutA (X n ); Mn ) → H∗ (AutA (X n+1 ); Mn+1 ). By the above, for each pair (p, q), the map E1pq (n) → E1pq (n + 1) is an isomorphism for n ≫ 0. This implies that for each k ≥ 0, the map Hk (AutA (X n ); Mn ) → Hk (AutA (X n+1 ); Mn+1 ) is an isomorphism for n ≫ 0, as desired. 35 Proof of Theorems L and M. Theorems L and M are obtained by applying Theorem 4.2 to the categories VIC(R, U) and SI(R), respectively. The necessary locally Noetherian theorems are Theorem D, and Theorem E. The necessary untwisted homological stability theorems are due to van der Kallen [Va] and Mirzaii–van der Kallen [MirVa]. 5 A machine for finite generation This section contains the machine we will use to prove our finite generation results. We begin with two sections of preliminaries: §5.1 is devoted to systems of coefficients, and §5.2 is devoted to the basics of equivariant homology. Finally, §5.3 contains our machine. Our machine is based on an unpublished argument of Quillen for proving homological stability (see, e.g., [HatWah]). The insight that that argument interacts well with central stability is due to the first author [Pu2]. This was later reinterpreted in the language of FI-modules in [ChEFaNag]. The arguments in this section abstract and generalize the arguments in [Pu2] and [ChEFaNag]. Throughout this section, k is a fixed commutative ring. 5.1 Systems of coefficients b be the category whose objects are the finite sets [n] = {0, . . . , n} and whose Letting ∆ + morphisms are strictly increasing maps, recall that a semisimplicial set X is a contravariant b to the category of sets. The image of [n] is called the set of n-simplices and functor from ∆ + n is denoted X . A simplex σ ′ ∈ X m is a face of a simplex σ ∈ X n if σ ′ is the image of σ under the map X n → X m induced by some map [m]+ → [n]+ . The geometric realization of X is denoted |X|. For more on semisimplicial sets, see [Fri] (where they are called ∆-sets). n Fix a semisimplicial set X. Observe that the set ⊔∞ n=0 X forms the objects of a category ′ ′ with a unique morphism σ → σ whenever σ is a face of σ. We will call this the simplex category of X. Definition 5.1. A coefficient system on X is a contravariant functor from the simplex category of X to the category of k-modules. Remark 5.2. In other words, a coefficient system F on X consists of k-modules F(σ) for simplices σ of X and homomorphisms F(σ ′ → σ) : F(σ) → F(σ ′ ) whenever σ ′ is a face of σ. These homomorphisms must satisfy the obvious compatibility condition. Definition 5.3. Let F be a coefficient system on X. The simplicial chain complex of X with coefficients in F is as follows. Define M Ck (X; F) = F(σ). σ∈X k Next, define a differential ∂ : Ck (C; F) → Ck−1 (C; F) in the following way. Consider σ ∈ X k . We will denote an element of F(σ) ⊂ Ck (X; F) by c · σ for c ∈ F(σ). For 0 ≤ i ≤ k, let σi be b whose image does not the face of σ associated to the unique morphism [k − 1]+ → [k]+ of ∆ contain i. For c ∈ F(σ), we then define ∂(c · σ) = k X (−1)i ci · σi , i=0 where ci is the image of c under the homomorphism F(σi → σ) : F(σ) −→ F(σi ). Taking the homology of C∗ (X; F) yields the homology groups of X with coefficients in F, which we will denote by H∗ (X; F). 36 Remark 5.4. If F is the coefficient system that assigns k to every simplex and the identity map to every inclusion of a face, then H∗ (X; F) ∼ = H∗ (X; k). 5.2 Equivariant homology A good reference that contains proofs of everything we state in this section is [Br, §VII]. Semisimplicial sets form a category SS whose morphisms are natural transformations. Given a semisimplicial set X and a group G, an action of G on X consists of a homomorphism G → AutSS (X). Unpacking this, an action of G on X consists of actions of G on X n for all n ≥ 0 which satisfy the obvious compatibility condition. Observe that this induces an action of G on X. Also, there is a natural quotient semisimplicial set X/G with (X/G)n = X n /G. Remark 5.5. If G is a group acting on a semisimplicial set X, then there is a natural continuous map |X| → |X/G| that factors through |X|/G. In fact, it is easy to see that |X|/G = |X/G|. Definition 5.6. Consider a group G acting on a semisimplicial set X. Let EG be a contractible CW complex on which G acts properly discontinuously and freely, so EG/G is a classifying space for G. Define EG ×G X to be the quotient of EG × |X| by the diagonal action of G. The G-equivariant homology groups of X, denoted HG ∗ (X; k), are defined to be H∗ (EG ×G X; k). This definition does not depend on the choice of EG. The construction of EG ×G X is known as the Borel construction. The following lemma summarizes two key properties of these homology groups. Lemma 5.7. Consider a group G acting on a semisimplicial set X. There is a canonical G map HG ∗ (X; k) → H∗ (G; k) such that if X is k-acyclic, then the map Hi (X; k) → Hi (G; k) is an isomorphism for i ≤ k. Proof. The map HG ∗ (X; k) → H∗ (G; k) comes from the map EG ×G X → EG/G induced by the projection of EG × X onto its first factor. The second claim is an immediate consequence of the spectral sequence whose E2 page is [Br, (7.2), §VII.7]. To calculate equivariant homology, we use a certain spectral sequence. First, a definition. Definition 5.8. Consider a group G acting on a semisimplicial set X. Define a coefficient e be any lift of σ system Hq (G, X; k) on X/G as follows. Consider a simplex σ of X/G. Let σ to X. Set Hq (G, X; k)(σ) = Hq (Geσ ; k), e . This does not depend on the choice of σ e since conjugation where Geσ is the stabilizer of σ induces the identity on group homology, so it defines a coefficient system on X/G. Our spectral sequence is then as follows. It can be easily extracted from [Br, §VII.8]. Theorem 5.9. Let G be a group acting on a semisimplicial set X. There is a spectral sequence E1p,q = Cp (X/G; Hq (G, X; k)) =⇒ HG p+q (X; k) with d1 : E1p,q → E1p−1,q equal to the differential of C∗ (X/G; Hq (G, X; k)). 37 5.3 A machine for finite generation We now discuss a machine for proving that the homology groups of certain congruence subgroups form finitely generated modules over a complemented category. Congruence subgroups. Let (B, ⊛) be a weak complemented category with a generator Y . The assignment V 7→ AutB (Ve ) for V ∈ B is functorial. Indeed, given a B-morphism e we can then fe: Ve1 → Ve2 , let Ce be the complement to fe(Ve1 ) ⊂ Ve2 and write Ve2 ∼ = Ve1 ⊛ C; e e e extend automorphisms of V1 to V2 by letting them act as the identity on C. It is clear that this is well-defined. Next, let (A, ⊛) be a complemented category and let Ψ : B → A be a strong monoidal functor (recall that this is a monoidal functor whose coherence maps are invertible). An argument similar to the above shows that the assignment Ve 7→ ker(AutB (Ve ) → AutA (Ψ(Ve ))) (Ve ∈ B) is functorial. We will call this functor the level Ψ congruence subgroup of AutB and denote its value on Ve by ΓVe (Ψ). Highly surjective functors. The above construction is particularly well-behaved on certain kinds of functors that we now define. Let (A, ⊛) be a complemented category with a generator X and let (B, ⊛) be a weak complemented category with a generator Y . A highly surjective functor from B to A is a strong monoidal functor Ψ : B → A satisfying: • Ψ(Y ) = X. • For Ve ∈ B, the map Ψ∗ : AutB (Ve ) → AutA (Ψ(Ve )) is surjective. Remark 5.10. We only assume that Ψ is a strong monoidal functor (as opposed to a strict monoidal functor), so for all q ≥ 0 we only know that Ψ(Y q ) and X q are naturally isomorphic rather than identical. To simplify notation, we will simply identify Ψ(Y q ) and X q henceforth. The careful reader can insert appropriate natural isomorphisms as needed. Lemma 5.11. Let (A, ⊛) be a complemented category with a generator X, let (B, ⊛) be a weak complemented category with a generator Y , and let Ψ : B → A be a highly surjective functor. Then the following hold. (a) For all V ∈ A, there exists some Ve ∈ B such that Ψ(Ve ) ∼ =V. e e e e (b) For all V1 , V2 ∈ B, the map Ψ∗ : HomB (V1 , V2 ) → HomA (Ψ(Ve1 ), Ψ(Ve2 )) is surjective. Proof. For the first claim, we have V ∼ =V. = X q for some q ≥ 0, so Ψ(Y q ) = X q ∼ q r q e ∼ e ∼ e ∼ For the second claim, write V1 = Y and V2 = Y , so Ψ(V1 ) = X and Ψ(Ve2 ) ∼ = Xr. q r If q > r, then HomA (X , X ) = ∅ and the claim is trivial, so we can assume that q ≤ r. Consider some f ∈ HomA (X q , X r ). Let fe1 ∈ HomB (Y q , Y r ) be arbitrary (this set is nonempty; for instance, it contains the composition of the canonical map Y q → Y q ⊛ Y r−q with an isomorphism Y q ⊛ Y r−q ∼ = Y r ). Lemma 3.1 implies that there exists some f2 ∈ AutA (X r ) such that f = f2 ◦ Ψ(fe1 ). Since Ψ is highly surjective, we can find fe2 ∈ AutB (Y r ) such that Ψ(fe2 ) = f2 . Setting fe = fe2 ◦ fe1 , we then have Ψ(fe) = f , as desired. Lemma 5.12. Let (A, ⊛) be a complemented category with generator X, let (B, ⊛) be a weak complemented category with generator Y , and let Ψ : B → A be a highly surjective functor. Consider fe, fe′ ∈ HomB (Y q , Y r ) such that Ψ(fe) = Ψ(fe′ ). Then there exists some ge ∈ ΓY r (Ψ) such that fe′ = ge ◦ fe. e: Yr → Yq ⊛ C e be the isomorphism Proof. Let Ce be the complement to fe(Y q ) ⊂ Y r and h q q e e e and e e h = Ψ(h), such that h ◦ f : Y → Y ⊛ C is the canonical map. Define C = Ψ(C), q q e f = Ψ(f ), so h ◦ f : X → X ⊛ C is the canonical map. Lemma 3.1 implies that there exists 38 e such that e some ge1 ∈ AutB (Y q ⊛ C) h ◦ fe′ = ge1 ◦ e h ◦ fe. Define g1 = Ψ(ge1 ), so h ◦ f = g1 ◦ h ◦ f . Lemma 3.2(b) implies that there exists some g2 ∈ AutA (C) such that g1 = id ⊛ g2 . Since Ψ e such that Ψ(ge2 ) = g2 . is highly surjective, we can find some ge2 ∈ AutB (C) −1 Define ge ∈ AutB (Y r ) to equal e h−1 ◦ ge1 ◦ (id ⊛ ge2 ) ◦ e h. Then Ψ(ge) = h−1 ◦ g1 ◦ (id ⊛ g2−1 ) ◦ h, e ◦ fe is the canonical which is the identity since g1 = id ⊛ g2 . Thus ge ∈ ΓY r (Ψ). Finally, since h −1 map, it follows that e h ◦ fe ◦ (id ⊛ ge2 ) = e h ◦ fe. Thus e ◦ fe = h e −1 ◦ ge1 ◦ h e ◦ fe = h e −1 ◦ h e ◦ fe′ = fe′ . ge ◦ fe = e h−1 ◦ ge1 ◦ (id ⊛ ge2−1 ) ◦ h Homology of congruence subgroups. Let (A, ⊛) be a complemented category with generator X, let (B, ⊛) be a weak complemented category with generator Y , and let Ψ : B → A be a highly surjective functor. Fixing a ring k and some k ≥ 0, we define an A-module Hk (Ψ; k) as follows. Since A is equivalent to the full subcategory spanned by the X q , it is enough to define Hk (Ψ; k) on these. Set Hk (Ψ; k)X q = Hk (ΓY q (Ψ); k). To define Hk (Ψ; k) on morphisms, consider f ∈ HomA (X q , X r ). By Lemma 5.11, there exists some fe ∈ HomB (Y q , Y r ) such that Ψ(fe) = f , and we define Hk (Ψ; k)f : Hk (ΓY q (Ψ); k) → Hk (ΓY r (Ψ); k) to be the map on homology induced by the map ΓY q (Ψ) → ΓY r (Ψ) induced by fe. To see that this is well-defined, observe that if fe′ ∈ HomB (Y q , Y r ) also satisfies Ψ(fe′ ) = f , then Lemma 5.12 implies that there exists some ge ∈ ΓY r (Ψ) such that fe′ = ge ◦ fe. Since inner automorphisms act trivially on group homology, we conclude that fe and fe′ induce the same map Hk (ΓY q (Ψ); k) → Hk (ΓY r (Ψ); k). Space of Y -embeddings. We wish to give a sufficient condition for the A-module Hk (Ψ; k) to be finitely generated. This requires the following definition. Consider Ve ∈ B. Recall that for all k ≥ 0, we defined IVe ,k = HomB (Y k , Ve ). The space of Y -embeddings is the semisimplicial set IVe defined as follows. First, define (IVe )k = IVe ,k+1 . For f ∈ IVe ,k+1 , we will denote the associated k-simplex of IVe by [f ]. Next, b (i.e., a strictly increasing map from if [f ] ∈ (IVe )k and φ : [ℓ]+ → [k]+ is a morphism of ∆ [ℓ]+ = {0, . . . , ℓ} to [k]+ = {0, . . . , k}), then there is a natural induced map φ∗ : Y ℓ+1 → Y k+1 (here we are indexing the Y -factors starting at 0). We define the face of [f ] associated to φ to be [f ◦ φ∗ ]. Finite generation, statement. We can now state our main theorem. Theorem 5.13. Let (A, ⊛) be a complemented category with a generator X, let (B, ⊛) be a weak complemented category with a generator Y , and let Ψ : B → A be a highly surjective functor. Fix a Noetherian ring k, and assume that the following hold. 1. The category of A-modules is locally Noetherian. 2. For all V ∈ A and k ≥ 0, the k-module Hk (Ψ; k)V is finitely generated. 3. For all p ≥ 0, there exists some Np ≥ 0 such that for all Ve ∈ B whose Y -rank is at least Np , the space IVe is p-acyclic. Then Hk (Ψ; k) is a finitely generated A-module for all k ≥ 0. 39 We prove Theorem 5.13 at the end of this section after some preliminary results. Identifying the spectral sequence. Let (B, ⊛) be a weak complemented category with generator Y . For all Ve ∈ B, the group AutB (Ve ) acts on IVe . The following lemma describes the restriction of this action to a congruence subgroup. Lemma 5.14. Let (A, ⊛) be a complemented category with a generator X, let (B, ⊛) be a weak complemented category with a generator Y , and let Ψ : B → A be a highly surjective functor. Fix some Ve ∈ B, and set V = Ψ(Ve ) ∈ A. Then the group ΓVe (Ψ) acts on IVe and we have an isomorphism IVe /ΓVe (Ψ) ∼ = IV of semisimplicial sets. Proof. The claimed action of ΓVe (Ψ) is the restriction of the obvious action of AutB (Ve ). We have a ΓVe (Ψ)-invariant map IVe → IV of semisimplicial sets. This induces a map ρ : IVe /ΓVe (Ψ) → IV . For all k ≥ 0, Lemma 5.11 implies that ρ is surjective on k-simplices and Lemma 5.12 implies that ρ is injective on k-simplices. We conclude that ρ is an isomorphism of semisimplicial sets, as desired. Let (A, ⊛) be a complemented category with a generator X and let Ψ : B → A be a highly surjective functor. Fix some Ve ∈ B. Our next goal is to understand the spectral sequence given by Theorem 5.9 for the action of ΓVe (Ψ) on IVe . Set V = Ψ(Ve ) ∈ A. Using Lemma 5.14, this spectral sequence is of the form Γ (Ψ) V e (I ; k). E1p,q = Cp (IV ; Hq (ΓVe (Ψ), IVe ; k)) =⇒ Hp+q e V Recall the definition of Σp from §3.2. Lemma 5.15. Let (A, ⊛) be a complemented category with a generator X, let (B, ⊛) be a weak complemented category with a generator Y , and let Ψ : B → A be a highly surjective functor. Fix Ve ∈ B, and set V = Ψ(Ve ). Finally, fix a ring k. Then for p, q ≥ 0 we have Cp−1 (IV ; Hq (ΓVe (Ψ), IVe ; k)) ∼ = (Σp Hq (Ψ; k))V . Proof. Recall that the (p − 1)-simplices of IV are in bijection with the set IV,p and that the simplex associated to h ∈ IV,p is denoted [h]. It follows that M Cp−1 (IV ; Hq (ΓVe (Ψ), IVe ; k)) = h∈IV,p Hq (ΓVe (Ψ), IVe ; k)([h]). e∈I e Fix some h ∈ IV,p , and let h e ,p be a lift of h. By definition, we have V We have Hq (ΓVe (Ψ), IVe ; k)([h]) = Hq ((ΓVe (Ψ))[eh] ; k). e e=e (AutB (Ve ))[eh] = {ge ∈ AutB (Ve ) | ge ◦ e h = h} and (ΓVe (Ψ))[eh] = {ge ∈ ΓVe (Ψ) | ge ◦ h h}. e p ), Lemma 3.2(b) implies that (AutB (Ve )) ∼ f ⊂ Ve be a complement to h(Y Letting W = eh [e h] f ). Under this isomorphism, (Γ (Ψ)) goes to Γ (Ψ). Letting Wh = Ψ(W f ) ⊂ V, AutB (W eh e e eh V [e h] W eh we have that Wh is a complement to h(X p ). By definition, we have Hq ((ΓVe (Ψ))[eh] ; k) = Hq (ΓW e (Ψ); k) = (Hq (Ψ; k))Wh . The upshot of all of this is that Cp−1 (IV ; Hq (ΓVe (Ψ), IVe ; k)) = M eh h∈IV,p 40 (Hq (Ψ; k))Wh = (Σp Hq (Ψ; k))V . Finite generation, proof. We finally prove Theorem 5.13. Proof of Theorem 5.13. The proof is by induction on k. The base case k = 0 is trivial, so assume that k > 0 and that Hk′ (Ψ; k) is a finitely generated A-module for all 0 ≤ k′ < k. Since we are assuming that the k-module Hk (Ψ; k)V is finitely generated for all V ∈ A and all k ≥ 0, we can apply Lemma 3.6 and deduce that it is enough to prove that if V ∈ A has X-rank sufficiently large, then the map (Σ1 Hk (Ψ; k))V → Hk (Ψ; k)V (5.1) is surjective. Letting Ve ∈ B satisfy Ψ(Ve ) = V , we have Hk (Ψ; k)V = Hk (ΓVe (Ψ); k). To prove that (5.1) is surjective, we will use the action of ΓVe (Ψ) on IVe . By Lemma 5.7 and our assumption about the acyclicity of IVe , the map Γ (Ψ) Hk Ve (IVe ; k) → Hk (ΓVe ; k) is an isomorphism if the Y -rank of Ve (which equals the X-rank of V ) is sufficiently large. Combining Theorem 5.9 with Lemma 5.15, we get a spectral sequence Γ (Ψ) V e (I ; k). E1p,q ∼ = (Σp+1 Hq (Ψ; k))V =⇒ Hp+q e V Moreover, examining the isomorphism in Lemma 5.15, we see that the differential d : E1p,q → E1p−1,q is identified with the differential d : (Σp+1 Hq (Ψ; k))V → (Σp Hq (Ψ; k))V . Our inductive hypothesis says that Hq (Ψ; k) is a finitely generated A-module for 0 ≤ q < k. Theorem 3.7 therefore implies that if the X-rank of V is sufficiently large, we have E2p,q = 0 for 0 ≤ q < k and 1 ≤ p ≤ k + 1. This implies that the map Γ (Ψ) (Σ1 Hk (Ψ; k))V = E10,k → Hk Ve is a surjection, as desired. 6 (IVe ; k) ∼ = Hk (ΓVe ; k) Finite generation theorems In this section, we construct the modules claimed in the introduction and prove Theorems G, H, I, J, and K; they are proved in §6.1, §6.1, §6.2, §6.3, and §6.5, respectively. These theorems assert that the homology groups of various congruence subgroups form finitely generated modules over the appropriate categories. They will all be deduced from Theorem 5.13. We also introduce the weak complemented category Surf in §6.4. There is an interesting parallel between the complexes that appear in this section and those that appear in the paper [WahRW] of Wahl–Randal-Williams, which proves a variety of more traditional homological stability theorems. Our paper and theirs were written independently (though in later revisions to save space we removed some proofs that duplicated work of theirs). 41 6.1 The general and special linear groups: Theorems G and H Let OK be the ring of integers in an algebraic number field K, let α ⊂ OK be a proper b ⊂ OK , and let k be a nonzero ideal, let U ⊂ OK /α be the image of the group of units U Noetherian ring. In this section, we construct VIC(OK /α, U)-modules Hk (GL(OK , α); k) as in Theorem G for all k ≥ 0; see Corollary 6.2. We then prove Theorem G, which says that Hk (GL(OK , α); k) is a finitely generated VIC(OK /α, U)-module for all k ≥ 0. Theorem H is a similar result for the special linear group. Its proof is similar to that of the general linear group, and we leave it as an exercise to the reader. Categories and functors. As was noted in Example 1.16, for any ring R the category VIC(R) is a complemented category whose monoidal structure is direct sum. We have AutVIC(R) (Rn ) = GLn (R) (n ≥ 0). (6.1) Define a strong monoidal functor Ψ : VIC(OK ) → VIC(OK /α, U) by Ψ(V ) = (OK /α) ⊗OK V . The reason for the presence of U in the target of Ψ is that objects V of VIC(OK ) are equipped b b acts transitively on the set of orientations!), with U-orientations (a vacuous condition since U 1 and these induce U-orientations on (OK /α) ⊗OK V . The functor Ψ takes the generator OK of VIC(OK ) to the generator (OK /α)1 of VIC(OK /α, U). Define GL(OK , α) = Γ(Ψ). Using n = GLn (OK , α). the identification in (6.1), we have GL(OK , α)OK Lemma 6.1. The functor Ψ is highly surjective. Proof. This is equivalent to the fact that the map GLn (OK ) → SLU n (OK /α) is surjective for all n ≥ 0. This follows from the fact that the map SLn (OK ) → SLn (OK /α) is surjective, which follows from strong approximation (see, e.g., [PlRa, Chapter 7]; this is a special feature of rings of integers). As we discussed in §5.3, Lemma 6.1 has the following corollary. Corollary 6.2. For all k ≥ 0, there exists a VIC(OK /α, U)-module Hk (GL(OK , α); k) such that Hk (GL(OK , α); k)(OK /α)n = Hk (GLn (OK , α); k). Identifying the space of embeddings. We now wish to give a concrete description of 1 -embeddings of O n (recall the definition of the space of Y -embeddings from the space of OK K n consists of elements ((v , w ), . . . , (v , w )) as follows. §5.3). A split partial basis for OK 0 0 p p n that form part of a free basis for the free O -module O n . • The vi are elements of OK K K n , O ). • The wi are elements of HomOK (OK K • For all 0 ≤ i, j ≤ p, we have wi (vj ) = δi,j (Kronecker delta). These conditions imply that the wi also form part of a free basis for the free OK -module n , O ). The space of split partial bases for O n , denoted PB (O ), is the HomOK (OK K n K K n. semisimplicial set whose p-simplices are split partial bases ((v0 , w0 ), . . . , (vp , wp )) for OK 1 -embeddings of O n is isomorphic to PB (O ). Lemma 6.3. The space of OK n K K 1 -embeddings of O n are in bijection Proof. Fix some p ≥ 0. The p-simplices of the space of OK K p+1 n with elements of HomVIC(OK ) (OK , OK ). We will define set maps p+1 n η1 : HomVIC(OK ) (OK , OK ) → (PBn (OK ))p , p+1 n η2 : (PBn (OK ))p → HomVIC(OK ) (OK , OK ) that are compatible with the semisimplicial structure and satisfy η1 ◦ η2 = id and η2 ◦ η1 = id. The constructions are as follows. 42 p+1 n ), so by definition f : O p+1 → O n is an O , OK • Consider (f, C) ∈ HomVIC(OK ) (OK K K K n is a complement to f (O p+1 ). For 0 ≤ i ≤ p, define linear injection and C ⊂ OK K n to be the image under f of the (i − 1)st basis element of O p+1 and define vi ∈ OK K n , O ) via the formulas wi ∈ HomOK (OK K wi (vj ) = δij and wi |C = 0 (0 ≤ j ≤ p). Then η1 (f, C) := ((v0 , w0 ), . . . , (vp , wp )) is a split partial basis. p+1 n to be • Consider a split partial basis ((v0 , w0 ), . . . , (vp+1 , wp+1 )). Define f : OK → OK Tp th the map that takes the i basis element to vi−1 . Also, define C = i=0 ker(wi ). Then p+1 n ). η2 (((v0 , w0 ), . . . , (vp , wp ))) := (f, C) is an element of HomVIC(OK ) (OK , OK The space PBn (OK ) was introduced by Charney [Cha2], who proved the following theorem. Theorem 6.4 ([Cha2, Theorem 3.5]). The space PBn (OK ) is n−4 2 -acyclic. Remark 6.5. Charney actually worked over rings that satisfy Bass’s stable range condition SRr ; the above follows from her work since OK satisfies SR3 . Also, [Cha2, Theorem 3.5] contains the data of an ideal α ⊂ OK (not the same as the ideal we are working with!); the reference reduces to Theorem 6.4 when α = 0. Finally, Charney’s definition of PBn (R) is different from ours, but for Dedekind domains the definitions are equivalent; see [Re]. Putting it all together. We now prove Theorem G, which asserts that the VIC(O/α, U)module Hk (GL(OK , α); k) is finitely generated. Proof of Theorem G. We apply Theorem 5.13 to the highly surjective functor Ψ. This theorem has three hypotheses. The first is that the category of VIC(OK /α, U)-modules is locally Noetherian, which is Theorem D. The second is that Hk (GLn (OK , α); k) is a finitely generated k-module for all k ≥ 0, which is a theorem of Borel–Serre [BoSe]. The third is that the 1 -embeddings is highly acyclic, which follows from Lemma 6.3 and Theorem 6.4. space of OK We conclude that we can apply Theorem 5.13 and deduce that Hk (GL(OK , α); k) is a finitely generated VIC(OK /α, U)-module for all k ≥ 0, as desired. 6.2 The automorphism group of a free group: Theorem I Fix ℓ ≥ 2, and let k be a Noetherian ring. In this section, we construct VIC(Z/ℓ, ±1)-modules Hk (Aut(ℓ); k) as in Theorem I for all k ≥ 0; see Corollary 6.7. We then prove Theorem I, which says that Hk (Aut(ℓ); k) is a finitely generated VIC(Z/ℓ, ±1)-module for all k ≥ 0. The category of free groups. Define Fr to be a category whose objects are the finite-rank free groups and whose monoidal structure is the free product ∗. The Fr-morphisms from F to F ′ are pairs (f, C) : F → F ′ , where f : F → F ′ is an injective homomorphism and C ⊆ F ′ is a subgroup such that F ′ = f (F ) ∗ C. The category Fr is a complemented category. The subobject attached to a morphism (f, C) : F → F ′ can be thought of as the pair (f (F ), C) and its complement is the subobject (C, f (F )). A generator is the rank 1 free group F1 ∼ = Z, and AutFr (Fn ) = Aut(Fn ) (n ≥ 0). (6.2) The category Fr was first introduced by Djament–Vespa [DjVe2] to study the twisted homology of Aut(Fn ). Functor. The category VIC(Z/ℓ, ±1) is a complemented category whose monoidal structure is given by the direct sum. There is a strong monoidal functor Ψ : Fr → VIC(Z/ℓ, ±1) defined 43 via the formula Ψ(F ) = H1 (F ; Z/ℓ). The reason for the ±1 here is that Ψ factors through the functor Fr → VIC(Z) that takes F to H1 (F ; Z), and elements of VIC(Z) are equipped with ±1-orientations (a vacuous condition since the group of units of Z is ±1). The functor Ψ takes the generator F1 ∼ = Z of Fr to the generator (Z/ℓ)1 of VIC(Z/ℓ, ±1). Define Aut(ℓ) = Γ(Ψ). Using the identification in (6.2), we have Aut(ℓ)Fn = Aut(Fn , ℓ). Lemma 6.6. The functor Ψ is highly surjective. Proof. This is equivalent to the fact that the map Aut(Fn ) → GLn (Z) is surjective for all n ≥ 0, which is classical (see, e.g., [LySc, Chapter I, Proposition 4.4]). As we discussed in §5.3, Lemma 6.6 has the following corollary. Corollary 6.7. For all k ≥ 0, there exists a VIC(Z/ℓ, ±1)-module Hk (Aut(ℓ); k) such that Hk (Aut(ℓ); k)(Z/ℓ)n = Hk (Aut(Fn , ℓ); k). Identifying the space of embeddings. We now wish to give a concrete description of the space of F1 -embeddings of Fn . A split partial basis for Fn consists of elements ((v0 , C0 ), . . . , (vp , Cp )) as follows. • The vi are elements of Fn . • The Ci are subgroups of Fn such that Fn = hvi i ∗ Ci . • For all 0 ≤ i, j ≤ p with i 6= j, we have vj ∈ Ci . We remark that the condition Fn = hvi i ∗ Ci implies that Ci ∼ = Fn−1 . Also, the conditions Tp ∼ together imply that i=0 Ci = Fn−p−1 and that the vi can be extended to a free basis for Fn . The space of split partial bases for Fn , denoted PB(Fn ), is the semisimplicial set whose p-simplices are split partial bases ((v0 , C0 ), . . . , (vp , Cp )) for Fn . We remark that the Ci in this space play the same role as the kernels of the wi in PBn (OK ). Lemma 6.8. The space of F1 -embeddings of Fn is isomorphic to PB(Fn ). Proof. Fix some p ≥ 0. The p-simplices of the space of F1 -embeddings of Fn are in bijection with elements of HomFr (Fp+1 , Fn ). We will define set maps η1 : HomFr (Fp+1 , Fn ) → (PB(Fn ))p , η2 : (PB(Fn ))p → HomFr (Fp+1 , Fn ) that are compatible with the semisimplicial structure and satisfy η1 ◦ η2 = id and η2 ◦ η1 = id. The constructions are as follows. • Consider (f, C) ∈ HomFr (Fp+1 , Fn ), so by definition f : Fp+1 → Fn is an injective homomorphism and C ⊂ Fn is a subgroup satisfying Fn = f (Fp+1 ) ∗ C. For 0 ≤ i ≤ p, define vi ∈ Fn to be the image under f of the (i − 1)st basis element of Fp+1 and define Ci ⊂ Fn to be the subgroup generated by {vj | i 6= j} ∪ C. Then η1 (f, C) := ((v0 , C0 ), . . . , (vp , Cp )) is a split partial basis. • Consider a split partial basis ((v0 , C0 ), . . . , (vp+1 , Cp+1 )). Define f : Fp+1 → Fn to be T the map that takes the ith basis element to vi−1 . Also, define C = pi=0 Ci . Then η2 (((v0 , C0 ), . . . , (vp , Cp ))) := (f, C) is an element of HomFr (Fp+1 , Fn ). The space PB(Fn ) appears in work of Wahl–Randal-Williams, where they prove the following theorem (making essential use of work of Hatcher–Vogtmann [HatVo2]). Theorem 6.9 ([WahRW, Proposition 5.3]). The space PB(Fn ) is n−3 2 -connected. Putting it all together. We now prove Theorem I, which asserts that the VIC(Z/ℓ, ±1)module Hk (Aut(ℓ); k) is finitely generated. 44 Proof of Theorem I. We apply Theorem 5.13 to the highly surjective functor Ψ. This theorem has three hypotheses. The first is that the category of VIC(Z/ℓ, ±1)-modules is locally Noetherian, which is Theorem D. The second is that Hk (Aut(Fn ); k) is a finitely generated kmodule for all k ≥ 0, which is a theorem of Culler–Vogtmann [CuVo, Corollary on p. 93]. The third is that the space of F1 -embeddings is highly acyclic, which follows from Lemma 6.8 and Theorem 6.9. We conclude that we can apply Theorem 5.13 and deduce that Hk (Aut(ℓ); k) is a finitely generated VIC(Z/ℓ, ±1)-module for all k ≥ 0, as desired. 6.3 The symplectic group: Theorem J Let OK be the ring of integers in an algebraic number field K, let α ⊂ OK be a proper nonzero ideal, and let k be a Noetherian ring. In this section, we construct SI(OK /α)modules Hk (Sp(OK , α); k) as in Theorem J for all k ≥ 0; see Corollary 6.11. We then prove Theorem J, which says that these are finitely generated modules. Categories and functors. As was noted in Example 1.17, for any ring R the category SI(R) is a complemented category whose monoidal structure is given by the orthogonal direct sum. We have AutSI(R) (Rn ) = Sp2n (R) (n ≥ 0). (6.3) Define a strong monoidal functor Ψ : SI(OK ) → SI(OK /α) by Ψ(V ) = (OK /α) ⊗OK V . This 2 of SI(O ) to the generator (O /α)2 of SI(O /α) (both functor takes the generator OK K K K are equipped with the standard symplectic form). Define Sp(OK , α) = Γ(Ψ). Using the identification in (6.3), we have Sp(OK , α)O2n = Sp2n (OK , α). K Lemma 6.10. The functor Ψ is highly surjective. Proof. This is equivalent to the fact that the map Sp2n (OK ) → Sp2n (OK /α) is surjective for all n ≥ 0, which follows from strong approximation (see, e.g., [PlRa, Chapter 7]). As we discussed in §5.3, Lemma 6.10 has the following corollary. Corollary 6.11. For all k ≥ 0, there exists an SI(OK /α)-module Hk (Sp(OK , α); k) such that Hk (Sp(OK , α); k)(OK /α)2n = Hk (Sp2n (OK , α); k). Identifying the space of embeddings. We now wish to give a concrete description of the 2 -embeddings of O 2n . Letting ı̂ be the symplectic form on O 2n , a symplectic space of OK K K basis for Ok2n is an ordered basis (a1 , b1 , . . . , an , bn ) such that ı̂(ai , aj ) = ı̂(bi , bj ) = 0 and ı̂(ai , bj ) = δij for 1 ≤ i, j ≤ n, where δij is the Kronecker delta. A partial symplectic 2n is a sequence (a , b , . . . , a , b ) of elements of O 2n that can be extended to basis for OK 1 1 p p K 2n , a symplectic basis (a1 , b1 , . . . , an , bn ). The space of partial symplectic bases for OK denoted PSBn (OK ), is the semisimplicial set whose (p − 1)-cells are partial symplectic bases (a1 , b1 , . . . , ap , bp ). 2 -embeddings of O 2n is isomorphic to PSB (O ). Lemma 6.12. The space of OK n K K 2 -embeddings of O 2n are in bijection Proof. Fix some p ≥ 0. The p-simplices of the space of OK K p+1 2n ). We can define a set map with elements of HomSI(OK ) (OK , OK p+1 2n η : HomSI(OK ) (OK , OK ) → (PSBn (OK ))p p+1 2n ) of the standard symplectic by letting η(f ) be the image under f ∈ HomSI(OK ) (OK , OK p+1 basis for OK . Clearly η is a bijection compatible with the semisimplicial structure. 45 f ′ (S ′ ) τ′ f ′ (τ ) f ′ (f (S)) τ0 S f0 (S) Figure 1: The LHS shows how to compose morphisms (f, τ ) : S → S ′ and (f ′ , τ ′ ) : S ′ → S ′′ . The picture depicts S ′′ . The RHS shows the identity morphism (f0 , τ0 ) : S → S, which pushes ∂S across a collar neighborhood. The space PSBn (OK ) was introduced by Charney [Cha3], who proved the following theorem. Theorem 6.13 ([Cha3, Corollary 3.3]). The space PSBn (OK ) is n−6 2 -connected. Remark 6.14. Just like for PBn (OK ) in §6.1, the definition of PSBn (R) is different from Charney’s, but can be proved equivalent for Dedekind domains using the ideas from [Re]. Putting it all together. We now prove Theorem J, which asserts that the SI(O/α)-module Hk (Sp(OK , α); k) is finitely generated. Proof of Theorem J. We apply Theorem 5.13 to the highly surjective functor Ψ. This theorem has three hypotheses. The first is that the category of SI(OK /α)-modules is locally Noetherian, which is Theorem E. The second is that Hk (Sp2n (OK , α); k) is a finitely generated k-module for all k ≥ 0, which is a theorem of Borel–Serre [BoSe]. The third is that the 2 -embeddings is highly acyclic, which follows from Lemma 6.12 and Theorem 6.13. space of OK We conclude that we can apply Theorem 5.13 and deduce that Hk (Sp(OK , α); k) is a finitely generated SI(OK /α)-module for all k ≥ 0, as desired. 6.4 The category of surfaces In preparation for proving Theorem K (which concerns congruence subgroups of the mapping class group), this section is devoted to a weak complemented category Surf of surfaces. This category was introduced by Ivanov [I, §2.5]; our contribution is to endow it with a monoidal structure. It is different from previous monoidal categories of surfaces (for instance, in [Mil]), which do not include morphisms between non-isomorphic surfaces. A related monoidal category of surfaces was constructed independently by Wahl–Randal-Williams [WahRW, §5.6], though their morphisms are different from ours. The category Surf. The objects of the category Surf are pairs (S, η) as follows. • S is a compact oriented surface with one boundary component. • η : [0, 1] → ∂S is an embedding such that S lies to the left of Im(η). We will call η the boundary arc of S. This endows S with a natural basepoint, namely η(1/2) ∈ ∂S. To keep our notation from getting out of hand, we will usually refer to (S, η) simply as S, leaving η implicit. For S, S ′ ∈ Surf, the set HomSurf (S, S ′ ) consists of homotopy classes of pairs (f, τ ) as follows. • f : S → Int(S ′ ) is an orientation-preserving embedding. • τ is a properly embedded arc in S ′ \ Int(f (S)) which goes from the basepoint of S ′ to the image under f of the basepoint of S. If (f, τ ) : S → S ′ and (f ′ , τ ′ ) : S ′ → S ′′ are morphisms, then (f ′ , τ ′ ) ◦ (f, τ ) = (f ′ ◦ f, τ ′ · f ′ (τ )) : S → S ′′ , 46 S1 S2 R τ1 R′ λ τ2 Figure 2: The upper left figure is S1 ⊛ S2 , divided into the three subsurfaces S1 and S2 and R (R is shaded). The bottom left figure is S1′ ⊛ S2′ ; here the rectangle is labeled R′ . For i = 1, 2, the morphism (fi , τi ) : Si → Si′ is depicted. The right hand figure shows how S1 ⊛ S2 is embedded in S1′ ⊛ S2′ . where arcs are composed as in the fundamental groupoid (this goes from left to right rather than right to left as in function composition; see Figure 1). The identity morphism of S is the morphism (f0 , τ0 ) depicted in Figure 1; the embedding f0 “pushes” ∂S across a collar neighborhood. Remark 6.15. The boundary arc of an object of Surf is necessary to define the monoidal structure on Surf. However, aside from providing a basepoint it plays little role in the structure of Surf. Indeed, if S, S ′ ∈ Surf are objects with the same underlying surface, then ∼ = it is easy to see that there exists an isomorphism (f, τ ) : S → S ′ . Automorphisms. Ivanov proved the following theorem. Theorem 6.16 ([I, §2.6]). Let S ∈ Surf. Then AutSurf (S) is isomorphic to the mapping class group of S. Remark 6.17. One potentially confusing point here is that Ivanov allows his surfaces to have multiple boundary components. The theorem in [I, §2.6] is more complicated than Theorem 6.16, but it reduces to Theorem 6.16 when S has one boundary component. A bifunctor. Let R = [0, 3] × [0, 1] ⊂ R2 . Consider objects S1 and S2 of Surf. Define S1 ⊛ S2 to be the following object of Surf. For i = 1, 2, let ηi : [0, 1] → Si be the boundary arc of Si . Then S1 ⊛ S2 is the result of gluing S1 and S2 to R as follows. • For t ∈ [0, 1], identify η1 (t) ∈ S1 and (0, t) ∈ R. • For t ∈ [0, 1], identify η2 (t) ∈ S2 and (3, 1 − t) ∈ R. We have 1 − t in the above to ensure that the resulting surface is oriented. The boundary arc of S1 ⊛ S2 is t 7→ (1 + t, 0) ∈ R. Lemma 6.18. The operation ⊛ is a bifunctor on Surf. Proof. For i = 1, 2, let (fi , τi ) : Si → Si′ be a Surf-morphism. We must construct a canonical morphism (g, λ) : S1 ⊛ S2 −→ S1′ ⊛ S2′ . The based surface S1 ⊛ S2 consists of three pieces, namely S1 and S2 and R. Identify all three of these pieces with their images in S1 ⊛ S2 . Similarly, S1′ ⊛ S2′ consists of three pieces, namely S1′ and S2′ and a rectangle which we will call R′ to distinguish it from R ⊂ S1 ⊛ S2 , and we will identify these three pieces with their images in S1′ ⊛ S2′ . Let g : S1 ⊛ S2 → S1′ ⊛ S2′ be the embedding depicted in Figure 2, so g(R) is a regular neighborhood in S1′ ⊛ S2′ \ Int(f1 (S1 ) ∪ f2 (S2 )) of the union of τ1 and τ2 and the arc t 7→ (3t, 1/2) in R′ = [0, 3] × [0, 1] ⊂ R2 . Also, let λ be the arc shown in Figure 2. It is clear that (g, λ) is well-defined up to homotopy. 47 S1 S1 S2 S2 S3 S3 Figure 3: The LHS is (S1 ⊛ S2 ) ⊛ S3 and the RHS is S1 ⊛ (S2 ⊛ S3 ). T λ τ f (S1 ) Figure 4: The LHS shows f (S1 ) and T together with the arcs τ and λ. The RHS shows the desired morphism T ⊛ S1 → S2 . Monoidal structure. We now come to the following result. Lemma 6.19. The category Surf is a monoidal category (not symmetric!) with respect to the bifunctor ⊛. Proof. Clearly a disc (with some boundary arc; any two such boundary arcs determine isomorphic objects of Surf) is a two-sided identity for ⊛. Associativity is clear from Figure 3. The various diagrams that need to commute are all easy exercises. Weak complemented category. We finally come to the main result of this section. Proposition 6.20. The monoidal category (Surf, ⊛) is a weak complemented category with generator a one-holed torus. Proof. If S11 is a one-holed torus with a fixed boundary arc and S is an arbitrary object g of Surf, then letting g be the genus of S we clearly have S ∼ = ⊛i=1 S11 . It follows that S11 is a generator of (Surf, ⊛). Now let (f, τ ) : S1 → S2 be a Surf-morphism. We must construct a complement to (f, τ ) which is unique up to precomposing the inclusion map by an isomorphism. Define T to be the complement of an open regular neighborhood in S2 of ∂S2 ∪ τ ∪ f (S1 ). Thus T is a compact oriented surface with one boundary component. Fix a boundary arc of T . As is shown in Figure 4, there exists a Surf-morphism (g, λ) : T → S2 such that T is a complement to (f, τ ). Uniqueness of this complement is an easy exercise. 6.5 The mapping class group: Theorem K Fix ℓ ≥ 2, and let k be a Noetherian ring. In this section, we construct SI(Z/ℓ)-modules Hk (MCG(ℓ); k) as in Theorem K for all k ≥ 0; see Corollary 6.22. We then prove Theorem K, which says that Hk (MCG(ℓ); k) is a finitely generated SI(Z/ℓ)-module for all k ≥ 0. Categories and functors. Let (Surf, ⊛) be the weak complemented category of surfaces discussed in §6.4 (see Proposition 6.20). For all g ≥ 0, fix a boundary arc of Sg1 . This allows us to regard each Sg1 as an object of Surf. By Theorem 6.16, we have AutSurf (Sg1 ) = MCG1g 48 (g ≥ 0). (6.4) Figure 5: The LHS shows a morphism (g, λ) : ⊛2i=0 S11 → S51 . The canonical morphisms (hj , δj ) : S11 → ⊛2i=0 S11 are shown, and the union of the rectangles involved in forming ⊛2i=0 S11 is shaded. The RHS shows the associated tethered torus system. In Example 1.17 we noted that the category SI(Z/ℓ) is a complemented category whose monoidal structure is given by the orthogonal direct sum. There is a strong monoidal functor Ψ : Surf → SI(Z/ℓ) defined via the formula Ψ(S) = H1 (S; Z/ℓ); here H1 (S; Z/ℓ) is equipped with the symplectic algebraic intersection pairing. This functor takes the generator S11 of Surf to the generator H1 (S11 ; Z/ℓ) ∼ = (Z/ℓ)2 for SI(Z/ℓ). Define MCG(ℓ) = Γ(Ψ). Using the identification in (6.4), we have MCG(ℓ)(Z/ℓ)2g = MCG1g (ℓ). Lemma 6.21. The functor Ψ is highly surjective. Proof. This is equivalent to the fact that the map MCG1g → Sp2g (Z/ℓ) arising from the action of MCG1g on H1 (Sg1 ; Z/ℓ) is surjective for all g ≥ 0. This is classical. For instance, it can be factored as MCG1g → Sp2g (Z) → Sp2g (Z/ℓ); the map MCG1g → Sp2g (Z) is surjective by [FaMar, §6.3.2], and the map Sp2g (Z) → Sp2g (Z/ℓ) is surjective by strong approximation (see, e.g., [PlRa, Chapter 7]). As we discussed in §5.3, Lemma 6.21 has the following corollary. Corollary 6.22. For all k ≥ 0, there exists an SI(Z/ℓ)-module Hk (MCG(ℓ); k) such that Hk (MCG(ℓ); k)(Z/ℓ)2g = Hk (MCG1g (ℓ); k). Identifying the space of embeddings. We now wish to give a concrete description of the space of S11 -embeddings of Sg1 . A tethered torus system on Sg1 is a sequence ((f0 , τ0 ), . . . , (fp , τp )) as follows (see the right hand side of Figure 5). • Each (fi , τi ) is a morphism from S11 to Sg1 . • After homotoping the (fi , τi ), the following hold. Let ∗ ∈ ∂Sg1 be the basepoint. – (fi (S11 ) ∪ τi ) ∩ (fj (S11 ) ∪ τj ) = {∗} for all distinct 0 ≤ i, j ≤ p. – Going clockwise, the τi leave the basepoint ∗ in their natural order (i.e., τi leaves before τj when i < j); see Remark 6.23 below for more on this. The space of tethered tori on Sg1 , denoted TTg , is the semisimplicial set whose p-simplices are tethered torus systems ((f0 , τ0 ), . . . , (fp , τp )). Remark 6.23. The condition on the order in which the τi leave the basepoint is needed because of the fact that the monoidal structure on (Surf, ⊛) is not symmetric; in our proof below, a p-simplex of TTg corresponds to a morphism ⊛pi=0 S11 → Sg1 , and the ordering on the τi reflects the ordering on the ⊛-factors. Lemma 6.24. The space of S11 -embeddings of Sg1 is isomorphic to TTg . Proof. Consider a morphism (g, λ) : ⊛pi=0 S11 → Sg1 . For 0 ≤ j ≤ p, let (hj , δj ) : S11 → ⊛pi=0 S11 be the canonical map coming from the j th term. Then ((g ◦ h0 , λ · g(δ0 )), . . . , (g ◦ hp , λ · g(δp ))) is a tethered torus system (see Figure 5). This gives an isomorphism between the space of S11 -embeddings of Sg1 and the space of tethered tori. 49 Using results of Hatcher–Vogtmann [HatVo3], we will prove the following in §6.6. Theorem 6.25. The space TTg is g−3 2 -connected. Putting it all together. We now prove Theorem K, which asserts that the SI(Z/ℓ)-module Hk (MCG(ℓ); k) is finitely generated. Proof of Theorem K. We apply Theorem 5.13 to the highly surjective functor Ψ. This theorem has three hypotheses. The first is that the category of SI(Z/ℓ)-modules is locally Noetherian, which is Theorem E. The second is that Hk (MCG1g (ℓ); k) is a finitely generated k-module for all k ≥ 0. This follows easily from the fact that the moduli space of curves is a quasi-projective variety; see [FaMar, p. 127] for a discussion. The third is that the space of S11 -embeddings is highly acyclic, which follows from Lemma 6.24 and Theorem 6.25. We conclude that we can apply Theorem 5.13 and deduce that Hk (MCG(ℓ); k) is a finitely generated SI(Z/ℓ)-module for all k ≥ 0, as desired. 6.6 The space of tethered tori Our goal is to prove Theorem 6.25, which asserts that TTg is g−3 2 -connected. We will deduce this from work of Hatcher–Vogtmann. Recall that we have endowed each Sg1 with a basepoint ∗ ∈ ∂Sg1 . A tethered chain on Sg1 is a triple (α, β, τ ) as follows. • α and β are oriented properly embedded simple closed curves on Sg1 that intersect once transversely with a positive orientation. • τ is a properly embedded arc that starts at ∗, ends at a point of β \ α, and is otherwise disjoint from α ∪ β. We will identify homotopic tethered chains. The space of tethered chains, denoted TCg , is the semisimplicial set whose p-simplices are sequences ((α0 , β0 , τ0 ), . . . , (αp , βp , τp )) of tethered chains with the following properties. • They can be homotoped such that they only intersect at ∗. • Going clockwise, the τi leave the basepoint ∗ in their natural order (i.e., τi leaves before τj when i < j). We remark that any unordered sequence of tethered chains that satisfies the first condition can be uniquely ordered such that it satisfies the second. The complex TCg was introduced by Hatcher–Vogtmann [HatVo3], who proved the following theorem. Theorem 6.26 (Hatcher–Vogtmann, [HatVo3]). The space TCg is g−3 2 -connected. Proof of Theorem 6.25. We begin by defining a map π 0 : TC0g → TT0g . Fix once and for all a tethered chain (A, B, Γ) in S11 . Consider a tethered chain (α, β, τ ) ∈ TC0g . Let T be a closed regular neighborhood of α ∪ β. Choosing T small enough, we can assume that τ only intersects ∂T once. Write τ = τ ′ · τ ′′ , where τ ′ is the segment of τ from the basepoint of Sg1 to ∂T and τ ′′ is the segment of τ from ∂T to β. Using the change of coordinates principle of [FaMar, §1.3], there exists an orientation-preserving homeomorphism f : S11 → T such that f (A) = α and f (B) = β and f (Γ) = τ ′′ . By [FaMar, Proposition 2.8] (the “Alexander method”), these conditions determine f up to homotopy. The pair (f, τ ′ ) is a tethered torus, and we define π 0 ((α, β, τ )) = (f, τ ′ ) ∈ TT0g . It is clear that this is well-defined and surjective (but not injective). The map π 0 extends over the higher-dimensional simplices of TCg in an obvious way to define a map π : TCg → TTg . Arbitrarily pick a set map φ0 : TT0g → TC0g such that π 0 ◦ φ0 = id. If ((f0 , τ0 ), . . . , (fp , τp )) is a simplex of TTg and (αi , βi , τi′ ) = φ0 ((fi , τi )) for 0 ≤ i ≤ p, then by construction we have αi , βi ⊂ Im(fi ). Since the images of the fi are 50 disjoint, we conclude that ((α0 , β0 , τ0′ ), . . . , (αp , βp , τp′ )) is a simplex of TCg . Thus φ0 extends over the higher-dimensional simplices of TTg to define a map φ : TTg → TCg satisfying π ◦ φ = id. This implies that π induces a surjective map on all homotopy groups, so by Theorem 6.26 we deduce that TTg is g−3 2 -connected. References [AtMac] [Be] [Bo] [BoSe] [Br] [Cha1] [Cha2] [Cha3] [Ch1] [Ch2] [ChEFa] [ChEFaNag] [ChFa] [ChPu] [CuVo] [DPu] [Dj1] [Dj2] [Dj3] [DjVe1] [DjVe2] [DrKu] [Dw] [Fa] M. F. Atiyah and I. G. Macdonald, Introduction to commutative algebra, Addison-Wesley Publishing Co., Reading, MA, 1969. S. Betley, Twisted homology of symmetric groups, Proc. Amer. Math. Soc. 130 (2002), no. 12, 3439–3445. A. Borel, Stable real cohomology of arithmetic groups, Ann. Sci. École Norm. Sup. (4) 7 (1974), 235–272 (1975). A. Borel and J.-P. Serre, Corners and arithmetic groups, Comment. Math. Helv. 48 (1973), 436–491. K. S. Brown, Cohomology of Groups, corrected reprint of the 1982 original, Graduate Texts in Mathematics, 87, Springer, New York, 1994. R. M. Charney, Homology stability for GLn of a Dedekind domain, Invent. Math. 56 (1980), no. 1, 1–17. R. Charney, On the problem of homology stability for congruence subgroups, Comm. Algebra 12 (1984), no. 17-18, 2081–2123. R. Charney, A generalization of a theorem of Vogtmann, J. Pure Appl. Algebra 44 (1987), no. 1-3, 107–125. T. Church, Homological stability for configuration spaces of manifolds, Invent. Math. 188 (2012), no. 2, 465–504, arXiv:1103.2441v3. T. Church, personal communication. T. Church, J. S. Ellenberg and B. Farb, FI-modules and stability for representations of symmetric groups, Duke Math. J. 164 (2015), no. 9, 1833–1910, arXiv:1204.4533v4. T. Church, J. S. Ellenberg, B. Farb and R. Nagpal, FI-modules over Noetherian rings, Geom. Topol. 18 (2014), no. 5, 2951–2984, arXiv:1210.1854v2. T. Church and B. Farb, Representation theory and homological stability, Adv. Math. 245 (2013), 250–314, arXiv:1008.1368v3. T. Church and A. Putman, Generating the Johnson filtration, Geom. Topol. 19 (2015), no. 4, 2217–2255, arXiv:1311.7150v2. M. Culler and K. Vogtmann, Moduli of graphs and automorphisms of free groups, Invent. Math. 84 (1986), no. 1, 91–119. M. Day and A. Putman, On the second homology group of the Torelli subgroup of Aut(Fn ), preprint 2014, arXiv:1408.6242v2. A. Djament, Foncteurs en grassmanniennes, filtration de Krull et cohomologie des foncteurs, Mém. Soc. Math. Fr. (N.S.) No. 111 (2007), xxii+213 pp. A. Djament, Le foncteur V 7→ F2 [V ]⊗3 entre F2 -espaces vectoriels est noethérien, Ann. Inst. Fourier (Grenoble) 59 (2009), no. 2, 459–490, arXiv:math/0702667v4. A. Djament, Sur l’homologie des groupes unitaires à coefficients polynomiaux, J. K-Theory 10 (2012), no. 1, 87–139. A. Djament and C. Vespa, Sur l’homologie des groupes orthogonaux et symplectiques à coefficients tordus, Ann. Sci. Éc. Norm. Supér. (4) 43 (2010), no. 3, 395–459, arXiv:0808.4035v4. A. Djament and C. Vespa, Sur l’homologie des groupes d’automorphismes des groupes libres à coefficients polynomiaux, Comment. Math. Helv. 90 (2015), no. 1, 33–58. J. Draisma and J. Kuttler, Bounded-rank tensors are defined in bounded degree, Duke Math. J. 163 (2014), no. 1, 35–63, arXiv:1103.5336v2. W. G. Dwyer, Twisted homological stability for general linear groups, Ann. of Math. (2) 111 (1980), no. 2, 239–251. B. Farb, Representation stability, Proceedings of the 2014 International Congress of Mathematicians. Volume II, 1173–1196, arXiv:1404.4065v1. 51 [FaMar] [FraFriPiSch] [FraTo] [Fri] [Ga] [GanLi] [Gr] [Har] [Hat] [HatVo1] [HatVo2] [HatVo3] [HatWah] [Hi] [I] [Kr] [Ku1] [Ku2] [LeSz] [LySc] [MadWe] [Mc] [Mil] [MirVa] [Nak] [PlRa] B. Farb and D. Margalit, A primer on mapping class groups, Princeton Mathematical Series, 49, Princeton Univ. Press, Princeton, NJ, 2012. V. Franjou, E. Friedlander, T. Pirashvilli, and L. Schwartz, Rational representations, the Steenrod algebra and functor homology, Panoramas et Synthèses, 16, Soc. Math. France, Paris, 2003. V. Franjou and A. Touzé (eds.), Lectures on functor homology, Progress in Mathematics, 311, Birkhäuser/Springer, Cham, 2015. G. Friedman, Survey article: an elementary illustrated introduction to simplicial sets, Rocky Mountain J. Math. 42 (2012), no. 2, 353–423. S. Galatius, Stable homology of automorphism groups of free groups, Ann. of Math. (2) 173 (2011), no. 2, 705–768, arXiv:math/0610216v3. W. L. Gan, L. Li, Noetherian property of infinite EI categories, New York J. Math. 21 (2015), 369–382, arXiv:1407.8235v3. D. Grayson, Higher algebraic K-theory. II (after Daniel Quillen), in Algebraic K-theory (Proc. Conf., Northwestern Univ., Evanston, Ill., 1976), 217–240. Lecture Notes in Math., 551, Springer, Berlin. J. L. Harer, Stability of the homology of the mapping class groups of orientable surfaces, Ann. of Math. (2) 121 (1985), no. 2, 215–249. A. Hatcher, Homological stability for automorphism groups of free groups, Comment. Math. Helv. 70 (1995), no. 1, 39–62. A. Hatcher and K. Vogtmann, Cerf theory for graphs, J. London Math. Soc. (2) 58 (1998), no. 3, 633–655. A. Hatcher and K. Vogtmann, Homology stability for outer automorphism groups of free groups, Algebr. Geom. Topol. 4 (2004), 1253–1272, arXiv:math/0406377v2. A. Hatcher and K. Vogtmann, Tethers and homology stability for surfaces, preprint 2015, arXiv:1508.04334v2. A. Hatcher and N. Wahl, Stabilization for mapping class groups of 3-manifolds, Duke Math. J. 155 (2010), no. 2, 205–269, arXiv:0709.2173v4. G. Higman, Ordering by divisibility in abstract algebras, Proc. London Math. Soc. (3) 2 (1952), 326–336. N. V. Ivanov, On the homology stability for Teichmüller modular groups: closed surfaces and twisted coefficients, in Mapping class groups and moduli spaces of Riemann surfaces (Göttingen, 1991/Seattle, WA, 1991), 149–194, Contemp. Math., 150, Amer. Math. Soc., Providence, RI. J. B. Kruskal, The theory of well-quasi-ordering: A frequently discovered concept, J. Combinatorial Theory Ser. A 13 (1972), 297–305. N. J. Kuhn, Generic representations of the finite general linear groups and the Steenrod algebra. II, K-Theory 8 (1994), no. 4, 395–428. N. J. Kuhn, Invariant subspaces of the ring of functions on a vector space over a finite field, J. Algebra 191 (1997), no. 1, 212–227. R. Lee and R. H. Szczarba, On the homology and cohomology of congruence subgroups, Invent. Math. 33 (1976), no. 1, 15–53. R. C. Lyndon and P. E. Schupp, Combinatorial group theory, Springer, Berlin, 1977. I. Madsen and M. Weiss, The stable moduli space of Riemann surfaces: Mumford’s conjecture, Ann. of Math. (2) 165 (2007), no. 3, 843–941, arXiv:math/0212321v3. D. McDuff, Configuration spaces of positive and negative particles, Topology 14 (1975), 91–107. E. Y. Miller, The homology of the mapping class group, J. Differential Geom. 24 (1986), no. 1, 1–14. B. Mirzaii and W. van der Kallen, Homology stability for unitary groups, Doc. Math. 7 (2002), 143–166, arXiv:math/0111117v1. M. Nakaoka, Decomposition theorem for homology groups of symmetric groups, Ann. of Math. (2) 71 (1960), 16–42. V. Platonov and A. Rapinchuk, Algebraic groups and number theory, translated from the 1991 Russian original by Rachel Rowen, Pure and Applied Mathematics, 139, Academic Press, Boston, MA, 1994. 52 [Po1] [Po2] [Po3] [Pu1] [Pu2] [Re] [SamSn1] [SamSn2] [SamSn3] [SamSn4] [Sat] [Sch] [Sco] [Va] [WahRW] [Wi] G. M. L. Powell, The Artinian conjecture for I ⊗2 , J. Pure Appl. Algebra 128 (1998), no. 3, 291–310. G. M. L. Powell, The structure of indecomposable injectives in generic representation theory, Trans. Amer. Math. Soc. 350 (1998), no. 10, 4167–4193. G. M. L. Powell, On Artinian objects in the category of functors between F2 -vector spaces, in Infinite length modules (Bielefeld, 1998), 213–228, Trends Math, Birkhäuser, Basel. A. Putman, The Picard group of the moduli space of curves with level structures, Duke Math. J. 161 (2012), no. 4, 623–674, arXiv:0908.0555v3. A. Putman, Stability in the homology of congruence subgroups, Invent. Math. 202 (2015), no. 3, 987–1027, arXiv:1201.4876v5. I. Reiner, Unimodular complements, Amer. Math. Monthly 63 (1956), 246–247. S. V Sam and A. Snowden, GL-equivariant modules over polynomial rings in infinitely many variables, Trans. Amer. Math. Soc. 368 (2016), 1097–1158, arXiv:1206.2233v3. S. V Sam and A. Snowden, Introduction to twisted commutative algebras, preprint 2012, arXiv:1209.5122v1. S. V Sam and A. Snowden, Stability patterns in representation theory, Forum Math. Sigma 3 (2015), e11, 108 pp., arXiv:1302.5859v2. S. V Sam and A. Snowden, Gröbner methods for representations of combinatorial categories, J. Amer. Math. Soc. 30 (2017), 159–203, arXiv:1409.1670v3. T. Satoh, The abelianization of the congruence IA-automorphism group of a free group, Math. Proc. Cambridge Philos. Soc. 142 (2007), no. 2, 239–248. L. Schwartz, Unstable modules over the Steenrod algebra and Sullivan’s fixed point set conjecture, Chicago Lectures in Mathematics, Univ. Chicago Press, Chicago, IL, 1994. A. Scorichenko, Stable K-theory and functor homology over a ring, thesis 2000. W. van der Kallen, Homology stability for linear groups, Invent. Math. 60 (1980), no. 3, 269–295. N. Wahl and O. Randal-Williams, Homological stability for automorphism groups, preprint 2015, arXiv:1409.3541v3. J. Wilson, FIW -modules and stability criteria for representations of the classical Weyl groups, J. Algebra 420 (2014), 269–332, arXiv:1309.3817v2. Andrew Putman Department of Mathematics Rice University, MS 136 6100 Main St. Houston, TX 77005 Steven V Sam Department of Mathematics University of California, Berkeley 933 Evans Hall Berkeley, CA 94720 Current address: Department of Mathematics University of Notre Dame 279 Hurley Hall South Bend, IN 46556 [email protected] Current address: Department of Mathematics University of Wisconsin, Madison 480 Lincoln Drive Madison, WI 53706 [email protected] 53
4math.GR
arXiv:1803.04292v1 [cs.DS] 12 Mar 2018 Geodabs – Trajectory Indexing Meets Fingerprinting at Scale Bertil Chapuis Benoı̂t Garbinato Université de Lausanne [email protected] Université de Lausanne [email protected] Abstract—Finding trajectories and discovering motifs that are similar in large datasets is a central problem for a wide range of applications. Solutions addressing this problem usually rely on spatial indexing and on the computation of a similarity measure in polynomial time. Although effective in the context of sparse trajectory datasets, this approach is too expensive in the context of dense datasets, where many trajectories potentially match with a given query. In this paper, we apply fingerprinting, a copy-detection mechanism used in the context of textual data, to trajectories. To this end, we fingerprint trajectories with geodabs, a construction based on geohash aimed at trajectory fingerprinting. We demonstrate that by relying on the properties of a space filling curve geodabs can be used to build sharded inverted indexes. We show how normalization affects precision and recall, two key measures in information retrieval. We then demonstrate that the probabilistic nature of fingerprinting has a marginal effect on the quality of the results. Finally, we evaluate our method in terms of performances and show that, in contrast with existing methods, it is not affected by the density of the trajectory dataset and that it can be efficiently distributed. I. I NTRODUCTION The booming trend of ubiquitous computing is massively affecting the volume of data we produce today, in particular via the location traces, or trajectories, our smartphones generate. Such trajectories consist of sequences of locations produced by mobile users via their GPS-capable devices. In this paper, we address two key problems associated with dense trajectory datasets: finding similar trajectories and discovering common motifs in trajectories. These problems are indeed at the heart of many location-based application scenarios, such as car sharing, traffic forecasting, public-transport optimization, etc. By dense trajectory dataset, we mean one containing many (partially) overlapping trajectories. Consider, for instance, a city like London, congested with roads and streets: the trajectories associated with people traveling through it every day have a high probability of overlapping, at least partially. This is the type of trajectory data set we consider in this paper. A common approach to solving these problems consists in splitting the solution into the following two steps: 1) Select candidate trajectories by using a spatial index 2) Compare these trajectories by using a distance measure More precisely, Step 1 consists in querying a spatial index, e.g., a quadtree [11], an r-tree [13], a tb-tree [24], a setitree [4] or a k-d tree [1], in order to select candidate trajectories that are similar or that contain common motifs. Such spacepartitioning data structures are typically queried with bounding intervals and sometimes a direction. Yet they have a major drawback: as their bounding strategy are coarse grained, their ability to discriminate long trajectories is not very effective. This results in many irrelevant trajectories being selected. Step 2 then consists in using a distance measure, such as the Discrete Fréchet Distance (DFD) [9] or the Dynamic Time Warping distance (DTW) [28], in order to further discriminate the candidate trajectories selected in Step 1. DFD and DTW give good qualitative results and many systems have adopted them to measure the distance between trajectories. However, computing DFD or DTW for a pair of trajectories of cumulated length n has a complexity of O(n2 ). Furthermore, discovering similar motifs in a pair of trajectories requires computing DFD for n4 pairs of sub-trajectories [27]. In summary, when faced with a dense set of trajectories, traditional spatial-indexing structures tend to select many irrelevant trajectories, upon which a costly distance measure such as DFD or DTW must then be computed. As a consequence, this combination of techniques results in serious performance issues when used on dense datasets. A. Fingerprinting to the Rescue We argue that the similarity between trajectories and textual data has not been fully exploited. A text can be seen as a sequence of words, and a trajectory can be seen as a sequence of points. It is then known that slight variations in word form, e.g., singular vs. plural, conjugation, etc., must be normalized to compare similar but not strictly identical texts. This is necessary, for instance, to detect plagiarism. Similarly, minor variations in the location accuracy and sampling rate, which are known to happen when using GPS devices, can compromise the detection of similar trajectories. Hence, by discretizing trajectories, e.g., by using geohashing [23], the negative effect of such minor variations can be mitigated. A first attempt to exploit this similarity can be found in some geographical information systems that rely on geohashing to create inverted indexes of landmarks. For example, an opensource search engine called Elastic and adopted by foursquare, relies on this approach.1 Google even conceived an alternative to geohash called S2 that provides the additional guarantee that the surfaces covered by hashes have uniform areas.2 1 https://elastic.co 2 https://s2geometry.io Query earth mars Result 4 12 17 25 Dictionary earth Shard 1 Postings 4 17 25 sun 8 12 17 19 25 moon 3 15 16 25 41 mars 12 25 … 47 earth 17 sun 12 19 moon 15 16 earth 4 25 sun 8 17 moon 3 25 mars 25 mars 12 … … … … … Shard 2 (a) Inverted Index 25 41 (b) Sharding an Inverted Index Fig. 1: Indexing and Querying Textual Data More recently, geohashing has been used for sub-sampling and clustering location traces [26], [7]. As of today, however, no research exploits the similarity between trajectories and textual data in terms of their sequentiality, i.e., the fact that sequences of locations are similar to sequence of words. Extending the analogy between textual data and trajectories is our main contribution in this paper. More precisely, in the context of textual data, word indexing is known to be ineffective in detecting similarities between large portions of a text, even more so between complete documents. This is where fingerprinting comes to the rescue, by computing hashes on groups of contiguous words and by using the number of common fingerprints between two documents as a distance measure. An inverted-index made of fingerprints that point to lists of document identifiers can then be used to efficiently retrieve documents that share some of their content. By analogy, fingerprinting can be used for finding similar trajectories and discovering similar motifs. Intuitively, fingerprinting captures the temporal dimension of trajectories by taking into account the ordering of their points. To our knowledge, the possibilities offered by this observation have not yet been explored. B. Contribution and Roadmap We introduce geodabs, a special kind of fingerprint that can be used for indexing and discovering similarities in dense trajectory datasets. Geodabs are extracted from trajectories with a fingerprinting algorithm called winnowing [25]. Geodabs combine hashing and geohashing to achieve two key properties. First, hashing addresses the discrimination issue associated with regular spatial indexation techniques. Second, geohashing enables us to distribute the index accross several nodes in a balanced fashion. As a result, geodabs can be used to create effective and scalable trajectory indexes. The remainder of the paper is organized as follows. We formally introduce the problems addressed in this work, together with some basic definitions, in Section II. Then, in Section III, we provide the background required to understand our approach and we discusse related work. In Section IV, we describe geodabs, our fingerprinting based-solution. In Section V, we shows how normalization affects two key measures in information retrieval, namely precision and recall. Finally, in Section VI, we evaluates geodabs both in terms of efficiency and effectiveness. II. T RAJECTORY- BASED QUERYING In this section, we introduce some basics definitions and formally state the problem addressed in this paper. A. Moving Objects, Trajectories and Distances Every object located on earth has a real position that can be expressed with a latitude-longitude point p = (ϕ, λ ). The real position p of a moving object at time t can be expressed with a continuous-time function P(t) = p. In practice, the points forming a trajectory are obtained with some GPS-tracking device, which reduces the continuous-time function P to a discrete trajectory S with a certain degree of accuracy. Hence, formally, a trajectory is modeled as a sequence of points S = hs1 , ..., sn i. The length of a trajectory is denoted length(S). A motif (sub-trajectory) of S is denoted S̄. Several methods enable us to compute the distance between two trajectories. Depending on the method, the distance has different scales and meanings. Here, we generalise this idea with the distance function δ (Si , S j ) = d, with d ∈ R+ 0 . The smaller the distance between a pair of trajectories, the greater their similarity is. B. Finding Similar Trajectories and Motifs Here, we address the problems of finding similar trajectories and of discovering common motifs in trajectories. As we target dense trajectory datasets, we express these problems in terms of ranked retrieval, i.e., many trajectories are expected to match a given query. In addition, ranked retrieval also implies sorting the matching trajectories according to some criterion, in order to place those most relevant early in the result list. With this in mind, we can now formally define the two problems addressed in this paper. 1) Finding similar trajectories: Given a trajectory dataset D = {S1 , ..., Sn }, a trajectory Sq ∈ / D, a distance function δ and a distance ∆max , the problem consists in returning an ordered set R ⊆ D where S ∈ R ⇒ δ (Sq , S) ≤ ∆max . The ordering in R is then defined as follows: ∀Si ∈ R and ∀S j ∈ R with i < j, we have that δ (Sq , Si ) ≤ δ (Sq , S j ). That is, trajectories in R are at a maximum distance ∆max from trajectory query Sq and they are ordered by their distance with respect to Sq . 2) Discovering common motifs in trajectories: Given two trajectories Si and S j , a distance function δ and a length l, the problem consists in returning a pair of motifs (S̄i , S̄ j ) such that length(S̄i ) = length(S̄ j ) = l ∧ 6 ∃(S̄0 i , S̄0 j ) for which δ (S̄0 i , S̄0 j ) < δ (S̄i , S̄ j ). That is, among all the pairs of motifs of Si and S j of length l, (S̄i , S̄ j ) is the one with the smallest distance between them. III. BACKGROUND AND RELATED WORK A. Information Retrieval 1) Boolean Retrieval: As highlighted in Figure 1 (a), in its simplest form, an inverted index is usually composed of terms that point to collections of document identifiers called postings lists [21]. Boolean queries can then be used to retrieve all the documestnts that contain a set of words. Optionally, a posting list can also contain the position of the term in the document. This positional information can then be used to search for sub-sequences in documents. However, when searching for long sub-sequences of terms, this approach showcases poor performances. In the context of trajectory indexing, we replace the terms of the inverted index with features, called geodabs, extracted from trajectories. 2) Ranked Retrieval: In ranked retrieval, many records match with the query specified by the user, and it is common to rank the results according to a similarity measure. Therefore, the user can begin by considering the most relevant results and then decide to retrieve the remaining ones if necessary. In the context of textutal data, the union and the intersection of two sets of words F and G can be used to derive relevant similarity measures. For example, the Jaccard coefficient J(F, G) is commonly used to gauge the similarity between texts and rank results [21]. Interestingly, the Jaccard distance dJ (F, G) expressed in Equation 1 is complementary to the Jaccard coefficient and is proven to obey the triangular inequality [17]. Therefore, this distance can be used in conjunction with an index of pre-computed distances to efficiently prune candidates. In our context, we use the Jaccard distance to implement function δ (Sq , S j ) and rank the trajectories retrieved from the inverted index. dJ (F, G) = 1 − J(F, G) = 1 − |F ∩ G| |F ∪ G| (1) 3) Normalization: It is worth noting that, in many cases, terms can be different but convey similar semantics or meaning. In general, the process of mitigating these differences is referred to as normalization [21]. For example, a common normalization technique consists in using equivalence classes for synonyms. In the context of trajectory indexing, we refer to normalization as a function N(S) = S0 , where S and S0 are sequences of points. 4) Sharding: When an index becomes very large, it might not fit on a single computer anymore. As illustrated in Figure 1 (b), sharding the index across the nodes of a cluster becomes necessary. Here, the idea is to route documents to specific shards in order to spread the load throughout the cluster. At query time, all the shards might need to process a query to compute the result. Therefore, given the terms specified in a query, a good sharding strategy tries to minimize the number of shards that need to be contacted. Our solution effectively addresses this issue. B. Fingerprinting As mentioned in Section III-A1, searching for long subsequences in textual data by using words and positional information is not very efficient. In practice, an inverted-index aimed at searching for sub-sequences is usually populated with a different class of terms, referred to as fingerprints [3], [20], [15], [2]. Fingerprints usually correspond to a sub-set of the hash sums obtained by hashing the n-grams of a document [25]. A n-gram is a sequence of n contiguous items, i.e., n words in the context of textual data. A fingerprint usually corresponds to the hash sum h ∈ R obtained by hashing a ngram. As the number of n-grams for a given text can be very large, a common practice consists in retaining the subset of fingerprints that satisfy the condition h mod p = 0, where p is a fixed sampling constant. The extracted fingerprint can then be used as terms in the inverted index. Furthermore, given two sets of fingerprints, their similarity can easily be derived by the Jaccard coefficient. In our context, we refer to fingerprinting as a function W (S) = F, where S is a trajectory and F is an ordered set of fingerprints. C. Geohashing A function that produces geohashes maps a point p to a sequence of bits b that repeatedly bisect space up to a desired depth d that defines the precision of the geohash [23]. In the case of a latitude/longitude space, the first subdivision usually occurs on the longitude axis, the second on the latitude axis and the process is repeated up to depth d. Figure 2 (a) illustrates this subdivision for a depth d = 6, where two interleaved sequences of three bits are respectively dedicated to the subdivision of the longitude and latitude axes. Every geohash covers a delimited area on earth and, given a set of points {p1 , p2 , ..., pn }, it is relatively easy to find the highest precision geohash that overlaps with the whole set. Hereafter, we formally refer to such an overlapping geohash with the function geohash({p1 , p2 , ..., pn }) = b. As highlighted in Figure 2 (b), the ordered list of hashes obtained by subdividing the space with a geohash function can be represented as a z-order space-filling curve. Interestingly, when two points are close to each other on a space-filling curve, then they are close to each other in the latitude/longitude space. However, the reverse is not necessarily true since: two points near each other in the latitude/longitude space might be far from each other on the space-filling curve. Then, as illustrated in Figure 2 (c), the space-filling curve can be used to shard a spatial index across the nodes of a cluster. Two steps characterize the sharding strategy pictured here. First, geohashes are mapped to shards in a locality preserving way, i.e., geohashes near each other on the spacefilling curve are placed on the same shard. Second, the shards 7 111 010101 010111 011101 011111 110101 110111 111101 111111 7 geohash 26 shard = bgeohash/26 ⇤ sc s node = bshard mod nc n 0 <latexit sha1_base64="DfemnTLialK+ve98TKLnkz30pz8=">AAAB53icbVBNS8NAEJ34WetX1aOXxSJ4KokI6q3oxWMLxhbaUDbbSbt2swm7G6GE/gIvHlS8+pe8+W/ctjlo64OBx3szzMwLU8G1cd1vZ2V1bX1js7RV3t7Z3duvHBw+6CRTDH2WiES1Q6pRcIm+4UZgO1VI41BgKxzdTv3WEyrNE3lvxikGMR1IHnFGjZWabq9SdWvuDGSZeAWpQoFGr/LV7Scsi1EaJqjWHc9NTZBTZTgTOCl3M40pZSM6wI6lksaog3x26IScWqVPokTZkobM1N8TOY21Hseh7YypGepFbyr+53UyE10FOZdpZlCy+aIoE8QkZPo16XOFzIixJZQpbm8lbEgVZcZmU7YheIsvLxP/vHZdc5sX1fpNkUYJjuEEzsCDS6jDHTTABwYIz/AKb86j8+K8Ox/z1hWnmDmCP3A+fwDnZoyH</latexit> <latexit <latexit sha1_base64="dMVwjTywUyfypr8B6rbpGY4ys9I=">AAAB7XicbVBNS8NAEJ3Ur1q/qh69BIvgqSQiqLeiF48VjC20oWy2k2bpZjfsboQS+iO8eFDx6v/x5r9x2+ag1QcDj/dmmJkXZZxp43lfTmVldW19o7pZ29re2d2r7x88aJkrigGVXKpuRDRyJjAwzHDsZgpJGnHsROObmd95RKWZFPdmkmGYkpFgMaPEWKkzQpkQnQzqDa/pzeH+JX5JGlCiPah/9oeS5ikKQznRuud7mQkLogyjHKe1fq4xI3RMRtizVJAUdVjMz526J1YZurFUtoRx5+rPiYKkWk/SyHamxCR62ZuJ/3m93MSXYcFElhsUdLEozrlrpDv73R0yhdTwiSWEKmZvdWlCFKHGJlSzIfjLL/8lwVnzqundnTda12UaVTiCYzgFHy6gBbfQhgAojOEJXuDVyZxn5815X7RWnHLmEH7B+fgG3DqPcg==</latexit> sha1_base64="C39OhB+IczRcjLNINXH29e9lt8M=">AAAB2HicbZDNSgMxFIXv1L86Vq1rN8EiuCpTN+pOcOOygmML7VAymTttaCYzJHeEMvQFXLhRfDB3vo3pz0KtBwIf5yTk3hMXSloKgi+vtrW9s7tX3/cPGv7h0XGz8WTz0ggMRa5y04+5RSU1hiRJYb8wyLNYYS+e3i3y3jMaK3P9SLMCo4yPtUyl4OSs7qjZCtrBUmwTOmtowVqj5ucwyUWZoSahuLWDTlBQVHFDUiic+8PSYsHFlI9x4FDzDG1ULcecs3PnJCzNjTua2NL9+aLimbWzLHY3M04T+zdbmP9lg5LS66iSuigJtVh9lJaKUc4WO7NEGhSkZg64MNLNysSEGy7INeO7Djp/N96E8LJ90w4eAqjDKZzBBXTgCm7hHroQgoAEXuDNm3iv3vuqqpq37uwEfsn7+Aap5IoM</latexit> sha1_base64="7C+4wWDeG6sM2GD250kxPxekj84=">AAAB4nicbZDNSgMxFIXv1L9aq1a3boJFcFVm3Gh3ghuXFRxbaIeSSe90QjPJkGSEMvQh3LhQ8aHc+TamPwttPRD4OCch9544F9xY3//2KlvbO7t71f3aQf3w6LhxUn8yqtAMQ6aE0r2YGhRcYmi5FdjLNdIsFtiNJ3fzvPuM2nAlH+00xyijY8kTzqh1VneMKqUmHTaafstfiGxCsIImrNQZNr4GI8WKDKVlghrTD/zcRiXVljOBs9qgMJhTNqFj7DuUNEMTlYtxZ+TCOSOSKO2OtGTh/n5R0syYaRa7mxm1qVnP5uZ/Wb+wyU1UcpkXFiVbfpQUglhF5ruTEdfIrJg6oExzNythKdWUWddQzZUQrK+8CeFVq93yH3yowhmcwyUEcA23cA8dCIHBBF7gDd693Hv1PpZtVbxVbafwR97nD62ejho=</latexit> sha1_base64="XOirqvftfsLwjjnWe9FYGL2lX8U=">AAAB7XicbVBNS8NAEJ3Ur1q/qh69LBbBU0m8qLeiF48VjC20oWy2k2bpZhN2N0IJ/RFePKh49f9489+4bXPQ1gcDj/dmmJkXZoJr47rfTmVtfWNzq7pd29nd2z+oHx496jRXDH2WilR1Q6pRcIm+4UZgN1NIk1BgJxzfzvzOEyrNU/lgJhkGCR1JHnFGjZU6I0xjquNBveE23TnIKvFK0oAS7UH9qz9MWZ6gNExQrXuem5mgoMpwJnBa6+caM8rGdIQ9SyVNUAfF/NwpObPKkESpsiUNmau/JwqaaD1JQtuZUBPrZW8m/uf1chNdBQWXWW5QssWiKBfEpGT2OxlyhcyIiSWUKW5vJSymijJjE6rZELzll1eJf9G8brr3bqN1U6ZRhRM4hXPw4BJacAdt8IHBGJ7hFd6czHlx3p2PRWvFKWeO4Q+czx/a+o9u</latexit> 6 110 010100 010110 011100 011110 110100 110110 111100 111110 6 5 101 010001 010011 011001 011011 110001 110011 111001 111011 5 4 100 010000 010010 011000 011010 110000 110010 111000 111010 4 3 011 000101 000111 001101 001111 100101 100111 101101 101111 3 2 010 000100 000110 001100 001110 100100 100110 101100 101110 2 1 001 000001 000011 001001 001011 100001 100011 101001 101011 1 0 000 000000 000010 001000 001010 100000 100010 101000 101010 0 0 <latexit sha1_base64="DfemnTLialK+ve98TKLnkz30pz8=">AAAB53icbVBNS8NAEJ34WetX1aOXxSJ4KokI6q3oxWMLxhbaUDbbSbt2swm7G6GE/gIvHlS8+pe8+W/ctjlo64OBx3szzMwLU8G1cd1vZ2V1bX1js7RV3t7Z3duvHBw+6CRTDH2WiES1Q6pRcIm+4UZgO1VI41BgKxzdTv3WEyrNE3lvxikGMR1IHnFGjZWabq9SdWvuDGSZeAWpQoFGr/LV7Scsi1EaJqjWHc9NTZBTZTgTOCl3M40pZSM6wI6lksaog3x26IScWqVPokTZkobM1N8TOY21Hseh7YypGepFbyr+53UyE10FOZdpZlCy+aIoE8QkZPo16XOFzIixJZQpbm8lbEgVZcZmU7YheIsvLxP/vHZdc5sX1fpNkUYJjuEEzsCDS6jDHTTABwYIz/AKb86j8+K8Ox/z1hWnmDmCP3A+fwDnZoyH</latexit> <latexit <latexit sha1_base64="WgWzGmXo0AyT24n3xmI005paXmY=">AAAB6XicbVBNS8NAEJ34WetX1aOXxSJ4KkkRP25FLx4rGltoY9lsN+3SzSbsToRS+hO8eFDx6j/y5r9x2+agrQ8GHu/NMDMvTKUw6LrfztLyyuraemGjuLm1vbNb2tt/MEmmGfdZIhPdDKnhUijuo0DJm6nmNA4lb4SD64nfeOLaiETd4zDlQUx7SkSCUbTSXfXxrFMquxV3CrJIvJyUIUe9U/pqdxOWxVwhk9SYluemGIyoRsEkHxfbmeEpZQPa4y1LFY25CUbTU8fk2CpdEiXalkIyVX9PjGhszDAObWdMsW/mvYn4n9fKMLoIRkKlGXLFZouiTBJMyORv0hWaM5RDSyjTwt5KWJ9qytCmU7QhePMvLxK/WrmsuLen5dpVnkYBDuEITsCDc6jBDdTBBwY9eIZXeHOk8+K8Ox+z1iUnnzmAP3A+fwAU0I0x</latexit> <latexit sha1_base64="iZJDFbyK+QG96URJp2fUvksDVbk=">AAAB53icbVBNS8NAEJ34WetX1aOXxSJ4KokI6q3oxWMLxhbaUDbbSbt2swm7G6GE/gIvHlS8+pe8+W/ctjlo64OBx3szzMwLU8G1cd1vZ2V1bX1js7RV3t7Z3duvHBw+6CRTDH2WiES1Q6pRcIm+4UZgO1VI41BgKxzdTv3WEyrNE3lvxikGMR1IHnFGjZWaulepujV3BrJMvIJUoUCjV/nq9hOWxSgNE1TrjuemJsipMpwJnJS7mcaUshEdYMdSSWPUQT47dEJOrdInUaJsSUNm6u+JnMZaj+PQdsbUDPWiNxX/8zqZia6CnMs0MyjZfFGUCWISMv2a9LlCZsTYEsoUt7cSNqSKMmOzKdsQvMWXl4l/Xruuuc2Lav2mSKMEx3ACZ+DBJdThDhrgAwOEZ3iFN+fReXHenY9564pTzBzBHzifP0y+jMo=</latexit> <latexit <latexit sha1_base64="OfbobdSdEJPuarxeHVokmqdUXjY=">AAACFHicbVC7SgNBFJ2Nrxhfq5Y2F4MgInE3iI9CCNpYRjAmkF3D7GQ2GTK7s8zMCmHJT9j4KzYWKrYWdv6Nk0ehiac6nHMv99wTJJwp7TjfVm5ufmFxKb9cWFldW9+wN7fulEgloTUiuJCNACvKWUxrmmlOG4mkOAo4rQe9q6Fff6BSMRHf6n5C/Qh3YhYygrWRWvah6mLZhgsAj4dcCAkdKrpYdeEIyvfZyQAOQIEnR17LLjolZwSYJe6EFNEE1Zb95bUFSSMaa8KxUk3XSbSfYakZ4XRQ8FJFE0x6uEObhsY4osrPRl8NYM8obQhNpFDEGkbq740MR0r1o8BMRlh31bQ3FP/zmqkOz/yMxUmqaUzGh8KUgxYwrAjaTFKied8QTCQzWYGYljDRpsiCKcGdfnmW1Mql85Jzc1ysXE7ayKMdtIv2kYtOUQVdoyqqIYIe0TN6RW/Wk/VivVsf49GcNdnZRn9gff4Ax6Wc6A==</latexit> 0 <latexit sha1_base64="DfemnTLialK+ve98TKLnkz30pz8=">AAAB53icbVBNS8NAEJ34WetX1aOXxSJ4KokI6q3oxWMLxhbaUDbbSbt2swm7G6GE/gIvHlS8+pe8+W/ctjlo64OBx3szzMwLU8G1cd1vZ2V1bX1js7RV3t7Z3duvHBw+6CRTDH2WiES1Q6pRcIm+4UZgO1VI41BgKxzdTv3WEyrNE3lvxikGMR1IHnFGjZWabq9SdWvuDGSZeAWpQoFGr/LV7Scsi1EaJqjWHc9NTZBTZTgTOCl3M40pZSM6wI6lksaog3x26IScWqVPokTZkobM1N8TOY21Hseh7YypGepFbyr+53UyE10FOZdpZlCy+aIoE8QkZPo16XOFzIixJZQpbm8lbEgVZcZmU7YheIsvLxP/vHZdc5sX1fpNkUYJjuEEzsCDS6jDHTTABwYIz/AKb86j8+K8Ox/z1hWnmDmCP3A+fwDnZoyH</latexit> <latexit <latexit sha1_base64="WJRcnYIeSIi725K1oHuE9EYFJ4Q=">AAAB53icbVBNS8NAEJ34WetX1aOXxSJ4KokI6q3oxWMLxhbaUDbbSbt2swm7G6GE/gIvHlS8+pe8+W/ctjlo64OBx3szzMwLU8G1cd1vZ2V1bX1js7RV3t7Z3duvHBw+6CRTDH2WiES1Q6pRcIm+4UZgO1VI41BgKxzdTv3WEyrNE3lvxikGMR1IHnFGjZWaslepujV3BrJMvIJUoUCjV/nq9hOWxSgNE1TrjuemJsipMpwJnJS7mcaUshEdYMdSSWPUQT47dEJOrdInUaJsSUNm6u+JnMZaj+PQdsbUDPWiNxX/8zqZia6CnMs0MyjZfFGUCWISMv2a9LlCZsTYEsoUt7cSNqSKMmOzKdsQvMWXl4l/Xruuuc2Lav2mSKMEx3ACZ+DBJdThDhrgAwOEZ3iFN+fReXHenY9564pTzBzBHzifP0UvjMU=</latexit> <latexit <latexit sha1_base64="RnM2WfhQ7+FJvPxrX2G7o/8DQ1I=">AAACDHicbVDLSsNAFJ34rPUVdelmsAquSiKCuhCKblxWsLbQhDKZTNqh8wgzE6GE/oAbf8WNCxW3foA7/8ZpmoW2ntXhnHu5554oZVQbz/t2FhaXlldWK2vV9Y3NrW13Z/dey0xh0sKSSdWJkCaMCtIy1DDSSRVBPGKkHQ2vJ377gShNpbgzo5SEHPUFTShGxko991DImMBLGLCESamgHiAVwyDiMoYCBqpQe27Nq3sF4DzxS1IDJZo99yuIJc44EQYzpHXX91IT5kgZihkZV4NMkxThIeqTrqUCcaLDvPhmDI+sEsPEhkmkMLBQf2/kiGs94pGd5MgM9Kw3Ef/zuplJzsOcijQzRODpoSRj0Eg4qQbGVBFs2MgShBW1WSG2dSBsbIFVW4I/+/I8aZ3UL+re7WmtcVW2UQH74AAcAx+cgQa4AU3QAhg8gmfwCt6cJ+fFeXc+pqMLTrmzB/7A+fwBp7aa4Q==</latexit> sha1_base64="C39OhB+IczRcjLNINXH29e9lt8M=">AAAB2HicbZDNSgMxFIXv1L86Vq1rN8EiuCpTN+pOcOOygmML7VAymTttaCYzJHeEMvQFXLhRfDB3vo3pz0KtBwIf5yTk3hMXSloKgi+vtrW9s7tX3/cPGv7h0XGz8WTz0ggMRa5y04+5RSU1hiRJYb8wyLNYYS+e3i3y3jMaK3P9SLMCo4yPtUyl4OSs7qjZCtrBUmwTOmtowVqj5ucwyUWZoSahuLWDTlBQVHFDUiic+8PSYsHFlI9x4FDzDG1ULcecs3PnJCzNjTua2NL9+aLimbWzLHY3M04T+zdbmP9lg5LS66iSuigJtVh9lJaKUc4WO7NEGhSkZg64MNLNysSEGy7INeO7Djp/N96E8LJ90w4eAqjDKZzBBXTgCm7hHroQgoAEXuDNm3iv3vuqqpq37uwEfsn7+Aap5IoM</latexit> sha1_base64="13KT1WAG+CewxgfWtzG0LQcy7+g=">AAACAXicbZC9TsMwFIVv+C2lQGBlsShITFXCAgxISCyMRSK0UhNVjuO0Vh07sh2kKuoLsPAqLAyAeAk23gY37QAtZzo651q+94tzzrTxvG9nZXVtfWOztlXfbuzs7rn7jQctC0VoQCSXqhtjTTkTNDDMcNrNFcVZzGknHt1M+84jVZpJcW/GOY0yPBAsZQQbG/XdYyETiq5QyFMupUJ6iFWCwjiTCRIoVFXad5tey6uElo0/N02Yq913v8JEkiKjwhCOte75Xm6iEivDCKeTelhommMywgPas1bgjOqorK6ZoBObJCi1y6RSGFSlv1+UONN6nMV2MsNmqBe7afhf1ytMehGVTOSFoYLMPkoLjoxEUzQoYYoSw8fWYKKY3RURiwMTYwHWLQR/8eRlE5y1LlvenQc1OIQjOAUfzuEabqENARB4ghd4g3fn2Xl1Pma0Vpw5tgP4I+fzBwDnmWo=</latexit> sha1_base64="E+DlHOCETmSBQCNFq2X+o3lah6c=">AAACDHicbVC7TsMwFHXKq5RXgJHFoiAxVSkLMCBVsDAWidBKTVQ5jtNa9SOyHaQq6g+w8CssDIBY+QA2/gY3zQAtZzo6517dc0+UMqqN5307laXlldW16nptY3Nre8fd3bvXMlOY+FgyqboR0oRRQXxDDSPdVBHEI0Y60eh66nceiNJUijszTknI0UDQhGJkrNR3j4SMCbyEAUuYlArqIVIxDCIuYyhgoAq179a9hlcALpJmSeqgRLvvfgWxxBknwmCGtO41vdSEOVKGYkYmtSDTJEV4hAakZ6lAnOgwL76ZwGOrxDCxYRIpDCzU3xs54lqPeWQnOTJDPe9Nxf+8XmaS8zCnIs0MEXh2KMkYNBJOq4ExVQQbNrYEYUVtVohtHQgbW2DNltCcf3mR+KeNi4Z369VbV2UbVXAADsEJaIIz0AI3oA18gMEjeAav4M15cl6cd+djNlpxyp198AfO5w+mdprd</latexit> 0 000 1 001 2 010 3 011 4 100 5 101 6 110 7 111 0 (a) Geohash 1 2 3 4 5 6 7 (b) Space filling curve (c) Sharding Fig. 2: Geohash, space-filling curve and sharding are mapped to nodes with a modulo operation that breaks locality to improve the balance of the index across the nodes. IV. F INGERPRINTING WITH G EODABS We now introduce geodabs, a construction that combines geohashing and hashing to fingerprint trajectories. Our motivation for introducing geodabs is based on two key reasons. First, as illustrated in Figures 2 (b), the correspondence between the distance on the space-filling curve and the latitude/longitude space can be used as a means to shard and distribute the index. Sharding with geohash on the space-filling curve guarantees that the locality of the index will be preserved and that a minimal number of shards will be contacted to answer a query. Second, the fingerprints of a trajectory should capture the notion of order present in trajectories. Given a sequence of points, geohashes only capture the area that overlap with these points. Therefore, we use regular hashing to address this issue. (a) geohash(points) = 11010010001110101011100101110000 (b) hash(points) = 10000110101111011011111100101000 (c) geodab(points) = geohash(points) << 16 | hash(points) & 0xffff Fig. 3: Construction of a geodab Figure 3 illustrates how geodabs are constructed. (a) Given a sequence of points, we first compute the geohash that overlaps with the whole sequence. The geohash acts as a prefix that naturally distributes the geodabs on the space-filling curve according to the location of the points. (b) We compute a hash that is sensitive to the ordering of the points. This hash acts as a suffix for the geodab that discriminates among sequences of points, according to their path and their ordering. (c) We merge the two hashes, here encoded on 32 bits, using bitwise operators. The length of the prefix can easily be adjusted, depending on the desired space partitioning. A. Trajectory Fingerprinting and Indexing When comparing sequences, finding similarities by sampling fingerprints is probabilistic and does not guarantee the detection of all the similarities. Winnowing is a special fingerprinting algorithm that address this problem and comes with additional guarantees [25]. First, it ensures that matches shorter than a user defined lower-bound k are considered as noise. To satisfy this guarantee, winnowing only considers hashes of k-grams. Second, it ensures that at least one kgram is detected in any common sequence of size greater or equal to an upper-bound t ≥ k. To satisfy this guarantee, the algorithm defines a window of size w = t − k + 1 that slides over the sequence of k-gram hashes. For each window, the algorithm selects the minimum hash value or the right-most minimum hash value if the same hash appears more than once in the window. As the dataset densifies, the upper threshold can be used to reduce the number of fingerprints extracted from queries in order to set the efficiency/effectiveness tradeoff. Figure 4 shows how the steps described in [25] can be adapted to extract fingerprints from trajectories. (a) The raw trajectories can showcase different sampling rates, (b) it is therefore necessary to normalize them. In Section V, we discuss how normalization can be used to make trajectories converge to similar sequences. (c) The sequence of k-grams can then be computed and (d) the corresponding hashes can be derived. (e) The sliding window of size w can then be used to (f) select the hashes that constitute the fingerprints of the trajectory. The resulting fingerprints can then be used as terms in an inverted index, where posting lists are filled with trajectory identifiers. Algorithm 1 shows in more detail how winnowing can be implemented for fingerprinting trajectories. An optimised version of this algorithm relies on circular buffers and rolling Algorithm 1 Geodabs extraction by winnowing (a) Raw trajectory: 1: 2: 3: (p1 , p2 , p3 , ..., p97 ) 4: 5: 6: 7: 8: 9: Si1 = (p1 , p2 , p3 , ..., p36 ) 10: 11: 12: 13: 14: 15: (b) Normalized trajectory: (c) Sequence of k-grams based on the normalized trajectory (k=5): ((p1 , p2 , p3 , p4 , p5 ), (p2 , p3 , p4 , p5 , p6 ), (p3 , p4 , p5 , p6 , p7 ), ... ..., (p32 , p33 , p34 , p35 , p36 )) (d) Sequence of geodabs derived from the k-grams: (h1 , h2 , h3 , ..., h36 ) 16: 17: 18: 19: Input: trajectory S, lower-bound t, upper-bound k Output: Geodabs G C ← (∅) . Sequence of candidate hashes for i ← 1 to |S| − k do . Iterate over k-grams g ← geodab(Si,i+k ) . Compute k-gram geodabs C ← C k (g) . Add geodabs to candidates end for G ← {∅} . Set of winnowed geodabs w ← t −k+1 . Window size for i ← 1 to |C| − w do . Iterate over windows m←i . Initialize minimum geodabs index for j ← i + 1 to i + w do . Iterate over the window if C j <= Cm then . Select right most minimum m= j . Set new minimum end if end for G ← G ∪ {Cm } . Add minimum to geodabs end for return G (e) Windows of geodabs (w=4): ((h1 , h2 , h3 , h4 ), (h2 , h3 , h4 , h5 ), (h3 , h4 , h5 , h6 ), ... ..., (h33 , h34 , h35 , h36 )) (f) Hypothetical sequence of geodabs selected by winnowing: (h3 , h7 , h10 , h12 , h17 , h19 , h22 , h26 , h29 , h31 , h34 ) techniques remove superficial differences in textual data. Normalization in the context of trajectories differs, but the notion of equivalence classes remains the same, as highly similar trajectories should converge toward similar sequences of points. In this section, we introduce two normalization methods and show the extent to which trajectory data should be normalized. Fig. 4: Trajectory Winnowing A. Normalizing with Geohash hash functions for iterating over k-grams of points and windows of hashes. In contrast with normalized documents that often contain thousands of words, normalized trajectories are relatively short sequences of points. As we did not notice a significant performance gain, we dropped this optimization. In our implementation, we use roaring bitmaps to represent the sets of fingerprints F [19]. Any set made of integers can be represented with bitmaps. Given two bitmaps, their intersection, union, or difference can be computed very efficiently with bitwise operations. Roaring bitmaps are fast memory-efficient bitmaps that outperform most existing techniques. The fingerprints generated by the trajectory-winnowing algorithm are used as terms in the inverted index. Each entry of the postings lists contain a reference to the raw trajectory and a reference to the trajectory bitmap. As a result, when querying the index, the bitmap of the query can be compared to the bitmap of the result in order to gauge their similarity. V. T RAJECTORY N ORMALIZATION In this section, we show that a sound normalization procedure can be applied to trajectories. In the context of textual data, normalization relies on semantic rules and linguistic techniques to find equivalence classes for terms. For example, such techniques include case-folding, true-casting, stemming, lemmatization, and the identification of stop-words. These A simple normalization technique consists in mapping the points of a trajectory to a sequence of geohashes at a constant depth d. The resulting geohashes can then be cleaned from consecutive duplicates and converted back to sequences of points. This approach is very lightweight and removes most irrelevant differences in trajectories. If two trajectories follow the edges of one or several geohashes, the resulting sequences of normalized points could be different. However, as it will be demonstrated in Section VI, it does not really affect the quality of the results. B. Normalizing with Map Matching Another normalization technique consists in mapping trajectories to an existing road network [22]. This approach, called map matching, can give very good results, especially if the moving entity at the origin of a trajectory is known to be constrained to a road network. Most recent mapmatching algorithms rely on the Viterbi algorithm to compute a match [12]. For each point of a trajectory, the idea is to first retrieve a set of matching nodes on a road network within a certain radius. The Viterbi algorithm then computes the most probable sequence of nodes on the road network [22]. This approach is computationally costly, but this price is paid only at the creation of the index. When searching for similarities, the query trajectory has to be normalized in a similar way. (a) The raw trajectories Sa Sb Sc (b) Normalization on a grid of geohashes with N1 N1 (Sa ) N1 (Sb ) N1 (Sc ) (c) Normalization on a grid of geohashes with N2 N2 (Sa ) N2 (Sb ) N2 (Sc ) Fig. 6: Routes used to generate the trajectory dataset (d) Normalization on a road network with N3 N3 (Sa ) N3 (Sb ) N3 (Sc ) Fig. 5: Trajectory Normalization C. Extent of the Normalization In the context of textual data, normalization usually relies on simple intuitions. Unfortunately, when dealing with trajectories, it is difficult to rely on the same intuitions. In this section, we show how the measures introduced in [5] can be applied to trajectory normalization. As stated previously, with normalization, trajectories should converge toward similar sequences of points. Therefore, a good normalization function n applied to a pair of similar trajectories Sa and Sb should satisfy the property J(W (N(Sa )),W (N(Sb ))) > J(W (Sa ),W (Sb )). Focusing solely on this property, however, leads to aggressive normalization functions that make every trajectories converge to the same output. In order to address this issue, we start by recalling two key effectiveness measures in information retrieval. First, precision measures the fraction of selected items that are relevant. More formally, given the number of relevant items retrieved t p (true positive) and the number of irrelevant items retrieved f p (false positive), precision = t p/(t p + f p). Second, recall measures to the fraction of relevant items that are selected. In other words, given the number of relevant items retrieved t p and the number of relevant items that have not been retrieved f n (false negative), recall = t p/(t p + f n). In Figure 5, we illustrate the effect of two hypothetical normalization functions N1 and N2 on precision and recall. We first introduce a dataset that contains the raw trajectories Sa , Sb . We also assume a query trajectory Sq , which has one relevant result Sb in the dataset. Figure 5 (a) depicts an inverted index built with the raw trajectories and queried with Sq . Without normalization, this index would return no relevant result Both precision and recall would therefore be equal to 0. Figure 5 (b) depicts an inverted index built with the normalization function N1 and queried with Sq . This index would return one relevant results. Thus, precision would be 1/(1 + 0) and recall 1/(1 + 0). Figure 5 (c) depicts an inverted index built with a more aggressive normalization function N2 . In this case, Sq would return two results, precision would drop to 1/(1 + 1) and recall would remain stable at 1/(1 + 0). As long as all the true positives are all included in the result set, recall remains high. However, in the context of geodabs, an aggressive normalization function could over simplify trajectories. In this case, recall would start dropping, especially if the normalized sequence of points is shorter than the noise threshold specified by the winnowing algorithm. Observing the evolution of precision and recall is therefore a good way to determine the extent of the normalization. In ranked retrieval, this is precisely the aim of a precision and recall (PR) curve [21]. In section VI-A2, we empirically show how a PR curve can be used to find the best parameters for a normalization function. In conclusion, as long as precision and recall improves, the extent to which a trajectory is normalized can be increased. In contrast, a drop in precision or recall clearly indicates that the fingerprints do not capture what characterizes and differentiates the sequences of points anymore. Hence, to identify the optimal extent of a normalization function, the evolution of precision and recall can be observed on a sample dataset. Fig. 7: Similar trajectories extracted form the dataset VI. E VALUATION In this section, we highlight the cost of computing distances and discovering motifs with DFD, DTW and Jaccard in dense trajectory datasets. To this aim, we characterize a large synthetic datasets and the configuration parameters we used to perform our evaluation. Our experiments confirm the pragmatic observation made in section and enable us to focus on Jaccard based methods. We then compare geodabs with geohashes, both in term of efficiency and effectiveness on a large and dense trajectory dataset. Finally, we evaluate how a geodab index can be sharded across a set of nodes. A. Evaluation Setup 1) Datasets: To perform our evaluation, we extensively rely on a synthetic dataset and on the road network extracted from the OpenStreetMap dataset [14]. In the context of trajectory indexing, we noticed a lack of large and dense trajectory datasets. For example, the Nokia and Geolife datasets [18], [29] are too small and too sparse to validate our contributions. In addition, these datasets lack the trajectory queries and the associated ground truth that is required to qualitatively assess our solution. These kinds of queries and ground truths, also lack in the popular BerlinMod synthetic dataset [8]. Therefore, we used the trajectory generator introduced in [6] to create a synthetic dataset, a set of trajectory queries and the associated ground truth. Our dataset is based on 5’000 unique routes constrained on a road network and generated with the GraphHopper library [16]. The routes are all located in a dense area of 300 square kilometres located around the center of London. We use these routes to generate 10 similar trajectories in one direction and 10 similar trajectories in the opposite direction. These trajectories are sampled uniformaly at a rate of one point every second. The speed of the moving entities is based on the route duration computed by the GraphHopper library. In addition, we add 20 meters of random Gaussian noise to every sampled points to make the dataset more realistic. Figure 6 visually depicts the 50 000 routes used to generate the trajectory dataset. The 1000 000 trajectories derived from these routes form a very dense dataset of 6.3Gb that mimics the traces GPS trackers would record. As of today, we found no publicly available counter parts to this synthetic dataset. However, we believe that additional work on the generation of a dense trajectory dataset would greatly benefit the research community. Figure 7 illustrates a set of 10 similar trajectories generated on the basis of a route constrained to the road network. 2) Configuration Parameters: In order to evaluate the effectiveness of our solution, we need to find appropriate configuration parameters. First, we empirically evaluated several configurations and observed the best results with a normalization based on geohashes of 36 bits, a lower bound of k = 6 and an upper-bound of t = 12. As we get closer to the poles, the width of the geohashes tends to shrink. In London, a geohash of 36 bits has a width of 95 meters and a height of 76 meters. As a trajectory normalized with geohashes rarely follows a diagonal path, we can assume that the average length of a move between two geohashes is approximately 85 meters. Therefore, the lower-bound k translates to a segment threshold of approximately 510 meters. Segments shorter than this threshold are considered as noise. The upper-bound t translates to a segment threshold of approximately 1020 meters. Segments greater than this threshold are guaranteed to be detected. To validate our parameters, we tested several levels of normalization, performed queries on a sample of our dataset and plotted the corresponding precision and recall curves. As highlighted in Figure 8, the normalization based on geohashes of 36 bits clearly outperform its upstream and downstream counterparts. Automating the discovery of the appropriate parameters is a difficult task, because the number of possible combinations is very large and each configuration requires building and querying an index. A hill-climbing strategy could probably be used to address this problem, and this might be part of our future work. B. The Cost of Computing Distances In this section, we characterize the cost of computing distances between trajectories and discuss their limits when searching trajectories in dense datasets. We begin by reminding some fundamental distance measures. We then compare them with the Jaccard distance used in the context of our paper. 1) Ground Distance: Equation 2 describes the haversine ground distance formula, where R corresponds to the earth’s radius in meters. Given a pair of points pl = (ϕl , λl ) and pk = (ϕk , λk ), the resulting value in d(pl , pk ) corresponds to the ground distance in meters. s 2R arcsin sin2  ϕl − ϕk 2  + cos(ϕk ) cos(ϕl ) sin2  λl − λk 2  (2) 2) Dynamic Time Warping: Equation 3 presents the recursive function used to compute the dynamic time-warping distance (DTW) [28]. Given a trajectory P = hp1 , ..., pm i and a trajectory Q = hq1 , ..., qn i, the resulting value in dtw(|P|, |Q|) corresponds to the DTW distance between the trajectories. dtw(i, j) =  ∞      0   dtw(i − 1, j)    d(Pi , Q j ) + min dtw(i, j − 1)     dtw(i − 1, j − 1) if i = 0 or j = 0 if i = j = 0 otherwise (3) 0.0 0.2 0.4 0.6 0.8 1.0 2000 4 6 8 10 200 Fig. 9: Increasing the number of trajectory candidates if i = j = 1 otherwise (4) 4) Performance Evaluation: We compute the distance between a single query trajectory of length t and a set of trajectory candidates of size c, where each candidate has a length of t. In such a scenario, the computational cost associated with the computation of DTW and DFD is characterised by a complexity of O(c ∗ t 2 ). In Figure 9, the size of the set of trajectory candidates c remains constant, and the length of the query and candidate trajectories increases. As highlighted here, as the length of the trajectories increases, so does the computational time in a polynomial manner. Therefore, when a dataset is primarily made of long trajectories recorded at a high sampling rate, computing DTW or DFD is impractical. In Figure 10, the size of the set of trajectory candidates c densifies and the length of the trajectories t remains constant. As the size of the of the candidate set increases, so does the computational time in a linear manner. In both cases, we notice that computing the scores associated with 10 trajectories of 10 000 points takes more than 2500 milliseconds. In the context of a very dense trajectory dataset, a query can return many more relevant trajectory candidates, for which a distance measure still has to be computed. Therefore, it is obvious that relying on these distance measures might be qualitatively sound but clearly unsustainable at scale. In contrast, as highlighted in Figures 9 and 10, computing the Jaccard distance for ordered sets of geodabs extracted from the trajectories is very inexpensive. This clearly 400 600 800 1000 Trajectory size Density 3) Discrete Fréchet Distance: Similarly, Equation 4 describes the recursive function used to compute the discrete Fréchet distance (DFD) [9]ite. The resulting value in d f d(|P|, |Q|) also corresponds to the DFD distance between the trajectories.  d(Pi , Q j)      d(Pi , Q j)       d f d(i, j) = d f d(i − 1, j)   max    min d f d(i, j − 1)        d f d(i − 1, j − 1) 1500 Time (ms) 500 0 2 Recall Fig. 8: Verifying configuration parameters with a PR curve DFD DTW Geodabs 1000 1500 0 0.0 500 1000 Time (ms) 2500 2500 2000 1.0 0.8 0.6 0.4 32 bits 34 bits 36 bits 38 bits 40 bits 0.2 Precision DFD DTW Geodabs Fig. 10: Increasing the length of the trajectory candidates confirms the correctness of the pragmatic observation made in section VI. C. The Cost of Discovering Motifs In order to find motifs in pairs of trajectories with geodabs, we have to make some assumptions regarding the normalization step. First, we use our dataset to estimate the average number of fingerprints extracted per meters a from normalized trajectories. As a result, when looking for motifs of length l, we can translate this length to a number of fingerprints f = l ∗ a. Therefore, given two ordered sets of geodabs Fi and Fj obtained by fingerprinting the trajectories Si and S j , the problem now consists in returning a pair of motifs (F̄i , F̄j ) such that length(F̄i ) = length(F̄j ) = f ∧ 6 ∃(F̄ 0 i , F̄ 0 j ) for which dJ (F̄ 0 i , F̄ 0 j ) < dJ (F̄i , F̄j ). As the ordered sets Fi and Fj are usually relatively small, a brute force implementation of this method gives good results. Because of the normalization and the fingerprinting, the motifs discovered with this approach are not strictly equivalent in terms of length and are subject to threshold effects. However, the results we observed in practice are good approximations of the best result. In Figure 11, we compare our method with an optimized algorithm, called bounding-based trajectory motif (BTM), which gives exact solutions to the motif-discovery problem by computing DFD for every motif pair in the trajectories [27]. As illustrated here, as the number of trajectory candidates densifies, so does the computational time. Again, our method based on geodabs appears to be a necessary tradeoff. D. The Cost of Indiscrimination An inability of the index to discriminate between true and false positive translates to a greater set of trajectories for which the distance has to be computed. In this section, we characterize the effectiveness and the probabilistic nature of the geohash and geodabs indexes. We then show how an inability to discriminate directly affects performances. 1.0 0.6 Sensitivity 0.2 0.2 500 Geodabs Geohash 0 0.0 0.0 Geodabs Geohash 2 4 6 8 10 0.0 0.2 0.4 Density 0.6 0.8 1.0 0e+00 1e−04 2e−04 Recall 3e−04 4e−04 5e−04 1−Specificity Fig. 12: PR curve Fig. 13: ROC curve 25000 800 Fig. 11: Motif discovery with increasing trajectory candidates 4 6 8 10 8e+05 6e+05 Trajectories 2e+05 4e+05 15000 5000 0 0 2 10000 20000 30000 Density 40000 50000 60000 geohash Fig. 14: Executing 100 queries on a large Fig. 15: Distribution of the trajectories dataset of increasing density in geohash areas 0e+00 400 trajectories 20000 100 shards 10000 shards 10000 600 Geohash Geodabs 200 Time (ms) 0.4 0.6 Precision 0.4 1500 1000 Time (ms) 2000 0.8 0.8 1.0 3000 2500 BTM Geodabs A B C D E F G H I J Nodes Fig. 16: Distribution of the trajectories in a 10 nodes cluster 1) Index Effectiveness: Figure 12 depicts the PR curves obtained by querying the geodabs and geohash indexes [21]. When looking at the geohash curve, we first notice that precision drops rapidly as recall increases. This is due to the inability of the geohash index to discriminate among similar trajectories that go in opposite directions. Because each trajectory of our synthetic dataset is associated with a return path, the geohash curve tends to stabilise at a precision of 0.5, as recall increases. The curve associated with the geodab index clearly shows that our method addresses this discrimination issue. Furthermore, we also notice that the first results returned by the geodab index are characterized by very high precision. In the context of a very dense dataset, this property is desirable because we can focus on the subset of the most relevant results. qualitatively assess the full retrieval spectrum [21]. As we look at the full retrieval spectrum, the quality our results is exacerbated by the size of the dataset. Therefore, it is important to notice that the plot focuses on a very narrow interval of the specificity. In fact, qualitatively speaking, both indexes are characterized by a very high sensitivity and a marginally low number of relevant results are lost. This is confirmed by computing the area under the ROC curve (AUC) that is of 0.999889 for geodabs and 0.9999521 for geohashes. Here, the minor difference in terms of AUC comes from the fact that a marginal number of relevant results can be missed with geodabs. the fact that the curve associated with geodabs climbs more steeply, however, confirms that the first results returned by our method are more relevant. Figure 13 depicts the receiver-operating-characteristics (ROC) curve obtained by querying the geodab and geohash indexes [10]. In ranked retrieval, sensitivity usually corresponds to recall and specificity is given by tn/( f p + tn). Thus, in contrast with the PR curve, the ROC curve enables us to 2) Index Efficiency: Figure 14 compares the average time needed to process 100 queries on inverted indexes built with a sample of up to 100 000 trajectories. Here, in contrast with the results highlighted in Section VI-B, the number of trajectory candidates is not controlled. Therefore, the difference between geohash and geodabs mainly highlights the inability of geohash to discriminate among trajectories. By combining several cells into one hash, a geodab not only discriminates on the direction of the trajectory, but also by all its constituents. Therefore, the number of candidates for which the Jaccard distance has to be computed is significantly reduced. As a result, processing queries is significantly faster but as shown earlier, the quality is not compromised. E. The Distribution of the Index We test the distributed nature of our index with a global road network extracted from the full dump of OpenStreetMap. Here, we make the assumption that the distribution of trajectories recorded across the world should mostly fit on a road network and be characterized by a similar distribution. The geodabs produced by our algorithm are characterized by a geohash prefix of 16 bits that can easily be extracted with a bitwise operation. Geohashes of depth 16 subdivide space into 216 cells characterized by a width of approximately 156 kilometres at the equator. In Figure 15, we plot the number of trajectories per geohash and we notice some very dense areas. For example, the highest peak located on the left of the diagram corresponds to the geohashes located around Mexico city. In contrast, the voids we have between the peaks correspond to areas of low activity, such as oceans. In Figure 16, we assume that the index is distributed across 10 nodes. We notice that a small number of shards (100) is not sufficient to distribute the data in a balanced fashion. However, with a greater number of shards (100 000), the data are well balanced on the nodes. Therefore, there is a tradeoff to make between preserving locality (to reduce the number of shards contacted when performing queries) and breaking locality (to spread the data evenly in the the cluster). VII. C ONCLUSION In this paper, we have shown that fingerprinting, and more specifically winnowing, can be used for indexing trajectories. We have introduced geodabs, a construction that combines hashing and geohashing to discriminate on the spatial and on the temporal dimensions. In addition, we have shown that geodabs can be used to scale and distribute an index across several nodes in a cluster. We have demonstrated how trajectory normalization can be used to improve the quality of an index. Finally, we discussed several pragmatic experiments that demonstrated the effectiveness and efficiently of trajectory fingerprinting with geodabs. R EFERENCES [1] J. L. Bentley. Multidimensional binary search trees used for associative searching. Communications of the ACM, 18(9):509–517, 1975. [2] S. Brin, J. Davis, and H. Garcia-Molina. Copy detection mechanisms for digital documents. In ACM SIGMOD Record, volume 24, pages 398–409. Acm, 1995. [3] A. Z. Broder. On the resemblance and containment of documents. In Compression and Complexity of Sequences 1997. Proceedings, pages 21–29. IEEE, 1997. [4] V. P. Chakka, A. C. Everspaugh, and J. M. Patel. Indexing large trajectory data sets with seti. Ann Arbor, 1001(48109-2122):12, 2003. [5] B. Chapuis, P. Andritsos, and B. Garbinato. An efficient type-agnostic approach for finding sub-sequences in data. In Data Science and Systems (DSS), 2017 3rd International Conference on. IEEE, 2017. [6] B. Chapuis and B. Garbinato. Scaling and load testing location-based publish and subscribe. In Distributed Computing Systems (ICDCS), 2017 IEEE 37th International Conference on, pages 2543–2546. IEEE, 2017. [7] P. Dewan, R. Ganti, and M. Srivatsa. Som-tc: Self-organizing map for hierarchical trajectory clustering. In Distributed Computing Systems (ICDCS), 2017 IEEE 37th International Conference on, pages 1042– 1052. IEEE, 2017. [8] C. Düntgen, T. Behr, and R. H. Güting. Berlinmod: a benchmark for moving object databases. The VLDB Journal—The International Journal on Very Large Data Bases, 18(6):1335–1368, 2009. [9] T. Eiter and H. Mannila. Computing discrete fréchet distance. Technical report, Tech. Report CD-TR 94/64, Information Systems Department, Technical University of Vienna, 1994. [10] T. Fawcett. Roc graphs: Notes and practical considerations for researchers. Machine learning, 31(1):1–38, 2004. [11] R. A. Finkel and J. L. Bentley. Quad trees a data structure for retrieval on composite keys. Acta informatica, 4(1):1–9, 1974. [12] C. Y. Goh, J. Dauwels, N. Mitrovic, M. T. Asif, A. Oran, and P. Jaillet. Online map-matching based on hidden markov model for real-time traffic sensing applications. In Intelligent Transportation Systems (ITSC), 2012 15th International IEEE Conference on, pages 776–781. IEEE, 2012. [13] A. Guttman. R-trees: A dynamic index structure for spatial searching, volume 14. ACM, 1984. [14] M. Haklay and P. Weber. Openstreetmap: User-generated street maps. IEEE Pervasive Computing, 7(4):12–18, 2008. [15] N. Heintze et al. Scalable document fingerprinting. In 1996 USENIX workshop on electronic commerce, volume 3, 1996. [16] P. Karich and S. Schröder. Graphhopper. http://www.graphhopper.com, last accessed, 4(2):15, 2014. [17] S. Kosub. A note on the triangle inequality for the jaccard distance. arXiv preprint arXiv:1612.02696, 2016. [18] J. K. Laurila, D. Gatica-Perez, I. Aad, O. Bornet, T.-M.-T. Do, O. Dousse, J. Eberle, M. Miettinen, et al. The mobile data challenge: Big data for mobile computing research. In Pervasive Computing, number EPFL-CONF-192489, 2012. [19] D. Lemire, O. Kaser, N. Kurz, L. Deri, C. O’Hara, F. Saint-Jacques, and G. Ssi-Yan-Kai. Roaring bitmaps: Implementation of an optimized software library. arXiv preprint arXiv:1709.07821, 2017. [20] U. Manber et al. Finding similar files in a large file system. In Usenix Winter, volume 94, pages 1–10, 1994. [21] C. D. Manning, P. Raghavan, and H. Schütze. Introduction to Information Retrieval. Cambridge University Press, New York, NY, USA, 2008. [22] P. Newson and J. Krumm. Hidden markov map matching through noise and sparseness. In Proceedings of the 17th ACM SIGSPATIAL international conference on advances in geographic information systems, pages 336–343. ACM, 2009. [23] G. Niemeyer. Geohash, 2008. [24] D. Pfoser, C. S. Jensen, Y. Theodoridis, et al. Novel approaches to the indexing of moving object trajectories. In VLDB, pages 395–406, 2000. [25] S. Schleimer, D. S. Wilkerson, and A. Aiken. Winnowing: local algorithms for document fingerprinting. In Proceedings of the 2003 ACM SIGMOD international conference on Management of data, pages 76–85. ACM, 2003. [26] M. Srivatsa, R. Ganti, and P. Mohapatra. On the limits of subsampling of location traces. In Distributed Computing Systems (ICDCS), 2017 IEEE 37th International Conference on, pages 1032–1041. IEEE, 2017. [27] B. Tang, M. L. Yiu, K. Mouratidis, and K. Wang. Efficient motif discovery in spatial trajectories using discrete fréchet distance. EDBT, 2017. [28] B.-K. Yi, H. Jagadish, and C. Faloutsos. Efficient retrieval of similar time sequences under time warping. In Data Engineering, 1998. Proceedings., 14th International Conference on, pages 201–208. IEEE, 1998. [29] Y. Zheng, X. Xie, and W.-Y. Ma. Geolife: A collaborative social networking service among user, location and trajectory. IEEE Data Eng. Bull., 33(2):32–39, 2010.
8cs.DS
arXiv:1705.05574v1 [math.GR] 16 May 2017 Poly-freeness of even Artin groups of FC type RUBÉN BLASCO-GARCÍA CONCHITA MARTÍNEZ-PÉREZ LUIS PARIS We prove that even Artin groups of FC type are poly-free and residually finite. 20F36 1 Introduction One of the families of groups where the interaction between algebraic and geometric techniques has been most fruitful is the family of Artin groups, also known as ArtinTits groups or generalized braid groups. There are very few works dealing with all the Artin groups, and the theory mainly consists on the study of more or less extended subfamilies. The subfamily of right-angled Artin groups is one of the most studied, in particular because of they resounding applications in homology of groups by Bestvina– Brady [4] and in low dimensional topology by Haglund–Wise [12] and Agol [1]. We refer to Charney [7] for an introductory survey on these groups. The main goal of the present paper is to prove that some known structural property of right-angled Artin groups also holds for a larger family of groups (see Theorem 3.17). The property is the “poly-freeness” and the family is that of even Artin groups of FC type. A group G is called poly-free if there exists a tower of subgroups 1 = G0 E G1 E · · · E GN = G for which each quotient Gi+1 /Gi is a free group. Recall that a group is locally indicable if every non-trivial finitely generated subgroup admits an epimorphism onto Z, and a group is right orderable if it admits a total order invariant under right multiplication. Poly-free groups are locally indicable, and locally indicable groups are right orderable (see Rhemtulla–Rolfsen [17]). The fact that right-angled Artin groups are poly-free was independently proved by Duchamp–Krob [11], Howie [14] and Hermiller–Šunić [13]. 2 R Blasco-Garcı́a, C Martı́nez-Pérez and L Paris Artin groups of FC type were introduced by Charney–Davis [8] in their study of the K(π, 1) conjecture for Artin groups. They are particularly interesting because there are CAT(0) cubical complexes on which they act. This family contains both, the rightangled Artin groups, and the Artin groups of spherical type (those corresponding to finite Coxeter groups). An Artin group is called even if it is defined by relations of the form (st)k = (ts)k , k ≥ 1. There are some papers in the literature dealing with even Coxeter groups (see for example [2]) but as far as we know, there is no other paper dealing with even Artin groups (although they are mentioned in [3]). However, we think that even Artin groups deserve to be studied because they have remarkable properties. One of them is that such a group retracts onto any parabolic subgroup (see Section 2). Our proof is partially inspired by the one of Duchamp–Krob [11] for right-angled Artin groups in the sense that, as them, we define a suitable semi-direct product of an Artin group based on a proper subgraph with a free group, and we show that this semi-direct product is isomorphic to the original Artin group. However, in our case, this approach is more complicated, essentially because we have to deal with relations that are also more complicated. In Section 4 we prove that even Artin groups of FC type are residually finite. This result is a more or less direct consequence of Boler–Evans [5], but it deserves to be pointed out since it increases the list of Artin groups shown to be residually finite. Actually, this list is quite short. It contains the spherical type Artin groups (since they are linear), the right-angled Artin groups (since they are residually nilpotent), and few other examples. In particular, it is not known whether all Artin groups of FC type are residually finite. Acknowledgements We thank Yago Antolı́n for suggesting us the main problem studied in this paper. The first two named authors were partially supported by Gobierno de Aragón, European Regional Development Funds and MTM2015-67781-P (MINECO/FEDER). The first named author was moreover supported by the Departamento de Industria e Innovación del Gobierno de Aragón and Fondo Social Europeo Phd grant 3 Poly-freeness of even Artin groups of FC type 2 Preliminaries 2.1 Artin groups Let S be a finite set. A Coxeter matrix over S is a square matrix M = (ms,t )s,t∈S indexed by the elements of S, with coefficients in N ∪ {∞}, and satisfying ms,s = 1 for all s ∈ S and ms,t = mt,s ≥ 2 for all s, t ∈ S, s 6= t. We will represent such a Coxeter matrix M by a labelled graph Γ, whose set of vertices is S, and where two distinct vertices s, t ∈ S are linked by an edge labelled with ms,t if ms,t 6= ∞. We will also often use the notation V(Γ) to denote the set of vertices of Γ (that is, V(Γ) = S). Remark The labelled graph Γ defined above is not the Coxeter graph of M as defined in Bourbaki [6]. It is another fairly common way to represent a Coxeter matrix. m If a, b are two letters and m is an integer ≥ 2, we set Π(a, b : m) = (ab) 2 if m is even, m−1 and Π(a, b : m) = (ab) 2 a if m is odd. In other words, Π(a, b : m) denotes the word aba · · · of length m. The Artin group of Γ, A = AΓ , is defined by the presentation A = hS | Π(s, t : ms,t ) = Π(t, s : ms,t ) for all s, t ∈ S, s 6= t and ms,t 6= ∞i . The Coxeter group of Γ, W = WΓ , is the quotient of A by the relations s2 = 1, s ∈ S. For T ⊂ S, we denote by AT (resp. WT ) the subgroup of A (resp. W ) generated by T , and by ΓT the full subgraph of Γ spanned by T . Here we mean that each edge of ΓT is labelled with the same number as its corresponding edge of Γ. By Bourbaki [6], the group WT is the Coxeter group of ΓT , and, by van der Lek [15], AT is the Artin group of ΓT . The group AT (resp. WT ) is called a standard parabolic subgroup of A (resp. of W ). As pointed out in the introduction, the theory of Artin groups consists in the study of more or less extended families. The one concerned by the present paper is the family of even Artin groups of FC type. These are defined as follows. We say that A = AΓ is of spherical type if its associated Coxeter group, WΓ , is finite. A subset T of S is called free of infinity if ms,t 6= ∞ for all s, t ∈ T . We say that A is of FC type if AT is of spherical type for every free of infinity subset T of S. Finally, we say that A is even if ms,t is even for all distinct s, t ∈ S (here, ∞ is even). Remark As we said in the introduction, we think that even Artin groups deserve special attention since they have particularly interesting properties as the following ones. Assume that A is even. 4 R Blasco-Garcı́a, C Martı́nez-Pérez and L Paris (1) Let s, t ∈ S, s 6= t. If we set ms,t = 2ks,t , then the Artin relation Π(s, t : ms,t ) = Π(t, s : ms,t ) becomes (st)ks,t = (ts)ks,t . This form of relation is less innocuous than it seems (see Subsection 2.3 for example). (2) Let T be a subset of S. Then the inclusion map AT ֒→ A always admits a retraction πT : A → AT which sends s to s if s ∈ T , and sends s to 1 if s 6∈ T . 2.2 Britton’s lemma Let G be a group generated by a finite set S. We denote by (S ∪ S−1 )∗ the free monoid over S ∪ S−1 , that is, the set of words over S ∪ S−1 , and we denote by (S ∪ S−1 )∗ → G, w 7→ w̄, the map that sends a word to the element of G that it represents. Recall that a set of normal forms for G is a subset N of (S ∪ S−1 )∗ such that the map N → G, w 7→ w̄, is a one-to-one correspondence. Let G be a group with two subgroups A, B ≤ G, and let ϕ : A → B be an isomorphism. A useful consequence of Britton’s lemma yields a set of normal forms for the HNNextension G∗ϕ = hG, t | t−1 at = ϕ(a), a ∈ Ai in terms of a set N of normal forms for G and sets of representatives of the cosets of A and B in G (see Lyndon–Schupp [16]). Explicitly, choose a set TA of representatives of the left cosets of A in G containing 1, and a set TB of representatives of the left cosets of B in G also containing 1. Proposition 2.1 (Britton’s normal forms) Let Ñ be the set of words of the form w0 tε1 w1 · · · tεm wm , where m ≥ 0 , εi ∈ {±1} and wi ∈ N for all i , such that: (a) w̄i ∈ TA if εi = −1 , for i ≥ 1 , (b) w̄i ∈ TB if εi = 1 , for i ≥ 1 , (c) there is no subword of the form tε t−ε . Then Ñ is a set of normal forms for the HNN-extension G∗ϕ . 2.3 Variations of the even Artin-type relations For a, b in a group G, we denote by ba = a−1 ba the conjugate of b by a. The aim of this subsection is to illustrate how the Artin relations in even Artin groups can be expressed in terms of conjugates. This observation will be a key point in our proof of Theorem 3.17. Let s, t be two generators of an Artin group A. The relation st = ts can be expressed as ts = t. Analogously, from tsts = stst, we obtain s−1 tst = tsts−1 , and therefore 5 Poly-freeness of even Artin groups of FC type 2 2 ts = t−1 ts t and ts = ts t(ts )−1 . We deduce that ts , ts ∈ ht, ts i. Doing the same thing with the relation tststs = ststst one easily gets −1 ts −1 −1 2 = t−1 (ts )−1 ts ts t and 3 2 2 ts = ts ts t (ts )−1 (ts )−1 . This can be extended to any even Artin-type relation (ts)k = (st)k giving (2–1) ts −1 k−2 k−1 2 k−1 k−2 = t−1 (ts )−1 · · · (ts )−1 ts ts · · · ts t , k−1 k−1 k ts = ts · · · ts t (ts )−1 · · · (ts )−1 . i As a consequence we see that ts ∈ ht, ts , ts , . . . , ts i for any integer i. 3 Poly-freeness of even Artin groups of FC type In this section we prove that even Artin groups of FC type are poly-free (Theorem 3.17). We begin with a characterization of these groups in terms of their defining graphs. Lemma 3.1 Let AΓ be an even Artin group. Then AΓ is of FC type if and only if every triangular subgraph of Γ has at least two edges labelled with 2 . Proof From the classification of finite Coxeter groups (see Bourbaki [6], for example) follows that an even Artin group AΓ is of spherical type if and only if Γ is complete and for each vertex there is at most one edge with label greater than 2 involving it. Suppose that AΓ is of FC type. Let Ω be a triangular subgraph of Γ. Then AΩ is even and of spherical type, hence, by the above, Ω has at least two edges labelled with 2. Suppose now that every triangular subgraph of Γ has at least two edges labelled with 2. Let Ω be a complete subgraph of Γ. Then Ω is even and every triangular subgraph of Ω has at least two edges labelled with 2, hence, by the above, AΩ is of spherical type. So, AΓ is of FC type. The proof of Theorem 3.17 is based on the following. Proposition 3.2 Assume that AΓ is even and of FC type. Then there is a free group F such that AΓ = F ⋊ A1 , where A1 is an even Artin group of FC type based on a proper subgraph of Γ . 6 R Blasco-Garcı́a, C Martı́nez-Pérez and L Paris We proceed now with some notations needed for the proof of Proposition 3.2. Fix some vertex z of Γ. Recall that the link of z in Γ is the full subgraph lk(z, Γ) of Γ with vertex set V(lk(z, Γ)) = {s ∈ S | s 6= z and ms,z 6= ∞}. As ever, we see lk(z, Γ) as a labelled graph, where the labels are the same as in the original graph Γ. We set L = lk(z, Γ), and we denote by Γ1 the full subgraph of Γ spanned by S \ {z}. We denote by A1 and AL the subgroups of AΓ generated by V(Γ1 ) and V(L), respectively. Recall from Section 2 that A1 and AL are the Artin groups associated with the graphs Γ1 and L, respectively (so this notation is consistent). As pointed out in Section 2, since AΓ is even, the inclusion map A1 ֒→ A has a retraction π1 : AΓ → A1 which sends z to 1 and sends s to s if s 6= z. Similarly, the inclusion map AL ֒→ A1 has a retraction πL : A1 → AL which sends s to s if s ∈ V(L), and sends s to 1 if s 6∈ V(L). It follows that AΓ and A1 split as semi-direct products AΓ = Ker(π1 ) ⋊ A1 and A1 = Ker(πL ) ⋊ AL . For s ∈ V(L) we denote by ks the integer such that mz,s = 2ks . Lemma 3.1 implies the following statement. This will help us to describe AL as an iterated HNN extension. Lemma 3.3 Let s, t be two linked vertices of L . (1) Either ks = 1 , or kt = 1 . (2) If ks > 1 , then ms,t = 2 . Let L1 be the full subgraph of L spanned by the vertices s ∈ V(L) such that ks = 1. Lemma 3.3 implies that L\L1 is totally disconnected. We set V(L\L1 ) = {x1 , . . . , xn }. Again, from Lemma 3.3, we deduce that, for each i ∈ {1, . . . , n}, if the vertex xi is linked to some vertex s ∈ V(L1 ), then the label of the edge between xi and s must be 2. For each i ∈ {1, . . . , n} we set Si = lk(xi , L), and we denote by Xi the full subgraph of L spanned by {x1 , . . . , xi } ∪ V(L1 ) and X0 = L1 . Note that Si is a subgraph of L1 and, therefore, is a subgraph of Xi . The subgraphs of Γ that we have defined so far are sitting as follows inside Γ Si ⊆ L1 = X0 ⊆ X1 ⊆ . . . ⊆ Xn = L ⊆ Γ1 ⊆ Γ where i ∈ {1, . . . , n} The defining map of each of the HNN extensions will be the identity in the subgroup generated by the vertices commuting with xi , that is, ϕi = Id : ASi → ASi . Then, writing down the associated presentation, we see that AXi = (AXi−1 )∗ϕi with stable letter xi . So, we get the following. Lemma 3.4 We have AL = ((AL1 ∗ϕ1 ) ∗ϕ2 · · · )∗ϕn . Poly-freeness of even Artin groups of FC type 7 Now, fix a set N1 of normal forms for AL1 (for example, the set of shortlex geodesic words with respect to some ordering in the standard generating system). We want to use Britton’s lemma to obtain a set of normal forms for AL in terms of N1 . To do so, first, for each i ∈ {1, . . . , n}, we need to determine a set of representatives of the right cosets of ASi in AL1 . The natural way to do it is as follows. Consider the projection map πSi : AL1 → ASi which sends s ∈ V(L) to s if s ∈ V(Si ) and sends s to 1 otherwise. Observe that AL1 = ASi ⋉ Ker(πSi ). Then, Ker(πSi ) is a well-defined set of representatives of the right cosets of ASi in AL1 . In our next result we will use this set of representatives together with Britton’s lemma to construct a set NL of normal forms for AL . More precisely, NL denotes the set of words of the form w0 xεα11 w1 · · · xεαmm wm , where wj ∈ N1 for all j ∈ {0, 1, . . . , m}, αj ∈ {1, . . . , n}, w̄j ∈ Ker(πSαj ) and εj ∈ {±1} for all j ∈ {1, . . . , m}, and there is no subword of the form xεα x−ε α with α ∈ {1, . . . , n}. Lemma 3.5 The set NL is a set of normal forms for AL . Proof For i ∈ {0, 1, . . . , n}, we denote by NL,i the set of words of the form (3–1) w0 xεα11 w1 · · · xεαmm wm , where wj ∈ N1 for all j ∈ {0, 1, . . . , m}, αj ∈ {1, . . . , i}, w̄j ∈ Ker(πSαj ) and εj ∈ {±1} for all j ∈ {1, . . . , m}, and there is no subword of the form xεα x−ε α with α ∈ {1, . . . , i}. We prove by induction on i that NL,i is a set of normal forms for AXi . Since AL = AXn , this will prove the lemma. The case i = 0 is true by definition since AL1 = AX0 and NL,0 = N1 . So, we can assume that i ≥ 1 plus the inductive hypothesis. Recall that AXi = (AXi−1 )∗ϕi , where ϕi is the identity map on ASi . By induction, NL,i−1 is a set of normal forms for AXi−1 . We want to apply Proposition 2.1, so we also need a set Ti of representatives of the right cosets of ASi in AXi−1 . Since AL1 = ASi ⋉ Ker(πSi ), we see that we may take as Ti the set of elements of AXi−1 whose normal forms, written as in Equation 3–1, satisfy w̄0 ∈ Ker(πSi ). Now, take g ∈ AXi and use Proposition 2.1 with the set NL,i−1 of normal forms and the set Ti of representatives to write a uniquely determined expression for g. The set of these expressions is clearly NL,i . Given g ∈ AL , we denote by n(g) the normal form of g in NL . 8 R Blasco-Garcı́a, C Martı́nez-Pérez and L Paris The following sets will be crucial in our argument. The set T0 is the set of g ∈ AL such that n(g) does not begin with s−1 or sks for any s ∈ V(L). In other words, T0 denotes the set of elements in AL such that n(g) has w0 = 1, ε1 = 1, and no consecutive sequence of xα1 ’s of length kxα1 at the beginning. On the other hand, we set T = T0 Ker(πL ). The reason why these sets are so important to us is that T will serve as index set for a free basis for the free group F of Proposition 3.2, that is, F = F(B) is the free group with basis a set B = {bg | g ∈ T} in one-to-one correspondence with T . We will also consider a smaller auxiliary free group F0 = F(B0 ) with basis B0 = {bh | h ∈ T0 }. Observe that, since T0 ⊆ AL , we have that any g ∈ T can be written in a unique way as g = hu with h ∈ T0 and u ∈ Ker(πL ). At this point, we can explain the basic idea of the proof of Proposition 3.2. We will define an action of A1 on F and form the corresponding semi-direct product. Then we will construct an explicit isomorphism between this semi-direct product and the original group AΓ that takes F onto Ker(π1 ). More explicitly, this isomorphism will be an extension of the homomorphism ϕ : F → Ker(π1 ) which sends bg to zg for all g ∈ T. We proceed now to define the action of A1 on F . This action should mimic the obvious conjugation action of A1 on Ker(π1 ). As a first step, we start defining an action of AL on F0 . This will be later extended to the desired action of A1 on F . Given h ∈ T0 , we denote by supp(h) the set of xi ∈ V(L \ L1 ) which appear in the normal form n(h). We will need the following technical result. Lemma 3.6 Let s ∈ V(L) and h ∈ T0 . (1) If s ∈ V(L1 ) and s ∈ V(Si ) for every xi ∈ supp(h) (including the case h = 1 ), then hs 6∈ T0 and hs−1 6∈ T0 , but shs−1 , s−1 hs ∈ T0 . (2) If s = x ∈ V(L \ L1 ) and h = xkx −1 , then hs 6∈ T0 and hs−1 ∈ T0 . (3) If s = x ∈ V(L \ L1 ) and h = 1 , then hs ∈ T0 and hs−1 6∈ T0 . (4) We have hs, hs−1 ∈ T0 in all the other cases. Proof Since h ∈ T0 , h has a normal form xεα11 w1 · · · xεαmm wm , with each wj the normal form of an element in Ker(πSαj ). In the case when s = x ∈ V(L \ L1 ), multiplying this expression by x on the right, we get, after a possible cancellation x−1 x, a normal form. So, hx 6∈ T0 if and only if h = xkx −1 . Similarly, we have hx−1 6∈ T0 if and only if h = 1. 9 Poly-freeness of even Artin groups of FC type Now, suppose that s ∈ V(L1 ). Assume that s ∈ Sαj for j = j0 + 1, . . . , m, but s 6∈ Sαj0 . Then the normal form for hs is εj ε ′ εm ′ xεα11 w1 · · · wj0 −1 xαj00 w′j0 · · · xαm−1 m−1 wm−1 xαm wm , where w′j0 is the normal form for w̄j0 s, and, for j ∈ {j0 + 1, . . . , m}, w′j is the normal form for s−1 w̄j s. Hence, hs ∈ T0 . Similarly, hs−1 ∈ T0 . On the contrary, assume that s ∈ Sαj for all those xj appearing in the normal form for h. Then the normal form for hs is sxεα11 w′1 · · · xεαmm w′m , where w′j is the normal form for s−1 w̄j s for all j ∈ {1, . . . , m}. This form begins with s, hence hs 6∈ T0 . However, the normal form for s−1 hs is obtained from the above form by removing the s at the beginning, hence s−1 hs ∈ T0 . Similarly, hs−1 6∈ T0 and shs−1 ∈ T0 . Hidden in the proof of Lemma 3.6 is the fact that, if g1 , g2 ∈ AL1 and h ∈ T0 , then g1 hg2 ∈ AL1 T0 . Moreover, by Lemma 3.5, every element of AL1 T0 is uniquely written in the form gh with g ∈ AL1 and h ∈ T0 . In this case we set u(gh) = h. So, by Lemma 3.6, if s ∈ V(L1 ) and h ∈ T0 , then u(hs) = s−1 hs if s ∈ V(Si ) for every xi ∈ supp(h), and u(hs) = hs otherwise. If s = x ∈ V(L \ L1 ), then u(hx) is not defined if h = xkx −1 , and u(hx) = hx otherwise. We turn now to define the action of AL on F0 . We start with the action of the generators. Let s ∈ V(L). For h ∈ T0 we set  bu(hs) if hs ∈ AL1 T0 , bh ∗ s = −1 · · · b if s = x ∈ V(L \ L1 ) and h = xkx −1 . bxkx −1 · · · bx b1 b−1 x xkx −1 Then we extend the map B → F0 , bh 7→ bh ∗ s, to a homomorphism F0 → F0 , f 7→ f ∗ s. Lemma 3.7 The above defined homomorphism ∗s : F0 → F0 is an automorphism. Proof The result will follow if we show that the map has an inverse. Our candidate to inverse will be the map ∗s−1 : F0 → F0 defined by  if hs−1 ∈ AL1 T0 ,  bu(hs−1 ) bh ∗ s−1 = · · · bx b1 if s = x ∈ V(L \ L1 ) b b b−1 b−1 · · · b−1 xkx −2 xkx −1 xkx −2  1 x and h = 1 . Assume first that either s ∈ V(L1 ), or h 6∈ {1, xkx −1 } with s = x ∈ V(L \ L1 ). In this case we only have to check that u(u(hs)s−1 ) = h = u(u(hs−1 )s). Observe that the 10 R Blasco-Garcı́a, C Martı́nez-Pérez and L Paris condition s ∈ V(L1 ) and s ∈ Si for every xi ∈ supp(h) is equivalent to s ∈ V(L1 ) and s ∈ Si for every xi ∈ supp(u(hs)), thus, if that condition holds, we have u(hs) = s−1 hs and u(u(hs)s−1 ) = u((s−1 hs)s−1 ) = ss−1 hss−1 = h. If the condition fails, then u(hs) = hs and u(u(hs)s−1 ) = u((hs)s−1 ) = hss−1 = h. Analogously, one checks that h = u(u(hs−1 )s). Now, we assume that s = x ∈ V(L \ L1 ) and either h = 1 or h = xkx −1 . If h = xkx −1 , then −1 −1 (bh ∗ x) ∗ x−1 = (bxkx −1 · · · bx b1 b−1 x · · · bxkx −1 ) ∗ x −1 = bxkx −2 · · · b1 (b1 ∗ x−1 ) b−1 1 · · · bxkx −2 −1 −1 −1 −1 = bxkx −2 · · · b1 b−1 1 bx · · · bxkx −2 bxkx −1 bxkx −2 · · · bx b1 b1 · · · bxkx −2 = bxkx −1 = bh . On the other hand, (bh ∗ x−1 ) ∗ x = bxkx −2 ∗ x = bxkx −1 = bh . The case when h = 1 is analogous. To show that this action, defined just for the generators of AL , yields an action of AL on F0 , we need to check that it preserves the Artin relations. We do it in the next two lemmas. Lemma 3.8 Let s, t ∈ V(L) such that ms,t = 2 . Then (g ∗ s) ∗ t = (g ∗ t) ∗ s for all g ∈ F0 . Proof Since s and t are linked in V(L), Lemma 3.1 implies that at least one of the vertices s, t lies in V(L1 ). Without loss of generality we may assume s ∈ V(L1 ), i.e., ks = 1. Let h ∈ T0 . Then bh ∗ s = bu(hs) . Assume first that either ht ∈ T0 , or t ∈ Si for every xi ∈ supp(h). In this last case, we have t ∈ Si for any xi ∈ supp(u(hs)). Therefore (bh ∗ s) ∗ t = bu(hs) ∗ t = bu(u(hs)t) and (bh ∗ t) ∗ s = bu(ht) ∗ s = bu(u(ht)s) . Depending on whether hs lies in T0 or not we have u(hs) = hs or u(hs) = s−1 hs, and the same for t. So, we have four cases to consider. If hs, ht ∈ T0 , then hst = hts ∈ T0 and u(u(hs)t) = u((hs)t) = hst = hts = u((ht)s) = u(u(ht)s) . If hs ∈ T0 and ht 6∈ T0 , then hst 6∈ T0 but t−1 hts ∈ T0 , hence u(u(hs)t) = u((hs)t) = t−1 hst = t−1 hts = u((t−1 ht)s) = u(u(ht)s) . Poly-freeness of even Artin groups of FC type 11 Similarly, if hs 6∈ T0 and ht ∈ T0 , then u(u(hs)t) = u(u(ht)s). If hs, ht 6∈ T0 , then s−1 hst 6∈ T0 and t−1 hts 6∈ T0 , thus u(u(hs)t) = u((s−1 hs)t) = t−1 s−1 hst = s−1 t−1 hts = u((t−1 ht)s) = u(u(ht)s) . We are left with the case where t = y ∈ V(L \ L1 ) and h = yky −1 . Then, since s and y are linked, for every α ∈ {0, 1, . . . , ky − 1} we have u(yα s) = s−1 yα s = yα , thus −1 (bh ∗ s) ∗ y = bh ∗ y = byky −1 · · · by b1 b−1 y · · · byky −1 , −1 −1 −1 (bh ∗ y) ∗ s = (byky −1 · · · by b1 b−1 y · · · byky −1 ) ∗ s = byky −1 · · · by b1 by · · · byky −1 . If w is a word over {s, t}, where s, t ∈ V(L), and if h ∈ T0 , we define bh ∗ w by induction on the length of w by setting bh ∗ 1 = bh and bh ∗ (ws) = (bh ∗ w) ∗ s. Lemma 3.9 Let s, t ∈ V(L) such that ms,t = 2k > 2 . Then bh ∗ ((st)k ) = bh ∗ ((ts)k ) for all h ∈ T0 . Proof Note that, since s and t are linked and the edge between them is labelled with 2k > 2, Lemma 3.1 implies that s, t ∈ V(L1 ). Take h ∈ T0 . Then, in a similar way as in the proof of Lemma 3.8, we have hs ∈ T0 if and only if u(hstst · · · t)s ∈ T0 and this is also equivalent to u(htsts · · · t)s ∈ T0 . The same thing happens for t. So, we may distinguish essentially the same cases as in the first part of the proof of Lemma 3.8 and get the following. If hs, ht ∈ T0 , then (bh ) ∗ (st)k = bh(st)k = bh(ts)k = (bh ) ∗ (ts)k . If hs ∈ T0 and ht 6∈ T0 , then (bh ) ∗ (st)k = bt−k h(st)k = bt−k h(ts)k = (bh ) ∗ (ts)k . Similarly, if hs 6∈ T0 and ht ∈ T0 , then (bh ) ∗ (st)k = (bh ) ∗ (ts)k . If hs, ht 6∈ T0 , then (bh ) ∗ (st)k = b(st)−k h(st)k = b(ts)−k h(ts)k = (bh ) ∗ (ts)k . All the previous discussion implies the following. Lemma 3.10 The mappings ∗s , s ∈ V(L) , yield a well-defined right-action F0 ×AL → F0 , (u, g) 7→ u ∗ g . Moreover, this action behaves as one might expect. To show this, we will need the following technical lemma. 12 R Blasco-Garcı́a, C Martı́nez-Pérez and L Paris Lemma 3.11 Let g ∈ AL1 T0 , and let n(g) = w0 xεα11 w1 · · · xεαnn wn be its normal form. Then any prefix of n(g) also represents an element in AL1 T0 . Proof The only case where it is not obvious is when the prefix is of the form ε w0 xεα11 w1 · · · xαjj uj with uj a prefix of wj . Let h be the element of AL represented ε ε by w0 xεα11 w1 · · · xαjj uj , and let h′ be the element represented by w0 xεα11 w1 · · · xαjj . It is clear that h′ ∈ AL1 T0 . Moreover, h = h′ ūj , hence, as pointed out after the proof of Lemma 3.6, we have h ∈ AL1 T0 . Lemma 3.12 For every g ∈ AL1 T0 we have b1 ∗ g = bu(g) . Proof Set again n(g) = w0 xεα11 w1 · · · xεαnn wn . Let vsε be a prefix of n(g) with s a vertex and ε ∈ {±1}. Note that Lemma 3.11 implies that vsε and v represent elements in AL1 T0 . We are going to prove that, if b1 ∗ v̄ = bu(v̄) , then also b1 ∗ v̄sε = bu(v̄sε ) . Note that this will imply the result. As v̄sε lies in AL1 T0 , the element u(v̄sε ) is well-defined. Observe that u(u(v̄)sε ) is also well-defined. We have b1 ∗ (v̄sε ) = bu(v̄) ∗ sε = bu(u(v̄)sε ) . So, we only need to show that u(u(v̄)sε ) = u(v̄sε ). Set v̄ = qh with h ∈ T0 and q ∈ AL1 . Then u(v̄) = h, thus, by Lemma 3.6, u(u(v̄)sε ) = u(hsε ) = u(qhsε ) = u(v̄sε ). Our next objective is to extend the action of AL on F0 to an action of A1 on F . Recall that T = T0 Ker(πL ) and that any h ∈ T can be written in a unique way as h = h0 u with h0 ∈ T0 and u ∈ Ker(πL ). Taking this into account we set bh = bh0 u = bh0 · u. Q Q We extend this notation to any element ω = bεhii ∈ F0 by setting ω · u = bεhii u . Now, let g ∈ A1 and h ∈ T . We write h = h0 u with h0 ∈ T0 and u ∈ Ker(πL ). So, with the previous notation, we have bh = bh0 · u. Then we set bh ∗ g = (bh0 ∗ πL (g)) · (πL (g)−1 ug) . Q We can also write this action as follows. Let ω = bεhii ∈ F0 and let u ∈ Ker(πL ). Then (3–2) (ω · u) ∗ g = (ω ∗ πL (g)) · (πL (g)−1 ug) . Lemma 3.13 The above defined map F × A1 → F , (ω, g) 7→ ω ∗ g , is a well-defined right-action of A1 on F . Proof The lemma is essentially a consequence of the fact that the action of AL on F0 is well-defined. Let g1 , g2 ∈ A1 and let bh = bh0 · u ∈ B, where h0 ∈ T0 and u ∈ Ker(πL ). Then, using Equation 3–2,  (bh ∗ g1 ) ∗ g2 = ((bh0 · u) ∗ g1 ) ∗ g2 = (bh0 ∗ πL (g1 )) · (πL (g1 )−1 ug1 ) ∗ g2 = ((bh0 ∗ πL (g1 )) ∗ πL (g2 )) · (πL (g2 )−1 (πL (g1 )−1 ug1 )g2 ) = (bh0 ∗ πL (g1 g2 )) · (πL (g1 g2 )−1 ug1 g2 ) = bh ∗ g1 g2 . 13 Poly-freeness of even Artin groups of FC type Recall the homomorphism ϕ : F → Ker(π1 ) that sends bh to zh for all h ∈ T . We consider the semi-direct product G = A1 ⋉ F associated with the above action, and we turn to define an extension of ϕ to G. Lemma 3.14 The map G → A , (g, ω) 7→ g ϕ(ω) , is a well-defined homomorphism. Proof We have to check that, for all g1 , g2 ∈ A1 and all ω1 , ω2 ∈ F , we have ϕ(g1 , ω1 )ϕ(g2 , ω2 ) = g1 g2 ϕ(ω1 )g2 ϕ(ω2 ) = ϕ(g1 g2 , (ω1 ∗ g2 )ω2 ) = g1 g2 ϕ((ω1 ∗ g2 )ω2 ) . Since the restriction of ϕ to F is a group homomorphism, this is equivalent to show that ϕ(ω1 )g2 = ϕ(ω1 ∗ g2 ). It is enough to prove this for the group generators. So, we can assume that ω1 = bh for some h ∈ T , and that g2 = s for some vertex s ∈ V(Γ), s 6= z. We have ϕ(bh )s = s−1 zh s = s−1 h−1 zhs, and we need to check that this is equal to ϕ(bh ∗ s). To see it we set h = h0 u, with h0 ∈ T0 and u ∈ Ker(πL ), so that bh = bh0 · u. Observe first that, if s 6∈ V(L), then πL (s) = 1, thus bh ∗ s = bh0 · (us) = bh0 us = bhs , and therefore ϕ(bh ∗ s) = ϕ(bhs ) = zhs = ϕ(bh )s . So, from now on, we will assume that s ∈ V(L). Then πL (s) = s, thus bsh = (bh0 ∗ s) · (s−1 us), and therefore ϕ(bh ∗ s) = ϕ(bh0 ∗ s)s −1 us = s−1 ϕ(bh0 ∗ s)s −1 u s. So, we only have to prove that ϕ(bh0 ∗ s) = zh0 s . We distinguish three different cases. If h0 s ∈ T0 , then bh0 ∗ s = bh0 s , thus ϕ(bh0 ∗ s) = ϕ(bh0 s ) = zh0 s . If h0 s 6∈ T0 , s ∈ V(L1 ) and s ∈ Si for every xi ∈ supp(h0 ), then bh0 ∗ s = bs−1 h0 s , thus ϕ(bh0 ∗ s) = ϕ(bs−1 h0 s ) = zs −1 h s 0 = zh0 s . Finally, if s = x ∈ V(L \ L1 ) and h0 = xkx −1 , then −1 bh0 ∗ x = bxkx −1 · · · bx b1 b−1 x · · · bxkx −1 , thus −1 ϕ(bh0 ∗ x) = ϕ(bxkx −1 · · · bx b1 b−1 x · · · bxkx −1 ) kx −1 = zx kx −1 · · · zx z (zx )−1 · · · (zx kx )−1 = zx = zh0 x . 14 R Blasco-Garcı́a, C Martı́nez-Pérez and L Paris Now, we want to define the inverse map of ϕ. We do it by giving the images of the Artin generators of A, that is, the vertices of Γ. Lemma 3.15 There is a well-defined homomorphism ψ : A → G that sends s to s for all s ∈ V(Γ) \ {z} , and sends z to b1 . Proof We have to check that the Artin relations are preserved by ψ . Note that it suffices to check it for the Artin relations that involve z and some s ∈ V(Γ) \ {z}. If s 6∈ V(L), then there is nothing to check because, in that case, s and z are not linked in Γ, hence there is no relation between them. If s ∈ V(L), then we can rewrite the Artin relation as ks −1 ks −1 ks · · · zs z (zs )−1 · · · (zs )−1 . zs = zs We include here the case s ∈ V(L1 ), where we have ks = 1 and the above formula is zs = z. Applying ψ to the left hand side of this equation we get ks −1 ψ(zs ) = s−ks b1 sks = s−1 bsks −1 s = bsks −1 · · · bs b1 b−1 s · · · bsks −1 , which is exactly what we get applying ψ to the right hand side. Lemma 3.14 and Lemma 3.15 show part of the following result. Proposition 3.16 The maps ϕ : G → A and ψ : A → G are well-defined group isomorphisms. Proof We have already seen that both maps are group homomorphisms. We claim that they are inverses of each other. This will prove the result. Let s ∈ V(Γ), s 6= z. We have (ϕ ◦ ψ)(s) = ϕ(s) = s and (ψ ◦ ϕ)(s) = ψ(s) = s. Also (ϕ ◦ ψ)(z) = ϕ(b1 ) = z and (ψ ◦ ϕ)(b1 ) = ψ(z) = b1 . Moreover, Lemma 3.12 implies that b1 and the Artin generators of A1 generate the whole group G, so ψ ◦ ϕ is the identity of G. Similarly, ϕ ◦ ψ is the identity of A. Now, we obtain immediately our main result. Theorem 3.17 Every even Artin group of FC type is poly-free. Proof By Proposition 3.16, AΓ ≃ G = F ⋊ A1 . By induction we may assume that A1 is poly-free, thus A is also poly-free. Poly-freeness of even Artin groups of FC type 15 4 Residually finiteness In this section we will show that even Artin groups of FC type are residually finite. Recall that a group G is said to be residually finite if, for every g ∈ G \ {1}, there is a normal subgroup of finite index in G not containing g. It is well-known that being residually finite is not closed under short exact sequences, in the sense that, if N is a normal subgroup of G and both N and G/N are residually finite, then one cannot deduce the same for G itself. However, the situation changes if we work under some extra hypothesis. For example, a direct product of residually finite groups is residually finite. This can be generalized to the following result of Boler–Evans [5] that will be crucial in our argument. Theorem 4.1 (Boler–Evans [5]) Let G1 , G2 be residually finite groups, and let L ≤ G1 , G2 such that both split as Gi = Hi ⋊ L . Then the amalgamated free product G = G1 ∗L G2 is residually finite. Using this we get the following. Theorem 4.2 Every even Artin group of FC type is residually finite. Proof We argue by induction on the number of vertices of Γ. Assume first that Γ is complete. Then, by definition, AΓ is of spherical type, hence, by Cohen–Wales [9] and Digne [10], AΓ is linear, and therefore AΓ is residually finite. Assume that Γ is not complete. Then we can choose two distinct vertices s, t ∈ S = V(Γ) such that ms,t = ∞. Set X = S \ {s}, Y = S \ {t} and Z = S \ {s, t}. From the presentation of A follows that A = AX ∗AZ AY . Moreover, since A is even, the inclusion map AZ ֒→ AX has a retraction πX,Z : AX → AZ which sends r to r for all r ∈ Z and sends t to 1, hence AX = Ker(πX,Z )⋊ AZ . Similarly, the inclusion map AZ ֒→ AY has a retraction πY,Z : AY → AZ , hence AY = Ker(πY,Z ) ⋊ AZ . By the inductive hypothesis, AX and AY are residually finite, hence, by Theorem 4.1, A is also residually finite. References [1] I Agol, The virtual Haken conjecture, With an appendix by Agol, Daniel Groves, and Jason Manning, Doc. Math. 18 (2013), 1045–1087. [2] Y Antolı́n, L Ciobanu Geodesic growth in right-angled and even Coxeter groups European J. of Combinatorics 34 (5) (2013), 859–874. 16 R Blasco-Garcı́a, C Martı́nez-Pérez and L Paris [3] E Artal Bartolo, J I Cogolludo-Agustı́n, D Matei, Quasi-projectivity, Artin-Tits groups, and pencil maps, Topology of algebraic varieties and singularities, 113–136, Contemp. Math., 538, Amer. Math. Soc., Providence, RI, 2011. [4] M Bestvina, N Brady, Morse theory and finiteness properties for groups, Invent. Math. 129 (1997), no. 3, 445–470. [5] J Boler, B Evans, The free product of residually finite groups amalgamated along retracts is residually finite, Proc. Amer. Math. Soc. 37 (1973), 50–52. [6] N Bourbaki, Eléments de mathématique. Fasc. XXXIV. Groupes et algèbres de Lie. Chapitre IV: Groupes de Coxeter et systèmes de Tits. Chapitre V: Groupes engendrés par des réflexions. Chapitre VI: Systèmes de racines. Actualités Scientifiques et Industrielles, No. 1337, Hermann, Paris, 1968. [7] R Charney, An introduction to right-angled Artin groups, Geom. Dedicata 125 (2007), 141–158. [8] R Charney, M W Davis, The K(π, 1)-problem for hyperplane complements associated to infinite reflection groups, J. Amer. Math. Soc. 8 (1995), no. 3, 597–627. [9] A M Cohen, D B Wales, Linearity of Artin groups of finite type, Israel J. Math. 131 (2002), 101–123. [10] F Digne, On the linearity of Artin braid groups, J. Algebra 268 (2003), no. 1, 39–57. [11] G Duchamp, D Krob, Free partially commutative structures, J. Algebra 156 (1993), no. 2, 318–361. [12] F Haglund, D T Wise, Special cube complexes, Geom. Funct. Anal. 17 (2008), no. 5, 1551–1620. [13] S Hermiller, Z Šunić, Poly-free constructions for right-angled Artin groups, J. Group Theory 10 (2007), no. 1, 117–138. [14] J Howie, Bestvina-Brady groups and the plus construction, Math. Proc. Cambridge Philos. Soc. 127 (1999), no. 3, 487–493. [15] H Van der Lek, The homotopy type of complex hyperplane complements, Ph. D. Thesis, Nijmegen, 1983. [16] R C Lyndon, P E Schupp, Combinatorial group theory, Ergebnisse der Mathematik und ihrer Grenzgebiete, Band 89. Springer-Verlag, Berlin-New York, 1977. [17] A Rhemtulla, D Rolfsen, Local indicability in ordered groups: braids and elementary amenable groups, Proc. Amer. Math. Soc. 130 (2002), no. 9, 2569–2577. Departamento de Matemáticas, Universidad de Zaragoza, 50009 Zaragoza, Spain Departamento de Matemáticas, Universidad de Zaragoza, 50009 Zaragoza, Spain IMB, UMR 5584, CNRS, Univ. Bourgogne Franche-Comté, 21000 Dijon, France [email protected], [email protected], [email protected]
4math.GR